[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:15:48 PDT 2025


================
@@ -193,7 +196,8 @@ Embedding SymbolicEmbedder::getOperandEmbedding(const Value *Op) const {
 void SymbolicEmbedder::computeEmbeddings(const BasicBlock &BB) const {
   Embedding BBVector(Dimension, 0);
 
-  for (const auto &I : BB) {
+  // We consider only the non-debug and non-pseudo instructions
+  for (const auto &I : BB.instructionsWithoutDebug()) {
----------------
svkeerthy wrote:

Right. We just want to ensure we consider only non-debug, non-pseudo instructions. Some of the old ll files in tests still have debug instructions.

https://github.com/llvm/llvm-project/pull/143476


More information about the llvm-branch-commits mailing list