mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 11:29:16 +02:00
* move more node tree optimizations to tcgprocinfo.OptimizeNodeTree
This commit is contained in:
parent
b3bf183fd3
commit
d2921dfb55
@ -1274,6 +1274,12 @@ implementation
|
|||||||
(procdef.proctypeoption in [potype_operator,potype_procedure,potype_function]) and
|
(procdef.proctypeoption in [potype_operator,potype_procedure,potype_function]) and
|
||||||
(code.nodetype=blockn) and (tblocknode(code).statements=nil) then
|
(code.nodetype=blockn) and (tblocknode(code).statements=nil) then
|
||||||
procdef.isempty:=true;
|
procdef.isempty:=true;
|
||||||
|
|
||||||
|
if cs_opt_nodecse in current_settings.optimizerswitches then
|
||||||
|
do_optcse(code);
|
||||||
|
|
||||||
|
if cs_opt_use_load_modify_store in current_settings.optimizerswitches then
|
||||||
|
do_optloadmodifystore(code);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1941,12 +1947,6 @@ implementation
|
|||||||
{ add implicit entry and exit code }
|
{ add implicit entry and exit code }
|
||||||
add_entry_exit_code;
|
add_entry_exit_code;
|
||||||
|
|
||||||
if cs_opt_nodecse in current_settings.optimizerswitches then
|
|
||||||
do_optcse(code);
|
|
||||||
|
|
||||||
if cs_opt_use_load_modify_store in current_settings.optimizerswitches then
|
|
||||||
do_optloadmodifystore(code);
|
|
||||||
|
|
||||||
{ only do secondpass if there are no errors }
|
{ only do secondpass if there are no errors }
|
||||||
if (ErrorCount<>0) then
|
if (ErrorCount<>0) then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user