[llvm-commits] [llvm] r82928 - /llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp
Chris Lattner
sabre at nondot.org
Sun Sep 27 14:29:28 PDT 2009
Author: lattner
Date: Sun Sep 27 16:29:28 2009
New Revision: 82928
URL: http://llvm.org/viewvc/llvm-project?rev=82928&view=rev
Log:
remove special handling of bitcast(malloc), it will be handled
when the loop inspects the bitcast operand.
Modified:
llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp
Modified: llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp?rev=82928&r1=82927&r2=82928&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp Sun Sep 27 16:29:28 2009
@@ -249,9 +249,6 @@
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 @@
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:
More information about the llvm-commits
mailing list