Skip to content

Commit 9d38e24

Browse files
committed
format
1 parent fdc76f8 commit 9d38e24

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

llvm/lib/CodeGen/BranchFolding.cpp

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2089,22 +2089,21 @@ bool BranchFolder::HoistCommonCodeInSuccs(MachineBasicBlock *MBB) {
20892089
// both branches. FIXME: We could probably try harder to preserve some debug
20902090
// instructions (but at least this isn't producing wrong locations).
20912091
MachineInstrBuilder MIRBuilder(*MBB->getParent(), Loc);
2092-
auto HoistAndKillDbgInstr =
2093-
[MBB, Loc](MachineBasicBlock::iterator DI) {
2094-
assert(DI->isDebugInstr() && "Expected a debug instruction");
2095-
if (DI->isDebugRef()) {
2096-
const TargetInstrInfo *TII =
2097-
MBB->getParent()->getSubtarget().getInstrInfo();
2098-
const MCInstrDesc &DBGV = TII->get(TargetOpcode::DBG_VALUE);
2099-
DI = BuildMI(*MBB->getParent(), DI->getDebugLoc(), DBGV, false, 0,
2100-
DI->getDebugVariable(), DI->getDebugExpression());
2101-
MBB->insert(Loc, &*DI);
2102-
return;
2103-
}
2092+
auto HoistAndKillDbgInstr = [MBB, Loc](MachineBasicBlock::iterator DI) {
2093+
assert(DI->isDebugInstr() && "Expected a debug instruction");
2094+
if (DI->isDebugRef()) {
2095+
const TargetInstrInfo *TII =
2096+
MBB->getParent()->getSubtarget().getInstrInfo();
2097+
const MCInstrDesc &DBGV = TII->get(TargetOpcode::DBG_VALUE);
2098+
DI = BuildMI(*MBB->getParent(), DI->getDebugLoc(), DBGV, false, 0,
2099+
DI->getDebugVariable(), DI->getDebugExpression());
2100+
MBB->insert(Loc, &*DI);
2101+
return;
2102+
}
21042103

2105-
DI->setDebugValueUndef();
2106-
DI->moveBefore(&*Loc);
2107-
};
2104+
DI->setDebugValueUndef();
2105+
DI->moveBefore(&*Loc);
2106+
};
21082107

21092108
// TIB and FIB point to the end of the regions to hoist/merge in TBB and
21102109
// FBB.

0 commit comments

Comments
 (0)