mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 17:25:21 +00:00
Pool-allocation for MachineInstrs, MachineBasicBlocks, and
MachineMemOperands. The pools are owned by MachineFunctions. This drastically reduces the number of calls to malloc/free made during the "Emit" phase of scheduling, as well as later phases in CodeGen. Combined with other changes, this speeds up the "instruction selection" phase of CodeGen by 10% in some cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53212 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -127,7 +127,7 @@ void BranchFolder::RemoveDeadBlock(MachineBasicBlock *MBB) {
|
||||
}
|
||||
|
||||
// Remove the block.
|
||||
MF->getBasicBlockList().erase(MBB);
|
||||
MF->erase(MBB);
|
||||
}
|
||||
|
||||
/// OptimizeImpDefsBlock - If a basic block is just a bunch of implicit_def
|
||||
@@ -375,10 +375,12 @@ void BranchFolder::ReplaceTailWithBranchTo(MachineBasicBlock::iterator OldInst,
|
||||
/// iterator. This returns the new MBB.
|
||||
MachineBasicBlock *BranchFolder::SplitMBBAt(MachineBasicBlock &CurMBB,
|
||||
MachineBasicBlock::iterator BBI1) {
|
||||
MachineFunction &MF = *CurMBB.getParent();
|
||||
|
||||
// Create the fall-through block.
|
||||
MachineFunction::iterator MBBI = &CurMBB;
|
||||
MachineBasicBlock *NewMBB = new MachineBasicBlock(CurMBB.getBasicBlock());
|
||||
CurMBB.getParent()->getBasicBlockList().insert(++MBBI, NewMBB);
|
||||
MachineBasicBlock *NewMBB =MF.CreateMachineBasicBlock(CurMBB.getBasicBlock());
|
||||
CurMBB.getParent()->insert(++MBBI, NewMBB);
|
||||
|
||||
// Move all the successors of this block to the specified block.
|
||||
NewMBB->transferSuccessors(&CurMBB);
|
||||
|
Reference in New Issue
Block a user