Expose an option allowing unsafe math optimizations. Patch contributed by
Morten Ofstad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21630 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/TargetMachine.cpp b/lib/Target/TargetMachine.cpp
index 8e96576..b6bab72 100644
--- a/lib/Target/TargetMachine.cpp
+++ b/lib/Target/TargetMachine.cpp
@@ -26,6 +26,7 @@
bool NoFramePointerElim;
bool NoExcessFPPrecision;
int PatternISelTriState;
+ bool UnsafeFPMath;
};
namespace {
cl::opt<bool, true> PrintCode("print-machineinstrs",
@@ -46,6 +47,11 @@
cl::desc("sets the pattern ISel off(0), on(1), default(2)"),
cl::location(PatternISelTriState),
cl::init(2));
+ cl::opt<bool, true>
+ EnableUnsafeFPMath("enable-unsafe-fp-math",
+ cl::desc("Enable optimizations that may decrease FP precision"),
+ cl::location(UnsafeFPMath),
+ cl::init(false));
};
//---------------------------------------------------------------------------