[PATCH] D111611: [NFC] [LoopPeel] Change the way DT is updated for loop exits
Dmitry Makogon via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 12 23:35:17 PDT 2021
dmakogon marked 3 inline comments as done.
dmakogon added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/LoopPeel.cpp:567
+ ValueToValueMapTy &VMap, ValueToValueMapTy &LVMap, DomTreeUpdater &DTU,
+ SmallDenseMap<BasicBlock *, BasicBlock *> &LoopBlocksIDoms,
LoopInfo *LI, ArrayRef<MDNode *> LoopLocalNoAliasDeclScopes) {
----------------
mkazantsev wrote:
> Pls make it const
How are we going to apply updates to it then? `DTU::applyUpdates` is a non-const function
================
Comment at: llvm/lib/Transforms/Utils/LoopPeel.cpp:753
cloneLoopBlocks(L, Iter, InsertTop, InsertBot, ExitEdges, NewBlocks,
LoopBlocks, VMap, LVMap, DT, LI,
LoopLocalNoAliasDeclScopes);
----------------
mkazantsev wrote:
> fhahn wrote:
> > Passing `DT` means that `cloneLoopBlocks` previously could rely on `DT` being up to date here. That's not true any more, as it is only updated later. Is that a problem? We also need to check all other uses of plain `DT` in until the updates are applied.
> We can completely remove DT from the signatures here and pass it updates for filling as well. Also may be faster.
Now we pass this function a `DomTreeUpdater`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111611/new/
https://reviews.llvm.org/D111611
More information about the llvm-commits
mailing list