From fc7dc9e54c1bd7decac7a22cce1e05c8678531f5 Mon Sep 17 00:00:00 2001 From: florian <florian@freepascal.org> Date: Thu, 30 Jan 2014 17:19:01 +0000 Subject: [PATCH] * do cse after the init/final code has been inserted, this might enable new cse opportunities git-svn-id: trunk@26623 - --- compiler/psub.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/psub.pas b/compiler/psub.pas index a585d1f460..47ebb44e6d 100644 --- a/compiler/psub.pas +++ b/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