* honour -Oonopeephole

git-svn-id: trunk@27106 -
This commit is contained in:
Jonas Maebe 2014-03-11 23:18:58 +00:00
parent 45e03d768e
commit 92fa75838e

View File

@ -267,6 +267,8 @@ Unit aopt;
pass_1; pass_1;
While Assigned(BlockStart) Do While Assigned(BlockStart) Do
Begin Begin
if (cs_opt_peephole in current_settings.optimizerswitches) then
begin
if pass = 0 then if pass = 0 then
PrePeepHoleOpts; PrePeepHoleOpts;
{ Peephole optimizations } { Peephole optimizations }
@ -274,6 +276,7 @@ Unit aopt;
{ Only perform them twice in the first pass } { Only perform them twice in the first pass }
if pass = 0 then if pass = 0 then
PeepHoleOptPass1; PeepHoleOptPass1;
end;
If (cs_opt_asmcse in current_settings.optimizerswitches) Then If (cs_opt_asmcse in current_settings.optimizerswitches) Then
Begin Begin
// DFA:=TAOptDFACpu.Create(AsmL,BlockStart,BlockEnd,LabelInfo); // DFA:=TAOptDFACpu.Create(AsmL,BlockStart,BlockEnd,LabelInfo);
@ -283,9 +286,12 @@ Unit aopt;
{ CSE;} { CSE;}
End; End;
{ more peephole optimizations } { more peephole optimizations }
if (cs_opt_peephole in current_settings.optimizerswitches) then
begin
PeepHoleOptPass2; PeepHoleOptPass2;
{ if pass = last_pass then } { if pass = last_pass then }
PostPeepHoleOpts; PostPeepHoleOpts;
end;
{ free memory } { free memory }
clear; clear;
{ continue where we left off, BlockEnd is either the start of an } { continue where we left off, BlockEnd is either the start of an }