LLVM  13.0.0git
Classes | Public Types | Public Member Functions | List of all members
llvm::ConstantUniqueMap< ConstantClass > Class Template Reference

#include "llvm/IR/InlineAsm.h"

Inheritance diagram for llvm::ConstantUniqueMap< ConstantClass >:
Inheritance graph
[legend]

Public Types

using ValType = typename ConstantInfo< ConstantClass >::ValType
 
using TypeClass = typename ConstantInfo< ConstantClass >::TypeClass
 
using LookupKey = std::pair< TypeClass *, ValType >
 
using LookupKeyHashed = std::pair< unsigned, LookupKey >
 Key and hash together, so that we compute the hash only once and reuse it. More...
 
using MapTy = DenseSet< ConstantClass *, MapInfo >
 

Public Member Functions

MapTy::iterator begin ()
 
MapTy::iterator end ()
 
void freeConstants ()
 
ConstantClass * getOrCreate (TypeClass *Ty, ValType V)
 Return the specified constant from the map, creating it if necessary. More...
 
void remove (ConstantClass *CP)
 Remove this constant from the map. More...
 
ConstantClass * replaceOperandsInPlace (ArrayRef< Constant * > Operands, ConstantClass *CP, Value *From, Constant *To, unsigned NumUpdated=0, unsigned OperandNo=~0u)
 
void dump () const
 
void freeConstants ()
 

Detailed Description

template<class ConstantClass>
class llvm::ConstantUniqueMap< ConstantClass >

Definition at line 29 of file InlineAsm.h.

Member Typedef Documentation

◆ LookupKey

template<class ConstantClass >
using llvm::ConstantUniqueMap< ConstantClass >::LookupKey = std::pair<TypeClass *, ValType>

Definition at line 651 of file ConstantsContext.h.

◆ LookupKeyHashed

template<class ConstantClass >
using llvm::ConstantUniqueMap< ConstantClass >::LookupKeyHashed = std::pair<unsigned, LookupKey>

Key and hash together, so that we compute the hash only once and reuse it.

Definition at line 654 of file ConstantsContext.h.

◆ MapTy

template<class ConstantClass >
using llvm::ConstantUniqueMap< ConstantClass >::MapTy = DenseSet<ConstantClass *, MapInfo>

Definition at line 699 of file ConstantsContext.h.

◆ TypeClass

template<class ConstantClass >
using llvm::ConstantUniqueMap< ConstantClass >::TypeClass = typename ConstantInfo<ConstantClass>::TypeClass

Definition at line 650 of file ConstantsContext.h.

◆ ValType

template<class ConstantClass >
using llvm::ConstantUniqueMap< ConstantClass >::ValType = typename ConstantInfo<ConstantClass>::ValType

Definition at line 649 of file ConstantsContext.h.

Member Function Documentation

◆ begin()

template<class ConstantClass >
MapTy::iterator llvm::ConstantUniqueMap< ConstantClass >::begin ( )
inline

Definition at line 705 of file ConstantsContext.h.

◆ dump()

template<class ConstantClass >
void llvm::ConstantUniqueMap< ConstantClass >::dump ( ) const
inline

Definition at line 778 of file ConstantsContext.h.

◆ end()

template<class ConstantClass >
MapTy::iterator llvm::ConstantUniqueMap< ConstantClass >::end ( )
inline

Definition at line 706 of file ConstantsContext.h.

◆ freeConstants() [1/2]

template<class ConstantClass >
void llvm::ConstantUniqueMap< ConstantClass >::freeConstants ( )
inline

Definition at line 708 of file ConstantsContext.h.

Referenced by llvm::LLVMContextImpl::~LLVMContextImpl().

◆ freeConstants() [2/2]

void llvm::ConstantUniqueMap< InlineAsm >::freeConstants ( )
inline

Definition at line 783 of file ConstantsContext.h.

◆ getOrCreate()

template<class ConstantClass >
ConstantClass* llvm::ConstantUniqueMap< ConstantClass >::getOrCreate ( TypeClass Ty,
ValType  V 
)
inline

Return the specified constant from the map, creating it if necessary.

Hash once, and reuse it for the lookup and the insertion if needed.

Definition at line 725 of file ConstantsContext.h.

Referenced by llvm::ConstantArray::get(), and llvm::ConstantVector::get().

◆ remove()

template<class ConstantClass >
void llvm::ConstantUniqueMap< ConstantClass >::remove ( ConstantClass *  CP)
inline

Remove this constant from the map.

Definition at line 743 of file ConstantsContext.h.

Referenced by llvm::ConstantUniqueMap< llvm::ConstantExpr >::replaceOperandsInPlace().

◆ replaceOperandsInPlace()

template<class ConstantClass >
ConstantClass* llvm::ConstantUniqueMap< ConstantClass >::replaceOperandsInPlace ( ArrayRef< Constant * >  Operands,
ConstantClass *  CP,
Value From,
Constant To,
unsigned  NumUpdated = 0,
unsigned  OperandNo = ~0u 
)
inline

Hash once, and reuse it for the lookup and the insertion if needed.

Definition at line 750 of file ConstantsContext.h.


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