[llvm] [NVPTX] Handle unreachable default in llvm::SwitchIns. (PR #72641)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 9 11:43:19 PST 2024
================
@@ -138,7 +138,32 @@ bool NVPTXLowerUnreachable::runOnFunction(Function &F) {
InlineAsm *Exit = InlineAsm::get(ExitFTy, "exit;", "", true);
bool Changed = false;
+
+ // In scenarios where a Switch Instruction has an unreachable default
+ // successor, substituting the unreachable instruction with an exit
+ // instruction introduces an additional block in the Control Flow Graph
+ // (CFG), thereby negatively impacting performance. To mitigate this
+ // undesirable impact, we proactively refrain from processing blocks that
----------------
Artem-B wrote:
I'm not completely convinced that
https://github.com/llvm/llvm-project/pull/72641
More information about the llvm-commits
mailing list