mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
rename X86FunctionInfo to X86MachineFunctionInfo to match the header file
it is defined in. llvm-svn: 36196
This commit is contained in:
parent
9bc4b792bf
commit
c7109ece27
@ -92,7 +92,7 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
// Populate function information map. Actually, We don't want to populate
|
||||
// non-stdcall or non-fastcall functions' information right now.
|
||||
if (CC == CallingConv::X86_StdCall || CC == CallingConv::X86_FastCall)
|
||||
FunctionInfoMap[F] = *MF.getInfo<X86FunctionInfo>();
|
||||
FunctionInfoMap[F] = *MF.getInfo<X86MachineFunctionInfo>();
|
||||
|
||||
X86SharedAsmPrinter::decorateName(CurrentFnName, F);
|
||||
|
||||
|
@ -32,9 +32,9 @@
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
using namespace llvm;
|
||||
|
||||
static X86FunctionInfo calculateFunctionInfo(const Function *F,
|
||||
const TargetData *TD) {
|
||||
X86FunctionInfo Info;
|
||||
static X86MachineFunctionInfo calculateFunctionInfo(const Function *F,
|
||||
const TargetData *TD) {
|
||||
X86MachineFunctionInfo Info;
|
||||
uint64_t Size = 0;
|
||||
|
||||
switch (F->getCallingConv()) {
|
||||
@ -77,7 +77,7 @@ void X86SharedAsmPrinter::decorateName(std::string &Name,
|
||||
|
||||
FMFInfoMap::const_iterator info_item = FunctionInfoMap.find(F);
|
||||
|
||||
const X86FunctionInfo *Info;
|
||||
const X86MachineFunctionInfo *Info;
|
||||
if (info_item == FunctionInfoMap.end()) {
|
||||
// Calculate apropriate function info and populate map
|
||||
FunctionInfoMap[F] = calculateFunctionInfo(F, TM.getTargetData());
|
||||
|
@ -48,7 +48,7 @@ struct VISIBILITY_HIDDEN X86SharedAsmPrinter : public AsmPrinter {
|
||||
//
|
||||
// This structure is using e.g. for name decoration for stdcall & fastcall'ed
|
||||
// function, since we have to use arguments' size for decoration.
|
||||
typedef std::map<const Function*, X86FunctionInfo> FMFInfoMap;
|
||||
typedef std::map<const Function*, X86MachineFunctionInfo> FMFInfoMap;
|
||||
FMFInfoMap FunctionInfoMap;
|
||||
|
||||
void decorateName(std::string& Name, const GlobalValue* GV);
|
||||
|
@ -729,7 +729,8 @@ SDOperand X86TargetLowering::LowerCCCArguments(SDOperand Op, SelectionDAG &DAG,
|
||||
RegSaveFrameIndex = 0xAAAAAAA; // X86-64 only.
|
||||
ReturnAddrIndex = 0; // No return address slot generated yet.
|
||||
|
||||
MF.getInfo<X86FunctionInfo>()->setBytesToPopOnReturn(BytesToPopOnReturn);
|
||||
MF.getInfo<X86MachineFunctionInfo>()
|
||||
->setBytesToPopOnReturn(BytesToPopOnReturn);
|
||||
|
||||
// Return the new list of results.
|
||||
return DAG.getNode(ISD::MERGE_VALUES, Op.Val->getVTList(),
|
||||
@ -973,7 +974,8 @@ X86TargetLowering::LowerFastCCArguments(SDOperand Op, SelectionDAG &DAG) {
|
||||
BytesToPopOnReturn = StackSize; // Callee pops all stack arguments.
|
||||
BytesCallerReserves = 0;
|
||||
|
||||
MF.getInfo<X86FunctionInfo>()->setBytesToPopOnReturn(BytesToPopOnReturn);
|
||||
MF.getInfo<X86MachineFunctionInfo>()
|
||||
->setBytesToPopOnReturn(BytesToPopOnReturn);
|
||||
|
||||
// Return the new list of results.
|
||||
return DAG.getNode(ISD::MERGE_VALUES, Op.Val->getVTList(),
|
||||
@ -3441,7 +3443,7 @@ X86TargetLowering::LowerFORMAL_ARGUMENTS(SDOperand Op, SelectionDAG &DAG) {
|
||||
if (Fn->hasExternalLinkage() &&
|
||||
Subtarget->isTargetCygMing() &&
|
||||
Fn->getName() == "main")
|
||||
MF.getInfo<X86FunctionInfo>()->setForceFramePointer(true);
|
||||
MF.getInfo<X86MachineFunctionInfo>()->setForceFramePointer(true);
|
||||
|
||||
unsigned CC = cast<ConstantSDNode>(Op.getOperand(1))->getValue();
|
||||
if (Subtarget->is64Bit())
|
||||
@ -3457,10 +3459,10 @@ X86TargetLowering::LowerFORMAL_ARGUMENTS(SDOperand Op, SelectionDAG &DAG) {
|
||||
case CallingConv::C:
|
||||
return LowerCCCArguments(Op, DAG);
|
||||
case CallingConv::X86_StdCall:
|
||||
MF.getInfo<X86FunctionInfo>()->setDecorationStyle(StdCall);
|
||||
MF.getInfo<X86MachineFunctionInfo>()->setDecorationStyle(StdCall);
|
||||
return LowerCCCArguments(Op, DAG, true);
|
||||
case CallingConv::X86_FastCall:
|
||||
MF.getInfo<X86FunctionInfo>()->setDecorationStyle(FastCall);
|
||||
MF.getInfo<X86MachineFunctionInfo>()->setDecorationStyle(FastCall);
|
||||
return LowerFastCCArguments(Op, DAG);
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ bool X86IntelAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
// Populate function information map. Actually, We don't want to populate
|
||||
// non-stdcall or non-fastcall functions' information right now.
|
||||
if (CC == CallingConv::X86_StdCall || CC == CallingConv::X86_FastCall)
|
||||
FunctionInfoMap[F] = *MF.getInfo<X86FunctionInfo>();
|
||||
FunctionInfoMap[F] = *MF.getInfo<X86MachineFunctionInfo>();
|
||||
|
||||
X86SharedAsmPrinter::decorateName(CurrentFnName, F);
|
||||
|
||||
|
@ -24,9 +24,9 @@ enum NameDecorationStyle {
|
||||
FastCall
|
||||
};
|
||||
|
||||
/// X86FunctionInfo - This class is derived from MachineFunction private
|
||||
/// X86MachineFunctionInfo - This class is derived from MachineFunction private
|
||||
/// X86 target-specific information for each MachineFunction.
|
||||
class X86FunctionInfo : public MachineFunctionInfo {
|
||||
class X86MachineFunctionInfo : public MachineFunctionInfo {
|
||||
/// ForceFramePointer - True if the function is required to use of frame
|
||||
/// pointer for reasons other than it containing dynamic allocation or
|
||||
/// that FP eliminatation is turned off. For example, Cygwin main function
|
||||
@ -42,13 +42,13 @@ class X86FunctionInfo : public MachineFunctionInfo {
|
||||
NameDecorationStyle DecorationStyle;
|
||||
|
||||
public:
|
||||
X86FunctionInfo() : ForceFramePointer(false),
|
||||
BytesToPopOnReturn(0),
|
||||
DecorationStyle(None) {}
|
||||
X86MachineFunctionInfo() : ForceFramePointer(false),
|
||||
BytesToPopOnReturn(0),
|
||||
DecorationStyle(None) {}
|
||||
|
||||
X86FunctionInfo(MachineFunction &MF) : ForceFramePointer(false),
|
||||
BytesToPopOnReturn(0),
|
||||
DecorationStyle(None) {}
|
||||
X86MachineFunctionInfo(MachineFunction &MF) : ForceFramePointer(false),
|
||||
BytesToPopOnReturn(0),
|
||||
DecorationStyle(None) {}
|
||||
|
||||
bool getForceFramePointer() const { return ForceFramePointer;}
|
||||
void setForceFramePointer(bool forceFP) { ForceFramePointer = forceFP; }
|
||||
|
@ -927,7 +927,7 @@ BitVector X86RegisterInfo::getReservedRegs(const MachineFunction &MF) const {
|
||||
bool X86RegisterInfo::hasFP(const MachineFunction &MF) const {
|
||||
return (NoFramePointerElim ||
|
||||
MF.getFrameInfo()->hasVarSizedObjects() ||
|
||||
MF.getInfo<X86FunctionInfo>()->getForceFramePointer());
|
||||
MF.getInfo<X86MachineFunctionInfo>()->getForceFramePointer());
|
||||
}
|
||||
|
||||
void X86RegisterInfo::
|
||||
|
Loading…
Reference in New Issue
Block a user