[PATCH] D152217: [profi][NFC] Refactor SampleProfileInference::apply

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 5 17:29:51 PDT 2023


Amir created this revision.
Amir added a reviewer: spupyrev.
Herald added a subscriber: wenlei.
Herald added a project: All.
Amir requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Split up `apply` into the following steps:

- `findUnreachable`
- `createStableOrder`
- `preAssignWeights`
- `canApplyInference`
- `extractProfile`
- `verifyProfileConsistency`

With some specializations, `apply` should apply to BOLT stale profile matching
(D144500 <https://reviews.llvm.org/D144500>), or potentially a custom `apply` reusing some of the interfaces.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152217

Files:
  llvm/include/llvm/Transforms/Utils/SampleProfileInference.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152217.528644.patch
Type: text/x-patch
Size: 6715 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230606/408c774a/attachment.bin>


More information about the llvm-commits mailing list