15 #ifndef LLVM_CODEGEN_GLOBALISEL_CALLLOWERING_H
16 #define LLVM_CODEGEN_GLOBALISEL_CALLLOWERING_H
26 class MachineIRBuilder;
74 : MIRBuilder(MIRBuilder), MRI(MRI) {}
89 template <
class XXXTargetLowering>
90 const XXXTargetLowering *
getTLI()
const {
91 return static_cast<const XXXTargetLowering *
>(TLI);
95 template <
typename FuncInfoTy>
97 const FuncInfoTy &FuncInfo)
const;
116 const Value *Val,
unsigned VReg)
const {
virtual bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val, unsigned VReg) const
This hook must be implemented to lower outgoing return values, described by Val, into the specified v...
A parsed version of the target data layout string in and methods for querying it. ...
MachineRegisterInfo & MRI
This class represents a function call, abstracting a target machine's calling convention.
bool CCAssignFn(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
CCAssignFn - This function assigns a location for Val, updating State to reflect the change...
static const MCPhysReg VRegs[32]
This class defines information used to lower LLVM code to legal SelectionDAG operators that the targe...
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
The instances of the Type class are immutable: once they are created, they are never changed...
virtual void assignValueToReg(unsigned ValVReg, unsigned PhysReg, CCValAssign &VA)=0
The specified value has been assigned to a physical register, handle the appropriate COPY (either to ...
const XXXTargetLowering * getTLI() const
Getter for target specific TargetLowering class.
Helper class to build MachineInstr.
CallLowering(const TargetLowering *TLI)
Argument handling is mostly uniform between the four places that make these decisions: function forma...
This class contains a discriminated union of information about pointers in memory operands...
MachineOperand class - Representation of each machine instruction operand.
CCValAssign - Represent assignment of one arg/retval to a location.
virtual bool lowerCall(MachineIRBuilder &MIRBuilder, const MachineOperand &Callee, const ArgInfo &OrigRet, ArrayRef< ArgInfo > OrigArgs) const
This hook must be implemented to lower the given call instruction, including argument and return valu...
ValueHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI)
ArgInfo(unsigned Reg, Type *Ty, ISD::ArgFlagsTy Flags=ISD::ArgFlagsTy{})
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
virtual unsigned getStackAddress(uint64_t Size, int64_t Offset, MachinePointerInfo &MPO)=0
Materialize a VReg containing the address of the specified stack-based object.
virtual void assignValueToAddress(unsigned ValVReg, unsigned Addr, uint64_t Size, MachinePointerInfo &MPO, CCValAssign &VA)=0
The specified value has been assigned to a stack location.
virtual bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F, ArrayRef< unsigned > VRegs) const
This hook must be implemented to lower the incoming (formal) arguments, described by Args...
void setArgFlags(ArgInfo &Arg, unsigned OpNum, const DataLayout &DL, const FuncInfoTy &FuncInfo) const
LLVM Value Representation.
print Print MemDeps of function
unsigned extendRegister(unsigned ValReg, CCValAssign &VA)
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 loca...
MachineIRBuilder & MIRBuilder
const TargetLowering * getTLI() const
Getter for generic TargetLowering class.