[llvm] 3491738 - [NFC][IR2Vec] Reinitialize Function Vectors (#162165)

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 6 15:26:30 PDT 2025


Author: S. VenkataKeerthy
Date: 2025-10-06T15:26:27-07:00
New Revision: 3491738601ecb0c63f23d01bfb1653893b5ef2c7

URL: https://github.com/llvm/llvm-project/commit/3491738601ecb0c63f23d01bfb1653893b5ef2c7
DIFF: https://github.com/llvm/llvm-project/commit/3491738601ecb0c63f23d01bfb1653893b5ef2c7.diff

LOG: [NFC][IR2Vec] Reinitialize Function Vectors (#162165)

Added: 
    

Modified: 
    llvm/lib/Analysis/IR2Vec.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/IR2Vec.cpp b/llvm/lib/Analysis/IR2Vec.cpp
index 295b6d33525d9..688535161d4b9 100644
--- a/llvm/lib/Analysis/IR2Vec.cpp
+++ b/llvm/lib/Analysis/IR2Vec.cpp
@@ -200,6 +200,8 @@ void Embedder::computeEmbeddings() const {
   if (F.isDeclaration())
     return;
 
+  FuncVector = Embedding(Dimension, 0.0);
+
   // Consider only the basic blocks that are reachable from entry
   for (const BasicBlock *BB : depth_first(&F)) {
     computeEmbeddings(*BB);


        


More information about the llvm-commits mailing list