summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
diff options
context:
space:
mode:
authorVictor Hernandez <vhernandez@apple.com>2009-10-26 23:43:48 +0000
committerVictor Hernandez <vhernandez@apple.com>2009-10-26 23:43:48 +0000
commitde5ad42aa16287671b8e39173f8e0d39b8f35a73 (patch)
tree4b5bb9c47e42d2dc31877f0a8d5786927266b0c2 /llvm/lib/Analysis/IPA/GlobalsModRef.cpp
parent7a484dd6a9a900c1c25794a0d555e40e417f693b (diff)
downloadbcm5719-llvm-de5ad42aa16287671b8e39173f8e0d39b8f35a73.tar.gz
bcm5719-llvm-de5ad42aa16287671b8e39173f8e0d39b8f35a73.zip
Remove FreeInst.
Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. llvm-svn: 85176
Diffstat (limited to 'llvm/lib/Analysis/IPA/GlobalsModRef.cpp')
-rw-r--r--llvm/lib/Analysis/IPA/GlobalsModRef.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
index 01090f11cb2..011b0ef6e1d 100644
--- a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud