[all-commits] [llvm/llvm-project] a4b543: [llvm-profdata] Check for all duplicate entries in...

Matthew Voss via All-commits all-commits at lists.llvm.org
Fri Nov 4 17:19:29 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a4b543a5a541eeff5a7ba92ada4b0d809a2c8482
      https://github.com/llvm/llvm-project/commit/a4b543a5a541eeff5a7ba92ada4b0d809a2c8482
  Author: Matthew Voss <matthew.voss at sony.com>
  Date:   2022-11-04 (Fri, 04 Nov 2022)

  Changed paths:
    M llvm/lib/ProfileData/InstrProfWriter.cpp
    M llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp
    M llvm/test/Transforms/PGOProfile/consecutive-zeros.ll

  Log Message:
  -----------
  [llvm-profdata] Check for all duplicate entries in MemOpSize table

Previously, we only checked for duplicate zero entries when merging a
MemOPSize table (see D92074), but a user recently provided a reproducer
demonstrating that other entries can also be duplicated. As demonstrated
by the test in this patch, PGOMemOPSizeOpt can potentially generate
invalid IR for non-zero, non-consecutive duplicate entries. This seems
to be a rare case, since the duplicate entry is often below the
threshold, but possible. This patch extends the existing warning to
check for any duplicate values in the table, both in the optimization
and in llvm-profdata.

Differential Revision: https://reviews.llvm.org/D136211




More information about the All-commits mailing list