mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-03 19:09:49 +01:00
* support disabling the i386 peephole optimizer with -Oonopeephole
git-svn-id: trunk@26673 -
This commit is contained in:
parent
9e4c130bc4
commit
ba5297be37
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user