[PATCH] D148876: [IndirectCallPromotion][SimpifyCFG] Preserve indirect callsites in hoist/sink when merging !prof is unprofitable and merge these callsites after ICP completes in a build pipeline

Mingming Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 22:49:39 PDT 2023


mingmingl updated this revision to Diff 518973.
mingmingl retitled this revision from "[IndirectCallPromotion] Clear value profile metadata after the last run of indirect-call-promotion in a pipeline" to "[IndirectCallPromotion][SimpifyCFG] Preserve indirect callsites in hoist/sink when merging !prof is unprofitable and merge these callsites after ICP completes in a build pipeline".
mingmingl edited the summary of this revision.
mingmingl added a reviewer: tejohnson.
mingmingl added a comment.
Herald added subscribers: ormris, steven_wu, mgrang.

resolve comments and absorbs D147954 <https://reviews.llvm.org/D147954> to illustrate how module flag and helper functions are used.. Could split out to smaller patches as well.

- described the problem to solve in summary.
- modified existing tests for pass pipeline changes.
- (implementation) consider the possibility that an invoke-instruction could have both branch_weights'and value profiles.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148876/new/

https://reviews.llvm.org/D148876

Files:
  llvm/include/llvm/IR/Metadata.h
  llvm/include/llvm/Transforms/Instrumentation/PGOInstrumentation.h
  llvm/lib/IR/Metadata.cpp
  llvm/lib/Passes/PassBuilderPipelines.cpp
  llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
  llvm/lib/Transforms/Utils/SimplifyCFG.cpp
  llvm/test/Other/new-pm-lto-defaults.ll
  llvm/test/Other/new-pm-pgo.ll
  llvm/test/Other/new-pm-thinlto-postlink-defaults.ll
  llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-prelink-defaults.ll
  llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
  llvm/test/Transforms/PGOProfile/indirect_call_promotion.ll
  llvm/test/Transforms/PGOProfile/indirect_call_promotion_musttail_typecheck.ll
  llvm/test/Transforms/SimplifyCFG/merge-indirect-call-metadata.ll
  llvm/test/Transforms/SimplifyCFG/preserve-indirect-call-metadata.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148876.518973.patch
Type: text/x-patch
Size: 43650 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230503/21faf7b6/attachment.bin>


More information about the llvm-commits mailing list