* turning on peephole optimizations no longer turns on cse as well

* -O3 again performs multiple cse passes

git-svn-id: trunk@3915 -
This commit is contained in:
Jonas Maebe 2006-06-21 18:55:48 +00:00
parent df973fa1de
commit fc3fb54f7c
2 changed files with 5 additions and 5 deletions

View File

@ -46,7 +46,7 @@ Var
pass: longint;
slowopt, changed, lastLoop: boolean;
Begin
slowopt := (cs_opt_asmcse in aktoptimizerswitches);
slowopt := (cs_opt_level3 in aktoptimizerswitches);
pass := 0;
changed := false;
dfa := TDFAObj.create(asml);
@ -72,7 +72,7 @@ Begin
if pass = 0 then
PeepHoleOptPass1(AsmL, BlockStart, BlockEnd);
{ Data flow analyzer }
If (cs_opt_peephole in aktoptimizerswitches) Then
If (cs_opt_asmcse in aktoptimizerswitches) Then
begin
if dfa.pass_2 then
{ common subexpression elimination }

View File

@ -2254,10 +2254,10 @@ end;
function CSE(asml: TAsmList; First, Last: tai; pass: longint): boolean;
begin
doCSE(asml, First, Last, not(cs_opt_asmcse in aktoptimizerswitches) or (pass >= 2),
not(cs_opt_asmcse in aktoptimizerswitches) or (pass >= 1));
doCSE(asml, First, Last, not(cs_opt_level3 in aktoptimizerswitches) or (pass >= 2),
not(cs_opt_level3 in aktoptimizerswitches) or (pass >= 1));
{ register renaming }
if not(cs_opt_asmcse in aktoptimizerswitches) or (pass > 0) then
if not(cs_opt_level3 in aktoptimizerswitches) or (pass > 0) then
doRenaming(asml, first, last);
cse := removeInstructs(asml, first, last);
end;