[PATCH] D111350: [LoopFlatten] Mark inner loop as deleted

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 7 13:03:13 PDT 2021


nikic created this revision.
nikic added reviewers: aeubanks, asbirlea, SjoerdMeijer, dmgreen.
Herald added a subscriber: hiraditya.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

If a loop is flattened, the inner loop is removed and the LPM should be informed of this fact, so it can invalidate associated analyses. A caveat here is that LoopFlatten is a LoopNest pass, and the inner loop does not require invalidation if run in LoopNestMode (i.e. standalone or with other LoopNest passes). However, we do need to invalidate when run together with other loop passes.

To support this, we relax an assertion in LPMUpdater to simply ignore invalidations on child loops in LoopNestMode. This allows the code to work independently of how the pass ends up being scheduled.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111350

Files:
  llvm/include/llvm/Transforms/Scalar/LoopPassManager.h
  llvm/lib/Transforms/Scalar/LoopFlatten.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111350.377981.patch
Type: text/x-patch
Size: 4278 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211007/538a2040/attachment.bin>


More information about the llvm-commits mailing list