diff options
| author | Adrian Prantl <aprantl@apple.com> | 2013-07-09 20:28:37 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2013-07-09 20:28:37 +0000 |
| commit | 418d1d1ea912eadd5c119a98ec5735c36a9e0221 (patch) | |
| tree | 4052bf6e4f7945cd08f4b4fdcf21a056767c1e46 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | |
| parent | eff81a471acdf888e3cf5bc6550bd62b465d4e06 (diff) | |
| download | bcm5719-llvm-418d1d1ea912eadd5c119a98ec5735c36a9e0221.tar.gz bcm5719-llvm-418d1d1ea912eadd5c119a98ec5735c36a9e0221.zip | |
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
llvm-svn: 185966
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 2a1ded04b48..e9bafc9242e 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -4422,11 +4422,15 @@ SelectionDAGBuilder::EmitFuncArgumentDbgValue(const Value *V, MDNode *Variable, return false; if (Op->isReg()) - Op->setIsDebug(); - - FuncInfo.ArgDbgValues.push_back( + FuncInfo.ArgDbgValues.push_back(BuildMI(MF, getCurDebugLoc(), + TII->get(TargetOpcode::DBG_VALUE), + /* IsIndirect */ Offset != 0, + Op->getReg(), Offset, Variable)); + else + FuncInfo.ArgDbgValues.push_back( BuildMI(MF, getCurDebugLoc(), TII->get(TargetOpcode::DBG_VALUE)) .addOperand(*Op).addImm(Offset).addMetadata(Variable)); + return true; } |

