Pārlūkot izejas kodu

* do cse after the init/final code has been inserted, this might enable new cse opportunities

git-svn-id: trunk@26623 -
florian 11 gadi atpakaļ
vecāks
revīzija
fc7dc9e54c
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 3 3
      compiler/psub.pas

+ 3 - 3
compiler/psub.pas

@@ -1295,9 +1295,6 @@ implementation
             {RedoDFA:=}OptimizeInductionVariables(code);
           end;
 
-        if cs_opt_nodecse in current_settings.optimizerswitches then
-          do_optcse(code);
-
         if (cs_opt_remove_emtpy_proc in current_settings.optimizerswitches) and
           (procdef.proctypeoption in [potype_operator,potype_procedure,potype_function]) and
           (code.nodetype=blockn) and (tblocknode(code).statements=nil) then
@@ -1306,6 +1303,9 @@ implementation
         { add implicit entry and exit code }
         add_entry_exit_code;
 
+        if cs_opt_nodecse in current_settings.optimizerswitches then
+          do_optcse(code);
+
         { only do secondpass if there are no errors }
         if (ErrorCount=0) then
           begin