diff options
author | Tom Stellard <tstellar@redhat.com> | 2018-05-29 23:03:38 +0000 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2018-05-29 23:03:38 +0000 |
commit | 75f4129be13b62919fe1cf8fe28b7b1685843e34 (patch) | |
tree | a455ca4d1d4b8fc21432b4271d952025d644e375 | |
parent | f0350e652cc5578f0d917a24518d0ce6eb3e1a7a (diff) | |
download | llvm-75f4129be13b62919fe1cf8fe28b7b1685843e34.zip llvm-75f4129be13b62919fe1cf8fe28b7b1685843e34.tar.gz llvm-75f4129be13b62919fe1cf8fe28b7b1685843e34.tar.bz2 |
Merging r328885:
------------------------------------------------------------------------
r328885 | timshen | 2018-03-30 10:51:03 -0700 (Fri, 30 Mar 2018) | 14 lines
[NVPTX] Enable StructuredCFG for NVPTX
Summary:
Make NVPTX require structured CFG. Added a temporary flag to
"roll back" the behavior for easy deployment.
Combined with D45008, this fixes several internal Nvidia GPU test
failures that we suspect to be ptxas miscompiles (PR27738).
Reviewers: jlebar
Subscribers: jholewinski, sanjoy, llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D45070
------------------------------------------------------------------------
llvm-svn: 333475
-rw-r--r-- | llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp b/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp index d31e1cb..cb8cc7bb 100644 --- a/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp +++ b/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp @@ -44,6 +44,14 @@ static cl::opt<bool> cl::desc("Disable load/store vectorizer"), cl::init(false), cl::Hidden); +// TODO: Remove this flag when we are confident with no regressions. +static cl::opt<bool> DisableRequireStructuredCFG( + "disable-nvptx-require-structured-cfg", + cl::desc("Transitional flag to turn off NVPTX's requirement on preserving " + "structured CFG. The requirement should be disabled only when " + "unexpected regressions happen."), + cl::init(false), cl::Hidden); + namespace llvm { void initializeNVVMIntrRangePass(PassRegistry&); @@ -108,6 +116,8 @@ NVPTXTargetMachine::NVPTXTargetMachine(const Target &T, const Triple &TT, drvInterface = NVPTX::NVCL; else drvInterface = NVPTX::CUDA; + if (!DisableRequireStructuredCFG) + setRequiresStructuredCFG(true); initAsmInfo(); } |