projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b441dc
)
this works with backedges to the existing entry block alot better
author
Andrew Lenharth
<andrewl@lenharth.org>
Thu, 10 Nov 2005 17:35:34 +0000
(17:35 +0000)
committer
Andrew Lenharth
<andrewl@lenharth.org>
Thu, 10 Nov 2005 17:35:34 +0000
(17:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24270
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/Reg2Mem.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/Reg2Mem.cpp
b/lib/Transforms/Scalar/Reg2Mem.cpp
index be60b5a3588d6b75da1e6903f75b6dbfa90bf8d4..a43da7a60ac58e21dfca09043b67f868c517e37d 100644
(file)
--- a/
lib/Transforms/Scalar/Reg2Mem.cpp
+++ b/
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;