OSDN Git Service

[IPSCCP] Use ParamState for arguments at call sites.
authorFlorian Hahn <flo@fhahn.com>
Thu, 23 Jan 2020 19:17:47 +0000 (11:17 -0800)
committerFlorian Hahn <florian_hahn@apple.com>
Thu, 23 Jan 2020 21:55:42 +0000 (13:55 -0800)
commit4ed7355e4485486563ee31da2fb6e0c88d4ed076
tree45ed08801aa1bd8733e3a7ac73b3ae84e931ce5e
parentd42d5eb8ea77b3a3a502a60ba3f053fb81a897f3
[IPSCCP] Use ParamState for arguments at call sites.

We currently use integer ranges to merge concrete function arguments.
We use the ParamState range for those, but we only look up concrete
values in the regular state. For concrete function arguments that are
themselves arguments of the containing function, we can use the param
state directly and improve the precision in some cases.

Besides improving the results in some cases, this is also a small step towards
switching to ValueLatticeElement, by allowing D60582 to be a NFC.

Reviewers: efriedma, davide

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D71836
llvm/lib/Transforms/Scalar/SCCP.cpp
llvm/test/Transforms/SCCP/ip-constant-ranges.ll