[polly] r211769 - Support the new DiagnosticRemarks

Tobias Grosser tobias at grosser.es
Thu Jun 26 07:11:51 PDT 2014


On 26/06/2014 12:06, Andreas Simbuerger wrote:
> Author: simbuerg
> Date: Thu Jun 26 05:06:40 2014
> New Revision: 211769
>
> URL: http://llvm.org/viewvc/llvm-project?rev=211769&view=rev
> Log:
> Support the new DiagnosticRemarks
>
> Add support for generating optimization remarks after completing the
> detection of Scops.
> The goal is to provide end-users with useful hints about opportunities that
> help to increase the size of the detected Scops in their code.
>
> By default the remark is unspecified and the debug location is empty. Future
> patches have to expand on the messages generated.
>
> This patch brings a simple test case for ReportFuncCall to demonstrate the
> feature.
>
> Reports all missed opportunities to increase the size/number of valid
> Scops:
>   clang <...> -Rpass-missed="polly-detect" <...>
>   opt <...> -pass-remarks-missed="polly-detect" <...>
>
> Reports beginning and end of all valid Scops:
>   clang <...> -Rpass="polly-detect" <...>
>   opt <...> -pass-remarks="polly-detect" <...>
>
> Differential Revision: http://reviews.llvm.org/D4171

I also just looked at the -Rpass=polly output. Very nice that we now 
also handle the leave regions. One point I still spotted is the following:

linear-algebra/kernels/gemm/gemm.c:39:1: remark: A valid Scop begins 
here. [-Rpass=polly-detect]
   for (i = 0; i < ni; i++)
^
linear-algebra/kernels/gemm/gemm.c:45:1: remark: A valid Scop ends here. 
[-Rpass=polly-detect]

I think it is conceptually cleaner to make the second remark a 'note',
that depends on the first one, just saying 'Scop ends here'.

Cheers,
Tobias



More information about the llvm-commits mailing list