[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
Fri Apr 26 00:31:52 PDT 2024


================
@@ -2204,10 +2267,9 @@ 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);
----------------
resistor wrote:

Done

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


More information about the llvm-commits mailing list