Implement: ArgumentPromotion/chained.ll

llvm-svn: 12200
This commit is contained in:
Chris Lattner 2004-03-07 22:52:53 +00:00
parent 332a8bdf31
commit cc544e57f3
1 changed files with 5 additions and 0 deletions

View File

@ -328,6 +328,11 @@ void ArgPromotion::DoPromotion(Function *F, std::vector<Argument*> &Args2Prom) {
LI->replaceAllUsesWith(I2); LI->replaceAllUsesWith(I2);
LI->getParent()->getInstList().erase(LI); LI->getParent()->getInstList().erase(LI);
} }
// If we inserted a new pointer type, it's possible that IT could be
// promoted too.
if (isa<PointerType>(I2->getType()))
WorkList.insert(NF);
++I2; ++I2;
} }