Hi,
Due to pressing requirements of our target processor/application, I 
am implementing several popular loop pragmas in our private porting.
I've already implemented "unroll" and "ivdep", and am now working 
on "loop_count" to give GCC hints about number of iterations. 

The problem I am now facing is that GCC has many loop optimizations
in both tree and rtl levels that change loop property. For example,
loop versioning by unrolling called by predom pass and loop fissions
by graphite passes. This makes loop_count simply wrong for transformed
loop(s). What is best strategy? Updating loop count pragma to track
changed loops, or disable loop optimizations altogether in presence
of loop pragma? 

To less extent, loop optimizations also affect other loop pragmas. 
For example, I have to disable cunroll pass in presence of #pragma
unroll because it is confusing for user. 

Does anyone know how other compilers, e.g., icc, handle
such issues? 

Thanks for any input,
Bingfeng Mei

Broadcom UK

Reply via email to