summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-27 21:29:28 +0000
committerChris Lattner <sabre@nondot.org>2009-09-27 21:29:28 +0000
commit43d0db70ac48425393d5ed1337107a15bf6da806 (patch)
tree117c9d8a4110370ee4bc7803dd5c65289a87a229 /llvm/lib/Transforms
parenta8627272c1d12c35621b8d0ce570299bf20fc7f8 (diff)
downloadbcm5719-llvm-43d0db70ac48425393d5ed1337107a15bf6da806.tar.gz
bcm5719-llvm-43d0db70ac48425393d5ed1337107a15bf6da806.zip
remove special handling of bitcast(malloc), it will be handled
when the loop inspects the bitcast operand. llvm-svn: 82928
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/FunctionAttrs.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
index 58cc909a86c..7edaa7fbef5 100644
--- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
@@ -249,9 +249,6 @@ bool FunctionAttrs::IsFunctionMallocLike(Function *F,
switch (RVI->getOpcode()) {
// Extend the analysis by looking upwards.
case Instruction::BitCast:
- if (isMalloc(RVI))
- break;
- // fall through
case Instruction::GetElementPtr:
FlowsToReturn.insert(RVI->getOperand(0));
continue;
@@ -259,12 +256,14 @@ bool FunctionAttrs::IsFunctionMallocLike(Function *F,
SelectInst *SI = cast<SelectInst>(RVI);
FlowsToReturn.insert(SI->getTrueValue());
FlowsToReturn.insert(SI->getFalseValue());
- } continue;
+ continue;
+ }
case Instruction::PHI: {
PHINode *PN = cast<PHINode>(RVI);
for (int i = 0, e = PN->getNumIncomingValues(); i != e; ++i)
FlowsToReturn.insert(PN->getIncomingValue(i));
- } continue;
+ continue;
+ }
// Check whether the pointer came from an allocation.
case Instruction::Alloca:
OpenPOWER on IntegriCloud