[PATCH] D125205: Replace the custom linked list in LeaderTableEntry with TinyPtrVector.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 11 08:26:21 PDT 2022


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/GVN.cpp:2109
+  const LeaderTableEntry &entry = Gvn.LeaderTable[Num];
+  return is_contained(entry.BB, BB);
 }
----------------
Hm, I think this is inverted. The old code is a bit hard to understand, but what it's checking is that //all// BBs are BB, not that //any// is. So this should be:
```
return all_of(entry.BB, [BB](BasicBlock *EntryBB) { return EntryBB == BB; });
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125205/new/

https://reviews.llvm.org/D125205



More information about the llvm-commits mailing list