summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2013-04-30 22:35:14 +0000
committerAdrian Prantl <aprantl@apple.com>2013-04-30 22:35:14 +0000
commit86a87d9ba1faf153e0e6eaddfd3e95595c83bcb1 (patch)
tree47a19f014e0d437591cd4de7018bbb9b9fe17478 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parenta2b56692c8b824b8cc4a0927bb555f3718e9bee8 (diff)
downloadllvm-86a87d9ba1faf153e0e6eaddfd3e95595c83bcb1.tar.gz
llvm-86a87d9ba1faf153e0e6eaddfd3e95595c83bcb1.tar.bz2
llvm-86a87d9ba1faf153e0e6eaddfd3e95595c83bcb1.tar.xz
Temporarily revert "Change the informal convention of DBG_VALUE so that we can express a"
because it breaks some buildbots. This reverts commit 180816. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180819 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 806e4640bf..e21f26e91c 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -418,14 +418,12 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
MachineBasicBlock::iterator InsertPos = Def;
const MDNode *Variable =
MI->getOperand(MI->getNumOperands()-1).getMetadata();
- unsigned Offset = 0;
- if (MI->getOperand(1).isImm())
- Offset = MI->getOperand(1).getImm();
+ unsigned Offset = MI->getOperand(1).getImm();
// Def is never a terminator here, so it is ok to increment InsertPos.
BuildMI(*EntryMBB, ++InsertPos, MI->getDebugLoc(),
- TII.get(TargetOpcode::DBG_VALUE),
- MI->getOperand(1).isReg(),
- LDI->second, Offset, Variable);
+ TII.get(TargetOpcode::DBG_VALUE))
+ .addReg(LDI->second, RegState::Debug)
+ .addImm(Offset).addMetadata(Variable);
// If this vreg is directly copied into an exported register then
// that COPY instructions also need DBG_VALUE, if it is the only
@@ -444,10 +442,9 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
if (CopyUseMI) {
MachineInstr *NewMI =
BuildMI(*MF, CopyUseMI->getDebugLoc(),
- TII.get(TargetOpcode::DBG_VALUE),
- Offset!=0,
- CopyUseMI->getOperand(0).getReg(),
- Offset, Variable);
+ TII.get(TargetOpcode::DBG_VALUE))
+ .addReg(CopyUseMI->getOperand(0).getReg(), RegState::Debug)
+ .addImm(Offset).addMetadata(Variable);
MachineBasicBlock::iterator Pos = CopyUseMI;
EntryMBB->insertAfter(Pos, NewMI);
}