[PATCH] D136781: ensure loop-simplifed form when running loop-fusion pass with new-PM

MengXuan Cai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 21:02:55 PDT 2022


Narutoworld marked an inline comment as done.
Narutoworld added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopFuse.cpp:2096
+  auto &ORE = AM.getResult<OptimizationRemarkEmitterAnalysis>(F);
+  auto &PDT = AM.getResult<PostDominatorTreeAnalysis>(F);
   const TargetTransformInfo &TTI = AM.getResult<TargetIRAnalysis>(F);
----------------
aeubanks wrote:
> I believe this might be wrong because a previously cached PDT isn't going to be invalidated in the analysis manager after the `simplifyLoop` above. either make `simplifyLoop` take a PDT and update it accordingly (that wouldn't be trivial), or recalculate the PDT like in the previous iteration of this patch
Thanks @aeubanks
I fixes the patch based on your comment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136781



More information about the llvm-commits mailing list