mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-05 04:13:13 +02:00
* Corrected calculation of spilling efficiency.
This commit is contained in:
parent
c9d9d42f0e
commit
c4a1cdceae
@ -3013,7 +3013,7 @@ unit rgobj;
|
|||||||
Higher value is better.
|
Higher value is better.
|
||||||
}
|
}
|
||||||
var
|
var
|
||||||
i,spillingcounter,max_weight:longint;
|
i,j,spillingcounter,max_weight:longint;
|
||||||
all_weight,spill_weight,d: double;
|
all_weight,spill_weight,d: double;
|
||||||
begin
|
begin
|
||||||
max_weight:=1;
|
max_weight:=1;
|
||||||
@ -3027,12 +3027,17 @@ unit rgobj;
|
|||||||
all_weight:=0;
|
all_weight:=0;
|
||||||
for i:=first_imaginary to maxreg-1 do
|
for i:=first_imaginary to maxreg-1 do
|
||||||
with reginfo[i] do
|
with reginfo[i] do
|
||||||
|
if not (ri_spill_helper in flags) then
|
||||||
begin
|
begin
|
||||||
d:=weight/max_weight;
|
d:=weight/max_weight;
|
||||||
all_weight:=all_weight+d;
|
all_weight:=all_weight+d;
|
||||||
if (weight>100) and
|
if (ri_coalesced in flags) and (alias>=first_imaginary) then
|
||||||
(i<=high(spillinfo)) and
|
j:=alias
|
||||||
spillinfo[i].spilled then
|
else
|
||||||
|
j:=i;
|
||||||
|
if (reginfo[j].weight>100) and
|
||||||
|
(j<=high(spillinfo)) and
|
||||||
|
spillinfo[j].spilled then
|
||||||
begin
|
begin
|
||||||
inc(spillingcounter);
|
inc(spillingcounter);
|
||||||
spill_weight:=spill_weight+d;
|
spill_weight:=spill_weight+d;
|
||||||
|
Loading…
Reference in New Issue
Block a user