[llvm-branch-commits] [llvm] [NFC][IR2Vec] Add usage documentation for obtaining embeddings (PR #155516)

S. VenkataKeerthy via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Aug 29 11:52:33 PDT 2025


https://github.com/svkeerthy updated https://github.com/llvm/llvm-project/pull/155516

>From a20fb0e5c50041b1bf0cb09c89c34493f5f704a1 Mon Sep 17 00:00:00 2001
From: svkeerthy <venkatakeerthy at google.com>
Date: Tue, 26 Aug 2025 23:26:24 +0000
Subject: [PATCH] Added doc

---
 llvm/include/llvm/Analysis/IR2Vec.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/llvm/include/llvm/Analysis/IR2Vec.h b/llvm/include/llvm/Analysis/IR2Vec.h
index c42ca779e097c..44932a3385e16 100644
--- a/llvm/include/llvm/Analysis/IR2Vec.h
+++ b/llvm/include/llvm/Analysis/IR2Vec.h
@@ -24,6 +24,12 @@
 ///   Code Optimization (TACO), 2020. https://doi.org/10.1145/3418463.
 ///   https://arxiv.org/abs/1909.06228
 ///
+/// To obtain embeddings:
+/// First run IR2VecVocabAnalysis to populate the vocabulary.
+/// Then, use the Embedder interface to generate embeddings for the desired IR
+/// entities. See the documentation for more details -
+/// https://llvm.org/docs/MLGO.html#ir2vec-embeddings
+///
 //===----------------------------------------------------------------------===//
 
 #ifndef LLVM_ANALYSIS_IR2VEC_H



More information about the llvm-branch-commits mailing list