[PATCH] D110673: [clang] Don't modify OptRemark if the argument is not relevant
Arthur Eubanks via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 29 08:38:05 PDT 2021
aeubanks added a comment.
In D110673#3029438 <https://reviews.llvm.org/D110673#3029438>, @JamesNagurne wrote:
> I'll take a quick look tomorrow, but the general idea is that on calling ParseOptimizationRemark on line 1909 with a -cc1 command line containing -Rpass=inline -Rno-pass, Opts.OptimizationRemarkMissed and Opts.OptimizationRemarkAnalysis are set to valid patterns (Regex is ".*", Pattern is "", and Kind is RK_Missing). This happens around line 1909 in the change set.
>
> This configuration makes it into the LLVM backend. When prompted by specific calls to llvm::shouldInline (or something similar, can't remember the spelling off hand), emits an optimization-missed remark when one of the functions in the test's IR is not inlined.
>
>> "...in clang::ProcessWarningOptions() we'll separately look at all -R arguments and turn on/off corresponding diagnostic groups."
>
> Why would -Rno-pass turn off "pass-missed" or "pass-analysis" diagnostic groups? That seems counterintuitive. They seem to be different groups, considering how they're used in the backend.
It's not that -Rno-pass turns off "pass-missed" or "pass-analysis", it's that -Rpass turns on the "pass" diagnostic groups, and the "pass-missed" or "pass-analysis" groups are never turned on in the first place.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110673/new/
https://reviews.llvm.org/D110673
More information about the cfe-commits
mailing list