[llvm-commits] CVS: llvm/lib/Target/TargetMachine.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Apr 29 21:10:06 PDT 2005



Changes in directory llvm/lib/Target:

TargetMachine.cpp updated: 1.37 -> 1.38
---
Log message:

Expose an option allowing unsafe math optimizations.  Patch contributed by
Morten Ofstad!



---
Diffs of the changes:  (+6 -0)

 TargetMachine.cpp |    6 ++++++
 1 files changed, 6 insertions(+)


Index: llvm/lib/Target/TargetMachine.cpp
diff -u llvm/lib/Target/TargetMachine.cpp:1.37 llvm/lib/Target/TargetMachine.cpp:1.38
--- llvm/lib/Target/TargetMachine.cpp:1.37	Thu Apr 21 17:55:34 2005
+++ llvm/lib/Target/TargetMachine.cpp	Fri Apr 29 23:09:52 2005
@@ -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));
 };
 
 //---------------------------------------------------------------------------






More information about the llvm-commits mailing list