* during translation only process regalloc for the current regtype

This commit is contained in:
peter 2004-10-24 17:04:01 +00:00
parent 94caa0761e
commit 30be9e8e5d

View File

@ -1525,42 +1525,44 @@ unit rgobj;
ait_regalloc: ait_regalloc:
with Tai_regalloc(p) do with Tai_regalloc(p) do
begin begin
{ Only alloc/dealloc is needed for the optimizer, remove if (getregtype(reg)=regtype) then
other regalloc }
if not(ratype in [ra_alloc,ra_dealloc]) then
begin begin
q:=Tai(next); { Only alloc/dealloc is needed for the optimizer, remove
list.remove(p); other regalloc }
p.free; if not(ratype in [ra_alloc,ra_dealloc]) then
p:=q;
continue;
end
else
begin
if (getregtype(reg)=regtype) then
setsupreg(reg,reginfo[getsupreg(reg)].colour);
{
Remove sequences of release and
allocation of the same register like. Other combinations
of release/allocate need to stay in the list.
# Register X released
# Register X allocated
}
if assigned(previous) and
(ratype=ra_alloc) and
(Tai(previous).typ=ait_regalloc) and
(Tai_regalloc(previous).reg=reg) and
(Tai_regalloc(previous).ratype=ra_dealloc) then
begin begin
q:=Tai(next); q:=Tai(next);
hp:=tai(previous);
list.remove(hp);
hp.free;
list.remove(p); list.remove(p);
p.free; p.free;
p:=q; p:=q;
continue; continue;
end
else
begin
setsupreg(reg,reginfo[getsupreg(reg)].colour);
{
Remove sequences of release and
allocation of the same register like. Other combinations
of release/allocate need to stay in the list.
# Register X released
# Register X allocated
}
if assigned(previous) and
(ratype=ra_alloc) and
(Tai(previous).typ=ait_regalloc) and
(Tai_regalloc(previous).reg=reg) and
(Tai_regalloc(previous).ratype=ra_dealloc) then
begin
q:=Tai(next);
hp:=tai(previous);
list.remove(hp);
hp.free;
list.remove(p);
p.free;
p:=q;
continue;
end;
end; end;
end; end;
end; end;
@ -1992,7 +1994,10 @@ unit rgobj;
end. end.
{ {
$Log$ $Log$
Revision 1.143 2004-10-15 09:14:17 mazen Revision 1.144 2004-10-24 17:04:01 peter
* during translation only process regalloc for the current regtype
Revision 1.143 2004/10/15 09:14:17 mazen
- remove $IFDEF DELPHI and related code - remove $IFDEF DELPHI and related code
- remove $IFDEF FPCPROCVAR and related code - remove $IFDEF FPCPROCVAR and related code