[PATCH] D109762: [NewPM][SimpleLoopUnswitch] Add DivergenceInfo
Brendon Cahoon via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 14 18:47:41 PDT 2021
bcahoon 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);
----------------
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).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109762/new/
https://reviews.llvm.org/D109762
More information about the llvm-commits
mailing list