From d54ec64f6743dee346bd22298577edf1985ce0b8 Mon Sep 17 00:00:00 2001 From: Sayhaan Siddiqui <49014204+sayhaan@users.noreply.github.com> Date: Fri, 19 Jul 2024 14:03:50 -0700 Subject: [PATCH] [BOLT][DWARF] Remove deprecated opt (#99575) Remove deprecated DeterministicDebugInfo option and its uses. --- bolt/docs/CommandLineArgumentReference.md | 5 --- bolt/lib/Rewrite/DWARFRewriter.cpp | 37 +++++------------------ 2 files changed, 7 insertions(+), 35 deletions(-) diff --git a/bolt/docs/CommandLineArgumentReference.md b/bolt/docs/CommandLineArgumentReference.md index d2cbf0ca8644..ea51b77d838a 100644 --- a/bolt/docs/CommandLineArgumentReference.md +++ b/bolt/docs/CommandLineArgumentReference.md @@ -113,11 +113,6 @@ Prints out offsets for abbrev and debug_info of Skeleton CUs that get patched. -- `--deterministic-debuginfo` - - Disables parallel execution of tasks that may produce nondeterministic debug - info - - `--dot-tooltip-code` Add basic block instructions as tool tips on nodes diff --git a/bolt/lib/Rewrite/DWARFRewriter.cpp b/bolt/lib/Rewrite/DWARFRewriter.cpp index 4ba634492585..1ec216b39e95 100644 --- a/bolt/lib/Rewrite/DWARFRewriter.cpp +++ b/bolt/lib/Rewrite/DWARFRewriter.cpp @@ -326,12 +326,6 @@ static cl::opt KeepARanges( "keep or generate .debug_aranges section if .gdb_index is written"), cl::Hidden, cl::cat(BoltCategory)); -static cl::opt DeterministicDebugInfo( - "deterministic-debuginfo", - cl::desc("disables parallel execution of tasks that may produce " - "nondeterministic debug info"), - cl::init(true), cl::cat(BoltCategory)); - static cl::opt DwarfOutputPath( "dwarf-output-path", cl::desc("Path to where .dwo files or dwp file will be written out to."), @@ -607,11 +601,6 @@ void DWARFRewriter::updateDebugInfo() { StrWriter = std::make_unique(*BC.DwCtx, false); StrOffstsWriter = std::make_unique(BC); - if (!opts::DeterministicDebugInfo) { - opts::DeterministicDebugInfo = true; - errs() << "BOLT-WARNING: --deterministic-debuginfo is being deprecated\n"; - } - /// Stores and serializes information that will be put into the /// .debug_addr DWARF section. std::unique_ptr FinalAddrWriter; @@ -759,25 +748,13 @@ void DWARFRewriter::updateDebugInfo() { CUOffsetMap OffsetMap = finalizeTypeSections(DIEBlder, *Streamer, GDBIndexSection); - const bool SingleThreadedMode = - opts::NoThreads || opts::DeterministicDebugInfo; - if (!SingleThreadedMode) - DIEBlder.buildCompileUnits(); - if (SingleThreadedMode) { - CUPartitionVector PartVec = partitionCUs(*BC.DwCtx); - for (std::vector &Vec : PartVec) { - DIEBlder.buildCompileUnits(Vec); - for (DWARFUnit *CU : DIEBlder.getProcessedCUs()) - processUnitDIE(CU, &DIEBlder); - finalizeCompileUnits(DIEBlder, *Streamer, OffsetMap, - DIEBlder.getProcessedCUs(), *FinalAddrWriter); - } - } else { - // Update unit debug info in parallel - ThreadPoolInterface &ThreadPool = ParallelUtilities::getThreadPool(); - for (std::unique_ptr &CU : BC.DwCtx->compile_units()) - ThreadPool.async(processUnitDIE, CU.get(), &DIEBlder); - ThreadPool.wait(); + CUPartitionVector PartVec = partitionCUs(*BC.DwCtx); + for (std::vector &Vec : PartVec) { + DIEBlder.buildCompileUnits(Vec); + for (DWARFUnit *CU : DIEBlder.getProcessedCUs()) + processUnitDIE(CU, &DIEBlder); + finalizeCompileUnits(DIEBlder, *Streamer, OffsetMap, + DIEBlder.getProcessedCUs(), *FinalAddrWriter); } DebugNamesTable.emitAccelTable();