LLVM  10.0.0svn
Classes | Public Member Functions | List of all members
llvm::MipsCallLowering Class Reference

#include "Target/Mips/MipsCallLowering.h"

Inheritance diagram for llvm::MipsCallLowering:
Inheritance graph
[legend]
Collaboration diagram for llvm::MipsCallLowering:
Collaboration graph
[legend]

Classes

class  MipsHandler
 

Public Member Functions

 MipsCallLowering (const MipsTargetLowering &TLI)
 
bool lowerReturn (MachineIRBuilder &MIRBuilder, const Value *Val, ArrayRef< Register > VRegs) const override
 This hook behaves as the extended lowerReturn function, but for targets that do not support swifterror value promotion. More...
 
bool lowerFormalArguments (MachineIRBuilder &MIRBuilder, const Function &F, ArrayRef< ArrayRef< Register >> VRegs) const override
 This hook must be implemented to lower the incoming (formal) arguments, described by VRegs, for GlobalISel. More...
 
bool lowerCall (MachineIRBuilder &MIRBuilder, CallLoweringInfo &Info) const override
 This hook must be implemented to lower the given call instruction, including argument and return value marshalling. More...
 
- Public Member Functions inherited from llvm::CallLowering
 CallLowering (const TargetLowering *TLI)
 
virtual ~CallLowering ()=default
 
virtual bool supportSwiftError () const
 
virtual bool lowerReturn (MachineIRBuilder &MIRBuilder, const Value *Val, ArrayRef< Register > VRegs, Register SwiftErrorVReg) const
 This hook must be implemented to lower outgoing return values, described by Val, into the specified virtual registers VRegs. More...
 
bool lowerCall (MachineIRBuilder &MIRBuilder, ImmutableCallSite CS, ArrayRef< Register > ResRegs, ArrayRef< ArrayRef< Register >> ArgRegs, Register SwiftErrorVReg, std::function< unsigned()> GetCalleeReg) const
 Lower the given call instruction, including argument and return value marshalling. More...
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::CallLowering
const TargetLoweringgetTLI () const
 Getter for generic TargetLowering class. More...
 
template<class XXXTargetLowering >
const XXXTargetLowering * getTLI () const
 Getter for target specific TargetLowering class. More...
 
template<typename FuncInfoTy >
void setArgFlags (ArgInfo &Arg, unsigned OpIdx, const DataLayout &DL, const FuncInfoTy &FuncInfo) const
 
Register packRegs (ArrayRef< Register > SrcRegs, Type *PackedTy, MachineIRBuilder &MIRBuilder) const
 Generate instructions for packing SrcRegs into one big register corresponding to the aggregate type PackedTy. More...
 
void unpackRegs (ArrayRef< Register > DstRegs, Register SrcReg, Type *PackedTy, MachineIRBuilder &MIRBuilder) const
 Generate instructions for unpacking SrcReg into the DstRegs corresponding to the aggregate type PackedTy. More...
 
bool handleAssignments (MachineIRBuilder &MIRBuilder, SmallVectorImpl< ArgInfo > &Args, ValueHandler &Handler) const
 Invoke Handler::assignArg on each of the given Args and then use Callback to move them to the assigned locations. More...
 
bool handleAssignments (CCState &CCState, SmallVectorImpl< CCValAssign > &ArgLocs, MachineIRBuilder &MIRBuilder, SmallVectorImpl< ArgInfo > &Args, ValueHandler &Handler) const
 
bool analyzeArgInfo (CCState &CCState, SmallVectorImpl< ArgInfo > &Args, CCAssignFn &AssignFnFixed, CCAssignFn &AssignFnVarArg) const
 Analyze passed or returned values from a call, supplied in ArgInfo, incorporating info about the passed values into CCState. More...
 
bool resultsCompatible (CallLoweringInfo &Info, MachineFunction &MF, SmallVectorImpl< ArgInfo > &InArgs, CCAssignFn &CalleeAssignFnFixed, CCAssignFn &CalleeAssignFnVarArg, CCAssignFn &CallerAssignFnFixed, CCAssignFn &CallerAssignFnVarArg) const
 

Detailed Description

Definition at line 23 of file MipsCallLowering.h.

Constructor & Destructor Documentation

◆ MipsCallLowering()

MipsCallLowering::MipsCallLowering ( const MipsTargetLowering TLI)

Member Function Documentation

◆ lowerCall()

bool MipsCallLowering::lowerCall ( MachineIRBuilder MIRBuilder,
CallLoweringInfo Info 
) const
overridevirtual

This hook must be implemented to lower the given call instruction, including argument and return value marshalling.

Returns
true if the lowering succeeded, false otherwise.

Reimplemented from llvm::CallLowering.

Definition at line 537 of file MipsCallLowering.cpp.

References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addRegMask(), llvm::MachineInstrBuilder::addUse(), Arg, llvm::MachineIRBuilder::buildGlobalValue(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildInstrNoInsert(), llvm::CallingConv::C, llvm::CallLowering::CallLoweringInfo::CallConv, llvm::CallLowering::CallLoweringInfo::Callee, llvm::MachineRegisterInfo::createGenericVirtualRegister(), F(), llvm::Function::getCallingConv(), llvm::TargetRegisterInfo::getCallPreservedMask(), llvm::MachineFunction::getDataLayout(), llvm::MachineFunction::getFunction(), llvm::MachineOperand::getGlobal(), llvm::MachineIRBuilder::getMF(), llvm::MachineInstr::getOperand(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::MachineFunction::getTarget(), llvm::GlobalValue::hasLocalLinkage(), llvm::RegState::Implicit, llvm::MachineOperand::isGlobal(), llvm::MachineOperand::isReg(), isSupportedArgumentType(), isSupportedReturnType(), llvm::Type::isVoidTy(), llvm::MipsII::MO_GOT_CALL, llvm::CallLowering::CallLoweringInfo::OrigArgs, llvm::CallLowering::CallLoweringInfo::OrigRet, llvm::LLT::pointer(), llvm::MachineOperand::setTargetFlags(), llvm::SystemZISD::TM, TRI, and llvm::CallLowering::ArgInfo::Ty.

◆ lowerFormalArguments()

bool MipsCallLowering::lowerFormalArguments ( MachineIRBuilder MIRBuilder,
const Function F,
ArrayRef< ArrayRef< Register >>  VRegs 
) const
overridevirtual

This hook must be implemented to lower the incoming (formal) arguments, described by VRegs, for GlobalISel.

Each argument must end up in the related virtual registers described by VRegs. In other words, the first argument should end up in VRegs[0], the second in VRegs[1], and so on. For each argument, there will be one register for each non-aggregate type, as returned by computeValueLLTs. MIRBuilder is set to the proper insertion for the argument lowering.

Returns
True if the lowering succeeded, false otherwise.

Reimplemented from llvm::CallLowering.

Definition at line 453 of file MipsCallLowering.cpp.

References llvm::MachineBasicBlock::addLiveIn(), llvm::alignTo(), Arg, llvm::Function::arg_empty(), llvm::Function::args(), llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildFrameIndex(), llvm::MachineIRBuilder::buildStore(), llvm::MipsTargetLowering::CCAssignFnForCall(), llvm::MachineFrameInfo::CreateFixedObject(), llvm::AttributeList::FirstArgIndex, llvm::ISD::FrameIndex, llvm::MachinePointerInfo::getAddrSpace(), llvm::MipsABIInfo::GetCalleeAllocdArgSizeInBytes(), llvm::Function::getCallingConv(), llvm::Function::getContext(), llvm::MachineFunction::getDataLayout(), llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineIRBuilder::getMBB(), llvm::MachineIRBuilder::getMF(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getTarget(), llvm::MipsABIInfo::GetVarArgRegs(), I, llvm::MipsISD::Ins, isSupportedArgumentType(), llvm::Function::isVarArg(), llvm::MachineMemOperand::MOStore, llvm::LLT::pointer(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), Register, llvm::LLT::scalar(), llvm::CallLowering::setArgFlags(), setLocInfo(), llvm::ArrayRef< T >::size(), and llvm::SystemZISD::TM.

◆ lowerReturn()

bool MipsCallLowering::lowerReturn ( MachineIRBuilder MIRBuilder,
const Value Val,
ArrayRef< Register VRegs 
) const
overridevirtual

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