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

git-svn-id: trunk@26623 -
This commit is contained in:
florian 2014-01-30 17:19:01 +00:00
parent c4a981fa8e
commit fc7dc9e54c

View File

@ -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