LLVM: llvm::InformationCache Struct Reference (original) (raw)
Data structure to hold cached (LLVM-IR) information. More...
#include "[llvm/Transforms/IPO/Attributor.h](Attributor%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| InformationCache (const Module &M, AnalysisGetter &AG, BumpPtrAllocator &Allocator, SetVector< Function * > *CGSCC, bool UseExplorer=true) | |
| virtual | ~InformationCache () |
| OpcodeInstMapTy & | getOpcodeInstMapForFunction (const Function &F) |
| Return the map that relates "interesting" opcodes with all instructions with that opcode in F. | |
| InstructionVectorTy & | getReadOrWriteInstsForFunction (const Function &F) |
| Return the instructions in F that may read or write memory. | |
| MustBeExecutedContextExplorer * | getMustBeExecutedContextExplorer () |
| Return [MustBeExecutedContextExplorer](structllvm%5F1%5F1MustBeExecutedContextExplorer.html "A "must be executed context" for a given program point PP is the set of instructions,..."). | |
| TargetLibraryInfo * | getTargetLibraryInfoForFunction (const Function &F) |
| Return TargetLibraryInfo for function F. | |
| bool | isKernel (const Function &F) |
| Return true if F has the "kernel" function attribute. | |
| bool | isInvolvedInMustTailCall (const Argument &Arg) |
| Return true if Arg is involved in a must-tail call, thus the argument of the caller or callee. | |
| bool | isOnlyUsedByAssume (const Instruction &I) const |
| void | invalidateAnalyses () |
| Invalidates the cached analyses. | |
| template | |
| AP::Result * | getAnalysisResultForFunction (const Function &F, bool CachedOnly=false) |
| Return the analysis result from a pass AP for function F. | |
| const DataLayout & | getDL () |
| Return datalayout used in the module. | |
| const RetainedKnowledgeMap & | getKnowledgeMap () const |
| Return the map conaining all the knowledge we have from llvm.assumes. | |
| const AA::InstExclusionSetTy * | getOrCreateUniqueBlockExecutionSet (const AA::InstExclusionSetTy *BES) |
| Given BES, return a uniqued version. | |
| bool | stackIsAccessibleByOtherThreads () |
| Return true if the stack (llvm::Alloca) can be accessed by other threads. | |
| bool | targetIsGPU () |
| Return true if the target is a GPU. | |
| LLVM_ABI ArrayRef< Function * > | getIndirectlyCallableFunctions (Attributor &A) const |
| Return all functions that might be called indirectly, only valid for closed world modules (see isClosedWorldModule). | |
| LLVM_ABI std::optional< unsigned > | getFlatAddressSpace () const |
| Return the flat address space if the associated target has. | |
| virtual unsigned | getMaxAddrSpace () const |
| Static Public Member Functions | |
|---|---|
| template | |
| static void | foreachUse (Function &F, CBTy CB, bool LookThroughConstantExprUses=true) |
| Apply CB to all uses of F. |
| Friends | |
|---|---|
| struct | Attributor |
| Give the Attributor access to the members so Attributor::identifyDefaultAbstractAttributes(...) can initialize them. |
Data structure to hold cached (LLVM-IR) information.
All attributes are given an InformationCache object at creation time to avoid inspection of the IR by all of them individually. This default InformationCache will hold information required by 'default' attributes, thus the ones deduced when Attributor::identifyDefaultAbstractAttributes(..) is called.
If custom abstract attributes, registered manually through Attributor::registerAA(...), need more information, especially if it is not reusable, it is advised to inherit from the InformationCache and cast the instance down in the abstract attributes.
Definition at line 1210 of file Attributor.h.
◆ InstructionVectorTy
A vector type to hold instructions.
Definition at line 1272 of file Attributor.h.
◆ OpcodeInstMapTy
A map type from opcodes to instructions with this opcode.
Definition at line 1275 of file Attributor.h.
◆ ~InformationCache()
| virtual llvm::InformationCache::~InformationCache ( ) | inlinevirtual |
|---|
◆ foreachUse()
template
| void llvm::InformationCache::foreachUse ( Function & F, CBTy CB, bool LookThroughConstantExprUses = true ) | inlinestatic |
|---|
◆ getAnalysisResultForFunction()
template
| AP::Result * llvm::InformationCache::getAnalysisResultForFunction ( const Function & F, bool CachedOnly = false ) | inline |
|---|
◆ getDL()
Return datalayout used in the module.
Definition at line 1327 of file Attributor.h.
◆ getFlatAddressSpace()
| std::optional< unsigned > InformationCache::getFlatAddressSpace | ( | ) | const |
|---|
Return the flat address space if the associated target has.
Definition at line 3297 of file Attributor.cpp.
◆ getIndirectlyCallableFunctions()
Return all functions that might be called indirectly, only valid for closed world modules (see isClosedWorldModule).
Definition at line 3292 of file Attributor.cpp.
References A(), assert(), and Attributor.
◆ getKnowledgeMap()
◆ getMaxAddrSpace()
| virtual unsigned llvm::InformationCache::getMaxAddrSpace ( ) const | inlinevirtual |
|---|
◆ getMustBeExecutedContextExplorer()
◆ getOpcodeInstMapForFunction()
| OpcodeInstMapTy & llvm::InformationCache::getOpcodeInstMapForFunction ( const Function & F) | inline |
|---|
Return the map that relates "interesting" opcodes with all instructions with that opcode in F.
Definition at line 1279 of file Attributor.h.
References F.
◆ getOrCreateUniqueBlockExecutionSet()
◆ getReadOrWriteInstsForFunction()
| InstructionVectorTy & llvm::InformationCache::getReadOrWriteInstsForFunction ( const Function & F) | inline |
|---|
Return the instructions in F that may read or write memory.
Definition at line 1284 of file Attributor.h.
References F.
◆ getTargetLibraryInfoForFunction()
◆ invalidateAnalyses()
| void llvm::InformationCache::invalidateAnalyses ( ) | inline |
|---|
Invalidates the cached analyses.
Valid only when using the new pass manager.
Definition at line 1317 of file Attributor.h.
◆ isInvolvedInMustTailCall()
◆ isKernel()
Return true if F has the "kernel" function attribute.
Definition at line 1299 of file Attributor.h.
References F.
◆ isOnlyUsedByAssume()
◆ stackIsAccessibleByOtherThreads()
| bool llvm::InformationCache::stackIsAccessibleByOtherThreads ( ) | inline |
|---|
◆ targetIsGPU()
| bool llvm::InformationCache::targetIsGPU ( ) | inline |
|---|
◆ Attributor
◆ CGSCC
The documentation for this struct was generated from the following files:
- include/llvm/Transforms/IPO/Attributor.h
- lib/Transforms/IPO/Attributor.cpp