[llvm-branch-commits] [llvm] [IR2Vec] Consider only reachable BBs and non-debug instructions (PR #143476)
S. VenkataKeerthy via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jun 10 12:56:08 PDT 2025
================
@@ -218,9 +222,12 @@ void SymbolicEmbedder::computeEmbeddings(const BasicBlock &BB) const {
void SymbolicEmbedder::computeEmbeddings() const {
if (F.isDeclaration())
return;
- for (const auto &BB : F) {
- computeEmbeddings(BB);
- FuncVector += BBVecMap[&BB];
+
+ // Consider only the basic blocks that are reachable from entry
+ ReversePostOrderTraversal<const Function *> RPOT(&F);
----------------
svkeerthy wrote:
Thanks. Seems like constructing RPO is costly. Changed it to DF Traversal.
https://github.com/llvm/llvm-project/pull/143476
More information about the llvm-branch-commits
mailing list