LLVM API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Friends
llvm::Function Class Reference

#include <Function.h>

Inheritance diagram for llvm::Function:
Inheritance graph
[legend]
Collaboration diagram for llvm::Function:
Collaboration graph
[legend]

List of all members.

Public Types

typedef iplist< ArgumentArgumentListType
typedef iplist< BasicBlockBasicBlockListType
typedef
BasicBlockListType::iterator 
iterator
typedef
BasicBlockListType::const_iterator 
const_iterator
typedef ArgumentListType::iterator arg_iterator
typedef
ArgumentListType::const_iterator 
const_arg_iterator

Public Member Functions

 ~Function ()
TypegetReturnType () const
FunctionTypegetFunctionType () const
LLVMContextgetContext () const
bool isVarArg () const
unsigned getIntrinsicID () const LLVM_READONLY
bool isIntrinsic () const
CallingConv::ID getCallingConv () const
void setCallingConv (CallingConv::ID CC)
AttributeSet getAttributes () const
 Return the attribute list for this Function.
void setAttributes (AttributeSet attrs)
 Set the attribute list for this Function.
void addFnAttr (Attribute::AttrKind N)
 Add function attributes to this function.
void removeFnAttr (Attribute::AttrKind N)
 Remove function attributes from this function.
void addFnAttr (StringRef Kind)
 Add function attributes to this function.
void addFnAttr (StringRef Kind, StringRef Value)
bool hasFnAttribute (Attribute::AttrKind Kind) const
 Return true if the function has the attribute.
bool hasFnAttribute (StringRef Kind) const
Attribute getFnAttribute (Attribute::AttrKind Kind) const
 Return the attribute for the given attribute kind.
Attribute getFnAttribute (StringRef Kind) const
bool hasGC () const
const char * getGC () const
void setGC (const char *Str)
void clearGC ()
void addAttribute (unsigned i, Attribute::AttrKind attr)
 adds the attribute to the list of attributes.
void addAttributes (unsigned i, AttributeSet attrs)
 adds the attributes to the list of attributes.
void removeAttributes (unsigned i, AttributeSet attr)
 removes the attributes from the list of attributes.
unsigned getParamAlignment (unsigned i) const
 Extract the alignment for a call or parameter (0=unknown).
uint64_t getDereferenceableBytes (unsigned i) const
 Extract the number of dereferenceable bytes for a call or parameter (0=unknown).
bool doesNotAccessMemory () const
 Determine if the function does not access memory.
void setDoesNotAccessMemory ()
bool onlyReadsMemory () const
 Determine if the function does not access or only reads memory.
void setOnlyReadsMemory ()
bool doesNotReturn () const
 Determine if the function cannot return.
void setDoesNotReturn ()
bool doesNotThrow () const
 Determine if the function cannot unwind.
void setDoesNotThrow ()
bool cannotDuplicate () const
 Determine if the call cannot be duplicated.
void setCannotDuplicate ()
bool hasUWTable () const
 True if the ABI mandates (or the user requested) that this function be in a unwind table.
void setHasUWTable ()
bool needsUnwindTableEntry () const
 True if this function needs an unwind table.
bool hasStructRetAttr () const
 Determine if the function returns a structure through first pointer argument.
bool doesNotAlias (unsigned n) const
 Determine if the parameter does not alias other parameters.
void setDoesNotAlias (unsigned n)
bool doesNotCapture (unsigned n) const
 Determine if the parameter can be captured.
void setDoesNotCapture (unsigned n)
bool doesNotAccessMemory (unsigned n) const
void setDoesNotAccessMemory (unsigned n)
bool onlyReadsMemory (unsigned n) const
void setOnlyReadsMemory (unsigned n)
void copyAttributesFrom (const GlobalValue *Src) override
void deleteBody ()
void removeFromParent () override
void eraseFromParent () override
const ArgumentListTypegetArgumentList () const
ArgumentListTypegetArgumentList ()
const BasicBlockListTypegetBasicBlockList () const
BasicBlockListTypegetBasicBlockList ()
const BasicBlockgetEntryBlock () const
BasicBlockgetEntryBlock ()
ValueSymbolTablegetValueSymbolTable ()
const ValueSymbolTablegetValueSymbolTable () const
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
size_t size () const
bool empty () const
const BasicBlockfront () const
BasicBlockfront ()
const BasicBlockback () const
BasicBlockback ()
size_t arg_size () const
bool arg_empty () const
bool hasPrefixData () const
ConstantgetPrefixData () const
void setPrefixData (Constant *PrefixData)
void viewCFG () const
void viewCFGOnly () const
void dropAllReferences ()
bool hasAddressTaken (const User **=nullptr) const
bool isDefTriviallyDead () const
bool callsFunctionThatReturnsTwice () const
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_iteratorargs ()
iterator_range
< const_arg_iterator
args () const

Static Public Member Functions

static FunctionCreate (FunctionType *Ty, LinkageTypes Linkage, const Twine &N="", Module *M=nullptr)
static iplist< Argument >
Function::* 
getSublistAccess (Argument *)
static iplist< BasicBlock >
Function::* 
getSublistAccess (BasicBlock *)
static bool classof (const Value *V)
 Methods for support type inquiry through isa, cast, and dyn_cast:

Friends

class SymbolTableListTraits< Function, Module >

Detailed Description

Definition at line 71 of file Function.h.


Member Typedef Documentation

Definition at line 80 of file Function.h.

Definition at line 73 of file Function.h.

Definition at line 74 of file Function.h.

Definition at line 81 of file Function.h.

Definition at line 78 of file Function.h.

Definition at line 77 of file Function.h.


Constructor & Destructor Documentation


Member Function Documentation

adds the attribute to the list of attributes.

Definition at line 333 of file Function.cpp.

References llvm::AttributeSet::addAttribute(), getAttributes(), getContext(), and setAttributes().

Referenced by setDoesNotAccessMemory(), setDoesNotAlias(), setDoesNotCapture(), and setOnlyReadsMemory().

adds the attributes to the list of attributes.

Definition at line 339 of file Function.cpp.

References llvm::AttributeSet::addAttributes(), getAttributes(), getContext(), and setAttributes().

Referenced by llvm::Argument::addAttr(), LLVMAddTargetDependentFunctionAttr(), and removeUseSoftFloat().

void llvm::Function::addFnAttr ( StringRef  Kind) [inline]

Add function attributes to this function.

Definition at line 188 of file Function.h.

References llvm::AttributeSet::addAttribute(), llvm::AttributeSet::FunctionIndex, getContext(), and setAttributes().

void llvm::Function::addFnAttr ( StringRef  Kind,
StringRef  Value 
) [inline]

Definition at line 421 of file Function.h.

References llvm::iplist< NodeTy, Traits >::begin().

Definition at line 300 of file Function.cpp.

References getFunctionType(), and llvm::FunctionType::getNumParams().

Definition at line 429 of file Function.h.

References llvm::iplist< NodeTy, Traits >::end().

size_t Function::arg_size ( ) const

Definition at line 434 of file Function.h.

References arg_begin(), and arg_end().

Referenced by llvm::CloneFunctionInto().

Definition at line 438 of file Function.h.

References arg_begin(), and arg_end().

const BasicBlock& llvm::Function::back ( ) const [inline]

Definition at line 411 of file Function.h.

References llvm::iplist< NodeTy, Traits >::back().

Referenced by llvm::InlineFunction().

Definition at line 412 of file Function.h.

References llvm::iplist< NodeTy, Traits >::back().

Definition at line 403 of file Function.h.

References llvm::iplist< NodeTy, Traits >::begin().

callsFunctionThatReturnsTwice - Return true if the function has a call to setjmp or other function that gcc recognizes as "returning twice".

Definition at line 801 of file Function.cpp.

References llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::hasFnAttr(), I, llvm::inst_begin(), llvm::inst_end(), and llvm::Attribute::ReturnsTwice.

Referenced by llvm::SelectionDAGISel::runOnMachineFunction().

Determine if the call cannot be duplicated.

Definition at line 280 of file Function.h.

References llvm::AttributeSet::FunctionIndex, llvm::AttributeSet::hasAttribute(), and llvm::Attribute::NoDuplicate.

static bool llvm::Function::classof ( const Value V) [inline, static]

Methods for support type inquiry through isa, cast, and dyn_cast:

Reimplemented from llvm::GlobalObject.

Definition at line 470 of file Function.h.

References llvm::Value::FunctionVal, and llvm::Value::getValueID().

Definition at line 379 of file Function.cpp.

References llvm::StringPool::empty(), GCLock, GCNamePool, and GCNames.

Referenced by copyAttributesFrom(), LLVMSetGC(), and ~Function().

void Function::copyAttributesFrom ( const GlobalValue Src) [override, virtual]

copyAttributesFrom - copy all additional attributes (those not needed to create a Function) from the Function Src to this one.

Reimplemented from llvm::GlobalObject.

Definition at line 396 of file Function.cpp.

References clearGC(), getAttributes(), getCallingConv(), getGC(), getPrefixData(), hasGC(), hasPrefixData(), setAttributes(), setCallingConv(), setGC(), and setPrefixData().

Referenced by llvm::CloneFunctionInto(), and llvm::CloneModule().

static Function* llvm::Function::Create ( FunctionType Ty,
LinkageTypes  Linkage,
const Twine N = "",
Module M = nullptr 
) [inline, static]
void llvm::Function::deleteBody ( ) [inline]

deleteBody - This method deletes the body of the function, and converts the linkage to external.

Definition at line 350 of file Function.h.

References dropAllReferences(), llvm::GlobalValue::ExternalLinkage, and llvm::GlobalValue::setLinkage().

Referenced by llvm::BitcodeReader::Dematerialize().

Determine if the function does not access memory.

Definition at line 243 of file Function.h.

References llvm::AttributeSet::FunctionIndex, llvm::AttributeSet::hasAttribute(), and llvm::Attribute::ReadNone.

Referenced by onlyReadsMemory().

Definition at line 328 of file Function.h.

References llvm::AttributeSet::hasAttribute(), and llvm::Attribute::ReadNone.

Determine if the parameter does not alias other parameters.

Parameters:
nThe parameter to check. 1 is the first parameter, 0 is the return

Definition at line 312 of file Function.h.

References llvm::AttributeSet::hasAttribute(), and llvm::Attribute::NoAlias.

Determine if the parameter can be captured.

Parameters:
nThe parameter to check. 1 is the first parameter, 0 is the return

Definition at line 321 of file Function.h.

References llvm::AttributeSet::hasAttribute(), and llvm::Attribute::NoCapture.

bool llvm::Function::doesNotReturn ( ) const [inline]

Determine if the function cannot return.

Definition at line 262 of file Function.h.

References llvm::AttributeSet::FunctionIndex, llvm::AttributeSet::hasAttribute(), and llvm::Attribute::NoReturn.

bool llvm::Function::doesNotThrow ( ) const [inline]

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.

Reimplemented from llvm::User.

Definition at line 320 of file Function.cpp.

References llvm::iplist< NodeTy, Traits >::begin(), begin(), llvm::iplist< NodeTy, Traits >::empty(), end(), I, and setPrefixData().

Referenced by deleteBody(), llvm::Module::dropAllReferences(), and ~Function().

bool llvm::Function::empty ( ) const [inline]

Definition at line 408 of file Function.h.

References llvm::iplist< NodeTy, Traits >::empty().

Referenced by llvm::optimizeGlobalCtorsList().

const_iterator llvm::Function::end ( ) const [inline]

Definition at line 405 of file Function.h.

References llvm::iplist< NodeTy, Traits >::end().

void Function::eraseFromParent ( ) [override, virtual]

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

Implements llvm::GlobalValue.

Definition at line 236 of file Function.cpp.

References llvm::iplist< NodeTy, Traits >::erase(), llvm::Module::getFunctionList(), and llvm::GlobalValue::getParent().

Referenced by INITIALIZE_PASS(), llvm::JIT::runFunction(), and llvm::UpgradeCallsToIntrinsic().

const BasicBlock& llvm::Function::front ( ) const [inline]

Definition at line 410 of file Function.h.

References llvm::iplist< NodeTy, Traits >::front().

Get the underlying elements of the Function... the basic block list is empty for external functions.

Definition at line 369 of file Function.h.

Referenced by llvm::Argument::Argument().

Definition at line 373 of file Function.h.

Return the attribute list for this Function.

Definition at line 170 of file Function.h.

Referenced by addAttribute(), addAttributes(), AddFastCallStdCallSuffix(), AdjustCallerSSPLevel(), llvm::AMDGPUMachineFunction::AMDGPUMachineFunction(), llvm::AArch64FrameLowering::canUseRedZone(), checkNumAlignedDPRCS2Regs(), llvm::CloneFunctionInto(), copyAttributesFrom(), llvm::PPCFrameLowering::determineFrameLayout(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::XCoreFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), ExpandPowI(), get64BitArgumentXMMs(), llvm::Inliner::getInlineThreshold(), llvm::MemoryDependenceAnalysis::getLoadLoadClobberFullWidthSize(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), getMemsetStores(), llvm::ARMBaseInstrInfo::getOperandLatency(), llvm::ARMTargetLowering::getOptimalMemOpType(), llvm::AArch64TargetLowering::getOptimalMemOpType(), llvm::Argument::hasByValAttr(), llvm::Argument::hasByValOrInAllocaAttr(), llvm::Argument::hasInAllocaAttr(), llvm::Argument::hasNestAttr(), llvm::Argument::hasNoAliasAttr(), llvm::Argument::hasNoCaptureAttr(), llvm::Argument::hasReturnedAttr(), llvm::Argument::hasSExtAttr(), llvm::Argument::hasStructRetAttr(), llvm::Argument::hasZExtAttr(), llvm::ValueEnumerator::incorporateFunction(), llvm::InlineCostAnalysis::isInlineViable(), llvm::TargetLowering::isInTailCallPosition(), LLVMAddFunctionAttr(), LLVMGetAttribute(), LLVMGetFunctionAttr(), LLVMRemoveFunctionAttr(), llvm::NVPTXTargetLowering::LowerFormalArguments(), llvm::MachineFunction::MachineFunction(), llvm::PPCFrameLowering::needsFP(), llvm::PPCRegisterInfo::needsStackRealignment(), llvm::ARMBaseRegisterInfo::needsStackRealignment(), llvm::Argument::onlyReadsMemory(), PerformOrCombine(), performSTORECombine(), PerformSTORECombine(), llvm::AssemblyWriter::printFunction(), ProfitableToMerge(), removeAttributes(), llvm::Inliner::removeDeadFunctions(), RemoveNestAttribute(), llvm::MipsTargetMachine::resetSubtarget(), llvm::PPCSubtarget::resetSubtargetFeatures(), llvm::ARMSubtarget::resetSubtargetFeatures(), llvm::returnTypeIsEligibleForTailCall(), llvm::InstCombiner::runOnFunction(), llvm::StackProtector::runOnFunction(), llvm::FunctionLoweringInfo::set(), llvm::tryFoldSPUpdateIntoPushPop(), llvm::ARMSubtarget::useMovt(), and llvm::InstCombiner::visitFPTrunc().

Definition at line 382 of file Function.h.

getContext - Return a pointer to the LLVMContext associated with this function, or NULL if this function is not bound to a context yet.

Reimplemented from llvm::Value.

Definition at line 216 of file Function.cpp.

References llvm::Type::getContext(), and llvm::GlobalValue::getType().

Referenced by AddAliasScopeMetadata(), llvm::Argument::addAttr(), addAttribute(), addAttributes(), addFnAttr(), AdjustCallerSSPLevel(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::DwarfDebug::beginFunction(), CloneAliasScopeMetadata(), llvm::CloneFunctionInto(), createFPFnStub(), duplicateCPV(), llvm::SIRegisterInfo::eliminateFrameIndex(), emitAnalysis(), llvm::NVPTXAsmPrinter::emitLineNumberAsDotLoc(), llvm::Thumb2RegisterInfo::emitLoadConstPool(), llvm::Thumb1RegisterInfo::emitLoadConstPool(), llvm::ARMBaseRegisterInfo::emitLoadConstPool(), llvm::FastISel::FastEmit_ri_(), llvm::LexicalScopes::findInlinedScope(), llvm::LexicalScopes::findLexicalScope(), llvm::BlockAddress::get(), llvm::ScalarEvolution::getContext(), getIntrinsicID(), getPrefixData(), llvm::SelectionDAG::init(), INITIALIZE_PASS(), insertFastDiv(), llvm::isFreeCall(), LLVMAddFunctionAttr(), LLVMAddTargetDependentFunctionAttr(), LLVMRemoveFunctionAttr(), llvm::XCoreInstrInfo::loadImmediate(), llvm::SIInstrInfo::loadRegFromStackSlot(), llvm::BlockAddress::lookup(), llvm::NVPTXTargetLowering::LowerCall(), llvm::NVPTXTargetLowering::LowerFormalArguments(), llvm::NVPTXTargetLowering::LowerReturn(), printDebugLoc(), llvm::Argument::removeAttr(), removeAttributes(), removeFnAttr(), RemoveNestAttribute(), removeUseSoftFloat(), llvm::legacy::FunctionPassManagerImpl::run(), llvm::FunctionPassManager::run(), llvm::JIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), llvm::UnifyFunctionExitNodes::runOnFunction(), llvm::LPPassManager::runOnFunction(), llvm::InstCombiner::runOnFunction(), llvm::PEI::runOnMachineFunction(), llvm::Inliner::runOnSCC(), llvm::FunctionLoweringInfo::set(), setPrefixData(), llvm::SIInstrInfo::storeRegToStackSlot(), llvm::UnrollLoop(), llvm::UpgradeIntrinsicFunction(), UpgradeIntrinsicFunction1(), UpgradeSSE41Function(), and ~Function().

uint64_t llvm::Function::getDereferenceableBytes ( unsigned  i) const [inline]

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

Definition at line 238 of file Function.h.

References llvm::AttributeSet::getDereferenceableBytes().

Referenced by llvm::Argument::getDereferenceableBytes().

Definition at line 388 of file Function.h.

References front().

Return the attribute for the given attribute kind.

Definition at line 208 of file Function.h.

References llvm::AttributeSet::FunctionIndex, and llvm::AttributeSet::getAttribute().

Referenced by llvm::NVPTXTargetLowering::allowFMA(), llvm::ARMBaseRegisterInfo::getCalleeSavedRegs(), and LowerInterruptReturn().

const char * Function::getGC ( ) const

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. Results are cached in the LLVM context, subsequent requests for the same ID return results much faster from the cache.

Definition at line 420 of file Function.cpp.

References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::count(), getContext(), llvm::Value::getValueName(), llvm::tgtok::Id, llvm::LLVMContextImpl::IntrinsicIDCache, isIntrinsic(), and llvm::LLVMContext::pImpl.

Referenced by llvm::canConstantFoldCallTo(), llvm::ConstantFoldCall(), llvm::IntrinsicInst::getIntrinsicID(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::FastISel::SelectInstruction(), SimplifyCall(), llvm::UpgradeIntrinsicCall(), llvm::UpgradeIntrinsicFunction(), llvm::Interpreter::visitCallSite(), and llvm::InstCombiner::visitFPTrunc().

Extract the alignment for a call or parameter (0=unknown).

Definition at line 232 of file Function.h.

References llvm::AttributeSet::getParamAlignment().

Referenced by llvm::Argument::getParamAlignment(), and llvm::InlineFunction().

static iplist<Argument> Function::* llvm::Function::getSublistAccess ( Argument ) [inline, static]

Definition at line 377 of file Function.h.

static iplist<BasicBlock> Function::* llvm::Function::getSublistAccess ( BasicBlock ) [inline, static]

Definition at line 383 of file Function.h.

getSymbolTable() - Return the symbol table...

Definition at line 395 of file Function.h.

Referenced by llvm::ilist_traits< BasicBlock >::getSymTab(), llvm::ilist_traits< Argument >::getSymTab(), and WriteFunction().

Definition at line 396 of file Function.h.

bool Function::hasAddressTaken ( const User **  PutOffender = nullptr) const

hasAddressTaken - returns true if there are any uses of this function other than direct calls or invokes to it, or blockaddress expressions. Optionally passes back an offending user for diagnostic purposes.

hasAddressTaken - returns true if there are any uses of this function other than direct calls or invokes to it.

Definition at line 771 of file Function.cpp.

References llvm::Value::uses().

bool llvm::Function::hasFnAttribute ( StringRef  Kind) const [inline]
bool Function::hasGC ( ) const

hasGC/getGC/setGC/clearGC - The name of the garbage collection algorithm to use during code generation.

Definition at line 359 of file Function.cpp.

References GCLock, and GCNames.

Referenced by copyAttributesFrom(), llvm::GCModuleInfo::getFunctionInfo(), getGC(), llvm::InlineFunction(), LLVMGetGC(), llvm::AssemblyWriter::printFunction(), and llvm::SelectionDAGISel::runOnMachineFunction().

bool llvm::Function::hasPrefixData ( ) const [inline]
bool llvm::Function::hasUWTable ( ) const [inline]

True if the ABI mandates (or the user requested) that this function be in a unwind table.

Definition at line 290 of file Function.h.

References llvm::AttributeSet::FunctionIndex, llvm::AttributeSet::hasAttribute(), and llvm::Attribute::UWTable.

Referenced by needsUnwindTableEntry().

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 785 of file Function.cpp.

References llvm::GlobalValue::hasAvailableExternallyLinkage(), llvm::GlobalValue::hasLinkOnceLinkage(), llvm::GlobalValue::hasLocalLinkage(), and llvm::Value::users().

Referenced by llvm::Inliner::removeDeadFunctions().

bool llvm::Function::isIntrinsic ( ) const [inline]

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

Definition at line 252 of file Function.h.

References doesNotAccessMemory(), llvm::AttributeSet::FunctionIndex, llvm::AttributeSet::hasAttribute(), and llvm::Attribute::ReadOnly.

Referenced by HandleByValArgument().

removes the attributes from the list of attributes.

Definition at line 345 of file Function.cpp.

References getAttributes(), getContext(), llvm::AttributeSet::removeAttributes(), and setAttributes().

Referenced by AdjustCallerSSPLevel(), llvm::Argument::removeAttr(), and removeUseSoftFloat().

Remove function attributes from this function.

Definition at line 182 of file Function.h.

References llvm::AttributeSet::FunctionIndex, getContext(), llvm::AttributeSet::removeAttribute(), and setAttributes().

void Function::removeFromParent ( ) [override, virtual]

removeFromParent - This method unlinks 'this' from the containing module, but does not delete it.

Implements llvm::GlobalValue.

Definition at line 232 of file Function.cpp.

References llvm::Module::getFunctionList(), llvm::GlobalValue::getParent(), and llvm::iplist< NodeTy, Traits >::remove().

void llvm::Function::setAttributes ( AttributeSet  attrs) [inline]

Definition at line 164 of file Function.h.

References llvm::Value::getSubclassDataFromValue().

Referenced by copyAttributesFrom().

Definition at line 284 of file Function.h.

References addFnAttr(), and llvm::Attribute::NoDuplicate.

Definition at line 247 of file Function.h.

References addFnAttr(), and llvm::Attribute::ReadNone.

Definition at line 331 of file Function.h.

References addAttribute(), and llvm::Attribute::ReadNone.

Definition at line 315 of file Function.h.

References addAttribute(), and llvm::Attribute::NoAlias.

Definition at line 324 of file Function.h.

References addAttribute(), and llvm::Attribute::NoCapture.

Definition at line 266 of file Function.h.

References addFnAttr(), and llvm::Attribute::NoReturn.

Definition at line 275 of file Function.h.

References addFnAttr(), and llvm::Attribute::NoUnwind.

void Function::setGC ( const char *  Str)

Definition at line 370 of file Function.cpp.

References GCLock, GCNamePool, GCNames, and llvm::StringPool::intern().

Referenced by copyAttributesFrom(), llvm::InlineFunction(), and LLVMSetGC().

void llvm::Function::setHasUWTable ( ) [inline]

Definition at line 294 of file Function.h.

References addFnAttr(), and llvm::Attribute::UWTable.

Definition at line 257 of file Function.h.

References addFnAttr(), and llvm::Attribute::ReadOnly.

Definition at line 339 of file Function.h.

References addAttribute(), and llvm::Attribute::ReadOnly.

void Function::setPrefixData ( Constant PrefixData)
size_t llvm::Function::size ( ) const [inline]
void llvm::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.

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 154 of file CFGPrinter.cpp.

References llvm::Value::getName(), and llvm::ViewGraph().

Referenced by LLVMViewFunctionCFGOnly().


Friends And Related Function Documentation

friend class SymbolTableListTraits< Function, Module > [friend]

Definition at line 96 of file Function.h.


The documentation for this class was generated from the following files: