@@ -326,12 +326,6 @@ static cl::opt<bool> KeepARanges(
326
326
" keep or generate .debug_aranges section if .gdb_index is written" ),
327
327
cl::Hidden, cl::cat(BoltCategory));
328
328
329
- static cl::opt<bool > DeterministicDebugInfo (
330
- " deterministic-debuginfo" ,
331
- cl::desc (" disables parallel execution of tasks that may produce "
332
- " nondeterministic debug info" ),
333
- cl::init(true ), cl::cat(BoltCategory));
334
-
335
329
static cl::opt<std::string> DwarfOutputPath (
336
330
" dwarf-output-path" ,
337
331
cl::desc (" Path to where .dwo files or dwp file will be written out to." ),
@@ -607,11 +601,6 @@ void DWARFRewriter::updateDebugInfo() {
607
601
StrWriter = std::make_unique<DebugStrWriter>(*BC.DwCtx , false );
608
602
StrOffstsWriter = std::make_unique<DebugStrOffsetsWriter>(BC);
609
603
610
- if (!opts::DeterministicDebugInfo) {
611
- opts::DeterministicDebugInfo = true ;
612
- errs () << " BOLT-WARNING: --deterministic-debuginfo is being deprecated\n " ;
613
- }
614
-
615
604
// / Stores and serializes information that will be put into the
616
605
// / .debug_addr DWARF section.
617
606
std::unique_ptr<DebugAddrWriter> FinalAddrWriter;
@@ -765,8 +754,16 @@ void DWARFRewriter::updateDebugInfo() {
765
754
CUPartitionVector PartVec = partitionCUs (*BC.DwCtx );
766
755
for (std::vector<DWARFUnit *> &Vec : PartVec) {
767
756
DIEBlder.buildCompileUnits (Vec);
768
- for (DWARFUnit *CU : DIEBlder.getProcessedCUs ())
769
- processUnitDIE (CU, &DIEBlder);
757
+ llvm::DenseMap<uint64_t , uint64_t > LocListWritersIndexByCU;
758
+ for (DWARFUnit *CU : DIEBlder.getProcessedCUs ()) {
759
+ createRangeLocListAddressWriters (*CU, LocListWritersIndexByCU);
760
+ processSplitCU (*CU, DIEBlder);
761
+ }
762
+ for (DWARFUnit *CU : DIEBlder.getProcessedCUs ()) {
763
+ DebugLocWriter *DebugLocWriter =
764
+ LocListWritersByCU[LocListWritersIndexByCU[CU->getOffset ()]].get ();
765
+ processMainBinaryCU (*CU, DIEBlder, *DebugLocWriter);
766
+ }
770
767
finalizeCompileUnits (DIEBlder, *Streamer, OffsetMap,
771
768
DIEBlder.getProcessedCUs (), *FinalAddrWriter);
772
769
}
0 commit comments