[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
Thu Apr 12 10:43:19 PDT 2018


fhahn added a comment.

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.


I collected some stats for SPEC2006, MultiSource and SingleSource with -O3 -flto.

For sccp.IPNumInstRemoved I get 88490 with this patch instead of 81585 without it (~ +8% eliminated instructions).
For sccp.IPNumArgsElimed, I get 5084 with this patch instead of 5081 without it (hardly any change).

I think number of instructions eliminated looks quite promising. What do you think?


https://reviews.llvm.org/D45330





More information about the llvm-commits mailing list