diff options
author | Chris Lattner <sabre@nondot.org> | 2004-03-07 22:52:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-03-07 22:52:53 +0000 |
commit | 86a734bd40857db9ef205234f3b58e550ee5959b (patch) | |
tree | 206d4bdb9166c39e8afce794197a807068865502 /lib/Transforms/IPO | |
parent | afa38575aa64edf74b44fd2945426542ce0e5551 (diff) | |
download | external_llvm-86a734bd40857db9ef205234f3b58e550ee5959b.zip external_llvm-86a734bd40857db9ef205234f3b58e550ee5959b.tar.gz external_llvm-86a734bd40857db9ef205234f3b58e550ee5959b.tar.bz2 |
Implement: ArgumentPromotion/chained.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12200 91177308-0d34-0410-b5e6-96231b3b80d8
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; } |