summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-06-26 19:20:48 +0000
committerChris Lattner <sabre@nondot.org>2006-06-26 19:20:48 +0000
commite7d4e56961ffdcff10f925459860ae6ffba2265c (patch)
tree6d54d562dc135be028aef55b0449404cf50e02fb
parentb06021a0f74485dfeb651294b84165603a0d4965 (diff)
downloadbcm5719-llvm-e7d4e56961ffdcff10f925459860ae6ffba2265c.tar.gz
bcm5719-llvm-e7d4e56961ffdcff10f925459860ae6ffba2265c.zip
Fix a stale pointer issue that caused 300.twolf to fail to build on zion
last night. llvm-svn: 28916
-rw-r--r--llvm/lib/Analysis/AliasSetTracker.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/AliasSetTracker.cpp b/llvm/lib/Analysis/AliasSetTracker.cpp
index 3f6aa2c9b9f..83ba69a69d0 100644
--- a/llvm/lib/Analysis/AliasSetTracker.cpp
+++ b/llvm/lib/Analysis/AliasSetTracker.cpp
@@ -435,6 +435,17 @@ void AliasSetTracker::deleteValue(Value *PtrVal) {
// Notify the alias analysis implementation that this value is gone.
AA.deleteValue(PtrVal);
+ // If this is a call instruction, remove the callsite from the appropriate
+ // AliasSet.
+ CallSite CS = CallSite::get(PtrVal);
+ if (CS.getInstruction()) {
+ Function *F = CS.getCalledFunction();
+ if (!F || !AA.doesNotAccessMemory(F)) {
+ if (AliasSet *AS = findAliasSetForCallSite(CS))
+ AS->removeCallSite(CS);
+ }
+ }
+
// First, look up the PointerRec for this pointer.
hash_map<Value*, AliasSet::PointerRec>::iterator I = PointerMap.find(PtrVal);
if (I == PointerMap.end()) return; // Noop
OpenPOWER on IntegriCloud