class Function

Declaration

class Function : public GlobalObject { /* full declaration omitted */ };

Declared at: llvm/include/llvm/IR/Function.h:59

Inherits from: GlobalObject

Member Variables

Inherited from GlobalObject:

protected ObjComdat
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 IntID
protected Parent
protected static GlobalValueSubClassDataBits = 16

Inherited from Value:

protected SubclassOptionalData
protected NumUserOperands
protected IsUsedByMD
protected HasName
protected HasHungOffUses
protected HasDescriptor
public static MaxAlignmentExponent = 29
public static MaximumAlignment = 1U << MaxAlignmentExponent

Method Overview

Inherited from GlobalObject:

Inherited from GlobalValue:

Inherited from Constant:

Inherited from User:

Inherited from Value:

Methods

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:135

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)

Declared at: llvm/include/llvm/IR/Function.h:142

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)

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:151

Parameters

llvm::FunctionType* Ty
llvm::GlobalValue::LinkageTypes Linkage
const llvm::Twine& N
llvm::Module& M

Function(const llvm::Function&)

Declared at: llvm/include/llvm/IR/Function.h:126

Parameters

const llvm::Function&

void addAttribute(unsigned int i,
                  llvm::Attribute Attr)

Description

adds the attribute to the list of attributes.

Declared at: llvm/include/llvm/IR/Function.h:365

Parameters

unsigned int i
llvm::Attribute Attr

void addAttribute(unsigned int i,
                  Attribute::AttrKind Kind)

Description

adds the attribute to the list of attributes.

Declared at: llvm/include/llvm/IR/Function.h:362

Parameters

unsigned int i
Attribute::AttrKind Kind

void addAttributes(unsigned int i,
                   const llvm::AttrBuilder& Attrs)

Description

adds the attributes to the list of attributes.

Declared at: llvm/include/llvm/IR/Function.h:368

Parameters

unsigned int i
const llvm::AttrBuilder& Attrs

void addDereferenceableAttr(unsigned int i,
                            uint64_t Bytes)

Description

adds the dereferenceable attribute to the list of attributes.

Declared at: llvm/include/llvm/IR/Function.h:423

Parameters

unsigned int i
uint64_t Bytes

void addDereferenceableOrNullAttr(unsigned int i,
                                  uint64_t Bytes)

Description

adds the dereferenceable_or_null attribute to the list of attributes.

Declared at: llvm/include/llvm/IR/Function.h:431

Parameters

unsigned int i
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:435

Parameters

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:427

Parameters

unsigned int ArgNo
uint64_t Bytes

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:234

Parameters

llvm::StringRef Kind
llvm::StringRef Val = llvm::StringRef()

void addFnAttr(llvm::Attribute Attr)

Description

Add function attributes to this function.

Declared at: llvm/include/llvm/IR/Function.h:240

Parameters

llvm::Attribute Attr

void addFnAttr(Attribute::AttrKind Kind)

Description

Add function attributes to this function.

Declared at: llvm/include/llvm/IR/Function.h:229

Parameters

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:371

Parameters

unsigned int ArgNo
Attribute::AttrKind Kind

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:374

Parameters

unsigned int ArgNo
llvm::Attribute Attr

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:377

Parameters

unsigned int ArgNo
const llvm::AttrBuilder& Attrs

llvm::Function::const_arg_iterator arg_begin()
    const

Declared at: llvm/include/llvm/IR/Function.h:710

llvm::Function::arg_iterator arg_begin()

Description

@ {

Declared at: llvm/include/llvm/IR/Function.h:706

bool arg_empty() const

Declared at: llvm/include/llvm/IR/Function.h:740

llvm::Function::const_arg_iterator arg_end() const

Declared at: llvm/include/llvm/IR/Function.h:719

llvm::Function::arg_iterator arg_end()

Declared at: llvm/include/llvm/IR/Function.h:715

size_t arg_size() const

Description

@ }

Declared at: llvm/include/llvm/IR/Function.h:739

iterator_range<llvm::Function::arg_iterator>
args()

Declared at: llvm/include/llvm/IR/Function.h:730

iterator_range<llvm::Function::const_arg_iterator>
args() const

Declared at: llvm/include/llvm/IR/Function.h:733

llvm::BasicBlock& back()

Declared at: llvm/include/llvm/IR/Function.h:701

const llvm::BasicBlock& back() const

Declared at: llvm/include/llvm/IR/Function.h:700

int begin() const

Declared at: llvm/include/llvm/IR/Function.h:692

int begin()

Declared at: llvm/include/llvm/IR/Function.h:691

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:823

bool cannotDuplicate() const

Description

Determine if the call cannot be duplicated.

Declared at: llvm/include/llvm/IR/Function.h:552

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:791

Parameters

const llvm::Value* V

void clearGC()

Declared at: llvm/include/llvm/IR/Function.h:359

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:639

Parameters

const llvm::Function* Src

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:644

bool doesNoCfCheck() const

Description

Determine if the function should not perform indirect branch tracking.

Declared at: llvm/include/llvm/IR/Function.h:541

bool doesNotAccessMemory() const

Description

Determine if the function does not access memory.

Declared at: llvm/include/llvm/IR/Function.h:484

bool doesNotFreeMemory() const

Description

Determine if the call might deallocate memory.

Declared at: llvm/include/llvm/IR/Function.h:579

bool doesNotReadMemory() const

Description

Determine if the function does not access or only writes memory.

Declared at: llvm/include/llvm/IR/Function.h:500

bool doesNotRecurse() const

Description

Determine if the function is known not to recurse, directly or indirectly.

Declared at: llvm/include/llvm/IR/Function.h:588

bool doesNotReturn() const

Description

Determine if the function cannot return.

Declared at: llvm/include/llvm/IR/Function.h:533

bool doesNotThrow() const

Description

Determine if the function cannot unwind.

Declared at: llvm/include/llvm/IR/Function.h:544

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:807

bool empty() const

Declared at: llvm/include/llvm/IR/Function.h:697

int end()

Declared at: llvm/include/llvm/IR/Function.h:693

int end() const

Declared at: llvm/include/llvm/IR/Function.h:694

void eraseFromParent()

Description

eraseFromParent - This method unlinks 'this' from the containing module and deletes it.

Declared at: llvm/include/llvm/IR/Function.h:657

llvm::BasicBlock& front()

Declared at: llvm/include/llvm/IR/Function.h:699

const llvm::BasicBlock& front() const

Declared at: llvm/include/llvm/IR/Function.h:698

llvm::Argument* getArg(unsigned int i) const

Declared at: llvm/include/llvm/IR/Function.h:724

Parameters

unsigned int i

llvm::Attribute getAttribute(
    unsigned int i,
    llvm::StringRef Kind) const

Description

gets the attribute from the list of attributes.

Declared at: llvm/include/llvm/IR/Function.h:418

Parameters

unsigned int i
llvm::StringRef Kind

llvm::Attribute getAttribute(
    unsigned int i,
    Attribute::AttrKind Kind) const

Description

gets the attribute from the list of attributes.

Declared at: llvm/include/llvm/IR/Function.h:413

Parameters

unsigned int i
Attribute::AttrKind Kind

llvm::AttributeList getAttributes() const

Description

Return the attribute list for this Function.

Declared at: llvm/include/llvm/IR/Function.h:223

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:668

llvm::Function::BasicBlockListType&
getBasicBlockList()

Declared at: llvm/include/llvm/IR/Function.h:669

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:212

llvm::LLVMContext& getContext() const

Description

getContext - Return a reference to the LLVMContext associated with this function.

Declared at: llvm/include/llvm/IR/Function.h:172

uint64_t getDereferenceableBytes(
    unsigned int i) const

Description

Extract the number of dereferenceable bytes for a call or parameter (0=unknown).

Declared at: llvm/include/llvm/IR/Function.h:459

Parameters

unsigned int i
AttributeList index, referring to a return value or argument.

uint64_t getDereferenceableOrNullBytes(
    unsigned int i) const

Description

Extract the number of dereferenceable_or_null bytes for a call or parameter (0=unknown).

Declared at: llvm/include/llvm/IR/Function.h:472

Parameters

unsigned int i
AttributeList index, referring to a return value or argument.

llvm::BasicBlock& getEntryBlock()

Declared at: llvm/include/llvm/IR/Function.h:676

const llvm::BasicBlock& getEntryBlock() const

Declared at: llvm/include/llvm/IR/Function.h:675

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:301

Parameters

bool AllowSynthetic = false

llvm::Attribute getFnAttribute(
    llvm::StringRef Kind) const

Description

Return the attribute for the given attribute kind.

Declared at: llvm/include/llvm/IR/Function.h:338

Parameters

llvm::StringRef Kind

llvm::Attribute getFnAttribute(
    Attribute::AttrKind Kind) const

Description

Return the attribute for the given attribute kind.

Declared at: llvm/include/llvm/IR/Function.h:333

Parameters

Attribute::AttrKind Kind

unsigned int getFnStackAlignment() const

Description

Return the stack alignment for the function.

Declared at: llvm/include/llvm/IR/Function.h:343

const llvm::Function& getFunction() const

Declared at: llvm/include/llvm/IR/Function.h:133

llvm::FunctionType* getFunctionType() const

Description

Returns the FunctionType for me.

Declared at: llvm/include/llvm/IR/Function.h:163

const std::string& getGC() const

Declared at: llvm/include/llvm/IR/Function.h:357

int getImportGUIDs() const

Declared at: llvm/include/llvm/IR/Function.h:314

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:160

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:193

llvm::MaybeAlign getParamAlign(
    unsigned int ArgNo) const

Declared at: llvm/include/llvm/IR/Function.h:446

Parameters

unsigned int ArgNo

unsigned int 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:440

Parameters

unsigned int ArgNo

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:408

Parameters

unsigned int ArgNo
Attribute::AttrKind Kind

llvm::Type* getParamByValType(
    unsigned int ArgNo) const

Description

Extract the byval type for a parameter.

Declared at: llvm/include/llvm/IR/Function.h:451

Parameters

unsigned int ArgNo

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:465

Parameters

unsigned int ArgNo
Index of an argument, with 0 being the first function arg.

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:479

Parameters

unsigned int ArgNo
AttributeList ArgNo, referring to an argument.

llvm::Constant* getPersonalityFn() const

Description

Get the personality function associated with this function.

Declared at: llvm/include/llvm/IR/Function.h:748

llvm::Constant* getPrefixData() const

Description

Get the prefix data associated with this function.

Declared at: llvm/include/llvm/IR/Function.h:757

llvm::Constant* getPrologueData() const

Description

Get the prologue data associated with this function.

Declared at: llvm/include/llvm/IR/Function.h:766

llvm::Type* getReturnType() const

Description

Returns the type of the ret val.

Declared at: llvm/include/llvm/IR/Function.h:168

Optional<llvm::StringRef> getSectionPrefix() const

Description

Get the section prefix for this function.

Declared at: llvm/include/llvm/IR/Function.h:320

static llvm::Function::BasicBlockListType
    llvm::Function::*
    getSublistAccess(llvm::BasicBlock*)

Declared at: llvm/include/llvm/IR/Function.h:671

Parameters

llvm::BasicBlock*

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:834

inline llvm::ValueSymbolTable*
getValueSymbolTable()

Description

getSymbolTable() - Return the symbol table if any, otherwise nullptr.

Declared at: llvm/include/llvm/IR/Function.h:683

inline const llvm::ValueSymbolTable*
getValueSymbolTable() const

Declared at: llvm/include/llvm/IR/Function.h:684

bool hasAddressTaken(
    const llvm::User** = nullptr) 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.

Declared at: llvm/include/llvm/IR/Function.h:813

Parameters

const llvm::User** = nullptr

bool hasAttribute(unsigned int i,
                  Attribute::AttrKind Kind) const

Description

check if an attributes is in the list of attributes.

Declared at: llvm/include/llvm/IR/Function.h:398

Parameters

unsigned int i
Attribute::AttrKind Kind

bool hasFnAttribute(llvm::StringRef Kind) const

Description

Return true if the function has the attribute.

Declared at: llvm/include/llvm/IR/Function.h:328

Parameters

llvm::StringRef Kind

bool hasFnAttribute(
    Attribute::AttrKind Kind) const

Description

Return true if the function has the attribute.

Declared at: llvm/include/llvm/IR/Function.h:323

Parameters

Attribute::AttrKind Kind

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:354

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:104

bool hasMinSize() const

Description

Optimize this function for minimum size (-Oz).

Declared at: llvm/include/llvm/IR/Function.h:630

bool hasOptNone() const

Description

Do not optimize this function (-O0).

Declared at: llvm/include/llvm/IR/Function.h:627

bool hasOptSize() const

Description

Optimize this function for size (-Os) or minimum size (-Oz).

Declared at: llvm/include/llvm/IR/Function.h:633

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:403

Parameters

unsigned int ArgNo
Attribute::AttrKind Kind

bool hasPersonalityFn() const

Description

Check whether this function has a personality function.

Declared at: llvm/include/llvm/IR/Function.h:743

bool hasPrefixData() const

Description

Check whether this function has prefix data.

Declared at: llvm/include/llvm/IR/Function.h:752

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:308

Parameters

bool IncludeSynthetic = false

bool hasPrologueData() const

Description

Check whether this function has prologue data.

Declared at: llvm/include/llvm/IR/Function.h:761

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:611

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:597

bool isConvergent() const

Description

Determine if the call is convergent.

Declared at: llvm/include/llvm/IR/Function.h:560

bool isDebugInfoForProfiling() const

Description

Returns true if we should emit debug info for profiling.

Declared at: llvm/include/llvm/IR/Function.h:837

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:819

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:198

bool isMaterializable() const

Declared at: llvm/include/llvm/IR/Function.h:178

bool isSpeculatable() const

Description

Determine if the call has sideeffects.

Declared at: llvm/include/llvm/IR/Function.h:571

bool isVarArg() const

Description

isVarArg - Return true if this function takes a variable number of arguments.

Declared at: llvm/include/llvm/IR/Function.h:176

static Intrinsic::ID lookupIntrinsicID(
    llvm::StringRef Name)

Declared at: llvm/include/llvm/IR/Function.h:200

Parameters

llvm::StringRef Name

bool needsUnwindTableEntry() const

Description

True if this function needs an unwind table.

Declared at: llvm/include/llvm/IR/Function.h:605

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:843

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:509

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:525

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:516

bool onlyReadsMemory() const

Description

Determine if the function does not access or only reads memory.

Declared at: llvm/include/llvm/IR/Function.h:492

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:771

Parameters

llvm::raw_ostream& OS
llvm::AssemblyAnnotationWriter* AAW = nullptr
bool ShouldPreserveUseListOrder = false
bool IsForDebug = false

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:207

void removeAttribute(unsigned int i,
                     Attribute::AttrKind Kind)

Description

removes the attribute from the list of attributes.

Declared at: llvm/include/llvm/IR/Function.h:380

Parameters

unsigned int i
Attribute::AttrKind Kind

void removeAttribute(unsigned int i,
                     llvm::StringRef Kind)

Description

removes the attribute from the list of attributes.

Declared at: llvm/include/llvm/IR/Function.h:383

Parameters

unsigned int i
llvm::StringRef Kind

void removeAttributes(
    unsigned int i,
    const llvm::AttrBuilder& Attrs)

Description

removes the attributes from the list of attributes.

Declared at: llvm/include/llvm/IR/Function.h:386

Parameters

unsigned int i
const llvm::AttrBuilder& Attrs

void removeFnAttr(Attribute::AttrKind Kind)

Description

Remove function attributes from this function.

Declared at: llvm/include/llvm/IR/Function.h:245

Parameters

Attribute::AttrKind Kind

void removeFnAttr(llvm::StringRef Kind)

Description

Remove function attribute from this function.

Declared at: llvm/include/llvm/IR/Function.h:250

Parameters

llvm::StringRef Kind

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:652

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:389

Parameters

unsigned int ArgNo
Attribute::AttrKind 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:392

Parameters

unsigned int ArgNo
llvm::StringRef Kind

void removeParamAttrs(
    unsigned int ArgNo,
    const llvm::AttrBuilder& Attrs)

Description

removes the attribute from the list of attributes.

Declared at: llvm/include/llvm/IR/Function.h:395

Parameters

unsigned int ArgNo
const llvm::AttrBuilder& Attrs

bool returnDoesNotAlias() const

Description

Determine if the parameter or return value is marked with NoAlias attribute.

Declared at: llvm/include/llvm/IR/Function.h:618

void setAttributes(llvm::AttributeList Attrs)

Description

Set the attribute list for this Function.

Declared at: llvm/include/llvm/IR/Function.h:226

Parameters

llvm::AttributeList Attrs

void setCallingConv(CallingConv::ID CC)

Declared at: llvm/include/llvm/IR/Function.h:216

Parameters

CallingConv::ID CC

void setCannotDuplicate()

Declared at: llvm/include/llvm/IR/Function.h:555

void setConvergent()

Declared at: llvm/include/llvm/IR/Function.h:563

void setDoesNotAccessMemory()

Declared at: llvm/include/llvm/IR/Function.h:487

void setDoesNotFreeMemory()

Declared at: llvm/include/llvm/IR/Function.h:582

void setDoesNotReadMemory()

Declared at: llvm/include/llvm/IR/Function.h:503

void setDoesNotRecurse()

Declared at: llvm/include/llvm/IR/Function.h:591

void setDoesNotReturn()

Declared at: llvm/include/llvm/IR/Function.h:536

void setDoesNotThrow()

Declared at: llvm/include/llvm/IR/Function.h:547

void setEntryCount(
    uint64_t Count,
    llvm::Function::ProfileCountType Type =
        PCT_Real,
    const int* Imports = nullptr)

Declared at: llvm/include/llvm/IR/Function.h:294

Parameters

uint64_t Count
llvm::Function::ProfileCountType Type = PCT_Real
const int* Imports = nullptr

void setEntryCount(
    llvm::Function::ProfileCount Count,
    const int* Imports = nullptr)

Declared at: llvm/include/llvm/IR/Function.h:290

Parameters

llvm::Function::ProfileCount Count
const int* Imports = nullptr

void setGC(std::string Str)

Declared at: llvm/include/llvm/IR/Function.h:358

Parameters

std::string Str

void setHasUWTable()

Declared at: llvm/include/llvm/IR/Function.h:600

void setIsMaterializable(bool V)

Declared at: llvm/include/llvm/IR/Function.h:181

Parameters

bool V

void setNotConvergent()

Declared at: llvm/include/llvm/IR/Function.h:566

void setOnlyAccessesArgMemory()

Declared at: llvm/include/llvm/IR/Function.h:512

void setOnlyAccessesInaccessibleMemOrArgMem()

Declared at: llvm/include/llvm/IR/Function.h:528

void setOnlyAccessesInaccessibleMemory()

Declared at: llvm/include/llvm/IR/Function.h:519

void setOnlyReadsMemory()

Declared at: llvm/include/llvm/IR/Function.h:495

void setPersonalityFn(llvm::Constant* Fn)

Declared at: llvm/include/llvm/IR/Function.h:749

Parameters

llvm::Constant* Fn

void setPrefixData(llvm::Constant* PrefixData)

Declared at: llvm/include/llvm/IR/Function.h:758

Parameters

llvm::Constant* PrefixData

void setPrologueData(llvm::Constant* PrologueData)

Declared at: llvm/include/llvm/IR/Function.h:767

Parameters

llvm::Constant* PrologueData

void setReturnDoesNotAlias()

Declared at: llvm/include/llvm/IR/Function.h:622

void setSectionPrefix(llvm::StringRef Prefix)

Description

Set the section prefix for this function.

Declared at: llvm/include/llvm/IR/Function.h:317

Parameters

llvm::StringRef Prefix

void setSpeculatable()

Declared at: llvm/include/llvm/IR/Function.h:574

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:828

Parameters

llvm::DISubprogram* SP

size_t size() const

Declared at: llvm/include/llvm/IR/Function.h:696

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:663

Parameters

llvm::Function& Src

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:781

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:788

~Function()

Declared at: llvm/include/llvm/IR/Function.h:128