forked from OSchip/llvm-project
parent
1c3633e461
commit
3f9f250928
|
@ -36,6 +36,7 @@
|
||||||
#include "llvm/ADT/UniqueVector.h"
|
#include "llvm/ADT/UniqueVector.h"
|
||||||
#include "llvm/GlobalValue.h"
|
#include "llvm/GlobalValue.h"
|
||||||
#include "llvm/Pass.h"
|
#include "llvm/Pass.h"
|
||||||
|
#include "llvm/Target/TargetOptions.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
@ -1025,6 +1026,10 @@ public:
|
||||||
///
|
///
|
||||||
bool hasDebugInfo() const { return !CompileUnits.empty(); }
|
bool hasDebugInfo() const { return !CompileUnits.empty(); }
|
||||||
|
|
||||||
|
/// needsFrameInfo - Returns true if we need to gather callee-saved register
|
||||||
|
/// move info for the frame.
|
||||||
|
bool needsFrameInfo() const { return hasDebugInfo() || ExceptionHandling; }
|
||||||
|
|
||||||
/// NextLabelID - Return the next unique label id.
|
/// NextLabelID - Return the next unique label id.
|
||||||
///
|
///
|
||||||
unsigned NextLabelID() {
|
unsigned NextLabelID() {
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
#include "llvm/Target/TargetData.h"
|
#include "llvm/Target/TargetData.h"
|
||||||
#include "llvm/Target/TargetFrameInfo.h"
|
#include "llvm/Target/TargetFrameInfo.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/Target/TargetOptions.h"
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
|
@ -818,7 +818,7 @@ void PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
|
||||||
unsigned TargetAlign = MF.getTarget().getFrameInfo()->getStackAlignment();
|
unsigned TargetAlign = MF.getTarget().getFrameInfo()->getStackAlignment();
|
||||||
unsigned MaxAlign = MFI->getMaxAlignment();
|
unsigned MaxAlign = MFI->getMaxAlignment();
|
||||||
|
|
||||||
if (MMI) {
|
if (MMI && MMI->needsFrameInfo()) {
|
||||||
// Mark effective beginning of when frame pointer becomes valid.
|
// Mark effective beginning of when frame pointer becomes valid.
|
||||||
FrameLabelId = MMI->NextLabelID();
|
FrameLabelId = MMI->NextLabelID();
|
||||||
BuildMI(MBB, MBBI, TII.get(PPC::LABEL)).addImm(FrameLabelId);
|
BuildMI(MBB, MBBI, TII.get(PPC::LABEL)).addImm(FrameLabelId);
|
||||||
|
@ -869,7 +869,7 @@ void PPCRegisterInfo::emitPrologue(MachineFunction &MF) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MMI) {
|
if (MMI && MMI->needsFrameInfo()) {
|
||||||
std::vector<MachineMove> &Moves = MMI->getFrameMoves();
|
std::vector<MachineMove> &Moves = MMI->getFrameMoves();
|
||||||
|
|
||||||
if (NegFrameSize) {
|
if (NegFrameSize) {
|
||||||
|
|
|
@ -1022,7 +1022,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MMI) {
|
if (MMI && MMI->needsFrameInfo()) {
|
||||||
// Mark effective beginning of when frame pointer becomes valid.
|
// Mark effective beginning of when frame pointer becomes valid.
|
||||||
FrameLabelId = MMI->NextLabelID();
|
FrameLabelId = MMI->NextLabelID();
|
||||||
BuildMI(MBB, MBBI, TII.get(X86::LABEL)).addImm(FrameLabelId);
|
BuildMI(MBB, MBBI, TII.get(X86::LABEL)).addImm(FrameLabelId);
|
||||||
|
@ -1052,7 +1052,7 @@ void X86RegisterInfo::emitPrologue(MachineFunction &MF) const {
|
||||||
MBB.insert(MBBI, MI);
|
MBB.insert(MBBI, MI);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MMI) {
|
if (MMI && MMI->needsFrameInfo()) {
|
||||||
std::vector<MachineMove> &Moves = MMI->getFrameMoves();
|
std::vector<MachineMove> &Moves = MMI->getFrameMoves();
|
||||||
|
|
||||||
if (NumBytes) {
|
if (NumBytes) {
|
||||||
|
|
Loading…
Reference in New Issue