Hi Dmitri,

I think the optimization hint docs should be high-level, and the Rpass 
diagnostics should be used to determine if/why an optimization is not being 
applied. What do you think about adding this paragraph to the language 
extensions guide to clarify this?

If an optimization cannot be applied its hints will be ignored. For example, the
hint ``vectorize_width(4)`` is ignored if the loop is not proven safe to
vectorize. To identify and diagnose optimization issues use `-Rpass`,
`-Rpass-missed`, and `-Rpass-analysis` command line options. See the user guide
for details.

Tyler

On Jun 11, 2014, at 8:06 AM, Dmitri Gribenko <[email protected]> wrote:

> On Wed, Jun 11, 2014 at 2:20 AM, Tyler Nowicki <[email protected]> wrote:
>> Hi,
>> 
>> Here is a patch for the loop hints documentation. I’m not exactly sure if I 
>> wrote the attribute documentation correctly. If I missed something please 
>> let me know.
> 
>> +Extensions for loop hint optimizations
>> +======================================
>> +
>> +The ``#pragma clang loop`` directive is used to specify hints for 
>> optimizing the
>> +subsequent for, while, do-while, or c++11 range-based for loop. The 
>> directive
>> +provides options for controlling vectorization, interleaving, and unrolling.
> 
> This documentation describes syntax and the high-level effect of the
> pragma, but it does not explain what are the semantic constraints on
> the loop.  Users would want to know when it is valid to apply the
> pragma, and the documentation does not explain that.
> 
> Dmitri
> 
> -- 
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to