summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-02-18 23:26:33 +0000
committerDan Gohman <gohman@apple.com>2010-02-18 23:26:33 +0000
commitaa11defd1c66dbde0c757c99791c4ae4d740fc3e (patch)
treea8b39fb2b0d7b3248227a27ac9c24db838ac7567 /include
parent1c40e188c579c49f811eee499af2f371298c758c (diff)
downloadllvm-aa11defd1c66dbde0c757c99791c4ae4d740fc3e.tar.gz
llvm-aa11defd1c66dbde0c757c99791c4ae4d740fc3e.tar.bz2
llvm-aa11defd1c66dbde0c757c99791c4ae4d740fc3e.tar.xz
Indvars needs to explicitly notify ScalarEvolution when it is replacing
a loop exit value, so that if a loop gets deleted, ScalarEvolution isn't stick holding on to dangling SCEVAddRecExprs for that loop. This fixes PR6339. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96626 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/ScalarEvolution.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h
index 383ee88ad2..af5d10e6b7 100644
--- a/include/llvm/Analysis/ScalarEvolution.h
+++ b/include/llvm/Analysis/ScalarEvolution.h
@@ -586,6 +586,11 @@ namespace llvm {
/// compute a trip count, or if the loop is deleted.
void forgetLoop(const Loop *L);
+ /// forgetValue - This method should be called by the client when it has
+ /// changed a value in a way that may effect its value, or which may
+ /// disconnect it from a def-use chain linking it to a loop.
+ void forgetValue(Value *V);
+
/// GetMinTrailingZeros - Determine the minimum number of zero bits that S
/// is guaranteed to end in (at every loop iteration). It is, at the same
/// time, the minimum number of times S is divisible by 2. For example,