|
LLVM 22.0.0git
|
This file defines the MIR2Vec framework for generating Machine IR embeddings. More...
#include "llvm/Analysis/IR2Vec.h"#include "llvm/CodeGen/MachineBasicBlock.h"#include "llvm/CodeGen/MachineFunction.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineInstr.h"#include "llvm/CodeGen/MachineModuleInfo.h"#include "llvm/CodeGen/MachineOperand.h"#include "llvm/CodeGen/MachineRegisterInfo.h"#include "llvm/IR/PassManager.h"#include "llvm/Pass.h"#include "llvm/Support/CommandLine.h"#include "llvm/Support/Error.h"#include "llvm/Support/ErrorOr.h"#include <map>#include <set>#include <string>Go to the source code of this file.
Classes | |
| class | llvm::mir2vec::MIRVocabulary |
| Class for storing and accessing the MIR2Vec vocabulary. More... | |
| class | llvm::mir2vec::MIREmbedder |
| Base class for MIR embedders. More... | |
| class | llvm::mir2vec::SymbolicMIREmbedder |
| Class for computing Symbolic embeddings Symbolic embeddings are constructed based on the entity-level representations obtained from the MIR Vocabulary. More... | |
| class | llvm::MIR2VecVocabProvider |
| MIR2Vec vocabulary provider used by pass managers and standalone tools. 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... | |
| class | llvm::MIR2VecPrinterLegacyPass |
| This pass prints the MIR2Vec embeddings for machine functions, basic blocks, and instructions. More... | |
Namespaces | |
| namespace | llvm |
| This is an optimization pass for GlobalISel generic memory operations. | |
| namespace | llvm::mir2vec |
Typedefs | |
| using | llvm::mir2vec::Embedding = ir2vec::Embedding |
| using | llvm::mir2vec::MachineInstEmbeddingsMap = DenseMap<const MachineInstr *, Embedding> |
| using | llvm::mir2vec::MachineBlockEmbeddingsMap |
Enumerations | |
| enum class | llvm::MIR2VecKind { llvm::Symbolic } |
Functions | |
| MachineFunctionPass * | llvm::createMIR2VecPrinterLegacyPass (raw_ostream &OS) |
| Create a machine pass that prints MIR2Vec embeddings. | |
Variables | |
| llvm::cl::OptionCategory | llvm::mir2vec::MIR2VecCategory |
| cl::opt< float > | llvm::mir2vec::OpcWeight |
| cl::opt< float > | llvm::mir2vec::CommonOperandWeight |
| cl::opt< float > | llvm::mir2vec::RegOperandWeight |
This file defines the MIR2Vec framework for generating Machine IR embeddings.
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.