LLVM  10.0.0svn
Public Types | Public Member Functions | Friends | List of all members
llvm::InformationCache Struct Reference

Data structure to hold cached (LLVM-IR) information. More...

#include "llvm/Transforms/IPO/Attributor.h"

Public Types

using OpcodeInstMapTy = DenseMap< unsigned, SmallVector< Instruction *, 32 > >
 A map type from opcodes to instructions with this opcode. More...
 
using InstructionVectorTy = std::vector< Instruction * >
 A vector type to hold instructions. More...
 

Public Member Functions

 InformationCache (const Module &M, AnalysisGetter &AG)
 
OpcodeInstMapTygetOpcodeInstMapForFunction (const Function &F)
 Return the map that relates "interesting" opcodes with all instructions with that opcode in F. More...
 
InstructionVectorTygetReadOrWriteInstsForFunction (const Function &F)
 Return the instructions in F that may read or write memory. More...
 
MustBeExecutedContextExplorergetMustBeExecutedContextExplorer ()
 Return MustBeExecutedContextExplorer. More...
 
TargetLibraryInfogetTargetLibraryInfoForFunction (const Function &F)
 Return TargetLibraryInfo for function F. More...
 
AAResultsgetAAResultsForFunction (const Function &F)
 Return AliasAnalysis Result for function F. More...
 
unsigned getSccSize (const Function &F)
 Return SCC size on call graph for function F. More...
 
const DataLayoutgetDL ()
 Return datalayout used in the module. More...
 

Friends

struct Attributor
 Give the Attributor access to the members so Attributor::identifyDefaultAbstractAttributes(...) can initialize them. More...
 

Detailed Description

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 597 of file Attributor.h.

Member Typedef Documentation

◆ InstructionVectorTy

A vector type to hold instructions.

Definition at line 623 of file Attributor.h.

◆ OpcodeInstMapTy

A map type from opcodes to instructions with this opcode.

Definition at line 614 of file Attributor.h.

Constructor & Destructor Documentation

◆ InformationCache()

llvm::InformationCache::InformationCache ( const Module M,
AnalysisGetter AG 
)
inline

Member Function Documentation

◆ getAAResultsForFunction()

AAResults* llvm::InformationCache::getAAResultsForFunction ( const Function F)
inline

Return AliasAnalysis Result for function F.

Definition at line 641 of file Attributor.h.

References F().

Referenced by llvm::IRPosition::getAttrs().

◆ getDL()

const DataLayout& llvm::InformationCache::getDL ( )
inline

Return datalayout used in the module.

Definition at line 653 of file Attributor.h.

Referenced by llvm::IRPosition::getAttrs().

◆ getMustBeExecutedContextExplorer()

MustBeExecutedContextExplorer& llvm::InformationCache::getMustBeExecutedContextExplorer ( )
inline

Return MustBeExecutedContextExplorer.

Definition at line 631 of file Attributor.h.

Referenced by llvm::IRPosition::getAttrs().

◆ 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 618 of file Attributor.h.

References F().

Referenced by llvm::IRPosition::getAttrs().

◆ getReadOrWriteInstsForFunction()

InstructionVectorTy& llvm::InformationCache::getReadOrWriteInstsForFunction ( const Function F)
inline

Return the instructions in F that may read or write memory.

Definition at line 626 of file Attributor.h.

References F().

◆ getSccSize()

unsigned llvm::InformationCache::getSccSize ( const Function F)
inline

Return SCC size on call graph for function F.

Definition at line 646 of file Attributor.h.

Referenced by llvm::IRPosition::getAttrs().

◆ getTargetLibraryInfoForFunction()

TargetLibraryInfo* llvm::InformationCache::getTargetLibraryInfoForFunction ( const Function F)
inline

Return TargetLibraryInfo for function F.

Definition at line 636 of file Attributor.h.

References F().

Referenced by llvm::IRPosition::getAttrs().

Friends And Related Function Documentation

◆ Attributor

friend struct Attributor
friend

Give the Attributor access to the members so Attributor::identifyDefaultAbstractAttributes(...) can initialize them.

Definition at line 683 of file Attributor.h.


The documentation for this struct was generated from the following file: