ScalarEvolution: Do not keep temporary PHI values in ValueExprMap
authorTobias Grosser <tobias@grosser.es>
Sun, 21 Feb 2016 17:42:10 +0000 (17:42 +0000)
committerTobias Grosser <tobias@grosser.es>
Sun, 21 Feb 2016 17:42:10 +0000 (17:42 +0000)
commit11332e5ec5b8f1e50bdc4e8f3b08b8c35510586f
tree510fc63ab8bd3d974f4a05f889a11c854148f917
parent2440130437320c9671f842a933548a57dbaf5184
ScalarEvolution: Do not keep temporary PHI values in ValueExprMap

Before this patch simplified SCEV expressions for PHI nodes were only returned
the very first time getSCEV() was called, but later calls to getSCEV always
returned the non-simplified value, which had "temporarily" been stored in the
ValueExprMap, but was never removed and consequently blocked the caching of the
simplified PHI expression.

llvm-svn: 261485
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/unittests/Analysis/ScalarEvolutionTest.cpp