|
LLVM
4.0.0
|
#include <Function.h>
Public Member Functions | |
| bool | hasLazyArguments () const |
| 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. More... | |
| Function (const Function &)=delete | |
| void | operator= (const Function &)=delete |
| ~Function () override | |
| DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value) | |
| Type * | getReturnType () const |
| Returns the type of the ret val. More... | |
| FunctionType * | getFunctionType () const |
| Returns the FunctionType for me. More... | |
| LLVMContext & | getContext () const |
| getContext - Return a reference to the LLVMContext associated with this function. More... | |
| bool | isVarArg () const |
| isVarArg - Return true if this function takes a variable number of arguments. More... | |
| bool | isMaterializable () const |
| void | setIsMaterializable (bool V) |
| Intrinsic::ID | getIntrinsicID () const LLVM_READONLY |
| 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. More... | |
| bool | isIntrinsic () const |
| isIntrinsic - Returns true if the function's name starts with "llvm.". More... | |
| void | recalculateIntrinsicID () |
| Recalculate the ID for this function if it is an Intrinsic defined in llvm/Intrinsics.h. More... | |
| CallingConv::ID | getCallingConv () const |
| getCallingConv()/setCallingConv(CC) - These method get and set the calling convention of this function. More... | |
| void | setCallingConv (CallingConv::ID CC) |
| AttributeSet | getAttributes () const |
| Return the attribute list for this Function. More... | |
| void | setAttributes (AttributeSet Attrs) |
| Set the attribute list for this Function. More... | |
| void | addFnAttr (Attribute::AttrKind Kind) |
| Add function attributes to this function. More... | |
| void | addFnAttr (StringRef Kind, StringRef Val=StringRef()) |
| Add function attributes to this function. More... | |
| void | addFnAttr (Attribute Attr) |
| void | removeFnAttr (Attribute::AttrKind Kind) |
| Remove function attributes from this function. More... | |
| void | removeFnAttr (StringRef Kind) |
| Remove function attribute from this function. More... | |
| void | setEntryCount (uint64_t Count) |
| Set the entry count for this function. More... | |
| Optional< uint64_t > | getEntryCount () const |
| Get the entry count for this function. More... | |
| void | setSectionPrefix (StringRef Prefix) |
| Set the section prefix for this function. More... | |
| Optional< StringRef > | getSectionPrefix () const |
| Get the section prefix for this function. More... | |
| bool | hasFnAttribute (Attribute::AttrKind Kind) const |
| Return true if the function has the attribute. More... | |
| bool | hasFnAttribute (StringRef Kind) const |
| Attribute | getFnAttribute (Attribute::AttrKind Kind) const |
| Return the attribute for the given attribute kind. More... | |
| Attribute | getFnAttribute (StringRef Kind) const |
| unsigned | getFnStackAlignment () const |
| Return the stack alignment for the function. More... | |
| bool | hasGC () const |
| hasGC/getGC/setGC/clearGC - The name of the garbage collection algorithm to use during code generation. More... | |
| const std::string & | getGC () const |
| void | setGC (std::string Str) |
| void | clearGC () |
| void | addAttribute (unsigned i, Attribute::AttrKind Kind) |
| adds the attribute to the list of attributes. More... | |
| void | addAttribute (unsigned i, Attribute Attr) |
| adds the attribute to the list of attributes. More... | |
| void | addAttributes (unsigned i, AttributeSet Attrs) |
| adds the attributes to the list of attributes. More... | |
| void | removeAttribute (unsigned i, Attribute::AttrKind Kind) |
| removes the attribute from the list of attributes. More... | |
| void | removeAttribute (unsigned i, StringRef Kind) |
| removes the attribute from the list of attributes. More... | |
| void | removeAttributes (unsigned i, AttributeSet Attrs) |
| removes the attributes from the list of attributes. More... | |
| bool | hasAttribute (unsigned i, Attribute::AttrKind Kind) const |
| check if an attributes is in the list of attributes. More... | |
| Attribute | getAttribute (unsigned i, Attribute::AttrKind Kind) const |
| Attribute | getAttribute (unsigned i, StringRef Kind) const |
| void | addDereferenceableAttr (unsigned i, uint64_t Bytes) |
| adds the dereferenceable attribute to the list of attributes. More... | |
| void | addDereferenceableOrNullAttr (unsigned i, uint64_t Bytes) |
| adds the dereferenceable_or_null attribute to the list of attributes. More... | |
| unsigned | getParamAlignment (unsigned i) const |
| Extract the alignment for a call or parameter (0=unknown). More... | |
| uint64_t | getDereferenceableBytes (unsigned i) const |
| Extract the number of dereferenceable bytes for a call or parameter (0=unknown). More... | |
| uint64_t | getDereferenceableOrNullBytes (unsigned i) const |
| Extract the number of dereferenceable_or_null bytes for a call or parameter (0=unknown). More... | |
| bool | doesNotAccessMemory () const |
| Determine if the function does not access memory. More... | |
| void | setDoesNotAccessMemory () |
| bool | onlyReadsMemory () const |
| Determine if the function does not access or only reads memory. More... | |
| void | setOnlyReadsMemory () |
| bool | doesNotReadMemory () const |
| Determine if the function does not access or only writes memory. More... | |
| void | setDoesNotReadMemory () |
| bool | onlyAccessesArgMemory () const |
| Determine if the call can access memmory only using pointers based on its arguments. More... | |
| void | setOnlyAccessesArgMemory () |
| bool | onlyAccessesInaccessibleMemory () const |
| Determine if the function may only access memory that is inaccessible from the IR. More... | |
| void | setOnlyAccessesInaccessibleMemory () |
| bool | onlyAccessesInaccessibleMemOrArgMem () const |
| Determine if the function may only access memory that is either inaccessible from the IR or pointed to by its arguments. More... | |
| void | setOnlyAccessesInaccessibleMemOrArgMem () |
| bool | doesNotReturn () const |
| Determine if the function cannot return. More... | |
| void | setDoesNotReturn () |
| bool | doesNotThrow () const |
| Determine if the function cannot unwind. More... | |
| void | setDoesNotThrow () |
| bool | cannotDuplicate () const |
| Determine if the call cannot be duplicated. More... | |
| void | setCannotDuplicate () |
| bool | isConvergent () const |
| Determine if the call is convergent. More... | |
| void | setConvergent () |
| void | setNotConvergent () |
| bool | doesNotRecurse () const |
| Determine if the function is known not to recurse, directly or indirectly. More... | |
| void | setDoesNotRecurse () |
| bool | hasUWTable () const |
| True if the ABI mandates (or the user requested) that this function be in a unwind table. More... | |
| void | setHasUWTable () |
| bool | needsUnwindTableEntry () const |
| True if this function needs an unwind table. More... | |
| bool | hasStructRetAttr () const |
| Determine if the function returns a structure through first pointer argument. More... | |
| bool | doesNotAlias (unsigned n) const |
| Determine if the parameter or return value is marked with NoAlias attribute. More... | |
| void | setDoesNotAlias (unsigned n) |
| bool | doesNotCapture (unsigned n) const |
| Determine if the parameter can be captured. More... | |
| void | setDoesNotCapture (unsigned n) |
| bool | doesNotAccessMemory (unsigned n) const |
| void | setDoesNotAccessMemory (unsigned n) |
| bool | onlyReadsMemory (unsigned n) const |
| void | setOnlyReadsMemory (unsigned n) |
| bool | optForMinSize () const |
| Optimize this function for minimum size (-Oz). More... | |
| bool | optForSize () const |
| Optimize this function for size (-Os) or minimum size (-Oz). More... | |
| void | copyAttributesFrom (const GlobalValue *Src) override |
| copyAttributesFrom - copy all additional attributes (those not needed to create a Function) from the Function Src to this one. More... | |
| void | deleteBody () |
| deleteBody - This method deletes the body of the function, and converts the linkage to external. More... | |
| void | removeFromParent () override |
| removeFromParent - This method unlinks 'this' from the containing module, but does not delete it. More... | |
| void | eraseFromParent () override |
| eraseFromParent - This method unlinks 'this' from the containing module and deletes it. More... | |
| void | stealArgumentListFrom (Function &Src) |
| Steal arguments from another function. More... | |
| const ArgumentListType & | getArgumentList () const |
| Get the underlying elements of the Function... More... | |
| ArgumentListType & | getArgumentList () |
| const BasicBlockListType & | getBasicBlockList () const |
| BasicBlockListType & | getBasicBlockList () |
| const BasicBlock & | getEntryBlock () const |
| BasicBlock & | getEntryBlock () |
| ValueSymbolTable * | getValueSymbolTable () |
| getSymbolTable() - Return the symbol table if any, otherwise nullptr. More... | |
| const ValueSymbolTable * | getValueSymbolTable () const |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
| size_t | size () const |
| bool | empty () const |
| const BasicBlock & | front () const |
| BasicBlock & | front () |
| const BasicBlock & | back () const |
| BasicBlock & | back () |
| size_t | arg_size () const |
| bool | arg_empty () const |
| bool | hasPersonalityFn () const |
| Check whether this function has a personality function. More... | |
| Constant * | getPersonalityFn () const |
| Get the personality function associated with this function. More... | |
| void | setPersonalityFn (Constant *Fn) |
| bool | hasPrefixData () const |
| Check whether this function has prefix data. More... | |
| Constant * | getPrefixData () const |
| Get the prefix data associated with this function. More... | |
| void | setPrefixData (Constant *PrefixData) |
| bool | hasPrologueData () const |
| Check whether this function has prologue data. More... | |
| Constant * | getPrologueData () const |
| Get the prologue data associated with this function. More... | |
| void | setPrologueData (Constant *PrologueData) |
| void | print (raw_ostream &OS, AssemblyAnnotationWriter *AAW=nullptr, bool ShouldPreserveUseListOrder=false, bool IsForDebug=false) const |
| Print the function to an output stream with an optional AssemblyAnnotationWriter. More... | |
| void | viewCFG () const |
| viewCFG - This function is meant for use from the debugger. More... | |
| void | viewCFGOnly () const |
| viewCFGOnly - This function is meant for use from the debugger. More... | |
| void | dropAllReferences () |
| dropAllReferences() - This method causes all the subinstructions to "let
go" of all references that they are maintaining. More... | |
| bool | hasAddressTaken (const User **=nullptr) const |
| hasAddressTaken - returns true if there are any uses of this function other than direct calls or invokes to it, or blockaddress expressions. More... | |
| bool | isDefTriviallyDead () const |
| 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). More... | |
| bool | callsFunctionThatReturnsTwice () const |
| callsFunctionThatReturnsTwice - Return true if the function has a call to setjmp or other function that gcc recognizes as "returning twice". More... | |
| void | setSubprogram (DISubprogram *SP) |
| Set the attached subprogram. More... | |
| DISubprogram * | getSubprogram () const |
| Get the attached subprogram. More... | |
Function Argument Iteration | |
| arg_iterator | arg_begin () |
| const_arg_iterator | arg_begin () const |
| arg_iterator | arg_end () |
| const_arg_iterator | arg_end () const |
| iterator_range< arg_iterator > | args () |
| iterator_range < const_arg_iterator > | args () const |
Public Member Functions inherited from llvm::GlobalObject | |
| GlobalObject (const GlobalObject &)=delete | |
| unsigned | getAlignment () const |
| void | setAlignment (unsigned Align) |
| unsigned | getGlobalObjectSubClassData () const |
| void | setGlobalObjectSubClassData (unsigned Val) |
| bool | hasSection () const |
| Check if this global has a custom object file section. More... | |
| StringRef | getSection () const |
| Get the custom section of this global if it has one. More... | |
| void | setSection (StringRef S) |
| Change the section for this global. More... | |
| bool | hasComdat () const |
| const Comdat * | getComdat () const |
| Comdat * | getComdat () |
| void | setComdat (Comdat *C) |
| bool | hasMetadata () const |
| Check if this has any metadata. More... | |
| void | getAllMetadata (SmallVectorImpl< std::pair< unsigned, MDNode * >> &MDs) const |
Appends all attachments for the global to MDs, sorting by attachment ID. More... | |
| void | eraseMetadata (unsigned KindID) |
| Erase all metadata attachments with the given kind. More... | |
| void | copyMetadata (const GlobalObject *Src, unsigned Offset) |
| Copy metadata from Src, adjusting offsets by Offset. More... | |
| void | addTypeMetadata (unsigned Offset, Metadata *TypeID) |
| void | copyAttributesFrom (const GlobalValue *Src) override |
| Copy all additional attributes (those not needed to create a GlobalValue) from the GlobalValue Src to this one. More... | |
| void | clearMetadata () |
| MDNode * | getMetadata (unsigned KindID) const |
| Get the current metadata attachments for the given kind, if any. More... | |
| MDNode * | getMetadata (StringRef Kind) const |
| void | getMetadata (unsigned KindID, SmallVectorImpl< MDNode * > &MDs) const |
Appends all attachments with the given ID to MDs in insertion order. More... | |
| void | getMetadata (StringRef Kind, SmallVectorImpl< MDNode * > &MDs) const |
| void | setMetadata (unsigned KindID, MDNode *MD) |
| Set a particular kind of metadata attachment. More... | |
| void | setMetadata (StringRef Kind, MDNode *MD) |
| void | addMetadata (unsigned KindID, MDNode &MD) |
| Add a metadata attachment. More... | |
| void | addMetadata (StringRef Kind, MDNode &MD) |
Public Member Functions inherited from llvm::GlobalValue | |
| GlobalValue (const GlobalValue &)=delete | |
| ~GlobalValue () override | |
| unsigned | getAlignment () const |
| bool | hasGlobalUnnamedAddr () const |
| bool | hasAtLeastLocalUnnamedAddr () const |
| Returns true if this value's address is not significant in this module. More... | |
| UnnamedAddr | getUnnamedAddr () const |
| void | setUnnamedAddr (UnnamedAddr Val) |
| bool | hasComdat () const |
| Comdat * | getComdat () |
| const Comdat * | getComdat () const |
| VisibilityTypes | getVisibility () const |
| bool | hasDefaultVisibility () const |
| bool | hasHiddenVisibility () const |
| bool | hasProtectedVisibility () const |
| void | setVisibility (VisibilityTypes V) |
| bool | isThreadLocal () const |
| If the value is "Thread Local", its value isn't shared by the threads. More... | |
| void | setThreadLocal (bool Val) |
| void | setThreadLocalMode (ThreadLocalMode Val) |
| ThreadLocalMode | getThreadLocalMode () const |
| DLLStorageClassTypes | getDLLStorageClass () const |
| bool | hasDLLImportStorageClass () const |
| bool | hasDLLExportStorageClass () const |
| void | setDLLStorageClass (DLLStorageClassTypes C) |
| bool | hasSection () const |
| StringRef | getSection () const |
| PointerType * | getType () const |
| Global values are always pointers. More... | |
| Type * | getValueType () const |
| bool | isDefinitionExact () const |
| Return true if the currently visible definition of this global (if any) is exactly the definition we will see at runtime. More... | |
| bool | hasExactDefinition () const |
| Return true if this global has an exact defintion. More... | |
| bool | isInterposable () const |
| Return true if this global's definition can be substituted with an arbitrary definition at link time. More... | |
| bool | hasExternalLinkage () const |
| bool | hasAvailableExternallyLinkage () const |
| bool | hasLinkOnceLinkage () const |
| bool | hasLinkOnceODRLinkage () const |
| bool | hasWeakLinkage () const |
| bool | hasWeakAnyLinkage () const |
| bool | hasWeakODRLinkage () const |
| bool | hasAppendingLinkage () const |
| bool | hasInternalLinkage () const |
| bool | hasPrivateLinkage () const |
| bool | hasLocalLinkage () const |
| bool | hasExternalWeakLinkage () const |
| bool | hasCommonLinkage () const |
| bool | hasValidDeclarationLinkage () const |
| void | setLinkage (LinkageTypes LT) |
| LinkageTypes | getLinkage () const |
| bool | isDiscardableIfUnused () const |
| bool | isWeakForLinker () const |
| std::string | getGlobalIdentifier () const |
| Return the modified name for this global value suitable to be used as the key for a global lookup (e.g. More... | |
| GUID | getGUID () const |
| Return a 64-bit global unique ID constructed from global value name (i.e. More... | |
| bool | isDeclaration () const |
| Return true if the primary definition of this global value is outside of the current translation unit. More... | |
| bool | isDeclarationForLinker () const |
| bool | isStrongDefinitionForLinker () const |
| Returns true if this global's definition will be the one chosen by the linker. More... | |
| bool | canIncreaseAlignment () const |
| const GlobalObject * | getBaseObject () const |
| GlobalObject * | getBaseObject () |
| bool | isAbsoluteSymbolRef () const |
| Returns whether this is a reference to an absolute symbol. More... | |
| Optional< ConstantRange > | getAbsoluteSymbolRange () const |
| If this is an absolute symbol reference, returns the range of the symbol, otherwise returns None. More... | |
| Module * | getParent () |
| Get the module that this global value is contained inside of... More... | |
| const Module * | getParent () const |
| bool | isMaterializable () const |
| If this function's Module is being lazily streamed in functions from disk or some other source, this method can be used to check to see if the function has been read in yet or not. More... | |
| Error | materialize () |
| Make sure this GlobalValue is fully read. More... | |
Public Member Functions inherited from llvm::Constant | |
| void | operator= (const Constant &)=delete |
| Constant (const Constant &)=delete | |
| bool | isNullValue () const |
| Return true if this is the value that would be returned by getNullValue. More... | |
| bool | isOneValue () const |
| Returns true if the value is one. More... | |
| bool | isAllOnesValue () const |
| Return true if this is the value that would be returned by getAllOnesValue. More... | |
| bool | isNegativeZeroValue () const |
| Return true if the value is what would be returned by getZeroValueForNegation. More... | |
| bool | isZeroValue () const |
| Return true if the value is negative zero or null value. More... | |
| bool | isNotMinSignedValue () const |
| Return true if the value is not the smallest signed value. More... | |
| bool | isMinSignedValue () const |
| Return true if the value is the smallest signed value. More... | |
| bool | canTrap () const |
| Return true if evaluation of this constant could trap. More... | |
| bool | isThreadDependent () const |
| Return true if the value can vary between threads. More... | |
| bool | isDLLImportDependent () const |
| Return true if the value is dependent on a dllimport variable. More... | |
| bool | isConstantUsed () const |
| Return true if the constant has users other than constant expressions and other dangling things. More... | |
| bool | needsRelocation () const |
| This method classifies the entry according to whether or not it may generate a relocation entry. More... | |
| Constant * | getAggregateElement (unsigned Elt) const |
| For aggregates (struct/array/vector) return the constant that corresponds to the specified element if possible, or null if not. More... | |
| Constant * | getAggregateElement (Constant *Elt) const |
| Constant * | getSplatValue () const |
| If this is a splat vector constant, meaning that all of the elements have the same value, return that value. More... | |
| const APInt & | getUniqueInteger () const |
| If C is a constant integer then return its value, otherwise C must be a vector of constant integers, all equal, and the common value is returned. More... | |
| void | destroyConstant () |
| Called if some element of this constant is no longer valid. More... | |
| void | handleOperandChange (Value *, Value *) |
| This method is a special form of User::replaceUsesOfWith (which does not work on constants) that does work on constants. More... | |
| void | removeDeadConstantUsers () const |
| If there are any dead constant users dangling off of this constant, remove them. More... | |
| Constant * | stripPointerCasts () |
| const Constant * | stripPointerCasts () const |
Public Member Functions inherited from llvm::User | |
| User (const User &)=delete | |
| ~User () override=default | |
| void | operator delete (void *Usr) |
| Free memory allocated for User and Use objects. More... | |
| void | operator delete (void *, unsigned) |
| Placement delete - required by std, but never called. More... | |
| void | operator delete (void *, unsigned, bool) |
| Placement delete - required by std, but never called. More... | |
| Use * | getOperandList () |
| const Use * | getOperandList () const |
| Value * | getOperand (unsigned i) const |
| void | setOperand (unsigned i, Value *Val) |
| const Use & | getOperandUse (unsigned i) const |
| Use & | getOperandUse (unsigned i) |
| unsigned | getNumOperands () const |
| ArrayRef< const uint8_t > | getDescriptor () const |
| Returns the descriptor co-allocated with this User instance. More... | |
| MutableArrayRef< uint8_t > | getDescriptor () |
| Returns the descriptor co-allocated with this User instance. More... | |
| void | setGlobalVariableNumOperands (unsigned NumOps) |
| Set the number of operands on a GlobalVariable. More... | |
| void | setNumHungOffUseOperands (unsigned NumOps) |
| Subclasses with hung off uses need to manage the operand count themselves. More... | |
| op_iterator | op_begin () |
| const_op_iterator | op_begin () const |
| op_iterator | op_end () |
| const_op_iterator | op_end () const |
| op_range | operands () |
| const_op_range | operands () const |
| value_op_iterator | value_op_begin () |
| value_op_iterator | value_op_end () |
| iterator_range< value_op_iterator > | operand_values () |
| const_value_op_iterator | value_op_begin () const |
| const_value_op_iterator | value_op_end () const |
| iterator_range < const_value_op_iterator > | operand_values () const |
| void | dropAllReferences () |
| Drop all references to operands. More... | |
| void | replaceUsesOfWith (Value *From, Value *To) |
| Replace uses of one Value with another. More... | |
Public Member Functions inherited from llvm::Value | |
| Value (const Value &)=delete | |
| void | operator= (const Value &)=delete |
| virtual | ~Value () |
| void | dump () const |
| Support for debugging, callable in GDB: V->dump() More... | |
| Type * | getType () const |
| All values are typed, get the type of this value. More... | |
| LLVMContext & | getContext () const |
| All values hold a context through their type. More... | |
| bool | hasName () const |
| ValueName * | getValueName () const |
| void | setValueName (ValueName *VN) |
| StringRef | getName () const |
| Return a constant reference to the value's name. More... | |
| void | setName (const Twine &Name) |
| Change the name of the value. More... | |
| void | takeName (Value *V) |
| Transfer the name from V to this value. More... | |
| void | replaceAllUsesWith (Value *V) |
| Change all uses of this to point to a new Value. More... | |
| void | replaceNonMetadataUsesWith (Value *V) |
| Change non-metadata uses of this to point to a new Value. More... | |
| void | replaceUsesOutsideBlock (Value *V, BasicBlock *BB) |
| replaceUsesOutsideBlock - Go through the uses list for this definition and make each use point to "V" instead of "this" when the use is outside the block. More... | |
| void | assertModuleIsMaterialized () const |
| bool | use_empty () const |
| use_iterator | materialized_use_begin () |
| const_use_iterator | materialized_use_begin () const |
| use_iterator | use_begin () |
| const_use_iterator | use_begin () const |
| use_iterator | use_end () |
| const_use_iterator | use_end () const |
| iterator_range< use_iterator > | materialized_uses () |
| iterator_range < const_use_iterator > | materialized_uses () const |
| iterator_range< use_iterator > | uses () |
| iterator_range < const_use_iterator > | uses () const |
| bool | user_empty () const |
| user_iterator | materialized_user_begin () |
| const_user_iterator | materialized_user_begin () const |
| user_iterator | user_begin () |
| const_user_iterator | user_begin () const |
| user_iterator | user_end () |
| const_user_iterator | user_end () const |
| User * | user_back () |
| const User * | user_back () const |
| iterator_range< user_iterator > | materialized_users () |
| iterator_range < const_user_iterator > | materialized_users () const |
| iterator_range< user_iterator > | users () |
| iterator_range < const_user_iterator > | users () const |
| bool | hasOneUse () const |
| Return true if there is exactly one user of this value. More... | |
| bool | hasNUses (unsigned N) const |
| Return true if this Value has exactly N users. More... | |
| bool | hasNUsesOrMore (unsigned N) const |
| Return true if this value has N users or more. More... | |
| bool | isUsedInBasicBlock (const BasicBlock *BB) const |
| Check if this value is used in the specified basic block. More... | |
| unsigned | getNumUses () const |
| This method computes the number of uses of this Value. More... | |
| void | addUse (Use &U) |
| This method should only be used by the Use class. More... | |
| unsigned | getValueID () const |
| Return an ID for the concrete type of this object. More... | |
| unsigned | getRawSubclassOptionalData () const |
| Return the raw optional flags value contained in this value. More... | |
| void | clearSubclassOptionalData () |
| Clear the optional flags contained in this value. More... | |
| bool | hasSameSubclassOptionalData (const Value *V) const |
| Check the optional flags for equality. More... | |
| bool | hasValueHandle () const |
| Return true if there is a value handle associated with this value. More... | |
| bool | isUsedByMetadata () const |
| Return true if there is metadata referencing this value. More... | |
| bool | isSwiftError () const |
| Return true if this value is a swifterror value. More... | |
| Value * | stripPointerCasts () |
| Strip off pointer casts, all-zero GEPs, and aliases. More... | |
| const Value * | stripPointerCasts () const |
| Value * | stripPointerCastsNoFollowAliases () |
| Strip off pointer casts and all-zero GEPs. More... | |
| const Value * | stripPointerCastsNoFollowAliases () const |
| Value * | stripInBoundsConstantOffsets () |
| Strip off pointer casts and all-constant inbounds GEPs. More... | |
| const Value * | stripInBoundsConstantOffsets () const |
| Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) |
| Accumulate offsets from stripInBoundsConstantOffsets(). More... | |
| const Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const |
| Value * | stripInBoundsOffsets () |
| Strip off pointer casts and inbounds GEPs. More... | |
| const Value * | stripInBoundsOffsets () const |
| unsigned | getPointerDereferenceableBytes (const DataLayout &DL, bool &CanBeNull) const |
| Returns the number of bytes known to be dereferenceable for the pointer value. More... | |
| unsigned | getPointerAlignment (const DataLayout &DL) const |
| Returns an alignment of the pointer value. More... | |
| Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) |
| Translate PHI node to its predecessor from the given basic block. More... | |
| const Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const |
| void | mutateType (Type *Ty) |
| Mutate the type of this Value to be of the specified type. More... | |
| template<class Compare > | |
| void | sortUseList (Compare Cmp) |
| Sort the use-list. More... | |
| void | reverseUseList () |
| Reverse the use-list. More... | |
| void | print (raw_ostream &O, bool IsForDebug=false) const |
| Implement operator<< on Value. More... | |
| void | print (raw_ostream &O, ModuleSlotTracker &MST, bool IsForDebug=false) const |
| void | printAsOperand (raw_ostream &O, bool PrintType=true, const Module *M=nullptr) const |
| Print the name of this Value out to the specified raw_ostream. More... | |
| void | printAsOperand (raw_ostream &O, bool PrintType, ModuleSlotTracker &MST) const |
Public Member Functions inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< Function, Options...>::type > | |
| self_iterator | getIterator () |
| const_self_iterator | getIterator () const |
| reverse_self_iterator | getReverseIterator () |
| const_reverse_self_iterator | getReverseIterator () const |
| bool | isSentinel () const |
| Check whether this is the sentinel node. More... | |
Static Public Member Functions | |
| static Function * | Create (FunctionType *Ty, LinkageTypes Linkage, const Twine &N="", Module *M=nullptr) |
| static Intrinsic::ID | lookupIntrinsicID (StringRef Name) |
| This does the actual lookup of an intrinsic ID which matches the given function name. More... | |
| static ArgumentListType Function::* | getSublistAccess (Argument *) |
| static BasicBlockListType Function::* | getSublistAccess (BasicBlock *) |
| static bool | classof (const Value *V) |
| Methods for support type inquiry through isa, cast, and dyn_cast: More... | |
Static Public Member Functions inherited from llvm::GlobalObject | |
| static bool | classof (const Value *V) |
Static Public Member Functions inherited from llvm::GlobalValue | |
| static UnnamedAddr | getMinUnnamedAddr (UnnamedAddr A, UnnamedAddr B) |
| static LinkageTypes | getLinkOnceLinkage (bool ODR) |
| static LinkageTypes | getWeakLinkage (bool ODR) |
| static bool | isExternalLinkage (LinkageTypes Linkage) |
| static bool | isAvailableExternallyLinkage (LinkageTypes Linkage) |
| static bool | isLinkOnceODRLinkage (LinkageTypes Linkage) |
| static bool | isLinkOnceLinkage (LinkageTypes Linkage) |
| static bool | isWeakAnyLinkage (LinkageTypes Linkage) |
| static bool | isWeakODRLinkage (LinkageTypes Linkage) |
| static bool | isWeakLinkage (LinkageTypes Linkage) |
| static bool | isAppendingLinkage (LinkageTypes Linkage) |
| static bool | isInternalLinkage (LinkageTypes Linkage) |
| static bool | isPrivateLinkage (LinkageTypes Linkage) |
| static bool | isLocalLinkage (LinkageTypes Linkage) |
| static bool | isExternalWeakLinkage (LinkageTypes Linkage) |
| static bool | isCommonLinkage (LinkageTypes Linkage) |
| static bool | isValidDeclarationLinkage (LinkageTypes Linkage) |
| static bool | isInterposableLinkage (LinkageTypes Linkage) |
| Whether the definition of this global may be replaced by something non-equivalent at link time. More... | |
| static bool | isDiscardableIfUnused (LinkageTypes Linkage) |
| Whether the definition of this global may be discarded if it is not used in its compilation unit. More... | |
| static bool | isWeakForLinker (LinkageTypes Linkage) |
| Whether the definition of this global may be replaced at link time. More... | |
| static StringRef | getRealLinkageName (StringRef Name) |
| If special LLVM prefix that is used to inform the asm printer to not emit usual symbol prefix before the symbol name is used then return linkage name after skipping this special LLVM prefix. More... | |
| static std::string | getGlobalIdentifier (StringRef Name, GlobalValue::LinkageTypes Linkage, StringRef FileName) |
| Return the modified name for a global value suitable to be used as the key for a global lookup (e.g. More... | |
| static GUID | getGUID (StringRef GlobalName) |
| Return a 64-bit global unique ID constructed from global value name (i.e. More... | |
| static bool | classof (const Value *V) |
Static Public Member Functions inherited from llvm::Constant | |
| static bool | classof (const Value *V) |
| static Constant * | getNullValue (Type *Ty) |
| Constructor to create a '0' constant of arbitrary type. More... | |
| static Constant * | getAllOnesValue (Type *Ty) |
| Get the all ones value. More... | |
| static Constant * | getIntegerValue (Type *Ty, const APInt &V) |
| Return the value for an integer or pointer constant, or a vector thereof, with the given scalar value. More... | |
Static Public Member Functions inherited from llvm::User | |
| static bool | classof (const Value *V) |
Friends | |
| class | SymbolTableListTraits< Function > |
Additional Inherited Members | |
Static Public Attributes inherited from llvm::Value | |
| static const unsigned | MaxAlignmentExponent = 29 |
| The maximum alignment for instructions. More... | |
| static const unsigned | MaximumAlignment = 1u << MaxAlignmentExponent |
Protected Types inherited from llvm::GlobalObject | |
| enum | { LastAlignmentBit = 4, HasMetadataHashEntryBit, HasSectionHashEntryBit, GlobalObjectBits } |
Protected Types inherited from llvm::Value | |
| enum | : unsigned { NumUserOperandsBits = 28 } |
| The number of operands in the subclass. More... | |
Protected Types inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< Function, Options...>::type > | |
| typedef ilist_iterator < ilist_detail::compute_node_options < Function, Options...>::type, false, false > | self_iterator |
| typedef ilist_iterator < ilist_detail::compute_node_options < Function, Options...>::type, false, true > | const_self_iterator |
| typedef ilist_iterator < ilist_detail::compute_node_options < Function, Options...>::type, true, false > | reverse_self_iterator |
| typedef ilist_iterator < ilist_detail::compute_node_options < Function, Options...>::type, true, true > | const_reverse_self_iterator |
Protected Member Functions inherited from llvm::GlobalObject | |
| GlobalObject (Type *Ty, ValueTy VTy, Use *Ops, unsigned NumOps, LinkageTypes Linkage, const Twine &Name, unsigned AddressSpace=0) | |
Protected Member Functions inherited from llvm::GlobalValue | |
| GlobalValue (Type *Ty, ValueTy VTy, Use *Ops, unsigned NumOps, LinkageTypes Linkage, const Twine &Name, unsigned AddressSpace) | |
| unsigned | getGlobalValueSubClassData () const |
| void | setGlobalValueSubClassData (unsigned V) |
| void | setParent (Module *parent) |
Protected Member Functions inherited from llvm::Constant | |
| Constant (Type *ty, ValueTy vty, Use *Ops, unsigned NumOps) | |
Protected Member Functions inherited from llvm::User | |
| void * | operator new (size_t Size) |
| Allocate a User with an operand pointer co-allocated. More... | |
| void * | operator new (size_t Size, unsigned Us) |
| Allocate a User with the operands co-allocated. More... | |
| void * | operator new (size_t Size, unsigned Us, unsigned DescBytes) |
| Allocate a User with the operands co-allocated. More... | |
| User (Type *ty, unsigned vty, Use *, unsigned NumOps) | |
| void | allocHungoffUses (unsigned N, bool IsPhi=false) |
| Allocate the array of Uses, followed by a pointer (with bottom bit set) to the User. More... | |
| void | growHungoffUses (unsigned N, bool IsPhi=false) |
| Grow the number of hung off uses. More... | |
| template<int Idx> | |
| Use & | Op () |
| template<int Idx> | |
| const Use & | Op () const |
Protected Member Functions inherited from llvm::Value | |
| Value (Type *Ty, unsigned scid) | |
| unsigned short | getSubclassDataFromValue () const |
| void | setValueSubclassData (unsigned short D) |
Protected Member Functions inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< Function, Options...>::type > | |
| ilist_node_impl ()=default | |
Static Protected Member Functions inherited from llvm::User | |
| template<int Idx, typename U > | |
| static Use & | OpFrom (const U *that) |
Protected Attributes inherited from llvm::GlobalObject | |
| Comdat * | ObjComdat |
Protected Attributes inherited from llvm::GlobalValue | |
| Type * | ValueType |
| unsigned | Linkage: 4 |
| unsigned | Visibility: 2 |
| unsigned | UnnamedAddrVal: 2 |
| unsigned | DllStorageClass: 2 |
| unsigned | ThreadLocal: 3 |
| unsigned | HasLLVMReservedName: 1 |
| True if the function's name starts with "llvm.". More... | |
| Intrinsic::ID | IntID |
| The intrinsic ID for this subclass (which must be a Function). More... | |
| Module * | Parent |
Protected Attributes inherited from llvm::Value | |
| unsigned char | SubclassOptionalData: 7 |
| Hold subclass data that can be dropped. More... | |
| unsigned | NumUserOperands: NumUserOperandsBits |
| unsigned | IsUsedByMD: 1 |
| unsigned | HasName: 1 |
| unsigned | HasHungOffUses: 1 |
| unsigned | HasDescriptor: 1 |
Static Protected Attributes inherited from llvm::GlobalObject | |
| static const unsigned | GlobalObjectSubClassDataBits |
Static Protected Attributes inherited from llvm::GlobalValue | |
| static const unsigned | GlobalValueSubClassDataBits = 18 |
Definition at line 48 of file Function.h.
Definition at line 57 of file Function.h.
Definition at line 50 of file Function.h.
Definition at line 51 of file Function.h.
Definition at line 58 of file Function.h.
Definition at line 55 of file Function.h.
Definition at line 54 of file Function.h.
|
override |
Definition at line 281 of file Function.cpp.
References llvm::iplist_impl< IntrusiveListT, TraitsT >::clear(), clearGC(), and dropAllReferences().
| void Function::addAttribute | ( | unsigned | i, |
| Attribute::AttrKind | Kind | ||
| ) |
adds the attribute to the list of attributes.
Definition at line 364 of file Function.cpp.
References llvm::AttributeSet::addAttribute(), getAttributes(), getContext(), and setAttributes().
Referenced by addFnAttr(), addNonNullAttrs(), createClone(), setDoesNotAccessMemory(), setDoesNotAlias(), setDoesNotCapture(), setNonNull(), and setOnlyReadsMemory().
adds the attribute to the list of attributes.
Definition at line 370 of file Function.cpp.
References llvm::AttributeSet::addAttribute(), getAttributes(), getContext(), and setAttributes().
| void Function::addAttributes | ( | unsigned | i, |
| AttributeSet | Attrs | ||
| ) |
adds the attributes to the list of attributes.
Definition at line 376 of file Function.cpp.
References llvm::AttributeSet::addAttributes(), getAttributes(), getContext(), and setAttributes().
Referenced by llvm::Argument::addAttr(), LLVMAddTargetDependentFunctionAttr(), and removeUseSoftFloat().
| void Function::addDereferenceableAttr | ( | unsigned | i, |
| uint64_t | Bytes | ||
| ) |
adds the dereferenceable attribute to the list of attributes.
Definition at line 400 of file Function.cpp.
References llvm::AttributeSet::addDereferenceableAttr(), getAttributes(), getContext(), and setAttributes().
| void Function::addDereferenceableOrNullAttr | ( | unsigned | i, |
| uint64_t | Bytes | ||
| ) |
adds the dereferenceable_or_null attribute to the list of attributes.
Definition at line 406 of file Function.cpp.
References llvm::AttributeSet::addDereferenceableOrNullAttr(), getAttributes(), getContext(), and setAttributes().
|
inline |
Add function attributes to this function.
Definition at line 182 of file Function.h.
References addAttribute(), and llvm::AttributeSet::FunctionIndex.
Referenced by addForcedAttributes(), adjustCallerSSPLevel(), assureFPCallStub(), createDevirtTriggerFunc(), createFPFnStub(), prepareForSplit(), runImpl(), setCannotDuplicate(), setConvergent(), setDoesNotAccessMemory(), setDoesNotReadMemory(), setDoesNotRecurse(), setDoesNotReturn(), setDoesNotThrow(), setHasUWTable(), setOnlyAccessesArgMemory(), setOnlyAccessesInaccessibleMemOrArgMem(), setOnlyAccessesInaccessibleMemory(), and setOnlyReadsMemory().
Add function attributes to this function.
Definition at line 187 of file Function.h.
References addAttribute(), llvm::AttributeSet::FunctionIndex, llvm::Attribute::get(), and getContext().
|
inline |
Definition at line 192 of file Function.h.
References addAttribute(), and llvm::AttributeSet::FunctionIndex.
|
inline |
Definition at line 550 of file Function.h.
Referenced by AddAlignmentAssumptions(), addArgumentAttrs(), addByteCountSuffix(), args(), llvm::Interpreter::callFunction(), llvm::orc::cloneFunctionDecl(), llvm::CloneModule(), llvm::FunctionComparator::compareSignature(), CreateWrapper(), determinePointerReadAttrs(), DoPromotion(), eliminateRecursiveTailCall(), EnsureFPIntrinsicsExist(), llvm::Evaluator::EvaluateFunction(), findTRECandidate(), llvm::Argument::getArgNo(), llvm::objcarc::GetFunctionClass(), llvm::SparcTargetLowering::getSRetArgSize(), HasNestArgument(), hasSameArgumentList(), llvm::HexagonEvaluator::HexagonEvaluator(), llvm::InlineFunction(), isDynamicConstant(), LLVMGetFirstParam(), LLVMGetLastParam(), LLVMGetParams(), LLVMGetPreviousParam(), llvm::FastISel::lowerArguments(), PropagateConstantsIntoArguments(), runIPSCCP(), setupSwiftErrorVals(), and UpgradeIntrinsicFunction1().
|
inline |
Definition at line 554 of file Function.h.
| bool Function::arg_empty | ( | ) | const |
Definition at line 330 of file Function.cpp.
References getFunctionType(), and llvm::FunctionType::getNumParams().
Referenced by llvm::ARMCallLowering::lowerFormalArguments(), llvm::X86CallLowering::lowerFormalArguments(), and PropagateConstantsIntoArguments().
|
inline |
Definition at line 559 of file Function.h.
Referenced by AddAlignmentAssumptions(), addArgumentAttrs(), addByteCountSuffix(), args(), llvm::Interpreter::callFunction(), llvm::orc::cloneFunctionDecl(), llvm::FunctionComparator::compareSignature(), CreateWrapper(), DoPromotion(), eliminateRecursiveTailCall(), EnsureFPIntrinsicsExist(), llvm::Evaluator::EvaluateFunction(), findTRECandidate(), llvm::objcarc::GetFunctionClass(), HasNestArgument(), llvm::HexagonEvaluator::HexagonEvaluator(), llvm::InlineFunction(), LLVMGetFirstParam(), LLVMGetLastParam(), LLVMGetNextParam(), LLVMGetParams(), llvm::FastISel::lowerArguments(), runIPSCCP(), and setupSwiftErrorVals().
|
inline |
Definition at line 563 of file Function.h.
| size_t Function::arg_size | ( | ) | const |
Definition at line 327 of file Function.cpp.
References getFunctionType(), and llvm::FunctionType::getNumParams().
Referenced by llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::Interpreter::callFunction(), llvm::FunctionComparator::compareSignature(), determinePointerReadAttrs(), llvm::FunctionComparator::functionHash(), llvm::CFLSteensAAResult::FunctionInfo::FunctionInfo(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getCallCost(), llvm::InlineFunction(), needsFPFromSig(), needsFPStubFromParams(), PropagateConstantsIntoArguments(), UpgradeIntrinsicFunction1(), and whichFPParamVariantNeeded().
|
inline |
Definition at line 568 of file Function.h.
References arg_begin(), arg_end(), and llvm::make_range().
Referenced by AddAliasScopeMetadata(), addArgumentReturnedAttrs(), llvm::CloneAndPruneIntoFromInst(), llvm::CloneFunction(), llvm::CloneFunctionInto(), llvm::ComputeSignatureVTs(), FunctionNumber(), getRuntimeMDForKernel(), handleEndBlock(), llvm::ValueEnumerator::incorporateFunction(), initSlots2Values(), llvm::orc::makeStub(), markTails(), llvm::parseFunctionArgs(), populateExternalRelations(), llvm::DivergenceAnalysis::print(), PromoteArguments(), runIPSCCP(), llvm::IRTranslator::runOnMachineFunction(), and runSCCP().
|
inline |
Definition at line 571 of file Function.h.
References arg_begin(), arg_end(), and llvm::make_range().
|
inline |
Definition at line 544 of file Function.h.
|
inline |
Definition at line 545 of file Function.h.
|
inline |
Definition at line 535 of file Function.h.
Referenced by addNoRecurseAttrs(), llvm::CFGMST< Edge, BBInfo >::buildEdges(), llvm::CloneFunctionInto(), cxxDtorIsEmpty(), eliminateTailRecursion(), eliminateUnreachableBlock(), HandleByValArgument(), llvm::InlineFunction(), llvm::isInlineViable(), iterativelyFlattenCFG(), iterativelySimplifyCFG(), LLVMGetFirstBasicBlock(), LLVMGetLastBasicBlock(), LLVMGetPreviousBasicBlock(), mergeEmptyReturnBlocks(), needsFP(), llvm::GraphTraits< BlockFrequencyInfo * >::nodes_begin(), llvm::GraphTraits< Function * >::nodes_begin(), llvm::GraphTraits< const Function * >::nodes_begin(), llvm::removeUnreachableBlocks(), llvm::JumpThreadingPass::runImpl(), runIPSCCP(), runPartiallyInlineLibCalls(), setCoroInfo(), SimplifyFunction(), and llvm::InstVisitor< ObjectSizeOffsetVisitor, SizeOffsetType >::visit().
|
inline |
Definition at line 536 of file Function.h.
| bool Function::callsFunctionThatReturnsTwice | ( | ) | const |
callsFunctionThatReturnsTwice - Return true if the function has a call to setjmp or other function that gcc recognizes as "returning twice".
Definition at line 1207 of file Function.cpp.
References E, llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::hasFnAttr(), I, llvm::inst_begin(), and llvm::inst_end().
Referenced by markTails(), and llvm::SelectionDAGISel::runOnMachineFunction().
|
inline |
Determine if the call cannot be duplicated.
Definition at line 378 of file Function.h.
References hasFnAttribute().
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition at line 629 of file Function.h.
References llvm::Value::getValueID().
| void Function::clearGC | ( | ) |
Definition at line 422 of file Function.cpp.
References llvm::LLVMContext::deleteGC(), getContext(), and hasGC().
Referenced by copyAttributesFrom(), LLVMSetGC(), and ~Function().
|
overridevirtual |
copyAttributesFrom - copy all additional attributes (those not needed to create a Function) from the Function Src to this one.
Copy all additional attributes (those not needed to create a Function) from the Function Src to this one.
Reimplemented from llvm::GlobalValue.
Definition at line 431 of file Function.cpp.
References clearGC(), llvm::GlobalObject::copyAttributesFrom(), llvm::dyn_cast(), getAttributes(), getCallingConv(), getGC(), getPersonalityFn(), getPrefixData(), getPrologueData(), hasGC(), hasPersonalityFn(), hasPrefixData(), hasPrologueData(), setAttributes(), setCallingConv(), setGC(), setPersonalityFn(), setPrefixData(), and setPrologueData().
Referenced by llvm::orc::cloneFunctionDecl(), llvm::CloneFunctionInto(), llvm::CloneModule(), and DoPromotion().
|
inlinestatic |
Definition at line 117 of file Function.h.
References N.
Referenced by assureFPCallStub(), llvm::CloneFunction(), llvm::orc::cloneFunctionDecl(), llvm::CloneModule(), createClone(), createFPFnStub(), createGlobalFwdRef(), llvm::createSanitizerCtorAndInitFunctions(), CreateWrapper(), DoPromotion(), llvm::SanitizerStatReport::finish(), llvm::Module::getOrInsertFunction(), LLVMAddFunction(), and UpgradeIntrinsicFunction1().
| llvm::Function::DECLARE_TRANSPARENT_OPERAND_ACCESSORS | ( | Value | ) |
|
inline |
deleteBody - This method deletes the body of the function, and converts the linkage to external.
Definition at line 475 of file Function.h.
References dropAllReferences(), llvm::GlobalValue::ExternalLinkage, and llvm::GlobalValue::setLinkage().
Referenced by llvm::orc::moveFunctionBody().
|
inline |
Determine if the function does not access memory.
Definition at line 313 of file Function.h.
References hasFnAttribute().
Referenced by doesNotReadMemory(), llvm::BasicAAResult::getModRefBehavior(), llvm::maybeMarkSanitizerLibraryCallNoBuiltin(), onlyReadsMemory(), and setDoesNotAccessMemory().
Definition at line 445 of file Function.h.
References llvm::AttributeSet::hasAttribute().
Determine if the parameter or return value is marked with NoAlias attribute.
| n | The parameter to check. 1 is the first parameter, 0 is the return |
Definition at line 429 of file Function.h.
References llvm::AttributeSet::hasAttribute(), and llvm::NoAlias.
Referenced by addNoAliasAttrs(), and setDoesNotAlias().
Determine if the parameter can be captured.
| n | The parameter to check. 1 is the first parameter, 0 is the return |
Definition at line 438 of file Function.h.
References llvm::AttributeSet::hasAttribute().
Referenced by setDoesNotCapture().
|
inline |
Determine if the function does not access or only writes memory.
Definition at line 329 of file Function.h.
References doesNotAccessMemory(), hasFnAttribute(), and AMDGPU::RuntimeMD::KernelArg::WriteOnly.
Referenced by llvm::BasicAAResult::getModRefBehavior().
|
inline |
Determine if the function is known not to recurse, directly or indirectly.
Definition at line 398 of file Function.h.
References hasFnAttribute().
Referenced by addNoRecurseAttrs(), addNoRecurseAttrsTopDown(), deduceFunctionAttributeInRPO(), processInternalGlobal(), and setDoesNotRecurse().
|
inline |
Determine if the function cannot return.
Definition at line 362 of file Function.h.
References hasFnAttribute().
Referenced by runImpl().
|
inline |
Determine if the function cannot unwind.
Definition at line 370 of file Function.h.
References hasFnAttribute().
Referenced by addArgumentAttrs(), llvm::EHStreamer::callToNoUnwindFunction(), llvm::StatepointBase< Function, Instruction, Value, CallSite >::doesNotThrow(), needsUnwindTableEntry(), llvm::EscapeEnumerator::Next(), runImpl(), setDoesNotThrow(), and llvm::InstCombiner::visitCallInst().
| void Function::dropAllReferences | ( | ) |
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.
Definition at line 342 of file Function.cpp.
References llvm::GlobalObject::clearMetadata(), llvm::User::dropAllReferences(), llvm::BasicBlock::dropAllReferences(), llvm::User::getNumOperands(), llvm::Value::getSubclassDataFromValue(), setIsMaterializable(), and llvm::User::setNumHungOffUseOperands().
Referenced by deleteBody(), llvm::Module::dropAllReferences(), and ~Function().
|
inline |
Definition at line 541 of file Function.h.
Referenced by InsertSafepointPoll(), llvm::optimizeGlobalCtorsList(), and llvm::IRTranslator::runOnMachineFunction().
|
inline |
Definition at line 537 of file Function.h.
Referenced by llvm::CFGMST< Edge, BBInfo >::buildEdges(), llvm::CloneAndPruneIntoFromInst(), llvm::CloneFunctionInto(), cxxDtorIsEmpty(), eliminateTailRecursion(), eliminateUnreachableBlock(), fixupLineNumbers(), HandleInlinedEHPad(), HandleInlinedLandingPad(), llvm::InlineFunction(), llvm::isInlineViable(), iterativelyFlattenCFG(), iterativelySimplifyCFG(), LLVMGetFirstBasicBlock(), LLVMGetLastBasicBlock(), LLVMGetNextBasicBlock(), mergeEmptyReturnBlocks(), needsFP(), llvm::GraphTraits< BlockFrequencyInfo * >::nodes_end(), llvm::GraphTraits< Function * >::nodes_end(), llvm::GraphTraits< const Function * >::nodes_end(), llvm::peelLoop(), placeSplitBlockCarefully(), llvm::removeUnreachableBlocks(), llvm::JumpThreadingPass::runImpl(), runIPSCCP(), runPartiallyInlineLibCalls(), SimplifyFunction(), llvm::UnrollRuntimeLoopRemainder(), and llvm::InstVisitor< ObjectSizeOffsetVisitor, SizeOffsetType >::visit().
|
inline |
Definition at line 538 of file Function.h.
|
overridevirtual |
eraseFromParent - This method unlinks 'this' from the containing module and deletes it.
Implements llvm::GlobalValue.
Definition at line 246 of file Function.cpp.
References llvm::iplist_impl< IntrusiveListT, TraitsT >::erase(), llvm::Module::getFunctionList(), llvm::ilist_node_impl< ilist_detail::compute_node_options< Function, Options...>::type >::getIterator(), and llvm::GlobalValue::getParent().
Referenced by CreateWrapper(), stripDeadPrototypes(), and llvm::UpgradeCallsToIntrinsic().
|
inline |
Definition at line 542 of file Function.h.
Referenced by llvm::Interpreter::callFunction(), llvm::CloneAndPruneFunctionInto(), llvm::CloneFunctionInto(), llvm::Evaluator::EvaluateFunction(), getEntryBlock(), llvm::GraphTraits< BlockFrequencyInfo * >::getEntryNode(), handleEndBlock(), llvm::IntervalIterator< NodeTy, OrigContainer_t, GT, IGT >::IntervalIterator(), isOnlyUsedInEntryBlock(), isSafeToPromoteArgument(), llvm::AllocaInst::isStaticAlloca(), markAliveBlocks(), prepareICWorklistFromFunction(), runIPSCCP(), llvm::IRTranslator::runOnMachineFunction(), and runSCCP().
|
inline |
Definition at line 543 of file Function.h.
|
inline |
Get the underlying elements of the Function...
the basic block list is empty for external functions.
Definition at line 499 of file Function.h.
Referenced by llvm::Argument::Argument(), llvm::coro::buildCoroutineFrame(), createClone(), getFrameType(), hasSameArgumentList(), llvm::AArch64CallLowering::lowerFormalArguments(), llvm::ARMCallLowering::lowerFormalArguments(), and needsFPFromSig().
|
inline |
Definition at line 503 of file Function.h.
|
inline |
Definition at line 280 of file Function.h.
References llvm::AttributeSet::getAttribute().
Referenced by getFnAttribute().
Definition at line 284 of file Function.h.
References llvm::AttributeSet::getAttribute().
|
inline |
Return the attribute list for this Function.
Definition at line 176 of file Function.h.
Referenced by addAttribute(), addAttributes(), addDereferenceableAttr(), addDereferenceableOrNullAttr(), addNonNullAttrs(), llvm::attributesPermitTailCall(), llvm::TargetLowering::BuildSDIVPow2(), llvm::CloneFunctionInto(), llvm::FunctionComparator::compareSignature(), copyAttributesFrom(), DoPromotion(), llvm::XCoreFrameLowering::emitPrologue(), llvm::AArch64RegisterInfo::getCalleeSavedRegs(), llvm::SystemZRegisterInfo::getCalleeSavedRegs(), llvm::ARMBaseRegisterInfo::getCalleeSavedRegs(), llvm::X86RegisterInfo::getCalleeSavedRegs(), llvm::AArch64RegisterInfo::getCallPreservedMask(), llvm::SystemZRegisterInfo::getCallPreservedMask(), llvm::ARMBaseRegisterInfo::getCallPreservedMask(), llvm::X86RegisterInfo::getCallPreservedMask(), llvm::HexagonTargetMachine::getSubtargetImpl(), hasAttribute(), llvm::Argument::hasByValOrInAllocaAttr(), llvm::Argument::hasSwiftErrorAttr(), llvm::Argument::hasSwiftSelfAttr(), llvm::HexagonEvaluator::HexagonEvaluator(), insertSinCosCall(), isArgPassedInSGPR(), llvm::TargetLowering::isInTailCallPosition(), llvm::orc::makeStub(), llvm::Argument::onlyReadsMemory(), optimizeBinaryDoubleFP(), OptimizeFunctions(), optimizeUnaryDoubleFP(), llvm::StatepointBase< Function, Instruction, Value, CallSite >::paramHasAttr(), produceCompactUnwindFrame(), PromoteArguments(), removeAttribute(), removeAttributes(), RemoveNestAttribute(), llvm::FunctionLoweringInfo::set(), and setNonNull().
|
inline |
Definition at line 512 of file Function.h.
Referenced by llvm::CloneAndPruneIntoFromInst(), llvm::FunctionComparator::cmpConstants(), DoPromotion(), llvm::BasicBlock::eraseFromParent(), llvm::InlineFunction(), llvm::BasicBlock::insertInto(), insertUniqueBackedgeBlock(), llvm::BasicBlock::moveAfter(), llvm::BasicBlock::moveBefore(), llvm::peelLoop(), llvm::BasicBlock::removeFromParent(), llvm::removeUnreachableBlocks(), runIPSCCP(), llvm::SplitCriticalEdge(), llvm::UnrollLoop(), and llvm::UnrollRuntimeLoopRemainder().
|
inline |
Definition at line 513 of file Function.h.
|
inline |
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.
Definition at line 165 of file Function.h.
References llvm::Value::getSubclassDataFromValue(), and llvm::CallingConv::MaxID.
Referenced by llvm::SIInstrInfo::calculateLDSSpillAddress(), llvm::FunctionComparator::compareSignature(), computeCalleeSaveRegisterPairs(), copyAttributesFrom(), llvm::AArch64FrameLowering::determineCalleeSaves(), llvm::AVRFrameLowering::emitEpilogue(), llvm::ARMFrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), llvm::AVRFrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::AMDGPUSubtarget::enableIEEEBit(), llvm::X86FrameLowering::enableShrinkWrapping(), llvm::MSP430RegisterInfo::getCalleeSavedRegs(), llvm::AVRRegisterInfo::getCalleeSavedRegs(), llvm::AArch64RegisterInfo::getCalleeSavedRegs(), llvm::PPCRegisterInfo::getCalleeSavedRegs(), llvm::ARMBaseRegisterInfo::getCalleeSavedRegs(), llvm::X86RegisterInfo::getCalleeSavedRegs(), llvm::AArch64RegisterInfo::getCalleeSavedRegsViaCopy(), llvm::PPCRegisterInfo::getCalleeSavedRegsViaCopy(), llvm::ARMBaseRegisterInfo::getCalleeSavedRegsViaCopy(), llvm::X86RegisterInfo::getCalleeSavedRegsViaCopy(), llvm::AMDGPUSubtarget::getFlatWorkGroupSizes(), llvm::X86RegisterInfo::getGPRsForTailCall(), llvm::Mangler::getNameWithPrefix(), llvm::X86RegisterInfo::getReservedRegs(), GetScratchRegister(), llvm::TargetFrameLowering::getStackAlignmentSkew(), llvm::CallLowering::handleAssignments(), llvm::InlineFunction(), isArgPassedInSGPR(), llvm::HexagonTargetLowering::IsEligibleForTailCallOptimization(), llvm::isKernelFunction(), llvm::AMDGPUSubtarget::isMesaGfxShader(), llvm::AMDGPUSubtarget::isMesaKernel(), isProfitableToMakeFastCC(), llvm::SISubtarget::isVGPRSpillingEnabled(), llvm::SIInstrInfo::legalizeOperands(), llvm::AArch64CallLowering::lowerCall(), llvm::AArch64CallLowering::lowerFormalArguments(), llvm::ARMCallLowering::lowerFormalArguments(), llvm::AArch64CallLowering::lowerReturn(), LowerVACOPY(), llvm::Intrinsic::remangleIntrinsicFunction(), llvm::FunctionLoweringInfo::set(), llvm::AArch64TargetLowering::supportSplitCSR(), llvm::PPCTargetLowering::supportSplitCSR(), llvm::R600InstrInfo::usesTextureCache(), and llvm::R600InstrInfo::usesVertexCache().
| LLVMContext & Function::getContext | ( | ) | const |
getContext - Return a reference to the LLVMContext associated with this function.
Definition at line 226 of file Function.cpp.
References llvm::Type::getContext(), and llvm::GlobalValue::getType().
Referenced by AddAliasScopeMetadata(), addArgumentAttrs(), addArgumentReturnedAttrs(), llvm::Argument::addAttr(), addAttribute(), addAttributes(), addDereferenceableAttr(), addDereferenceableOrNullAttr(), addFnAttr(), adjustCallerSSPLevel(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::OptimizationRemarkEmitter::allowExtraAnalysis(), llvm::MachineIRBuilder::buildConstant(), llvm::coro::buildCoroutineFrame(), buildFrameType(), llvm::coro::Shape::buildFrom(), clearGC(), llvm::CloneFunctionInto(), combineInstructionsOverFunction(), llvm::ComputeLegalValueVTs(), ConvertImplicitDefToConstZero(), createFPFnStub(), createMaskInstrs(), llvm::createPGOFuncNameMetadata(), createResumeEntryBlock(), DoPromotion(), duplicateCPV(), eliminateRecursiveTailCall(), llvm::OptimizationRemarkEmitter::emit(), llvm::AMDGPUAsmPrinter::EmitInstruction(), llvm::ARMBaseRegisterInfo::emitLoadConstPool(), llvm::OptimizationRemarkEmitter::emitOptimizationRemark(), llvm::OptimizationRemarkEmitter::emitOptimizationRemarkAnalysis(), llvm::OptimizationRemarkEmitter::emitOptimizationRemarkAnalysisAliasing(), llvm::OptimizationRemarkEmitter::emitOptimizationRemarkAnalysisFPCommute(), llvm::OptimizationRemarkEmitter::emitOptimizationRemarkMissed(), emitThumb1LoadConstPool(), emitThumb2LoadConstPool(), llvm::AlignmentFromAssumptionsPass::extractAlignmentInfo(), llvm::FastISel::fastEmit_ri_(), fixupLineNumbers(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::BlockAddress::get(), getGC(), llvm::AMDGPU::getIntegerAttribute(), llvm::AMDGPU::getIntegerPairAttribute(), getRuntimeMDForKernel(), llvm::slpvectorizer::BoUpSLP::getTreeCost(), llvm::CallLowering::handleAssignments(), HandleInlinedEHPad(), llvm::SelectionDAG::init(), INITIALIZE_PASS(), insertFastDiv(), llvm::isFreeCall(), llvm::LegalizerHelper::libcall(), LLVMAddTargetDependentFunctionAttr(), llvm::XCoreInstrInfo::loadImmediate(), llvm::SIInstrInfo::loadRegFromStackSlot(), llvm::BlockAddress::lookup(), llvm::AMDGPUMCInstLower::lower(), llvm::NVPTXTargetLowering::LowerCall(), llvm::NVPTXTargetLowering::LowerReturn(), llvm::OptimizationRemarkEmitter::OptimizationRemarkEmitter(), prepareForSplit(), PromoteArguments(), llvm::Argument::removeAttr(), removeAttribute(), removeAttributes(), removeFnAttr(), RemoveNestAttribute(), removeUseSoftFloat(), llvm::legacy::FunctionPassManagerImpl::run(), llvm::OptimizationRemarkEmitterAnalysis::run(), llvm::ExecutionEngine::runFunctionAsMain(), llvm::LPPassManager::runOnFunction(), llvm::OptimizationRemarkEmitterWrapperPass::runOnFunction(), llvm::FastISel::selectExtractValue(), llvm::FunctionLoweringInfo::set(), setCoroInfo(), setEntryCount(), setGC(), setSectionPrefix(), llvm::BasicBlockPass::skipBasicBlock(), llvm::FunctionPass::skipFunction(), llvm::LoopPass::skipLoop(), llvm::SIInstrInfo::storeRegToStackSlot(), llvm::UpgradeIntrinsicFunction(), UpgradeIntrinsicFunction1(), UpgradeSSE41Function(), and llvm::slpvectorizer::BoUpSLP::vectorizeTree().
|
inline |
Extract the number of dereferenceable bytes for a call or parameter (0=unknown).
Definition at line 302 of file Function.h.
References llvm::AttributeSet::getDereferenceableBytes().
Referenced by llvm::Argument::getDereferenceableBytes().
|
inline |
Extract the number of dereferenceable_or_null bytes for a call or parameter (0=unknown).
Definition at line 308 of file Function.h.
References llvm::AttributeSet::getDereferenceableOrNullBytes().
Referenced by llvm::Argument::getDereferenceableOrNullBytes().
|
inline |
Definition at line 519 of file Function.h.
References front().
Referenced by llvm::CFGMST< Edge, BBInfo >::buildEdges(), llvm::BranchProbabilityInfo::calculate(), calculateStateNumbersForInvokes(), llvm::CloneAndPruneIntoFromInst(), llvm::CloneBasicBlock(), llvm::colorEHFunclets(), llvm::FunctionComparator::compare(), ComputePostOrders(), CreatePrologue(), cxxDtorIsEmpty(), llvm::DemotePHIToStack(), llvm::DemoteRegToStack(), eliminateRecursiveTailCall(), llvm::FindFunctionBackedges(), findLocationForEntrySafepoint(), findTRECandidate(), llvm::FunctionComparator::functionHash(), llvm::MemoryDependenceResults::getDependency(), llvm::GraphTraits< Function * >::getEntryNode(), llvm::GraphTraits< const Function * >::getEntryNode(), llvm::GraphTraits< Inverse< Function * > >::getEntryNode(), llvm::GraphTraits< Inverse< const Function * > >::getEntryNode(), getFirstNonAllocaInTheEntryBlock(), llvm::MemoryDependenceResults::getNonLocalCallDependency(), getPredState(), llvm::MemoryDependenceResults::getSimplePointerDependencyFrom(), INITIALIZE_PASS(), llvm::InlineFunction(), InsertRootInitializers(), insertSinCosCall(), isEmptyFunction(), llvm::SelectionDAGBuilder::isExportableFromCurrentBlock(), llvm::isPotentiallyReachable(), memoryIsNotModifiedBetween(), llvm::MergeBasicBlockIntoOnlyPred(), NegateValue(), prepareForSplit(), llvm::PrepareToSplitEntryBlock(), llvm::JumpThreadingPass::ProcessBlock(), processInternalGlobal(), promoteMemoryToRegister(), llvm::RegionInfo::recalculate(), relocationViaAlloca(), llvm::ConstantHoistingPass::run(), llvm::SLPVectorizerPass::runImpl(), llvm::JumpThreadingPass::runImpl(), runImpl(), shouldInstrumentBlock(), llvm::BasicBlockPass::skipBasicBlock(), llvm::SparseSolver::Solve(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), TryToSinkInstruction(), ValueDominatesPHI(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), and llvm::InstCombiner::visitAllocaInst().
|
inline |
Definition at line 520 of file Function.h.
References front().
| Optional< uint64_t > Function::getEntryCount | ( | ) | const |
Get the entry count for this function.
Entry count is the number of times the function was executed based on pgo data.
Definition at line 1287 of file Function.cpp.
References llvm::GlobalObject::getMetadata(), llvm::MDNode::getOperand(), llvm::ConstantInt::getValue(), llvm::APInt::getZExtValue(), llvm::LLVMContext::MD_prof, and llvm::None.
Referenced by llvm::buildModuleSummaryIndex(), getLayoutSuccessorProbThreshold(), llvm::BlockFrequencyInfoImplBase::getProfileCountFromFreq(), llvm::ProfileSummaryInfo::isFunctionEntryCold(), llvm::ProfileSummaryInfo::isFunctionEntryHot(), llvm::JumpThreadingPass::run(), and sinkLoopInvariantInstructions().
|
inline |
Return the attribute for the given attribute kind.
Definition at line 234 of file Function.h.
References llvm::AttributeSet::FunctionIndex, and getAttribute().
Referenced by llvm::NVPTXTargetLowering::allowFMA(), llvm::TargetTransformInfoImplBase::areInlineCompatible(), areJTsAllowed(), attributeMatches(), checkFunctionsAttributeConsistency(), eliminateTailRecursion(), llvm::X86FrameLowering::emitPrologue(), getAllocationSize(), llvm::ARMBaseRegisterInfo::getCalleeSavedRegs(), getDeoptLowering(), llvm::AMDGPUTargetMachine::getFeatureString(), llvm::AMDGPUTargetMachine::getGPUName(), llvm::AMDGPU::getIntegerAttribute(), llvm::AMDGPU::getIntegerPairAttribute(), getRecipEstimateForFunc(), llvm::X86TargetMachine::getSubtargetImpl(), llvm::AArch64TargetMachine::getSubtargetImpl(), llvm::WebAssemblyTargetMachine::getSubtargetImpl(), llvm::SparcTargetMachine::getSubtargetImpl(), llvm::PPCTargetMachine::getSubtargetImpl(), llvm::ARMBaseTargetMachine::getSubtargetImpl(), llvm::MipsTargetMachine::getSubtargetImpl(), hasUnsafeFPMath(), isEqual(), llvm::RecurrenceDescriptor::isReductionPHI(), llvm::HexagonTargetLowering::LowerCall(), LowerInterruptReturn(), llvm::HexagonTargetLowering::mayBeEmittedAsTailCall(), llvm::TargetFrameLowering::noFramePointerElim(), llvm::AsmPrinter::recordSled(), llvm::TargetMachine::resetTargetOptions(), llvm::StackProtector::runOnFunction(), and WindowsRequiresStackProbe().
Definition at line 237 of file Function.h.
References llvm::AttributeSet::FunctionIndex, and getAttribute().
|
inline |
Return the stack alignment for the function.
Definition at line 242 of file Function.h.
References llvm::AttributeSet::FunctionIndex, llvm::AttributeSet::getStackAlignment(), and hasFnAttribute().
Referenced by getFnStackAlignment().
| FunctionType * Function::getFunctionType | ( | ) | const |
Returns the FunctionType for me.
Definition at line 230 of file Function.cpp.
References llvm::GlobalValue::getValueType().
Referenced by arg_empty(), arg_size(), assureFPCallStub(), llvm::Interpreter::callExternalFunction(), llvm::Interpreter::callFunction(), llvm::CloneFunction(), llvm::FunctionComparator::compareSignature(), llvm::IRBuilder< TargetFolder >::CreateCall(), createDirectCallInst(), createFPFnStub(), llvm::IRBuilder< TargetFolder >::CreateInvariantGroupBarrier(), CreateWrapper(), DoPromotion(), eliminateTailRecursion(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::Evaluator::EvaluateBlock(), getAllocationDataForFunction(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getCallCost(), llvm::TargetLibraryInfoImpl::getLibFunc(), llvm::Mangler::getNameWithPrefix(), getReturnType(), llvm::InlineFunction(), llvm::isFreeCall(), isVarArg(), lookupFunction(), llvm::SITargetLowering::LowerFormalArguments(), needsFPStubFromParams(), llvm::DiagnosticInfoUnsupported::print(), llvm::Intrinsic::remangleIntrinsicFunction(), llvm::DeadArgumentEliminationPass::run(), llvm::Interpreter::runFunction(), llvm::orc::OrcMCJITReplacement::runFunction(), llvm::MCJIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), UpgradeIntrinsicFunction1(), UpgradeSSE41Function(), UpgradeX86IntrinsicsWith8BitMask(), and whichFPParamVariantNeeded().
| const std::string & Function::getGC | ( | ) | const |
Definition at line 412 of file Function.cpp.
References assert(), getContext(), llvm::LLVMContext::getGC(), and hasGC().
Referenced by llvm::FunctionComparator::compareSignature(), copyAttributesFrom(), llvm::GCModuleInfo::getFunctionInfo(), llvm::InlineFunction(), LLVMGetGC(), shouldRewriteFunction(), and shouldRewriteStatepointsIn().
|
inline |
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.
Definition at line 146 of file Function.h.
References llvm::GlobalValue::IntID.
Referenced by llvm::CallGraphNode::addCalledFunction(), buildCGN(), llvm::canConstantFoldCallTo(), computeFunctionSummary(), computeKnownBitsFromAssume(), llvm::ConstantFoldCall(), DeleteBasicBlock(), llvm::findDevirtualizableCallsForTypeCheckedLoad(), llvm::findDevirtualizableCallsForTypeTest(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getCallCost(), llvm::getIntrinsicForCallSite(), llvm::IntrinsicInst::getIntrinsicID(), handleBrSelExpect(), handleSwitchExpect(), llvm::isInlineViable(), lowerExpectIntrinsic(), lowerGuardIntrinsic(), llvm::IntrinsicLowering::LowerIntrinsicCall(), optimizeUnaryDoubleFP(), llvm::Intrinsic::remangleIntrinsicFunction(), llvm::FastISel::selectInstruction(), SimplifyIntrinsic(), llvm::UpgradeIntrinsicCall(), llvm::UpgradeIntrinsicFunction(), and llvm::Interpreter::visitCallSite().
Extract the alignment for a call or parameter (0=unknown).
Definition at line 296 of file Function.h.
References llvm::AttributeSet::getParamAlignment().
Referenced by llvm::Argument::getParamAlignment(), INITIALIZE_PASS(), and llvm::InlineFunction().
| Constant * Function::getPersonalityFn | ( | ) | const |
Get the personality function associated with this function.
Definition at line 1218 of file Function.cpp.
References assert(), llvm::User::getNumOperands(), and hasPersonalityFn().
Referenced by llvm::addLandingPadInfo(), llvm::WinException::beginFunclet(), llvm::DwarfCFIException::beginFunction(), llvm::WinException::beginFunction(), llvm::canSimplifyInvokeNoUnwind(), llvm::CloneFunctionInto(), llvm::computeLoopSafetyInfo(), copyAttributesFrom(), llvm::XCoreFrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::WinException::endFunclet(), llvm::ARMException::endFunction(), llvm::WinException::endFunction(), findUnwindDestinations(), llvm::getFuncletMembership(), getSEHRegistrationNodeSize(), llvm::InlineFunction(), llvm::X86FrameLowering::processFunctionBeforeFrameFinalized(), llvm::X86FrameLowering::restoreCalleeSavedRegisters(), llvm::StackProtector::runOnFunction(), llvm::FunctionLoweringInfo::set(), and llvm::InstCombiner::visitLandingPadInst().
| Constant * Function::getPrefixData | ( | ) | const |
Get the prefix data associated with this function.
Definition at line 1228 of file Function.cpp.
References assert(), llvm::User::getNumOperands(), and hasPrefixData().
Referenced by copyAttributesFrom().
| Constant * Function::getPrologueData | ( | ) | const |
Get the prologue data associated with this function.
Definition at line 1238 of file Function.cpp.
References assert(), llvm::User::getNumOperands(), and hasPrologueData().
Referenced by copyAttributesFrom().
| Type * Function::getReturnType | ( | ) | const |
Returns the type of the ret val.
Definition at line 238 of file Function.cpp.
References getFunctionType(), and llvm::FunctionType::getReturnType().
Referenced by addArgumentAttrs(), addArgumentReturnedAttrs(), addNoAliasAttrs(), addNonNullAttrs(), assureFPCallStub(), llvm::Interpreter::callFunction(), llvm::ComputeSignatureVTs(), llvm::ConstantFoldCall(), llvm::IRBuilder< TargetFolder >::CreateInvariantGroupBarrier(), llvm::IRBuilderBase::getCurrentFunctionReturnType(), getRetComponentType(), llvm::InlineFunction(), insertCallRetCast(), isReturnNonNull(), lowerGuardIntrinsic(), llvm::NVPTXTargetLowering::LowerReturn(), MakeGuardControlFlowExplicit(), llvm::orc::makeStub(), needsFPFromSig(), needsFPReturnHelper(), NumRetVals(), PropagateConstantReturn(), runIPSCCP(), llvm::FastISel::selectStackmap(), llvm::FunctionLoweringInfo::set(), setNonNull(), SimplifyIntrinsic(), and UpgradeIntrinsicFunction1().
Get the section prefix for this function.
Definition at line 1307 of file Function.cpp.
References assert(), llvm::dyn_cast(), llvm::GlobalObject::getMetadata(), llvm::LLVMContext::MD_section_prefix, and llvm::None.
Referenced by resideInSameSection().
|
inlinestatic |
Definition at line 508 of file Function.h.
|
inlinestatic |
Definition at line 515 of file Function.h.
| DISubprogram * Function::getSubprogram | ( | ) | const |
Get the attached subprogram.
Calls getMetadata() with LLVMContext::MD_dbg and casts the result to DISubprogram.
Definition at line 1458 of file Metadata.cpp.
References llvm::GlobalObject::getMetadata().
Referenced by addDiscriminators(), llvm::CodeViewDebug::beginFunction(), llvm::DwarfDebug::beginFunction(), createClone(), DoPromotion(), llvm::DwarfDebug::endFunction(), llvm::InlineFunction(), and llvm::stripDebugInfo().
|
inline |
getSymbolTable() - Return the symbol table if any, otherwise nullptr.
Definition at line 527 of file Function.h.
Referenced by llvm::MIRParserImpl::initializeFrameInfo().
|
inline |
Definition at line 528 of file Function.h.
hasAddressTaken - returns true if there are any uses of this function other than direct calls or invokes to it, or blockaddress expressions.
hasAddressTaken - returns true if there are any uses of this function other than direct calls or invokes to it.
Optionally passes back an offending user for diagnostic purposes.
Definition at line 1171 of file Function.cpp.
References llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::isCallee(), and llvm::Value::uses().
Referenced by llvm::canRenameComdatFunc(), llvm::TargetFrameLowering::isSafeForNoCSROpt(), OptimizeFunctions(), and shouldRecordFunctionAddr().
|
inline |
check if an attributes is in the list of attributes.
Definition at line 276 of file Function.h.
References getAttributes(), and llvm::AttributeSet::hasAttribute().
Referenced by llvm::Argument::hasAttribute().
|
inline |
Return true if the function has the attribute.
Definition at line 226 of file Function.h.
References llvm::AttributeSet::hasFnAttribute().
Referenced by addForcedAttributes(), adjustCallerSSPLevel(), llvm::NVPTXTargetLowering::allowFMA(), cannotDuplicate(), llvm::TargetRegisterInfo::canRealignStack(), llvm::AArch64FrameLowering::canUseRedZone(), checkNumAlignedDPRCS2Regs(), combineStore(), llvm::TargetFrameLowering::determineCalleeSaves(), llvm::PPCFrameLowering::determineFrameLayout(), llvm::TargetOptions::DisableFramePointerElim(), doesNotAccessMemory(), doesNotReadMemory(), doesNotRecurse(), doesNotReturn(), doesNotThrow(), doSpillCalleeSavedRegs(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::MipsSEFrameLowering::emitEpilogue(), llvm::MipsAsmPrinter::EmitFunctionBodyStart(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::SystemZFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::X86FrameLowering::enableShrinkWrapping(), get64BitArgumentXMMs(), llvm::ARMBaseRegisterInfo::getCalleeSavedRegs(), getDeoptLowering(), getFnStackAlignment(), getFnStackAlignment(), llvm::getInlineCost(), llvm::MemoryDependenceResults::getLoadLoadClobberFullWidthSize(), llvm::SIRegisterInfo::getMaxNumSGPRs(), llvm::SIRegisterInfo::getMaxNumVGPRs(), llvm::MipsTargetLowering::getOpndList(), llvm::ARMTargetLowering::getOptimalMemOpType(), llvm::AArch64TargetLowering::getOptimalMemOpType(), llvm::PPCTargetLowering::getOptimalMemOpType(), llvm::X86TargetLowering::getOptimalMemOpType(), getRecipEstimateForFunc(), llvm::MipsRegisterInfo::getReservedRegs(), llvm::MipsCCState::getSpecialCallingConvForCallee(), llvm::SparcTargetMachine::getSubtargetImpl(), llvm::MipsTargetMachine::getSubtargetImpl(), llvm::AMDGPUSubtarget::getWavesPerEU(), hasReturnsTwiceAttr(), hasUWTable(), llvm::AArch64TargetLowering::insertCopiesSplitCSR(), llvm::PPCTargetLowering::insertCopiesSplitCSR(), isConvergent(), llvm::ProfileSummaryInfo::isFunctionEntryCold(), llvm::isInlineViable(), isNoReturnDef(), isOptNone(), llvm::TargetFrameLowering::isSafeForNoCSROpt(), llvm::isSafeToSpeculativelyExecute(), llvm::MipsSEInstrInfo::loadRegFromStack(), llvm::PPCFrameLowering::needsFP(), llvm::TargetRegisterInfo::needsStackRealignment(), onlyAccessesArgMemory(), onlyAccessesInaccessibleMemOrArgMem(), onlyAccessesInaccessibleMemory(), onlyReadsMemory(), optForMinSize(), optForSize(), llvm::LegacyInlinerBase::removeDeadFunctions(), removeUseSoftFloat(), llvm::PostOrderFunctionAttrsPass::run(), llvm::InlinerPass::run(), llvm::SLPVectorizerPass::runImpl(), runImpl(), runIPSCCP(), llvm::ARMAsmPrinter::runOnMachineFunction(), llvm::MachineFunction::shouldSplitStack(), llvm::BasicBlockPass::skipBasicBlock(), llvm::FunctionPass::skipFunction(), llvm::LoopPass::skipLoop(), llvm::MipsSEFrameLowering::spillCalleeSavedRegisters(), llvm::MipsSEInstrInfo::storeRegToStack(), llvm::AArch64TargetLowering::supportSplitCSR(), llvm::PPCTargetLowering::supportSplitCSR(), and WindowsRequiresStackProbe().
Definition at line 229 of file Function.h.
References llvm::AttributeSet::hasFnAttribute().
|
inline |
hasGC/getGC/setGC/clearGC - The name of the garbage collection algorithm to use during code generation.
Definition at line 250 of file Function.h.
References llvm::Value::getSubclassDataFromValue().
Referenced by clearGC(), llvm::FunctionComparator::compareSignature(), copyAttributesFrom(), llvm::GCModuleInfo::getFunctionInfo(), getGC(), llvm::InlineFunction(), LLVMGetGC(), llvm::SelectionDAGISel::runOnMachineFunction(), shouldRewriteFunction(), and shouldRewriteStatepointsIn().
|
inline |
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.
Definition at line 93 of file Function.h.
References llvm::Value::getSubclassDataFromValue().
Referenced by stealArgumentListFrom().
|
inline |
Check whether this function has a personality function.
Definition at line 581 of file Function.h.
References llvm::Value::getSubclassDataFromValue().
Referenced by llvm::WinException::beginFunclet(), llvm::DwarfCFIException::beginFunction(), llvm::WinException::beginFunction(), llvm::CloneFunctionInto(), llvm::computeLoopSafetyInfo(), copyAttributesFrom(), llvm::XCoreFrameLowering::emitEpilogue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::WinException::endFunclet(), llvm::ARMException::endFunction(), llvm::WinException::endFunction(), getPersonalityFn(), getSEHRegistrationNodeSize(), llvm::InlineFunction(), recoverFramePointer(), llvm::StackProtector::runOnFunction(), and llvm::FunctionLoweringInfo::set().
|
inline |
Check whether this function has prefix data.
Definition at line 590 of file Function.h.
References llvm::Value::getSubclassDataFromValue().
Referenced by copyAttributesFrom(), and getPrefixData().
|
inline |
Check whether this function has prologue data.
Definition at line 599 of file Function.h.
References llvm::Value::getSubclassDataFromValue().
Referenced by copyAttributesFrom(), and getPrologueData().
|
inline |
Determine if the function returns a structure through first pointer argument.
Definition at line 421 of file Function.h.
References llvm::AttributeSet::hasAttribute().
Referenced by llvm::Mangler::getNameWithPrefix(), llvm::HexagonTargetLowering::LowerCall(), llvm::SparcTargetLowering::LowerFormalArguments_32(), and llvm::SparcTargetLowering::LowerReturn_32().
|
inline |
True if the ABI mandates (or the user requested) that this function be in a unwind table.
Definition at line 407 of file Function.h.
References hasFnAttribute().
Referenced by needsUnwindTableEntry().
|
inline |
Determine if the call is convergent.
Definition at line 386 of file Function.h.
References llvm::MCID::Convergent, and hasFnAttribute().
Referenced by removeConvergentAttrs().
| bool Function::isDefTriviallyDead | ( | ) | const |
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.
Definition at line 1191 of file Function.cpp.
References llvm::GlobalValue::hasAvailableExternallyLinkage(), llvm::GlobalValue::hasLinkOnceLinkage(), llvm::GlobalValue::hasLocalLinkage(), and llvm::Value::users().
Referenced by optimizeGlobalsInModule(), llvm::LegacyInlinerBase::removeDeadFunctions(), and llvm::AlwaysInlinerPass::run().
|
inline |
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!
Definition at line 151 of file Function.h.
References llvm::GlobalValue::HasLLVMReservedName.
Referenced by llvm::CallGraphNode::addCalledFunction(), buildCGN(), llvm::CloneAndPruneIntoFromInst(), DeleteBasicBlock(), llvm::getIntrinsicForCallSite(), llvm::Module::getOrInsertFunction(), llvm::TargetTransformInfoImplBase::isLoweredToCall(), isReferencingMDNode(), optimizeUnaryDoubleFP(), and UpdateCallGraphAfterInlining().
| bool Function::isMaterializable | ( | ) | const |
Definition at line 216 of file Function.cpp.
References llvm::GlobalObject::getGlobalObjectSubClassData().
| bool Function::isVarArg | ( | ) | const |
isVarArg - Return true if this function takes a variable number of arguments.
Definition at line 234 of file Function.cpp.
References getFunctionType(), and llvm::FunctionType::isVarArg().
Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::FunctionComparator::compareSignature(), llvm::XCoreFunctionInfo::createLRSpillSlot(), llvm::SystemZFrameLowering::determineCalleeSaves(), llvm::XCoreFrameLowering::determineCalleeSaves(), determinePointerReadAttrs(), llvm::FunctionComparator::functionHash(), llvm::CallLowering::handleAssignments(), llvm::ARMCallLowering::lowerFormalArguments(), OptimizeFunctions(), PromoteArguments(), llvm::FunctionLoweringInfo::set(), and llvm::SystemZFrameLowering::spillCalleeSavedRegisters().
|
static |
This does the actual lookup of an intrinsic ID which matches the given function name.
Definition at line 486 of file Function.cpp.
References llvm::ArrayRef< T >::data(), findTargetSubtable(), IntrinsicNameTable, llvm::Intrinsic::isOverloaded(), llvm::Intrinsic::lookupLLVMIntrinsicByName(), llvm::Intrinsic::not_intrinsic, and llvm::StringRef::size().
Referenced by recalculateIntrinsicID().
|
inline |
True if this function needs an unwind table.
Definition at line 415 of file Function.h.
References doesNotThrow(), and hasUWTable().
Referenced by llvm::DwarfCFIException::beginFunction(), llvm::WinException::beginFunction(), llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), llvm::X86FrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::ARMException::endFunction(), ExpandMOVImmSExti8(), llvm::AsmPrinter::needsCFIMoves(), llvm::XCoreRegisterInfo::needsFrameMoves(), and llvm::AsmPrinter::needsSEHMoves().
|
inline |
Determine if the call can access memmory only using pointers based on its arguments.
Definition at line 338 of file Function.h.
References hasFnAttribute().
Referenced by llvm::BasicAAResult::getModRefBehavior(), and setOnlyAccessesArgMemory().
|
inline |
Determine if the function may only access memory that is either inaccessible from the IR or pointed to by its arguments.
Definition at line 354 of file Function.h.
References hasFnAttribute().
Referenced by llvm::BasicAAResult::getModRefBehavior().
|
inline |
Determine if the function may only access memory that is inaccessible from the IR.
Definition at line 345 of file Function.h.
References hasFnAttribute().
Referenced by llvm::BasicAAResult::getModRefBehavior().
|
inline |
Determine if the function does not access or only reads memory.
Definition at line 321 of file Function.h.
References doesNotAccessMemory(), hasFnAttribute(), and AMDGPU::RuntimeMD::KernelArg::ReadOnly.
Referenced by addArgumentAttrs(), llvm::BasicAAResult::getModRefBehavior(), HandleByValArgument(), PropagateConstantsIntoArguments(), and setOnlyReadsMemory().
Definition at line 452 of file Function.h.
References doesNotAccessMemory(), llvm::AttributeSet::hasAttribute(), and AMDGPU::RuntimeMD::KernelArg::ReadOnly.
|
inline |
Optimize this function for minimum size (-Oz).
Definition at line 461 of file Function.h.
References hasFnAttribute().
Referenced by combineFMinNumFMaxNum(), combineInstructionsOverFunction(), combineMul(), llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), llvm::ARMSelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::X86InstrInfo::foldMemoryOperandImpl(), isMinSize(), isOptSize(), optForSize(), reduceVMULWidth(), llvm::ARMAsmPrinter::runOnMachineFunction(), shouldLowerMemFuncForSize(), splitStores(), llvm::tryFoldSPUpdateIntoPushPop(), llvm::ARMSubtarget::useMovt(), and llvm::ARMSubtarget::useStride4VFPs().
|
inline |
Optimize this function for size (-Os) or minimum size (-Oz).
Definition at line 464 of file Function.h.
References hasFnAttribute(), and optForMinSize().
Referenced by combineOr(), ExpandPowI(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::SelectionDAG::getConstantPool(), isOptSize(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), LowerVectorBroadcast(), ProfitableToMerge(), llvm::ARMAsmPrinter::runOnMachineFunction(), shouldLowerMemFuncForSize(), and llvm::TailDuplicator::shouldTailDuplicate().
| void Function::print | ( | raw_ostream & | OS, |
| AssemblyAnnotationWriter * | AAW = nullptr, |
||
| bool | ShouldPreserveUseListOrder = false, |
||
| bool | IsForDebug = false |
||
| ) | const |
Print the function to an output stream with an optional AssemblyAnnotationWriter.
Definition at line 3300 of file AsmWriter.cpp.
References llvm::GlobalValue::getParent().
| void Function::recalculateIntrinsicID | ( | ) |
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.
Definition at line 503 of file Function.cpp.
References llvm::Value::getName(), llvm::GlobalValue::HasLLVMReservedName, llvm::GlobalValue::IntID, lookupIntrinsicID(), llvm::Intrinsic::not_intrinsic, and llvm::StringRef::startswith().
| void Function::removeAttribute | ( | unsigned | i, |
| Attribute::AttrKind | Kind | ||
| ) |
removes the attribute from the list of attributes.
Definition at line 382 of file Function.cpp.
References getAttributes(), getContext(), llvm::AttributeSet::removeAttribute(), and setAttributes().
Referenced by removeFnAttr().
removes the attribute from the list of attributes.
Definition at line 388 of file Function.cpp.
References getAttributes(), getContext(), llvm::AttributeSet::removeAttribute(), and setAttributes().
| void Function::removeAttributes | ( | unsigned | i, |
| AttributeSet | Attrs | ||
| ) |
removes the attributes from the list of attributes.
Definition at line 394 of file Function.cpp.
References getAttributes(), getContext(), llvm::AttributeSet::removeAttributes(), and setAttributes().
Referenced by adjustCallerSSPLevel(), llvm::Argument::removeAttr(), and removeUseSoftFloat().
|
inline |
Remove function attributes from this function.
Definition at line 197 of file Function.h.
References llvm::AttributeSet::FunctionIndex, and removeAttribute().
Referenced by setNotConvergent().
|
inline |
Remove function attribute from this function.
Definition at line 202 of file Function.h.
References llvm::AttributeSet::FunctionIndex, getContext(), llvm::AttributeSet::removeAttribute(), and setAttributes().
|
overridevirtual |
removeFromParent - This method unlinks 'this' from the containing module, but does not delete it.
Implements llvm::GlobalValue.
Definition at line 242 of file Function.cpp.
References llvm::Module::getFunctionList(), llvm::ilist_node_impl< ilist_detail::compute_node_options< Function, Options...>::type >::getIterator(), llvm::GlobalValue::getParent(), and llvm::iplist_impl< IntrusiveListT, TraitsT >::remove().
|
inline |
Set the attribute list for this Function.
Definition at line 179 of file Function.h.
Referenced by addAttribute(), addAttributes(), addDereferenceableAttr(), addDereferenceableOrNullAttr(), llvm::CloneFunctionInto(), copyAttributesFrom(), llvm::Module::getOrInsertFunction(), PromoteArguments(), removeAttribute(), removeAttributes(), removeFnAttr(), RemoveNestAttribute(), and llvm::UpgradeIntrinsicFunction().
|
inline |
Definition at line 169 of file Function.h.
References assert(), llvm::Value::getSubclassDataFromValue(), and llvm::CallingConv::MaxID.
Referenced by copyAttributesFrom(), llvm::InlineFunction(), lowerGuardIntrinsic(), OptimizeFunctions(), and llvm::Intrinsic::remangleIntrinsicFunction().
|
inline |
Definition at line 381 of file Function.h.
References addFnAttr().
|
inline |
Definition at line 389 of file Function.h.
References addFnAttr(), and llvm::MCID::Convergent.
|
inline |
Definition at line 316 of file Function.h.
References addFnAttr().
Referenced by setDoesNotAccessMemory().
|
inline |
Definition at line 448 of file Function.h.
References addAttribute().
|
inline |
Definition at line 432 of file Function.h.
References addAttribute(), and llvm::NoAlias.
Referenced by addNoAliasAttrs(), and setDoesNotAlias().
|
inline |
Definition at line 441 of file Function.h.
References addAttribute().
Referenced by setDoesNotCapture().
|
inline |
Definition at line 332 of file Function.h.
References addFnAttr(), and AMDGPU::RuntimeMD::KernelArg::WriteOnly.
|
inline |
Definition at line 401 of file Function.h.
References addFnAttr().
Referenced by setDoesNotRecurse().
|
inline |
Definition at line 365 of file Function.h.
References addFnAttr().
|
inline |
| void Function::setEntryCount | ( | uint64_t | Count | ) |
Set the entry count for this function.
Entry count is the number of times this function was executed based on pgo data.
Definition at line 1282 of file Function.cpp.
References llvm::MDBuilder::createFunctionEntryCount(), getContext(), llvm::LLVMContext::MD_prof, and llvm::GlobalObject::setMetadata().
Referenced by llvm::CodeExtractor::extractCodeRegion().
| void Function::setGC | ( | std::string | Str | ) |
Definition at line 417 of file Function.cpp.
References getContext(), and llvm::LLVMContext::setGC().
Referenced by copyAttributesFrom(), llvm::InlineFunction(), and LLVMSetGC().
|
inline |
Definition at line 410 of file Function.h.
References addFnAttr().
| void Function::setIsMaterializable | ( | bool | V | ) |
Definition at line 220 of file Function.cpp.
References llvm::GlobalObject::getGlobalObjectSubClassData(), llvm::BitmaskEnumDetail::Mask(), and llvm::GlobalObject::setGlobalObjectSubClassData().
Referenced by dropAllReferences().
|
inline |
Definition at line 392 of file Function.h.
References llvm::MCID::Convergent, and removeFnAttr().
Referenced by removeConvergentAttrs().
|
inline |
Definition at line 341 of file Function.h.
References addFnAttr().
Referenced by setOnlyAccessesArgMemory().
|
inline |
Definition at line 357 of file Function.h.
References addFnAttr().
|
inline |
Definition at line 348 of file Function.h.
References addFnAttr().
|
inline |
Definition at line 324 of file Function.h.
References addFnAttr(), and AMDGPU::RuntimeMD::KernelArg::ReadOnly.
Referenced by setOnlyReadsMemory().
|
inline |
Definition at line 456 of file Function.h.
References addAttribute(), and AMDGPU::RuntimeMD::KernelArg::ReadOnly.
| void Function::setPersonalityFn | ( | Constant * | Fn | ) |
Definition at line 1223 of file Function.cpp.
Referenced by llvm::CloneFunctionInto(), llvm::CloneModule(), copyAttributesFrom(), and llvm::InlineFunction().
| void Function::setPrefixData | ( | Constant * | PrefixData | ) |
Definition at line 1233 of file Function.cpp.
Referenced by copyAttributesFrom().
| void Function::setPrologueData | ( | Constant * | PrologueData | ) |
Definition at line 1243 of file Function.cpp.
Referenced by copyAttributesFrom().
| void Function::setSectionPrefix | ( | StringRef | Prefix | ) |
Set the section prefix for this function.
Definition at line 1301 of file Function.cpp.
References llvm::MDBuilder::createFunctionSectionPrefix(), getContext(), llvm::LLVMContext::MD_section_prefix, and llvm::GlobalObject::setMetadata().
| void Function::setSubprogram | ( | DISubprogram * | SP | ) |
Set the attached subprogram.
Calls setMetadata() with LLVMContext::MD_dbg.
Definition at line 1454 of file Metadata.cpp.
References llvm::GlobalObject::setMetadata().
Referenced by DoPromotion(), and llvm::stripDebugInfo().
|
inline |
Definition at line 540 of file Function.h.
Referenced by llvm::removeUnreachableBlocks(), llvm::GraphTraits< Function * >::size(), and llvm::GraphTraits< const Function * >::size().
| void Function::stealArgumentListFrom | ( | Function & | Src | ) |
Steal arguments from another function.
Drop this function's arguments and splice in the ones from Src. Requires that this has no function body.
Definition at line 305 of file Function.cpp.
References A, llvm::all_of(), assert(), llvm::iplist_impl< IntrusiveListT, TraitsT >::clear(), llvm::Value::getSubclassDataFromValue(), hasLazyArguments(), llvm::GlobalValue::isDeclaration(), llvm::iplist_impl< IntrusiveListT, TraitsT >::splice(), and llvm::Value::use_empty().
| void Function::viewCFG | ( | ) | const |
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.
You can just say 'call F->viewCFG()' and a ghostview window should pop up from the program, displaying the CFG of the current function. This depends on there being a 'dot' and 'gv' program in your path.
Definition at line 164 of file CFGPrinter.cpp.
References llvm::Value::getName(), and llvm::ViewGraph().
Referenced by LLVMViewFunctionCFG().
| void Function::viewCFGOnly | ( | ) | const |
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.
Definition at line 173 of file CFGPrinter.cpp.
References llvm::Value::getName(), and llvm::ViewGraph().
Referenced by LLVMViewFunctionCFGOnly().
|
friend |
Definition at line 86 of file Function.h.
1.8.6