[llvm] [BOLT][DWARF][NFC] Move common access outside of parallel function (PR #99728)

Sayhaan Siddiqui via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 14:25:19 PDT 2024


================
@@ -759,8 +751,14 @@ void DWARFRewriter::updateDebugInfo() {
       DebugRangesSectionWriter *TempRangesSectionWriter =
           CU->getVersion() >= 5 ? RangeListsWritersByCU[*DWOId].get()
                                 : LegacyRangesWritersByCU[*DWOId].get();
+      std::optional<std::string> DwarfOutputPath =
+          opts::DwarfOutputPath.empty()
+              ? std::nullopt
+              : std::optional<std::string>(opts::DwarfOutputPath.c_str());
+      std::string DWOName = DIEBlder.updateDWONameCompDir(
----------------
sayhaan wrote:

The lock was previously part of the old multithreading implementation which we weren't using. Previously the plan was to remove it in a followup PR but since we're moving it out of the lambda here it doesn't make sense to have the lock at all since DWOName is processed sequentially.

https://github.com/llvm/llvm-project/pull/99728


More information about the llvm-commits mailing list