summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2012-06-22 00:25:01 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2012-06-22 00:25:01 +0000
commit9792d68381042789bb99681ab9e8052e5836f0c9 (patch)
treeba109590b0eef104330fa376eeccd9bb46f97ab3 /llvm/lib/Analysis
parent771e7bd4ba4bf20e870b81248fb8d92580cd244a (diff)
downloadbcm5719-llvm-9792d68381042789bb99681ab9e8052e5836f0c9.tar.gz
bcm5719-llvm-9792d68381042789bb99681ab9e8052e5836f0c9.zip
remove extractMallocCallFromBitCast, since it was tailor maded for its sole user. Update GlobalOpt accordingly.
llvm-svn: 158952
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/MemoryBuiltins.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/MemoryBuiltins.cpp b/llvm/lib/Analysis/MemoryBuiltins.cpp
index 26d466ed31a..d1a9363b411 100644
--- a/llvm/lib/Analysis/MemoryBuiltins.cpp
+++ b/llvm/lib/Analysis/MemoryBuiltins.cpp
@@ -170,14 +170,7 @@ bool llvm::isReallocLikeFn(const Value *V, bool LookThroughBitCast) {
/// is a malloc call. Since CallInst::CreateMalloc() only creates calls, we
/// ignore InvokeInst here.
const CallInst *llvm::extractMallocCall(const Value *I) {
- return isMallocLikeFn(I) ? cast<CallInst>(I) : 0;
-}
-
-/// extractMallocCallFromBitCast - Returns the corresponding CallInst if the
-/// instruction is a bitcast of the result of a malloc call.
-const CallInst *llvm::extractMallocCallFromBitCast(const Value *I) {
- const BitCastInst *BCI = dyn_cast<BitCastInst>(I);
- return BCI ? extractMallocCall(BCI->getOperand(0)) : 0;
+ return isMallocLikeFn(I) ? dyn_cast<CallInst>(I) : 0;
}
static Value *computeArraySize(const CallInst *CI, const TargetData *TD,
OpenPOWER on IntegriCloud