* fix for Mantis #36935: apply patch by J. Gareth Moreton to fix a typo in cs_opt_remove_empty_proc

git-svn-id: trunk@44888 -
This commit is contained in:
svenbarth 2020-04-20 18:42:30 +00:00
parent 752ff32333
commit 068f0d2ec8
5 changed files with 6 additions and 6 deletions

View File

@ -338,7 +338,7 @@ interface
}
cs_opt_dead_values,
{ compiler checks for empty procedures/methods and removes calls to them if possible }
cs_opt_remove_emtpy_proc,
cs_opt_remove_empty_proc,
cs_opt_constant_propagate,
cs_opt_dead_store_eliminate,
cs_opt_forcenostackframe,
@ -425,7 +425,7 @@ interface
{ switches being applied to all CPUs at the given level }
genericlevel1optimizerswitches = [cs_opt_level1,cs_opt_peephole];
genericlevel2optimizerswitches = [cs_opt_level2,cs_opt_remove_emtpy_proc];
genericlevel2optimizerswitches = [cs_opt_level2,cs_opt_remove_empty_proc];
genericlevel3optimizerswitches = [cs_opt_level3,cs_opt_constant_propagate,cs_opt_nodedfa{$ifndef llvm},cs_opt_use_load_modify_store{$endif},cs_opt_loopunroll];
genericlevel4optimizerswitches = [cs_opt_level4,cs_opt_reorder_fields,cs_opt_dead_values,cs_opt_fastmath];

View File

@ -4353,7 +4353,7 @@ implementation
end;
{ can we get rid of the call? }
if (cs_opt_remove_emtpy_proc in current_settings.optimizerswitches) and
if (cs_opt_remove_empty_proc in current_settings.optimizerswitches) and
not(cnf_return_value_used in callnodeflags) and
(procdefinition.typ=procdef) and
tprocdef(procdefinition).isempty and

View File

@ -980,7 +980,7 @@ implementation
procname:='FPC_ABSTRACTERROR';
generate_abstract_stub(current_asmdata.AsmLists[al_procedures],vmtpd);
end
else if (cs_opt_remove_emtpy_proc in current_settings.optimizerswitches) and RedirectToEmpty(vmtpd) then
else if (cs_opt_remove_empty_proc in current_settings.optimizerswitches) and RedirectToEmpty(vmtpd) then
begin
procname:='FPC_EMPTYMETHOD';
if current_module.globalsymtable<>systemunit then

View File

@ -1233,7 +1233,7 @@ implementation
if (pi_dfaavailable in flags) and (cs_opt_dead_store_eliminate in current_settings.optimizerswitches) then
do_optdeadstoreelim(code);
if (cs_opt_remove_emtpy_proc in current_settings.optimizerswitches) and
if (cs_opt_remove_empty_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
procdef.isempty:=true;

View File

@ -2419,7 +2419,7 @@ const
}
'cs_opt_dead_values',
{ compiler checks for empty procedures/methods and removes calls to them if possible }
'cs_opt_remove_emtpy_proc',
'cs_opt_remove_empty_proc',
'cs_opt_constant_propagate',
'cs_opt_dead_store_eliminate',
'cs_opt_forcenostackframe',