mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
remove special handling of bitcast(malloc), it will be handled
when the loop inspects the bitcast operand. llvm-svn: 82928
This commit is contained in:
parent
3f320467b5
commit
0cfb82cf8c
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user