diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-14 08:12:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-14 08:12:40 +0000 |
commit | d5e8d9f29a11db395fe5bd464d9396bf2d8212fd (patch) | |
tree | 2617d3840b880359b016a29d29d2ff3dffdec737 /llvm/lib/ExecutionEngine | |
parent | c26f44fb0778fd24d8e4986a9b946bda0f53547b (diff) | |
download | bcm5719-llvm-d5e8d9f29a11db395fe5bd464d9396bf2d8212fd.tar.gz bcm5719-llvm-d5e8d9f29a11db395fe5bd464d9396bf2d8212fd.zip |
Now that DBG_LABEL is updated, we can finally make MachineMove
contain an MCSymbol instead of a label index.
llvm-svn: 98482
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp b/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp index ee1ec72cb0f..7baf053e99f 100644 --- a/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp @@ -68,32 +68,29 @@ JITDwarfEmitter::EmitFrameMoves(intptr_t BaseLabelPtr, unsigned PointerSize = TD->getPointerSize(); int stackGrowth = stackGrowthDirection == TargetFrameInfo::StackGrowsUp ? PointerSize : -PointerSize; - bool IsLocal = false; - unsigned BaseLabelID = 0; + MCSymbol *BaseLabel = 0; for (unsigned i = 0, N = Moves.size(); i < N; ++i) { const MachineMove &Move = Moves[i]; - unsigned LabelID = Move.getLabelID(); - MCSymbol *Label = LabelID ? MMI->getLabelSym(LabelID) : 0; + MCSymbol *Label = Move.getLabel(); // Throw out move if the label is invalid. if (Label && !Label->isDefined()) continue; intptr_t LabelPtr = 0; - if (LabelID) LabelPtr = JCE->getLabelAddress(Label); + if (Label) LabelPtr = JCE->getLabelAddress(Label); const MachineLocation &Dst = Move.getDestination(); const MachineLocation &Src = Move.getSource(); // Advance row if new location. - if (BaseLabelPtr && LabelID && (BaseLabelID != LabelID || !IsLocal)) { + if (BaseLabelPtr && Label && BaseLabel != Label) { JCE->emitByte(dwarf::DW_CFA_advance_loc4); JCE->emitInt32(LabelPtr - BaseLabelPtr); - BaseLabelID = LabelID; + BaseLabel = Label; BaseLabelPtr = LabelPtr; - IsLocal = true; } // If advancing cfa. @@ -712,21 +709,20 @@ JITDwarfEmitter::GetFrameMovesSizeInBytes(intptr_t BaseLabelPtr, for (unsigned i = 0, N = Moves.size(); i < N; ++i) { const MachineMove &Move = Moves[i]; - unsigned LabelID = Move.getLabelID(); - MCSymbol *Label = LabelID ? MMI->getLabelSym(LabelID) : 0; + MCSymbol *Label = Move.getLabel(); // Throw out move if the label is invalid. if (Label && !Label->isDefined()) continue; intptr_t LabelPtr = 0; - if (LabelID) LabelPtr = JCE->getLabelAddress(Label); + if (Label) LabelPtr = JCE->getLabelAddress(Label); const MachineLocation &Dst = Move.getDestination(); const MachineLocation &Src = Move.getSource(); // Advance row if new location. - if (BaseLabelPtr && LabelID && (BaseLabelPtr != LabelPtr || !IsLocal)) { + if (BaseLabelPtr && Label && (BaseLabelPtr != LabelPtr || !IsLocal)) { FinalSize++; FinalSize += PointerSize; BaseLabelPtr = LabelPtr; |