* 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:
yury 2020-09-05 16:06:41 +00:00
parent 23956e9f10
commit acef1e22d3

View File

@ -2872,7 +2872,7 @@ unit rgobj;
all_weight,spill_weight,d: double;
begin
max_weight:=1;
for i:=0 to high(spillinfo) do
for i:=first_imaginary to maxreg-1 do
with reginfo[i] do
if weight>max_weight then
max_weight:=weight;
@ -2880,12 +2880,14 @@ unit rgobj;
spillingcounter:=0;
spill_weight:=0;
all_weight:=0;
for i:=0 to high(spillinfo) do
for i:=first_imaginary to maxreg-1 do
with reginfo[i] do
begin
d:=weight/max_weight*count_uses;
d:=weight/max_weight;
all_weight:=all_weight+d;
if spillinfo[i].spilled then
if (weight>100) and
(i<=high(spillinfo)) and
spillinfo[i].spilled then
begin
inc(spillingcounter);
spill_weight:=spill_weight+d;