13#ifndef LLVM_IR_ARGUMENT_H
14#define LLVM_IR_ARGUMENT_H
50 assert(Parent &&
"can't get number of unparented arg");
75 std::optional<ConstantRange>
getRange()
const;
189 return V->getValueID() == ArgumentVal;
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
This file contains the simple types necessary to represent the attributes associated with functions a...
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
#define LLVM_DEPRECATED(MSG, FIX)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class represents an incoming formal argument to a Function.
Type * getParamByRefType() const
If this is a byref argument, return its type.
Attribute getAttribute(Attribute::AttrKind Kind) const
bool hasNoAliasAttr() const
Return true if this argument has the noalias attribute.
bool hasNonNullAttr(bool AllowUndefOrPoison=true) const
Return true if this argument has the nonnull 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...
void addAttr(Attribute::AttrKind Kind)
bool onlyReadsMemory() const
Return true if this argument has the readonly or readnone attribute.
bool hasPointeeInMemoryValueAttr() const
Return true if this argument has the byval, sret, inalloca, preallocated, or byref attribute.
bool hasAttribute(Attribute::AttrKind Kind) const
Check if an argument has a given attribute.
bool hasReturnedAttr() const
Return true if this argument has the returned attribute.
Type * getParamStructRetType() const
If this is an sret argument, return its type.
bool hasInRegAttr() const
Return true if this argument has the inreg attribute.
bool hasByValAttr() const
Return true if this argument has the byval attribute.
bool hasPreallocatedAttr() const
Return true if this argument has the preallocated attribute.
bool hasSExtAttr() const
Return true if this argument has the sext attribute.
void removeAttr(Attribute::AttrKind Kind)
Remove attributes from an argument.
uint64_t getPassPointeeByValueCopySize(const DataLayout &DL) const
If this argument satisfies has hasPassPointeeByValueAttr, return the in-memory ABI size copied to the...
void removeAttrs(const AttributeMask &AM)
const Function * getParent() const
Type * getPointeeInMemoryValueType() const
If hasPointeeInMemoryValueAttr returns true, the in-memory ABI type is returned.
bool hasInAllocaAttr() const
Return true if this argument has the inalloca attribute.
bool hasSwiftErrorAttr() const
Return true if this argument has the swifterror attribute.
FPClassTest getNoFPClass() const
If this argument has nofpclass attribute, return the mask representing disallowed floating-point valu...
void addAttrs(AttrBuilder &B)
Add attributes to an argument.
bool hasNoFreeAttr() const
Return true if this argument has the nofree attribute.
bool hasSwiftSelfAttr() const
Return true if this argument has the swiftself attribute.
Type * getParamInAllocaType() const
If this is an inalloca argument, return its type.
bool hasZExtAttr() const
Return true if this argument has the zext attribute.
unsigned getArgNo() const
Return the index of this formal argument in its containing function.
Type * getParamByValType() const
If this is a byval argument, return its type.
bool hasNestAttr() const
Return true if this argument has the nest attribute.
MaybeAlign getParamAlign() const
If this is a byval or inalloca argument, return its alignment.
uint64_t getParamAlignment() const
If this is a byval or inalloca argument, return its alignment.
std::optional< ConstantRange > getRange() const
If this argument has a range attribute, return the value range of the argument.
static bool classof(const Value *V)
Method for support type inquiry through isa, cast, and dyn_cast.
bool hasStructRetAttr() const
Return true if this argument has the sret attribute.
AttributeSet getAttributes() const
bool hasPassPointeeByValueCopyAttr() const
Return true if this argument has the byval, inalloca, or preallocated attribute.
MaybeAlign getParamStackAlign() const
bool hasNoCaptureAttr() const
Return true if this argument has the nocapture attribute.
uint64_t getDereferenceableBytes() const
If this argument has the dereferenceable attribute, return the number of bytes known to be dereferenc...
A parsed version of the target data layout string in and methods for querying it.
StringRef - Represent a constant reference to a string, i.e.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.
FPClassTest
Floating-point class tests, supported by 'is_fpclass' intrinsic.
This struct is a compact representation of a valid (power of two) or undefined (0) alignment.