Add a new target-independent code generator flag.
authorChris Lattner <sabre@nondot.org>
Sat, 15 Jan 2005 06:00:32 +0000 (06:00 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 15 Jan 2005 06:00:32 +0000 (06:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19567 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetOptions.h
lib/Target/TargetMachine.cpp

index b3668e2a1bcf84780fdeaab149fbe02e72e8d7fe..887e404f74eed6fb7415fc57539a1873295d1224 100644 (file)
@@ -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
index 973165f186e3ae0cb55cdbeff20123193bd96107..22df91faeb8127870a9fdb6d18353dbc5bc92ba5 100644 (file)
@@ -24,6 +24,7 @@ using namespace llvm;
 namespace llvm {
   bool PrintMachineCode;
   bool NoFramePointerElim;
+  bool NoExcessFPPrecision;
 };
 namespace {
   cl::opt<bool, true> PrintCode("print-machineinstrs",
@@ -35,6 +36,11 @@ namespace {
                   cl::desc("Disable frame pointer elimination optimization"),
                   cl::location(NoFramePointerElim),
                   cl::init(false));
+  cl::opt<bool, true>
+  DisableExcessPrecision("disable-excess-fp-precision",
+                         cl::desc("Disable optimizations that may increase FP precision"),
+                         cl::location(NoExcessFPPrecision),
+                         cl::init(false));
 };
 
 //---------------------------------------------------------------------------