[PATCH] D151908: [BOLT][DWARF] Output DWO files as they are being processed
Maksim Panchenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 22 14:49:46 PDT 2023
maksfb added inline comments.
================
Comment at: bolt/lib/Rewrite/DWARFRewriter.cpp:1605
+ DWPState &State, DebugLocWriter &LocWriter) {
+ uint64_t DWOId = *CU.getDWOId();
+ MCSection *const StrOffsetSection = State.MCOFI->getDwarfStrOffDWOSection();
----------------
================
Comment at: bolt/lib/Rewrite/DWARFRewriter.cpp:1616
+ } else if (State.Version != CU.getVersion()) {
+ errs() << "BOLT-ERROR: Incompatible DWARF compile unit versions.\n";
+ exit(1);
----------------
================
Comment at: bolt/lib/Rewrite/DWARFRewriter.cpp:306
getDWOName(llvm::DWARFUnit &CU,
- std::unordered_map<std::string, uint32_t> *NameToIndexMap,
- std::unordered_map<uint64_t, std::string> &DWOIdToName) {
+ std::unordered_map<std::string, uint32_t> *NameToIndexMap) {
std::optional<uint64_t> DWOId = CU.getDWOId();
----------------
Do we ever invoke this function with a null `NameToIndexMap`?
================
Comment at: bolt/lib/Rewrite/DWARFRewriter.cpp:361
+ DebugLocWriter &LocWriter) {
+ // populate debug_info and debug_abbrev for current dwo into stringRef.
DWODIEBuilder.generateAbbrevs();
----------------
================
Comment at: bolt/lib/Rewrite/DWARFRewriter.cpp:1524
case DWARFSectionKind::DW_SECT_RNGLISTS: {
OutputBuffer = RangeListsWriter->releaseBuffer();
return StringRef(reinterpret_cast<const char *>(OutputBuffer->data()),
----------------
Assert that `RangeListsWriter` is non-null, or use a reference.
================
Comment at: bolt/lib/Rewrite/DWARFRewriter.cpp:1606
+ uint64_t DWOId = *CU.getDWOId();
+ MCSection *const StrOffsetSection = State.MCOFI->getDwarfStrOffDWOSection();
+ // Skipping CUs that we failed to load.
----------------
Do we need to assert that the section is non-null?
================
Comment at: bolt/lib/Rewrite/DWARFRewriter.cpp:1997
// Skipping DWARF4/5 split dwarf.
- if (LocListWriter && (LocListWriter->getDwarfVersion() <= 4 ||
- (LocListWriter->getDwarfVersion() >= 5 &&
- LocListWriter->isSplitDwarf()))) {
+ if (LocListWriter && LocListWriter->getDwarfVersion() <= 4) {
continue;
----------------
nit: remove curly braces.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151908/new/
https://reviews.llvm.org/D151908
More information about the llvm-commits
mailing list