FORCING GCC TO UNROLL LOOPS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,
        I wish to force gcc to unroll both the constant time iterating loops
and the runtime iterating loops as outlined in loop-unroll.c. I modified the
loop-unroll.c to place all unrolling decisions in the function
decide-unroll-and-peel. I also made gcc interact with the user by asking the
user the function name that which contains the desired loop and the loop
number and the desired unroll factor. This seems to be fine for unrolling
constant time iterating loops, i.e. i am able to unroll these loops by all
factors from 1 to 8. However, for runtime loops, i get a segmentation fault.
I analysed the code and found that gcc assumes that the unroll factor is a
power of 2 for runtime loops. I wish to change this and force gcc to unroll
a particular loop by all factors from 1 to 8. How can I do this?
-- 
View this message in context: http://old.nabble.com/FORCING-GCC-TO-UNROLL-LOOPS-tp33455948p33455948.html
Sent from the gcc - Help mailing list archive at Nabble.com.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux