LLVM 22.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")
cl::opt< float > OpcWeight ("mir2vec-opc-weight", cl::Optional, cl::init(1.0), cl::desc("Weight for machine opcode embeddings"), cl::cat(MIR2VecCategory))
cl::opt< float > CommonOperandWeight ("mir2vec-common-operand-weight", cl::Optional, cl::init(1.0), cl::desc("Weight for common operand embeddings"), cl::cat(MIR2VecCategory))
cl::opt< float > RegOperandWeight ("mir2vec-reg-operand-weight", cl::Optional, cl::init(1.0), cl::desc("Weight for register operand embeddings"), cl::cat(MIR2VecCategory))

Variables

llvm::cl::OptionCategory MIR2VecCategory
cl::opt< float > OpcWeight
cl::opt< float > CommonOperandWeight
cl::opt< float > RegOperandWeight
static cl::opt< std::string > VocabFile ("mir2vec-vocab-path", cl::Optional, cl::desc("Path to the vocabulary file for MIR2Vec"), cl::init(""), cl::cat(MIR2VecCategory))
cl::opt< MIR2VecKindMIR2VecEmbeddingKind ("mir2vec-kind", cl::Optional, cl::values(clEnumValN(MIR2VecKind::Symbolic, "symbolic", "Generate symbolic embeddings for MIR")), cl::init(MIR2VecKind::Symbolic), cl::desc("MIR2Vec embedding kind"), cl::cat(MIR2VecCategory))

Typedef Documentation

◆ Embedding

Definition at line 79 of file MIR2Vec.h.

◆ MachineBlockEmbeddingsMap

◆ MachineInstEmbeddingsMap

Function Documentation

◆ CommonOperandWeight()

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

◆ MIR2VecCategory()

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

◆ OpcWeight()

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

◆ RegOperandWeight()

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

Variable Documentation

◆ CommonOperandWeight

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

Definition at line 77 of file MIR2Vec.h.

◆ MIR2VecCategory

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

◆ MIR2VecEmbeddingKind

cl::opt< MIR2VecKind > llvm::mir2vec::MIR2VecEmbeddingKind("mir2vec-kind", cl::Optional, 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::Optional ,
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::Optional, cl::init(1.0), cl::desc("Weight for machine opcode embeddings"), cl::cat(MIR2VecCategory))

◆ RegOperandWeight

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

Definition at line 77 of file MIR2Vec.h.

◆ VocabFile

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