[llvm-commits] CVS: llvm/lib/Transforms/FunctionInlining.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Sep 10 17:40:00 PDT 2002


Changes in directory llvm/lib/Transforms:

FunctionInlining.cpp updated: 1.33 -> 1.34

---
Log message:

Clean up code due to auto-insert constructors


---
Diffs of the changes:

Index: llvm/lib/Transforms/FunctionInlining.cpp
diff -u llvm/lib/Transforms/FunctionInlining.cpp:1.33 llvm/lib/Transforms/FunctionInlining.cpp:1.34
--- llvm/lib/Transforms/FunctionInlining.cpp:1.33	Fri Jul 26 16:12:31 2002
+++ llvm/lib/Transforms/FunctionInlining.cpp	Tue Sep 10 17:38:44 2002
@@ -93,12 +93,11 @@
   //
   PHINode *PHI = 0;
   if (CalledFunc->getReturnType() != Type::VoidTy) {
-    PHI = new PHINode(CalledFunc->getReturnType(), CI->getName());
-
     // The PHI node should go at the front of the new basic block to merge all 
     // possible incoming values.
     //
-    NewBB->getInstList().push_front(PHI);
+    PHI = new PHINode(CalledFunc->getReturnType(), CI->getName(),
+                      NewBB->begin());
 
     // Anything that used the result of the function call should now use the PHI
     // node as their operand.
@@ -164,7 +163,7 @@
       }
 
       // Add a branch to the code that was after the original Call.
-      IBB->getInstList().push_back(new BranchInst(NewBB));
+      new BranchInst(NewBB, IBB->end());
       break;
     }
     case Instruction::Br:





More information about the llvm-commits mailing list