[llvm-commits] CVS: llvm/lib/Transforms/Scalar/Reg2Mem.cpp
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Thu Nov 10 09:35:57 PST 2005
Changes in directory llvm/lib/Transforms/Scalar:
Reg2Mem.cpp updated: 1.1 -> 1.2
---
Log message:
this works with backedges to the existing entry block alot better
---
Diffs of the changes: (+3 -2)
Reg2Mem.cpp | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Index: llvm/lib/Transforms/Scalar/Reg2Mem.cpp
diff -u llvm/lib/Transforms/Scalar/Reg2Mem.cpp:1.1 llvm/lib/Transforms/Scalar/Reg2Mem.cpp:1.2
--- llvm/lib/Transforms/Scalar/Reg2Mem.cpp:1.1 Wed Nov 9 19:58:38 2005
+++ llvm/lib/Transforms/Scalar/Reg2Mem.cpp Thu Nov 10 11:35:34 2005
@@ -46,8 +46,9 @@
virtual bool runOnFunction(Function &F) {
if (!F.isExternal()) {
//give us a clean block
- BasicBlock& bbhead = F.getEntryBlock();
- bbhead.splitBasicBlock(bbhead.begin());
+ BasicBlock* bbold = &F.getEntryBlock();
+ BasicBlock* bbnew = new BasicBlock("allocablock", &F, &F.getEntryBlock());
+ new BranchInst(bbold, bbnew);
//find the instructions
std::list<Instruction*> worklist;
More information about the llvm-commits
mailing list