summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-07 22:52:53 +0000
committerChris Lattner <sabre@nondot.org>2004-03-07 22:52:53 +0000
commitcc544e57f3512fcef82b0b50b139a130f64d0e79 (patch)
treeda03c2c703c50d03de492da09d6adcdc7e0a1934 /llvm/lib/Transforms
parent332a8bdf316bc79b9be0119132b93656e9a2d63b (diff)
downloadbcm5719-llvm-cc544e57f3512fcef82b0b50b139a130f64d0e79.tar.gz
bcm5719-llvm-cc544e57f3512fcef82b0b50b139a130f64d0e79.zip
Implement: ArgumentPromotion/chained.ll
llvm-svn: 12200
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/ArgumentPromotion.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
index eb4fc463e69..03fc54ac90a 100644
--- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud