diff options
author | Victor Hernandez <vhernandez@apple.com> | 2009-10-17 01:18:07 +0000 |
---|---|---|
committer | Victor Hernandez <vhernandez@apple.com> | 2009-10-17 01:18:07 +0000 |
commit | a3aaf85e231e391850ae77af194d4aa457ba6aa3 (patch) | |
tree | 92b41932a45ae44868a6c6a1050f05ac9c96fa0a /llvm/lib/Analysis/IPA | |
parent | 8bcb1c68832c8897bf85b8346098bbb8099f3b94 (diff) | |
download | bcm5719-llvm-a3aaf85e231e391850ae77af194d4aa457ba6aa3.tar.gz bcm5719-llvm-a3aaf85e231e391850ae77af194d4aa457ba6aa3.zip |
Remove MallocInst from LLVM Instructions.
llvm-svn: 84299
Diffstat (limited to 'llvm/lib/Analysis/IPA')
-rw-r--r-- | llvm/lib/Analysis/IPA/GlobalsModRef.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp index f5c11084129..7949288340a 100644 --- a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp +++ b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp @@ -303,7 +303,7 @@ bool GlobalsModRef::AnalyzeIndirectGlobalMemory(GlobalValue *GV) { // Check the value being stored. Value *Ptr = SI->getOperand(0)->getUnderlyingObject(); - if (isa<MallocInst>(Ptr) || isMalloc(Ptr)) { + if (isMalloc(Ptr)) { // Okay, easy case. } else if (CallInst *CI = dyn_cast<CallInst>(Ptr)) { Function *F = CI->getCalledFunction(); @@ -439,8 +439,7 @@ void GlobalsModRef::AnalyzeCallGraph(CallGraph &CG, Module &M) { if (cast<StoreInst>(*II).isVolatile()) // Treat volatile stores as reading memory somewhere. FunctionEffect |= Ref; - } else if (isa<MallocInst>(*II) || isa<FreeInst>(*II) || - isMalloc(&cast<Instruction>(*II))) { + } else if (isMalloc(&cast<Instruction>(*II)) || isa<FreeInst>(*II)) { FunctionEffect |= ModRef; } |