================ @@ -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:
Yeah. Also, the current MLInliner considers only reachable blocks (tests have some examples). This check ensures parity, and it makes sense to consider only reachable blocks in general. If we need the embedding of an unreachable block, it can still be obtained by directly invoking `getBBVector()`. https://github.com/llvm/llvm-project/pull/143476 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits