diff options
| author | Adrian Prantl <aprantl@apple.com> | 2013-04-30 22:35:14 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2013-04-30 22:35:14 +0000 |
| commit | a2888e71eb3f7d4fed348fd0d659355099bd1505 (patch) | |
| tree | e82e940f52451bc65e31e61f50ed1a8e3eb28b7a /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
| parent | 83633259628b740dcd1443ef04dde3e8b6764c93 (diff) | |
| download | bcm5719-llvm-a2888e71eb3f7d4fed348fd0d659355099bd1505.tar.gz bcm5719-llvm-a2888e71eb3f7d4fed348fd0d659355099bd1505.zip | |
Temporarily revert "Change the informal convention of DBG_VALUE so that we can express a"
because it breaks some buildbots.
This reverts commit 180816.
llvm-svn: 180819
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 806e4640bfe..e21f26e91ce 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/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); } |

