diff options
author | Chris Lattner <sabre@nondot.org> | 2002-09-10 22:38:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-09-10 22:38:47 +0000 |
commit | 1d608abbc07bbc7c78c20da6b305ef14c6c30e8e (patch) | |
tree | bde93bb9c18724578cee27583246b5960cbb8ac8 /lib/Transforms/Scalar/PiNodeInsertion.cpp | |
parent | 9afdb2998b9f1d518a5a8d1f5a7771848a5b2b19 (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/PiNodeInsertion.cpp')
-rw-r--r-- | lib/Transforms/Scalar/PiNodeInsertion.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/Transforms/Scalar/PiNodeInsertion.cpp b/lib/Transforms/Scalar/PiNodeInsertion.cpp index bf0119f2f3..940b56fd29 100644 --- a/lib/Transforms/Scalar/PiNodeInsertion.cpp +++ b/lib/Transforms/Scalar/PiNodeInsertion.cpp @@ -148,13 +148,8 @@ bool PiNodeInserter::insertPiNodeFor(Value *V, BasicBlock *Succ, Value *Rep) { // Create the Pi node... Value *Pi = Rep; - if (Rep == 0) { - PHINode *Phi = new PHINode(V->getType(), V->getName() + ".pi"); - - // Insert the Pi node in the successor basic block... - Succ->getInstList().push_front(Phi); - Pi = Phi; - } + if (Rep == 0) // Insert the Pi node in the successor basic block... + Pi = new PHINode(V->getType(), V->getName() + ".pi", Succ->begin()); // Loop over all of the uses of V, replacing ones that the Pi node // dominates with references to the Pi node itself. |