[llvm] [llvm-ir2vec] Adding Inst Embeddings Map API to ir2vec python bindings (PR #180140)

S. VenkataKeerthy via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 12 02:05:32 PST 2026


================
@@ -169,16 +169,20 @@ Expected<Embedding> IR2VecTool::getFunctionEmbedding(const Function &F,
                              "Failed to create embedder for function '%s'.",
                              F.getName().str().c_str());
 
-  return Emb->getFunctionVector();
+  return Emb;
+}
+
+Expected<Embedding> IR2VecTool::getFunctionEmbedding(const Function &F,
+                                                     IR2VecKind Kind) const {
+  auto Emb = getIR2VecEmbedder(F, Kind);
----------------
svkeerthy wrote:

Can you rather pass Embedder as an arg to these methods?

https://github.com/llvm/llvm-project/pull/180140


More information about the llvm-commits mailing list