[llvm] [NFC][IR2Vec] Reinitialize Function Vectors (PR #162165)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 6 14:35:34 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlgo
@llvm/pr-subscribers-llvm-analysis
Author: S. VenkataKeerthy (svkeerthy)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/162165.diff
1 Files Affected:
- (modified) llvm/lib/Analysis/IR2Vec.cpp (+2)
``````````diff
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);
``````````
</details>
https://github.com/llvm/llvm-project/pull/162165
More information about the llvm-commits
mailing list