mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-28 05:41:41 +01:00
* fix reg. allocs even for procedures without labels
git-svn-id: trunk@21309 -
This commit is contained in:
parent
17dd362a5a
commit
8832a34b67
@ -119,10 +119,12 @@ Unit aopt;
|
||||
Begin
|
||||
CreateUsedRegs(Regs);
|
||||
With LabelInfo^ Do
|
||||
begin
|
||||
If (LabelDif <> 0) Then
|
||||
Begin
|
||||
GetMem(LabelTable, LabelDif*SizeOf(TLabelTableItem));
|
||||
FillChar(LabelTable^, LabelDif*SizeOf(TLabelTableItem), 0);
|
||||
end;
|
||||
p := BlockStart;
|
||||
While (P <> BlockEnd) Do
|
||||
Begin
|
||||
@ -211,7 +213,7 @@ Unit aopt;
|
||||
(p.typ in (SkipInstr - [ait_regalloc])) Do
|
||||
P := tai(P.Next)
|
||||
End;
|
||||
End;
|
||||
end;
|
||||
ReleaseUsedRegs(Regs);
|
||||
End;
|
||||
|
||||
@ -227,6 +229,7 @@ Unit aopt;
|
||||
LabelInfo^.highlabel:=0;
|
||||
end;
|
||||
|
||||
|
||||
procedure tasmoptimizer.pass_1;
|
||||
begin
|
||||
findlohilabels;
|
||||
@ -290,8 +293,11 @@ Unit aopt;
|
||||
End;
|
||||
End;
|
||||
|
||||
|
||||
Destructor TAsmOptimizer.Destroy;
|
||||
Begin
|
||||
if assigned(LabelInfo^.LabelTable) then
|
||||
Freemem(LabelInfo^.LabelTable);
|
||||
Dispose(LabelInfo)
|
||||
End;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user