[PATCH] D126833: [SampleProfile][Inline] Annotate sample profile inline remarks with link phase (prelink/postlink) information.
Mingming Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 8 11:46:23 PDT 2022
mingmingl added a comment.
thanks for reviews! PTAL.
================
Comment at: llvm/lib/Analysis/InlineAdvisor.cpp:579-580
const char *InlineAdvisor::getAnnotatedInlinePassName() {
if (!IC.hasValue())
return DEBUG_TYPE;
----------------
kazu wrote:
> You should be able to remove this `if` statement. When `IC.hasValue()` is `false`, the constructor sets `annotatedInlinePassName` to `DEBUG_TYPE`.
>
> Once the function has been simplified down to:
>
> ```
> const char *InlineAdvisor::getAnnotatedInlinePassName() {
> return annotatedInlinePassName.c_str();
> }
> ```
>
> you might as well move it to `InlineAdvisor.h`.
Done by 1) simplifying `InlineAdvisor::getAnnotatedInlinePassName` 2) move it to `InlineAdvisor.h`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126833/new/
https://reviews.llvm.org/D126833
More information about the llvm-commits
mailing list