[PATCH] D84261: [PGO] Supporting code for always instrumenting entry block

Rong Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 21 12:07:17 PDT 2020


xur created this revision.
xur added reviewers: davidxl, wmi.
Herald added subscribers: dexonsmith, steven_wu, hiraditya.
Herald added a project: LLVM.

This patch is a split of D83024 <https://reviews.llvm.org/D83024> (https://reviews.llvm.org/D83024)

It includes all the supporting code without flipping the default behavior. 
It adds a variant bit in the profile version, adds new directives in text profile format, and changes llvm-profdata tool accrodingly.

Many test changes from D83024 <https://reviews.llvm.org/D83024> are also included. This should be OK as I explicitly specify the options.


https://reviews.llvm.org/D84261

Files:
  clang/test/CodeGenCXX/Inputs/profile-remap.proftext
  clang/test/Profile/Inputs/gcc-flag-compatibility_IR.proftext
  llvm/include/llvm/ProfileData/InstrProf.h
  llvm/include/llvm/ProfileData/InstrProfData.inc
  llvm/include/llvm/ProfileData/InstrProfReader.h
  llvm/include/llvm/ProfileData/InstrProfWriter.h
  llvm/lib/ProfileData/InstrProf.cpp
  llvm/lib/ProfileData/InstrProfReader.cpp
  llvm/lib/ProfileData/InstrProfWriter.cpp
  llvm/lib/Transforms/Instrumentation/CFGMST.h
  llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
  llvm/test/Transforms/PGOProfile/Inputs/branch2_entry.proftext
  llvm/test/Transforms/PGOProfile/Inputs/criticaledge_entry.proftext
  llvm/test/Transforms/PGOProfile/Inputs/func_entry.proftext
  llvm/test/Transforms/PGOProfile/Inputs/indirectbr_entry.proftext
  llvm/test/Transforms/PGOProfile/Inputs/irreducible_entry.proftext
  llvm/test/Transforms/PGOProfile/Inputs/landingpad_entry.proftext
  llvm/test/Transforms/PGOProfile/Inputs/loop1_entry.proftext
  llvm/test/Transforms/PGOProfile/Inputs/loop2_entry.proftext
  llvm/test/Transforms/PGOProfile/Inputs/misexpect-branch_entry.proftext
  llvm/test/Transforms/PGOProfile/Inputs/misexpect-switch-correct_entry.proftext
  llvm/test/Transforms/PGOProfile/Inputs/misexpect-switch_entry.proftext
  llvm/test/Transforms/PGOProfile/Inputs/select1.proftext
  llvm/test/Transforms/PGOProfile/Inputs/select2.proftext
  llvm/test/Transforms/PGOProfile/Inputs/switch_entry.proftext
  llvm/test/Transforms/PGOProfile/branch2.ll
  llvm/test/Transforms/PGOProfile/counter_promo_exit_catchswitch.ll
  llvm/test/Transforms/PGOProfile/criticaledge.ll
  llvm/test/Transforms/PGOProfile/cspgo_profile_summary.ll
  llvm/test/Transforms/PGOProfile/indirectbr.ll
  llvm/test/Transforms/PGOProfile/irreducible.ll
  llvm/test/Transforms/PGOProfile/landingpad.ll
  llvm/test/Transforms/PGOProfile/loop1.ll
  llvm/test/Transforms/PGOProfile/loop2.ll
  llvm/test/Transforms/PGOProfile/misexpect-branch-stripped.ll
  llvm/test/Transforms/PGOProfile/misexpect-branch.ll
  llvm/test/Transforms/PGOProfile/misexpect-switch-default.ll
  llvm/test/Transforms/PGOProfile/misexpect-switch.ll
  llvm/test/Transforms/PGOProfile/switch.ll
  llvm/test/Transforms/PGOProfile/thinlto_cspgo_use.ll
  llvm/tools/llvm-profdata/llvm-profdata.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84261.279601.patch
Type: text/x-patch
Size: 69655 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200721/e14bd531/attachment.bin>


More information about the llvm-commits mailing list