rename X86FunctionInfo to X86MachineFunctionInfo to match the header file

it is defined in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36196 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-04-17 17:21:52 +00:00
parent 57fc00d5cf
commit d15dff24c6
7 changed files with 23 additions and 21 deletions

View File

@ -92,7 +92,7 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
// Populate function information map. Actually, We don't want to populate // Populate function information map. Actually, We don't want to populate
// non-stdcall or non-fastcall functions' information right now. // non-stdcall or non-fastcall functions' information right now.
if (CC == CallingConv::X86_StdCall || CC == CallingConv::X86_FastCall) if (CC == CallingConv::X86_StdCall || CC == CallingConv::X86_FastCall)
FunctionInfoMap[F] = *MF.getInfo<X86FunctionInfo>(); FunctionInfoMap[F] = *MF.getInfo<X86MachineFunctionInfo>();
X86SharedAsmPrinter::decorateName(CurrentFnName, F); X86SharedAsmPrinter::decorateName(CurrentFnName, F);

View File

@ -32,9 +32,9 @@
#include "llvm/Target/TargetOptions.h" #include "llvm/Target/TargetOptions.h"
using namespace llvm; using namespace llvm;
static X86FunctionInfo calculateFunctionInfo(const Function *F, static X86MachineFunctionInfo calculateFunctionInfo(const Function *F,
const TargetData *TD) { const TargetData *TD) {
X86FunctionInfo Info; X86MachineFunctionInfo Info;
uint64_t Size = 0; uint64_t Size = 0;
switch (F->getCallingConv()) { switch (F->getCallingConv()) {
@ -77,7 +77,7 @@ void X86SharedAsmPrinter::decorateName(std::string &Name,
FMFInfoMap::const_iterator info_item = FunctionInfoMap.find(F); FMFInfoMap::const_iterator info_item = FunctionInfoMap.find(F);
const X86FunctionInfo *Info; const X86MachineFunctionInfo *Info;
if (info_item == FunctionInfoMap.end()) { if (info_item == FunctionInfoMap.end()) {
// Calculate apropriate function info and populate map // Calculate apropriate function info and populate map
FunctionInfoMap[F] = calculateFunctionInfo(F, TM.getTargetData()); FunctionInfoMap[F] = calculateFunctionInfo(F, TM.getTargetData());

View File

@ -48,7 +48,7 @@ struct VISIBILITY_HIDDEN X86SharedAsmPrinter : public AsmPrinter {
// //
// This structure is using e.g. for name decoration for stdcall & fastcall'ed // This structure is using e.g. for name decoration for stdcall & fastcall'ed
// function, since we have to use arguments' size for decoration. // 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; FMFInfoMap FunctionInfoMap;
void decorateName(std::string& Name, const GlobalValue* GV); void decorateName(std::string& Name, const GlobalValue* GV);

View File

@ -729,7 +729,8 @@ SDOperand X86TargetLowering::LowerCCCArguments(SDOperand Op, SelectionDAG &DAG,
RegSaveFrameIndex = 0xAAAAAAA; // X86-64 only. RegSaveFrameIndex = 0xAAAAAAA; // X86-64 only.
ReturnAddrIndex = 0; // No return address slot generated yet. 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 the new list of results.
return DAG.getNode(ISD::MERGE_VALUES, Op.Val->getVTList(), 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. BytesToPopOnReturn = StackSize; // Callee pops all stack arguments.
BytesCallerReserves = 0; BytesCallerReserves = 0;
MF.getInfo<X86FunctionInfo>()->setBytesToPopOnReturn(BytesToPopOnReturn); MF.getInfo<X86MachineFunctionInfo>()
->setBytesToPopOnReturn(BytesToPopOnReturn);
// Return the new list of results. // Return the new list of results.
return DAG.getNode(ISD::MERGE_VALUES, Op.Val->getVTList(), return DAG.getNode(ISD::MERGE_VALUES, Op.Val->getVTList(),
@ -3441,7 +3443,7 @@ X86TargetLowering::LowerFORMAL_ARGUMENTS(SDOperand Op, SelectionDAG &DAG) {
if (Fn->hasExternalLinkage() && if (Fn->hasExternalLinkage() &&
Subtarget->isTargetCygMing() && Subtarget->isTargetCygMing() &&
Fn->getName() == "main") Fn->getName() == "main")
MF.getInfo<X86FunctionInfo>()->setForceFramePointer(true); MF.getInfo<X86MachineFunctionInfo>()->setForceFramePointer(true);
unsigned CC = cast<ConstantSDNode>(Op.getOperand(1))->getValue(); unsigned CC = cast<ConstantSDNode>(Op.getOperand(1))->getValue();
if (Subtarget->is64Bit()) if (Subtarget->is64Bit())
@ -3457,10 +3459,10 @@ X86TargetLowering::LowerFORMAL_ARGUMENTS(SDOperand Op, SelectionDAG &DAG) {
case CallingConv::C: case CallingConv::C:
return LowerCCCArguments(Op, DAG); return LowerCCCArguments(Op, DAG);
case CallingConv::X86_StdCall: case CallingConv::X86_StdCall:
MF.getInfo<X86FunctionInfo>()->setDecorationStyle(StdCall); MF.getInfo<X86MachineFunctionInfo>()->setDecorationStyle(StdCall);
return LowerCCCArguments(Op, DAG, true); return LowerCCCArguments(Op, DAG, true);
case CallingConv::X86_FastCall: case CallingConv::X86_FastCall:
MF.getInfo<X86FunctionInfo>()->setDecorationStyle(FastCall); MF.getInfo<X86MachineFunctionInfo>()->setDecorationStyle(FastCall);
return LowerFastCCArguments(Op, DAG); return LowerFastCCArguments(Op, DAG);
} }
} }

View File

@ -51,7 +51,7 @@ bool X86IntelAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
// Populate function information map. Actually, We don't want to populate // Populate function information map. Actually, We don't want to populate
// non-stdcall or non-fastcall functions' information right now. // non-stdcall or non-fastcall functions' information right now.
if (CC == CallingConv::X86_StdCall || CC == CallingConv::X86_FastCall) if (CC == CallingConv::X86_StdCall || CC == CallingConv::X86_FastCall)
FunctionInfoMap[F] = *MF.getInfo<X86FunctionInfo>(); FunctionInfoMap[F] = *MF.getInfo<X86MachineFunctionInfo>();
X86SharedAsmPrinter::decorateName(CurrentFnName, F); X86SharedAsmPrinter::decorateName(CurrentFnName, F);

View File

@ -24,9 +24,9 @@ enum NameDecorationStyle {
FastCall FastCall
}; };
/// X86FunctionInfo - This class is derived from MachineFunction private /// X86MachineFunctionInfo - This class is derived from MachineFunction private
/// X86 target-specific information for each MachineFunction. /// 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 /// ForceFramePointer - True if the function is required to use of frame
/// pointer for reasons other than it containing dynamic allocation or /// pointer for reasons other than it containing dynamic allocation or
/// that FP eliminatation is turned off. For example, Cygwin main function /// that FP eliminatation is turned off. For example, Cygwin main function
@ -42,13 +42,13 @@ class X86FunctionInfo : public MachineFunctionInfo {
NameDecorationStyle DecorationStyle; NameDecorationStyle DecorationStyle;
public: public:
X86FunctionInfo() : ForceFramePointer(false), X86MachineFunctionInfo() : ForceFramePointer(false),
BytesToPopOnReturn(0), BytesToPopOnReturn(0),
DecorationStyle(None) {} DecorationStyle(None) {}
X86FunctionInfo(MachineFunction &MF) : ForceFramePointer(false), X86MachineFunctionInfo(MachineFunction &MF) : ForceFramePointer(false),
BytesToPopOnReturn(0), BytesToPopOnReturn(0),
DecorationStyle(None) {} DecorationStyle(None) {}
bool getForceFramePointer() const { return ForceFramePointer;} bool getForceFramePointer() const { return ForceFramePointer;}
void setForceFramePointer(bool forceFP) { ForceFramePointer = forceFP; } void setForceFramePointer(bool forceFP) { ForceFramePointer = forceFP; }

View File

@ -927,7 +927,7 @@ BitVector X86RegisterInfo::getReservedRegs(const MachineFunction &MF) const {
bool X86RegisterInfo::hasFP(const MachineFunction &MF) const { bool X86RegisterInfo::hasFP(const MachineFunction &MF) const {
return (NoFramePointerElim || return (NoFramePointerElim ||
MF.getFrameInfo()->hasVarSizedObjects() || MF.getFrameInfo()->hasVarSizedObjects() ||
MF.getInfo<X86FunctionInfo>()->getForceFramePointer()); MF.getInfo<X86MachineFunctionInfo>()->getForceFramePointer());
} }
void X86RegisterInfo:: void X86RegisterInfo::