[PATCH] D35384: PGOInstrumentation: Move profile matching warnings to remarks

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 13 16:29:42 PDT 2017


On Thu, Jul 13, 2017 at 4:17 PM, David Blaikie <dblaikie at gmail.com> wrote:

>
>
> On Thu, Jul 13, 2017 at 2:03 PM David Li via Phabricator <
> reviews at reviews.llvm.org> wrote:
>
>> davidxl added a comment.
>>
>> Blindly downgrade the warning into remarks can be bad -- profile mismatch
>> problems can go undetected. People may spend more time diagnosing
>> performance regressions due to missed warnings. Worse, we may regress in
>> compiler without noticing.
>>
>
> Any other ideas?
>
> The diagnostic handling callbacks through to Clang aren't granular enough
> to demote only this warning to -Wno-error
>

Can this be fixed?



> (also as a warning it undermines the confidence as warnings as actionable
> things that Clang has helped provide users).
>


Warnings like this are usually actionable by users or compiler developers.


>
> Is there a way to determine a threshold at which the profile is so out of
> alignment that we should tell the user they probably shouldn't use it? That
> could be emitted as a warning.
>


This can be done -- but not sure if it is worth it: currently when mismatch
happens, the reader does not return the record to the client. We can change
that to force return a mismatched record, and check the hotness of the
function. If it is cold, tolerate it.

Even if we have this feature, I think it should be off by default (very
important for compiler developers to make sure that cfg should exactly
match when source is in sync between gen and use build).

David




>
> - Dave
>
>
>>
>>
>> https://reviews.llvm.org/D35384
>>
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170713/d513f89c/attachment.html>


More information about the llvm-commits mailing list