[llvm] [DFAJumpThreading] Rewrite the way paths are enumerated (PR #96127)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 19 10:17:10 PDT 2024
================
@@ -617,21 +713,32 @@ struct AllSwitchPaths {
if (!Successors.insert(Succ).second)
continue;
- // Found a cycle through the SwitchBlock
- if (Succ == SwitchBlock) {
- Res.push_back({BB});
+ // Found a cycle through the final block.
+ if (Succ == ToBB) {
+ PathType NewPath;
+ NewPath.push_back(BB);
+ NewPath.push_back(ToBB);
+ Res.push_back(NewPath);
----------------
XChy wrote:
```suggestion
Res.push_back({BB, ToBB});
```
https://github.com/llvm/llvm-project/pull/96127
More information about the llvm-commits
mailing list