* spill coalesce uses get_alias

git-svn-id: trunk@36359 -
This commit is contained in:
florian 2017-05-28 08:59:49 +00:00
parent 6a22c5afae
commit 344970879e

View File

@ -22,15 +22,18 @@
{$i fpcdefs.inc} {$i fpcdefs.inc}
{ $define DEBUG_REGALLOC} { $define DEBUG_REGALLOC}
{ $define DEBUG_SPILLCOALESCE} {$define DEBUG_SPILLCOALESCE}
{ $define DEBUG_REGISTERLIFE}
{ Allow duplicate allocations, can be used to get the .s file written }
{ $define ALLOWDUPREG}
{$ifdef DEBUG_REGALLOC} {$ifdef DEBUG_REGALLOC}
{$define EXTDEBUG} {$define EXTDEBUG}
{$endif DEBUG_REGALLOC} {$endif DEBUG_REGALLOC}
{ Allow duplicate allocations, can be used to get the .s file written }
{ $define ALLOWDUPREG}
unit rgobj; unit rgobj;
interface interface
@ -2105,10 +2108,10 @@ unit rgobj;
x:=Tmoveins(reginfo[t].movelist^.data[j]).x; x:=Tmoveins(reginfo[t].movelist^.data[j]).x;
y:=Tmoveins(reginfo[t].movelist^.data[j]).y; y:=Tmoveins(reginfo[t].movelist^.data[j]).y;
if (x=t) and if (x=t) and
(spillinfo[y].spilled) and (spillinfo[get_alias(y)].spilled) and
not(spillinfo[y].interferences[0,t]) then not(spillinfo[get_alias(y)].interferences[0,t]) then
begin begin
spill_temps^[t]:=spillinfo[y].spilllocation; spill_temps^[t]:=spillinfo[get_alias(y)].spilllocation;
{$ifdef DEBUG_SPILLCOALESCE} {$ifdef DEBUG_SPILLCOALESCE}
writeln('trgobj.spill_registers: Spill coalesce ',t,' to ',y); writeln('trgobj.spill_registers: Spill coalesce ',t,' to ',y);
{$endif DEBUG_SPILLCOALESCE} {$endif DEBUG_SPILLCOALESCE}
@ -2116,13 +2119,13 @@ unit rgobj;
break; break;
end end
else if (y=t) and else if (y=t) and
(spillinfo[x].spilled) and (spillinfo[get_alias(x)].spilled) and
not(spillinfo[x].interferences[0,t]) then not(spillinfo[get_alias(x)].interferences[0,t]) then
begin begin
{$ifdef DEBUG_SPILLCOALESCE} {$ifdef DEBUG_SPILLCOALESCE}
writeln('trgobj.spill_registers: Spill coalesce ',t,' to ',x); writeln('trgobj.spill_registers: Spill coalesce ',t,' to ',x);
{$endif DEBUG_SPILLCOALESCE} {$endif DEBUG_SPILLCOALESCE}
spill_temps^[t]:=spillinfo[x].spilllocation; spill_temps^[t]:=spillinfo[get_alias(x)].spilllocation;
getnewspillloc:=false; getnewspillloc:=false;
break; break;
end; end;