[PATCH] D45330: [WIP][IPSCCP] Use PredicateInfo to propagate facts from cmp instructions.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 9 13:48:22 PDT 2018
fhahn added a comment.
Thanks for having a look!
In https://reviews.llvm.org/D45330#1058762, @efriedma wrote:
> This is interesting.
>
> One of the weaknesses of the SCCP algorithm is that it's not path-sensitive; a value is only "constant" if it has the same value on all possible paths. The use of ssa_copy provides a way around this restriction, to some extent: the result of an ssa_copy can be a constant even if the operand is overdefined. That said, this is adding substantial complexity to IPSCCP, and I'm not sure how much benefit you'll get in practice; the example `@test2` isn't really compelling.
The test cases at the moment are just very simple to briefly illustrate what is going on. One case in particular I think this could be helpful with is propagating null/nonnull to callsites. I will make the patch slightly more powerful and try to gather some numbers in the next few days.
https://reviews.llvm.org/D45330
More information about the llvm-commits
mailing list