[PATCH] D121862: [ProfSampleLoader] When disable-sample-loader-inlining is true, merge profiles of inlined instances to outlining versions.

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 21 21:19:18 PDT 2022


wenlei added a comment.

In D121862#3398171 <https://reviews.llvm.org/D121862#3398171>, @davidxl wrote:

> When the option was introduced in https://reviews.llvm.org/D120344, I think the intention is to use it to disable both sampleloader inlining (pre/postlink), so perhaps we can just tighten the comment for the option and document that the profiles are merged back.
>
> If there is a need for prelink disabling in the future, we can introduce a new option for it (which does not merge profile back).

Sounds good.

> When this was originally added, we used it to disable only pre-link sample loader inlining

Just realized this was your change. My above comment was referring to an internal change (and I didn't realize it's internal).



================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:1211-1212
+
+          if (DisableSampleLoaderInlining)
+            continue;
+
----------------
Move the check into tryPromoteAndInlineCandidate/tryInlineCandidate, so we don't need to spray it everywhere?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121862



More information about the llvm-commits mailing list