LLVM 22.0.0git
MIR2Vec.h File Reference

This file defines the MIR2Vec vocabulary analysis(MIR2VecVocabLegacyAnalysis), the core mir2vec::MIREmbedder interface for generating Machine IR embeddings, and related utilities. More...

Go to the source code of this file.

Classes

class  llvm::mir2vec::MIRVocabulary
 Class for storing and accessing the MIR2Vec vocabulary. More...
class  llvm::MIR2VecVocabLegacyAnalysis
 Pass to analyze and populate MIR2Vec vocabulary from a module. More...
class  llvm::MIR2VecVocabPrinterLegacyPass
 This pass prints the embeddings in the MIR2Vec vocabulary. More...

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
namespace  llvm::mir2vec

Typedefs

using llvm::mir2vec::Embedding = ir2vec::Embedding

Variables

llvm::cl::OptionCategory llvm::mir2vec::MIR2VecCategory
cl::opt< float > llvm::mir2vec::OpcWeight

Detailed Description

This file defines the MIR2Vec vocabulary analysis(MIR2VecVocabLegacyAnalysis), the core mir2vec::MIREmbedder interface for generating Machine IR embeddings, and related utilities.

MIR2Vec extends IR2Vec to support Machine IR embeddings. It represents the LLVM Machine IR as embeddings which can be used as input to machine learning algorithms.

The original idea of MIR2Vec is described in the following paper:

RL4ReAl: Reinforcement Learning for Register Allocation. S. VenkataKeerthy, Siddharth Jain, Anilava Kundu, Rohit Aggarwal, Albert Cohen, and Ramakrishna Upadrasta. 2023. RL4ReAl: Reinforcement Learning for Register Allocation. Proceedings of the 32nd ACM SIGPLAN International Conference on Compiler Construction (CC 2023). https://doi.org/10.1145/3578360.3580273. https://arxiv.org/abs/2204.02013

Definition in file MIR2Vec.h.