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 DataLayout &DL)
 
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...
 

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

Member Typedef Documentation

◆ InstructionVectorTy

A vector type to hold instructions.

Definition at line 513 of file Attributor.h.

◆ OpcodeInstMapTy

A map type from opcodes to instructions with this opcode.

Definition at line 504 of file Attributor.h.

Constructor & Destructor Documentation

◆ InformationCache()

llvm::InformationCache::InformationCache ( const DataLayout DL)
inline

Definition at line 501 of file Attributor.h.

Member Function Documentation

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

References F().

Referenced by AAReturnedValuesImpl::initialize().

◆ getReadOrWriteInstsForFunction()

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

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

Definition at line 516 of file Attributor.h.

References F().

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


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