[all-commits] [llvm/llvm-project] 13d894: [InstrProf][NFC] Refactor Profile kind into a bits...

Snehasish Kumar via All-commits all-commits at lists.llvm.org
Thu Jan 27 13:01:56 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 13d89477be56e60d7c953569347b76c24c34546a
      https://github.com/llvm/llvm-project/commit/13d89477be56e60d7c953569347b76c24c34546a
  Author: Snehasish Kumar <snehasishk at google.com>
  Date:   2022-01-27 (Thu, 27 Jan 2022)

  Changed paths:
    M llvm/include/llvm/ProfileData/InstrProf.h
    M llvm/include/llvm/ProfileData/InstrProfReader.h
    M llvm/include/llvm/ProfileData/InstrProfWriter.h
    M llvm/lib/ProfileData/InstrProfReader.cpp
    M llvm/lib/ProfileData/InstrProfWriter.cpp
    M llvm/tools/llvm-profdata/llvm-profdata.cpp

  Log Message:
  -----------
  [InstrProf][NFC] Refactor Profile kind into a bitset enum.

This change refactors the ProfileKind enum into a bitset enum to
represent the different attributes a profile can have. This change
simplifies the logic in the instrprof writer when multiple profiles are
merged together. In the future we plan on introducing a new memory
profile section which will extend the enum by one additional entry.
Without this change when accounting for memory profiles will have to be
maintained separately and will make the logic more complex.

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




More information about the All-commits mailing list