mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-10 04:33:40 +00:00
remove the MMI pointer from MachineFrameInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100415 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
820e55e9ad
commit
a267b0076e
@ -24,7 +24,6 @@ class raw_ostream;
|
|||||||
class TargetData;
|
class TargetData;
|
||||||
class TargetRegisterClass;
|
class TargetRegisterClass;
|
||||||
class Type;
|
class Type;
|
||||||
class MachineModuleInfo;
|
|
||||||
class MachineFunction;
|
class MachineFunction;
|
||||||
class MachineBasicBlock;
|
class MachineBasicBlock;
|
||||||
class TargetFrameInfo;
|
class TargetFrameInfo;
|
||||||
@ -181,13 +180,6 @@ class MachineFrameInfo {
|
|||||||
/// spill slots.
|
/// spill slots.
|
||||||
SmallVector<bool, 8> SpillObjects;
|
SmallVector<bool, 8> SpillObjects;
|
||||||
|
|
||||||
/// MMI - This field is set (via setMachineModuleInfo) by a module info
|
|
||||||
/// consumer to indicate that frame layout information
|
|
||||||
/// should be acquired. Typically, it's the responsibility of the target's
|
|
||||||
/// TargetRegisterInfo prologue/epilogue emitting code to inform
|
|
||||||
/// MachineModuleInfo of frame layouts.
|
|
||||||
MachineModuleInfo *MMI;
|
|
||||||
|
|
||||||
/// TargetFrameInfo - Target information about frame layout.
|
/// TargetFrameInfo - Target information about frame layout.
|
||||||
///
|
///
|
||||||
const TargetFrameInfo &TFI;
|
const TargetFrameInfo &TFI;
|
||||||
@ -201,7 +193,6 @@ public:
|
|||||||
StackProtectorIdx = -1;
|
StackProtectorIdx = -1;
|
||||||
MaxCallFrameSize = 0;
|
MaxCallFrameSize = 0;
|
||||||
CSIValid = false;
|
CSIValid = false;
|
||||||
MMI = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// hasStackObjects - Return true if there are any stack objects in this
|
/// hasStackObjects - Return true if there are any stack objects in this
|
||||||
@ -444,14 +435,6 @@ public:
|
|||||||
/// method always returns an empty set.
|
/// method always returns an empty set.
|
||||||
BitVector getPristineRegs(const MachineBasicBlock *MBB) const;
|
BitVector getPristineRegs(const MachineBasicBlock *MBB) const;
|
||||||
|
|
||||||
/// getMachineModuleInfo - Used by a prologue/epilogue
|
|
||||||
/// emitter (TargetRegisterInfo) to provide frame layout information.
|
|
||||||
MachineModuleInfo *getMachineModuleInfo() const { return MMI; }
|
|
||||||
|
|
||||||
/// setMachineModuleInfo - Used by a meta info consumer to
|
|
||||||
/// indicate that frame layout information should be gathered.
|
|
||||||
void setMachineModuleInfo(MachineModuleInfo *mmi) { MMI = mmi; }
|
|
||||||
|
|
||||||
/// print - Used by the MachineFunction printer to print information about
|
/// print - Used by the MachineFunction printer to print information about
|
||||||
/// stack objects. Implemented in MachineFunction.cpp
|
/// stack objects. Implemented in MachineFunction.cpp
|
||||||
///
|
///
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include "llvm/CodeGen/MachineLoopInfo.h"
|
#include "llvm/CodeGen/MachineLoopInfo.h"
|
||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
#include "llvm/CodeGen/MachineFrameInfo.h"
|
#include "llvm/CodeGen/MachineFrameInfo.h"
|
||||||
#include "llvm/CodeGen/MachineModuleInfo.h"
|
|
||||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||||
#include "llvm/CodeGen/RegisterScavenging.h"
|
#include "llvm/CodeGen/RegisterScavenging.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
@ -59,11 +58,6 @@ bool PEI::runOnMachineFunction(MachineFunction &Fn) {
|
|||||||
FrameIndexVirtualScavenging = TRI->requiresFrameIndexScavenging(Fn);
|
FrameIndexVirtualScavenging = TRI->requiresFrameIndexScavenging(Fn);
|
||||||
FrameConstantRegMap.clear();
|
FrameConstantRegMap.clear();
|
||||||
|
|
||||||
// Get MachineModuleInfo so that we can track the construction of the
|
|
||||||
// frame.
|
|
||||||
if (MachineModuleInfo *MMI = getAnalysisIfAvailable<MachineModuleInfo>())
|
|
||||||
Fn.getFrameInfo()->setMachineModuleInfo(MMI);
|
|
||||||
|
|
||||||
// Calculate the MaxCallFrameSize and HasCalls variables for the function's
|
// Calculate the MaxCallFrameSize and HasCalls variables for the function's
|
||||||
// frame information. Also eliminates call frame pseudo instructions.
|
// frame information. Also eliminates call frame pseudo instructions.
|
||||||
calculateCallsInformation(Fn);
|
calculateCallsInformation(Fn);
|
||||||
|
@ -451,11 +451,11 @@ void SPURegisterInfo::emitPrologue(MachineFunction &MF) const
|
|||||||
MachineBasicBlock &MBB = MF.front(); // Prolog goes in entry BB
|
MachineBasicBlock &MBB = MF.front(); // Prolog goes in entry BB
|
||||||
MachineBasicBlock::iterator MBBI = MBB.begin();
|
MachineBasicBlock::iterator MBBI = MBB.begin();
|
||||||
MachineFrameInfo *MFI = MF.getFrameInfo();
|
MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||||
MachineModuleInfo *MMI = MFI->getMachineModuleInfo();
|
MachineModuleInfo &MMI = MF.getMMI();
|
||||||
DebugLoc dl = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
|
DebugLoc dl = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
|
||||||
|
|
||||||
// Prepare for debug frame info.
|
// Prepare for debug frame info.
|
||||||
bool hasDebugInfo = MMI && MMI->hasDebugInfo();
|
bool hasDebugInfo = MMI.hasDebugInfo();
|
||||||
MCSymbol *FrameLabel = 0;
|
MCSymbol *FrameLabel = 0;
|
||||||
|
|
||||||
// Move MBBI back to the beginning of the function.
|
// Move MBBI back to the beginning of the function.
|
||||||
@ -473,7 +473,7 @@ void SPURegisterInfo::emitPrologue(MachineFunction &MF) const
|
|||||||
FrameSize = -(FrameSize + SPUFrameInfo::minStackSize());
|
FrameSize = -(FrameSize + SPUFrameInfo::minStackSize());
|
||||||
if (hasDebugInfo) {
|
if (hasDebugInfo) {
|
||||||
// Mark effective beginning of when frame pointer becomes valid.
|
// Mark effective beginning of when frame pointer becomes valid.
|
||||||
FrameLabel = MMI->getContext().CreateTempSymbol();
|
FrameLabel = MMI.getContext().CreateTempSymbol();
|
||||||
BuildMI(MBB, MBBI, dl, TII.get(SPU::DBG_LABEL)).addSym(FrameLabel);
|
BuildMI(MBB, MBBI, dl, TII.get(SPU::DBG_LABEL)).addSym(FrameLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -516,7 +516,7 @@ void SPURegisterInfo::emitPrologue(MachineFunction &MF) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (hasDebugInfo) {
|
if (hasDebugInfo) {
|
||||||
std::vector<MachineMove> &Moves = MMI->getFrameMoves();
|
std::vector<MachineMove> &Moves = MMI.getFrameMoves();
|
||||||
|
|
||||||
// Show update of SP.
|
// Show update of SP.
|
||||||
MachineLocation SPDst(MachineLocation::VirtualFP);
|
MachineLocation SPDst(MachineLocation::VirtualFP);
|
||||||
@ -535,7 +535,7 @@ void SPURegisterInfo::emitPrologue(MachineFunction &MF) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Mark effective beginning of when frame pointer is ready.
|
// Mark effective beginning of when frame pointer is ready.
|
||||||
MCSymbol *ReadyLabel = MMI->getContext().CreateTempSymbol();
|
MCSymbol *ReadyLabel = MMI.getContext().CreateTempSymbol();
|
||||||
BuildMI(MBB, MBBI, dl, TII.get(SPU::DBG_LABEL)).addSym(ReadyLabel);
|
BuildMI(MBB, MBBI, dl, TII.get(SPU::DBG_LABEL)).addSym(ReadyLabel);
|
||||||
|
|
||||||
MachineLocation FPDst(SPU::R1);
|
MachineLocation FPDst(SPU::R1);
|
||||||
@ -552,7 +552,7 @@ void SPURegisterInfo::emitPrologue(MachineFunction &MF) const
|
|||||||
|
|
||||||
// Insert terminator label
|
// Insert terminator label
|
||||||
BuildMI(MBB, MBBI, dl, TII.get(SPU::DBG_LABEL))
|
BuildMI(MBB, MBBI, dl, TII.get(SPU::DBG_LABEL))
|
||||||
.addSym(MMI->getContext().CreateTempSymbol());
|
.addSym(MMI.getContext().CreateTempSymbol());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1280,9 +1280,9 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||||||
MachineBasicBlock &MBB = MF.front(); // Prolog goes in entry BB
|
MachineBasicBlock &MBB = MF.front(); // Prolog goes in entry BB
|
||||||
MachineBasicBlock::iterator MBBI = MBB.begin();
|
MachineBasicBlock::iterator MBBI = MBB.begin();
|
||||||
MachineFrameInfo *MFI = MF.getFrameInfo();
|
MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||||
MachineModuleInfo *MMI = MFI->getMachineModuleInfo();
|
MachineModuleInfo &MMI = MF.getMMI();
|
||||||
DebugLoc dl;
|
DebugLoc dl;
|
||||||
bool needsFrameMoves = (MMI && MMI->hasDebugInfo()) ||
|
bool needsFrameMoves = MMI.hasDebugInfo() ||
|
||||||
!MF.getFunction()->doesNotThrow() ||
|
!MF.getFunction()->doesNotThrow() ||
|
||||||
UnwindTablesMandatory;
|
UnwindTablesMandatory;
|
||||||
|
|
||||||
@ -1442,13 +1442,13 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<MachineMove> &Moves = MMI->getFrameMoves();
|
std::vector<MachineMove> &Moves = MMI.getFrameMoves();
|
||||||
|
|
||||||
// Add the "machine moves" for the instructions we generated above, but in
|
// Add the "machine moves" for the instructions we generated above, but in
|
||||||
// reverse order.
|
// reverse order.
|
||||||
if (needsFrameMoves) {
|
if (needsFrameMoves) {
|
||||||
// Mark effective beginning of when frame pointer becomes valid.
|
// Mark effective beginning of when frame pointer becomes valid.
|
||||||
FrameLabel = MMI->getContext().CreateTempSymbol();
|
FrameLabel = MMI.getContext().CreateTempSymbol();
|
||||||
BuildMI(MBB, MBBI, dl, TII.get(PPC::DBG_LABEL)).addSym(FrameLabel);
|
BuildMI(MBB, MBBI, dl, TII.get(PPC::DBG_LABEL)).addSym(FrameLabel);
|
||||||
|
|
||||||
// Show update of SP.
|
// Show update of SP.
|
||||||
@ -1489,7 +1489,7 @@ PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (needsFrameMoves) {
|
if (needsFrameMoves) {
|
||||||
ReadyLabel = MMI->getContext().CreateTempSymbol();
|
ReadyLabel = MMI.getContext().CreateTempSymbol();
|
||||||
|
|
||||||
// Mark effective beginning of when frame pointer is ready.
|
// Mark effective beginning of when frame pointer is ready.
|
||||||
BuildMI(MBB, MBBI, dl, TII.get(PPC::DBG_LABEL)).addSym(ReadyLabel);
|
BuildMI(MBB, MBBI, dl, TII.get(PPC::DBG_LABEL)).addSym(ReadyLabel);
|
||||||
|
@ -297,9 +297,7 @@ X86RegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
|
|||||||
bool ghcCall = false;
|
bool ghcCall = false;
|
||||||
|
|
||||||
if (MF) {
|
if (MF) {
|
||||||
const MachineFrameInfo *MFI = MF->getFrameInfo();
|
callsEHReturn = MF->getMMI().callsEHReturn();
|
||||||
const MachineModuleInfo *MMI = MFI->getMachineModuleInfo();
|
|
||||||
callsEHReturn = (MMI ? MMI->callsEHReturn() : false);
|
|
||||||
const Function *F = MF->getFunction();
|
const Function *F = MF->getFunction();
|
||||||
ghcCall = (F ? F->getCallingConv() == CallingConv::GHC : false);
|
ghcCall = (F ? F->getCallingConv() == CallingConv::GHC : false);
|
||||||
}
|
}
|
||||||
@ -348,12 +346,8 @@ X86RegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
|
|||||||
const TargetRegisterClass* const*
|
const TargetRegisterClass* const*
|
||||||
X86RegisterInfo::getCalleeSavedRegClasses(const MachineFunction *MF) const {
|
X86RegisterInfo::getCalleeSavedRegClasses(const MachineFunction *MF) const {
|
||||||
bool callsEHReturn = false;
|
bool callsEHReturn = false;
|
||||||
|
if (MF)
|
||||||
if (MF) {
|
callsEHReturn = MF->getMMI().callsEHReturn();
|
||||||
const MachineFrameInfo *MFI = MF->getFrameInfo();
|
|
||||||
const MachineModuleInfo *MMI = MFI->getMachineModuleInfo();
|
|
||||||
callsEHReturn = (MMI ? MMI->callsEHReturn() : false);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const TargetRegisterClass * const CalleeSavedRegClasses32Bit[] = {
|
static const TargetRegisterClass * const CalleeSavedRegClasses32Bit[] = {
|
||||||
&X86::GR32RegClass, &X86::GR32RegClass,
|
&X86::GR32RegClass, &X86::GR32RegClass,
|
||||||
@ -443,14 +437,14 @@ BitVector X86RegisterInfo::getReservedRegs(const MachineFunction &MF) const {
|
|||||||
/// or if frame pointer elimination is disabled.
|
/// or if frame pointer elimination is disabled.
|
||||||
bool X86RegisterInfo::hasFP(const MachineFunction &MF) const {
|
bool X86RegisterInfo::hasFP(const MachineFunction &MF) const {
|
||||||
const MachineFrameInfo *MFI = MF.getFrameInfo();
|
const MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||||
const MachineModuleInfo *MMI = MFI->getMachineModuleInfo();
|
const MachineModuleInfo &MMI = MF.getMMI();
|
||||||
|
|
||||||
return (NoFramePointerElim ||
|
return (NoFramePointerElim ||
|
||||||
needsStackRealignment(MF) ||
|
needsStackRealignment(MF) ||
|
||||||
MFI->hasVarSizedObjects() ||
|
MFI->hasVarSizedObjects() ||
|
||||||
MFI->isFrameAddressTaken() ||
|
MFI->isFrameAddressTaken() ||
|
||||||
MF.getInfo<X86MachineFunctionInfo>()->getForceFramePointer() ||
|
MF.getInfo<X86MachineFunctionInfo>()->getForceFramePointer() ||
|
||||||
(MMI && MMI->callsUnwindInit()));
|
MMI.callsUnwindInit());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool X86RegisterInfo::canRealignStack(const MachineFunction &MF) const {
|
bool X86RegisterInfo::canRealignStack(const MachineFunction &MF) const {
|
||||||
@ -800,14 +794,13 @@ void X86RegisterInfo::emitCalleeSavedFrameMoves(MachineFunction &MF,
|
|||||||
MCSymbol *Label,
|
MCSymbol *Label,
|
||||||
unsigned FramePtr) const {
|
unsigned FramePtr) const {
|
||||||
MachineFrameInfo *MFI = MF.getFrameInfo();
|
MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||||
MachineModuleInfo *MMI = MFI->getMachineModuleInfo();
|
MachineModuleInfo &MMI = MF.getMMI();
|
||||||
if (!MMI) return;
|
|
||||||
|
|
||||||
// Add callee saved registers to move list.
|
// Add callee saved registers to move list.
|
||||||
const std::vector<CalleeSavedInfo> &CSI = MFI->getCalleeSavedInfo();
|
const std::vector<CalleeSavedInfo> &CSI = MFI->getCalleeSavedInfo();
|
||||||
if (CSI.empty()) return;
|
if (CSI.empty()) return;
|
||||||
|
|
||||||
std::vector<MachineMove> &Moves = MMI->getFrameMoves();
|
std::vector<MachineMove> &Moves = MMI.getFrameMoves();
|
||||||
const TargetData *TD = MF.getTarget().getTargetData();
|
const TargetData *TD = MF.getTarget().getTargetData();
|
||||||
bool HasFP = hasFP(MF);
|
bool HasFP = hasFP(MF);
|
||||||
|
|
||||||
@ -874,9 +867,9 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||||||
MachineFrameInfo *MFI = MF.getFrameInfo();
|
MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||||
const Function *Fn = MF.getFunction();
|
const Function *Fn = MF.getFunction();
|
||||||
const X86Subtarget *Subtarget = &MF.getTarget().getSubtarget<X86Subtarget>();
|
const X86Subtarget *Subtarget = &MF.getTarget().getSubtarget<X86Subtarget>();
|
||||||
MachineModuleInfo *MMI = MFI->getMachineModuleInfo();
|
MachineModuleInfo &MMI = MF.getMMI();
|
||||||
X86MachineFunctionInfo *X86FI = MF.getInfo<X86MachineFunctionInfo>();
|
X86MachineFunctionInfo *X86FI = MF.getInfo<X86MachineFunctionInfo>();
|
||||||
bool needsFrameMoves = (MMI && MMI->hasDebugInfo()) ||
|
bool needsFrameMoves = MMI.hasDebugInfo() ||
|
||||||
!Fn->doesNotThrow() || UnwindTablesMandatory;
|
!Fn->doesNotThrow() || UnwindTablesMandatory;
|
||||||
uint64_t MaxAlign = MFI->getMaxAlignment(); // Desired stack alignment.
|
uint64_t MaxAlign = MFI->getMaxAlignment(); // Desired stack alignment.
|
||||||
uint64_t StackSize = MFI->getStackSize(); // Number of bytes to allocate.
|
uint64_t StackSize = MFI->getStackSize(); // Number of bytes to allocate.
|
||||||
@ -935,7 +928,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||||||
// REG < 64 => DW_CFA_offset + Reg
|
// REG < 64 => DW_CFA_offset + Reg
|
||||||
// ELSE => DW_CFA_offset_extended
|
// ELSE => DW_CFA_offset_extended
|
||||||
|
|
||||||
std::vector<MachineMove> &Moves = MMI->getFrameMoves();
|
std::vector<MachineMove> &Moves = MMI.getFrameMoves();
|
||||||
const TargetData *TD = MF.getTarget().getTargetData();
|
const TargetData *TD = MF.getTarget().getTargetData();
|
||||||
uint64_t NumBytes = 0;
|
uint64_t NumBytes = 0;
|
||||||
int stackGrowth = -TD->getPointerSize();
|
int stackGrowth = -TD->getPointerSize();
|
||||||
@ -959,7 +952,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||||||
|
|
||||||
if (needsFrameMoves) {
|
if (needsFrameMoves) {
|
||||||
// Mark the place where EBP/RBP was saved.
|
// Mark the place where EBP/RBP was saved.
|
||||||
MCSymbol *FrameLabel = MMI->getContext().CreateTempSymbol();
|
MCSymbol *FrameLabel = MMI.getContext().CreateTempSymbol();
|
||||||
BuildMI(MBB, MBBI, DL, TII.get(X86::DBG_LABEL)).addSym(FrameLabel);
|
BuildMI(MBB, MBBI, DL, TII.get(X86::DBG_LABEL)).addSym(FrameLabel);
|
||||||
|
|
||||||
// Define the current CFA rule to use the provided offset.
|
// Define the current CFA rule to use the provided offset.
|
||||||
@ -987,7 +980,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||||||
|
|
||||||
if (needsFrameMoves) {
|
if (needsFrameMoves) {
|
||||||
// Mark effective beginning of when frame pointer becomes valid.
|
// Mark effective beginning of when frame pointer becomes valid.
|
||||||
MCSymbol *FrameLabel = MMI->getContext().CreateTempSymbol();
|
MCSymbol *FrameLabel = MMI.getContext().CreateTempSymbol();
|
||||||
BuildMI(MBB, MBBI, DL, TII.get(X86::DBG_LABEL)).addSym(FrameLabel);
|
BuildMI(MBB, MBBI, DL, TII.get(X86::DBG_LABEL)).addSym(FrameLabel);
|
||||||
|
|
||||||
// Define the current CFA to use the EBP/RBP register.
|
// Define the current CFA to use the EBP/RBP register.
|
||||||
@ -1027,7 +1020,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||||||
|
|
||||||
if (!HasFP && needsFrameMoves) {
|
if (!HasFP && needsFrameMoves) {
|
||||||
// Mark callee-saved push instruction.
|
// Mark callee-saved push instruction.
|
||||||
MCSymbol *Label = MMI->getContext().CreateTempSymbol();
|
MCSymbol *Label = MMI.getContext().CreateTempSymbol();
|
||||||
BuildMI(MBB, MBBI, DL, TII.get(X86::DBG_LABEL)).addSym(Label);
|
BuildMI(MBB, MBBI, DL, TII.get(X86::DBG_LABEL)).addSym(Label);
|
||||||
|
|
||||||
// Define the current CFA rule to use the provided offset.
|
// Define the current CFA rule to use the provided offset.
|
||||||
@ -1099,7 +1092,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||||||
|
|
||||||
if ((NumBytes || PushedRegs) && needsFrameMoves) {
|
if ((NumBytes || PushedRegs) && needsFrameMoves) {
|
||||||
// Mark end of stack pointer adjustment.
|
// Mark end of stack pointer adjustment.
|
||||||
MCSymbol *Label = MMI->getContext().CreateTempSymbol();
|
MCSymbol *Label = MMI.getContext().CreateTempSymbol();
|
||||||
BuildMI(MBB, MBBI, DL, TII.get(X86::DBG_LABEL)).addSym(Label);
|
BuildMI(MBB, MBBI, DL, TII.get(X86::DBG_LABEL)).addSym(Label);
|
||||||
|
|
||||||
if (!HasFP && NumBytes) {
|
if (!HasFP && NumBytes) {
|
||||||
|
@ -67,12 +67,8 @@ unsigned XCoreRegisterInfo::getNumArgRegs(const MachineFunction *MF)
|
|||||||
return array_lengthof(XCore_ArgRegs);
|
return array_lengthof(XCore_ArgRegs);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool XCoreRegisterInfo::needsFrameMoves(const MachineFunction &MF)
|
bool XCoreRegisterInfo::needsFrameMoves(const MachineFunction &MF) {
|
||||||
{
|
return MF.getMMI().hasDebugInfo() || !MF.getFunction()->doesNotThrow() ||
|
||||||
const MachineFrameInfo *MFI = MF.getFrameInfo();
|
|
||||||
MachineModuleInfo *MMI = MFI->getMachineModuleInfo();
|
|
||||||
return (MMI && MMI->hasDebugInfo()) ||
|
|
||||||
!MF.getFunction()->doesNotThrow() ||
|
|
||||||
UnwindTablesMandatory;
|
UnwindTablesMandatory;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -412,7 +408,7 @@ void XCoreRegisterInfo::emitPrologue(MachineFunction &MF) const {
|
|||||||
MachineBasicBlock &MBB = MF.front(); // Prolog goes in entry BB
|
MachineBasicBlock &MBB = MF.front(); // Prolog goes in entry BB
|
||||||
MachineBasicBlock::iterator MBBI = MBB.begin();
|
MachineBasicBlock::iterator MBBI = MBB.begin();
|
||||||
MachineFrameInfo *MFI = MF.getFrameInfo();
|
MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||||
MachineModuleInfo *MMI = MFI->getMachineModuleInfo();
|
MachineModuleInfo *MMI = &MF.getMMI();
|
||||||
XCoreFunctionInfo *XFI = MF.getInfo<XCoreFunctionInfo>();
|
XCoreFunctionInfo *XFI = MF.getInfo<XCoreFunctionInfo>();
|
||||||
DebugLoc dl = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
|
DebugLoc dl = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user