mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-14 15:28:20 +00:00
this works with backedges to the existing entry block alot better
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24270 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user