LLVM 20.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::MipsCCState Class Reference

#include "Target/Mips/MipsCCState.h"

Inheritance diagram for llvm::MipsCCState:
Inheritance graph
[legend]

Public Types

enum  SpecialCallingConvType { Mips16RetHelperConv , NoSpecialCallingConv }
 

Public Member Functions

void PreAnalyzeCallOperand (const Type *ArgTy, bool IsFixed, const char *Func)
 
void PreAnalyzeFormalArgument (const Type *ArgTy, ISD::ArgFlagsTy Flags)
 
void PreAnalyzeReturnValue (EVT ArgVT)
 
 MipsCCState (CallingConv::ID CC, bool isVarArg, MachineFunction &MF, SmallVectorImpl< CCValAssign > &locs, LLVMContext &C, SpecialCallingConvType SpecialCC=NoSpecialCallingConv)
 
void PreAnalyzeCallOperands (const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn, std::vector< TargetLowering::ArgListEntry > &FuncArgs, const char *Func)
 
void AnalyzeCallOperands (const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn, std::vector< TargetLowering::ArgListEntry > &FuncArgs, const char *Func)
 
void AnalyzeCallOperands (const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn)=delete
 
void AnalyzeCallOperands (const SmallVectorImpl< MVT > &Outs, SmallVectorImpl< ISD::ArgFlagsTy > &Flags, CCAssignFn Fn)=delete
 
void PreAnalyzeFormalArguments (const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn Fn)
 
void AnalyzeFormalArguments (const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn Fn)
 
void PreAnalyzeCallResult (const Type *RetTy, const char *Func)
 
void PreAnalyzeCallResult (const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn Fn, const Type *RetTy, const char *Func)
 
void AnalyzeCallResult (const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn Fn, const Type *RetTy, const char *Func)
 
void PreAnalyzeReturn (const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn)
 
void AnalyzeReturn (const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn)
 
bool CheckReturn (const SmallVectorImpl< ISD::OutputArg > &ArgsFlags, CCAssignFn Fn)
 
bool WasOriginalArgF128 (unsigned ValNo)
 
bool WasOriginalArgFloat (unsigned ValNo)
 
bool WasOriginalArgVectorFloat (unsigned ValNo) const
 
bool WasOriginalRetVectorFloat (unsigned ValNo) const
 
bool IsCallOperandFixed (unsigned ValNo)
 
SpecialCallingConvType getSpecialCallingConv ()
 
- Public Member Functions inherited from llvm::CCState
 CCState (CallingConv::ID CC, bool IsVarArg, MachineFunction &MF, SmallVectorImpl< CCValAssign > &Locs, LLVMContext &Context, bool NegativeOffsets=false)
 
void addLoc (const CCValAssign &V)
 
LLVMContextgetContext () const
 
MachineFunctiongetMachineFunction () const
 
CallingConv::ID getCallingConv () const
 
bool isVarArg () const
 
uint64_t getStackSize () const
 Returns the size of the currently allocated portion of the stack.
 
uint64_t getAlignedCallFrameSize () const
 getAlignedCallFrameSize - Return the size of the call frame needed to be able to store all arguments and such that the alignment requirement of each of the arguments is satisfied.
 
bool isAllocated (MCRegister Reg) const
 isAllocated - Return true if the specified register (or an alias) is allocated.
 
void AnalyzeFormalArguments (const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn Fn)
 AnalyzeFormalArguments - Analyze an array of argument values, incorporating info about the formals into this state.
 
void AnalyzeArguments (const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn Fn)
 The function will invoke AnalyzeFormalArguments.
 
void AnalyzeReturn (const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn)
 AnalyzeReturn - Analyze the returned values of a return, incorporating info about the result values into this state.
 
bool CheckReturn (const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn)
 CheckReturn - Analyze the return values of a function, returning true if the return can be performed without sret-demotion, and false otherwise.
 
void AnalyzeCallOperands (const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn)
 AnalyzeCallOperands - Analyze the outgoing arguments to a call, incorporating info about the passed values into this state.
 
void AnalyzeCallOperands (SmallVectorImpl< MVT > &ArgVTs, SmallVectorImpl< ISD::ArgFlagsTy > &Flags, CCAssignFn Fn)
 AnalyzeCallOperands - Same as above except it takes vectors of types and argument flags.
 
void AnalyzeArguments (const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn)
 The function will invoke AnalyzeCallOperands.
 
void AnalyzeCallResult (const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn Fn)
 AnalyzeCallResult - Analyze the return values of a call, incorporating info about the passed values into this state.
 
bool IsShadowAllocatedReg (MCRegister Reg) const
 A shadow allocated register is a register that was allocated but wasn't added to the location list (Locs).
 
void AnalyzeCallResult (MVT VT, CCAssignFn Fn)
 AnalyzeCallResult - Same as above except it's specialized for calls which produce a single value.
 
unsigned getFirstUnallocated (ArrayRef< MCPhysReg > Regs) const
 getFirstUnallocated - Return the index of the first unallocated register in the set, or Regs.size() if they are all allocated.
 
void DeallocateReg (MCPhysReg Reg)
 
MCRegister AllocateReg (MCPhysReg Reg)
 AllocateReg - Attempt to allocate one register.
 
MCRegister AllocateReg (MCPhysReg Reg, MCPhysReg ShadowReg)
 Version of AllocateReg with extra register to be shadowed.
 
MCPhysReg AllocateReg (ArrayRef< MCPhysReg > Regs)
 AllocateReg - Attempt to allocate one of the specified registers.
 
MCPhysReg AllocateRegBlock (ArrayRef< MCPhysReg > Regs, unsigned RegsRequired)
 AllocateRegBlock - Attempt to allocate a block of RegsRequired consecutive registers.
 
MCRegister AllocateReg (ArrayRef< MCPhysReg > Regs, const MCPhysReg *ShadowRegs)
 Version of AllocateReg with list of registers to be shadowed.
 
int64_t AllocateStack (unsigned Size, Align Alignment)
 AllocateStack - Allocate a chunk of stack space with the specified size and alignment.
 
void ensureMaxAlignment (Align Alignment)
 
int64_t AllocateStack (unsigned Size, Align Alignment, ArrayRef< MCPhysReg > ShadowRegs)
 Version of AllocateStack with list of extra registers to be shadowed.
 
void HandleByVal (unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, int MinSize, Align MinAlign, ISD::ArgFlagsTy ArgFlags)
 Allocate space on the stack large enough to pass an argument by value.
 
unsigned getInRegsParamsCount () const
 
unsigned getInRegsParamsProcessed () const
 
void getInRegsParamInfo (unsigned InRegsParamRecordIndex, unsigned &BeginReg, unsigned &EndReg) const
 
void addInRegsParamInfo (unsigned RegBegin, unsigned RegEnd)
 
bool nextInRegsParam ()
 
void clearByValRegsInfo ()
 
void rewindByValRegsInfo ()
 
SmallVectorImpl< CCValAssign > & getPendingLocs ()
 
SmallVectorImpl< ISD::ArgFlagsTy > & getPendingArgFlags ()
 
void getRemainingRegParmsForType (SmallVectorImpl< MCPhysReg > &Regs, MVT VT, CCAssignFn Fn)
 Compute the remaining unused register parameters that would be used for the given value type.
 
void analyzeMustTailForwardedRegisters (SmallVectorImpl< ForwardedRegister > &Forwards, ArrayRef< MVT > RegParmTypes, CCAssignFn Fn)
 Compute the set of registers that need to be preserved and forwarded to any musttail calls.
 
template<class T >
void AnalyzeArgumentsSecondPass (const SmallVectorImpl< T > &Args, CCAssignFn Fn)
 The function runs an additional analysis pass over function arguments.
 

Static Public Member Functions

static SpecialCallingConvType getSpecialCallingConvForCallee (const SDNode *Callee, const MipsSubtarget &Subtarget)
 Determine the SpecialCallingConvType for the given callee.
 
static bool isF128SoftLibCall (const char *CallSym)
 This function returns true if CallSym is a long double emulation routine.
 
static bool originalTypeIsF128 (const Type *Ty, const char *Func)
 This function returns true if Ty is fp128, {f128} or i128 which was originally a fp128.
 
static bool originalEVTTypeIsVectorFloat (EVT Ty)
 Return true if the original type was vXfXX.
 
static bool originalTypeIsVectorFloat (const Type *Ty)
 Return true if the original type was vXfXX / vXfXX.
 
- Static Public Member Functions inherited from llvm::CCState
static bool resultsCompatible (CallingConv::ID CalleeCC, CallingConv::ID CallerCC, MachineFunction &MF, LLVMContext &C, const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn CalleeFn, CCAssignFn CallerFn)
 Returns true if the results of the two calling conventions are compatible.
 

Detailed Description

Definition at line 20 of file MipsCCState.h.

Member Enumeration Documentation

◆ SpecialCallingConvType

Enumerator
Mips16RetHelperConv 
NoSpecialCallingConv 

Definition at line 22 of file MipsCCState.h.

Constructor & Destructor Documentation

◆ MipsCCState()

llvm::MipsCCState::MipsCCState ( CallingConv::ID  CC,
bool  isVarArg,
MachineFunction MF,
SmallVectorImpl< CCValAssign > &  locs,
LLVMContext C,
SpecialCallingConvType  SpecialCC = NoSpecialCallingConv 
)
inline

Definition at line 98 of file MipsCCState.h.

Member Function Documentation

◆ AnalyzeCallOperands() [1/3]

void llvm::MipsCCState::AnalyzeCallOperands ( const SmallVectorImpl< ISD::OutputArg > &  Outs,
CCAssignFn  Fn 
)
delete

◆ AnalyzeCallOperands() [2/3]

void llvm::MipsCCState::AnalyzeCallOperands ( const SmallVectorImpl< ISD::OutputArg > &  Outs,
CCAssignFn  Fn,
std::vector< TargetLowering::ArgListEntry > &  FuncArgs,
const char Func 
)
inline

Definition at line 114 of file MipsCCState.h.

References llvm::CCState::AnalyzeCallOperands().

◆ AnalyzeCallOperands() [3/3]

void llvm::MipsCCState::AnalyzeCallOperands ( const SmallVectorImpl< MVT > &  Outs,
SmallVectorImpl< ISD::ArgFlagsTy > &  Flags,
CCAssignFn  Fn 
)
delete

◆ AnalyzeCallResult()

void llvm::MipsCCState::AnalyzeCallResult ( const SmallVectorImpl< ISD::InputArg > &  Ins,
CCAssignFn  Fn,
const Type RetTy,
const char Func 
)
inline

Definition at line 161 of file MipsCCState.h.

References llvm::CCState::AnalyzeCallResult(), PreAnalyzeCallResult(), and RetTy.

◆ AnalyzeFormalArguments()

void llvm::MipsCCState::AnalyzeFormalArguments ( const SmallVectorImpl< ISD::InputArg > &  Ins,
CCAssignFn  Fn 
)
inline

◆ AnalyzeReturn()

void llvm::MipsCCState::AnalyzeReturn ( const SmallVectorImpl< ISD::OutputArg > &  Outs,
CCAssignFn  Fn 
)
inline

Definition at line 177 of file MipsCCState.h.

References llvm::CCState::AnalyzeReturn(), and PreAnalyzeReturn().

◆ CheckReturn()

bool llvm::MipsCCState::CheckReturn ( const SmallVectorImpl< ISD::OutputArg > &  ArgsFlags,
CCAssignFn  Fn 
)
inline

◆ getSpecialCallingConv()

SpecialCallingConvType llvm::MipsCCState::getSpecialCallingConv ( )
inline

Definition at line 205 of file MipsCCState.h.

◆ getSpecialCallingConvForCallee()

MipsCCState::SpecialCallingConvType MipsCCState::getSpecialCallingConvForCallee ( const SDNode Callee,
const MipsSubtarget Subtarget 
)
static

Determine the SpecialCallingConvType for the given callee.

Definition at line 70 of file MipsCCState.cpp.

References F, G, llvm::MipsSubtarget::inMips16HardFloat(), Mips16RetHelperConv, NoSpecialCallingConv, and Sym.

◆ IsCallOperandFixed()

bool llvm::MipsCCState::IsCallOperandFixed ( unsigned  ValNo)
inline

Definition at line 204 of file MipsCCState.h.

◆ isF128SoftLibCall()

bool MipsCCState::isF128SoftLibCall ( const char CallSym)
static

This function returns true if CallSym is a long double emulation routine.

FIXME: Changing the ABI based on the callee name is unsound. The lib func address could be captured.

Definition at line 15 of file MipsCCState.cpp.

References assert(), llvm::is_sorted(), and S1.

Referenced by originalTypeIsF128().

◆ originalEVTTypeIsVectorFloat()

bool MipsCCState::originalEVTTypeIsVectorFloat ( EVT  Ty)
static

Return true if the original type was vXfXX.

Definition at line 54 of file MipsCCState.cpp.

References llvm::EVT::getVectorElementType(), llvm::EVT::isFloatingPoint(), and llvm::EVT::isVector().

Referenced by PreAnalyzeReturnValue().

◆ originalTypeIsF128()

bool MipsCCState::originalTypeIsF128 ( const Type Ty,
const char Func 
)
static

This function returns true if Ty is fp128, {f128} or i128 which was originally a fp128.

Definition at line 39 of file MipsCCState.cpp.

References llvm::Type::getStructElementType(), llvm::Type::getStructNumElements(), isF128SoftLibCall(), llvm::Type::isFP128Ty(), llvm::Type::isIntegerTy(), and llvm::Type::isStructTy().

Referenced by PreAnalyzeCallOperand(), PreAnalyzeCallResult(), and PreAnalyzeFormalArgument().

◆ originalTypeIsVectorFloat()

bool MipsCCState::originalTypeIsVectorFloat ( const Type Ty)
static

Return true if the original type was vXfXX / vXfXX.

Definition at line 62 of file MipsCCState.cpp.

References llvm::Type::isFPOrFPVectorTy(), and llvm::Type::isVectorTy().

Referenced by PreAnalyzeCallResult().

◆ PreAnalyzeCallOperand()

void MipsCCState::PreAnalyzeCallOperand ( const Type ArgTy,
bool  IsFixed,
const char Func 
)

◆ PreAnalyzeCallOperands()

void llvm::MipsCCState::PreAnalyzeCallOperands ( const SmallVectorImpl< ISD::OutputArg > &  Outs,
CCAssignFn  Fn,
std::vector< TargetLowering::ArgListEntry > &  FuncArgs,
const char Func 
)
inline

Definition at line 103 of file MipsCCState.h.

References llvm::SmallVectorImpl< T >::clear().

◆ PreAnalyzeCallResult() [1/2]

void llvm::MipsCCState::PreAnalyzeCallResult ( const SmallVectorImpl< ISD::InputArg > &  Ins,
CCAssignFn  Fn,
const Type RetTy,
const char Func 
)
inline

Definition at line 151 of file MipsCCState.h.

References llvm::SmallVectorImpl< T >::clear(), and RetTy.

◆ PreAnalyzeCallResult() [2/2]

void llvm::MipsCCState::PreAnalyzeCallResult ( const Type RetTy,
const char Func 
)
inline

◆ PreAnalyzeFormalArgument()

void MipsCCState::PreAnalyzeFormalArgument ( const Type ArgTy,
ISD::ArgFlagsTy  Flags 
)

◆ PreAnalyzeFormalArguments()

void llvm::MipsCCState::PreAnalyzeFormalArguments ( const SmallVectorImpl< ISD::InputArg > &  Ins,
CCAssignFn  Fn 
)
inline

Definition at line 131 of file MipsCCState.h.

References llvm::SmallVectorImpl< T >::clear().

Referenced by AnalyzeFormalArguments().

◆ PreAnalyzeReturn()

void llvm::MipsCCState::PreAnalyzeReturn ( const SmallVectorImpl< ISD::OutputArg > &  Outs,
CCAssignFn  Fn 
)
inline

Definition at line 168 of file MipsCCState.h.

References llvm::SmallVectorImpl< T >::clear().

Referenced by AnalyzeReturn().

◆ PreAnalyzeReturnValue()

void MipsCCState::PreAnalyzeReturnValue ( EVT  ArgVT)

◆ WasOriginalArgF128()

bool llvm::MipsCCState::WasOriginalArgF128 ( unsigned  ValNo)
inline

Definition at line 194 of file MipsCCState.h.

◆ WasOriginalArgFloat()

bool llvm::MipsCCState::WasOriginalArgFloat ( unsigned  ValNo)
inline

Definition at line 195 of file MipsCCState.h.

◆ WasOriginalArgVectorFloat()

bool llvm::MipsCCState::WasOriginalArgVectorFloat ( unsigned  ValNo) const
inline

Definition at line 198 of file MipsCCState.h.

Referenced by CC_MipsO32().

◆ WasOriginalRetVectorFloat()

bool llvm::MipsCCState::WasOriginalRetVectorFloat ( unsigned  ValNo) const
inline

Definition at line 201 of file MipsCCState.h.


The documentation for this class was generated from the following files: