[PATCH] D111328: [LoopFlatten] Mark loop analyses as perserved

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 7 11:53:49 PDT 2021


aeubanks added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopFlatten.cpp:665
   SE->forgetLoop(FI.InnerLoop);
   LI->erase(FI.InnerLoop);
 
----------------
nikic wrote:
> aeubanks wrote:
> > separately, this looks like it's not telling LPMUpdater that a loop has been deleted which is an issue
> I think this is actually fine, because this is a LoopNest pass, in which case LPMUpdater only has to be informed about the removal of top-level loops.
If we delete a Loop, then allocate another Loop at the same address, we may fetch an invalid cached analysis later on. `LPMUpdater::markLoopAsDeleted()` clears cached analyses for that Loop.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111328/new/

https://reviews.llvm.org/D111328



More information about the llvm-commits mailing list