1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00
llvm-mirror/unittests
Pirama Arumuga Nainar 7b5dc69f32 [CoverageMapping] Handle gaps in counter IDs for source-based coverage
For source-based coverage, the frontend sets the counter IDs and the
constraints of counter IDs is not defined.  For e.g., the Rust frontend
until recently had a reserved counter #0
(https://github.com/rust-lang/rust/pull/83774).  Rust coverage
instrumentation also creates counters on edges in addition to basic
blocks.  Some functions may have more counters than regions.

This breaks an assumption in CoverageMapping.cpp where the number of
counters in a function is assumed to be bounded by the number of
regions:
  Counts.assign(Record.MappingRegions.size(), 0);

This assumption causes CounterMappingContext::evaluate() to fail since
there are not enough counter values created in the above call to
`Counts.assign`.  Consequently, some uncovered functions are not
reported in coverage reports.

This change walks a Function's CoverageMappingRecord to find the maximum
counter ID, and uses it to initialize the counter array when instrprof
records are missing for a function in sparse profiles.

Differential Revision: https://reviews.llvm.org/D101780
2021-05-19 10:46:38 -07:00
..
ADT Revert "[ADT] Add new type traits for type pack indexes" 2021-05-17 20:26:59 -07:00
Analysis Bump googletest to 1.10.0 2021-05-14 19:16:31 +02:00
AsmParser
BinaryFormat
Bitcode [AMDGPU] Set the default globals address space to 1 2020-11-20 15:46:53 +00:00
Bitstream Switch from llvm::is_trivially_copyable to std::is_trivially_copyable 2020-12-02 22:02:48 -08:00
CodeGen Bump googletest to 1.10.0 2021-05-14 19:16:31 +02:00
DebugInfo Bump googletest to 1.10.0 2021-05-14 19:16:31 +02:00
Demangle [demangler] Initial support for the new Rust mangling scheme 2021-05-03 16:44:30 -07:00
ExecutionEngine [ORC] Add JITLink dependence for ObjectLinkingLayerTest. 2021-05-13 22:48:30 -07:00
FileCheck Bump googletest to 1.10.0 2021-05-14 19:16:31 +02:00
Frontend Bump googletest to 1.10.0 2021-05-14 19:16:31 +02:00
FuzzMutate [FuzzMutate] Add mutator to modify instruction flags. 2021-01-23 19:05:20 +00:00
InterfaceStub [llvm] Fix ODRViolations for VersionTuple YAML specializations NFC 2020-10-20 18:29:15 -07:00
IR [VP] make getFunctionalOpcode return an Optional 2021-05-19 17:08:34 +02:00
LineEditor
Linker [RGT] Recode more unreachable assertions and tautologies 2021-03-19 09:17:22 -07:00
MC [MC] Untangle MCContext and MCObjectFileInfo 2021-05-05 10:03:02 -07:00
MI [AMDGPU] Rename amdgcn_wwm to amdgcn_strict_wwm 2021-03-03 09:33:57 +01:00
Object [llvm-readelf] Support dumping the BB address map section with --bb-addr-map. 2021-03-08 16:20:11 -08:00
ObjectYAML
Option [clang][cli] Accept strings instead of options in ImpliedByAnyOf 2021-01-26 09:30:36 +01:00
Passes [NFC] Format PassesBindingsTests CMake like other unittests 2021-05-18 10:40:07 -07:00
ProfileData [CoverageMapping] Handle gaps in counter IDs for source-based coverage 2021-05-19 10:46:38 -07:00
Remarks
Support Put back the trailing commas on TYPED_TEST_SUITE 2021-05-17 14:14:13 +02:00
TableGen Revert "Make TableGenGlobalISel an object library" 2021-03-31 13:27:00 -07:00
Target [ARM] Remove new ARMSelectionDAGTest unittest. 2021-03-04 10:14:35 +00:00
TextAPI [llvm][TextAPI] add mapping from OS string to Platform 2021-05-06 16:25:56 -07:00
tools [Support] Don't include VirtualFileSystem.h in CommandLine.h 2021-04-21 10:19:01 -04:00
Transforms [NewPM] Don't mark AA analyses as preserved 2021-05-18 13:49:03 -07:00
XRay Put back the trailing commas on TYPED_TEST_SUITE 2021-05-17 14:14:13 +02:00
CMakeLists.txt
unittest.cfg.in