[PATCH] D131132: a better fix for llvm-reduce's basicblock pass
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 3 18:12:49 PDT 2022
arsenm added inline comments.
================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp:112
+ if (&B == &Candidate)
+ goto NextBlock;
+ for (auto BD : BBsToDelete)
----------------
This is just continue
================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp:125
return true;
- auto F = BB.getParent();
- auto it = F->begin();
- ++it;
- return (it == F->end()) || (*it).hasNPredecessors(1);
+ NextBlock:;
+ }
----------------
; after :
================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp:140
+ else
+ BBsToDelete.insert(&BB);
+ }
----------------
When doing the MIR version I found it was easier to only track the deletion set. Does this really need a set for both?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131132/new/
https://reviews.llvm.org/D131132
More information about the llvm-commits
mailing list