From: Klaus Flittner <klaus_flittner@gm...> - 2003-10-15 20:28:13
i'm currently working on a better LR solution and now i've got some
1. for which iCodes are the fields result/right/left valid?
and is a macro available to test this?
2. in the current LR code is the following sequnece:
OP_SYMBOL (op)->isptr = 1;
What has this to do with the liveranges? Shouldn't this be done
3. there is also a part (in the LR code) to check if two iTemps use the
i thought spill location are only used in the ports. How can it happen
that an iTemp
is assigned a spill location before the register allocation is done?
That is all for now. Hope you can help me.
From: Erik Petrich <epetrich@iv...> - 2003-10-18 02:33:00
On Wed, 15 Oct 2003, Klaus Flittner wrote:
> i'm currently working on a better LR solution and now i've got some
> 1. for which iCodes are the fields result/right/left valid?
> and is a macro available to test this?
My understanding is not authoritative, but no else has yet replied, so I
will share what I currently believe.
If the iCode type is not IFX or JUMPTABLE, then result/right/left are
valid. However, not all three are always used, so always check for NULL
For types IFX and JUMPTABLE, one should use the IC_COND and IC_JTCOND
macros to access the sole operand. I have seen a few instances in the
source in which the type is not being checked before using IC_LEFT,
IC_RIGHT, or IC_RESULT; these are bugs waiting to be activated. In the
current iCode structure, IC_LEFT is equivilent to IC_COND & IC_JTCOND.
IC_RIGHT and IC_RESULT do not refer to valid operands at all in these
cases, but luckily the IS_SYMOP, IS_VALOP, and IS_TYPOP macros will
return FALSE for them due to other coincidences. So at the moment
everything works in spite of this sort of abuse.
I'm afraid I don't know enough about the live range code to answer your
other two questions.