[PATCH] Add support for optimization reports.

Diego Novillo dnovillo at google.com
Tue Apr 1 06:32:02 PDT 2014


On Mon, Mar 31, 2014 at 8:05 PM, Quentin Colombet <qcolombet at apple.com> wrote:

> ================
> Comment at: lib/CodeGen/CodeGenAction.cpp:419
> @@ -394,1 +418,3 @@
> +      OptimizationReportHandler(cast<DiagnosticInfoOptimizationReport>(DI));
> +    return;
>    default:
> ----------------
> This does not follow the same pattern as the previous handler, i.e., with the fall through setting the DiagID to use the default handler (the ComputeDiagID part etc.).
>
> My guess is we want to push the check of CodeGenOpts.OptimizationReportPattern into OptimizationReportHandler and check the return of that.
>
> If we do not want to follow the same pattern, we should comment on that. Indeed, I think it is important to explain why we are not reporting anything when CodeGenOpts.OptimizationReportPattern is not set.

These messages should only show up when the diagnostic identifier
matches the pattern provided by the user. So, even if -Rpass is used,
we still need to make sure that the pass name matches the regular
expression in -Rpass.

I'll re-arrange the logic and add documentation.


Thanks.  Diego.



More information about the cfe-commits mailing list