LLVM
8.0.1
|
#include "Target/AArch64/AArch64CallLowering.h"
Public Member Functions | |
AArch64CallLowering (const AArch64TargetLowering &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 33 of file AArch64CallLowering.h.
AArch64CallLowering::AArch64CallLowering | ( | const AArch64TargetLowering & | TLI | ) |
Definition at line 50 of file AArch64CallLowering.cpp.
References llvm::MachineInstrBuilder::addDef(), llvm::MachineBasicBlock::addLiveIn(), llvm::MachineInstrBuilder::addUse(), llvm::SmallVectorTemplateCommon< T >::back(), llvm::MachineIRBuilder::buildAnyExt(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildFrameIndex(), llvm::MachineIRBuilder::buildGEP(), llvm::MachineIRBuilder::buildLoad(), llvm::MachineIRBuilder::buildStore(), llvm::MachineIRBuilder::buildTrunc(), llvm::ComputeValueVTs(), llvm::MachineFrameInfo::CreateFixedObject(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::SmallVectorImpl< T >::emplace_back(), llvm::CallLowering::ArgInfo::Flags, llvm::AArch64TargetLowering::functionArgumentNeedsConsecutiveRegisters(), llvm::Type::getContext(), llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::getLLTForType(), llvm::CCValAssign::getLocInfo(), llvm::CCValAssign::getLocVT(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineIRBuilder::getMBB(), llvm::MachineIRBuilder::getMF(), llvm::CCState::getNextStackOffset(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MVT::getSizeInBits(), llvm::MachinePointerInfo::getStack(), llvm::RegState::Implicit, Info, llvm::CallLowering::ArgInfo::IsFixed, llvm::Type::isVoidTy(), llvm::max(), llvm::MachineMemOperand::MOInvariant, llvm::MachineMemOperand::MOLoad, llvm::MachineMemOperand::MOStore, MRI, llvm::LLT::pointer(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::CallLowering::ArgInfo::Reg, Reg, llvm::LLT::scalar(), Size, llvm::SmallVectorBase::size(), and llvm::CallLowering::ArgInfo::Ty.
|
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 350 of file AArch64CallLowering.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::ARCISD::BL, llvm::MachineIRBuilder::buildExtract(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildInstrNoInsert(), llvm::MachineIRBuilder::buildSequence(), llvm::SmallVectorImpl< T >::clear(), llvm::constrainOperandRegClass(), llvm::SmallVectorBase::empty(), F(), llvm::Function::getCallingConv(), llvm::Module::getDataLayout(), llvm::MachineFunction::getFunction(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineIRBuilder::getMF(), llvm::MachineInstr::getOperand(), llvm::GlobalValue::getParent(), llvm::TargetSubtargetInfo::getRegBankInfo(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), llvm::CallLowering::handleAssignments(), llvm::AArch64Subtarget::hasCustomCallingConv(), llvm::MachineIRBuilder::insertInstr(), llvm::MachineOperand::isReg(), llvm::BitmaskEnumDetail::Mask(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::CallLowering::ArgInfo::Reg, Reg, llvm::MachineOperand::setReg(), and TRI.
|
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 278 of file AArch64CallLowering.cpp.
References llvm::alignTo(), Arg, llvm::Function::args(), llvm::MachineBasicBlock::begin(), llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildInsert(), llvm::MachineIRBuilder::buildUndef(), llvm::AArch64TargetLowering::CCAssignFnForCall(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::MachineBasicBlock::empty(), llvm::AttributeList::FirstArgIndex, llvm::Function::getCallingConv(), llvm::Module::getDataLayout(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::MachineIRBuilder::getMBB(), llvm::MachineIRBuilder::getMF(), llvm::GlobalValue::getParent(), llvm::MachineFunction::getRegInfo(), llvm::AArch64Subtarget::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::Value::getType(), llvm::MachineRegisterInfo::getType(), llvm::DataLayout::getTypeStoreSize(), llvm::CallLowering::handleAssignments(), llvm::AArch64Subtarget::isTargetDarwin(), llvm::Function::isVarArg(), Reg, llvm::CallLowering::setArgFlags(), llvm::MachineIRBuilder::setInstr(), llvm::MachineIRBuilder::setMBB(), llvm::AArch64FunctionInfo::setVarArgsStackIndex(), Split(), and llvm::AArch64RegisterInfo::UpdateCustomCalleeSavedRegs().
|
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 229 of file AArch64CallLowering.cpp.
References assert(), llvm::MachineIRBuilder::buildExtract(), llvm::MachineIRBuilder::buildInstrNoInsert(), llvm::MachineIRBuilder::buildZExt(), llvm::AArch64TargetLowering::CCAssignFnForReturn(), llvm::ComputeValueVTs(), llvm::ArrayRef< T >::empty(), F(), llvm::Function::getCallingConv(), llvm::Type::getContext(), llvm::Module::getDataLayout(), llvm::MachineFunction::getFunction(), llvm::MachineIRBuilder::getMF(), llvm::MachineInstr::getOperand(), llvm::GlobalValue::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::LLT::getSizeInBits(), llvm::Value::getType(), llvm::MachineRegisterInfo::getType(), llvm::CallLowering::handleAssignments(), llvm::MachineIRBuilder::insertInstr(), Reg, llvm::AttributeList::ReturnIndex, llvm::LLT::scalar(), llvm::CallLowering::setArgFlags(), llvm::SmallVectorBase::size(), llvm::ArrayRef< T >::size(), and Success.