Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Merge "Revert "Add relaxed math attributes to all functions""
Browse files Browse the repository at this point in the history
  • Loading branch information
arsenm authored and Gerrit Code Review committed Sep 13, 2017
2 parents abc46c9 + 6a77f3f commit 4b1b066
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions utils/prepare-builtins/prepare-builtins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/Bitcode/BitcodeWriter.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/LLVMContext.h"
Expand Down Expand Up @@ -108,18 +107,6 @@ int main(int argc, char **argv) {
}
}

// Set relaxed math attributes. This does not mean a library module was built
// with those relaxations, but marks it compatible with the relaxations which
// may be used for the kernel module. Setting them prevents removal of them
// for a caller function, thus retaining original caller attributes.
AttrBuilder B;
B.addAttribute("less-precise-fpmad", "true");
B.addAttribute("no-infs-fp-math", "true");
B.addAttribute("no-nans-fp-math", "true");
B.addAttribute("unsafe-fp-math", "true");
for (Function &F : M->functions()) {
F.addAttributes(AttributeList::FunctionIndex, B);
}

if (OutputFilename.empty()) {
errs() << "no output file\n";
Expand Down

0 comments on commit 4b1b066

Please sign in to comment.