[llvm] [BOLT][DWARF][NFC] Change how we re-size CloneUnitCtxMap (PR #75876)

Amir Ayupov via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 19 12:42:38 PST 2023


================
@@ -897,6 +897,8 @@ void DIEBuilder::registerUnit(DWARFUnit &DU, bool NeedSort) {
                 });
   }
   getState().UnitIDMap[getHash(DU)] = getState().DUList.size();
+  if (getState().DUList.size() == getState().CloneUnitCtxMap.size())
----------------
aaupov wrote:

Please add a comment why this condition is the one for allocating a new CloneUnitCtxMap entry.

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


More information about the llvm-commits mailing list