15 #ifndef LLVM_CODEGEN_GLOBALISEL_CALLLOWERING_H 16 #define LLVM_CODEGEN_GLOBALISEL_CALLLOWERING_H 32 class MachineIRBuilder;
34 struct MachinePointerInfo;
35 class MachineRegisterInfo;
43 virtual void anchor();
65 : MIRBuilder(MIRBuilder), MRI(MRI), AssignFn(AssignFn) {}
74 virtual unsigned getStackAddress(uint64_t
Size, int64_t
Offset,
80 virtual void assignValueToReg(
unsigned ValVReg,
unsigned PhysReg,
86 virtual void assignValueToAddress(
unsigned ValVReg,
unsigned Addr,
101 unsigned extendRegister(
unsigned ValReg,
CCValAssign &VA);
106 return AssignFn(ValNo, ValVT, LocVT, LocInfo, Info.
Flags, State);
114 virtual void anchor();
124 template <
class XXXTargetLowering>
125 const XXXTargetLowering *
getTLI()
const {
126 return static_cast<const XXXTargetLowering *
>(TLI);
129 template <
typename FuncInfoTy>
131 const FuncInfoTy &FuncInfo)
const;
219 #endif // LLVM_CODEGEN_GLOBALISEL_CALLLOWERING_H A parsed version of the target data layout string in and methods for querying it. ...
Type
MessagePack types as defined in the standard, with the exception of Integer being divided into a sign...
ValueHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI, CCAssignFn *AssignFn)
This class represents lattice values for constants.
MachineRegisterInfo & MRI
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...
ArgInfo(unsigned Reg, Type *Ty, ISD::ArgFlagsTy Flags=ISD::ArgFlagsTy{}, bool IsFixed=true)
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 assigne...
const TargetLowering * getTLI() const
Getter for generic TargetLowering class.
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...
const XXXTargetLowering * getTLI() const
Getter for target specific TargetLowering class.
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)...
Analysis containing CSE Info
virtual ~CallLowering()=default
unsigned const MachineRegisterInfo * MRI
The instances of the Type class are immutable: once they are created, they are never changed...
virtual bool lowerCall(MachineIRBuilder &MIRBuilder, CallingConv::ID CallConv, 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...
Helper class to build MachineInstr.
void setArgFlags(ArgInfo &Arg, unsigned OpIdx, const DataLayout &DL, const FuncInfoTy &FuncInfo) const
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...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
virtual unsigned assignCustomValue(const ArgInfo &Arg, ArrayRef< CCValAssign > VAs)
Handle custom values, which may be passed into one or more of VAs.
CCState - This class holds information needed while lowering arguments and return values...
MachineOperand class - Representation of each machine instruction operand.
CCValAssign - Represent assignment of one arg/retval to a location.
amdgpu Simplify well known AMD library false Value Value * Arg
virtual bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val, ArrayRef< unsigned > VRegs) const
This hook must be implemented to lower outgoing return values, described by Val, into the specified v...
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
Establish a view to a call site for examination.
virtual bool assignArg(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, const ArgInfo &Info, CCState &State)
LLVM Value Representation.
print Print MemDeps of function
MachineIRBuilder & MIRBuilder
constexpr char Args[]
Key for Kernel::Metadata::mArgs.