13#ifndef LLVM_IR_ARGUMENT_H
14#define LLVM_IR_ARGUMENT_H
42 Function *
F =
nullptr,
unsigned ArgNo = 0);
51 assert(Parent &&
"can't get number of unparented arg");
193 return V->getValueID() == ArgumentVal;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
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")
This class represents an incoming formal argument to a Function.
LLVM_ABI Type * getParamByRefType() const
If this is a byref argument, return its type.
LLVM_ABI LLVM_DEPRECATED("Use getParamAlign() instead", "getParamAlign") uint64_t getParamAlignment() const
If this is a byval or inalloca argument, return its alignment.
LLVM_ABI bool hasDeadOnReturnAttr() const
Return true if this argument has the dead_on_return attribute.
LLVM_ABI Attribute getAttribute(Attribute::AttrKind Kind) const
LLVM_ABI bool hasNoAliasAttr() const
Return true if this argument has the noalias attribute.
LLVM_ABI bool hasNonNullAttr(bool AllowUndefOrPoison=true) const
Return true if this argument has the nonnull attribute.
LLVM_ABI bool hasByRefAttr() const
Return true if this argument has the byref attribute.
LLVM_ABI uint64_t getDereferenceableOrNullBytes() const
If this argument has the dereferenceable_or_null attribute, return the number of bytes known to be de...
LLVM_ABI void addAttr(Attribute::AttrKind Kind)
LLVM_ABI bool onlyReadsMemory() const
Return true if this argument has the readonly or readnone attribute.
LLVM_ABI bool hasPointeeInMemoryValueAttr() const
Return true if this argument has the byval, sret, inalloca, preallocated, or byref attribute.
LLVM_ABI bool hasAttribute(Attribute::AttrKind Kind) const
Check if an argument has a given attribute.
LLVM_ABI bool hasReturnedAttr() const
Return true if this argument has the returned attribute.
LLVM_ABI Type * getParamStructRetType() const
If this is an sret argument, return its type.
LLVM_ABI bool hasInRegAttr() const
Return true if this argument has the inreg attribute.
LLVM_ABI bool hasByValAttr() const
Return true if this argument has the byval attribute.
LLVM_ABI bool hasPreallocatedAttr() const
Return true if this argument has the preallocated attribute.
LLVM_ABI bool hasSExtAttr() const
Return true if this argument has the sext attribute.
LLVM_ABI void removeAttr(Attribute::AttrKind Kind)
Remove attributes from an argument.
LLVM_ABI uint64_t getPassPointeeByValueCopySize(const DataLayout &DL) const
If this argument satisfies has hasPassPointeeByValueAttr, return the in-memory ABI size copied to the...
LLVM_ABI void removeAttrs(const AttributeMask &AM)
const Function * getParent() const
LLVM_ABI Type * getPointeeInMemoryValueType() const
If hasPointeeInMemoryValueAttr returns true, the in-memory ABI type is returned.
LLVM_ABI bool hasInAllocaAttr() const
Return true if this argument has the inalloca attribute.
LLVM_ABI bool hasSwiftErrorAttr() const
Return true if this argument has the swifterror attribute.
LLVM_ABI FPClassTest getNoFPClass() const
If this argument has nofpclass attribute, return the mask representing disallowed floating-point valu...
LLVM_ABI void addAttrs(AttrBuilder &B)
Add attributes to an argument.
LLVM_ABI bool hasNoFreeAttr() const
Return true if this argument has the nofree attribute.
LLVM_ABI bool hasSwiftSelfAttr() const
Return true if this argument has the swiftself attribute.
LLVM_ABI Type * getParamInAllocaType() const
If this is an inalloca argument, return its type.
LLVM_ABI 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.
LLVM_ABI Type * getParamByValType() const
If this is a byval argument, return its type.
LLVM_ABI bool hasNestAttr() const
Return true if this argument has the nest attribute.
LLVM_ABI MaybeAlign getParamAlign() const
If this is a byval or inalloca argument, return its alignment.
LLVM_ABI 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.
LLVM_ABI bool hasStructRetAttr() const
Return true if this argument has the sret attribute.
LLVM_ABI AttributeSet getAttributes() const
LLVM_ABI bool hasPassPointeeByValueCopyAttr() const
Return true if this argument has the byval, inalloca, or preallocated attribute.
LLVM_ABI MaybeAlign getParamStackAlign() const
LLVM_ABI bool hasNoCaptureAttr() const
Return true if this argument has the nocapture attribute.
LLVM_ABI 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.