Loading...
You are not logged-in Login/Register





  • Posts   Search Threads
  • pravinkenatorAugust 14, 2011 11:23 PM PDT   
    Turning off loop blocking and unrolling

    Hello,

    I'm currently using icc version 12.0.4 20110427. I read in the compiler optimization manual that. -O3 option, by default switches on the loop unrolling and loop blocking. I want to turn off these optimizations. How to do it ?


    Aubrey W. (Intel)August 15, 2011 8:49 AM PDT
    Rate
     
    Turning off loop blocking and unrolling

    Hello,

    I will move this to our Intel(R) C++ Compiler forum where our engineers can have a look at your question.

    Best regards,
    ==
    Aubrey W.
    Intel(R) Software Network Support

    TimP (Intel)August 15, 2011 9:07 AM PDT
    Rate
     
    Turning off loop blocking and unrolling

    There's a documented compiler switch -unroll0 which should turn off unrolling (beyond what is inherent in vectorization).  For an individual loop, $pragma unroll(0) or other pragmas may be useful.
    In general, -O2 is already fairly aggressive in most situations, and we've had to drop back to it frequently in order to avoid additional optimizations presented by -O3.
    If you mean loop distribution and fusion (altering the boundaries of for loops), besides considering -O2, you could consider placing
    #pragma distribute point
    immediately after the for(), so as to prevent the compiler from splitting the loop, or between loops, to prevent fusion.

Forum jump:  

Intel Software Network Forums Statistics

17,025 users have contributed to 48,317 threads and 172,754 posts to date.

In the past 24 hours, we have 9 new thread(s) 56 new posts(s), and 52 new user(s).

In the past 3 days, the most popular thread for everyone has been How to manage rounding by IVF ?? The most posts were made to Most likely, the issue is that The post with the most views is Optimalization of sine function\'s taylor expansion

Please welcome our newest member redfruit83


For more complete information about compiler optimizations, see our Optimization Notice.