LLVM 17.0.0git
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
llvm::AccelTableBase Class Reference

A base class holding non-template-dependant functionality of the AccelTable class. More...

#include "llvm/CodeGen/AccelTable.h"

Inheritance diagram for llvm::AccelTableBase:
Inheritance graph
Collaboration diagram for llvm::AccelTableBase:
Collaboration graph


struct  HashData
 Represents a group of entries with identical name (and hence, hash value). More...

Public Types

using HashFn = uint32_t(StringRef)
using HashList = std::vector< HashData * >
using BucketList = std::vector< HashList >

Public Member Functions

void finalize (AsmPrinter *Asm, StringRef Prefix)
ArrayRef< HashListgetBuckets () const
uint32_t getBucketCount () const
uint32_t getUniqueHashCount () const
uint32_t getUniqueNameCount () const
void print (raw_ostream &OS) const
void dump () const
 AccelTableBase (const AccelTableBase &)=delete
void operator= (const AccelTableBase &)=delete

Protected Types

using StringEntries = StringMap< HashData, BumpPtrAllocator & >

Protected Member Functions

void computeBucketCount ()
 AccelTableBase (HashFn *Hash)

Protected Attributes

BumpPtrAllocator Allocator
 Allocator for HashData and Values.
StringEntries Entries
uint32_t BucketCount
uint32_t UniqueHashCount
HashList Hashes
BucketList Buckets

Detailed Description

A base class holding non-template-dependant functionality of the AccelTable class.

Clients should not use this class directly but rather instantiate AccelTable with a type derived from AccelTableData.

Definition at line 134 of file AccelTable.h.

Member Typedef Documentation

◆ BucketList

Definition at line 154 of file AccelTable.h.

◆ HashFn

Definition at line 136 of file AccelTable.h.

◆ HashList

using llvm::AccelTableBase::HashList = std::vector<HashData *>

Definition at line 153 of file AccelTable.h.

◆ StringEntries

Definition at line 160 of file AccelTable.h.

Constructor & Destructor Documentation

◆ AccelTableBase() [1/2]

llvm::AccelTableBase::AccelTableBase ( HashFn Hash)

Definition at line 172 of file AccelTable.h.

◆ AccelTableBase() [2/2]

llvm::AccelTableBase::AccelTableBase ( const AccelTableBase )

Member Function Documentation

◆ computeBucketCount()

void AccelTableBase::computeBucketCount ( )

Definition at line 33 of file AccelTable.cpp.

References llvm::array_pod_sort(), BucketCount, E, Entries, P, llvm::StringMapImpl::size(), and UniqueHashCount.

Referenced by finalize().

◆ dump()

void llvm::AccelTableBase::dump ( ) const

Definition at line 183 of file AccelTable.h.

References llvm::dbgs(), and print().

◆ finalize()

void AccelTableBase::finalize ( AsmPrinter Asm,
StringRef  Prefix 

◆ getBucketCount()

uint32_t llvm::AccelTableBase::getBucketCount ( ) const

Definition at line 177 of file AccelTable.h.

References BucketCount.

◆ getBuckets()

ArrayRef< HashList > llvm::AccelTableBase::getBuckets ( ) const

Definition at line 176 of file AccelTable.h.

References Buckets.

◆ getUniqueHashCount()

uint32_t llvm::AccelTableBase::getUniqueHashCount ( ) const

Definition at line 178 of file AccelTable.h.

References UniqueHashCount.

◆ getUniqueNameCount()

uint32_t llvm::AccelTableBase::getUniqueNameCount ( ) const

Definition at line 179 of file AccelTable.h.

References Entries, and llvm::StringMapImpl::size().

◆ operator=()

void llvm::AccelTableBase::operator= ( const AccelTableBase )

◆ print()

void AccelTableBase::print ( raw_ostream OS) const

Definition at line 660 of file AccelTable.cpp.

References E, and OS.

Referenced by dump().

Member Data Documentation

◆ Allocator

BumpPtrAllocator llvm::AccelTableBase::Allocator

Allocator for HashData and Values.

Definition at line 158 of file AccelTable.h.

◆ BucketCount

uint32_t llvm::AccelTableBase::BucketCount

Definition at line 164 of file AccelTable.h.

Referenced by computeBucketCount(), finalize(), and getBucketCount().

◆ Buckets

BucketList llvm::AccelTableBase::Buckets

Definition at line 168 of file AccelTable.h.

Referenced by finalize(), and getBuckets().

◆ Entries

StringEntries llvm::AccelTableBase::Entries

Definition at line 161 of file AccelTable.h.

Referenced by computeBucketCount(), finalize(), and getUniqueNameCount().

◆ Hash

HashFn* llvm::AccelTableBase::Hash

Definition at line 163 of file AccelTable.h.

◆ Hashes

HashList llvm::AccelTableBase::Hashes

Definition at line 167 of file AccelTable.h.

◆ UniqueHashCount

uint32_t llvm::AccelTableBase::UniqueHashCount

Definition at line 165 of file AccelTable.h.

Referenced by computeBucketCount(), and getUniqueHashCount().

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