[all-commits] [llvm/llvm-project] 3d0a68: [llvm-cov] Simplify and optimize MC/DC computation...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Mon Jan 29 12:07:26 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3d0a689eb72aef639347edbec4608e631d5208a1
https://github.com/llvm/llvm-project/commit/3d0a689eb72aef639347edbec4608e631d5208a1
Author: Fangrui Song <i at maskray.me>
Date: 2024-01-29 (Mon, 29 Jan 2024)
Changed paths:
M llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
Log Message:
-----------
[llvm-cov] Simplify and optimize MC/DC computation (#79727)
Update code from https://reviews.llvm.org/D138847
`buildTestVector` is a standard DFS (walking a reduced ordered binary
decision diagram). Avoid shouldCopyOffTestVectorFor{True,False}Path
complexity and redundant `Map[ID]` lookups.
`findIndependencePairs` unnecessarily uses four nested loops (n<=6) to
find independence pairs. Instead, enumerate the two execution vectors
and find the number of mismatches. This algorithm can be optimized using
the marking function technique described in _Efficient Test Coverage
Measurement for MC/DC, 2013_, but this may be overkill.
More information about the All-commits
mailing list