[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopSimplify.cpp TailRecursionElimination.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Feb 3 21:59:01 PST 2004
Changes in directory llvm/lib/Transforms/Scalar:
LoopSimplify.cpp updated: 1.30 -> 1.31
TailRecursionElimination.cpp updated: 1.12 -> 1.13
---
Log message:
Adjust to the new BasicBlock ctor, which requires a function parameter
---
Diffs of the changes: (+2 -2)
Index: llvm/lib/Transforms/Scalar/LoopSimplify.cpp
diff -u llvm/lib/Transforms/Scalar/LoopSimplify.cpp:1.30 llvm/lib/Transforms/Scalar/LoopSimplify.cpp:1.31
--- llvm/lib/Transforms/Scalar/LoopSimplify.cpp:1.30 Wed Jan 7 18:09:44 2004
+++ llvm/lib/Transforms/Scalar/LoopSimplify.cpp Tue Feb 3 21:58:28 2004
@@ -151,7 +151,7 @@
const std::vector<BasicBlock*> &Preds) {
// Create new basic block, insert right before the original block...
- BasicBlock *NewBB = new BasicBlock(BB->getName()+Suffix, BB);
+ BasicBlock *NewBB = new BasicBlock(BB->getName()+Suffix, BB->getParent(), BB);
// The preheader first gets an unconditional branch to the loop header...
BranchInst *BI = new BranchInst(BB, NewBB);
Index: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
diff -u llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.12 llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.13
--- llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.12 Sun Dec 14 17:57:39 2003
+++ llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp Tue Feb 3 21:58:28 2004
@@ -290,7 +290,7 @@
if (OldEntry == 0) {
OldEntry = &F->getEntryBlock();
std::string OldName = OldEntry->getName(); OldEntry->setName("tailrecurse");
- BasicBlock *NewEntry = new BasicBlock(OldName, OldEntry);
+ BasicBlock *NewEntry = new BasicBlock(OldName, F, OldEntry);
new BranchInst(OldEntry, NewEntry);
// Now that we have created a new block, which jumps to the entry
More information about the llvm-commits
mailing list