diff options
author | Victor Hernandez <vhernandez@apple.com> | 2009-10-26 23:43:48 +0000 |
---|---|---|
committer | Victor Hernandez <vhernandez@apple.com> | 2009-10-26 23:43:48 +0000 |
commit | 046e78ce55a7c3d82b7b6758d2d77f2d99f970bf (patch) | |
tree | 1dad2445d3c6c08dc6d901e27806df980a7f855a /lib/Analysis/IPA | |
parent | dda9583e5194c08ddd409f3e1c211e17acd6d5b8 (diff) | |
download | external_llvm-046e78ce55a7c3d82b7b6758d2d77f2d99f970bf.zip external_llvm-046e78ce55a7c3d82b7b6758d2d77f2d99f970bf.tar.gz external_llvm-046e78ce55a7c3d82b7b6758d2d77f2d99f970bf.tar.bz2 |
Remove FreeInst.
Remove LowerAllocations pass.
Update some more passes to treate free calls just like they were treating FreeInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85176 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA')
-rw-r--r-- | lib/Analysis/IPA/Andersens.cpp | 3 | ||||
-rw-r--r-- | lib/Analysis/IPA/GlobalsModRef.cpp | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp index 6372342..78ec06f 100644 --- a/lib/Analysis/IPA/Andersens.cpp +++ b/lib/Analysis/IPA/Andersens.cpp @@ -1016,7 +1016,7 @@ bool Andersens::AnalyzeUsesOfFunction(Value *V) { } } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(*UI)) { if (AnalyzeUsesOfFunction(GEP)) return true; - } else if (isa<FreeInst>(*UI) || isFreeCall(*UI)) { + } else if (isFreeCall(*UI)) { return false; } else if (CallInst *CI = dyn_cast<CallInst>(*UI)) { // Make sure that this is just the function being called, not that it is @@ -1156,7 +1156,6 @@ void Andersens::visitInstruction(Instruction &I) { case Instruction::Switch: case Instruction::Unwind: case Instruction::Unreachable: - case Instruction::Free: case Instruction::ICmp: case Instruction::FCmp: return; diff --git a/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp index 01090f1..011b0ef 100644 --- a/lib/Analysis/IPA/GlobalsModRef.cpp +++ b/lib/Analysis/IPA/GlobalsModRef.cpp @@ -238,7 +238,7 @@ bool GlobalsModRef::AnalyzeUsesOfPointer(Value *V, } else if (BitCastInst *BCI = dyn_cast<BitCastInst>(*UI)) { if (AnalyzeUsesOfPointer(BCI, Readers, Writers, OkayStoreDest)) return true; - } else if (isa<FreeInst>(*UI) || isFreeCall(*UI)) { + } else if (isFreeCall(*UI)) { Writers.push_back(cast<Instruction>(*UI)->getParent()->getParent()); } else if (CallInst *CI = dyn_cast<CallInst>(*UI)) { // Make sure that this is just the function being called, not that it is @@ -437,7 +437,7 @@ void GlobalsModRef::AnalyzeCallGraph(CallGraph &CG, Module &M) { if (cast<StoreInst>(*II).isVolatile()) // Treat volatile stores as reading memory somewhere. FunctionEffect |= Ref; - } else if (isMalloc(&cast<Instruction>(*II)) || isa<FreeInst>(*II) || + } else if (isMalloc(&cast<Instruction>(*II)) || isFreeCall(&cast<Instruction>(*II))) { FunctionEffect |= ModRef; } |