[PATCH] D115393: [InstrProf][NFC] Refactor Profile kind into a bitset enum.

Snehasish Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 8 13:32:27 PST 2021


snehasish created this revision.
snehasish added reviewers: xur, davidxl.
Herald added subscribers: wenlei, hiraditya.
snehasish requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D115393

Files:
  clang/lib/Frontend/CompilerInvocation.cpp
  llvm/include/llvm/ProfileData/InstrProf.h
  llvm/include/llvm/ProfileData/InstrProfReader.h
  llvm/include/llvm/ProfileData/InstrProfWriter.h
  llvm/lib/ProfileData/InstrProfReader.cpp
  llvm/lib/ProfileData/InstrProfWriter.cpp
  llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
  llvm/tools/llvm-profdata/llvm-profdata.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115393.392919.patch
Type: text/x-patch
Size: 17795 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211208/e324898a/attachment-0001.bin>


More information about the cfe-commits mailing list