[PATCH] D45070: [NVPTX] Enable StructuredCFG for NVPTX

Tim Shen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 30 10:54:00 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL328885: [NVPTX] Enable StructuredCFG for NVPTX (authored by timshen, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D45070?vs=140366&id=140458#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D45070

Files:
  llvm/trunk/lib/Target/NVPTX/NVPTXTargetMachine.cpp


Index: llvm/trunk/lib/Target/NVPTX/NVPTXTargetMachine.cpp
===================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXTargetMachine.cpp
+++ llvm/trunk/lib/Target/NVPTX/NVPTXTargetMachine.cpp
@@ -44,6 +44,14 @@
                                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 @@
     drvInterface = NVPTX::NVCL;
   else
     drvInterface = NVPTX::CUDA;
+  if (!DisableRequireStructuredCFG)
+    setRequiresStructuredCFG(true);
   initAsmInfo();
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45070.140458.patch
Type: text/x-patch
Size: 1066 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180330/bd3b05a2/attachment.bin>


More information about the llvm-commits mailing list