mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 17:40:28 +02:00
+ TUsedRegs.Update parameter IgnoreNewAllocs so new allocs of registers can be ignored during update
git-svn-id: trunk@22188 -
This commit is contained in:
parent
b6608e716b
commit
07e26cfb12
@ -80,7 +80,7 @@ Unit AoptObj;
|
||||
Procedure Clear;
|
||||
{ update the info with the pairegalloc objects coming after
|
||||
p }
|
||||
Procedure Update(p: Tai);
|
||||
procedure Update(p: Tai; IgnoreNewAllocs: Boolean=false);
|
||||
{ is Reg currently in use }
|
||||
Function IsUsed(Reg: TRegister): Boolean;
|
||||
{ get all the currently used registers }
|
||||
@ -357,7 +357,7 @@ Unit AoptObj;
|
||||
{
|
||||
updates UsedRegs with the RegAlloc Information coming after P
|
||||
}
|
||||
Procedure TUsedRegs.Update(p: Tai);
|
||||
Procedure TUsedRegs.Update(p: Tai;IgnoreNewAllocs : Boolean = false);
|
||||
Begin
|
||||
{ this code is normally not used because updating the register allocation information is done in
|
||||
TAOptObj.UpdateUsedRegs for speed reasons }
|
||||
@ -376,7 +376,8 @@ Unit AoptObj;
|
||||
begin
|
||||
case tai_regalloc(p).ratype of
|
||||
ra_alloc :
|
||||
Include(UsedRegs, getsupreg(tai_regalloc(p).reg));
|
||||
if not(IgnoreNewAllocs) then
|
||||
Include(UsedRegs, getsupreg(tai_regalloc(p).reg));
|
||||
ra_dealloc :
|
||||
Exclude(UsedRegs, getsupreg(tai_regalloc(p).reg));
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user