From: Chris Lattner Date: Sat, 15 Jan 2005 06:00:32 +0000 (+0000) Subject: Add a new target-independent code generator flag. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=45554a61f2814e1d445e272076fd7187e74a25c0;p=oota-llvm.git Add a new target-independent code generator flag. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19567 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Target/TargetOptions.h b/include/llvm/Target/TargetOptions.h index b3668e2a1bc..887e404f74e 100644 --- a/include/llvm/Target/TargetOptions.h +++ b/include/llvm/Target/TargetOptions.h @@ -25,6 +25,15 @@ namespace llvm { /// specified on the command line. If the target supports the frame pointer /// elimination optimization, this option should disable it. extern bool NoFramePointerElim; + + /// NoExcessFPPrecision - This flag is enabled when the + /// -disable-excess-fp-precision flag is specified on the command line. When + /// this flag is off (the default), the code generator is allowed to produce + /// results that are "more precise" than IEEE allows. This includes use of + /// FMA-like operations and use of the X86 FP registers without rounding all + /// over the place. + extern bool NoExcessFPPrecision; + } // End llvm namespace #endif diff --git a/lib/Target/TargetMachine.cpp b/lib/Target/TargetMachine.cpp index 973165f186e..22df91faeb8 100644 --- a/lib/Target/TargetMachine.cpp +++ b/lib/Target/TargetMachine.cpp @@ -24,6 +24,7 @@ using namespace llvm; namespace llvm { bool PrintMachineCode; bool NoFramePointerElim; + bool NoExcessFPPrecision; }; namespace { cl::opt PrintCode("print-machineinstrs", @@ -35,6 +36,11 @@ namespace { cl::desc("Disable frame pointer elimination optimization"), cl::location(NoFramePointerElim), cl::init(false)); + cl::opt + DisableExcessPrecision("disable-excess-fp-precision", + cl::desc("Disable optimizations that may increase FP precision"), + cl::location(NoExcessFPPrecision), + cl::init(false)); }; //---------------------------------------------------------------------------