diff options
author | Pengfei Wang <pengfei.wang@intel.com> | 2019-11-21 17:17:19 -0800 |
---|---|---|
committer | Pengfei Wang <pengfei.wang@intel.com> | 2019-11-21 18:07:11 -0800 |
commit | 22a0edd070e4a40447e0dd2699bebfd01de7a5ab (patch) | |
tree | 0e148ab708348759b6281c6c6475c31f98cdf21c /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | fa09dddd70c557bd3e78bbeef1511e737c4b8049 (diff) | |
download | bcm5719-llvm-22a0edd070e4a40447e0dd2699bebfd01de7a5ab.tar.gz bcm5719-llvm-22a0edd070e4a40447e0dd2699bebfd01de7a5ab.zip |
[FPEnv] Add an option to disable strict float node mutating to an normal
float node
This patch add an option 'disable-strictnode-mutation' to prevent strict
node mutating to an normal node.
So we can make sure that the patch which sets strict-node as legal works
correctly.
Patch by Chen Liu(LiuChen3)
Differential Revision: https://reviews.llvm.org/D70226
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index d4a7a281a27..af7dc432eae 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -88,6 +88,14 @@ static cl::opt<unsigned> OptsizeJumpTableDensity( cl::desc("Minimum density for building a jump table in " "an optsize function")); +// FIXME: This option is only to test if the strict fp operation processed +// correctly by preventing mutating strict fp operation to normal fp operation +// during development. When the backend supports strict float operation, this +// option will be meaningless. +static cl::opt<bool> DisableStrictNodeMutation("disable-strictnode-mutation", + cl::desc("Don't mutate strict-float node to a legalize node"), + cl::init(false), cl::Hidden); + static bool darwinHasSinCos(const Triple &TT) { assert(TT.isOSDarwin() && "should be called with darwin triple"); // Don't bother with 32 bit x86. @@ -585,6 +593,7 @@ TargetLoweringBase::TargetLoweringBase(const TargetMachine &tm) : TM(tm) { BooleanVectorContents = UndefinedBooleanContent; SchedPreferenceInfo = Sched::ILP; GatherAllAliasesMaxDepth = 18; + IsStrictFPEnabled = DisableStrictNodeMutation; // TODO: the default will be switched to 0 in the next commit, along // with the Target-specific changes necessary. MaxAtomicSizeInBitsSupported = 1024; |