Commit Graph

4 Commits

Author SHA1 Message Date
Hamish Knight
6d3545f4d5 [IRGen] Don't emit multiple copies of coverage maps
Iterating over the IRGenModules and emitting every
SILCoverageMap in the SILModule meant that we
were emitting N copies of the coverage maps for
parallel IRGen, where N is the number of output
object files.

This has always been wrong, but was previously
saved by the fact that we would drop the coverage
map on the floor if we didn't have the name data
available. This would only be the case for the
IRGenModule that had the emitted entity to
profile, in addition to any IRGenModules that
had inlined the body of a profiled enitity. As
such, this prevented the duplication from being
too egregious. However with the recent change to
emit unused name data in the case where we don't
already have name data available, we're now fully
duplicating every coverage mapping, and emitting a
ton of redundant name data.

Fix things such that we only emit coverage mapping
records for the IRGenModule that corresponds to
the entity being profiled.

rdar://102905496
2022-12-06 14:28:35 +00:00
Keith Smiley
76ca05f7b1 reland: Emit coverage mappings for all modules
This reverts commit 499ed05fd9.

This changes the num-threads passed to 1 to avoid a multithreaded output
issue on windows
2020-06-14 13:13:47 -07:00
Saleem Abdulrasool
499ed05fd9 Revert "Emit coverage mappings for all modules" 2020-06-10 15:16:00 -07:00
Keith Smiley
8215ea105c Emit coverage mappings for all modules
Previously in WMO builds where IR was multithreaded only the
primary module would emit the coverage mapping leading to only the first
object file to have the __llvm_covmap section. This change emits
coverage for all modules so they are correctly reflected in the final
coverage report.
2020-06-08 16:35:35 -07:00