[PATCH] D154106: [NVPTX] added a hidden option to control NVPTXLowerUnreachable pass.
Artem Belevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 29 09:36:25 PDT 2023
tra created this revision.
Herald added subscribers: mattd, gchakrabarti, asavonic, bixia, hiraditya.
Herald added a project: All.
tra published this revision for review.
tra added reviewers: maleadt, eaeltsin.
Herald added subscribers: llvm-commits, jholewinski.
Herald added a project: LLVM.
We've ran into an issue where the pass breaks a handful of our internal tests
and need a way to temporarily disable the pass while we're investigating.
Repository:
rG LLVM Github Monorepo
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,6 +63,12 @@
"Use 32-bit pointers for accessing const/local/shared address spaces."),
cl::init(false), cl::Hidden);
+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 &);
@@ -403,7 +409,8 @@
addPass(createSROAPass());
}
- addPass(createNVPTXLowerUnreachablePass());
+ if (ExitOnUnreachable)
+ addPass(createNVPTXLowerUnreachablePass());
}
bool NVPTXPassConfig::addInstSelector() {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154106.535849.patch
Type: text/x-patch
Size: 848 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230629/06f0aa16/attachment.bin>
More information about the llvm-commits
mailing list