[squeak-dev] Re: [Vm-dev] Re: VM performance discrepancy on Linux
and Windows
Paolo Bonzini
bonzini at gnu.org
Fri Apr 11 14:13:45 UTC 2008
>> It does not really get ignored, but the compiler performs more
>> aggressive live range splitting (because it uses SSA in 4.x so live
>> range splitting comes from free -- sometimes even if you don't want
>> it...). OTOH the optimizer is better, which is why sends are faster.
>
> Hmm, so simple increment assigns a new value and the range is
> splitted there?
while (i < j)
{
*a++ = *i++;
*b++ = *i++;
*c++ = *i++;
}
The increments of a/b/b are not splittable, because the value is used
again in the next loop iteration and obviously it has to be in the same
registers. But the increments of i can be rewritten as
{
*a++ = *i; temp1 = i + 1;
*b++ = *temp1; temp2 = temp1 + 1;
*c++ = *temp2; i = temp2 + 1;
}
Most of the time register allocation will allocate temp1 and temp2 to
the same register as i ("coalescing"), but there's no guarantee that it
will.
Paolo
More information about the Squeak-dev
mailing list
|