Change the informal convention of DBG_VALUE so that we can express a

register-indirect address with an offset of 0.
It used to be 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 registers use the combination reg, reg.

rdar://problem/13658587

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180816 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Adrian Prantl
2013-04-30 22:16:46 +00:00
parent f13fc1b23a
commit a2b56692c8
14 changed files with 222 additions and 45 deletions
+7 -1
View File
@@ -678,7 +678,13 @@ InstrEmitter::EmitDbgValue(SDDbgValue *SD,
MIB.addReg(0U);
}
MIB.addImm(Offset).addMetadata(MDPtr);
if (Offset != 0) // Indirect addressing.
MIB.addImm(Offset);
else
MIB.addReg(0U, RegState::Debug);
MIB.addMetadata(MDPtr);
return &*MIB;
}