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

Nishant Sachdeva via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 2 23:34:45 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;
----------------
nishant-sachdeva wrote:

Accepted this

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


More information about the llvm-commits mailing list