[llvm] [GVN] Refactor the LeaderTable structure into a properly encapsulated data structure (PR #88347)
Owen Anderson via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 25 14:39:08 PDT 2024
================
@@ -2203,10 +2265,10 @@ GVNPass::ValueTable::assignExpNewValueNum(Expression &Exp) {
/// defined in \p BB.
bool GVNPass::ValueTable::areAllValsInBB(uint32_t Num, const BasicBlock *BB,
GVNPass &Gvn) {
- LeaderTableEntry *Vals = &Gvn.LeaderTable[Num];
- while (Vals && Vals->BB == BB)
- Vals = Vals->Next;
- return !Vals;
+ auto I = Gvn.LeaderTable.getLeaders(Num);
+ return std::all_of(
+ I.begin(), I.end(),
----------------
resistor wrote:
Done
https://github.com/llvm/llvm-project/pull/88347
More information about the llvm-commits
mailing list