mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 20:11:02 +02:00
* Improved output of spilling statistics:
- Do not use count_uses, since weight already represents a usage count of a register. - Do not count spills of registers with weight less than 100. git-svn-id: trunk@46775 -
This commit is contained in:
parent
23956e9f10
commit
acef1e22d3
@ -2872,7 +2872,7 @@ unit rgobj;
|
|||||||
all_weight,spill_weight,d: double;
|
all_weight,spill_weight,d: double;
|
||||||
begin
|
begin
|
||||||
max_weight:=1;
|
max_weight:=1;
|
||||||
for i:=0 to high(spillinfo) do
|
for i:=first_imaginary to maxreg-1 do
|
||||||
with reginfo[i] do
|
with reginfo[i] do
|
||||||
if weight>max_weight then
|
if weight>max_weight then
|
||||||
max_weight:=weight;
|
max_weight:=weight;
|
||||||
@ -2880,12 +2880,14 @@ unit rgobj;
|
|||||||
spillingcounter:=0;
|
spillingcounter:=0;
|
||||||
spill_weight:=0;
|
spill_weight:=0;
|
||||||
all_weight:=0;
|
all_weight:=0;
|
||||||
for i:=0 to high(spillinfo) do
|
for i:=first_imaginary to maxreg-1 do
|
||||||
with reginfo[i] do
|
with reginfo[i] do
|
||||||
begin
|
begin
|
||||||
d:=weight/max_weight*count_uses;
|
d:=weight/max_weight;
|
||||||
all_weight:=all_weight+d;
|
all_weight:=all_weight+d;
|
||||||
if spillinfo[i].spilled then
|
if (weight>100) and
|
||||||
|
(i<=high(spillinfo)) and
|
||||||
|
spillinfo[i].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