[all-commits] [llvm/llvm-project] e5fbf8: [Coverage] Improve performance of propagating Coun...
NAKAMURA Takumi via All-commits
all-commits at lists.llvm.org
Sat Jan 11 01:45:54 PST 2025
Branch: refs/heads/users/chapuni/cov/expansion
Home: https://github.com/llvm/llvm-project
Commit: e5fbf846113591b0abff151d91b01a5dd40abef1
https://github.com/llvm/llvm-project/commit/e5fbf846113591b0abff151d91b01a5dd40abef1
Author: NAKAMURA Takumi <geek4civic at gmail.com>
Date: 2025-01-11 (Sat, 11 Jan 2025)
Changed paths:
M llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
Log Message:
-----------
[Coverage] Improve performance of propagating Counter of Expansions
This improves `-dump-coverage-mapping` (939,498 lines) for
`RISCVInstructionSelector.cpp` from 30m to 1m18s and also improves
`llvm-cov` for `check-llvm` from 33m to 24s.
The current implementation behaved O(N^2) order with hundreds
thousands of Expansions.
This assumes:
- Records are partitioned by FileID.
- ExpandedFileID doesn't point FileID==0, since it is the root.
- The Count in Expansion is propagated from 1st Record in
ExpandedFileID.
Therefore another fact below can be assumed.
- Propagation chain consists of Expansions at each 1st Record.
This scans the Record at most a few times. O(N) is expected.
Fixes #113173
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list