LLVM
8.0.1
|
#include "Target/Mips/MipsCallLowering.h"
Classes | |
class | MipsHandler |
Public Member Functions | |
MipsCallLowering (const MipsTargetLowering &TLI) | |
bool | lowerReturn (MachineIRBuilder &MIRBuilder, const Value *Val, ArrayRef< unsigned > VRegs) const override |
This hook must be implemented to lower outgoing return values, described by Val , into the specified virtual registers VRegs . More... | |
bool | lowerFormalArguments (MachineIRBuilder &MIRBuilder, const Function &F, ArrayRef< unsigned > VRegs) const override |
This hook must be implemented to lower the incoming (formal) arguments, described by Args , for GlobalISel. More... | |
bool | lowerCall (MachineIRBuilder &MIRBuilder, CallingConv::ID CallConv, const MachineOperand &Callee, const ArgInfo &OrigRet, ArrayRef< ArgInfo > OrigArgs) 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 |
bool | lowerCall (MachineIRBuilder &MIRBuilder, ImmutableCallSite CS, unsigned ResReg, ArrayRef< unsigned > ArgRegs, 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 TargetLowering * | getTLI () 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 |
bool | handleAssignments (MachineIRBuilder &MIRBuilder, ArrayRef< 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... | |
Definition at line 24 of file MipsCallLowering.h.
MipsCallLowering::MipsCallLowering | ( | const MipsTargetLowering & | TLI | ) |
Definition at line 24 of file MipsCallLowering.cpp.
References llvm::CCValAssign::isMemLoc(), and llvm::CCValAssign::isRegLoc().
|
overridevirtual |
This hook must be implemented to lower the given call instruction, including argument and return value marshalling.
CallConv
is the calling convention to be used for the call.
Callee
is the destination of the call. It should be either a register, globaladdress, or externalsymbol.
ResTy
is the type returned by the function
ResReg
is the generic virtual register that the returned value should be lowered into.
ArgTys
is a list of the types each member of ArgRegs
has; used by the target to decide which register/stack slot should be allocated.
ArgRegs
is a list of virtual registers containing each argument that needs to be passed.
Reimplemented from llvm::CallLowering.
Definition at line 432 of file MipsCallLowering.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addRegMask(), llvm::alignTo(), llvm::CCState::AllocateStack(), llvm::MipsCCState::AnalyzeCallResult(), Arg, llvm::AMDGPU::HSAMD::Kernel::Key::Args, llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildInstrNoInsert(), llvm::CallingConv::C, llvm::MipsTargetLowering::CCAssignFnForCall(), llvm::MipsTargetLowering::CCAssignFnForReturn(), llvm::SmallVectorImpl< T >::clear(), llvm::SmallVectorImpl< T >::emplace_back(), F(), llvm::MipsTargetLowering::getABIAlignmentForCallingConv(), llvm::MipsABIInfo::GetCalleeAllocdArgSizeInBytes(), llvm::Function::getCallingConv(), llvm::TargetRegisterInfo::getCallPreservedMask(), llvm::Function::getContext(), llvm::Module::getDataLayout(), llvm::TargetSubtargetInfo::getFrameLowering(), llvm::MachineFunction::getFunction(), llvm::MachineIRBuilder::getMF(), llvm::MipsTargetLowering::getNumRegistersForCallingConv(), llvm::GlobalValue::getParent(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MipsTargetLowering::getRegisterTypeForCallingConv(), llvm::TargetFrameLowering::getStackAlignment(), llvm::MachineFunction::getSubtarget(), llvm::MachineOperand::getSymbolName(), llvm::MachineFunction::getTarget(), llvm::TargetLoweringBase::getValueType(), llvm::RegState::Implicit, llvm::MipsISD::Ins, llvm::MachineIRBuilder::insertInstr(), llvm::MachineOperand::isReg(), isSupportedType(), llvm::MachineOperand::isSymbol(), llvm::Function::isVarArg(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::CallLowering::ArgInfo::Reg, setLocInfo(), llvm::ISD::ArgFlagsTy::setOrigAlign(), llvm::SystemZISD::TM, TRI, llvm::CallLowering::ArgInfo::Ty, and llvm::TargetLoweringBase::ArgListEntry::Ty.
|
overridevirtual |
This hook must be implemented to lower the incoming (formal) arguments, described by Args
, for GlobalISel.
Each argument must end up in the related virtual register described by VRegs. In other words, the first argument should end up in VRegs[0], the second in VRegs[1], and so on. MIRBuilder
is set to the proper insertion for the argument lowering.
Reimplemented from llvm::CallLowering.
Definition at line 379 of file MipsCallLowering.cpp.
References Arg, llvm::Function::arg_empty(), llvm::Function::args(), llvm::MipsTargetLowering::CCAssignFnForCall(), llvm::AttributeList::FirstArgIndex, llvm::MipsABIInfo::GetCalleeAllocdArgSizeInBytes(), llvm::Function::getCallingConv(), llvm::Function::getContext(), llvm::MachineFunction::getDataLayout(), llvm::MachineIRBuilder::getMF(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getTarget(), llvm::Value::getType(), llvm::MipsISD::Ins, isSupportedType(), llvm::Function::isVarArg(), llvm::CallLowering::setArgFlags(), setLocInfo(), and llvm::SystemZISD::TM.
|
overridevirtual |
This hook must be implemented to lower outgoing return values, described by Val
, into the specified virtual registers VRegs
.
This hook is used by GlobalISel.
Reimplemented from llvm::CallLowering.
Definition at line 331 of file MipsCallLowering.cpp.
References llvm::MipsCCState::AnalyzeReturn(), assert(), llvm::MachineIRBuilder::buildInstrNoInsert(), llvm::MipsTargetLowering::CCAssignFnForReturn(), llvm::ComputeValueVTs(), llvm::ArrayRef< T >::empty(), F(), llvm::Function::getCallingConv(), llvm::Type::getContext(), llvm::Function::getContext(), llvm::MachineFunction::getDataLayout(), llvm::MachineFunction::getFunction(), llvm::MachineIRBuilder::getMF(), llvm::MachineFunction::getRegInfo(), llvm::Value::getType(), llvm::MachineIRBuilder::insertInstr(), isSupportedType(), llvm::Function::isVarArg(), llvm::MipsISD::Ret, llvm::AttributeList::ReturnIndex, llvm::CallLowering::setArgFlags(), setLocInfo(), llvm::SmallVectorBase::size(), and llvm::ArrayRef< T >::size().