.Case("dead", MIToken::kw_dead)
.Case("killed", MIToken::kw_killed)
.Case("undef", MIToken::kw_undef)
+ .Case("debug-use", MIToken::kw_debug_use)
.Case("frame-setup", MIToken::kw_frame_setup)
.Case("debug-location", MIToken::kw_debug_location)
.Case(".cfi_offset", MIToken::kw_cfi_offset)
kw_dead,
kw_killed,
kw_undef,
+ kw_debug_use,
kw_frame_setup,
kw_debug_location,
kw_cfi_offset,
bool isRegisterFlag() const {
return Kind == kw_implicit || Kind == kw_implicit_define ||
- Kind == kw_dead || Kind == kw_killed || Kind == kw_undef;
+ Kind == kw_dead || Kind == kw_killed || Kind == kw_undef ||
+ Kind == kw_debug_use;
}
bool isMemoryOperandFlag() const { return Kind == kw_volatile; }
case MIToken::kw_undef:
Flags |= RegState::Undef;
break;
+ case MIToken::kw_debug_use:
+ Flags |= RegState::Debug;
+ break;
// TODO: report an error when we specify the same flag more than once.
// TODO: parse the other register flags.
default:
Dest = MachineOperand::CreateReg(
Reg, Flags & RegState::Define, Flags & RegState::Implicit,
Flags & RegState::Kill, Flags & RegState::Dead, Flags & RegState::Undef,
- /*isEarlyClobber=*/false, SubReg);
+ /*isEarlyClobber=*/false, SubReg, Flags & RegState::Debug);
return false;
}
case MIToken::kw_dead:
case MIToken::kw_killed:
case MIToken::kw_undef:
+ case MIToken::kw_debug_use:
case MIToken::underscore:
case MIToken::NamedRegister:
case MIToken::VirtualRegister:
OS << "killed ";
if (Op.isUndef())
OS << "undef ";
+ if (Op.isDebug())
+ OS << "debug-use ";
printReg(Op.getReg(), OS, TRI);
// Print the sub register.
if (Op.getSubReg() != 0)
name: entry
liveins: [ '%edi' ]
instructions:
- # CHECK: DBG_VALUE _, 0, !12, !13, debug-location !14
+ # CHECK: DBG_VALUE debug-use _, 0, !12, !13, debug-location !14
# CHECK: %eax = COPY %0, debug-location !15
# CHECK: RETQ %eax, debug-location !15
- '%0 = COPY %edi'
- - 'DBG_VALUE _, 0, !12, !13, debug-location !14'
+ - 'DBG_VALUE debug-use _, 0, !12, !13, debug-location !14'
- 'MOV32mr %stack.0.x.addr, 1, _, 0, _, %0'
- '%eax = COPY %0, debug-location !15'
- 'RETQ %eax, debug-location !15'