aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Local.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/Transforms/Utils/Local.cpp
parent7a484dd6a9a900c1c25794a0d555e40e417f693b (diff)
downloadllvm-de5ad42aa16287671b8e39173f8e0d39b8f35a73.zip
llvm-de5ad42aa16287671b8e39173f8e0d39b8f35a73.tar.gz
llvm-de5ad42aa16287671b8e39173f8e0d39b8f35a73.tar.bz2
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/Transforms/Utils/Local.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 940f5a9..6e18b66 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -60,9 +60,8 @@ bool llvm::isSafeToLoadUnconditionally(Value *V, Instruction *ScanFrom) {
// If we see a free or a call which may write to memory (i.e. which might do
// a free) the pointer could be marked invalid.
- if (isa<FreeInst>(BBI) || isFreeCall(BBI) ||
- (isa<CallInst>(BBI) && BBI->mayWriteToMemory() &&
- !isa<DbgInfoIntrinsic>(BBI)))
+ if (isFreeCall(BBI) || (isa<CallInst>(BBI) && BBI->mayWriteToMemory() &&
+ !isa<DbgInfoIntrinsic>(BBI)))
return false;
if (LoadInst *LI = dyn_cast<LoadInst>(BBI)) {