From aa4f1e164bb9a0fe438c262f40857ca639b56fad Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 3 May 2007 00:16:07 +0000 Subject: Add a new option. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36657 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/TargetMachine.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/Target/TargetMachine.cpp b/lib/Target/TargetMachine.cpp index 4e7048253a..b79b87b479 100644 --- a/lib/Target/TargetMachine.cpp +++ b/lib/Target/TargetMachine.cpp @@ -54,20 +54,27 @@ namespace { cl::location(UnsafeFPMath), cl::init(false)); cl::opt - EnableFiniteOnltFPMath("enable-finite-only-fp-math", + EnableFiniteOnlyFPMath("enable-finite-only-fp-math", cl::desc("Enable optimizations that assumes non- NaNs / +-Infs"), cl::location(FiniteOnlyFPMathOption), cl::init(false)); cl::opt + EnableHonorSignDependentRoundingFPMath(cl::Hidden, + "enable-sign-dependent-rounding-fp-math", + cl::desc("Force codegen to assume rounding mode can change dynamically"), + cl::location(HonorSignDependentRoundingFPMathOption), + cl::init(false)); + + cl::opt GenerateSoftFloatCalls("soft-float", cl::desc("Generate software floating point library calls"), cl::location(UseSoftFloat), cl::init(false)); cl::opt DontPlaceZerosInBSS("nozero-initialized-in-bss", - cl::desc("Don't place zero-initialized symbols into bss section"), - cl::location(NoZerosInBSS), - cl::init(false)); + cl::desc("Don't place zero-initialized symbols into bss section"), + cl::location(NoZerosInBSS), + cl::init(false)); cl::opt EnableExceptionHandling("enable-eh", cl::desc("Exception handling should be emitted."), @@ -146,5 +153,11 @@ namespace llvm { /// the code generator is not allowed to assume that FP arithmetic arguments /// and results are never NaNs or +-Infs. bool FiniteOnlyFPMath() { return UnsafeFPMath || FiniteOnlyFPMathOption; } + + /// HonorSignDependentRoundingFPMath - Return true if the codegen must assume + /// that the rounding mode of the FPU can change from its default. + bool HonorSignDependentRoundingFPMath() { + return !UnsafeFPMath && HonorSignDependentRoundingFPMathOption; + } } -- cgit v1.2.3