summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LICM.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-09-10 22:38:47 +0000
committerChris Lattner <sabre@nondot.org>2002-09-10 22:38:47 +0000
commita239e6879d111e50457970a35013f6abedfa7e5c (patch)
tree6a4cd5b5d5cec8561c7af0a717462e493544aa73 /llvm/lib/Transforms/Scalar/LICM.cpp
parent97ff99cdf92b3223ce50bad024301588bd93466a (diff)
downloadbcm5719-llvm-a239e6879d111e50457970a35013f6abedfa7e5c.tar.gz
bcm5719-llvm-a239e6879d111e50457970a35013f6abedfa7e5c.zip
Clean up code due to auto-insert constructors
llvm-svn: 3665
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LICM.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LICM.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index 37333db1115..7bae9fd18a5 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -241,10 +241,8 @@ void LICM::hoist(Instruction &Inst) {
// No loop pre-header, insert a PHI node into header to capture all of the
// incoming versions of the value.
//
- PHINode *LoopVal = new PHINode(Inst.getType(), InstName+".phi");
-
- // Insert the new PHI node into the loop header...
- Header->getInstList().push_front(LoopVal);
+ PHINode *LoopVal = new PHINode(Inst.getType(), InstName+".phi",
+ Header->begin());
// Insert cloned versions of the instruction into all of the loop preds.
for (unsigned i = 0, e = LoopPreds.size(); i != e; ++i) {
OpenPOWER on IntegriCloud