Related articles |
---|
question on register spill behavior bxin@acm.org (BX) (2008-08-27) |
Re: question on register spill behavior anton@mips.complang.tuwien.ac.at (2008-08-28) |
Re: question on register spill behavior cr88192@hotmail.com (cr88192) (2008-08-29) |
Re: question on register spill behavior bxin@acm.org (BX) (2008-09-08) |
From: | BX <bxin@acm.org> |
Newsgroups: | comp.compilers |
Date: | Wed, 27 Aug 2008 12:42:13 -0700 (PDT) |
Organization: | Compilers Central |
Keywords: | registers, code |
Posted-Date: | 28 Aug 2008 10:10:05 EDT |
Hi All,
I am not so on top of the inner workings of the register spill
behavior. Can the spill code be placed in an inner scope of where the
register is defined? An example,
<code>
x = .. //suppose it's allocated a register
if(..) {
//can spill code for 'x' placed here??
...
.. = x;
foo();
}
.. = x;
</code>
It seems nothing forbids it. My question is, with the existing spill
algorithm in popular compilers (e.g. GCC), can the above scenario
happen? And how often do they happen? In most cases, register spill
code seems to be at the beginning of a function (pushs) and end of a
function (pops).
Thanks,
Bin
Return to the
comp.compilers page.
Search the
comp.compilers archives again.