Skip to content

[BOLT][DWARF] Remove deprecated opt #99575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2024
Merged

Conversation

sayhaan
Copy link
Member

@sayhaan sayhaan commented Jul 18, 2024

Remove deprecated DeterministicDebugInfo option and its uses.

@sayhaan sayhaan force-pushed the remove-deprecated-opt branch from 2f83321 to 5764a53 Compare July 18, 2024 21:43
@sayhaan sayhaan changed the title [BOLT][DWARF][NFC] Remove deprecated opt [BOLT][DWARF] Remove deprecated opt Jul 18, 2024
@sayhaan sayhaan marked this pull request as ready for review July 18, 2024 21:54
@llvmbot llvmbot added the BOLT label Jul 18, 2024
@llvmbot
Copy link
Member

llvmbot commented Jul 18, 2024

@llvm/pr-subscribers-bolt

Author: Sayhaan Siddiqui (sayhaan)

Changes

Remove deprecated DeterministicDebugInfo option and its uses.


Full diff: https://github.com/llvm/llvm-project/pull/99575.diff

1 Files Affected:

  • (modified) bolt/lib/Rewrite/DWARFRewriter.cpp (+1-13)
diff --git a/bolt/lib/Rewrite/DWARFRewriter.cpp b/bolt/lib/Rewrite/DWARFRewriter.cpp
index 4ba6344925856..213da8d59f19d 100644
--- a/bolt/lib/Rewrite/DWARFRewriter.cpp
+++ b/bolt/lib/Rewrite/DWARFRewriter.cpp
@@ -326,12 +326,6 @@ static cl::opt<bool> KeepARanges(
         "keep or generate .debug_aranges section if .gdb_index is written"),
     cl::Hidden, cl::cat(BoltCategory));
 
-static cl::opt<bool> 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<std::string> 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<DebugStrWriter>(*BC.DwCtx, false);
   StrOffstsWriter = std::make_unique<DebugStrOffsetsWriter>(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<DebugAddrWriter> FinalAddrWriter;
@@ -759,8 +748,7 @@ void DWARFRewriter::updateDebugInfo() {
   CUOffsetMap OffsetMap =
       finalizeTypeSections(DIEBlder, *Streamer, GDBIndexSection);
 
-  const bool SingleThreadedMode =
-      opts::NoThreads || opts::DeterministicDebugInfo;
+  const bool SingleThreadedMode = opts::NoThreads;
   if (!SingleThreadedMode)
     DIEBlder.buildCompileUnits();
   if (SingleThreadedMode) {

@sayhaan sayhaan marked this pull request as draft July 18, 2024 21:56
@sayhaan sayhaan force-pushed the remove-deprecated-opt branch from 5764a53 to 4bef97a Compare July 18, 2024 22:07
@sayhaan sayhaan marked this pull request as ready for review July 18, 2024 22:08
@ayermolo
Copy link
Contributor

What about the rest of the code that this option depends on?

@sayhaan
Copy link
Member Author

sayhaan commented Jul 18, 2024

What about the rest of the code that this option depends on?

Sorry, what code are you referring to? It doesn't depend on any other code, it's only used/referenced in DWARFRewriter.cpp.

@ayermolo
Copy link
Contributor

What about the rest of the code that this option depends on?

Sorry, what code are you referring to? It doesn't depend on any other code, it's only used/referenced in DWARFRewriter.cpp.

What started this discussion:

 // Update unit debug info in parallel
    ThreadPoolInterface &ThreadPool = ParallelUtilities::getThreadPool();
    for (std::unique_ptr<DWARFUnit> &CU : BC.DwCtx->compile_units())
      ThreadPool.async(processUnitDIE, CU.get(), &DIEBlder);
    ThreadPool.wait();

@sayhaan sayhaan force-pushed the remove-deprecated-opt branch from 56d4656 to 2206952 Compare July 18, 2024 23:35
Copy link

github-actions bot commented Jul 19, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

Summary: 

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D59942763
@sayhaan sayhaan force-pushed the remove-deprecated-opt branch from 6e56992 to 524f5f5 Compare July 19, 2024 03:17
@sayhaan sayhaan merged commit d54ec64 into llvm:main Jul 19, 2024
6 checks passed
yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
Summary: Remove deprecated DeterministicDebugInfo option and its uses.

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D60251237
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants