[PATCH] D109762: [NewPM][SimpleLoopUnswitch] Add DivergenceInfo

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 15 16:34:55 PDT 2021


aeubanks added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:2803
+    Function *F = L.getHeader()->getParent();
+    PostDominatorTree PDT(*F);
+    DivergenceInfo DI(*F, DT, PDT, LI, TTI, /*KnownReducible*/ true);
----------------
bcahoon wrote:
> arsenm wrote:
> > Constructing your own PostDominatorTree seems not good. Should this be a pass dependency for divergent targets?
> I agree that it's not good, but I believe the only way to do this as a dependency/required is to have all the loop passes update the post-dominator tree info when needed (which is what's done for dominators and several other loop analyses).
See the loop analyses part of https://llvm.org/docs/NewPassManager.html#using-analyses for limitations on accessing function analyses in a loop pass.


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

https://reviews.llvm.org/D109762



More information about the llvm-commits mailing list