[all-commits] [llvm/llvm-project] 6da7d3: [llvm-profdata] Emit Error when Invalid MemOpSize ...

Matthew Voss via All-commits all-commits at lists.llvm.org
Tue Feb 23 12:53:06 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6da7d3141651ed3ef2b5f369e8ca0eb2e5c66778
      https://github.com/llvm/llvm-project/commit/6da7d3141651ed3ef2b5f369e8ca0eb2e5c66778
  Author: Matthew Voss <matthew.voss at sony.com>
  Date:   2021-02-23 (Tue, 23 Feb 2021)

  Changed paths:
    M llvm/include/llvm/ProfileData/InstrProf.h
    M llvm/include/llvm/ProfileData/InstrProfWriter.h
    M llvm/lib/ProfileData/InstrProf.cpp
    M llvm/lib/ProfileData/InstrProfWriter.cpp
    M llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp
    A llvm/test/Transforms/PGOProfile/Inputs/consecutive-zeros.proftext
    A llvm/test/Transforms/PGOProfile/consecutive-zeros.ll
    M llvm/test/Transforms/PGOProfile/memop_size_opt.ll
    A llvm/test/tools/llvm-profdata/invalid-profile-gen-zeros.proftext
    M llvm/tools/llvm-profdata/llvm-profdata.cpp

  Log Message:
  -----------
  [llvm-profdata] Emit Error when Invalid MemOpSize Section is Created by llvm-profdata

Under certain (currently unknown) conditions, llvm-profdata is outputting
profiles that have two consecutive entries in the MemOPSize section for the
value 0. This causes the PGOMemOPSizeOpt pass to output an invalid switch
instruction with two cases for 0. As mentioned, we’re not quite sure what’s
causing this to happen, but this patch prevents llvm-profdata from outputting a
profile that has this problem and gives an error with a request for a
reproducible.

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




More information about the All-commits mailing list