aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/ConstantFolding.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-05-21 00:54:12 +0000
committerDan Gohman <gohman@apple.com>2008-05-21 00:54:12 +0000
commit010ee2d95516fe13a574bce5d682a8f8997ab60b (patch)
tree22dd2795c8f4a8ec41e52456eac62fb3aa502554 /lib/Analysis/ConstantFolding.cpp
parent55384a853c36073b53331ae0e24c3dca7881108f (diff)
When LSR is replacing an instruction, call
ScalarEvolution::deleteValueFromRecords on it before doing the replaceAllUsesWith, because ScalarEvolution looks at the instruction's users to find SCEV references to the instruction's SCEV object in its internal maps. Move all of LSR's loop-related state clearing after processing the loop and before cleaning up dead PHI nodes. This eliminates all of LSR's SCEV references just before the calls to ScalarEvolution::deleteValueFromRecords so that when ScalarEvolution drops its own SCEV references, the reference counts will reach zero and the SCEVs will be deleted immediately. These changes fix some compiler aborts involving ScalarEvolution holding onto and reusing SCEV objects for instructions that have been deleted. No regression test unfortunately; because the symptoms were due to dangling pointers, reduced testcases ended up being fairly arbitrary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51359 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ConstantFolding.cpp')
0 files changed, 0 insertions, 0 deletions