LLVM 22.0.0git
llvm::mir2vec::SymbolicMIREmbedder Class Reference

Class for computing Symbolic embeddings Symbolic embeddings are constructed based on the entity-level representations obtained from the MIR Vocabulary. More...

#include "llvm/CodeGen/MIR2Vec.h"

Inheritance diagram for llvm::mir2vec::SymbolicMIREmbedder:
[legend]

Public Member Functions

 SymbolicMIREmbedder (const MachineFunction &F, const MIRVocabulary &Vocab)
Public Member Functions inherited from llvm::mir2vec::MIREmbedder
virtual ~MIREmbedder ()=default
Embedding getMInstVector (const MachineInstr &MI) const
 Computes and returns the embedding for a given machine instruction MI in the machine function MF.
Embedding getMBBVector (const MachineBasicBlock &MBB) const
 Computes and returns the embedding for a given machine basic block in the machine function MF.
Embedding getMFunctionVector () const
 Computes and returns the embedding for the current machine function.

Static Public Member Functions

static std::unique_ptr< SymbolicMIREmbeddercreate (const MachineFunction &MF, const MIRVocabulary &Vocab)
Static Public Member Functions inherited from llvm::mir2vec::MIREmbedder
static std::unique_ptr< MIREmbeddercreate (MIR2VecKind Mode, const MachineFunction &MF, const MIRVocabulary &Vocab)
 Factory method to create an Embedder object of the specified kind Returns nullptr if the requested kind is not supported.

Additional Inherited Members

Protected Member Functions inherited from llvm::mir2vec::MIREmbedder
 MIREmbedder (const MachineFunction &MF, const MIRVocabulary &Vocab)
Embedding computeEmbeddings () const
 Function to compute embeddings.
Embedding computeEmbeddings (const MachineBasicBlock &MBB) const
 Function to compute the embedding for a given machine basic block.
Protected Attributes inherited from llvm::mir2vec::MIREmbedder
const MachineFunctionMF
const MIRVocabularyVocab
const unsigned Dimension
 Dimension of the embeddings; Captured from the vocabulary.
const float OpcWeight
 Weight for opcode embeddings.

Detailed Description

Class for computing Symbolic embeddings Symbolic embeddings are constructed based on the entity-level representations obtained from the MIR Vocabulary.

Definition at line 195 of file MIR2Vec.h.

Constructor & Destructor Documentation

◆ SymbolicMIREmbedder()

SymbolicMIREmbedder::SymbolicMIREmbedder ( const MachineFunction & F,
const MIRVocabulary & Vocab )

Member Function Documentation

◆ create()

std::unique_ptr< SymbolicMIREmbedder > SymbolicMIREmbedder::create ( const MachineFunction & MF,
const MIRVocabulary & Vocab )
static

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