LLVM  4.0.0
Public Member Functions | List of all members
llvm::AArch64CallLowering Class Reference

#include <AArch64CallLowering.h>

Inheritance diagram for llvm::AArch64CallLowering:
[legend]
Collaboration diagram for llvm::AArch64CallLowering:
[legend]

Public Member Functions

 AArch64CallLowering (const AArch64TargetLowering &TLI)
 
bool lowerReturn (MachineIRBuilder &MIRBuiler, const Value *Val, unsigned VReg) const override
 This hook must be implemented to lower outgoing return values, described by Val, into the specified virtual register VReg. 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, 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 ()
 
virtual bool lowerCall (MachineIRBuilder &MIRBuilder, const CallInst &CI, unsigned ResReg, ArrayRef< unsigned > ArgRegs, std::function< unsigned()> GetCalleeReg) const
 This hook must be implemented to 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 OpNum, const DataLayout &DL, const FuncInfoTy &FuncInfo) const
 
bool handleAssignments (MachineIRBuilder &MIRBuilder, CCAssignFn *AssignFn, ArrayRef< ArgInfo > Args, ValueHandler &Callback) const
 Invoke the AssignFn on each of the given Args and then use Callback to move them to the assigned locations. More...
 

Detailed Description

Definition at line 25 of file AArch64CallLowering.h.

Constructor & Destructor Documentation

AArch64CallLowering::AArch64CallLowering ( const AArch64TargetLowering TLI)

Definition at line 33 of file AArch64CallLowering.cpp.

Member Function Documentation

bool AArch64CallLowering::lowerCall ( MachineIRBuilder MIRBuilder,
const MachineOperand Callee,
const ArgInfo OrigRet,
ArrayRef< ArgInfo OrigArgs 
) const
overridevirtual

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

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.

Returns
true if the lowering succeeded, false otherwise.

Reimplemented from llvm::CallLowering.

Definition at line 241 of file AArch64CallLowering.cpp.

References llvm::MachineInstrBuilder::addOperand(), llvm::ArrayRef< T >::begin(), llvm::MachineIRBuilder::buildExtract(), llvm::MachineIRBuilder::buildInstrNoInsert(), llvm::MachineIRBuilder::buildSequence(), llvm::AArch64TargetLowering::CCAssignFnForCall(), llvm::AArch64TargetLowering::CCAssignFnForReturn(), llvm::SmallVectorImpl< T >::clear(), llvm::constrainOperandRegClass(), llvm::SmallVectorBase::empty(), llvm::ArrayRef< T >::end(), F, llvm::Function::getCallingConv(), llvm::Module::getDataLayout(), llvm::MachineFunction::getFunction(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineIRBuilder::getMF(), llvm::MachineInstr::getOperand(), llvm::GlobalValue::getParent(), llvm::MachineOperand::getReg(), llvm::TargetSubtargetInfo::getRegBankInfo(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::CallLowering::handleAssignments(), llvm::MachineIRBuilder::insertInstr(), llvm::MachineOperand::isReg(), llvm::CallLowering::ArgInfo::Reg, Regs, and llvm::MachineOperand::setReg().

bool AArch64CallLowering::lowerFormalArguments ( MachineIRBuilder MIRBuilder,
const Function F,
ArrayRef< unsigned VRegs 
) const
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.

Returns
True if the lowering succeeded, false otherwise.

Reimplemented from llvm::CallLowering.

Definition at line 203 of file AArch64CallLowering.cpp.

References AMDGPU::RuntimeMD::KeyName::Args, llvm::MachineBasicBlock::begin(), llvm::MachineIRBuilder::buildSequence(), llvm::AArch64TargetLowering::CCAssignFnForCall(), llvm::MachineBasicBlock::empty(), llvm::Function::getArgumentList(), llvm::Function::getCallingConv(), llvm::Module::getDataLayout(), llvm::MachineIRBuilder::getMBB(), llvm::MachineIRBuilder::getMF(), llvm::GlobalValue::getParent(), llvm::MachineFunction::getRegInfo(), llvm::CallLowering::handleAssignments(), i, MBB, Regs, llvm::CallLowering::setArgFlags(), llvm::MachineIRBuilder::setInstr(), and llvm::MachineIRBuilder::setMBB().

bool AArch64CallLowering::lowerReturn ( MachineIRBuilder MIRBuilder,
const Value Val,
unsigned  VReg 
) const
overridevirtual

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