Go to the documentation of this file.
13 #ifndef LLVM_IR_ARGUMENT_H
14 #define LLVM_IR_ARGUMENT_H
47 assert(Parent &&
"can't get number of unparented arg");
This class represents an incoming formal argument to a Function.
bool hasStructRetAttr() const
Return true if this argument has the sret attribute.
bool hasInAllocaAttr() const
Return true if this argument has the inalloca attribute.
This is an optimization pass for GlobalISel generic memory operations.
bool hasPassPointeeByValueCopyAttr() const
Return true if this argument has the byval, inalloca, or preallocated attribute.
A parsed version of the target data layout string in and methods for querying it.
void removeAttrs(const AttributeMask &AM)
bool hasPointeeInMemoryValueAttr() const
Return true if this argument has the byval, sret, inalloca, preallocated, or byref attribute.
Type * getParamInAllocaType() const
If this is an inalloca argument, return its type.
uint64_t getParamAlignment() const
If this is a byval or inalloca argument, return its alignment.
The instances of the Type class are immutable: once they are created, they are never changed.
unsigned getArgNo() const
Return the index of this formal argument in its containing function.
bool hasInRegAttr() const
Return true if this argument has the inreg attribute.
const Function * getParent() const
bool hasSwiftSelfAttr() const
Return true if this argument has the swiftself attribute.
bool hasZExtAttr() const
Return true if this argument has the zext attribute.
MaybeAlign getParamStackAlign() const
bool hasSwiftErrorAttr() const
Return true if this argument has the swifterror attribute.
bool hasNoCaptureAttr() const
Return true if this argument has the nocapture attribute.
This struct is a compact representation of a valid (power of two) or undefined (0) alignment.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
unsigned getValueID() const
Return an ID for the concrete type of this object.
uint64_t getDereferenceableBytes() const
If this argument has the dereferenceable attribute, return the number of bytes known to be dereferenc...
Attribute getAttribute(Attribute::AttrKind Kind) const
bool hasNestAttr() const
Return true if this argument has the nest attribute.
bool hasByRefAttr() const
Return true if this argument has the byref attribute.
uint64_t getDereferenceableOrNullBytes() const
If this argument has the dereferenceable_or_null attribute, return the number of bytes known to be de...
Type * getParamStructRetType() const
If this is an sret argument, return its type.
bool hasAttribute(Attribute::AttrKind Kind) const
Check if an argument has a given attribute.
AttrKind
This enumeration lists the attributes that can be associated with parameters, function results,...
bool hasNoFreeAttr() const
Return true if this argument has the nofree attribute.
bool hasPreallocatedAttr() const
Return true if this argument has the preallocated attribute.
void removeAttr(Attribute::AttrKind Kind)
Remove attributes from an argument.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static bool classof(const Value *V)
Method for support type inquiry through isa, cast, and dyn_cast.
Argument(Type *Ty, const Twine &Name="", Function *F=nullptr, unsigned ArgNo=0)
Argument constructor.
Type * getParamByRefType() const
If this is a byref argument, return its type.
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
uint64_t getPassPointeeByValueCopySize(const DataLayout &DL) const
If this argument satisfies has hasPassPointeeByValueAttr, return the in-memory ABI size copied to the...
void addAttrs(AttrBuilder &B)
Add attributes to an argument.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
bool hasNonNullAttr(bool AllowUndefOrPoison=true) const
Return true if this argument has the nonnull attribute.
bool hasByValAttr() const
Return true if this argument has the byval attribute.
Type * getParamByValType() const
If this is a byval argument, return its type.
Type * getPointeeInMemoryValueType() const
If hasPointeeInMemoryValueAttr returns true, the in-memory ABI type is returned.
bool hasNoAliasAttr() const
Return true if this argument has the noalias attribute.
MaybeAlign getParamAlign() const
If this is a byval or inalloca argument, return its alignment.
bool onlyReadsMemory() const
Return true if this argument has the readonly or readnone attribute.
bool hasSExtAttr() const
Return true if this argument has the sext attribute.
LLVM Value Representation.
bool hasReturnedAttr() const
Return true if this argument has the returned attribute.
void addAttr(Attribute::AttrKind Kind)