[PATCH] D158843: [ConstraintElim] Move just before loop simplification pipeline.
Antonio Frighetto via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 21 23:55:19 PDT 2023
antoniofrighetto accepted this revision.
antoniofrighetto added a comment.
In D158843#4647978 <https://reviews.llvm.org/D158843#4647978>, @fhahn wrote:
> In D158843#4647355 <https://reviews.llvm.org/D158843#4647355>, @antoniofrighetto wrote:
>
>> I can see how ConstraintElimination may benefit from dealing with regular compares, but wouldn't CE provide a more amenable IR for SimplifyCFG to work with? I just wonder whether we might risk to miss potential SimplifyCFG opportunities if we postpone this. Running InstCombine, AggressiveIC, and CE together early in the pipeline looks beneficial too for CFG simplification purposes, AFAICT.
>
> I think CFG simplifications based on simplified conditions by ConstraintElimination should still happen before other optimizations; now we run the loop optimization pipeline `LPM1` directly after ConstraintElimination, which runs `LoopSimplifyCFG` early. This should take care of simplifying branches based on simplified conditions for loops, which is the scope the other passes in the pipeline operate on.
LGTM! Thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158843/new/
https://reviews.llvm.org/D158843
More information about the llvm-commits
mailing list