* support disabling the i386 peephole optimizer with -Oonopeephole

git-svn-id: trunk@26673 -
This commit is contained in:
Jonas Maebe 2014-02-05 00:27:16 +00:00
parent 9e4c130bc4
commit ba5297be37

View File

@ -64,13 +64,16 @@ Begin
{ or nil }
While Assigned(BlockStart) Do
Begin
if pass = 0 then
PrePeepHoleOpts(AsmL, BlockStart, BlockEnd);
{ Peephole optimizations }
PeepHoleOptPass1(AsmL, BlockStart, BlockEnd);
{ Only perform them twice in the first pass }
if pass = 0 then
PeepHoleOptPass1(AsmL, BlockStart, BlockEnd);
if (cs_opt_peephole in current_settings.optimizerswitches) then
begin
if (pass = 0) then
PrePeepHoleOpts(AsmL, BlockStart, BlockEnd);
{ Peephole optimizations }
PeepHoleOptPass1(AsmL, BlockStart, BlockEnd);
{ Only perform them twice in the first pass }
if pass = 0 then
PeepHoleOptPass1(AsmL, BlockStart, BlockEnd);
end;
{ Data flow analyzer }
If (cs_opt_asmcse in current_settings.optimizerswitches) Then
begin
@ -79,9 +82,12 @@ Begin
changed := CSE(asmL, blockStart, blockEnd, pass) or changed;
end;
{ More peephole optimizations }
PeepHoleOptPass2(AsmL, BlockStart, BlockEnd);
if lastLoop then
PostPeepHoleOpts(AsmL, BlockStart, BlockEnd);
if (cs_opt_peephole in current_settings.optimizerswitches) then
begin
PeepHoleOptPass2(AsmL, BlockStart, BlockEnd);
if lastLoop then
PostPeepHoleOpts(AsmL, BlockStart, BlockEnd);
end;
{ Free memory }
dfa.clear;