mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-25 19:29:33 +02:00
* Add extra calls to get_alias to properly recognize coalesced
registers to be spilled. git-svn-id: trunk@4997 -
This commit is contained in:
parent
e1faef3ec9
commit
01afee1f73
@ -162,6 +162,7 @@ unit rgobj;
|
||||
{ can be overriden to add cpu specific interferences }
|
||||
procedure add_cpu_interferences(p : tai);virtual;
|
||||
procedure add_constraints(reg:Tregister);virtual;
|
||||
function get_alias(n:Tsuperregister):Tsuperregister;
|
||||
function getregisterinline(list:TAsmList;subreg:Tsubregister):Tregister;
|
||||
procedure ungetregisterinline(list:TAsmList;r:Tregister);
|
||||
function get_spill_subreg(r : tregister) : tsubregister;virtual;
|
||||
@ -225,7 +226,6 @@ unit rgobj;
|
||||
procedure enable_moves(n:Tsuperregister);
|
||||
procedure decrement_degree(m:Tsuperregister);
|
||||
procedure simplify;
|
||||
function get_alias(n:Tsuperregister):Tsuperregister;
|
||||
procedure add_worklist(u:Tsuperregister);
|
||||
function adjacent_ok(u,v:Tsuperregister):boolean;
|
||||
function conservative(u,v:Tsuperregister):boolean;
|
||||
@ -1818,7 +1818,7 @@ unit rgobj;
|
||||
supreg : tsuperregister;
|
||||
begin
|
||||
tmpindex := regindex;
|
||||
supreg:=getsupreg(reg);
|
||||
supreg:=get_alias(getsupreg(reg));
|
||||
{ did we already encounter this register? }
|
||||
for i := 0 to pred(regindex) do
|
||||
if (regs[i].orgreg = supreg) then
|
||||
@ -1856,7 +1856,7 @@ unit rgobj;
|
||||
i: longint;
|
||||
supreg: tsuperregister;
|
||||
begin
|
||||
supreg:=getsupreg(reg);
|
||||
supreg:=get_alias(getsupreg(reg));
|
||||
for i:=0 to pred(regindex) do
|
||||
if (regs[i].mustbespilled) and
|
||||
(regs[i].orgreg=supreg) then
|
||||
|
@ -139,11 +139,11 @@ implementation
|
||||
begin
|
||||
{ One of the arguments shall be able to be replaced }
|
||||
if (getregtype(oper[0]^.reg)=regtype) and
|
||||
(getsupreg(oper[0]^.reg)=orgreg) then
|
||||
(get_alias(getsupreg(oper[0]^.reg))=orgreg) then
|
||||
replaceoper:=0
|
||||
else
|
||||
if (getregtype(oper[1]^.reg)=regtype) and
|
||||
(getsupreg(oper[1]^.reg)=orgreg) then
|
||||
(get_alias(getsupreg(oper[1]^.reg))=orgreg) then
|
||||
replaceoper:=1
|
||||
else
|
||||
internalerror(200410106);
|
||||
|
Loading…
Reference in New Issue
Block a user