mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 11:09:42 +02:00
* changed optimizer switches + cleanup of DestroyRefs in daopt386.pas
This commit is contained in:
parent
273fc24dbb
commit
f2da32cd91
@ -31,18 +31,27 @@ Procedure Optimize(AsmL: PAasmOutput);
|
||||
|
||||
Implementation
|
||||
|
||||
Uses i386, DAOpt386, POpt386, CSOpt386;
|
||||
Uses globals, i386, DAOpt386, POpt386, CSOpt386;
|
||||
|
||||
Procedure Optimize(AsmL: PAasmOutput);
|
||||
Var BlockEnd: Pai;
|
||||
Begin
|
||||
{setup labeltable, always necessary}
|
||||
DFAPass1(AsmL);
|
||||
{peephole optimizations}
|
||||
PeepHoleOptPass1(AsmL);
|
||||
PeepHoleOptPass1(AsmL);
|
||||
BlockEnd := DFAPass2(AsmL);
|
||||
If BlockEnd <> Nil Then
|
||||
CSE(AsmL, Pai(AsmL^.First), BlockEnd);
|
||||
{data flow analyzer}
|
||||
If (cs_slowoptimize in aktglobalswitches) Then
|
||||
Begin
|
||||
BlockEnd := DFAPass2(AsmL);
|
||||
If BlockEnd <> Nil Then
|
||||
{common subexpression elimination}
|
||||
CSE(AsmL, Pai(AsmL^.First), BlockEnd);
|
||||
End;
|
||||
{more peephole optimizations}
|
||||
PeepHoleOptPass2(AsmL);
|
||||
{dispose labeltabel}
|
||||
ShutDownDFA;
|
||||
End;
|
||||
|
||||
@ -50,7 +59,10 @@ End.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.21 1998-08-06 19:40:29 jonas
|
||||
Revision 1.22 1998-08-19 16:07:57 jonas
|
||||
* changed optimizer switches + cleanup of DestroyRefs in daopt386.pas
|
||||
|
||||
Revision 1.21 1998/08/06 19:40:29 jonas
|
||||
* removed $ before and after Log in comment
|
||||
|
||||
Revision 1.20 1998/08/05 16:00:08 florian
|
||||
|
@ -1126,7 +1126,7 @@ implementation
|
||||
{ but the registers must be different! }
|
||||
else if (pushedparasize=8) and
|
||||
not(cs_littlesize in aktglobalswitches) and
|
||||
(aktoptprocessor=pentium) and
|
||||
(aktoptprocessor=ClassP5) and
|
||||
(procinfo._class=nil) then
|
||||
begin
|
||||
exprasmlist^.concat(new(pai386,op_reg(A_POP,S_L,R_EDI)));
|
||||
@ -2314,7 +2314,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.16 1998-08-18 09:24:36 pierre
|
||||
Revision 1.17 1998-08-19 16:07:36 jonas
|
||||
* changed optimizer switches + cleanup of DestroyRefs in daopt386.pas
|
||||
|
||||
Revision 1.16 1998/08/18 09:24:36 pierre
|
||||
* small warning position bug fixed
|
||||
* support_mmx switches splitting was missing
|
||||
* rhide error and warning output corrected
|
||||
|
@ -732,11 +732,11 @@ implementation
|
||||
else
|
||||
max_linear_list:=2;
|
||||
{ a jump table crashes the pipeline! }
|
||||
if aktoptprocessor=int486 then
|
||||
if aktoptprocessor=Class386 then
|
||||
inc(max_linear_list,3);
|
||||
if aktoptprocessor=pentium then
|
||||
if aktoptprocessor=ClassP5 then
|
||||
inc(max_linear_list,6);
|
||||
if aktoptprocessor>=pentiumpro then
|
||||
if aktoptprocessor>=ClassP6 then
|
||||
inc(max_linear_list,9);
|
||||
|
||||
if (labels<=max_linear_list) then
|
||||
@ -782,7 +782,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.6 1998-08-18 09:24:39 pierre
|
||||
Revision 1.7 1998-08-19 16:07:38 jonas
|
||||
* changed optimizer switches + cleanup of DestroyRefs in daopt386.pas
|
||||
|
||||
Revision 1.6 1998/08/18 09:24:39 pierre
|
||||
* small warning position bug fixed
|
||||
* support_mmx switches splitting was missing
|
||||
* rhide error and warning output corrected
|
||||
|
@ -1259,7 +1259,7 @@ implementation
|
||||
else
|
||||
begin
|
||||
{ quick hack, to overcome Delphi 2 }
|
||||
if (cs_maxoptimize in aktglobalswitches) and
|
||||
if ( |