mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Fix a stale pointer issue that caused 300.twolf to fail to build on zion
last night. llvm-svn: 28916
This commit is contained in:
parent
70a5120be9
commit
e2d4b2f3e2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user