[llvm] [llvm-ir2vec] adding function-embedding map API to ir2vec python bindings (PR #177166)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 2 11:54:28 PST 2026


================
@@ -112,6 +114,13 @@ class IR2VecTool {
   /// Returns EntityList containing all entity strings
   static EntityList collectEntityMappings();
 
+  // Get embedding for a single function
+  std::pair<const Function *, Embedding>
+  getFunctionEmbedding(const Function &F, IR2VecKind Kind) const;
+
+  /// Get embeddings for all functions in the module
+  FuncEmbMap getFunctionEmbeddings(IR2VecKind Kind) const;
----------------
mtrofin wrote:

nit: because the API names are so close, maybe `getAllFunctionEmbeddings`?

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


More information about the llvm-commits mailing list