[PATCH] D74420: [Assembler] Emit summary index flags

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 06:50:11 PST 2020


tejohnson added inline comments.


================
Comment at: llvm/lib/IR/AsmWriter.cpp:754
+    // typeid records enumerated by TypeIdNext.
+    return std::max(TypeIdNext, GUIDNext);
+  }
----------------
Looking at SlotTracker::processIndex, I think it could be improved and we can compute this there. For clarity, that method should probably iterate the typeIdCompatibleVtableMap before setting TypeIdNext (although the typeIdCompatibleVtable and the typeId summaries are mutually exclusive, I think it would be clearer to do it in that order). Then we could add something like a "IndexSlot" variable that can be set to TypeIdNext at the end. I think that will make it more clear what needs to change if we later need to add an additional type of slot.


================
Comment at: llvm/lib/IR/AsmWriter.cpp:2750
+
+  // Don't emit flags for per-module summaries.
+  if (TheIndex->getFlags())
----------------
The EnableSplitLTOUnit flag will be set on per-module summaries. In which case I think this does the right thing, since it will be non-zero. But the comment seems wrong.


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

https://reviews.llvm.org/D74420





More information about the llvm-commits mailing list