aboutsummaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-14 08:12:40 +0000
committerChris Lattner <sabre@nondot.org>2010-03-14 08:12:40 +0000
commit2e9919a5e5fe76f4b1e3290103c4bfd149ebba9c (patch)
tree441d723506a0aa8d99350120c844a43ac5166e80 /lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp
parent6ffcccab5191ef1dcde876800c24a1f58b3b7ad8 (diff)
Now that DBG_LABEL is updated, we can finally make MachineMove
contain an MCSymbol instead of a label index. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98482 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp')
-rw-r--r--lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp b/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp
index ee1ec72cb0..7baf053e99 100644
--- a/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp
+++ b/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;