[llvm] [NFC][IR2Vec] Reinitialize Function Vectors (PR #162165)
S. VenkataKeerthy via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 6 14:34:58 PDT 2025
https://github.com/svkeerthy created https://github.com/llvm/llvm-project/pull/162165
None
>From 2290ff5be630f8d8dd34f5b87cbc372243edfaae Mon Sep 17 00:00:00 2001
From: svkeerthy <venkatakeerthy at google.com>
Date: Mon, 6 Oct 2025 21:34:00 +0000
Subject: [PATCH] Reinitialize Function Vectors
---
llvm/lib/Analysis/IR2Vec.cpp | 2 ++
1 file changed, 2 insertions(+)
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