[PATCH] D154106: [NVPTX] added a hidden option to control NVPTXLowerUnreachable pass.
Artem Belevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 30 08:39:03 PDT 2023
tra updated this revision to Diff 536275.
tra added a comment.
clang-formatted whole file.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154106/new/
https://reviews.llvm.org/D154106
Files:
llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
Index: llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
===================================================================
--- llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
+++ llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
@@ -63,11 +63,18 @@
"Use 32-bit pointers for accessing const/local/shared address spaces."),
cl::init(false), cl::Hidden);
+// FIXME: intended as a temporary debugging aid. Should be removed before it
+// makes it into the LLVM-17 release.
+static cl::opt<bool>
+ ExitOnUnreachable("nvptx-exit-on-unreachable",
+ cl::desc("Lower 'unreachable' as 'exit' instruction."),
+ cl::init(true), cl::Hidden);
+
namespace llvm {
void initializeGenericToNVVMLegacyPassPass(PassRegistry &);
void initializeNVPTXAllocaHoistingPass(PassRegistry &);
-void initializeNVPTXAssignValidGlobalNamesPass(PassRegistry&);
+void initializeNVPTXAssignValidGlobalNamesPass(PassRegistry &);
void initializeNVPTXAtomicLowerPass(PassRegistry &);
void initializeNVPTXCtorDtorLoweringLegacyPass(PassRegistry &);
void initializeNVPTXLowerAggrCopiesPass(PassRegistry &);
@@ -403,7 +410,8 @@
addPass(createSROAPass());
}
- addPass(createNVPTXLowerUnreachablePass());
+ if (ExitOnUnreachable)
+ addPass(createNVPTXLowerUnreachablePass());
}
bool NVPTXPassConfig::addInstSelector() {
@@ -456,11 +464,10 @@
if (addPass(&MachineSchedulerID))
printAndVerify("After Machine Scheduling");
-
addPass(&StackSlotColoringID);
// FIXME: Needs physical registers
- //addPass(&MachineLICMID);
+ // addPass(&MachineLICMID);
printAndVerify("After StackSlotColoring");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154106.536275.patch
Type: text/x-patch
Size: 1652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230630/e0803524/attachment.bin>
More information about the llvm-commits
mailing list