void BeginFunction(MachineFunction *MF) {
this->MF = MF;
shouldEmitTable = shouldEmitMoves = false;
- if (TAI->doesSupportExceptionHandling()) {
+ if (MMI && TAI->doesSupportExceptionHandling()) {
// Map all labels and get rid of any dead landing pads.
MMI->TidyLandingPads();
MachineBasicBlock::iterator MBBI = MBB.begin();
MachineFrameInfo *MFI = MF.getFrameInfo();
MachineModuleInfo *MMI = MFI->getMachineModuleInfo();
- bool needsFrameInfo = (MMI && MMI->hasDebugInfo()) ||
+ bool needsFrameMoves = (MMI && MMI->hasDebugInfo()) ||
!MF.getFunction()->doesNotThrow();
// Prepare for frame info.
unsigned TargetAlign = MF.getTarget().getFrameInfo()->getStackAlignment();
unsigned MaxAlign = MFI->getMaxAlignment();
- if (needsFrameInfo) {
+ if (needsFrameMoves) {
// Mark effective beginning of when frame pointer becomes valid.
FrameLabelId = MMI->NextLabelID();
BuildMI(MBB, MBBI, TII.get(PPC::LABEL)).addImm(FrameLabelId).addImm(0);
}
}
- if (needsFrameInfo) {
+ if (needsFrameMoves) {
std::vector<MachineMove> &Moves = MMI->getFrameMoves();
if (NegFrameSize) {
MachineModuleInfo *MMI = MFI->getMachineModuleInfo();
X86MachineFunctionInfo *X86FI = MF.getInfo<X86MachineFunctionInfo>();
MachineBasicBlock::iterator MBBI = MBB.begin();
- bool needsFrameInfo = (MMI && MMI->hasDebugInfo()) || !Fn->doesNotThrow();
+ bool needsFrameMoves = (MMI && MMI->hasDebugInfo()) || !Fn->doesNotThrow();
// Prepare for frame info.
unsigned FrameLabelId = 0;
.addReg(FramePtr);
NumBytes -= SlotSize;
- if (needsFrameInfo) {
+ if (needsFrameMoves) {
// Mark effective beginning of when frame pointer becomes valid.
FrameLabelId = MMI->NextLabelID();
BuildMI(MBB, MBBI, TII.get(X86::LABEL)).addImm(FrameLabelId).addImm(0);
}
unsigned ReadyLabelId = 0;
- if (needsFrameInfo) {
+ if (needsFrameMoves) {
// Mark effective beginning of when frame pointer is ready.
ReadyLabelId = MMI->NextLabelID();
BuildMI(MBB, MBBI, TII.get(X86::LABEL)).addImm(ReadyLabelId).addImm(0);
}
}
- if (needsFrameInfo) {
+ if (needsFrameMoves) {
std::vector<MachineMove> &Moves = MMI->getFrameMoves();
const TargetData *TD = MF.getTarget().getTargetData();