[IPSCCP] Use constant range information for comparisons of parameters.
authorFlorian Hahn <florian.hahn@arm.com>
Fri, 23 Mar 2018 11:56:00 +0000 (11:56 +0000)
committerFlorian Hahn <florian.hahn@arm.com>
Fri, 23 Mar 2018 11:56:00 +0000 (11:56 +0000)
commitb1feec087e92db0b5a984396e11e996fba3b9594
treec7679bb84171b589e2e1a9717549c9b1bfeb1b71
parentb5088da452d82a11e9f0f518df100e440d7266d6
[IPSCCP] Use constant range information for comparisons of parameters.

For comparisons with parameters, we can use the ParamState lattice
elements which also provide constant range information. This improves
the code for PR33253 further and gets us closer to use
ValueLatticeElement for all values.

Also, as we are using the range information in the solver directly, we
do not need tryToReplaceWithConstantRange afterwards anymore.

Reviewers: dberlin, mssimpso, davide, efriedma

Reviewed By: mssimpso

Differential Revision: https://reviews.llvm.org/D43762

llvm-svn: 328307
llvm/lib/Transforms/Scalar/SCCP.cpp
llvm/test/Transforms/SCCP/ip-constant-ranges.ll