[PATCH] D148876: [IndirectCallPromotion] Clear value profile metadata after the last run of indirect-call-promotion in a pipeline

Mingming Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 23:38:56 PDT 2023


mingmingl created this revision.
Herald added subscribers: Enna1, wenlei, hiraditya.
Herald added a project: All.
mingmingl requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

- In a {thin, regular} LTO postlink pipeline, or in a non-LTO pipeline, clear the value profile metadata.
- In the constructor of indirect-call-promotion pass, pass in LTO phase so both original 'InLTO' and added 'clear' is known inside the pass.
- D133121 <https://reviews.llvm.org/D133121> enhances invoke instr with {branch_weight}, so ICP should do a partial clear on value profiles. The current patch should merge after that (the functions in llvm/include/llvm/IR/Instructions.h).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148876

Files:
  llvm/include/llvm/IR/Instructions.h
  llvm/include/llvm/Transforms/Instrumentation/PGOInstrumentation.h
  llvm/lib/Passes/PassBuilderPipelines.cpp
  llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
  llvm/test/Transforms/PGOProfile/indirect_call_promotion.ll
  llvm/test/Transforms/PGOProfile/indirect_call_promotion_musttail_typecheck.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148876.515602.patch
Type: text/x-patch
Size: 13328 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230421/dec831cb/attachment.bin>


More information about the llvm-commits mailing list