Do not include the Function* for direct call/invoke instructions in the

alias evaluation.  Clients really don't care.

llvm-svn: 20664
This commit is contained in:
Chris Lattner 2005-03-17 20:25:04 +00:00
parent 8a3aa43422
commit 9c9f68c42f
1 changed files with 6 additions and 1 deletions

View File

@ -109,7 +109,12 @@ bool AAEval::runOnFunction(Function &F) {
for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) {
if (isa<PointerType>(I->getType())) // Add all pointer instructions
Pointers.insert(&*I);
for (User::op_iterator OI = (*I).op_begin(); OI != (*I).op_end(); ++OI)
Instruction &Inst = *I;
User::op_iterator OI = Inst.op_begin();
if ((isa<InvokeInst>(Inst) || isa<CallInst>(Inst)) &&
isa<Function>(Inst.getOperand(0)))
++OI; // Skip actual functions for direct function calls.
for (; OI != Inst.op_end(); ++OI)
if (isa<PointerType>((*OI)->getType()))
Pointers.insert(*OI);