this works with backedges to the existing entry block alot better

llvm-svn: 24270
This commit is contained in:
Andrew Lenharth 2005-11-10 17:35:34 +00:00
parent e373163e95
commit 8e66c0c8a9
1 changed files with 3 additions and 2 deletions

View File

@ -46,8 +46,9 @@ namespace {
virtual bool runOnFunction(Function &F) { virtual bool runOnFunction(Function &F) {
if (!F.isExternal()) { if (!F.isExternal()) {
//give us a clean block //give us a clean block
BasicBlock& bbhead = F.getEntryBlock(); BasicBlock* bbold = &F.getEntryBlock();
bbhead.splitBasicBlock(bbhead.begin()); BasicBlock* bbnew = new BasicBlock("allocablock", &F, &F.getEntryBlock());
new BranchInst(bbold, bbnew);
//find the instructions //find the instructions
std::list<Instruction*> worklist; std::list<Instruction*> worklist;