diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-06-26 19:20:48 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-06-26 19:20:48 +0000 |
| commit | e7d4e56961ffdcff10f925459860ae6ffba2265c (patch) | |
| tree | 6d54d562dc135be028aef55b0449404cf50e02fb /llvm/lib | |
| parent | b06021a0f74485dfeb651294b84165603a0d4965 (diff) | |
| download | bcm5719-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
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Analysis/AliasSetTracker.cpp | 11 |
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 |

