From: Chris Lattner Date: Sun, 7 Mar 2004 22:52:53 +0000 (+0000) Subject: Implement: ArgumentPromotion/chained.ll X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=86a734bd40857db9ef205234f3b58e550ee5959b;p=oota-llvm.git Implement: ArgumentPromotion/chained.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12200 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index eb4fc463e69..03fc54ac90a 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -328,6 +328,11 @@ void ArgPromotion::DoPromotion(Function *F, std::vector &Args2Prom) { LI->replaceAllUsesWith(I2); LI->getParent()->getInstList().erase(LI); } + + // If we inserted a new pointer type, it's possible that IT could be + // promoted too. + if (isa(I2->getType())) + WorkList.insert(NF); ++I2; }