forked from OSchip/llvm-project
Expose an option allowing unsafe math optimizations. Patch contributed by
Morten Ofstad! llvm-svn: 21630
This commit is contained in:
parent
30fe4ac2fb
commit
4a2cc6603d
|
@ -41,6 +41,12 @@ namespace llvm {
|
|||
/// pattern ISel if available.
|
||||
extern int PatternISelTriState;
|
||||
|
||||
/// UnsafeFPMath - This flag is enabled when the
|
||||
/// -enable-unsafe-fp-math flag is specified on the command line. When
|
||||
/// this flag is off (the default), the code generator is not allowed to
|
||||
/// produce results that are "less precise" than IEEE allows. This includes
|
||||
/// use of X86 instructions like FSIN and FCOS instead of libcalls.
|
||||
extern bool UnsafeFPMath;
|
||||
} // End llvm namespace
|
||||
|
||||
#endif
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace llvm {
|
|||
bool NoFramePointerElim;
|
||||
bool NoExcessFPPrecision;
|
||||
int PatternISelTriState;
|
||||
bool UnsafeFPMath;
|
||||
};
|
||||
namespace {
|
||||
cl::opt<bool, true> PrintCode("print-machineinstrs",
|
||||
|
@ -46,6 +47,11 @@ namespace {
|
|||
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));
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue