From 9f269e40c9b5d9a08890d0545fce60de99989138 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 8 Aug 2005 19:11:57 +0000 Subject: Use the new 'moveBefore' method to simplify some code. Really, which is easier to understand? :) llvm-svn: 22706 --- llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp') diff --git a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp index 2b67b439cb3..a8c2a3a8b77 100644 --- a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp +++ b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp @@ -363,7 +363,7 @@ bool TailCallElim::ProcessReturningBlock(ReturnInst *Ret, BasicBlock *&OldEntry, NEBI = NewEntry->begin(); OEBI != E; ) if (AllocaInst *AI = dyn_cast(OEBI++)) if (isa(AI->getArraySize())) - NewEntry->getInstList().splice(NEBI, OldEntry->getInstList(), AI); + AI->moveBefore(NEBI); // Now that we have created a new block, which jumps to the entry // block, insert a PHI node for each argument of the function. -- cgit v1.2.3