Spill code and unrolling

Stephan Ceram <linuxkaffee@gmx.net>
11 Dec 2008 14:43:00 GMT

          From comp.compilers

Related articles
Spill code and unrolling linuxkaffee@gmx.net (Stephan Ceram) (2008-12-11)
Re: Spill code and unrolling SidTouati@inria.fr (Sid Touati) (2008-12-12)
Re: Spill code and unrolling thisisgiri@gmail.com (Giridhar S) (2008-12-13)
Re: Spill code and unrolling walter@bytecraft.com (Walter Banks) (2008-12-15)
| List of all articles for this month |

From: Stephan Ceram <linuxkaffee@gmx.net>
Newsgroups: comp.compilers
Date: 11 Dec 2008 14:43:00 GMT
Organization: Compilers Central
Keywords: optimize, registers, question
Posted-Date: 12 Dec 2008 10:20:09 EST


I've a question about loop unrolling. Let's assume that you compile
your program without loop unrolling in advance to check if the loops
which are candidates for loop unrolling contain any spill code. If so,
it is very likely that after loop unrolling the contained spill code
is duplicated by the number of how often this loop is unrolled.

Now, I was wondering if it would be a good heuristic for a loop
unroller to skip loops containing spill code. What do you think? Is it
still useful to unroll such loops (since the positive effects of
unrolling will overbalance) or will the additional spill code probably
decrease the total program execution time (or just negligibly improve
it), thus unrolling of these loops should be omitted?

It is also an interesting question, how this scenario will effect the
program execution time for systems with and without caches.
Intuitively, I would assume that in a system with data caches, the
additional spill code will have in total a negative influence on the
unrolled code. Without data caches, I don't really know what could be


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.