50 if (!OrigRet.Ty->isVoidTy())
53 return lowerCall(MIRBuilder, Callee, OrigRet, OrigArgs);
56 template <
typename FuncInfoTy>
59 const FuncInfoTy &FuncInfo)
const {
79 Type *ElementTy = cast<PointerType>(Arg.
Ty)->getElementType();
84 if (FuncInfo.getParamAlignment(OpIdx))
85 FrameAlign = FuncInfo.getParamAlignment(OpIdx);
116 unsigned NumArgs = Args.
size();
117 for (
unsigned i = 0;
i != NumArgs; ++
i) {
123 for (
unsigned i = 0, e = Args.
size();
i != e; ++
i) {
void setByValAlign(unsigned A)
void push_back(const T &Elt)
A parsed version of the target data layout string in and methods for querying it. ...
LLVMContext & getContext() const
getContext - Return a reference to the LLVMContext associated with this function. ...
LocInfo getLocInfo() const
MachineRegisterInfo & MRI
MachineInstrBuilder buildZExt(unsigned Res, unsigned Op)
Build and insert Res<def> = G_ZEXT Op.
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...
unsigned getSizeInBits() const
const Function * getParent() const
Return the enclosing method, or null if none.
const Function * getFunction() const
getFunction - Return the LLVM function that this machine code represents
uint64_t alignTo(uint64_t Value, uint64_t Align, uint64_t Skew=0)
Returns the next integer (mod 2**64) that is greater than or equal to Value and is a multiple of Alig...
unsigned createGenericVirtualRegister(LLT Ty)
Create and return a new generic virtual register with low-level type Ty.
bool hasAttribute(unsigned Index, Attribute::AttrKind Kind) const
Return true if the attribute exists at the given index.
CallingConv::ID getCallingConv() const
getCallingConv()/setCallingConv(CC) - These method get and set the calling convention of this functio...
struct fuzzer::@269 Flags
static MachineOperand CreateReg(unsigned Reg, bool isDef, bool isImp=false, bool isKill=false, bool isDead=false, bool isUndef=false, bool isEarlyClobber=false, unsigned SubReg=0, bool isDebug=false, bool isInternalRead=false)
Reg
All possible values of the reg field in the ModR/M byte.
void setByValSize(unsigned S)
unsigned getLocReg() const
MachineFunction & getMF()
Getter for the function we currently build.
void setOrigAlign(unsigned A)
size_t size() const
size - Get the array size.
MVT - Machine Value Type.
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 ...
bool isVector() const
isVector - Return true if this is a vector value type.
Helper class to build MachineInstr.
static MachineOperand CreateGA(const GlobalValue *GV, int64_t Offset, unsigned char TargetFlags=0)
static MVT getVT(Type *Ty, bool HandleUnknown=false)
Return the value type corresponding to the specified type.
virtual unsigned getByValTypeAlignment(Type *Ty, const DataLayout &DL) const
Return the desired alignment for ByVal or InAlloca aggregate function arguments in the caller paramet...
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.
unsigned getABITypeAlignment(Type *Ty) const
Returns the minimum ABI-required alignment for the specified type.
CCState - This class holds information needed while lowering arguments and return values...
uint64_t getTypeAllocSize(Type *Ty) const
Returns the offset in bytes between successive objects of the specified type, including alignment pad...
MachineOperand class - Representation of each machine instruction operand.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Module.h This file contains the declarations for the Module class.
Type * getType() const
All values are typed, get the type of this value.
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...
Function * getCalledFunction() const
Return the function called, or null if this is an indirect function invocation.
This file declares the MachineIRBuilder class.
MachineInstrBuilder buildSExt(unsigned Res, unsigned Op)
Build and insert Res<def> = G_SEXT Op.
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.
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
static MachineOperand CreateImm(int64_t Val)
void setArgFlags(ArgInfo &Arg, unsigned OpNum, const DataLayout &DL, const FuncInfoTy &FuncInfo) const
iterator_range< op_iterator > arg_operands()
Iteration adapter for range-for loops.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Module * getParent()
Get the module that this global value is contained inside of...
This file describes how to lower LLVM calls to machine code calls.
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...
unsigned getLocMemOffset() const
unsigned getPointerSize(unsigned AS=0) const
Layout pointer size FIXME: The defaults need to be removed once all of the backends/clients are updat...
bool isVarArg() const
isVarArg - Return true if this function takes a variable number of arguments.
const TargetLowering * getTLI() const
Getter for generic TargetLowering class.
const BasicBlock * getParent() const
This file describes how to lower LLVM code to machine code.