mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Insert the debugging instructions in one fell-swoop so that it doesn't call the
expensive "getFirstTerminator" call. This reduces the time of compilation in PR12258 from >10 minutes to < 10 seconds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152704 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3c88d4a8fb
commit
7bf116acd4
@ -855,16 +855,17 @@ EmitSchedule(MachineBasicBlock::iterator &InsertPos) {
|
||||
}
|
||||
// Add trailing DbgValue's before the terminator. FIXME: May want to add
|
||||
// some of them before one or more conditional branches?
|
||||
SmallVector<MachineInstr*, 8> DbgMIs;
|
||||
while (DI != DE) {
|
||||
MachineBasicBlock *InsertBB = Emitter.getBlock();
|
||||
MachineBasicBlock::iterator Pos= Emitter.getBlock()->getFirstTerminator();
|
||||
if (!(*DI)->isInvalidated()) {
|
||||
MachineInstr *DbgMI= Emitter.EmitDbgValue(*DI, VRBaseMap);
|
||||
if (DbgMI)
|
||||
InsertBB->insert(Pos, DbgMI);
|
||||
}
|
||||
if (!(*DI)->isInvalidated())
|
||||
if (MachineInstr *DbgMI = Emitter.EmitDbgValue(*DI, VRBaseMap))
|
||||
DbgMIs.push_back(DbgMI);
|
||||
++DI;
|
||||
}
|
||||
|
||||
MachineBasicBlock *InsertBB = Emitter.getBlock();
|
||||
MachineBasicBlock::iterator Pos = InsertBB->getFirstTerminator();
|
||||
InsertBB->insert(Pos, DbgMIs.begin(), DbgMIs.end());
|
||||
}
|
||||
|
||||
InsertPos = Emitter.getInsertPos();
|
||||
|
Loading…
Reference in New Issue
Block a user