mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-23 22:23:00 +00:00
Reapply an improved version of r180816/180817.
Change the informal convention of DBG_VALUE machine instructions so that we can express a register-indirect address with an offset of 0. The old convention was that a DBG_VALUE is a register-indirect value if the offset (operand 1) is nonzero. The new convention is that a DBG_VALUE is register-indirect if the first operand is a register and the second operand is an immediate. For plain register values the combination reg, reg is used. MachineInstrBuilder::BuildMI knows how to build the new DBG_VALUES. rdar://problem/13658587 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185966 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -298,7 +298,8 @@ void RAFast::spillVirtReg(MachineBasicBlock::iterator MI,
|
||||
for (unsigned li = 0, le = LRIDbgValues.size(); li != le; ++li) {
|
||||
MachineInstr *DBG = LRIDbgValues[li];
|
||||
const MDNode *MDPtr = DBG->getOperand(2).getMetadata();
|
||||
int64_t Offset = DBG->getOperand(1).getImm();
|
||||
bool IsIndirect = DBG->getOperand(1).isImm(); // Register-indirect value?
|
||||
int64_t Offset = IsIndirect ? DBG->getOperand(1).getImm() : 0;
|
||||
DebugLoc DL;
|
||||
if (MI == MBB->end()) {
|
||||
// If MI is at basic block end then use last instruction's location.
|
||||
|
||||
Reference in New Issue
Block a user