Re: Symbolic vs Named variable register allocation

2003-12-10 Thread Pete Lomax
>At 03:01 PM 12/3/2003 +0100, Leopold Toetsch wrote:
>>Pete Lomax <[EMAIL PROTECTED]> wrote:
>> > The following demonstrates that $I1 and .local int i map to the same
>> > register in the output pasm code:
>>
>>Yep. The problem seems to be the backward branch. When you put the
>>"test" sub after the "end" op, its working fine.
>
Just a quick comment inspired by reading the perl 6 summary:

As Leo said, it is backward branch. $I1 and $I2 can both get stored in
the same register, as can .local int i and .local int j. I'm just
pointing out that my subject line was a little misleading.

Pete


Re: Symbolic vs Named variable register allocation

2003-12-03 Thread Melvin Smith
At 03:01 PM 12/3/2003 +0100, Leopold Toetsch wrote:
Pete Lomax <[EMAIL PROTECTED]> wrote:
> The following demonstrates that $I1 and .local int i map to the same
> register in the output pasm code:
Yep. The problem seems to be the backward branch. When you put the
"test" sub after the "end" op, its working fine.
At quick glance I would guess IMCC assumes that the "call test" branches
to a basic block that doesn't overlap with the callee basic block.
Much (most) of the flow analysis code was done before we adopted
new calling conventions. I'll have a look to see if there a quick fix
that would allow the code snippet sample to be legal.
-Melvin




Re: Symbolic vs Named variable register allocation

2003-12-03 Thread Leopold Toetsch
Pete Lomax <[EMAIL PROTECTED]> wrote:
> The following demonstrates that $I1 and .local int i map to the same
> register in the output pasm code:

Yep. The problem seems to be the backward branch. When you put the
"test" sub after the "end" op, its working fine.

leo