class Function
Declaration
class Function : public GlobalObject, public ilist_node { /* full declaration omitted */ };
Description
This is an important base class in LLVM. It provides the common facilities of all constant values in an LLVM program. A constant is a value that is immutable at runtime. Functions are constants because their address is immutable. Same with global variables. All constants share the capabilities provided in this class. All constants can have a null value. They can have an operand list. Constants can be simple (integer and floating point values), complex (arrays and structures), or expression based (computations yielding a constant value composed of only certain operators and other constant values). Note that Constants are immutable (once created they never change) and are fully shared by structural equivalence. This means that two structurally equivalent constants will always have the same address. Constants are created on demand as needed and never deleted: thus clients don't have to worry about the lifetime of the objects. LLVM Constant Representation
Declared at: llvm/include/llvm/IR/Function.h:60
Inherits from: GlobalObject, ilist_node
Member Variables
- private llvm::Function::BasicBlockListType BasicBlocks
- The basic blocks
- private llvm::Argument* Arguments = nullptr
- The formal arguments
- private size_t NumArgs
- private std::unique_ptr<ValueSymbolTable> SymTab
- Symbol table of args/instructions
- private llvm::AttributeList AttributeSets
- Parameter attributes
Inherited from GlobalObject:
- protected ObjComdat = nullptr
- protected static GlobalObjectSubClassDataBits = GlobalValueSubClassDataBits - GlobalObjectBits
Inherited from GlobalValue:
- protected ValueType
- protected Linkage
- protected Visibility
- protected UnnamedAddrVal
- protected DllStorageClass
- protected ThreadLocal
- protected HasLLVMReservedName
- protected IsDSOLocal
- protected HasPartition
- protected HasSanitizerMetadata
- protected IntID = (unsigned int)0U
- protected Parent = nullptr
- protected static GlobalValueSubClassDataBits = 15
Inherited from Value:
- protected SubclassOptionalData
- protected NumUserOperands
- protected IsUsedByMD
- protected HasName
- protected HasMetadata
- protected HasHungOffUses
- protected HasDescriptor
- public static MaxAlignmentExponent = 32
- public static MaximumAlignment = 1ULL << MaxAlignmentExponent
Method Overview
- private void BuildLazyArguments() const
- private void CheckLazyArguments() const
- public static llvm::Function * Create(llvm::FunctionType * Ty, llvm::GlobalValue::LinkageTypes Linkage, unsigned int AddrSpace, const llvm::Twine & N = "", llvm::Module * M = nullptr)
- public static llvm::Function * Create(llvm::FunctionType * Ty, llvm::GlobalValue::LinkageTypes Linkage, const llvm::Twine & N = "", llvm::Module * M = nullptr)
- public static llvm::Function * Create(llvm::FunctionType * Ty, llvm::GlobalValue::LinkageTypes Linkage, const llvm::Twine & N, llvm::Module & M)
- private Function(llvm::FunctionType * Ty, llvm::GlobalValue::LinkageTypes Linkage, unsigned int AddrSpace, const llvm::Twine & N = "", llvm::Module * M = nullptr)
- public Function(const llvm::Function &)
- public void addAttributeAtIndex(unsigned int i, llvm::Attribute Attr)
- public void addDereferenceableOrNullParamAttr(unsigned int ArgNo, uint64_t Bytes)
- public void addDereferenceableParamAttr(unsigned int ArgNo, uint64_t Bytes)
- public void addFnAttr(llvm::Attribute Attr)
- public void addFnAttr(llvm::StringRef Kind, llvm::StringRef Val = llvm::StringRef())
- public void addFnAttr(Attribute::AttrKind Kind)
- public void addFnAttrs(const llvm::AttrBuilder & Attrs)
- public void addParamAttr(unsigned int ArgNo, llvm::Attribute Attr)
- public void addParamAttr(unsigned int ArgNo, Attribute::AttrKind Kind)
- public void addParamAttrs(unsigned int ArgNo, const llvm::AttrBuilder & Attrs)
- public void addRetAttr(llvm::Attribute Attr)
- public void addRetAttr(Attribute::AttrKind Kind)
- public void addRetAttrs(const llvm::AttrBuilder & Attrs)
- private void allocHungoffUselist()
- public llvm::Function::const_arg_iterator arg_begin() const
- public llvm::Function::arg_iterator arg_begin()
- public bool arg_empty() const
- public llvm::Function::arg_iterator arg_end()
- public llvm::Function::const_arg_iterator arg_end() const
- public size_t arg_size() const
- public iterator_range<llvm::Function::arg_iterator> args()
- public iterator_range<llvm::Function::const_arg_iterator> args() const
- public const llvm::BasicBlock & back() const
- public llvm::BasicBlock & back()
- public llvm::Function::const_iterator begin() const
- public llvm::Function::iterator begin()
- public bool callsFunctionThatReturnsTwice() const
- public bool cannotDuplicate() const
- public static bool classof(const llvm::Value * V)
- private void clearArguments()
- public void clearGC()
- public void copyAttributesFrom(const llvm::Function * Src)
- public static llvm::Function * createWithDefaultAttr(llvm::FunctionType * Ty, llvm::GlobalValue::LinkageTypes Linkage, unsigned int AddrSpace, const llvm::Twine & N = "", llvm::Module * M = nullptr)
- public void deleteBody()
- public bool doesNoCfCheck() const
- public bool doesNotAccessMemory() const
- public bool doesNotFreeMemory() const
- public bool doesNotRecurse() const
- public bool doesNotReturn() const
- public bool doesNotThrow() const
- public void dropAllReferences()
- public bool empty() const
- public llvm::Function::const_iterator end() const
- public llvm::Function::iterator end()
- public void eraseFromParent()
- public llvm::BasicBlock & front()
- public const llvm::BasicBlock & front() const
- public llvm::Argument * getArg(unsigned int i) const
- public llvm::Attribute getAttributeAtIndex(unsigned int i, Attribute::AttrKind Kind) const
- public llvm::Attribute getAttributeAtIndex(unsigned int i, llvm::StringRef Kind) const
- public llvm::AttributeList getAttributes() const
- public const llvm::Function::BasicBlockListType & getBasicBlockList() const
- public llvm::Function::BasicBlockListType & getBasicBlockList()
- public CallingConv::ID getCallingConv() const
- public llvm::LLVMContext & getContext() const
- public llvm::DenormalMode getDenormalMode(const llvm::fltSemantics & FPType) const
- public llvm::BasicBlock & getEntryBlock()
- public const llvm::BasicBlock & getEntryBlock() const
- public Optional<llvm::Function::ProfileCount> getEntryCount(bool AllowSynthetic = false) const
- public llvm::Attribute getFnAttribute(Attribute::AttrKind Kind) const
- public llvm::Attribute getFnAttribute(llvm::StringRef Kind) const
- public llvm::MaybeAlign getFnStackAlign() const
- public const llvm::Function & getFunction() const
- public llvm::FunctionType * getFunctionType() const
- public const std::string & getGC() const
- public DenseSet<GlobalValue::GUID> getImportGUIDs() const
- public unsigned int getInstructionCount() const
- public Intrinsic::ID getIntrinsicID() const
- public llvm::MaybeAlign getParamAlign(unsigned int ArgNo) const
- public uint64_t getParamAlignment(unsigned int ArgNo) const
- public llvm::Attribute getParamAttribute(unsigned int ArgNo, Attribute::AttrKind Kind) const
- public llvm::Type * getParamByRefType(unsigned int ArgNo) const
- public llvm::Type * getParamByValType(unsigned int ArgNo) const
- public uint64_t getParamDereferenceableBytes(unsigned int ArgNo) const
- public uint64_t getParamDereferenceableOrNullBytes(unsigned int ArgNo) const
- public llvm::Type * getParamInAllocaType(unsigned int ArgNo) const
- public llvm::Type * getParamPreallocatedType(unsigned int ArgNo) const
- public llvm::MaybeAlign getParamStackAlign(unsigned int ArgNo) const
- public llvm::Type * getParamStructRetType(unsigned int ArgNo) const
- public llvm::Constant * getPersonalityFn() const
- public llvm::Constant * getPrefixData() const
- public llvm::Constant * getPrologueData() const
- public llvm::Type * getReturnType() const
- public Optional<llvm::StringRef> getSectionPrefix() const
- public static llvm::Function::BasicBlockListType llvm::Function::* getSublistAccess(llvm::BasicBlock *)
- public llvm::DISubprogram * getSubprogram() const
- public llvm::UWTableKind getUWTableKind() const
- public inline llvm::ValueSymbolTable * getValueSymbolTable()
- public inline const llvm::ValueSymbolTable * getValueSymbolTable() const
- public bool hasAddressTaken(const llvm::User ** = nullptr, bool IgnoreCallbackUses = false, bool IgnoreAssumeLikeCalls = true, bool IngoreLLVMUsed = false, bool IgnoreARCAttachedCall = false) const
- public bool hasFnAttribute(llvm::StringRef Kind) const
- public bool hasFnAttribute(Attribute::AttrKind Kind) const
- public bool hasGC() const
- public bool hasLazyArguments() const
- public bool hasMinSize() const
- public bool hasNoSync() const
- public bool hasOptNone() const
- public bool hasOptSize() const
- public bool hasParamAttribute(unsigned int ArgNo, Attribute::AttrKind Kind) const
- public bool hasPersonalityFn() const
- public bool hasPrefixData() const
- public bool hasProfileData(bool IncludeSynthetic = false) const
- public bool hasPrologueData() const
- public bool hasRetAttribute(Attribute::AttrKind Kind) const
- public bool hasStackProtectorFnAttr() const
- public bool hasStructRetAttr() const
- public bool hasUWTable() const
- public bool isConstrainedFPIntrinsic() const
- public bool isConvergent() const
- public bool isDebugInfoForProfiling() const
- public bool isDefTriviallyDead() const
- public bool isIntrinsic() const
- public bool isMaterializable() const
- public bool isPresplitCoroutine() const
- public bool isSpeculatable() const
- public bool isTargetIntrinsic() const
- public static bool isTargetIntrinsic(Intrinsic::ID IID)
- public bool isVarArg() const
- public static Intrinsic::ID lookupIntrinsicID(llvm::StringRef Name)
- public bool mustProgress() const
- public bool needsUnwindTableEntry() const
- public bool nullPointerIsDefined() const
- public bool onlyAccessesArgMemory() const
- public bool onlyAccessesInaccessibleMemOrArgMem() const
- public bool onlyAccessesInaccessibleMemory() const
- public bool onlyReadsMemory() const
- public bool onlyWritesMemory() const
- public void print(llvm::raw_ostream & OS, llvm::AssemblyAnnotationWriter * AAW = nullptr, bool ShouldPreserveUseListOrder = false, bool IsForDebug = false) const
- public void recalculateIntrinsicID()
- public void removeAttributeAtIndex(unsigned int i, llvm::StringRef Kind)
- public void removeAttributeAtIndex(unsigned int i, Attribute::AttrKind Kind)
- public void removeFnAttr(llvm::StringRef Kind)
- public void removeFnAttr(Attribute::AttrKind Kind)
- public void removeFnAttrs(const llvm::AttributeMask & Attrs)
- public void removeFromParent()
- public void removeParamAttr(unsigned int ArgNo, Attribute::AttrKind Kind)
- public void removeParamAttr(unsigned int ArgNo, llvm::StringRef Kind)
- public void removeParamAttrs(unsigned int ArgNo, const llvm::AttributeMask & Attrs)
- public void removeParamUndefImplyingAttrs(unsigned int ArgNo)
- public void removeRetAttr(Attribute::AttrKind Kind)
- public void removeRetAttr(llvm::StringRef Kind)
- public void removeRetAttrs(const llvm::AttributeMask & Attrs)
- public bool returnDoesNotAlias() const
- public void setAttributes(llvm::AttributeList Attrs)
- public void setCallingConv(CallingConv::ID CC)
- public void setCannotDuplicate()
- public void setConvergent()
- public void setDoesNotAccessMemory()
- public void setDoesNotFreeMemory()
- public void setDoesNotRecurse()
- public void setDoesNotReturn()
- public void setDoesNotThrow()
- public void setEntryCount(uint64_t Count, llvm::Function::ProfileCountType Type = PCT_Real, const DenseSet<GlobalValue::GUID> * Imports = nullptr)
- public void setEntryCount(llvm::Function::ProfileCount Count, const DenseSet<GlobalValue::GUID> * Imports = nullptr)
- public void setGC(std::string Str)
- private template <int Idx>void setHungoffOperand(llvm::Constant * C)
- public void setIsMaterializable(bool V)
- public void setMustProgress()
- public void setNoSync()
- public void setNotConvergent()
- public void setOnlyAccessesArgMemory()
- public void setOnlyAccessesInaccessibleMemOrArgMem()
- public void setOnlyAccessesInaccessibleMemory()
- public void setOnlyReadsMemory()
- public void setOnlyWritesMemory()
- public void setPersonalityFn(llvm::Constant * Fn)
- public void setPrefixData(llvm::Constant * PrefixData)
- public void setPresplitCoroutine()
- public void setPrologueData(llvm::Constant * PrologueData)
- public void setReturnDoesNotAlias()
- public void setSectionPrefix(llvm::StringRef Prefix)
- public void setSpeculatable()
- public void setSplittedCoroutine()
- public void setSubprogram(llvm::DISubprogram * SP)
- public void setUWTableKind(llvm::UWTableKind K)
- private void setValueSubclassData(unsigned short D)
- private void setValueSubclassDataBit(unsigned int Bit, bool On)
- public void setWillReturn()
- public size_t size() const
- public void stealArgumentListFrom(llvm::Function & Src)
- public void viewCFG(bool ViewCFGOnly, const llvm::BlockFrequencyInfo * BFI, const llvm::BranchProbabilityInfo * BPI) const
- public void viewCFG() const
- public void viewCFGOnly(const llvm::BlockFrequencyInfo * BFI, const llvm::BranchProbabilityInfo * BPI) const
- public void viewCFGOnly() const
- public bool willReturn() const
- public ~Function()
Inherited from GlobalObject:
- public addTypeMetadata
- public canIncreaseAlignment
- public classof
- protected copyAttributesFrom
- public copyMetadata
- public getAlign
- public getAlignment
- public getComdat
- public getComdat
- public getGlobalObjectSubClassData
- public getSection
- public getVCallVisibility
- public hasComdat
- public hasSection
- public setAlignment
- public setComdat
- public setGlobalObjectSubClassData
- public setSection
- public setVCallVisibilityMetadata
Inherited from GlobalValue:
- public canBeOmittedFromSymbolTable
- public canBenefitFromLocalAlias
- public classof
- protected copyAttributesFrom
- public dropLLVMManglingEscape
- public eraseFromParent
- public getAbsoluteSymbolRange
- public getAddressSpace
- public getAliaseeObject
- public getAliaseeObject
- public getComdat
- public getComdat
- public getDLLStorageClass
- public getGUID
- public getGUID
- public getGlobalIdentifier
- public getGlobalIdentifier
- protected getGlobalValueSubClassData
- public getLinkOnceLinkage
- public getLinkage
- public getMinUnnamedAddr
- public getParent
- public getParent
- public getPartition
- public getSanitizerMetadata
- public getSection
- public getThreadLocalMode
- public getType
- public getUnnamedAddr
- public getValueType
- public getVisibility
- public getWeakLinkage
- public hasAppendingLinkage
- public hasAtLeastLocalUnnamedAddr
- public hasAvailableExternallyLinkage
- public hasComdat
- public hasCommonLinkage
- public hasDLLExportStorageClass
- public hasDLLImportStorageClass
- public hasDefaultVisibility
- public hasExactDefinition
- public hasExternalLinkage
- public hasExternalWeakLinkage
- public hasGlobalUnnamedAddr
- public hasHiddenVisibility
- public hasInternalLinkage
- public hasLinkOnceAnyLinkage
- public hasLinkOnceLinkage
- public hasLinkOnceODRLinkage
- public hasLocalLinkage
- public hasPartition
- public hasPrivateLinkage
- public hasProtectedVisibility
- public hasSanitizerMetadata
- public hasSection
- public hasValidDeclarationLinkage
- public hasWeakAnyLinkage
- public hasWeakLinkage
- public hasWeakODRLinkage
- public isAbsoluteSymbolRef
- public isAppendingLinkage
- public isAvailableExternallyLinkage
- public isCommonLinkage
- public isDSOLocal
- public isDeclaration
- public isDeclarationForLinker
- public isDefinitionExact
- public isDiscardableIfUnused
- public isDiscardableIfUnused
- public isExternalLinkage
- public isExternalWeakLinkage
- public isImplicitDSOLocal
- public isInternalLinkage
- public isInterposable
- public isInterposableLinkage
- public isLinkOnceAnyLinkage
- public isLinkOnceLinkage
- public isLinkOnceODRLinkage
- public isLocalLinkage
- public isMaterializable
- public isPrivateLinkage
- public isStrongDefinitionForLinker
- public isTagged
- public isThreadLocal
- public isValidDeclarationLinkage
- public isWeakAnyLinkage
- public isWeakForLinker
- public isWeakForLinker
- public isWeakLinkage
- public isWeakODRLinkage
- public materialize
- public removeFromParent
- public removeSanitizerMetadata
- public setDLLStorageClass
- public setDSOLocal
- protected setGlobalValueSubClassData
- public setLinkage
- protected setParent
- public setPartition
- public setSanitizerMetadata
- public setThreadLocal
- public setThreadLocalMode
- public setUnnamedAddr
- public setVisibility
Inherited from Constant:
- public classof
- public containsConstantExpression
- public containsPoisonElement
- public containsUndefOrPoisonElement
- public destroyConstant
- public getAggregateElement
- public getAggregateElement
- public getAllOnesValue
- public getIntegerValue
- public getNullValue
- public getSplatValue
- public getUniqueInteger
- public handleOperandChange
- public hasExactInverseFP
- public hasOneLiveUse
- public hasZeroLiveUses
- public isAllOnesValue
- public isConstantUsed
- public isDLLImportDependent
- public isElementWiseEqual
- public isFiniteNonZeroFP
- public isManifestConstant
- public isMinSignedValue
- public isNaN
- public isNegativeZeroValue
- public isNormalFP
- public isNotMinSignedValue
- public isNotOneValue
- public isNullValue
- public isOneValue
- public isThreadDependent
- public isZeroValue
- public mergeUndefsWith
- public needsDynamicRelocation
- public needsRelocation
- public removeDeadConstantUsers
- public replaceUndefsWith
- public stripPointerCasts
- public stripPointerCasts
Inherited from User:
- protected Op
- protected Op
- protected OpFrom
- protected allocHungoffUses
- public classof
- public dropAllReferences
- public getDescriptor
- public getDescriptor
- public getNumOperands
- public getOperand
- public getOperandList
- public getOperandList
- public getOperandUse
- public getOperandUse
- protected growHungoffUses
- public isDroppable
- public op_begin
- public op_begin
- public op_end
- public op_end
- public operand_values
- public operand_values
- public operands
- public operands
- public replaceUsesOfWith
- public setGlobalVariableNumOperands
- public setNumHungOffUseOperands
- public setOperand
- public value_op_begin
- public value_op_begin
- public value_op_end
- public value_op_end
Inherited from Value:
- public DoPHITranslation
- public DoPHITranslation
- protected addMetadata
- protected addMetadata
- public addUse
- public assertModuleIsMaterialized
- public assertModuleIsMaterializedImpl
- public canBeFreed
- protected clearMetadata
- public clearSubclassOptionalData
- public deleteValue
- public dropDroppableUse
- public dropDroppableUses
- public dropDroppableUsesIn
- public dump
- protected eraseMetadata
- protected getAllMetadata
- public getContext
- protected getMetadata
- protected getMetadata
- protected getMetadata
- protected getMetadata
- public getName
- public getNameOrAsOperand
- public getNumUses
- public getPointerAlignment
- public getPointerDereferenceableBytes
- public getRawSubclassOptionalData
- public getSingleUndroppableUse
- public getSingleUndroppableUse
- protected getSubclassDataFromValue
- public getType
- public getUniqueUndroppableUser
- public getUniqueUndroppableUser
- public getValueID
- public getValueName
- protected hasMetadata
- protected hasMetadata
- protected hasMetadata
- public hasNUndroppableUses
- public hasNUndroppableUsesOrMore
- public hasNUses
- public hasNUsesOrMore
- public hasName
- public hasOneUse
- public hasOneUser
- public hasSameSubclassOptionalData
- public hasValueHandle
- public isSwiftError
- public isTransitiveUsedByMetadataOnly
- public isUsedByMetadata
- public isUsedInBasicBlock
- public materialized_use_begin
- public materialized_use_begin
- public materialized_use_empty
- public materialized_user_begin
- public materialized_user_begin
- public materialized_users
- public materialized_users
- public materialized_uses
- public materialized_uses
- public mutateType
- public print
- public print
- public printAsOperand
- public printAsOperand
- public replaceAllUsesWith
- public replaceNonMetadataUsesWith
- public replaceUsesOutsideBlock
- public replaceUsesWithIf
- public reverseUseList
- protected setMetadata
- protected setMetadata
- public setName
- public setValueName
- protected setValueSubclassData
- public sortUseList
- public stripAndAccumulateConstantOffsets
- public stripAndAccumulateConstantOffsets
- public stripAndAccumulateInBoundsConstantOffsets
- public stripAndAccumulateInBoundsConstantOffsets
- public stripInBoundsConstantOffsets
- public stripInBoundsConstantOffsets
- public stripInBoundsOffsets
- public stripInBoundsOffsets
- public stripPointerCasts
- public stripPointerCasts
- public stripPointerCastsAndAliases
- public stripPointerCastsAndAliases
- public stripPointerCastsForAliasAnalysis
- public stripPointerCastsForAliasAnalysis
- public stripPointerCastsSameRepresentation
- public stripPointerCastsSameRepresentation
- public takeName
- public use_begin
- public use_begin
- public use_empty
- public use_end
- public use_end
- public user_back
- public user_back
- public user_begin
- public user_begin
- public user_empty
- public user_end
- public user_end
- public users
- public users
- public uses
- public uses
Methods
¶void BuildLazyArguments() const
void BuildLazyArguments() const
Declared at: llvm/include/llvm/IR/Function.h:116
¶void CheckLazyArguments() const
void CheckLazyArguments() const
Declared at: llvm/include/llvm/IR/Function.h:111
¶static llvm::Function* Create(
llvm::FunctionType* Ty,
llvm::GlobalValue::LinkageTypes Linkage,
unsigned int AddrSpace,
const llvm::Twine& N = "",
llvm::Module* M = nullptr)
static llvm::Function* Create(
llvm::FunctionType* Ty,
llvm::GlobalValue::LinkageTypes Linkage,
unsigned int AddrSpace,
const llvm::Twine& N = "",
llvm::Module* M = nullptr)
Declared at: llvm/include/llvm/IR/Function.h:137
Parameters
- llvm::FunctionType* Ty
- llvm::GlobalValue::LinkageTypes Linkage
- unsigned int AddrSpace
- const llvm::Twine& N = ""
- llvm::Module* M = nullptr
¶static llvm::Function* Create(
llvm::FunctionType* Ty,
llvm::GlobalValue::LinkageTypes Linkage,
const llvm::Twine& N = "",
llvm::Module* M = nullptr)
static llvm::Function* Create(
llvm::FunctionType* Ty,
llvm::GlobalValue::LinkageTypes Linkage,
const llvm::Twine& N = "",
llvm::Module* M = nullptr)
Declared at: llvm/include/llvm/IR/Function.h:144
Parameters
- llvm::FunctionType* Ty
- llvm::GlobalValue::LinkageTypes Linkage
- const llvm::Twine& N = ""
- llvm::Module* M = nullptr
¶static llvm::Function* Create(
llvm::FunctionType* Ty,
llvm::GlobalValue::LinkageTypes Linkage,
const llvm::Twine& N,
llvm::Module& M)
static llvm::Function* Create(
llvm::FunctionType* Ty,
llvm::GlobalValue::LinkageTypes Linkage,
const llvm::Twine& N,
llvm::Module& M)
Description
Creates a new function and attaches it to a module. Places the function in the program address space as specified by the module's data layout.
Declared at: llvm/include/llvm/IR/Function.h:153
Parameters
- llvm::FunctionType* Ty
- llvm::GlobalValue::LinkageTypes Linkage
- const llvm::Twine& N
- llvm::Module& M
¶Function(llvm::FunctionType* Ty,
llvm::GlobalValue::LinkageTypes Linkage,
unsigned int AddrSpace,
const llvm::Twine& N = "",
llvm::Module* M = nullptr)
Function(llvm::FunctionType* Ty,
llvm::GlobalValue::LinkageTypes Linkage,
unsigned int AddrSpace,
const llvm::Twine& N = "",
llvm::Module* M = nullptr)
Description
Function ctor - If the (optional) Module argument is specified, the function is automatically inserted into the end of the function list for the module.
Declared at: llvm/include/llvm/IR/Function.h:124
Parameters
- llvm::FunctionType* Ty
- llvm::GlobalValue::LinkageTypes Linkage
- unsigned int AddrSpace
- const llvm::Twine& N = ""
- llvm::Module* M = nullptr
¶Function(const llvm::Function&)
Function(const llvm::Function&)
Declared at: llvm/include/llvm/IR/Function.h:128
Parameters
- const llvm::Function&
¶void addAttributeAtIndex(unsigned int i,
llvm::Attribute Attr)
void addAttributeAtIndex(unsigned int i,
llvm::Attribute Attr)
Description
adds the attribute to the list of attributes.
Declared at: llvm/include/llvm/IR/Function.h:321
Parameters
- unsigned int i
- llvm::Attribute Attr
¶void addDereferenceableOrNullParamAttr(
unsigned int ArgNo,
uint64_t Bytes)
void addDereferenceableOrNullParamAttr(
unsigned int ArgNo,
uint64_t Bytes)
Description
adds the dereferenceable_or_null attribute to the list of attributes for the given arg.
Declared at: llvm/include/llvm/IR/Function.h:430
Parameters
- unsigned int ArgNo
- uint64_t Bytes
¶void addDereferenceableParamAttr(
unsigned int ArgNo,
uint64_t Bytes)
void addDereferenceableParamAttr(
unsigned int ArgNo,
uint64_t Bytes)
Description
adds the dereferenceable attribute to the list of attributes for the given arg.
Declared at: llvm/include/llvm/IR/Function.h:426
Parameters
- unsigned int ArgNo
- uint64_t Bytes
¶void addFnAttr(llvm::Attribute Attr)
void addFnAttr(llvm::Attribute Attr)
Description
Add function attributes to this function.
Declared at: llvm/include/llvm/IR/Function.h:330
Parameters
- llvm::Attribute Attr
¶void addFnAttr(
llvm::StringRef Kind,
llvm::StringRef Val = llvm::StringRef())
void addFnAttr(
llvm::StringRef Kind,
llvm::StringRef Val = llvm::StringRef())
Description
Add function attributes to this function.
Declared at: llvm/include/llvm/IR/Function.h:327
Parameters
- llvm::StringRef Kind
- llvm::StringRef Val = llvm::StringRef()
¶void addFnAttr(Attribute::AttrKind Kind)
void addFnAttr(Attribute::AttrKind Kind)
Description
Add function attributes to this function.
Declared at: llvm/include/llvm/IR/Function.h:324
Parameters
- Attribute::AttrKind Kind
¶void addFnAttrs(const llvm::AttrBuilder& Attrs)
void addFnAttrs(const llvm::AttrBuilder& Attrs)
Description
Add function attributes to this function.
Declared at: llvm/include/llvm/IR/Function.h:333
Parameters
- const llvm::AttrBuilder& Attrs
¶void addParamAttr(unsigned int ArgNo,
llvm::Attribute Attr)
void addParamAttr(unsigned int ArgNo,
llvm::Attribute Attr)
Description
adds the attribute to the list of attributes for the given arg.
Declared at: llvm/include/llvm/IR/Function.h:348
Parameters
- unsigned int ArgNo
- llvm::Attribute Attr
¶void addParamAttr(unsigned int ArgNo,
Attribute::AttrKind Kind)
void addParamAttr(unsigned int ArgNo,
Attribute::AttrKind Kind)
Description
adds the attribute to the list of attributes for the given arg.
Declared at: llvm/include/llvm/IR/Function.h:345
Parameters
- unsigned int ArgNo
- Attribute::AttrKind Kind
¶void addParamAttrs(unsigned int ArgNo,
const llvm::AttrBuilder& Attrs)
void addParamAttrs(unsigned int ArgNo,
const llvm::AttrBuilder& Attrs)
Description
adds the attributes to the list of attributes for the given arg.
Declared at: llvm/include/llvm/IR/Function.h:351
Parameters
- unsigned int ArgNo
- const llvm::AttrBuilder& Attrs
¶void addRetAttr(llvm::Attribute Attr)
void addRetAttr(llvm::Attribute Attr)
Description
Add return value attributes to this function.
Declared at: llvm/include/llvm/IR/Function.h:339
Parameters
- llvm::Attribute Attr
¶void addRetAttr(Attribute::AttrKind Kind)
void addRetAttr(Attribute::AttrKind Kind)
Description
Add return value attributes to this function.
Declared at: llvm/include/llvm/IR/Function.h:336
Parameters
- Attribute::AttrKind Kind
¶void addRetAttrs(const llvm::AttrBuilder& Attrs)
void addRetAttrs(const llvm::AttrBuilder& Attrs)
Description
Add return value attributes to this function.
Declared at: llvm/include/llvm/IR/Function.h:342
Parameters
- const llvm::AttrBuilder& Attrs
¶void allocHungoffUselist()
void allocHungoffUselist()
Declared at: llvm/include/llvm/IR/Function.h:895
¶llvm::Function::const_arg_iterator arg_begin()
const
llvm::Function::const_arg_iterator arg_begin()
const
Declared at: llvm/include/llvm/IR/Function.h:745
¶llvm::Function::arg_iterator arg_begin()
llvm::Function::arg_iterator arg_begin()
Description
@ {
Declared at: llvm/include/llvm/IR/Function.h:741
¶bool arg_empty() const
bool arg_empty() const
Declared at: llvm/include/llvm/IR/Function.h:775
¶llvm::Function::arg_iterator arg_end()
llvm::Function::arg_iterator arg_end()
Declared at: llvm/include/llvm/IR/Function.h:750
¶llvm::Function::const_arg_iterator arg_end() const
llvm::Function::const_arg_iterator arg_end() const
Declared at: llvm/include/llvm/IR/Function.h:754
¶size_t arg_size() const
size_t arg_size() const
Description
@ }
Declared at: llvm/include/llvm/IR/Function.h:774
¶iterator_range<llvm::Function::arg_iterator>
args()
iterator_range<llvm::Function::arg_iterator>
args()
Declared at: llvm/include/llvm/IR/Function.h:765
¶iterator_range<llvm::Function::const_arg_iterator>
args() const
iterator_range<llvm::Function::const_arg_iterator>
args() const
Declared at: llvm/include/llvm/IR/Function.h:768
¶const llvm::BasicBlock& back() const
const llvm::BasicBlock& back() const
Declared at: llvm/include/llvm/IR/Function.h:735
¶llvm::BasicBlock& back()
llvm::BasicBlock& back()
Declared at: llvm/include/llvm/IR/Function.h:736
¶llvm::Function::const_iterator begin() const
llvm::Function::const_iterator begin() const
Declared at: llvm/include/llvm/IR/Function.h:727
¶llvm::Function::iterator begin()
llvm::Function::iterator begin()
Declared at: llvm/include/llvm/IR/Function.h:726
¶bool callsFunctionThatReturnsTwice() const
bool callsFunctionThatReturnsTwice() const
Description
callsFunctionThatReturnsTwice - Return true if the function has a call to setjmp or other function that gcc recognizes as "returning twice".
Declared at: llvm/include/llvm/IR/Function.h:872
¶bool cannotDuplicate() const
bool cannotDuplicate() const
Description
Determine if the call cannot be duplicated.
Declared at: llvm/include/llvm/IR/Function.h:563
¶static bool classof(const llvm::Value* V)
static bool classof(const llvm::Value* V)
Description
Methods for support type inquiry through isa, cast, and dyn_cast:
Declared at: llvm/include/llvm/IR/Function.h:834
Parameters
- const llvm::Value* V
¶void clearArguments()
void clearArguments()
Declared at: llvm/include/llvm/IR/Function.h:118
¶void clearGC()
void clearGC()
Declared at: llvm/include/llvm/IR/Function.h:311
¶void copyAttributesFrom(const llvm::Function* Src)
void copyAttributesFrom(const llvm::Function* Src)
Description
copyAttributesFrom - copy all additional attributes (those not needed to create a Function) from the Function Src to this one.
Declared at: llvm/include/llvm/IR/Function.h:674
Parameters
- const llvm::Function* Src
¶static llvm::Function* createWithDefaultAttr(
llvm::FunctionType* Ty,
llvm::GlobalValue::LinkageTypes Linkage,
unsigned int AddrSpace,
const llvm::Twine& N = "",
llvm::Module* M = nullptr)
static llvm::Function* createWithDefaultAttr(
llvm::FunctionType* Ty,
llvm::GlobalValue::LinkageTypes Linkage,
unsigned int AddrSpace,
const llvm::Twine& N = "",
llvm::Module* M = nullptr)
Description
Creates a function with some attributes recorded in llvm.module.flags applied. Use this when synthesizing new functions that need attributes that would have been set by command line options.
Declared at: llvm/include/llvm/IR/Function.h:161
Parameters
- llvm::FunctionType* Ty
- llvm::GlobalValue::LinkageTypes Linkage
- unsigned int AddrSpace
- const llvm::Twine& N = ""
- llvm::Module* M = nullptr
¶void deleteBody()
void deleteBody()
Description
deleteBody - This method deletes the body of the function, and converts the linkage to external.
Declared at: llvm/include/llvm/IR/Function.h:679
¶bool doesNoCfCheck() const
bool doesNoCfCheck() const
Description
Determine if the function should not perform indirect branch tracking.
Declared at: llvm/include/llvm/IR/Function.h:552
¶bool doesNotAccessMemory() const
bool doesNotAccessMemory() const
Description
Determine if the function does not access memory.
Declared at: llvm/include/llvm/IR/Function.h:495
¶bool doesNotFreeMemory() const
bool doesNotFreeMemory() const
Description
Determine if the call might deallocate memory.
Declared at: llvm/include/llvm/IR/Function.h:590
¶bool doesNotRecurse() const
bool doesNotRecurse() const
Description
Determine if the function is known not to recurse, directly or indirectly.
Declared at: llvm/include/llvm/IR/Function.h:607
¶bool doesNotReturn() const
bool doesNotReturn() const
Description
Determine if the function cannot return.
Declared at: llvm/include/llvm/IR/Function.h:544
¶bool doesNotThrow() const
bool doesNotThrow() const
Description
Determine if the function cannot unwind.
Declared at: llvm/include/llvm/IR/Function.h:555
¶void dropAllReferences()
void dropAllReferences()
Description
dropAllReferences() - This method causes all the subinstructions to "let go" of all references that they are maintaining. This allows one to 'delete' a whole module at a time, even though there may be circular references... first all references are dropped, and all use counts go to zero. Then everything is deleted for real. Note that no operations are valid on an object that has "dropped all references", except operator delete. Since no other object in the module can have references into the body of a function, dropping all references deletes the entire body of the function, including any contained basic blocks.
Declared at: llvm/include/llvm/IR/Function.h:850
¶bool empty() const
bool empty() const
Declared at: llvm/include/llvm/IR/Function.h:732
¶llvm::Function::const_iterator end() const
llvm::Function::const_iterator end() const
Declared at: llvm/include/llvm/IR/Function.h:729
¶llvm::Function::iterator end()
llvm::Function::iterator end()
Declared at: llvm/include/llvm/IR/Function.h:728
¶void eraseFromParent()
void eraseFromParent()
Description
eraseFromParent - This method unlinks 'this' from the containing module and deletes it.
Declared at: llvm/include/llvm/IR/Function.h:692
¶llvm::BasicBlock& front()
llvm::BasicBlock& front()
Declared at: llvm/include/llvm/IR/Function.h:734
¶const llvm::BasicBlock& front() const
const llvm::BasicBlock& front() const
Declared at: llvm/include/llvm/IR/Function.h:733
¶llvm::Argument* getArg(unsigned int i) const
llvm::Argument* getArg(unsigned int i) const
Declared at: llvm/include/llvm/IR/Function.h:759
Parameters
- unsigned int i
¶llvm::Attribute getAttributeAtIndex(
unsigned int i,
Attribute::AttrKind Kind) const
llvm::Attribute getAttributeAtIndex(
unsigned int i,
Attribute::AttrKind Kind) const
Description
gets the attribute from the list of attributes.
Declared at: llvm/include/llvm/IR/Function.h:398
Parameters
- unsigned int i
- Attribute::AttrKind Kind
¶llvm::Attribute getAttributeAtIndex(
unsigned int i,
llvm::StringRef Kind) const
llvm::Attribute getAttributeAtIndex(
unsigned int i,
llvm::StringRef Kind) const
Description
gets the attribute from the list of attributes.
Declared at: llvm/include/llvm/IR/Function.h:401
Parameters
- unsigned int i
- llvm::StringRef Kind
¶llvm::AttributeList getAttributes() const
llvm::AttributeList getAttributes() const
Description
Return the attribute list for this Function.
Declared at: llvm/include/llvm/IR/Function.h:314
¶const llvm::Function::BasicBlockListType&
getBasicBlockList() const
const llvm::Function::BasicBlockListType&
getBasicBlockList() const
Description
Get the underlying elements of the Function... the basic block list is empty for external functions.
Declared at: llvm/include/llvm/IR/Function.h:703
¶llvm::Function::BasicBlockListType&
getBasicBlockList()
llvm::Function::BasicBlockListType&
getBasicBlockList()
Declared at: llvm/include/llvm/IR/Function.h:704
¶CallingConv::ID getCallingConv() const
CallingConv::ID getCallingConv() const
Description
getCallingConv()/setCallingConv(CC) - These method get and set the calling convention of this function. The enum values for the known calling conventions are defined in CallingConv.h.
Declared at: llvm/include/llvm/IR/Function.h:238
¶llvm::LLVMContext& getContext() const
llvm::LLVMContext& getContext() const
Description
getContext - Return a reference to the LLVMContext associated with this function.
Declared at: llvm/include/llvm/IR/Function.h:184
¶llvm::DenormalMode getDenormalMode(
const llvm::fltSemantics& FPType) const
llvm::DenormalMode getDenormalMode(
const llvm::fltSemantics& FPType) const
Description
Returns the denormal handling type for the default rounding mode of the function.
Declared at: llvm/include/llvm/IR/Function.h:670
Parameters
- const llvm::fltSemantics& FPType
¶llvm::BasicBlock& getEntryBlock()
llvm::BasicBlock& getEntryBlock()
Declared at: llvm/include/llvm/IR/Function.h:711
¶const llvm::BasicBlock& getEntryBlock() const
const llvm::BasicBlock& getEntryBlock() const
Declared at: llvm/include/llvm/IR/Function.h:710
¶Optional<llvm::Function::ProfileCount>
getEntryCount(bool AllowSynthetic = false) const
Optional<llvm::Function::ProfileCount>
getEntryCount(bool AllowSynthetic = false) const
Description
Get the entry count for this function. Entry count is the number of times the function was executed. When AllowSynthetic is false, only pgo_data will be returned.
Declared at: llvm/include/llvm/IR/Function.h:283
Parameters
- bool AllowSynthetic = false
¶llvm::Attribute getFnAttribute(
Attribute::AttrKind Kind) const
llvm::Attribute getFnAttribute(
Attribute::AttrKind Kind) const
Description
Return the attribute for the given attribute kind.
Declared at: llvm/include/llvm/IR/Function.h:404
Parameters
- Attribute::AttrKind Kind
¶llvm::Attribute getFnAttribute(
llvm::StringRef Kind) const
llvm::Attribute getFnAttribute(
llvm::StringRef Kind) const
Description
Return the attribute for the given attribute kind.
Declared at: llvm/include/llvm/IR/Function.h:407
Parameters
- llvm::StringRef Kind
¶llvm::MaybeAlign getFnStackAlign() const
llvm::MaybeAlign getFnStackAlign() const
Description
Return the stack alignment for the function.
Declared at: llvm/include/llvm/IR/Function.h:417
¶const llvm::Function& getFunction() const
const llvm::Function& getFunction() const
Declared at: llvm/include/llvm/IR/Function.h:135
¶llvm::FunctionType* getFunctionType() const
llvm::FunctionType* getFunctionType() const
Description
Returns the FunctionType for me.
Declared at: llvm/include/llvm/IR/Function.h:175
¶const std::string& getGC() const
const std::string& getGC() const
Declared at: llvm/include/llvm/IR/Function.h:309
¶DenseSet<GlobalValue::GUID> getImportGUIDs() const
DenseSet<GlobalValue::GUID> getImportGUIDs() const
Description
Returns the set of GUIDs that needs to be imported to the function for sample PGO, to enable the same inlines as the profiled optimized binary.
Declared at: llvm/include/llvm/IR/Function.h:296
¶unsigned int getInstructionCount() const
unsigned int getInstructionCount() const
Description
Returns the number of non-debug IR instructions in this function. This is equivalent to the sum of the sizes of each basic block contained within this function.
Declared at: llvm/include/llvm/IR/Function.h:172
¶Intrinsic::ID getIntrinsicID() const
Intrinsic::ID getIntrinsicID() const
Description
getIntrinsicID - This method returns the ID number of the specified function, or Intrinsic::not_intrinsic if the function is not an intrinsic, or if the pointer is null. This value is always defined to be zero to allow easy checking for whether a function is intrinsic or not. The particular intrinsic functions which correspond to this value are defined in llvm/Intrinsics.h.
Declared at: llvm/include/llvm/IR/Function.h:205
¶llvm::MaybeAlign getParamAlign(
unsigned int ArgNo) const
llvm::MaybeAlign getParamAlign(
unsigned int ArgNo) const
Declared at: llvm/include/llvm/IR/Function.h:441
Parameters
- unsigned int ArgNo
¶uint64_t getParamAlignment(
unsigned int ArgNo) const
uint64_t getParamAlignment(
unsigned int ArgNo) const
Description
Extract the alignment for a call or parameter (0=unknown). FIXME: Remove this function once transition to Align is over. Use getParamAlign() instead.
Declared at: llvm/include/llvm/IR/Function.h:435
Parameters
- unsigned int ArgNo
¶llvm::Attribute getParamAttribute(
unsigned int ArgNo,
Attribute::AttrKind Kind) const
llvm::Attribute getParamAttribute(
unsigned int ArgNo,
Attribute::AttrKind Kind) const
Description
gets the specified attribute from the list of attributes.
Declared at: llvm/include/llvm/IR/Function.h:410
Parameters
- unsigned int ArgNo
- Attribute::AttrKind Kind
¶llvm::Type* getParamByRefType(
unsigned int ArgNo) const
llvm::Type* getParamByRefType(
unsigned int ArgNo) const
Description
Extract the byref type for a parameter.
Declared at: llvm/include/llvm/IR/Function.h:465
Parameters
- unsigned int ArgNo
¶llvm::Type* getParamByValType(
unsigned int ArgNo) const
llvm::Type* getParamByValType(
unsigned int ArgNo) const
Description
Extract the byval type for a parameter.
Declared at: llvm/include/llvm/IR/Function.h:450
Parameters
- unsigned int ArgNo
¶uint64_t getParamDereferenceableBytes(
unsigned int ArgNo) const
uint64_t getParamDereferenceableBytes(
unsigned int ArgNo) const
Description
Extract the number of dereferenceable bytes for a parameter.
Declared at: llvm/include/llvm/IR/Function.h:476
Parameters
- unsigned int ArgNo
- Index of an argument, with 0 being the first function arg.
¶uint64_t getParamDereferenceableOrNullBytes(
unsigned int ArgNo) const
uint64_t getParamDereferenceableOrNullBytes(
unsigned int ArgNo) const
Description
Extract the number of dereferenceable_or_null bytes for a parameter.
Declared at: llvm/include/llvm/IR/Function.h:483
Parameters
- unsigned int ArgNo
- AttributeList ArgNo, referring to an argument.
¶llvm::Type* getParamInAllocaType(
unsigned int ArgNo) const
llvm::Type* getParamInAllocaType(
unsigned int ArgNo) const
Description
Extract the inalloca type for a parameter.
Declared at: llvm/include/llvm/IR/Function.h:460
Parameters
- unsigned int ArgNo
¶llvm::Type* getParamPreallocatedType(
unsigned int ArgNo) const
llvm::Type* getParamPreallocatedType(
unsigned int ArgNo) const
Description
Extract the preallocated type for a parameter.
Declared at: llvm/include/llvm/IR/Function.h:470
Parameters
- unsigned int ArgNo
¶llvm::MaybeAlign getParamStackAlign(
unsigned int ArgNo) const
llvm::MaybeAlign getParamStackAlign(
unsigned int ArgNo) const
Declared at: llvm/include/llvm/IR/Function.h:445
Parameters
- unsigned int ArgNo
¶llvm::Type* getParamStructRetType(
unsigned int ArgNo) const
llvm::Type* getParamStructRetType(
unsigned int ArgNo) const
Description
Extract the sret type for a parameter.
Declared at: llvm/include/llvm/IR/Function.h:455
Parameters
- unsigned int ArgNo
¶llvm::Constant* getPersonalityFn() const
llvm::Constant* getPersonalityFn() const
Description
Get the personality function associated with this function.
Declared at: llvm/include/llvm/IR/Function.h:783
¶llvm::Constant* getPrefixData() const
llvm::Constant* getPrefixData() const
Description
Get the prefix data associated with this function.
Declared at: llvm/include/llvm/IR/Function.h:792
¶llvm::Constant* getPrologueData() const
llvm::Constant* getPrologueData() const
Description
Get the prologue data associated with this function.
Declared at: llvm/include/llvm/IR/Function.h:801
¶llvm::Type* getReturnType() const
llvm::Type* getReturnType() const
Description
Returns the type of the ret val.
Declared at: llvm/include/llvm/IR/Function.h:180
¶Optional<llvm::StringRef> getSectionPrefix() const
Optional<llvm::StringRef> getSectionPrefix() const
Description
Get the section prefix for this function.
Declared at: llvm/include/llvm/IR/Function.h:302
¶static llvm::Function::BasicBlockListType
llvm::Function::*
getSublistAccess(llvm::BasicBlock*)
static llvm::Function::BasicBlockListType
llvm::Function::*
getSublistAccess(llvm::BasicBlock*)
Declared at: llvm/include/llvm/IR/Function.h:706
Parameters
¶llvm::DISubprogram* getSubprogram() const
llvm::DISubprogram* getSubprogram() const
Description
Get the attached subprogram. Calls \a getMetadata() with \a LLVMContext::MD_dbg and casts the result to \a DISubprogram.
Declared at: llvm/include/llvm/IR/Function.h:883
¶llvm::UWTableKind getUWTableKind() const
llvm::UWTableKind getUWTableKind() const
Description
Get what kind of unwind table entry to generate for this function.
Declared at: llvm/include/llvm/IR/Function.h:626
¶inline llvm::ValueSymbolTable*
getValueSymbolTable()
inline llvm::ValueSymbolTable*
getValueSymbolTable()
Description
getSymbolTable() - Return the symbol table if any, otherwise nullptr.
Declared at: llvm/include/llvm/IR/Function.h:718
¶inline const llvm::ValueSymbolTable*
getValueSymbolTable() const
inline const llvm::ValueSymbolTable*
getValueSymbolTable() const
Declared at: llvm/include/llvm/IR/Function.h:719
¶bool hasAddressTaken(
const llvm::User** = nullptr,
bool IgnoreCallbackUses = false,
bool IgnoreAssumeLikeCalls = true,
bool IngoreLLVMUsed = false,
bool IgnoreARCAttachedCall = false) const
bool hasAddressTaken(
const llvm::User** = nullptr,
bool IgnoreCallbackUses = false,
bool IgnoreAssumeLikeCalls = true,
bool IngoreLLVMUsed = false,
bool IgnoreARCAttachedCall = false) const
Description
hasAddressTaken - returns true if there are any uses of this function other than direct calls or invokes to it, or blockaddress expressions. Optionally passes back an offending user for diagnostic purposes, ignores callback uses, assume like pointer annotation calls, references in llvm.used and llvm.compiler.used variables, and operand bundle "clang.arc.attachedcall".
Declared at: llvm/include/llvm/IR/Function.h:858
Parameters
- const llvm::User** = nullptr
- bool IgnoreCallbackUses = false
- bool IgnoreAssumeLikeCalls = true
- bool IngoreLLVMUsed = false
- bool IgnoreARCAttachedCall = false
¶bool hasFnAttribute(llvm::StringRef Kind) const
bool hasFnAttribute(llvm::StringRef Kind) const
Description
Return true if the function has the attribute.
Declared at: llvm/include/llvm/IR/Function.h:389
Parameters
- llvm::StringRef Kind
¶bool hasFnAttribute(
Attribute::AttrKind Kind) const
bool hasFnAttribute(
Attribute::AttrKind Kind) const
Description
Return true if the function has the attribute.
Declared at: llvm/include/llvm/IR/Function.h:386
Parameters
- Attribute::AttrKind Kind
¶bool hasGC() const
bool hasGC() const
Description
hasGC/getGC/setGC/clearGC - The name of the garbage collection algorithm to use during code generation.
Declared at: llvm/include/llvm/IR/Function.h:306
¶bool hasLazyArguments() const
bool hasLazyArguments() const
Description
hasLazyArguments/CheckLazyArguments - The argument list of a function is built on demand, so that the list isn't allocated until the first client needs it. The hasLazyArguments predicate returns true if the arg list hasn't been set up yet.
Declared at: llvm/include/llvm/IR/Function.h:106
¶bool hasMinSize() const
bool hasMinSize() const
Description
Optimize this function for minimum size (-Oz).
Declared at: llvm/include/llvm/IR/Function.h:661
¶bool hasNoSync() const
bool hasNoSync() const
Description
Determine if the call can synchroize with other threads
Declared at: llvm/include/llvm/IR/Function.h:598
¶bool hasOptNone() const
bool hasOptNone() const
Description
Do not optimize this function (-O0).
Declared at: llvm/include/llvm/IR/Function.h:658
¶bool hasOptSize() const
bool hasOptSize() const
Description
Optimize this function for size (-Os) or minimum size (-Oz).
Declared at: llvm/include/llvm/IR/Function.h:664
¶bool hasParamAttribute(
unsigned int ArgNo,
Attribute::AttrKind Kind) const
bool hasParamAttribute(
unsigned int ArgNo,
Attribute::AttrKind Kind) const
Description
check if an attributes is in the list of attributes.
Declared at: llvm/include/llvm/IR/Function.h:395
Parameters
- unsigned int ArgNo
- Attribute::AttrKind Kind
¶bool hasPersonalityFn() const
bool hasPersonalityFn() const
Description
Check whether this function has a personality function.
Declared at: llvm/include/llvm/IR/Function.h:778
¶bool hasPrefixData() const
bool hasPrefixData() const
Description
Check whether this function has prefix data.
Declared at: llvm/include/llvm/IR/Function.h:787
¶bool hasProfileData(
bool IncludeSynthetic = false) const
bool hasProfileData(
bool IncludeSynthetic = false) const
Description
Return true if the function is annotated with profile data. Presence of entry counts from a profile run implies the function has profile annotations. If IncludeSynthetic is false, only return true when the profile data is real.
Declared at: llvm/include/llvm/IR/Function.h:290
Parameters
- bool IncludeSynthetic = false
¶bool hasPrologueData() const
bool hasPrologueData() const
Description
Check whether this function has prologue data.
Declared at: llvm/include/llvm/IR/Function.h:796
¶bool hasRetAttribute(
Attribute::AttrKind Kind) const
bool hasRetAttribute(
Attribute::AttrKind Kind) const
Description
check if an attribute is in the list of attributes for the return value.
Declared at: llvm/include/llvm/IR/Function.h:392
Parameters
- Attribute::AttrKind Kind
¶bool hasStackProtectorFnAttr() const
bool hasStackProtectorFnAttr() const
Description
Returns true if the function has ssp, sspstrong, or sspreq fn attrs.
Declared at: llvm/include/llvm/IR/Function.h:422
¶bool hasStructRetAttr() const
bool hasStructRetAttr() const
Description
Determine if the function returns a structure through first or second pointer argument.
Declared at: llvm/include/llvm/IR/Function.h:645
¶bool hasUWTable() const
bool hasUWTable() const
Description
True if the ABI mandates (or the user requested) that this function be in a unwind table.
Declared at: llvm/include/llvm/IR/Function.h:632
¶bool isConstrainedFPIntrinsic() const
bool isConstrainedFPIntrinsic() const
Description
Returns true if the function is one of the "Constrained Floating-Point Intrinsics". Returns false if not, and returns false when getIntrinsicID() returns Intrinsic::not_intrinsic.
Declared at: llvm/include/llvm/IR/Function.h:224
¶bool isConvergent() const
bool isConvergent() const
Description
Determine if the call is convergent.
Declared at: llvm/include/llvm/IR/Function.h:571
¶bool isDebugInfoForProfiling() const
bool isDebugInfoForProfiling() const
Description
Returns true if we should emit debug info for profiling.
Declared at: llvm/include/llvm/IR/Function.h:886
¶bool isDefTriviallyDead() const
bool isDefTriviallyDead() const
Description
isDefTriviallyDead - Return true if it is trivially safe to remove this function definition from the module (because it isn't externally visible, does not have its address taken, and has no callers). To make this more accurate, call removeDeadConstantUsers first.
Declared at: llvm/include/llvm/IR/Function.h:868
¶bool isIntrinsic() const
bool isIntrinsic() const
Description
isIntrinsic - Returns true if the function's name starts with "llvm.". It's possible for this function to return true while getIntrinsicID() returns Intrinsic::not_intrinsic!
Declared at: llvm/include/llvm/IR/Function.h:210
¶bool isMaterializable() const
bool isMaterializable() const
Declared at: llvm/include/llvm/IR/Function.h:190
¶bool isPresplitCoroutine() const
bool isPresplitCoroutine() const
Description
Determine if the function is presplit coroutine.
Declared at: llvm/include/llvm/IR/Function.h:488
¶bool isSpeculatable() const
bool isSpeculatable() const
Description
Determine if the call has sideeffects.
Declared at: llvm/include/llvm/IR/Function.h:582
¶bool isTargetIntrinsic() const
bool isTargetIntrinsic() const
Description
isTargetIntrinsic - Returns true if this function is an intrinsic and the intrinsic is specific to a certain target. If this is not an intrinsic or a generic intrinsic, false is returned.
Declared at: llvm/include/llvm/IR/Function.h:219
¶static bool isTargetIntrinsic(Intrinsic::ID IID)
static bool isTargetIntrinsic(Intrinsic::ID IID)
Description
isTargetIntrinsic - Returns true if IID is an intrinsic specific to a certain target. If it is a generic intrinsic false is returned.
Declared at: llvm/include/llvm/IR/Function.h:214
Parameters
- Intrinsic::ID IID
¶bool isVarArg() const
bool isVarArg() const
Description
isVarArg - Return true if this function takes a variable number of arguments.
Declared at: llvm/include/llvm/IR/Function.h:188
¶static Intrinsic::ID lookupIntrinsicID(
llvm::StringRef Name)
static Intrinsic::ID lookupIntrinsicID(
llvm::StringRef Name)
Declared at: llvm/include/llvm/IR/Function.h:226
Parameters
- llvm::StringRef Name
¶bool mustProgress() const
bool mustProgress() const
Description
Determine if the function is required to make forward progress.
Declared at: llvm/include/llvm/IR/Function.h:615
¶bool needsUnwindTableEntry() const
bool needsUnwindTableEntry() const
Description
True if this function needs an unwind table.
Declared at: llvm/include/llvm/IR/Function.h:639
¶bool nullPointerIsDefined() const
bool nullPointerIsDefined() const
Description
Check if null pointer dereferencing is considered undefined behavior for the function. Return value: false => null pointer dereference is undefined. Return value: true => null pointer dereference is not undefined.
Declared at: llvm/include/llvm/IR/Function.h:892
¶bool onlyAccessesArgMemory() const
bool onlyAccessesArgMemory() const
Description
Determine if the call can access memmory only using pointers based on its arguments.
Declared at: llvm/include/llvm/IR/Function.h:520
¶bool onlyAccessesInaccessibleMemOrArgMem() const
bool onlyAccessesInaccessibleMemOrArgMem() const
Description
Determine if the function may only access memory that is either inaccessible from the IR or pointed to by its arguments.
Declared at: llvm/include/llvm/IR/Function.h:536
¶bool onlyAccessesInaccessibleMemory() const
bool onlyAccessesInaccessibleMemory() const
Description
Determine if the function may only access memory that is inaccessible from the IR.
Declared at: llvm/include/llvm/IR/Function.h:527
¶bool onlyReadsMemory() const
bool onlyReadsMemory() const
Description
Determine if the function does not access or only reads memory.
Declared at: llvm/include/llvm/IR/Function.h:503
¶bool onlyWritesMemory() const
bool onlyWritesMemory() const
Description
Determine if the function does not access or only writes memory.
Declared at: llvm/include/llvm/IR/Function.h:511
¶void print(
llvm::raw_ostream& OS,
llvm::AssemblyAnnotationWriter* AAW = nullptr,
bool ShouldPreserveUseListOrder = false,
bool IsForDebug = false) const
void print(
llvm::raw_ostream& OS,
llvm::AssemblyAnnotationWriter* AAW = nullptr,
bool ShouldPreserveUseListOrder = false,
bool IsForDebug = false) const
Description
Print the function to an output stream with an optional AssemblyAnnotationWriter.
Declared at: llvm/include/llvm/IR/Function.h:806
Parameters
- llvm::raw_ostream& OS
- llvm::AssemblyAnnotationWriter* AAW = nullptr
- bool ShouldPreserveUseListOrder = false
- bool IsForDebug = false
¶void recalculateIntrinsicID()
void recalculateIntrinsicID()
Description
Recalculate the ID for this function if it is an Intrinsic defined in llvm/Intrinsics.h. Sets the intrinsic ID to Intrinsic::not_intrinsic if the name of this function does not match an intrinsic in that header. Note, this method does not need to be called directly, as it is called from Value::setName() whenever the name of this function changes.
Declared at: llvm/include/llvm/IR/Function.h:233
¶void removeAttributeAtIndex(unsigned int i,
llvm::StringRef Kind)
void removeAttributeAtIndex(unsigned int i,
llvm::StringRef Kind)
Description
removes the attribute from the list of attributes.
Declared at: llvm/include/llvm/IR/Function.h:357
Parameters
- unsigned int i
- llvm::StringRef Kind
¶void removeAttributeAtIndex(
unsigned int i,
Attribute::AttrKind Kind)
void removeAttributeAtIndex(
unsigned int i,
Attribute::AttrKind Kind)
Description
removes the attribute from the list of attributes.
Declared at: llvm/include/llvm/IR/Function.h:354
Parameters
- unsigned int i
- Attribute::AttrKind Kind
¶void removeFnAttr(llvm::StringRef Kind)
void removeFnAttr(llvm::StringRef Kind)
Description
Remove function attribute from this function.
Declared at: llvm/include/llvm/IR/Function.h:363
Parameters
- llvm::StringRef Kind
¶void removeFnAttr(Attribute::AttrKind Kind)
void removeFnAttr(Attribute::AttrKind Kind)
Description
Remove function attributes from this function.
Declared at: llvm/include/llvm/IR/Function.h:360
Parameters
- Attribute::AttrKind Kind
¶void removeFnAttrs(
const llvm::AttributeMask& Attrs)
void removeFnAttrs(
const llvm::AttributeMask& Attrs)
Declared at: llvm/include/llvm/IR/Function.h:365
Parameters
- const llvm::AttributeMask& Attrs
¶void removeFromParent()
void removeFromParent()
Description
removeFromParent - This method unlinks 'this' from the containing module, but does not delete it.
Declared at: llvm/include/llvm/IR/Function.h:687
¶void removeParamAttr(unsigned int ArgNo,
Attribute::AttrKind Kind)
void removeParamAttr(unsigned int ArgNo,
Attribute::AttrKind Kind)
Description
removes the attribute from the list of attributes.
Declared at: llvm/include/llvm/IR/Function.h:377
Parameters
- unsigned int ArgNo
- Attribute::AttrKind Kind
¶void removeParamAttr(unsigned int ArgNo,
llvm::StringRef Kind)
void removeParamAttr(unsigned int ArgNo,
llvm::StringRef Kind)
Description
removes the attribute from the list of attributes.
Declared at: llvm/include/llvm/IR/Function.h:380
Parameters
- unsigned int ArgNo
- llvm::StringRef Kind
¶void removeParamAttrs(
unsigned int ArgNo,
const llvm::AttributeMask& Attrs)
void removeParamAttrs(
unsigned int ArgNo,
const llvm::AttributeMask& Attrs)
Description
removes the attribute from the list of attributes.
Declared at: llvm/include/llvm/IR/Function.h:383
Parameters
- unsigned int ArgNo
- const llvm::AttributeMask& Attrs
¶void removeParamUndefImplyingAttrs(
unsigned int ArgNo)
void removeParamUndefImplyingAttrs(
unsigned int ArgNo)
Description
removes noundef and other attributes that imply undefined behavior if a `undef` or `poison` value is passed from the list of attributes.
Declared at: llvm/include/llvm/IR/Function.h:414
Parameters
- unsigned int ArgNo
¶void removeRetAttr(Attribute::AttrKind Kind)
void removeRetAttr(Attribute::AttrKind Kind)
Description
removes the attribute from the return value list of attributes.
Declared at: llvm/include/llvm/IR/Function.h:368
Parameters
- Attribute::AttrKind Kind
¶void removeRetAttr(llvm::StringRef Kind)
void removeRetAttr(llvm::StringRef Kind)
Description
removes the attribute from the return value list of attributes.
Declared at: llvm/include/llvm/IR/Function.h:371
Parameters
- llvm::StringRef Kind
¶void removeRetAttrs(
const llvm::AttributeMask& Attrs)
void removeRetAttrs(
const llvm::AttributeMask& Attrs)
Description
removes the attributes from the return value list of attributes.
Declared at: llvm/include/llvm/IR/Function.h:374
Parameters
- const llvm::AttributeMask& Attrs
¶bool returnDoesNotAlias() const
bool returnDoesNotAlias() const
Description
Determine if the parameter or return value is marked with NoAlias attribute.
Declared at: llvm/include/llvm/IR/Function.h:652
¶void setAttributes(llvm::AttributeList Attrs)
void setAttributes(llvm::AttributeList Attrs)
Description
Set the attribute list for this Function.
Declared at: llvm/include/llvm/IR/Function.h:317
Parameters
- llvm::AttributeList Attrs
¶void setCallingConv(CallingConv::ID CC)
void setCallingConv(CallingConv::ID CC)
Declared at: llvm/include/llvm/IR/Function.h:242
Parameters
- CallingConv::ID CC
¶void setCannotDuplicate()
void setCannotDuplicate()
Declared at: llvm/include/llvm/IR/Function.h:566
¶void setConvergent()
void setConvergent()
Declared at: llvm/include/llvm/IR/Function.h:574
¶void setDoesNotAccessMemory()
void setDoesNotAccessMemory()
Declared at: llvm/include/llvm/IR/Function.h:498
¶void setDoesNotFreeMemory()
void setDoesNotFreeMemory()
Declared at: llvm/include/llvm/IR/Function.h:593
¶void setDoesNotRecurse()
void setDoesNotRecurse()
Declared at: llvm/include/llvm/IR/Function.h:610
¶void setDoesNotReturn()
void setDoesNotReturn()
Declared at: llvm/include/llvm/IR/Function.h:547
¶void setDoesNotThrow()
void setDoesNotThrow()
Declared at: llvm/include/llvm/IR/Function.h:558
¶void setEntryCount(
uint64_t Count,
llvm::Function::ProfileCountType Type =
PCT_Real,
const DenseSet<GlobalValue::GUID>* Imports =
nullptr)
void setEntryCount(
uint64_t Count,
llvm::Function::ProfileCountType Type =
PCT_Real,
const DenseSet<GlobalValue::GUID>* Imports =
nullptr)
Description
A convenience wrapper for setting entry count
Declared at: llvm/include/llvm/IR/Function.h:276
Parameters
- uint64_t Count
- llvm::Function::ProfileCountType Type = PCT_Real
- const DenseSet<GlobalValue::GUID>* Imports = nullptr
¶void setEntryCount(
llvm::Function::ProfileCount Count,
const DenseSet<GlobalValue::GUID>* Imports =
nullptr)
void setEntryCount(
llvm::Function::ProfileCount Count,
const DenseSet<GlobalValue::GUID>* Imports =
nullptr)
Description
Set the entry count for this function. Entry count is the number of times this function was executed based on pgo data. \p Imports points to a set of GUIDs that needs to be imported by the function for sample PGO, to enable the same inlines as the profiled optimized binary.
Declared at: llvm/include/llvm/IR/Function.h:272
Parameters
- llvm::Function::ProfileCount Count
- const DenseSet<GlobalValue::GUID>* Imports = nullptr
¶void setGC(std::string Str)
void setGC(std::string Str)
Declared at: llvm/include/llvm/IR/Function.h:310
Parameters
- std::string Str
¶template <int Idx>
void setHungoffOperand(llvm::Constant* C)
template <int Idx>
void setHungoffOperand(llvm::Constant* C)
Declared at: llvm/include/llvm/IR/Function.h:896
Templates
- int Idx
Parameters
¶void setIsMaterializable(bool V)
void setIsMaterializable(bool V)
Declared at: llvm/include/llvm/IR/Function.h:193
Parameters
- bool V
¶void setMustProgress()
void setMustProgress()
Declared at: llvm/include/llvm/IR/Function.h:619
¶void setNoSync()
void setNoSync()
Declared at: llvm/include/llvm/IR/Function.h:601
¶void setNotConvergent()
void setNotConvergent()
Declared at: llvm/include/llvm/IR/Function.h:577
¶void setOnlyAccessesArgMemory()
void setOnlyAccessesArgMemory()
Declared at: llvm/include/llvm/IR/Function.h:523
¶void setOnlyAccessesInaccessibleMemOrArgMem()
void setOnlyAccessesInaccessibleMemOrArgMem()
Declared at: llvm/include/llvm/IR/Function.h:539
¶void setOnlyAccessesInaccessibleMemory()
void setOnlyAccessesInaccessibleMemory()
Declared at: llvm/include/llvm/IR/Function.h:530
¶void setOnlyReadsMemory()
void setOnlyReadsMemory()
Declared at: llvm/include/llvm/IR/Function.h:506
¶void setOnlyWritesMemory()
void setOnlyWritesMemory()
Declared at: llvm/include/llvm/IR/Function.h:514
¶void setPersonalityFn(llvm::Constant* Fn)
void setPersonalityFn(llvm::Constant* Fn)
Declared at: llvm/include/llvm/IR/Function.h:784
Parameters
- llvm::Constant* Fn
¶void setPrefixData(llvm::Constant* PrefixData)
void setPrefixData(llvm::Constant* PrefixData)
Declared at: llvm/include/llvm/IR/Function.h:793
Parameters
- llvm::Constant* PrefixData
¶void setPresplitCoroutine()
void setPresplitCoroutine()
Declared at: llvm/include/llvm/IR/Function.h:491
¶void setPrologueData(llvm::Constant* PrologueData)
void setPrologueData(llvm::Constant* PrologueData)
Declared at: llvm/include/llvm/IR/Function.h:802
Parameters
- llvm::Constant* PrologueData
¶void setReturnDoesNotAlias()
void setReturnDoesNotAlias()
Declared at: llvm/include/llvm/IR/Function.h:655
¶void setSectionPrefix(llvm::StringRef Prefix)
void setSectionPrefix(llvm::StringRef Prefix)
Description
Set the section prefix for this function.
Declared at: llvm/include/llvm/IR/Function.h:299
Parameters
- llvm::StringRef Prefix
¶void setSpeculatable()
void setSpeculatable()
Declared at: llvm/include/llvm/IR/Function.h:585
¶void setSplittedCoroutine()
void setSplittedCoroutine()
Declared at: llvm/include/llvm/IR/Function.h:492
¶void setSubprogram(llvm::DISubprogram* SP)
void setSubprogram(llvm::DISubprogram* SP)
Description
Set the attached subprogram. Calls \a setMetadata() with \a LLVMContext::MD_dbg.
Declared at: llvm/include/llvm/IR/Function.h:877
Parameters
¶void setUWTableKind(llvm::UWTableKind K)
void setUWTableKind(llvm::UWTableKind K)
Declared at: llvm/include/llvm/IR/Function.h:635
Parameters
- llvm::UWTableKind K
¶void setValueSubclassData(unsigned short D)
void setValueSubclassData(unsigned short D)
Description
Shadow Value::setValueSubclassData with a private forwarding method so that subclasses cannot accidentally use it.
Declared at: llvm/include/llvm/IR/Function.h:900
Parameters
- unsigned short D
¶void setValueSubclassDataBit(unsigned int Bit,
bool On)
void setValueSubclassDataBit(unsigned int Bit,
bool On)
Declared at: llvm/include/llvm/IR/Function.h:903
Parameters
- unsigned int Bit
- bool On
¶void setWillReturn()
void setWillReturn()
Declared at: llvm/include/llvm/IR/Function.h:623
¶size_t size() const
size_t size() const
Declared at: llvm/include/llvm/IR/Function.h:731
¶void stealArgumentListFrom(llvm::Function& Src)
void stealArgumentListFrom(llvm::Function& Src)
Description
Steal arguments from another function. Drop this function's arguments and splice in the ones from \c Src. Requires that this has no function body.
Declared at: llvm/include/llvm/IR/Function.h:698
Parameters
- llvm::Function& Src
¶void viewCFG(
bool ViewCFGOnly,
const llvm::BlockFrequencyInfo* BFI,
const llvm::BranchProbabilityInfo* BPI) const
void viewCFG(
bool ViewCFGOnly,
const llvm::BlockFrequencyInfo* BFI,
const llvm::BranchProbabilityInfo* BPI) const
Description
Extended form to print edge weights.
Declared at: llvm/include/llvm/IR/Function.h:819
Parameters
- bool ViewCFGOnly
- const llvm::BlockFrequencyInfo* BFI
- const llvm::BranchProbabilityInfo* BPI
¶void viewCFG() const
void viewCFG() const
Description
viewCFG - This function is meant for use from the debugger. You can just say 'call F->viewCFG()' and a ghostview window should pop up from the program, displaying the CFG of the current function with the code for each basic block inside. This depends on there being a 'dot' and 'gv' program in your path.
Declared at: llvm/include/llvm/IR/Function.h:816
¶void viewCFGOnly(
const llvm::BlockFrequencyInfo* BFI,
const llvm::BranchProbabilityInfo* BPI) const
void viewCFGOnly(
const llvm::BlockFrequencyInfo* BFI,
const llvm::BranchProbabilityInfo* BPI) const
Description
Extended form to print edge weights.
Declared at: llvm/include/llvm/IR/Function.h:830
Parameters
- const llvm::BlockFrequencyInfo* BFI
- const llvm::BranchProbabilityInfo* BPI
¶void viewCFGOnly() const
void viewCFGOnly() const
Description
viewCFGOnly - This function is meant for use from the debugger. It works just like viewCFG, but it does not include the contents of basic blocks into the nodes, just the label. If you are only interested in the CFG this can make the graph smaller.
Declared at: llvm/include/llvm/IR/Function.h:827
¶bool willReturn() const
bool willReturn() const
Description
Determine if the function will return.
Declared at: llvm/include/llvm/IR/Function.h:622
¶~Function()
~Function()
Declared at: llvm/include/llvm/IR/Function.h:130