MC/DC in LLVM Source-based Code Coverage: Review 1/3
Background
I previously upstreamed work to enable Branch Coverage (https://reviews.llvm.org/D84467), which was pushed in early 2021. MC/DC (Modified Condition/Decision Coverage) is a planned enhancement to Source-based Code Coverage. Implementation was completed in May for our downstream Arm compiler, and in general use it has not yielded any issues.
Patches have been tested on windows (stage1) and linux/mac (stage1 and stage2). Fuchsia is not yet supported.
See attached file for Background, Motivation, Design, and Implementation Concepts:
See attached PDF for Technical Talk slides from 2022 LLVM Developers' Meeting:
I am also available at Discord @alanphipps
Review
This review is for the LLVM back-end processing and profile reading/writing components. compiler-rt changes are included.
- Instrumentation intrinsic lowering and section allocation:
- IntrinsicInst.h
- Intrinsics.td
- IntrinsicInst.cpp
- InstrProfiling.h, InstrProfiling.cpp
- Profiling format read/write:
- CoverageMappingWriter.cpp
- CoverageMappingReader.cpp
- Profile read/write:
- InstrProf.h, InstrProf.cpp
- InstrProfWriter.h, InstrProfWriter.cpp
- InstrProfReader.h, InstrProfReader.cpp
- Runtime profiling aids:
- InstrProfiling.h
- InstrProfilingFilebaremetal.c
- InstrProfilingPlatformBaremetal.c
- compiler-rt
Do we also need to bump the version for the raw files since we added to its header?