diff options
| author | Andrew Lenharth <andrewl@lenharth.org> | 2005-11-10 17:35:34 +0000 |
|---|---|---|
| committer | Andrew Lenharth <andrewl@lenharth.org> | 2005-11-10 17:35:34 +0000 |
| commit | 8e66c0c8a988b861bb170f046fee4e5b305d72e2 (patch) | |
| tree | faa9f6a7829d89c7a6dc0f854f3dfd39931974e7 /llvm/lib/Transforms | |
| parent | e373163e951f4c8a4d44e4aae8edbaff8f7bdf14 (diff) | |
| download | bcm5719-llvm-8e66c0c8a988b861bb170f046fee4e5b305d72e2.tar.gz bcm5719-llvm-8e66c0c8a988b861bb170f046fee4e5b305d72e2.zip | |
this works with backedges to the existing entry block alot better
llvm-svn: 24270
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/Reg2Mem.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/Reg2Mem.cpp b/llvm/lib/Transforms/Scalar/Reg2Mem.cpp index be60b5a3588..a43da7a60ac 100644 --- a/llvm/lib/Transforms/Scalar/Reg2Mem.cpp +++ b/llvm/lib/Transforms/Scalar/Reg2Mem.cpp @@ -46,8 +46,9 @@ namespace { 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; |

