LLVM 22.0.0git
Public Member Functions | List of all members
llvm::ir2vec::SymbolicEmbedder Class Reference

Class for computing the Symbolic embeddings of IR2Vec. More...

#include "llvm/Analysis/IR2Vec.h"

Inheritance diagram for llvm::ir2vec::SymbolicEmbedder:
[legend]

Public Member Functions

 SymbolicEmbedder (const Function &F, const Vocabulary &Vocab)
 
- Public Member Functions inherited from llvm::ir2vec::Embedder
virtual ~Embedder ()=default
 
LLVM_ABI const InstEmbeddingsMapgetInstVecMap () const
 Returns a map containing instructions and the corresponding embeddings for the function F if it has been computed.
 
LLVM_ABI const BBEmbeddingsMapgetBBVecMap () const
 Returns a map containing basic block and the corresponding embeddings for the function F if it has been computed.
 
LLVM_ABI const EmbeddinggetBBVector (const BasicBlock &BB) const
 Returns the embedding for a given basic block in the function F if it has been computed.
 
LLVM_ABI const EmbeddinggetFunctionVector () const
 Computes and returns the embedding for the current function.
 

Additional Inherited Members

- Static Public Member Functions inherited from llvm::ir2vec::Embedder
static LLVM_ABI std::unique_ptr< Embeddercreate (IR2VecKind Mode, const Function &F, const Vocabulary &Vocab)
 Factory method to create an Embedder object.
 
- Protected Member Functions inherited from llvm::ir2vec::Embedder
LLVM_ABI Embedder (const Function &F, const Vocabulary &Vocab)
 
void computeEmbeddings () const
 Function to compute embeddings.
 
virtual void computeEmbeddings (const BasicBlock &BB) const =0
 Function to compute the embedding for a given basic block.
 
- Protected Attributes inherited from llvm::ir2vec::Embedder
const FunctionF
 
const VocabularyVocab
 
const unsigned Dimension
 Dimension of the vector representation; captured from the input vocabulary.
 
const float OpcWeight
 Weights for different entities (like opcode, arguments, types) in the IR instructions to generate the vector representation.
 
const float TypeWeight
 
const float ArgWeight
 
Embedding FuncVector
 
BBEmbeddingsMap BBVecMap
 
InstEmbeddingsMap InstVecMap
 

Detailed Description

Class for computing the Symbolic embeddings of IR2Vec.

Symbolic embeddings are constructed based on the entity-level representations obtained from the Vocabulary.

Definition at line 389 of file IR2Vec.h.

Constructor & Destructor Documentation

◆ SymbolicEmbedder()

llvm::ir2vec::SymbolicEmbedder::SymbolicEmbedder ( const Function F,
const Vocabulary Vocab 
)
inline

Definition at line 394 of file IR2Vec.h.


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