aboutsummaryrefslogtreecommitdiff
path: root/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
commit1d608abbc07bbc7c78c20da6b305ef14c6c30e8e (patch)
treebde93bb9c18724578cee27583246b5960cbb8ac8 /lib/Transforms/Scalar/LICM.cpp
parent9afdb2998b9f1d518a5a8d1f5a7771848a5b2b19 (diff)
Clean up code due to auto-insert constructors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3665 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LICM.cpp')
-rw-r--r--lib/Transforms/Scalar/LICM.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp
index 37333db111..7bae9fd18a 100644
--- a/lib/Transforms/Scalar/LICM.cpp
+++ b/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) {