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 | a239e6879d111e50457970a35013f6abedfa7e5c (patch) | |
tree | 6a4cd5b5d5cec8561c7af0a717462e493544aa73 /llvm/lib/Transforms/Scalar/PiNodeInsertion.cpp | |
parent | 97ff99cdf92b3223ce50bad024301588bd93466a (diff) | |
download | bcm5719-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/PiNodeInsertion.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/PiNodeInsertion.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Scalar/PiNodeInsertion.cpp b/llvm/lib/Transforms/Scalar/PiNodeInsertion.cpp index bf0119f2f3c..940b56fd29b 100644 --- a/llvm/lib/Transforms/Scalar/PiNodeInsertion.cpp +++ b/llvm/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. |