[PATCH] D154793: [DWARFLinkerParallel] Add support of accelerator tables to DWARFLinkerParallel.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 11 09:22:59 PDT 2023


aprantl added a comment.

Let some minor comments, @JDevlieghere should probably take a look, too.



================
Comment at: llvm/include/llvm/CodeGen/AccelTable.h:316
     AsmPrinter *Asm, AccelTable<DWARF5AccelTableStaticData> &Contents,
-    ArrayRef<MCSymbol *> CUs,
+    ArrayRef<std::variant<MCSymbol *, uint64_t>> CUs,
     llvm::function_ref<unsigned(const DWARF5AccelTableStaticData &)>
----------------
Document what the variant cases mean?


================
Comment at: llvm/lib/DWARFLinkerParallel/ArrayList.h:45
+      // Allocate next group if necessary.
+      if (CurGroup->Next == nullptr)
+        allocateNewGroup(CurGroup->Next, nullptr);
----------------
If (!CurGroup->Next)


================
Comment at: llvm/lib/DWARFLinkerParallel/ArrayList.h:62
          CurGroup = CurGroup->Next) {
-      for (size_t Idx = 0; Idx < CurGroup->ItemsCount; Idx++) {
+      for (size_t Idx = 0; Idx < CurGroup->getItemsCount(); Idx++)
         Handler(CurGroup->Items[Idx]);
----------------
for (auto &item: CurGroup)
  Handler(Item)



================
Comment at: llvm/lib/DWARFLinkerParallel/DWARFLinkerCompileUnit.cpp:1437
+
+  while (true) {
+    if (const char *CurrentName = InputDIE.getName(DINameKind::ShortName))
----------------
Can this loop indefinitely if the input DWARF has circular references?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154793



More information about the llvm-commits mailing list