[all-commits] [llvm/llvm-project] ab76e4: [MC/DC] Refactor: Let MCDCConditionID int16_t with...

NAKAMURA Takumi via All-commits all-commits at lists.llvm.org
Wed Feb 14 23:24:49 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ab76e48ac2c2dbfc7d6a600b9b0dd0672e6d9439
      https://github.com/llvm/llvm-project/commit/ab76e48ac2c2dbfc7d6a600b9b0dd0672e6d9439
  Author: NAKAMURA Takumi <geek4civic at gmail.com>
  Date:   2024-02-15 (Thu, 15 Feb 2024)

  Changed paths:
    M clang/lib/CodeGen/CodeGenPGO.cpp
    M clang/lib/CodeGen/CodeGenPGO.h
    M clang/lib/CodeGen/CoverageMappingGen.cpp
    M llvm/include/llvm/ProfileData/Coverage/MCDCTypes.h
    M llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
    M llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
    M llvm/lib/ProfileData/Coverage/CoverageMappingWriter.cpp
    M llvm/unittests/ProfileData/CoverageMappingTest.cpp

  Log Message:
  -----------
  [MC/DC] Refactor: Let MCDCConditionID int16_t with zero-origin (#81257)

Also, Let `NumConditions` `uint16_t`.

It is smarter to handle the ID as signed.
Narrowing to `int16_t` will reduce costs of handling byvalue. (See also
#81221 and #81227)

External behavior doesn't change. They below handle values as internal
values plus 1.
* `-dump-coverage-mapping`
* `CoverageMappingReader.cpp`
* `CoverageMappingWriter.cpp`




More information about the All-commits mailing list