[llvm-commits] CVS: llvm/lib/Target/TargetMachine.cpp
Evan Cheng
evan.cheng at apple.com
Tue May 23 11:18:59 PDT 2006
Changes in directory llvm/lib/Target:
TargetMachine.cpp updated: 1.45 -> 1.46
---
Log message:
-enable-unsafe-fp-math implies -enable-finite-only-fp-math
---
Diffs of the changes: (+10 -2)
TargetMachine.cpp | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
Index: llvm/lib/Target/TargetMachine.cpp
diff -u llvm/lib/Target/TargetMachine.cpp:1.45 llvm/lib/Target/TargetMachine.cpp:1.46
--- llvm/lib/Target/TargetMachine.cpp:1.45 Tue May 23 01:39:12 2006
+++ llvm/lib/Target/TargetMachine.cpp Tue May 23 13:18:46 2006
@@ -26,7 +26,7 @@
bool NoFramePointerElim;
bool NoExcessFPPrecision;
bool UnsafeFPMath;
- bool FiniteOnlyFPMath;
+ bool FiniteOnlyFPMathOption;
Reloc::Model RelocationModel;
};
namespace {
@@ -52,7 +52,7 @@
cl::opt<bool, true>
EnableFiniteOnltFPMath("enable-finite-only-fp-math",
cl::desc("Enable optimizations that assumes non- NaNs / +-Infs"),
- cl::location(FiniteOnlyFPMath),
+ cl::location(FiniteOnlyFPMathOption),
cl::init(false));
cl::opt<llvm::Reloc::Model, true>
DefRelocationModel(
@@ -93,3 +93,11 @@
void TargetMachine::setRelocationModel(Reloc::Model Model) {
RelocationModel = Model;
}
+
+namespace llvm {
+ /// FiniteOnlyFPMath - This returns true when the -enable-finite-only-fp-math
+ /// option is specified on the command line. If this returns false (default),
+ /// the code generator is not allowed to assume that FP arithmetic arguments
+ /// and results are never NaNs or +-Infs.
+ bool FiniteOnlyFPMath() { return UnsafeFPMath || FiniteOnlyFPMathOption; }
+};
More information about the llvm-commits
mailing list