[PATCH] D141487: [LoopUnroll] Directly update DT instead of DTU.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 15 15:59:11 PST 2023
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:3530
+ if (pred_empty(BB)) {
+ DT->eraseNode(BB);
+ return;
----------------
fhahn wrote:
> nikic wrote:
> > What about the case where BB has a (now also unreachable) successor? Don't we have to erase all those nodes as well?
> I am not sure what the exact invariant in the DT is, but I updated the code to remove all connected nodes to be on the safe side. Same in `MergeBlockIntoPredecessor`
I undid the change in `MergeBlockIntoPredecessor`. It is definitely not needed there, as the successors of the original BB are transferred to the predecessor.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141487/new/
https://reviews.llvm.org/D141487
More information about the llvm-commits
mailing list