diff options
| author | Adrian Prantl <aprantl@apple.com> | 2013-04-30 22:16:46 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2013-04-30 22:16:46 +0000 |
| commit | 9a576644e4b86acc733f98ac069cc6a39ea8bf24 (patch) | |
| tree | c10d50b4ae350088bef4857526e874202729b7d6 /llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp | |
| parent | dd77014acc05c77052934596063aa911e18fdbcb (diff) | |
| download | bcm5719-llvm-9a576644e4b86acc733f98ac069cc6a39ea8bf24.tar.gz bcm5719-llvm-9a576644e4b86acc733f98ac069cc6a39ea8bf24.zip | |
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
llvm-svn: 180816
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp index 3b1abd7c836..060492efede 100644 --- a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp @@ -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; } |

