[PATCH] D81584: [BreakCritEdges] Support preserving loop-simplify form with indirectbr. (WIP)
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 10 15:02:05 PDT 2020
efriedma added a comment.
> Agreed. I think that would go well with D81582 <https://reviews.llvm.org/D81582>, i.e. have a PreserveLoopSimplify option, that guarantees loop-simplify form is preserved or nullptr is returned if it's not possible
We can kill off the call to SplitBlockPredecessors, and add an option to bail out if preserving loop-simplify form would require transforming other edges, sure. (I'd rather not condition it on whether the other edges are IndirectBr edges; I'd like to avoid obscure IndirectBr edge cases where possible.)
> Also, do you agree that preserving loop-simplify form by moving instructions to a different BB is more trouble than it is worth?
This doesn't seem worse than calling SplitBlockPredecessors(), in terms of transforming the CFG in unpredictable ways.
================
Comment at: llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:324
+ DT->applyUpdates({{DominatorTree::Insert, NewBB, ExitCont},
+ {DominatorTree::Delete, NewBB, DestBB}});
}
----------------
fhahn wrote:
> efriedma wrote:
> > Missing LoopInfo update?
> I don't think we need to do anything about LI here, as the block should already be added to LI by `SplitBlock` and we only adjust the successor to another successor in the same loop I think.
Okay, that makes sense.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81584/new/
https://reviews.llvm.org/D81584
More information about the llvm-commits
mailing list