diff options
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r-- | lib/Transforms/IPO/ArgumentPromotion.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index eb4fc46..03fc54a 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -328,6 +328,11 @@ void ArgPromotion::DoPromotion(Function *F, std::vector<Argument*> &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<PointerType>(I2->getType())) + WorkList.insert(NF); ++I2; } |