|
LLVM
7.0.0
|
A Module instance is used to store all the information related to an LLVM module. More...
#include "llvm/IR/Module.h"
Classes | |
| class | debug_compile_units_iterator |
| An iterator for DICompileUnits that skips those marked NoDebug. More... | |
| struct | ModuleFlagEntry |
Public Member Functions | |
| void | dropTriviallyDeadConstantArrays () |
| Destroy ConstantArrays in LLVMContext if they are not used. More... | |
| bool | getRtLibUseGOT () const |
| Returns true if PLT should be avoided for RTLib calls. More... | |
| void | setRtLibUseGOT () |
| Set that PLT should be avoid for RTLib calls. More... | |
| void | setOwnedMemoryBuffer (std::unique_ptr< MemoryBuffer > MB) |
| Take ownership of the given memory buffer. More... | |
Constructors | |
| Module (StringRef ModuleID, LLVMContext &C) | |
| The Module constructor. More... | |
| ~Module () | |
| The module destructor. This will dropAllReferences. More... | |
Module Level Accessors | |
| const std::string & | getModuleIdentifier () const |
| Get the module identifier which is, essentially, the name of the module. More... | |
| unsigned | getInstructionCount () |
| Returns the number of non-debug IR instructions in the module. More... | |
| const std::string & | getSourceFileName () const |
| Get the module's original source file name. More... | |
| StringRef | getName () const |
| Get a short "name" for the module. More... | |
| const std::string & | getDataLayoutStr () const |
| Get the data layout string for the module's target platform. More... | |
| const DataLayout & | getDataLayout () const |
| Get the data layout for the module's target platform. More... | |
| const std::string & | getTargetTriple () const |
| Get the target triple which is a string describing the target host. More... | |
| LLVMContext & | getContext () const |
| Get the global data context. More... | |
| const std::string & | getModuleInlineAsm () const |
| Get any module-scope inline assembly blocks. More... | |
| std::unique_ptr< RandomNumberGenerator > | createRNG (const Pass *P) const |
| Get a RandomNumberGenerator salted for use with this module. More... | |
| bool | shouldEmitInstrCountChangedRemark () |
| Return true if size-info optimization remark is enabled, false otherwise. More... | |
Module Level Mutators | |
| void | setModuleIdentifier (StringRef ID) |
| Set the module identifier. More... | |
| void | setSourceFileName (StringRef Name) |
| Set the module's original source file name. More... | |
| void | setDataLayout (StringRef Desc) |
| Set the data layout. More... | |
| void | setDataLayout (const DataLayout &Other) |
| void | setTargetTriple (StringRef T) |
| Set the target triple. More... | |
| void | setModuleInlineAsm (StringRef Asm) |
| Set the module-scope inline assembly blocks. More... | |
| void | appendModuleInlineAsm (StringRef Asm) |
| Append to the module-scope inline assembly blocks. More... | |
Generic Value Accessors | |
| GlobalValue * | getNamedValue (StringRef Name) const |
| Return the global value in the module with the specified name, of arbitrary type. More... | |
| unsigned | getMDKindID (StringRef Name) const |
| Return a unique non-zero ID for the specified metadata kind. More... | |
| void | getMDKindNames (SmallVectorImpl< StringRef > &Result) const |
| Populate client supplied SmallVector with the name for custom metadata IDs registered in this LLVMContext. More... | |
| void | getOperandBundleTags (SmallVectorImpl< StringRef > &Result) const |
| Populate client supplied SmallVector with the bundle tags registered in this LLVMContext. More... | |
| StructType * | getTypeByName (StringRef Name) const |
| Return the type with the specified name, or null if there is none by that name. More... | |
| std::vector< StructType * > | getIdentifiedStructTypes () const |
Function Accessors | |
| Constant * | getOrInsertFunction (StringRef Name, FunctionType *T, AttributeList AttributeList) |
| Look up the specified function in the module symbol table. More... | |
| Constant * | getOrInsertFunction (StringRef Name, FunctionType *T) |
| template<typename... ArgsTy> | |
| Constant * | getOrInsertFunction (StringRef Name, AttributeList AttributeList, Type *RetTy, ArgsTy... Args) |
| Look up the specified function in the module symbol table. More... | |
| template<typename... ArgsTy> | |
| Constant * | getOrInsertFunction (StringRef Name, Type *RetTy, ArgsTy... Args) |
| Same as above, but without the attributes. More... | |
| Function * | getFunction (StringRef Name) const |
| Look up the specified function in the module symbol table. More... | |
Global Variable Accessors | |
| GlobalVariable * | getGlobalVariable (StringRef Name) const |
| Look up the specified global variable in the module symbol table. More... | |
| GlobalVariable * | getGlobalVariable (StringRef Name, bool AllowInternal) const |
| getGlobalVariable - Look up the specified global variable in the module symbol table. More... | |
| GlobalVariable * | getGlobalVariable (StringRef Name, bool AllowInternal=false) |
| const GlobalVariable * | getNamedGlobal (StringRef Name) const |
| Return the global variable in the module with the specified name, of arbitrary type. More... | |
| GlobalVariable * | getNamedGlobal (StringRef Name) |
| Constant * | getOrInsertGlobal (StringRef Name, Type *Ty) |
| Look up the specified global in the module symbol table. More... | |
Global Alias Accessors | |
| GlobalAlias * | getNamedAlias (StringRef Name) const |
| Return the global alias in the module with the specified name, of arbitrary type. More... | |
Global IFunc Accessors | |
| GlobalIFunc * | getNamedIFunc (StringRef Name) const |
| Return the global ifunc in the module with the specified name, of arbitrary type. More... | |
Named Metadata Accessors | |
| NamedMDNode * | getNamedMetadata (const Twine &Name) const |
| Return the first NamedMDNode in the module with the specified name. More... | |
| NamedMDNode * | getOrInsertNamedMetadata (StringRef Name) |
| Return the named MDNode in the module with the specified name. More... | |
| void | eraseNamedMetadata (NamedMDNode *NMD) |
| Remove the given NamedMDNode from this module and delete it. More... | |
Comdat Accessors | |
| Comdat * | getOrInsertComdat (StringRef Name) |
| Return the Comdat in the module with the specified name. More... | |
Module Flags Accessors | |
| void | getModuleFlagsMetadata (SmallVectorImpl< ModuleFlagEntry > &Flags) const |
| Returns the module flags in the provided vector. More... | |
| Metadata * | getModuleFlag (StringRef Key) const |
| Return the corresponding value if Key appears in module flags, otherwise return null. More... | |
| NamedMDNode * | getModuleFlagsMetadata () const |
| Returns the NamedMDNode in the module that represents module-level flags. More... | |
| NamedMDNode * | getOrInsertModuleFlagsMetadata () |
| Returns the NamedMDNode in the module that represents module-level flags. More... | |
| void | addModuleFlag (ModFlagBehavior Behavior, StringRef Key, Metadata *Val) |
| Add a module-level flag to the module-level flags metadata. More... | |
| void | addModuleFlag (ModFlagBehavior Behavior, StringRef Key, Constant *Val) |
| void | addModuleFlag (ModFlagBehavior Behavior, StringRef Key, uint32_t Val) |
| void | addModuleFlag (MDNode *Node) |
Materialization | |
| void | setMaterializer (GVMaterializer *GVM) |
| Sets the GVMaterializer to GVM. More... | |
| GVMaterializer * | getMaterializer () const |
| Retrieves the GVMaterializer, if any, for this Module. More... | |
| bool | isMaterialized () const |
| llvm::Error | materialize (GlobalValue *GV) |
| Make sure the GlobalValue is fully read. More... | |
| llvm::Error | materializeAll () |
| Make sure all GlobalValues in this Module are fully read and clear the Materializer. More... | |
| llvm::Error | materializeMetadata () |
Global Variable Iteration | |
| global_iterator | global_begin () |
| const_global_iterator | global_begin () const |
| global_iterator | global_end () |
| const_global_iterator | global_end () const |
| bool | global_empty () const |
| iterator_range< global_iterator > | globals () |
| iterator_range< const_global_iterator > | globals () const |
Function Iteration | |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
| reverse_iterator | rbegin () |
| const_reverse_iterator | rbegin () const |
| reverse_iterator | rend () |
| const_reverse_iterator | rend () const |
| size_t | size () const |
| bool | empty () const |
| iterator_range< iterator > | functions () |
| iterator_range< const_iterator > | functions () const |
Alias Iteration | |
| alias_iterator | alias_begin () |
| const_alias_iterator | alias_begin () const |
| alias_iterator | alias_end () |
| const_alias_iterator | alias_end () const |
| size_t | alias_size () const |
| bool | alias_empty () const |
| iterator_range< alias_iterator > | aliases () |
| iterator_range< const_alias_iterator > | aliases () const |
IFunc Iteration | |
| ifunc_iterator | ifunc_begin () |
| const_ifunc_iterator | ifunc_begin () const |
| ifunc_iterator | ifunc_end () |
| const_ifunc_iterator | ifunc_end () const |
| size_t | ifunc_size () const |
| bool | ifunc_empty () const |
| iterator_range< ifunc_iterator > | ifuncs () |
| iterator_range< const_ifunc_iterator > | ifuncs () const |
Named Metadata Iteration | |
| named_metadata_iterator | named_metadata_begin () |
| const_named_metadata_iterator | named_metadata_begin () const |
| named_metadata_iterator | named_metadata_end () |
| const_named_metadata_iterator | named_metadata_end () const |
| size_t | named_metadata_size () const |
| bool | named_metadata_empty () const |
| iterator_range< named_metadata_iterator > | named_metadata () |
| iterator_range< const_named_metadata_iterator > | named_metadata () const |
| debug_compile_units_iterator | debug_compile_units_begin () const |
| debug_compile_units_iterator | debug_compile_units_end () const |
| iterator_range< debug_compile_units_iterator > | debug_compile_units () const |
| Return an iterator for all DICompileUnits listed in this Module's llvm.dbg.cu named metadata node and aren't explicitly marked as NoDebug. More... | |
Utility functions for printing and dumping Module objects | |
| void | print (raw_ostream &OS, AssemblyAnnotationWriter *AAW, bool ShouldPreserveUseListOrder=false, bool IsForDebug=false) const |
| Print the module to an output stream with an optional AssemblyAnnotationWriter. More... | |
| void | dump () const |
| Dump the module to stderr (for debugging). More... | |
| void | dropAllReferences () |
| This function causes all the subinstructions to "let go" of all references that they are maintaining. More... | |
Utility functions for querying Debug information. | |
| unsigned | getNumberRegisterParameters () const |
| Returns the Number of Register ParametersDwarf Version by checking module flags. More... | |
| unsigned | getDwarfVersion () const |
| Returns the Dwarf Version by checking module flags. More... | |
| unsigned | getCodeViewFlag () const |
| Returns the CodeView Version by checking module flags. More... | |
Utility functions for querying and setting PIC level | |
| PICLevel::Level | getPICLevel () const |
| Returns the PIC level (small or large model) More... | |
| void | setPICLevel (PICLevel::Level PL) |
| Set the PIC level (small or large model) More... | |
Utility functions for querying and setting PIE level | |
| PIELevel::Level | getPIELevel () const |
| Returns the PIE level (small or large model) More... | |
| void | setPIELevel (PIELevel::Level PL) |
| Set the PIE level (small or large model) More... | |
Utility functions for querying and setting PGO summary | |
| void | setProfileSummary (Metadata *M) |
| Attach profile summary metadata to this module. More... | |
| Metadata * | getProfileSummary () |
| Returns profile summary metadata. More... | |
Member Variables | |
| class | Constant |
Direct access to the globals list, functions list, and symbol table | |
| static GlobalListType Module::* | getSublistAccess (GlobalVariable *) |
| static FunctionListType Module::* | getSublistAccess (Function *) |
| static AliasListType Module::* | getSublistAccess (GlobalAlias *) |
| static IFuncListType Module::* | getSublistAccess (GlobalIFunc *) |
| static NamedMDListType Module::* | getSublistAccess (NamedMDNode *) |
| const GlobalListType & | getGlobalList () const |
| Get the Module's list of global variables (constant). More... | |
| GlobalListType & | getGlobalList () |
| Get the Module's list of global variables. More... | |
| const FunctionListType & | getFunctionList () const |
| Get the Module's list of functions (constant). More... | |
| FunctionListType & | getFunctionList () |
| Get the Module's list of functions. More... | |
| const AliasListType & | getAliasList () const |
| Get the Module's list of aliases (constant). More... | |
| AliasListType & | getAliasList () |
| Get the Module's list of aliases. More... | |
| const IFuncListType & | getIFuncList () const |
| Get the Module's list of ifuncs (constant). More... | |
| IFuncListType & | getIFuncList () |
| Get the Module's list of ifuncs. More... | |
| const NamedMDListType & | getNamedMDList () const |
| Get the Module's list of named metadata (constant). More... | |
| NamedMDListType & | getNamedMDList () |
| Get the Module's list of named metadata. More... | |
| const ValueSymbolTable & | getValueSymbolTable () const |
| Get the symbol table of global variable and function identifiers. More... | |
| ValueSymbolTable & | getValueSymbolTable () |
| Get the Module's symbol table of global variable and function identifiers. More... | |
| const ComdatSymTabType & | getComdatSymbolTable () const |
| Get the Module's symbol table for COMDATs (constant). More... | |
| ComdatSymTabType & | getComdatSymbolTable () |
| Get the Module's symbol table for COMDATs. More... | |
A Module instance is used to store all the information related to an LLVM module.
Modules are the top level container of all other LLVM Intermediate Representation (IR) objects. Each module directly contains a list of globals variables, a list of functions, a list of libraries (or other modules) this module depends on, a symbol table, and various data about the target's characteristics.
A module maintains a GlobalValRefMap object that is used to hold all constant references to global variables in the module. When a global variable is destroyed, it should have no entries in the GlobalValueRefMap. The main container class for the LLVM Intermediate Representation.
This enumeration defines the supported behaviors of module flags.
|
explicit |
The Module constructor.
Note that there is no default constructor. You must provide a name for the module upon construction.
Definition at line 72 of file Module.cpp.
| Module::~Module | ( | ) |
The module destructor. This will dropAllReferences.
Definition at line 79 of file Module.cpp.
References llvm::iplist_impl< IntrusiveListT, TraitsT >::clear(), and dropAllReferences().
| void Module::addModuleFlag | ( | ModFlagBehavior | Behavior, |
| StringRef | Key, | ||
| Metadata * | Val | ||
| ) |
Add a module-level flag to the module-level flags metadata.
addModuleFlag - Add a module-level flag to the module-level flags metadata.
It will create the module-level flags named metadata if it doesn't already exist.
Definition at line 329 of file Module.cpp.
References llvm::NamedMDNode::addOperand(), llvm::ConstantInt::get(), llvm::ConstantAsMetadata::get(), llvm::MDString::get(), llvm::MDNode::get(), llvm::Type::getInt32Ty(), getOrInsertModuleFlagsMetadata(), and Int32Ty.
Referenced by addModuleFlag(), llvm::orc::cloneModuleFlagsMetadata(), getNamedGlobal(), llvm::CGProfilePass::run(), setPICLevel(), setPIELevel(), setProfileSummary(), setRtLibUseGOT(), and llvm::UpgradeModuleFlags().
| void Module::addModuleFlag | ( | ModFlagBehavior | Behavior, |
| StringRef | Key, | ||
| Constant * | Val | ||
| ) |
Definition at line 337 of file Module.cpp.
References addModuleFlag(), and llvm::ConstantAsMetadata::get().
| void Module::addModuleFlag | ( | ModFlagBehavior | Behavior, |
| StringRef | Key, | ||
| uint32_t | Val | ||
| ) |
Definition at line 341 of file Module.cpp.
References addModuleFlag(), llvm::ConstantInt::get(), llvm::Type::getInt32Ty(), and Int32Ty.
| void Module::addModuleFlag | ( | MDNode * | Node | ) |
Definition at line 346 of file Module.cpp.
References llvm::NamedMDNode::addOperand(), assert(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), and getOrInsertModuleFlagsMetadata().
|
inline |
Definition at line 606 of file Module.h.
Referenced by aliases(), getMinVisibility(), LLVMGetFirstGlobalAlias(), LLVMGetLastGlobalAlias(), LLVMGetPreviousGlobalAlias(), and OptimizeGlobalAliases().
|
inline |
|
inline |
Definition at line 611 of file Module.h.
Referenced by WriteAsOperandInternal().
|
inline |
Definition at line 608 of file Module.h.
Referenced by aliases(), getMinVisibility(), LLVMGetFirstGlobalAlias(), LLVMGetLastGlobalAlias(), LLVMGetNextGlobalAlias(), and OptimizeGlobalAliases().
|
inline |
|
inline |
Definition at line 610 of file Module.h.
Referenced by llvm::NVPTXAsmPrinter::doInitialization().
|
inline |
Definition at line 613 of file Module.h.
References alias_begin(), alias_end(), and llvm::make_range().
Referenced by dropAllReferences(), extractAliases(), llvm::filterDeadComdatFunctions(), findPartitions(), global_values(), llvm::nameUnamedGlobals(), orderModule(), rewriteComdat(), llvm::TypeFinder::run(), and WriteAsOperandInternal().
|
inline |
Definition at line 616 of file Module.h.
References alias_begin(), alias_end(), and llvm::make_range().
|
inline |
Append to the module-scope inline assembly blocks.
A trailing newline is added if the input doesn't have one.
Definition at line 293 of file Module.h.
References llvm::HexStyle::Asm, getIdentifiedStructTypes(), getMDKindID(), getMDKindNames(), getNamedValue(), getOperandBundleTags(), getOrInsertFunction(), getTypeByName(), and Result.
|
inline |
Definition at line 584 of file Module.h.
Referenced by llvm::PMDataManager::emitInstrCountChangedRemark(), functions(), getMinVisibility(), LLVMGetFirstFunction(), LLVMGetLastFunction(), LLVMGetPreviousFunction(), NeedsDefaultLoweringPass(), OptimizeFunctions(), removeUseSoftFloat(), llvm::DeadArgumentEliminationPass::run(), stripDeadPrototypes(), useFuncSeen(), llvm::InstVisitor< ObjectSizeOffsetVisitor, SizeOffsetType >::visit(), and writeIdentificationBlock().
|
inline |
| std::unique_ptr< RandomNumberGenerator > Module::createRNG | ( | const Pass * | P | ) | const |
Get a RandomNumberGenerator salted for use with this module.
The RNG can be seeded via -rng-seed=<uint64> and is salted with the ModuleID and the provided pass salt. The returned RNG should not be shared across threads or passes.
A unique RNG per pass ensures a reproducible random stream even when other randomness consuming passes are added or removed. In addition, the random stream will be reproducible across LLVM versions when the pass does not change.
Definition at line 91 of file Module.cpp.
References llvm::sys::path::filename(), getModuleIdentifier(), and llvm::Pass::getPassName().
Referenced by getModuleInlineAsm().
|
inline |
Return an iterator for all DICompileUnits listed in this Module's llvm.dbg.cu named metadata node and aren't explicitly marked as NoDebug.
Definition at line 767 of file Module.h.
References llvm::collectUsedGlobalVariables(), dropAllReferences(), dropTriviallyDeadConstantArrays(), dump(), getCodeViewFlag(), getDwarfVersion(), getNamedMetadata(), getNumberRegisterParameters(), getPICLevel(), getPIELevel(), getProfileSummary(), getRtLibUseGOT(), llvm::make_range(), llvm::AArch64CC::PL, print(), setOwnedMemoryBuffer(), setPICLevel(), setPIELevel(), setProfileSummary(), and setRtLibUseGOT().
Referenced by llvm::DwarfDebug::beginModule(), and llvm::DebugInfoFinder::processModule().
|
inline |
Definition at line 754 of file Module.h.
References getNamedMetadata().
Referenced by llvm::DwarfDebug::beginModule().
|
inline |
Definition at line 759 of file Module.h.
References getNamedMetadata().
Referenced by llvm::DwarfDebug::beginModule().
| void Module::dropAllReferences | ( | ) |
This function causes all the subinstructions to "let go" of all references that they are maintaining.
This allows one to 'delete' a whole class 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 delete'd for real. Note that no operations are valid on an object that has "dropped all references", except operator delete.
Definition at line 431 of file Module.cpp.
References aliases(), llvm::Function::dropAllReferences(), F(), globals(), and ifuncs().
Referenced by debug_compile_units(), and ~Module().
| void Module::dropTriviallyDeadConstantArrays | ( | ) |
Destroy ConstantArrays in LLVMContext if they are not used.
ConstantArrays constructed during linking can cause quadratic memory explosion. Releasing all unused constants can cause a 20% LTO compile-time slowdown for a large application.
NOTE: Constants are currently owned by LLVMContext. This can then only be called where all uses of the LLVMContext are understood.
Definition at line 160 of file LLVMContextImpl.cpp.
References Context, llvm::LLVMContextImpl::dropTriviallyDeadConstantArrays(), and llvm::LLVMContext::pImpl.
Referenced by debug_compile_units(), and llvm::IRMover::move().
| LLVM_DUMP_METHOD void Module::dump | ( | ) | const |
Dump the module to stderr (for debugging).
Definition at line 4224 of file AsmWriter.cpp.
References llvm::dbgs(), LLVM_DUMP_METHOD, and print().
Referenced by CheckMACMemory(), and debug_compile_units().
|
inline |
Definition at line 593 of file Module.h.
Referenced by llvm::symbolize::SymbolizableObjectFile::create(), INITIALIZE_PASS(), instrumentMaskedLoadOrStore(), and llvm::IRMutationStrategy::mutate().
|
inline |
Definition at line 586 of file Module.h.
Referenced by llvm::PMDataManager::emitInstrCountChangedRemark(), functions(), getMinVisibility(), LLVMGetFirstFunction(), LLVMGetLastFunction(), LLVMGetNextFunction(), NeedsDefaultLoweringPass(), OptimizeFunctions(), removeUseSoftFloat(), llvm::DeadArgumentEliminationPass::run(), stripDeadPrototypes(), useFuncSeen(), llvm::InstVisitor< ObjectSizeOffsetVisitor, SizeOffsetType >::visit(), and writeIdentificationBlock().
|
inline |
| void Module::eraseNamedMetadata | ( | NamedMDNode * | NMD | ) |
Remove the given NamedMDNode from this module and delete it.
eraseNamedMetadata - Remove the given NamedMDNode from this module and delete it.
Definition at line 264 of file Module.cpp.
References llvm::iplist_impl< IntrusiveListT, TraitsT >::erase(), llvm::ilist_node_impl< OptionsT >::getIterator(), and llvm::NamedMDNode::getName().
Referenced by getNamedGlobal().
|
inline |
Definition at line 595 of file Module.h.
References begin(), end(), and llvm::make_range().
Referenced by collectFunctionUsers(), llvm::filterDeadComdatFunctions(), findPartitions(), global_objects(), global_values(), inferAllPrototypeAttributes(), llvm::DebugInfoFinder::processModule(), rewriteComdat(), llvm::ForceFunctionAttrsPass::run(), llvm::PrintModulePass::run(), llvm::ImportedFunctionsInliningStatistics::setModuleInfo(), and shouldKeepInEntry().
|
inline |
Definition at line 598 of file Module.h.
References begin(), end(), and llvm::make_range().
|
inline |
Get the Module's list of aliases (constant).
Definition at line 527 of file Module.h.
Referenced by llvm::GlobalAlias::eraseFromParent(), llvm::GlobalIndirectSymbol::GlobalIndirectSymbol(), maybeSetDSOLocal(), OptimizeGlobalAliases(), and llvm::GlobalAlias::removeFromParent().
|
inline |
| unsigned Module::getCodeViewFlag | ( | ) | const |
Returns the CodeView Version by checking module flags.
Returns zero if not present in module.
Definition at line 460 of file Module.cpp.
References getModuleFlag().
Referenced by debug_compile_units(), llvm::AsmPrinter::doInitialization(), llvm::X86FrameLowering::emitPrologue(), and llvm::X86AsmPrinter::runOnMachineFunction().
|
inline |
Get the Module's symbol table for COMDATs (constant).
Definition at line 559 of file Module.h.
Referenced by createGlobalFwdRef(), getMinVisibility(), llvm::InternalizePass::internalizeModule(), and rewriteComdat().
|
inline |
|
inline |
Get the global data context.
Definition at line 242 of file Module.h.
References Context.
Referenced by llvm::LTOCodeGenerator::addModule(), llvm::IntrinsicLowering::AddPrototypes(), llvm::AMDGPUMachineModuleInfo::AMDGPUMachineModuleInfo(), llvm::AMDGPUTargetLowering::analyzeFormalArgumentsCompute(), annotateAllFunctions(), llvm::annotateValueSite(), appendToGlobalArray(), appendToUsedList(), assureFPCallStub(), llvm::CloneModule(), collectFunctionUsers(), createDevirtTriggerFunc(), createDummyFunction(), llvm::createEfficiencySanitizerPass(), createEmptyFunction(), createFPFnStub(), createFree(), CreateGCRelocates(), llvm::createHWAddressSanitizerPass(), createIRLevelProfileFlagVariable(), llvm::createPGOFuncNameVar(), createPrivateGlobalForSourceLoc(), createPrivateGlobalForString(), createPrivateNonConstGlobalForString(), llvm::createSampleProfileLoaderPass(), llvm::createSanitizerCtorAndInitFunctions(), llvm::createThreadSanitizerPass(), CreateWrapper(), llvm::createX86RetpolineThunksPass(), llvm::declareSanitizerInitFunction(), doImportingForModule(), llvm::MachineInstr::emitError(), EmitGCCInlineAsmStr(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::emitMemCpyChk(), EmitMSInlineAsmStr(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), EnsureFPIntrinsicsExist(), llvm::CodeExtractor::findInputsOutputs(), llvm::SanitizerStatReport::finish(), fixupFPReturnAndCall(), llvm::objcarc::ARCRuntimeEntryPoints::get(), llvm::objcarc::ARCMDKindCache::get(), getChainID(), llvm::getCopyDeclaration(), llvm::AMDGPUIntrinsicInfo::getDeclaration(), llvm::Intrinsic::getDeclaration(), getDefaultPersonalityFn(), llvm::TargetLoweringBase::getDefaultSafeStackPointerLocation(), getFunctionName(), llvm::AMDGPUMangledLibFunc::getFunctionType(), llvm::TargetLoweringBase::getIRStackGuard(), getMinVisibility(), getNarrowIntrinsic(), llvm::AMDGPULibFunc::getOrInsertFunction(), getOrInsertValueProfilingCall(), llvm::TargetLoweringBase::getSafeStackPointerLocation(), getSignature(), llvm::InstrProfIncrementInst::getStep(), getSubprogram(), llvm::HexagonTargetLowering::getTgtMemIntrinsic(), llvm::FunctionImporter::importFunctions(), INITIALIZE_PASS(), INITIALIZE_PASS_WITH_OPTIONS(), InsertSafepointPoll(), llvm::X86TargetLowering::insertSSPDeclarations(), llvm::TargetLoweringBase::insertSSPDeclarations(), insertUseHolderAfter(), instrumentMaskedLoadOrStore(), instrumentOneFunc(), llvm::DenseMapInfo< VTableSlot >::isEqual(), llvm::log2(), MarkBlocksLiveIn(), llvm::IRMutator::mutateModule(), needsRuntimeRegistrationOfSectionRange(), PushArgMD(), llvm::CGProfilePass::run(), llvm::WholeProgramDevirtPass::run(), llvm::legacy::PassManagerImpl::run(), llvm::Float2IntPass::runImpl(), llvm::SanitizerStatReport::SanitizerStatReport(), llvm::setIrrLoopHeaderMetadata(), llvm::setProfMetadata(), shouldEmitInstrCountChangedRemark(), llvm::ModulePass::skipModule(), llvm::CallGraphSCCPass::skipSCC(), srcMgrDiagHandler(), llvm::stripNonLineTableDebugInfo(), StripSymbolNames(), SwitchToLookupTable(), switchToSelect(), llvm::lto::thinBackend(), llvm::UpgradeDebugInfo(), llvm::UpgradeModuleFlags(), llvm::UpgradeRetainReleaseMarker(), and llvm::SelectionDAGBuilder::visitSPDescriptorParent().
| const DataLayout & Module::getDataLayout | ( | ) | const |
Get the data layout for the module's target platform.
Definition at line 361 of file Module.cpp.
Referenced by llvm::AliasSetTracker::add(), AddAlignmentAssumptions(), addBoundsChecking(), llvm::LoopAccessInfo::addRuntimeChecks(), llvm::IVUsers::AddUsersImpl(), allCallersPassInValidPointerForArgument(), llvm::AMDGPUTargetLowering::analyzeFormalArgumentsCompute(), llvm::GlobalsAAResult::analyzeModule(), llvm::orc::LLJIT::applyDataLayout(), buildFrameType(), llvm::AAResults::callCapturesBefore(), llvm::objcarc::CanAlterRefCount(), llvm::slpvectorizer::BoUpSLP::canMapToVector(), CanProveNotTakenFirstIteration(), llvm::canSinkOrHoistInst(), llvm::objcarc::CanUse(), llvm::CloneAndPruneIntoFromInst(), llvm::CloneFunction(), llvm::CloneModule(), llvm::FunctionComparator::cmpOperations(), llvm::FunctionComparator::cmpTypes(), collectFunctionUsers(), combineInstructionsOverFunction(), llvm::ComputeLegalValueVTs(), computeRecurrenceType(), llvm::JumpThreadingPass::ComputeValueKnownInPredecessors(), computeValueLLTs(), llvm::ConstantFoldCall(), llvm::ConvertDebugDeclareToDebugValue(), llvm::SanitizerStatReport::create(), llvm::createAMDGPUFunctionInliningPass(), llvm::createCodeGenPreparePass(), llvm::createConstantPropagationPass(), llvm::createEfficiencySanitizerPass(), llvm::createHWAddressSanitizerPass(), llvm::createLegacyPMBasicAAResult(), createMaskInstrs(), llvm::createMemDerefPrinter(), llvm::createPPCCTRLoopsVerify(), createPrivateNonConstGlobalForString(), llvm::createSeparateConstOffsetFromGEPPass(), llvm::createThreadSanitizerPass(), llvm::InnerLoopVectorizer::createVectorizedLoopSkeleton(), llvm::DemotePHIToStack(), llvm::DemoteRegToStack(), llvm::objcarc::ObjCARCAAWrapperPass::doInitialization(), llvm::AMDGPUAAWrapperPass::doInitialization(), doPromotion(), llvm::JumpThreadingPass::DuplicateCondBranchOnPHIIntoPred(), eliminateDeadStores(), eliminateTailRecursion(), llvm::AsmPrinter::EmitAlignment(), llvm::emitCalloc(), EmitCamlGlobal(), llvm::AsmPrinter::EmitDebugThreadLocal(), llvm::AsmPrinter::emitGlobalGOTEquivs(), llvm::AsmPrinter::EmitGlobalVariable(), llvm::emitLinkerFlagsForGlobalCOFF(), llvm::InnerLoopVectorizer::emitSCEVChecks(), llvm::AsmPrinter::EmitSpecialLLVMGlobal(), llvm::LazyValueInfo::eraseBlock(), llvm::FindAvailablePtrLoadStore(), llvm::CodeExtractor::findInputsOutputs(), findLoadCallsAtConstantOffset(), FindLoopCounter(), findPHIToPartitionLoops(), llvm::InnerLoopVectorizer::fixupIVUsers(), llvm::MCJIT::generateCodeForModule(), llvm::MemoryLocation::get(), getAlignment(), getAllocaSizeInBytes(), getAtomicOpAlign(), getAtomicOpSize(), llvm::getBestSimplifyQuery(), llvm::LazyValueInfo::getConstant(), llvm::LazyValueInfo::getConstantOnEdge(), llvm::LazyValueInfo::getConstantRange(), llvm::LazyValueInfo::getConstantRangeOnEdge(), llvm::AsmPrinter::getDataLayout(), llvm::MachineFunction::getDataLayout(), llvm::ScalarEvolution::getDataLayout(), getDataLayoutStr(), llvm::DemandedBits::getDemandedBits(), getEdgeValueLocal(), llvm::AMDGPUSubtarget::getExplicitKernArgSize(), getFirstNonAllocaInTheEntryBlock(), getFullyQualifiedName(), llvm::getGEPInductionOperand(), llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel(), llvm::getInlineCost(), llvm::TargetLibraryInfoImpl::getLibFunc(), llvm::MemoryDependenceResults::getLoadLoadClobberFullWidthSize(), llvm::ExecutionEngine::getMangledName(), getMinVisibility(), llvm::GlobalsAAResult::getModRefBehavior(), llvm::Mangler::getNameWithPrefix(), llvm::InnerLoopVectorizer::getOrCreateTripCount(), GetPointerOperand(), llvm::LazyValueInfo::getPredicateAt(), llvm::LazyValueInfo::getPredicateOnEdge(), llvm::NVPTXTargetLowering::getPrototype(), llvm::getPtrStride(), llvm::SCEVExpander::getRelatedExistingExpansion(), GetRMWLibcall(), getScalarIntrinsicDeclaration(), llvm::TargetLoweringObjectFile::getSectionForJumpTable(), llvm::MemoryDependenceResults::getSimplePointerDependencyFrom(), llvm::TargetLoweringObjectFile::getSymbolWithGlobalValueBase(), llvm::MipsTargetMachine::getTargetTransformInfo(), llvm::TargetMachine::getTargetTransformInfo(), llvm::HexagonTargetLowering::getTgtMemIntrinsic(), llvm::AArch64TargetLowering::getTgtMemIntrinsic(), llvm::NVPTXTargetLowering::getTgtMemIntrinsic(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), getTypePartition(), llvm::SSAUpdater::GetValueInMiddleOfBlock(), GlobalWasGeneratedByCompiler(), llvm::CallLowering::handleAssignments(), HandleByValArgument(), HandleByValArgumentInit(), handleEndBlock(), handleFree(), hasProfileData(), llvm::hoistRegion(), llvm::DataLayout::init(), INITIALIZE_PASS(), llvm::InlineFunction(), insertIfNamed(), instrumentMaskedLoadOrStore(), llvm::isAllocaPromotable(), isAlwaysLive(), isAtomic(), llvm::DenseMapInfo< VTableSlot >::isEqual(), llvm::MipsTargetObjectFile::IsGlobalInSmallSection(), isIgnorableInst(), llvm::InductionDescriptor::isInductionPHI(), isKnownNegativeInLoop(), isLoadConditional(), isLoadInvariantInLoop(), isObjectDereferencedInBlock(), isOnlyReachableViaThisEdge(), IsOperandAMemoryOperand(), isPointerValueDeadOnEntryToFunction(), llvm::AArch64TargetLowering::isProfitableToHoist(), isSafePHIToSpeculate(), isSafeSelectToSpeculate(), llvm::isSafeToSpeculativelyExecute(), IsSmallObject(), llvm::LoopVectorizationLegality::isUniform(), isValidVariableType(), isZero(), llvm::AArch64TargetLowering::isZExtFree(), llvm::LibCallSimplifier::LibCallSimplifier(), llvm::X86CallLowering::lowerCall(), llvm::AArch64CallLowering::lowerCall(), llvm::MipsCallLowering::lowerCall(), llvm::CallLowering::lowerCall(), llvm::AArch64CallLowering::lowerFormalArguments(), llvm::AMDGPUCallLowering::lowerFormalArguments(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::AArch64CallLowering::lowerReturn(), llvm::AMDGPUCallLowering::lowerReturn(), MarkBlocksLiveIn(), llvm::gvn::AvailableValue::MaterializeAdjustedValue(), mayLoopAccessLocation(), memOpsHaveSameBasePtr(), llvm::LoopVectorizationCostModel::memoryInstructionCanBeWidened(), mergeInlinedArrayAllocas(), moveUp(), operator<<(), OptimizeGlobalVars(), patchAndReplaceAllUsesWith(), performGlobalAddressCombine(), llvm::MemoryDepChecker::Dependence::print(), llvm::JumpThreadingPass::ProcessBlock(), llvm::JumpThreadingPass::ProcessImpliedCondition(), processInternalGlobal(), llvm::promoteLoopAccessesToScalars(), ReduceLoopStrength(), RedzoneSizeForScale(), relocationViaAlloca(), llvm::replaceAllDbgUsesWith(), replaceAndRecursivelySimplifyImpl(), replaceFrameSize(), ReplaceUsesOfWith(), reportMayClobberedLoad(), llvm::returnTypeIsEligibleForTailCall(), llvm::LoopRotatePass::run(), llvm::NewGVNPass::run(), llvm::IndVarSimplifyPass::run(), llvm::GlobalOptPass::run(), llvm::LoopIdiomRecognizePass::run(), llvm::IPSCCPPass::run(), llvm::EarlyCSEPass::run(), llvm::SCCPPass::run(), llvm::InstSimplifyPass::run(), llvm::AAEvaluator::run(), llvm::objcarc::ObjCARCAA::run(), llvm::AMDGPUAA::run(), llvm::LazyValueAnalysis::run(), llvm::WholeProgramDevirtPass::run(), llvm::BasicAA::run(), llvm::TargetIRAnalysis::run(), llvm::SLPVectorizerPass::runImpl(), llvm::NaryReassociatePass::runImpl(), runImpl(), llvm::LazyValueInfoWrapperPass::runOnFunction(), llvm::BasicAAWrapperPass::runOnFunction(), llvm::IRTranslator::runOnMachineFunction(), selectELFSectionForGlobal(), llvm::XCoreTargetObjectFile::SelectSectionForGlobal(), llvm::TargetLoweringObjectFileMachO::SelectSectionForGlobal(), llvm::HexagonTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::HexagonTargetObjectFile::shouldPutJumpTableInFunctionSection(), llvm::simplifyCFG(), llvm::SimplifyInstructionsInBlock(), llvm::simplifyLoopAfterUnroll(), simplifyLoopInst(), simplifyOneLoop(), AllocaSlices::SliceBuilder::SliceBuilder(), splitGlobal(), splitMergedValStore(), StackMallocSizeClass(), llvm::LazyValueInfo::threadEdge(), llvm::JumpThreadingPass::ThreadGuard(), tryToVectorizeHorReductionOrInstOperands(), TypeSizeToSizeIndex(), llvm::UnrollRuntimeLoopRemainder(), llvm::orc::CompileOnDemandLayer< CompileLayerT, CompileCallbackMgr >::updatePointer(), valueCoversEntireFragment(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InnerLoopVectorizer::vectorizeMemoryInstruction(), llvm::LoopVersioning::versionLoop(), visitIVCast(), llvm::InnerLoopVectorizer::widenIntOrFpInduction(), and llvm::InnerLoopVectorizer::widenPHIInstruction().
|
inline |
Get the data layout string for the module's target platform.
This is equivalent to getDataLayout()->getStringRepresentation().
Definition at line 229 of file Module.h.
References getDataLayout(), and llvm::DataLayout::getStringRepresentation().
Referenced by getStringEncoding(), and WriteAsOperandInternal().
| unsigned Module::getDwarfVersion | ( | ) | const |
Returns the Dwarf Version by checking module flags.
Definition at line 453 of file Module.cpp.
References getModuleFlag().
Referenced by debug_compile_units(), llvm::AsmPrinter::doInitialization(), and llvm::DwarfDebug::DwarfDebug().
Look up the specified function in the module symbol table.
If it does not exist, return null.
Definition at line 172 of file Module.cpp.
References getNamedValue().
Referenced by assureFPCallStub(), containsProfilingIntrinsics(), createDevirtTriggerFunc(), llvm::emitCalloc(), llvm::emitFGetCUnlocked(), llvm::emitFGetSUnlocked(), llvm::emitFPutC(), llvm::emitFPutCUnlocked(), llvm::emitFPutS(), llvm::emitFPutSUnlocked(), llvm::emitFReadUnlocked(), llvm::emitFWrite(), llvm::emitFWriteUnlocked(), llvm::emitMalloc(), llvm::emitMemChr(), llvm::emitMemCmp(), llvm::emitPutChar(), llvm::emitPutS(), llvm::emitStrChr(), llvm::emitStrCpy(), llvm::emitStrLen(), llvm::emitStrNCmp(), llvm::emitStrNCpy(), FindCXAAtExit(), llvm::sampleprof::FunctionSamples::findInlinedFunctions(), llvm::MCJIT::findModuleForSymbol(), getOrInsertFunction(), getSignature(), llvm::SparcTargetLowering::getSRetArgSize(), llvm::X86TargetLowering::getSSPStackGuardCheck(), hasReturnsTwiceAttr(), InsertSafepointPoll(), instrumentMaskedLoadOrStore(), isDirectCall(), isObjectDereferencedInBlock(), lowerGuardIntrinsic(), needsRuntimeRegistrationOfSectionRange(), llvm::MIRParserImpl::parseMachineFunction(), prepareForSplit(), replaceDevirtTrigger(), rewriteComdat(), llvm::JumpThreadingPass::runImpl(), llvm::ScalarEvolution::ScalarEvolution(), shouldKeepInEntry(), splitGlobals(), llvm::stripNonLineTableDebugInfo(), stripRegisterPrefix(), StripSymbolNames(), and llvm::InnerLoopVectorizer::widenInstruction().
|
inline |
Get the Module's list of functions (constant).
Definition at line 519 of file Module.h.
Referenced by llvm::AsmPrinter::doInitialization(), doPromotion(), llvm::Function::eraseFromParent(), getRetComponentType(), PushArgMD(), and llvm::CallGraph::removeFunctionFromModule().
|
inline |
|
inline |
Get the Module's list of global variables (constant).
Definition at line 510 of file Module.h.
Referenced by llvm::NVPTXAsmPrinter::doFinalization(), llvm::NVPTXAsmPrinter::doInitialization(), llvm::GlobalVariable::eraseFromParent(), llvm::GlobalVariable::GlobalVariable(), maybeSetDSOLocal(), OptimizeGlobalAddressOfMalloc(), llvm::GlobalVariable::removeFromParent(), llvm::WholeProgramDevirtPass::run(), SRAGlobal(), and TryToShrinkGlobalToBoolean().
|
inline |
|
inline |
Look up the specified global variable in the module symbol table.
If it does not exist, return null. If AllowInternal is set to true, this function will return types that have InternalLinkage. By default, these types are not returned.
Definition at line 380 of file Module.h.
Referenced by appendToUsedList(), llvm::collectUsedGlobalVariables(), llvm::MCJIT::findModuleForSymbol(), getGlobalVariable(), getNamedGlobal(), llvm::X86TargetLowering::getSDagStackGuard(), INITIALIZE_PASS(), instrumentMaskedLoadOrStore(), mergeConstants(), needsRuntimeRegistrationOfSectionRange(), rewriteComdat(), shouldKeepInEntry(), and StripSymbolNames().
| GlobalVariable * Module::getGlobalVariable | ( | StringRef | Name, |
| bool | AllowLocal | ||
| ) | const |
getGlobalVariable - Look up the specified global variable in the module symbol table.
If it does not exist, return null. The type argument should be the underlying type of the global, i.e., it should not have the top-level PointerType, which represents the address of the global. If AllowLocal is set to true, this function will return types that have an local. By default, these types are not returned.
Definition at line 187 of file Module.cpp.
References getNamedValue(), and Result.
|
inline |
Definition at line 386 of file Module.h.
References getGlobalVariable().
| std::vector< StructType * > Module::getIdentifiedStructTypes | ( | ) | const |
Definition at line 410 of file Module.cpp.
References llvm::TypeFinder::begin(), llvm::TypeFinder::end(), llvm::MipsISD::Ret, and llvm::TypeFinder::run().
Referenced by appendModuleInlineAsm(), and llvm::createEfficiencySanitizerPass().
|
inline |
Get the Module's list of ifuncs (constant).
Definition at line 536 of file Module.h.
Referenced by llvm::GlobalIFunc::eraseFromParent(), maybeSetDSOLocal(), llvm::GlobalIFunc::removeFromParent(), and llvm::GlobalAlias::setAliasee().
|
inline |
| unsigned Module::getInstructionCount | ( | ) |
Returns the number of non-debug IR instructions in the module.
This is equivalent to the sum of the IR instruction counts of each function contained in the module.
Definition at line 467 of file Module.cpp.
References F().
Referenced by llvm::PMDataManager::emitInstrCountChangedRemark(), getModuleIdentifier(), and llvm::PMDataManager::initSizeRemarkInfo().
|
inline |
Retrieves the GVMaterializer, if any, for this Module.
Definition at line 493 of file Module.h.
Referenced by isMaterialized().
Return a unique non-zero ID for the specified metadata kind.
getMDKindID - Return a unique non-zero ID for the specified metadata kind.
This ID is uniqued across modules in the current LLVMContext.
Definition at line 118 of file Module.cpp.
References llvm::LLVMContext::getMDKindID().
Referenced by appendModuleInlineAsm(), parseOptionalLinkageAux(), and llvm::UpgradeIntrinsicCall().
| void Module::getMDKindNames | ( | SmallVectorImpl< StringRef > & | Result | ) | const |
Populate client supplied SmallVector with the name for custom metadata IDs registered in this LLVMContext.
getMDKindNames - Populate client supplied SmallVector with the name for custom metadata IDs registered in this LLVMContext.
ID #0 is not used, so it is filled in as an empty string.
Definition at line 125 of file Module.cpp.
References llvm::LLVMContext::getMDKindNames().
Referenced by appendModuleInlineAsm().
Return the corresponding value if Key appears in module flags, otherwise return null.
Definition at line 302 of file Module.cpp.
References getModuleFlagsMetadata().
Referenced by llvm::createX86IndirectBranchTrackingPass(), llvm::AsmPrinter::doInitialization(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), llvm::X86TargetLowering::expandIndirectJTBranch(), getCodeViewFlag(), llvm::getDebugMetadataVersionFromModule(), getDwarfVersion(), getMOVL(), getNamedGlobal(), getNumberRegisterParameters(), getPICLevel(), getPIELevel(), getProfileSummary(), getRetpolineSymbol(), getRtLibUseGOT(), and llvm::TargetLibraryInfoImpl::getWCharSize().
| void Module::getModuleFlagsMetadata | ( | SmallVectorImpl< ModuleFlagEntry > & | Flags | ) | const |
Returns the module flags in the provided vector.
getModuleFlagsMetadata - Returns the module flags in the provided vector.
Definition at line 282 of file Module.cpp.
References getModuleFlagsMetadata(), isValidModFlagBehavior(), llvm::NamedMDNode::operands(), and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
Referenced by llvm::orc::cloneModuleFlagsMetadata(), llvm::TargetLoweringObjectFileELF::emitModuleMetadata(), GetObjCImageInfo(), hasConflictingReferenceFlags(), and llvm::UpgradeModuleFlags().
| NamedMDNode * Module::getModuleFlagsMetadata | ( | ) | const |
Returns the NamedMDNode in the module that represents module-level flags.
getModuleFlagsMetadata - Returns the NamedMDNode in the module that represents module-level flags.
This method returns null if there are no module-level flags.
Definition at line 315 of file Module.cpp.
References getNamedMetadata().
Referenced by getModuleFlag(), getModuleFlagsMetadata(), getNamedGlobal(), and isValidModFlagBehavior().
|
inline |
Get the module identifier which is, essentially, the name of the module.
Definition at line 208 of file Module.h.
References getInstructionCount().
Referenced by llvm::CloneModule(), llvm::createEfficiencySanitizerPass(), createRNG(), llvm::ThinLTOCodeGenerator::crossModuleImport(), llvm::FPPassManager::doFinalization(), llvm::FunctionImportGlobalProcessing::doImportAsDefinition(), doImportingForModule(), EmitCamlGlobal(), getDebugLocString(), GetGlobalTypeString(), llvm::ModuleSummaryIndex::hasExportedFunctions(), llvm::FunctionImporter::importFunctions(), instrumentMaskedLoadOrStore(), llvm::ThinLTOCodeGenerator::internalize(), llvm::LazyCallGraph::LazyCallGraph(), normalizePBQPSpillWeight(), llvm::DiagnosticPrinterRawOStream::operator<<(), llvm::ThinLTOCodeGenerator::promote(), rewriteComdat(), llvm::LazyCallGraphPrinterPass::run(), llvm::LazyCallGraphDOTPrinterPass::run(), llvm::VerifierSupport::VerifierSupport(), and WriteAsOperandInternal().
|
inline |
Get any module-scope inline assembly blocks.
Definition at line 246 of file Module.h.
References createRNG(), and P.
Referenced by llvm::buildModuleSummaryIndex(), llvm::CloneModule(), llvm::NVPTXAsmPrinter::doInitialization(), llvm::AsmPrinter::doInitialization(), llvm::ARMAsmPrinter::EmitStartOfAsmFile(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), getStringEncoding(), INITIALIZE_PASS(), initializeRecordStreamer(), WriteAsOperandInternal(), and llvm::BitcodeWriter::writeSymtab().
|
inline |
Get a short "name" for the module.
This is useful for debugging or logging. It is essentially a convenience wrapper around getModuleIdentifier().
Definition at line 225 of file Module.h.
Referenced by llvm::createHWAddressSanitizerPass(), extractAndClone(), getDescription(), llvm::getPGOFuncName(), instrumentMaskedLoadOrStore(), llvm::ProfileSummaryPrinterPass::run(), and llvm::ImportedFunctionsInliningStatistics::setModuleInfo().
| GlobalAlias * Module::getNamedAlias | ( | StringRef | Name | ) | const |
Return the global alias in the module with the specified name, of arbitrary type.
This method returns null if a global with the specified name is not found.
Definition at line 231 of file Module.cpp.
References getNamedValue().
Referenced by getNamedGlobal(), and rewriteComdat().
|
inline |
Return the global variable in the module with the specified name, of arbitrary type.
This method returns null if a global with the specified name is not found.
Definition at line 395 of file Module.h.
References getGlobalVariable().
Referenced by appendToGlobalArray(), createGlobalVariableI32(), llvm::NVPTXAsmPrinter::doInitialization(), llvm::orc::getConstructors(), llvm::orc::getDestructors(), getNamedGlobal(), getSignature(), INITIALIZE_PASS(), llvm::isIRPGOFlagSet(), llvm::TargetLowering::LowerToTLSEmulatedModel(), llvm::InstrProfiling::run(), and llvm::ExecutionEngine::runStaticConstructorsDestructors().
|
inline |
Definition at line 398 of file Module.h.
References addModuleFlag(), llvm::Module::ModuleFlagEntry::Behavior, eraseNamedMetadata(), getModuleFlag(), getModuleFlagsMetadata(), getNamedAlias(), getNamedGlobal(), getNamedIFunc(), getNamedMetadata(), getOrInsertComdat(), getOrInsertGlobal(), getOrInsertModuleFlagsMetadata(), getOrInsertNamedMetadata(), llvm::Module::ModuleFlagEntry::Key, setMaterializer(), and llvm::Module::ModuleFlagEntry::Val.
| GlobalIFunc * Module::getNamedIFunc | ( | StringRef | Name | ) | const |
Return the global ifunc in the module with the specified name, of arbitrary type.
This method returns null if a global with the specified name is not found.
Definition at line 235 of file Module.cpp.
References getNamedValue().
Referenced by getNamedGlobal().
|
inline |
|
inline |
| NamedMDNode * Module::getNamedMetadata | ( | const Twine & | Name | ) | const |
Return the first NamedMDNode in the module with the specified name.
getNamedMetadata - Return the first NamedMDNode in the module with the specified name.
This method returns null if a NamedMDNode with the specified name is not found.
Definition at line 242 of file Module.cpp.
References lookup(), and llvm::Twine::toStringRef().
Referenced by llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::CodeViewDebug::beginInstruction(), llvm::cacheAnnotationFromMD(), llvm::CodeViewDebug::CodeViewDebug(), llvm::createObjCARCContractPass(), debug_compile_units(), debug_compile_units_begin(), debug_compile_units_end(), llvm::AMDGPUAsmPrinter::doFinalization(), llvm::TargetLoweringObjectFileELF::emitModuleMetadata(), llvm::TargetLoweringObjectFileMachO::emitModuleMetadata(), llvm::TargetLoweringObjectFileCOFF::emitModuleMetadata(), llvm::AsmPrinter::EmitSpecialLLVMGlobal(), getModuleFlagsMetadata(), getNamedGlobal(), getSubprogram(), hasConflictingReferenceFlags(), mapArchToCVCPUType(), PushArgMD(), shouldKeepInEntry(), and llvm::UpgradeRetainReleaseMarker().
| GlobalValue * Module::getNamedValue | ( | StringRef | Name | ) | const |
Return the global value in the module with the specified name, of arbitrary type.
getNamedValue - Return the first global value in the module with the specified name, of arbitrary type.
This method returns null if a global with the specified name is not found.
Definition at line 112 of file Module.cpp.
References getValueSymbolTable(), and llvm::ValueSymbolTable::lookup().
Referenced by appendModuleInlineAsm(), llvm::buildModuleSummaryIndex(), llvm::coro::declaresIntrinsics(), llvm::RecordStreamer::flushSymverDirectives(), forceRenaming(), getComdatGVForCOFF(), llvm::TargetLoweringBase::getDefaultSafeStackPointerLocation(), getFunction(), getGlobalVariable(), getMinVisibility(), getNamedAlias(), getNamedIFunc(), getOrInsertFunction(), getOrInsertGlobal(), llvm::TargetLoweringBase::getSDagStackGuard(), hasConflictingReferenceFlags(), INITIALIZE_PASS(), llvm::AArch64InstrInfo::insertOutlinedCall(), llvm::X86InstrInfo::insertOutlinedCall(), llvm::TargetLoweringBase::insertSSPDeclarations(), isValidVariableType(), maybeSetDSOLocal(), llvm::objcarc::ModuleHasARC(), and llvm::LinkDiagnosticInfo::print().
| unsigned Module::getNumberRegisterParameters | ( | ) | const |
Returns the Number of Register ParametersDwarf Version by checking module flags.
Definition at line 445 of file Module.cpp.
References getModuleFlag().
Referenced by debug_compile_units().
| void Module::getOperandBundleTags | ( | SmallVectorImpl< StringRef > & | Result | ) | const |
Populate client supplied SmallVector with the bundle tags registered in this LLVMContext.
The bundle tags are ordered by increasing bundle IDs.
Definition at line 129 of file Module.cpp.
References llvm::LLVMContext::getOperandBundleTags().
Referenced by appendModuleInlineAsm().
Return the Comdat in the module with the specified name.
It is created if it didn't already exist.
Definition at line 474 of file Module.cpp.
References llvm::StringMap< ValueTy, AllocatorTy >::insert().
Referenced by canRenameComdat(), copyComdat(), createGlobalFwdRef(), createIRLevelProfileFlagVariable(), createPrivateNonConstGlobalForString(), llvm::createX86RetpolineThunksPass(), getNamedGlobal(), getOrCreateProfileComdat(), instrumentMaskedLoadOrStore(), needsRuntimeRegistrationOfSectionRange(), rewriteComdat(), and llvm::WholeProgramDevirtPass::run().
| Constant * Module::getOrInsertFunction | ( | StringRef | Name, |
| FunctionType * | T, | ||
| AttributeList | AttributeList | ||
| ) |
Look up the specified function in the module symbol table.
Four possibilities:
Definition at line 142 of file Module.cpp.
References llvm::Function::Create(), llvm::GlobalValue::ExternalLinkage, F(), llvm::ConstantExpr::getBitCast(), getNamedValue(), llvm::GlobalValue::getType(), llvm::PointerType::getUnqual(), llvm::Function::isIntrinsic(), llvm::iplist_impl< IntrusiveListT, TraitsT >::push_back(), and llvm::Function::setAttributes().
Referenced by appendModuleInlineAsm(), llvm::SanitizerStatReport::create(), createDummyFunction(), llvm::createEfficiencySanitizerPass(), createFree(), llvm::createHWAddressSanitizerPass(), createMalloc(), createPrivateNonConstGlobalForString(), CreatePrologue(), llvm::createSanitizerCtorAndInitFunctions(), llvm::createThreadSanitizerPass(), llvm::declareSanitizerInitFunction(), llvm::emitBinaryFloatFnCall(), llvm::emitCalloc(), llvm::emitFGetCUnlocked(), llvm::emitFGetSUnlocked(), llvm::emitFPutC(), llvm::emitFPutCUnlocked(), llvm::emitFPutS(), llvm::emitFPutSUnlocked(), llvm::emitFReadUnlocked(), llvm::emitFWrite(), llvm::emitFWriteUnlocked(), llvm::emitMalloc(), llvm::emitMemChr(), llvm::emitMemCmp(), llvm::emitMemCpyChk(), llvm::emitPutChar(), llvm::emitPutS(), llvm::emitStrChr(), llvm::emitStrCpy(), llvm::emitStrLen(), llvm::emitStrNCmp(), llvm::emitStrNCpy(), llvm::emitUnaryFloatFnCall(), EnsureFunctionExists(), llvm::SanitizerStatReport::finish(), fixupFPReturnAndCall(), llvm::objcarc::ARCRuntimeEntryPoints::get(), llvm::getCopyDeclaration(), llvm::AMDGPUIntrinsicInfo::getDeclaration(), llvm::Intrinsic::getDeclaration(), getDefaultPersonalityFn(), getOrInsertFunction(), llvm::AMDGPULibFunc::getOrInsertFunction(), getOrInsertValueProfilingCall(), getPow(), GetRMWLibcall(), llvm::TargetLoweringBase::getSafeStackPointerLocation(), INITIALIZE_PASS(), insertCall(), insertSinCosCall(), llvm::X86TargetLowering::insertSSPDeclarations(), insertUseHolderAfter(), instrumentMaskedLoadOrStore(), isReportingError(), makeStatepointExplicitImpl(), MarkBlocksLiveIn(), mayLoopAccessLocation(), PushArgMD(), ReplaceCallWith(), and shouldKeepInEntry().
| Constant * Module::getOrInsertFunction | ( | StringRef | Name, |
| FunctionType * | T | ||
| ) |
Definition at line 164 of file Module.cpp.
References getOrInsertFunction().
|
inline |
Look up the specified function in the module symbol table.
If it does not exist, add a prototype for the function and return it. This function guarantees to return a constant of pointer to the specified function type or a ConstantExpr BitCast of that type if the named function has a different type. This version of the method takes a list of function arguments, which makes it easier for clients to use.
Definition at line 352 of file Module.h.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, llvm::FunctionType::get(), and getOrInsertFunction().
|
inline |
Same as above, but without the attributes.
Definition at line 364 of file Module.h.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, getFunction(), and getOrInsertFunction().
Look up the specified global in the module symbol table.
getOrInsertGlobal - Look up the specified global in the module symbol table.
Definition at line 202 of file Module.cpp.
References llvm::GlobalValue::ExternalLinkage, llvm::PointerType::get(), llvm::ConstantExpr::getBitCast(), getNamedValue(), llvm::Type::getPointerAddressSpace(), and llvm::GlobalValue::getType().
Referenced by llvm::createHWAddressSanitizerPass(), llvm::TargetLoweringBase::getIRStackGuard(), getNamedGlobal(), INITIALIZE_PASS(), llvm::X86TargetLowering::insertSSPDeclarations(), instrumentMaskedLoadOrStore(), llvm::WholeProgramDevirtPass::run(), and StackMallocSizeClass().
| NamedMDNode * Module::getOrInsertModuleFlagsMetadata | ( | ) |
Returns the NamedMDNode in the module that represents module-level flags.
getOrInsertModuleFlagsMetadata - Returns the NamedMDNode in the module that represents module-level flags.
If module-level flags aren't found, it creates the named metadata that contains them.
Definition at line 322 of file Module.cpp.
References getOrInsertNamedMetadata().
Referenced by addModuleFlag(), and getNamedGlobal().
| NamedMDNode * Module::getOrInsertNamedMetadata | ( | StringRef | Name | ) |
Return the named MDNode in the module with the specified name.
getOrInsertNamedMetadata - Return the first named MDNode in the module with the specified name.
This method returns a new NamedMDNode if a NamedMDNode with the specified name is not found.
Definition at line 251 of file Module.cpp.
References llvm::iplist_impl< IntrusiveListT, TraitsT >::push_back().
Referenced by llvm::DIBuilder::createCompileUnit(), getNamedGlobal(), getOrInsertModuleFlagsMetadata(), and StripSymbolNames().
| PICLevel::Level Module::getPICLevel | ( | ) | const |
Returns the PIC level (small or large model)
Definition at line 480 of file Module.cpp.
References getModuleFlag(), and llvm::PICLevel::NotPIC.
Referenced by llvm::lto::Config::addSaveTemps(), debug_compile_units(), llvm::PPCTargetLowering::getPICJumpTableRelocBaseExpr(), getVCmpInst(), llvm::SparcTargetLowering::makeAddress(), and stripRegisterPrefix().
| PIELevel::Level Module::getPIELevel | ( | ) | const |
Returns the PIE level (small or large model)
Definition at line 494 of file Module.cpp.
References llvm::PIELevel::Default, and getModuleFlag().
Referenced by debug_compile_units(), llvm::TargetMachine::getTLSModel(), and llvm::TargetMachine::shouldAssumeDSOLocal().
| Metadata * Module::getProfileSummary | ( | ) |
Returns profile summary metadata.
Definition at line 512 of file Module.cpp.
References getModuleFlag().
Referenced by llvm::createSampleProfileLoaderPass(), debug_compile_units(), and getEntryForPercentile().
| bool Module::getRtLibUseGOT | ( | ) | const |
Returns true if PLT should be avoided for RTLib calls.
Definition at line 520 of file Module.cpp.
References getModuleFlag().
Referenced by llvm::X86Subtarget::classifyGlobalFunctionReference(), debug_compile_units(), llvm::inferLibFuncAttributes(), and llvm::TargetMachine::shouldAssumeDSOLocal().
|
inline |
Get the module's original source file name.
When compiling from bitcode, this is taken from a bitcode record where it was recorded. For other compiles it is the same as the ModuleID, which would contain the source file name.
Definition at line 219 of file Module.h.
Referenced by llvm::CloneModule(), llvm::AsmPrinter::doInitialization(), llvm::thinLTOInternalizeModule(), WriteAsOperandInternal(), and llvm::WriteIndexToFile().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
Get the target triple which is a string describing the target host.
Definition at line 238 of file Module.h.
Referenced by llvm::ModuleSymbolTable::addModule(), llvm::lto::Config::addSaveTemps(), llvm::GlobalValue::canIncreaseAlignment(), llvm::CloneModule(), llvm::ThinLTOCodeGenerator::codegen(), copyFeaturesToFunction(), llvm::createEfficiencySanitizerPass(), llvm::createHWAddressSanitizerPass(), createIRLevelProfileFlagVariable(), createPrivateNonConstGlobalForString(), CreateVarArgHelper(), llvm::ThinLTOCodeGenerator::crossModuleImport(), llvm::AMDGPUAAWrapperPass::doInitialization(), llvm::AMDGPU::getAMDGPUAS(), getDefaultPersonalityFn(), getOrCreateProfileComdat(), getStringEncoding(), llvm::LTOModule::getTargetTriple(), INITIALIZE_PASS(), insertSinCosCall(), instrumentMaskedLoadOrStore(), llvm::ThinLTOCodeGenerator::internalize(), isCallingConvCCompatible(), mapArchToCVCPUType(), mayLoopAccessLocation(), llvm::needsComdatForCounter(), needsRuntimeRegistrationOfSectionRange(), llvm::ThinLTOCodeGenerator::optimize(), llvm::ThinLTOCodeGenerator::promote(), llvm::InstrProfiling::run(), llvm::AMDGPUAA::run(), llvm::WholeProgramDevirtPass::run(), llvm::TargetLibraryAnalysis::run(), selectJumpTableArmEncoding(), shouldInstrumentReadWriteFromAddress(), WriteAsOperandInternal(), llvm::WriteBitcodeToFile(), and llvm::ValueSymbolTable::~ValueSymbolTable().
| StructType * Module::getTypeByName | ( | StringRef | Name | ) | const |
Return the type with the specified name, or null if there is none by that name.
Definition at line 509 of file Type.cpp.
References llvm::Type::getContext(), llvm::LLVMContextImpl::NamedStructTypes, and llvm::LLVMContext::pImpl.
Referenced by appendModuleInlineAsm().
|
inline |
Get the symbol table of global variable and function identifiers.
Definition at line 554 of file Module.h.
Referenced by createGlobalFwdRef(), llvm::createSampleProfileLoaderPass(), llvm::AMDGPULibFunc::getFunction(), getNamedValue(), and llvm::AMDGPULibFunc::getOrInsertFunction().
|
inline |
|
inline |
Definition at line 567 of file Module.h.
Referenced by llvm::CloneModule(), getMinVisibility(), globals(), LLVMGetFirstGlobal(), LLVMGetLastGlobal(), LLVMGetPreviousGlobal(), makeVisible(), mergeConstants(), OptimizeGlobalVars(), splitGlobals(), stripDeadPrototypes(), and StripSymbolNames().
|
inline |
|
inline |
Definition at line 571 of file Module.h.
Referenced by WriteAsOperandInternal().
|
inline |
Definition at line 569 of file Module.h.
Referenced by llvm::CloneModule(), getMinVisibility(), globals(), LLVMGetFirstGlobal(), LLVMGetLastGlobal(), LLVMGetNextGlobal(), makeVisible(), maybeSetDSOLocal(), mergeConstants(), OptimizeGlobalVars(), splitGlobals(), stripDeadPrototypes(), and StripSymbolNames().
|
inline |
|
inline |
Definition at line 655 of file Module.h.
References global_objects().
|
inline |
Definition at line 660 of file Module.h.
References global_objects().
|
inline |
Definition at line 658 of file Module.h.
References global_objects().
|
inline |
Definition at line 663 of file Module.h.
References global_objects().
|
inline |
Definition at line 648 of file Module.h.
References functions(), and globals().
Referenced by llvm::ExecutionEngine::clearGlobalMappingsFromModule(), global_object_begin(), global_object_end(), llvm::nameUnamedGlobals(), and llvm::WholeProgramDevirtPass::run().
|
inline |
Definition at line 651 of file Module.h.
References functions(), and globals().
|
inline |
Definition at line 682 of file Module.h.
References global_values().
|
inline |
Definition at line 685 of file Module.h.
References global_values().
|
inline |
Definition at line 683 of file Module.h.
References global_values().
|
inline |
Definition at line 688 of file Module.h.
References global_values().
|
inline |
Definition at line 674 of file Module.h.
References aliases(), functions(), globals(), and ifuncs().
Referenced by llvm::ModuleSymbolTable::addModule(), dropDeadSymbols(), llvm::RecordStreamer::flushSymverDirectives(), global_value_begin(), and global_value_end().
|
inline |
|
inline |
Definition at line 573 of file Module.h.
References global_begin(), global_end(), and llvm::make_range().
Referenced by llvm::CodeViewDebug::beginInstruction(), llvm::DwarfDebug::beginModule(), llvm::AsmPrinter::computeGlobalGOTEquivs(), llvm::AsmPrinter::doFinalization(), llvm::FunctionImportGlobalProcessing::doImportAsDefinition(), llvm::NVPTXAsmPrinter::doInitialization(), dropAllReferences(), eliminateAvailableExternally(), llvm::ExecutionEngine::emitGlobals(), llvm::filterDeadComdatFunctions(), findPartitions(), getStringEncoding(), llvm::WebAssemblyTargetMachine::getSubtargetImpl(), global_objects(), global_values(), INITIALIZE_PASS(), instrumentMaskedLoadOrStore(), isZeroLengthArray(), optimizeGlobalsInModule(), orderModule(), predictUseListOrder(), rewriteComdat(), llvm::TypeFinder::run(), llvm::WholeProgramDevirtPass::run(), llvm::stripNonLineTableDebugInfo(), StripSymbolNames(), llvm::UpgradeSectionAttributes(), llvm::ValueEnumerator::ValueEnumerator(), WriteAsOperandInternal(), and llvm::WriteIndexToFile().
|
inline |
Definition at line 576 of file Module.h.
References global_begin(), global_end(), and llvm::make_range().
|
inline |
|
inline |
|
inline |
Definition at line 629 of file Module.h.
Referenced by WriteAsOperandInternal().
|
inline |
|
inline |
|
inline |
Definition at line 631 of file Module.h.
References ifunc_begin(), ifunc_end(), and llvm::make_range().
Referenced by dropAllReferences(), global_values(), orderModule(), and WriteAsOperandInternal().
|
inline |
Definition at line 634 of file Module.h.
References ifunc_begin(), ifunc_end(), and llvm::make_range().
|
inline |
Definition at line 494 of file Module.h.
References getMaterializer(), materialize(), materializeAll(), and materializeMetadata().
Referenced by llvm::Value::assertModuleIsMaterializedImpl(), llvm::BitcodeWriter::writeModule(), and llvm::BitcodeWriter::writeThinLinkBitcode().
|
static |
Checks if Metadata represents a valid ModFlagBehavior, and stores the converted result in MFB.
Definition at line 269 of file Module.cpp.
References getModuleFlagsMetadata(), ModFlagBehaviorFirstVal, and ModFlagBehaviorLastVal.
Referenced by getModuleFlagsMetadata(), and hasConflictingReferenceFlags().
| Error Module::materialize | ( | GlobalValue * | GV | ) |
Make sure the GlobalValue is fully read.
Definition at line 386 of file Module.cpp.
References llvm::Error::success().
Referenced by isMaterialized(), and llvm::GlobalValue::materialize().
| Error Module::materializeAll | ( | ) |
Make sure all GlobalValues in this Module are fully read and clear the Materializer.
Definition at line 393 of file Module.cpp.
References llvm::Error::success().
Referenced by llvm::MCJIT::emitObject(), and isMaterialized().
| Error Module::materializeMetadata | ( | ) |
Definition at line 400 of file Module.cpp.
References llvm::Error::success().
Referenced by isMaterialized().
|
inline |
Definition at line 709 of file Module.h.
References llvm::make_range(), named_metadata_begin(), and named_metadata_end().
Referenced by llvm::ValueEnumerator::print(), and rotateSign().
|
inline |
Definition at line 712 of file Module.h.
References llvm::make_range(), named_metadata_begin(), and named_metadata_end().
|
inline |
Definition at line 696 of file Module.h.
Referenced by named_metadata(), llvm::StripDebugInfo(), and llvm::stripNonLineTableDebugInfo().
|
inline |
|
inline |
Definition at line 707 of file Module.h.
Referenced by rotateSign().
|
inline |
Definition at line 701 of file Module.h.
Referenced by named_metadata(), llvm::StripDebugInfo(), and llvm::stripNonLineTableDebugInfo().
|
inline |
| void Module::print | ( | raw_ostream & | OS, |
| AssemblyAnnotationWriter * | AAW, | ||
| bool | ShouldPreserveUseListOrder = false, |
||
| bool | IsForDebug = false |
||
| ) | const |
Print the module to an output stream with an optional AssemblyAnnotationWriter.
If ShouldPreserveUseListOrder, then include uselistorder directives so that use-lists can be recreated when reading the assembly.
Definition at line 3983 of file AsmWriter.cpp.
References llvm::RISCVFenceField::W.
Referenced by debug_compile_units(), llvm::operator<<(), llvm::yaml::BlockScalarTraits< Module >::output(), and llvm::PrintModulePass::run().
|
inline |
Definition at line 588 of file Module.h.
Referenced by predictUseListOrder().
|
inline |
|
inline |
Definition at line 590 of file Module.h.
Referenced by predictUseListOrder().
|
inline |
| void Module::setDataLayout | ( | StringRef | Desc | ) |
Set the data layout.
Definition at line 355 of file Module.cpp.
References llvm::DataLayout::reset().
Referenced by llvm::orc::LLJIT::applyDataLayout(), LLVMTargetMachineEmit(), and setSourceFileName().
| void Module::setDataLayout | ( | const DataLayout & | Other | ) |
Definition at line 359 of file Module.cpp.
| void Module::setMaterializer | ( | GVMaterializer * | GVM | ) |
Sets the GVMaterializer to GVM.
This module must not yet have a Materializer. To reset the materializer for a module that already has one, call materializeAll first. Destroying this module will destroy its materializer without materializing any more GlobalValues. Without destroying the Module, there is no way to detach or destroy a materializer without materializing all the GVs it controls, to avoid leaving orphan unmaterialized GVs.
Definition at line 379 of file Module.cpp.
References assert().
Referenced by llvm::getBitcodeFileContents(), and getNamedGlobal().
|
inline |
|
inline |
Set the module-scope inline assembly blocks.
A trailing newline is added if the input doesn't have one.
Definition at line 285 of file Module.h.
References llvm::HexStyle::Asm.
Referenced by INITIALIZE_PASS(), and makeVisible().
| void Module::setOwnedMemoryBuffer | ( | std::unique_ptr< MemoryBuffer > | MB | ) |
Take ownership of the given memory buffer.
Definition at line 516 of file Module.cpp.
Referenced by debug_compile_units().
| void Module::setPICLevel | ( | PICLevel::Level | PL | ) |
Set the PIC level (small or large model)
Definition at line 490 of file Module.cpp.
References addModuleFlag().
Referenced by debug_compile_units().
| void Module::setPIELevel | ( | PIELevel::Level | PL | ) |
Set the PIE level (small or large model)
Definition at line 504 of file Module.cpp.
References addModuleFlag().
Referenced by debug_compile_units().
| void Module::setProfileSummary | ( | Metadata * | M | ) |
Attach profile summary metadata to this module.
Definition at line 508 of file Module.cpp.
References addModuleFlag(), and llvm::Error.
Referenced by llvm::createSampleProfileLoaderPass(), and debug_compile_units().
| void Module::setRtLibUseGOT | ( | ) |
Set that PLT should be avoid for RTLib calls.
Definition at line 525 of file Module.cpp.
References addModuleFlag().
Referenced by debug_compile_units().
|
inline |
Set the module's original source file name.
Definition at line 274 of file Module.h.
References Other, and setDataLayout().
|
inline |
Set the target triple.
Definition at line 281 of file Module.h.
References T.
Referenced by llvm::lto::Config::addSaveTemps(), and llvm::LTOModule::setTargetTriple().
|
inline |
Return true if size-info optimization remark is enabled, false otherwise.
Definition at line 261 of file Module.h.
References getContext(), llvm::LLVMContext::getDiagHandlerPtr(), and llvm::DiagnosticHandler::isAnalysisRemarkEnabled().
Referenced by llvm::FPPassManager::doFinalization(), llvm::AnalysisResolver::findImplPass(), llvm::LPPassManager::runOnFunction(), and llvm::FPPassManager::runOnFunction().
|
inline |
Definition at line 592 of file Module.h.
Referenced by llvm::PhysicalRegisterUsageInfo::doInitialization(), findPartitions(), and hasProfileData().
1.8.13