[PATCH] D101829: [SCEV] By more careful when traversing phis in isImpliedViaMerge.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 6 13:21:14 PDT 2021
fhahn added a comment.
In D101829#2740317 <https://reviews.llvm.org/D101829#2740317>, @nikic wrote:
> What BasicAA does for this case is a CFG reachability check from the phi to the value. If it's reachable, you have some kind of cycle. I think what you're doing here is fine though, as this doesn't seem like a terribly important optimization to me, and the nature of SCEV makes those properlyDominates() checks likely to succeed for common cases (as non-SCEVUnknown expressions are effectively hoisted).
I think we should start out with a relatively simple/safe fix and go from there. The impact of the code seems relatively small, e.g. if unconditionally bail out in this case, ~2 benchmarks out of SPEC2000/SPEC2006/MultiSource have minor binary changes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101829/new/
https://reviews.llvm.org/D101829
More information about the llvm-commits
mailing list