mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
[MachineBasicBlock] Add getFirstNonDebugInstr to complement getLastNonDebugInstr
Use it in CodeGen where applicable. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240414 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1355,15 +1355,9 @@ bool IfConverter::IfConvertDiamond(BBInfo &BBI, IfcvtKind Kind,
|
||||
Redefs.addLiveIns(BBI1->BB);
|
||||
|
||||
// Remove the duplicated instructions at the beginnings of both paths.
|
||||
MachineBasicBlock::iterator DI1 = BBI1->BB->begin();
|
||||
MachineBasicBlock::iterator DI2 = BBI2->BB->begin();
|
||||
MachineBasicBlock::iterator DIE1 = BBI1->BB->end();
|
||||
MachineBasicBlock::iterator DIE2 = BBI2->BB->end();
|
||||
// Skip dbg_value instructions
|
||||
while (DI1 != DIE1 && DI1->isDebugValue())
|
||||
++DI1;
|
||||
while (DI2 != DIE2 && DI2->isDebugValue())
|
||||
++DI2;
|
||||
MachineBasicBlock::iterator DI1 = BBI1->BB->getFirstNonDebugInstr();
|
||||
MachineBasicBlock::iterator DI2 = BBI2->BB->getFirstNonDebugInstr();
|
||||
BBI1->NonPredSize -= NumDups1;
|
||||
BBI2->NonPredSize -= NumDups1;
|
||||
|
||||
|
Reference in New Issue
Block a user