LLVM 22.0.0git
|
Class for storing and accessing the MIR2Vec vocabulary. More...
#include "llvm/CodeGen/MIR2Vec.h"
Public Types | |
using | const_iterator = ir2vec::VocabStorage::const_iterator |
Public Member Functions | |
unsigned | getCanonicalIndexForBaseName (StringRef BaseName) const |
Get canonical index for base name (public for testing) | |
std::string | getStringKey (unsigned Pos) const |
Get the string key for a vocabulary entry at the given position. | |
MIRVocabulary ()=delete | |
MIRVocabulary (VocabMap &&Entries, const TargetInstrInfo *TII) | |
MIRVocabulary (ir2vec::VocabStorage &&Storage, const TargetInstrInfo &TII) | |
bool | isValid () const |
unsigned | getDimension () const |
const Embedding & | operator[] (unsigned Opcode) const |
const_iterator | begin () const |
const_iterator | end () const |
size_t | getCanonicalSize () const |
Total number of entries in the vocabulary. |
Static Public Member Functions | |
static std::string | extractBaseOpcodeName (StringRef InstrName) |
Static method for extracting base opcode names (public for testing) |
Friends | |
class | llvm::MIR2VecVocabLegacyAnalysis |
Class for storing and accessing the MIR2Vec vocabulary.
The MIRVocabulary class manages seed embeddings for LLVM Machine IR
|
delete |
MIRVocabulary::MIRVocabulary | ( | VocabMap && | Entries, |
const TargetInstrInfo * | TII ) |
Definition at line 51 of file MIR2Vec.cpp.
References assert().
|
inline |
Definition at line 97 of file MIR2Vec.h.
References llvm::move().
|
inline |
|
inline |
|
static |
Static method for extracting base opcode names (public for testing)
Definition at line 70 of file MIR2Vec.cpp.
References assert(), llvm::StringRef::back(), llvm::StringRef::drop_back(), llvm::StringRef::empty(), llvm::Regex::match(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::StringRef::str().
Get canonical index for base name (public for testing)
Definition at line 100 of file MIR2Vec.cpp.
References assert(), and llvm::StringRef::str().
|
inline |
|
inline |
std::string MIRVocabulary::getStringKey | ( | unsigned | Pos | ) | const |
Get the string key for a vocabulary entry at the given position.
Definition at line 115 of file MIR2Vec.cpp.
References assert(), isValid(), and llvm_unreachable.
|
inline |
Definition at line 100 of file MIR2Vec.h.
Referenced by begin(), end(), getCanonicalSize(), getDimension(), getStringKey(), and operator[]().
|
friend |