diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-14 08:36:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-14 08:36:50 +0000 |
commit | 63d7836267298f5b6cde43f0a89acbabfc109f48 (patch) | |
tree | cfca325f2bbfbecb0f5bc5fc7f1996e58025416b /lib/Target | |
parent | 6b4205aa44094f96115be72dd23aaf47a0257d2f (diff) | |
download | llvm-63d7836267298f5b6cde43f0a89acbabfc109f48.tar.gz llvm-63d7836267298f5b6cde43f0a89acbabfc109f48.tar.bz2 llvm-63d7836267298f5b6cde43f0a89acbabfc109f48.tar.xz |
get MMI out of the label uniquing business, just go to MCContext
to get unique assembler temporary labels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98489 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/CellSPU/SPURegisterInfo.cpp | 7 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCRegisterInfo.cpp | 4 | ||||
-rw-r--r-- | lib/Target/X86/X86RegisterInfo.cpp | 8 | ||||
-rw-r--r-- | lib/Target/XCore/XCoreInstrInfo.cpp | 2 | ||||
-rw-r--r-- | lib/Target/XCore/XCoreRegisterInfo.cpp | 8 |
5 files changed, 14 insertions, 15 deletions
diff --git a/lib/Target/CellSPU/SPURegisterInfo.cpp b/lib/Target/CellSPU/SPURegisterInfo.cpp index daa39a8d36..8c78bab37b 100644 --- a/lib/Target/CellSPU/SPURegisterInfo.cpp +++ b/lib/Target/CellSPU/SPURegisterInfo.cpp @@ -452,7 +452,7 @@ void SPURegisterInfo::emitPrologue(MachineFunction &MF) const FrameSize = -(FrameSize + SPUFrameInfo::minStackSize()); if (hasDebugInfo) { // Mark effective beginning of when frame pointer becomes valid. - FrameLabel = MMI->getLabelSym(MMI->NextLabelID()); + FrameLabel = MMI->getContext().CreateTempSymbol(); BuildMI(MBB, MBBI, dl, TII.get(SPU::DBG_LABEL)).addSym(FrameLabel); } @@ -514,7 +514,7 @@ void SPURegisterInfo::emitPrologue(MachineFunction &MF) const } // Mark effective beginning of when frame pointer is ready. - MCSymbol *ReadyLabel = MMI->getLabelSym(MMI->NextLabelID()); + MCSymbol *ReadyLabel = MMI->getContext().CreateTempSymbol(); BuildMI(MBB, MBBI, dl, TII.get(SPU::DBG_LABEL)).addSym(ReadyLabel); MachineLocation FPDst(SPU::R1); @@ -530,9 +530,8 @@ void SPURegisterInfo::emitPrologue(MachineFunction &MF) const dl = MBBI->getDebugLoc(); // Insert terminator label - unsigned BranchLabelId = MMI->NextLabelID(); BuildMI(MBB, MBBI, dl, TII.get(SPU::DBG_LABEL)) - .addSym(MMI->getLabelSym(BranchLabelId)); + .addSym(MMI->getContext().CreateTempSymbol()); } } } diff --git a/lib/Target/PowerPC/PPCRegisterInfo.cpp b/lib/Target/PowerPC/PPCRegisterInfo.cpp index 744f6c6b86..6e7880e22c 100644 --- a/lib/Target/PowerPC/PPCRegisterInfo.cpp +++ b/lib/Target/PowerPC/PPCRegisterInfo.cpp @@ -1446,7 +1446,7 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const { // reverse order. if (needsFrameMoves) { // Mark effective beginning of when frame pointer becomes valid. - FrameLabel = MMI->getLabelSym(MMI->NextLabelID()); + FrameLabel = MMI->getContext().CreateTempSymbol(); BuildMI(MBB, MBBI, dl, TII.get(PPC::DBG_LABEL)).addSym(FrameLabel); // Show update of SP. @@ -1487,7 +1487,7 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const { } if (needsFrameMoves) { - ReadyLabel = MMI->getLabelSym(MMI->NextLabelID()); + ReadyLabel = MMI->getContext().CreateTempSymbol(); // Mark effective beginning of when frame pointer is ready. BuildMI(MBB, MBBI, dl, TII.get(PPC::DBG_LABEL)).addSym(ReadyLabel); diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index f1574cb23a..3238ccebb9 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -959,7 +959,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const { if (needsFrameMoves) { // Mark the place where EBP/RBP was saved. - MCSymbol *FrameLabel = MMI->getLabelSym(MMI->NextLabelID()); + MCSymbol *FrameLabel = MMI->getContext().CreateTempSymbol(); BuildMI(MBB, MBBI, DL, TII.get(X86::DBG_LABEL)).addSym(FrameLabel); // Define the current CFA rule to use the provided offset. @@ -987,7 +987,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const { if (needsFrameMoves) { // Mark effective beginning of when frame pointer becomes valid. - MCSymbol *FrameLabel = MMI->getLabelSym(MMI->NextLabelID()); + MCSymbol *FrameLabel = MMI->getContext().CreateTempSymbol(); BuildMI(MBB, MBBI, DL, TII.get(X86::DBG_LABEL)).addSym(FrameLabel); // Define the current CFA to use the EBP/RBP register. @@ -1027,7 +1027,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const { if (!HasFP && needsFrameMoves) { // Mark callee-saved push instruction. - MCSymbol *Label = MMI->getLabelSym(MMI->NextLabelID()); + MCSymbol *Label = MMI->getContext().CreateTempSymbol(); BuildMI(MBB, MBBI, DL, TII.get(X86::DBG_LABEL)).addSym(Label); // Define the current CFA rule to use the provided offset. @@ -1099,7 +1099,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const { if ((NumBytes || PushedRegs) && needsFrameMoves) { // Mark end of stack pointer adjustment. - MCSymbol *Label = MMI->getLabelSym(MMI->NextLabelID()); + MCSymbol *Label = MMI->getContext().CreateTempSymbol(); BuildMI(MBB, MBBI, DL, TII.get(X86::DBG_LABEL)).addSym(Label); if (!HasFP && NumBytes) { diff --git a/lib/Target/XCore/XCoreInstrInfo.cpp b/lib/Target/XCore/XCoreInstrInfo.cpp index 1c3e33fb70..e5f5a6dbd3 100644 --- a/lib/Target/XCore/XCoreInstrInfo.cpp +++ b/lib/Target/XCore/XCoreInstrInfo.cpp @@ -429,7 +429,7 @@ bool XCoreInstrInfo::spillCalleeSavedRegisters(MachineBasicBlock &MBB, storeRegToStackSlot(MBB, MI, it->getReg(), true, it->getFrameIdx(), it->getRegClass()); if (emitFrameMoves) { - MCSymbol *SaveLabel = MMI->getLabelSym(MMI->NextLabelID()); + MCSymbol *SaveLabel = MMI->getContext().CreateTempSymbol(); BuildMI(MBB, MI, DL, get(XCore::DBG_LABEL)).addSym(SaveLabel); XFI->getSpillLabels().push_back(std::make_pair(SaveLabel, *it)); } diff --git a/lib/Target/XCore/XCoreRegisterInfo.cpp b/lib/Target/XCore/XCoreRegisterInfo.cpp index 856ae36ed3..88925047cc 100644 --- a/lib/Target/XCore/XCoreRegisterInfo.cpp +++ b/lib/Target/XCore/XCoreRegisterInfo.cpp @@ -456,7 +456,7 @@ void XCoreRegisterInfo::emitPrologue(MachineFunction &MF) const { std::vector<MachineMove> &Moves = MMI->getFrameMoves(); // Show update of SP. - MCSymbol *FrameLabel = MMI->getLabelSym(MMI->NextLabelID()); + MCSymbol *FrameLabel = MMI->getContext().CreateTempSymbol(); BuildMI(MBB, MBBI, dl, TII.get(XCore::DBG_LABEL)).addSym(FrameLabel); MachineLocation SPDst(MachineLocation::VirtualFP); @@ -475,7 +475,7 @@ void XCoreRegisterInfo::emitPrologue(MachineFunction &MF) const { MBB.addLiveIn(XCore::LR); if (emitFrameMoves) { - MCSymbol *SaveLRLabel = MMI->getLabelSym(MMI->NextLabelID()); + MCSymbol *SaveLRLabel = MMI->getContext().CreateTempSymbol(); BuildMI(MBB, MBBI, dl, TII.get(XCore::DBG_LABEL)).addSym(SaveLRLabel); MachineLocation CSDst(MachineLocation::VirtualFP, LRSpillOffset); MachineLocation CSSrc(XCore::LR); @@ -491,7 +491,7 @@ void XCoreRegisterInfo::emitPrologue(MachineFunction &MF) const { // R10 is live-in. It is killed at the spill. MBB.addLiveIn(XCore::R10); if (emitFrameMoves) { - MCSymbol *SaveR10Label = MMI->getLabelSym(MMI->NextLabelID()); + MCSymbol *SaveR10Label = MMI->getContext().CreateTempSymbol(); BuildMI(MBB, MBBI, dl, TII.get(XCore::DBG_LABEL)).addSym(SaveR10Label); MachineLocation CSDst(MachineLocation::VirtualFP, FPSpillOffset); MachineLocation CSSrc(XCore::R10); @@ -503,7 +503,7 @@ void XCoreRegisterInfo::emitPrologue(MachineFunction &MF) const { .addImm(0); if (emitFrameMoves) { // Show FP is now valid. - MCSymbol *FrameLabel = MMI->getLabelSym(MMI->NextLabelID()); + MCSymbol *FrameLabel = MMI->getContext().CreateTempSymbol(); BuildMI(MBB, MBBI, dl, TII.get(XCore::DBG_LABEL)).addSym(FrameLabel); MachineLocation SPDst(FramePtr); MachineLocation SPSrc(MachineLocation::VirtualFP); |