LLVM 24.0.0git
llvm::mir2vec Namespace Reference

Classes

class  MIREmbedder
 Base class for MIR embedders. More...
class  MIRVocabulary
 Class for storing and accessing the MIR2Vec vocabulary. More...
class  SymbolicMIREmbedder
 Class for computing Symbolic embeddings Symbolic embeddings are constructed based on the entity-level representations obtained from the MIR Vocabulary. More...

Typedefs

using Embedding = ir2vec::Embedding
using MachineInstEmbeddingsMap = DenseMap<const MachineInstr *, Embedding>
using MachineBlockEmbeddingsMap

Functions

cl::OptionCategory MIR2VecCategory ("MIR2Vec Options")

Variables

LLVM_ABI llvm::cl::OptionCategory MIR2VecCategory
static cl::opt< std::string > VocabFile ("mir2vec-vocab-path", cl::desc("Path to the vocabulary file for MIR2Vec"), cl::init(""), cl::cat(MIR2VecCategory))
static cl::opt< float > OpcWeight ("mir2vec-opc-weight", cl::init(1.0), cl::desc("Weight for machine opcode embeddings"), cl::cat(MIR2VecCategory))
static cl::opt< float > CommonOperandWeight ("mir2vec-common-operand-weight", cl::init(1.0), cl::desc("Weight for common operand embeddings"), cl::cat(MIR2VecCategory))
static cl::opt< float > RegOperandWeight ("mir2vec-reg-operand-weight", cl::init(1.0), cl::desc("Weight for register operand embeddings"), cl::cat(MIR2VecCategory))
cl::opt< MIR2VecKind > MIR2VecEmbeddingKind ("mir2vec-kind", cl::values(clEnumValN(MIR2VecKind::Symbolic, "symbolic", "Generate symbolic embeddings for MIR")), cl::init(MIR2VecKind::Symbolic), cl::desc("MIR2Vec embedding kind"), cl::cat(MIR2VecCategory))
static cl::opt< bool > PrintAllVocabEntries ("mir2vec-print-all-vocab-entries", cl::init(false), cl::desc("Print all vocabulary entries including zero embeddings"), cl::cat(MIR2VecCategory))

Typedef Documentation

◆ Embedding

Definition at line 79 of file MIR2Vec.h.

◆ MachineBlockEmbeddingsMap

◆ MachineInstEmbeddingsMap

Function Documentation

◆ MIR2VecCategory()

cl::OptionCategory llvm::mir2vec::MIR2VecCategory ( "MIR2Vec Options" )

Variable Documentation

◆ CommonOperandWeight

cl::opt< float > llvm::mir2vec::CommonOperandWeight("mir2vec-common-operand-weight", cl::init(1.0), cl::desc("Weight for common operand embeddings"), cl::cat(MIR2VecCategory)) ( "mir2vec-common-operand-weight" ,
cl::init(1.0) ,
cl::desc("Weight for common operand embeddings") ,
cl::cat(MIR2VecCategory)  )
static

◆ MIR2VecCategory

cl::OptionCategory llvm::mir2vec::MIR2VecCategory("MIR2Vec Options")

◆ MIR2VecEmbeddingKind

cl::opt< MIR2VecKind > llvm::mir2vec::MIR2VecEmbeddingKind("mir2vec-kind", cl::values(clEnumValN(MIR2VecKind::Symbolic, "symbolic", "Generate symbolic embeddings for MIR")), cl::init(MIR2VecKind::Symbolic), cl::desc("MIR2Vec embedding kind"), cl::cat(MIR2VecCategory)) ( "mir2vec-kind" ,
cl::values(clEnumValN(MIR2VecKind::Symbolic, "symbolic", "Generate symbolic embeddings for MIR")) ,
cl::init(MIR2VecKind::Symbolic) ,
cl::desc("MIR2Vec embedding kind") ,
cl::cat(MIR2VecCategory)  )

◆ OpcWeight

cl::opt< float > llvm::mir2vec::OpcWeight("mir2vec-opc-weight", cl::init(1.0), cl::desc("Weight for machine opcode embeddings"), cl::cat(MIR2VecCategory)) ( "mir2vec-opc-weight" ,
cl::init(1.0) ,
cl::desc("Weight for machine opcode embeddings") ,
cl::cat(MIR2VecCategory)  )
static

◆ PrintAllVocabEntries

cl::opt< bool > llvm::mir2vec::PrintAllVocabEntries("mir2vec-print-all-vocab-entries", cl::init(false), cl::desc("Print all vocabulary entries including zero embeddings"), cl::cat(MIR2VecCategory)) ( "mir2vec-print-all-vocab-entries" ,
cl::init(false) ,
cl::desc("Print all vocabulary entries including zero embeddings") ,
cl::cat(MIR2VecCategory)  )
static

◆ RegOperandWeight

cl::opt< float > llvm::mir2vec::RegOperandWeight("mir2vec-reg-operand-weight", cl::init(1.0), cl::desc("Weight for register operand embeddings"), cl::cat(MIR2VecCategory)) ( "mir2vec-reg-operand-weight" ,
cl::init(1.0) ,
cl::desc("Weight for register operand embeddings") ,
cl::cat(MIR2VecCategory)  )
static

◆ VocabFile

cl::opt< std::string > llvm::mir2vec::VocabFile("mir2vec-vocab-path", cl::desc("Path to the vocabulary file for MIR2Vec"), cl::init(""), cl::cat(MIR2VecCategory)) ( "mir2vec-vocab-path" ,
cl::desc("Path to the vocabulary file for MIR2Vec") ,
cl::init("") ,
cl::cat(MIR2VecCategory)  )
static