* renamed pi_has_goto into pi_has_label because the problematic thing is if a procedure has a label as target and not if it has some goto

* moved inclusion of pi_has_label to tlabelnode.pass_1

git-svn-id: trunk@15712 -
This commit is contained in:
florian 2010-08-05 19:22:12 +00:00
parent 24fea58b92
commit ad23569cf1
6 changed files with 14 additions and 12 deletions

View File

@ -417,8 +417,8 @@ interface
pi_uses_static_symtable,
{ set if the procedure has to push parameters onto the stack }
pi_has_stackparameter,
{ set if the procedure has at least one got }
pi_has_goto,
{ set if the procedure has at least one label }
pi_has_label,
{ calls itself recursive }
pi_is_recursive,
{ stack frame optimization not possible (only on x86 probably) }

View File

@ -492,7 +492,7 @@ interface
LOC_REGISTER:
begin
if not(cs_opt_regvar in current_settings.optimizerswitches) or
(pi_has_goto in current_procinfo.flags) then
(pi_has_label in current_procinfo.flags) then
begin
{ make sure the register allocator doesn't reuse the }
{ register e.g. in the middle of a loop }
@ -515,7 +515,7 @@ interface
LOC_FPUREGISTER:
begin
if not(cs_opt_regvar in current_settings.optimizerswitches) or
(pi_has_goto in current_procinfo.flags) then
(pi_has_label in current_procinfo.flags) then
begin
{ make sure the register allocator doesn't reuse the }
{ register e.g. in the middle of a loop }
@ -530,7 +530,7 @@ interface
LOC_MMREGISTER:
begin
if not(cs_opt_regvar in current_settings.optimizerswitches) or
(pi_has_goto in current_procinfo.flags) then
(pi_has_label in current_procinfo.flags) then
begin
{ make sure the register allocator doesn't reuse the }
{ register e.g. in the middle of a loop }

View File

@ -108,7 +108,7 @@ implementation
procedure tcgwhilerepeatnode.sync_regvars(checkusedregvars: boolean);
begin
if (cs_opt_regvar in current_settings.optimizerswitches) and
not(pi_has_goto in current_procinfo.flags) then
not(pi_has_label in current_procinfo.flags) then
begin
if checkusedregvars then
begin
@ -390,7 +390,7 @@ implementation
procedure tcgfornode.sync_regvars(checkusedregvars: boolean);
begin
if (cs_opt_regvar in current_settings.optimizerswitches) and
not(pi_has_goto in current_procinfo.flags) then
not(pi_has_label in current_procinfo.flags) then
begin
if checkusedregvars then
begin

View File

@ -1775,7 +1775,7 @@ implementation
begin
if allocreg then
gen_alloc_regloc(list,sym.initialloc);
if (pi_has_goto in current_procinfo.flags) then
if (pi_has_label in current_procinfo.flags) then
begin
{ Allocate register already, to prevent first allocation to be
inside a loop }
@ -2905,7 +2905,7 @@ implementation
in the parent procedures }
case localloc.loc of
LOC_CREGISTER :
if (pi_has_goto in current_procinfo.flags) then
if (pi_has_label in current_procinfo.flags) then
{$ifndef cpu64bitalu}
if def_cgsize(vardef) in [OS_64,OS_S64] then
begin
@ -2917,7 +2917,7 @@ implementation
cg.a_reg_sync(list,localloc.register);
LOC_CFPUREGISTER,
LOC_CMMREGISTER:
if (pi_has_goto in current_procinfo.flags) then
if (pi_has_label in current_procinfo.flags) then
cg.a_reg_sync(list,localloc.register);
LOC_REFERENCE :
begin

View File

@ -1684,7 +1684,6 @@ implementation
begin
result:=nil;
expectloc:=LOC_VOID;
include(current_procinfo.flags,pi_has_goto);
{ The labelnode can already be set when
this node was copied }
@ -1828,6 +1827,9 @@ implementation
begin
result:=nil;
expectloc:=LOC_VOID;
include(current_procinfo.flags,pi_has_label);
if assigned(left) then
firstpass(left);
if (m_iso in current_settings.modeswitches) and

View File

@ -948,7 +948,7 @@ implementation
if (cs_opt_loopstrength in current_settings.optimizerswitches)
{ our induction variable strength reduction doesn't like
for loops with more than one entry }
and not(pi_has_goto in current_procinfo.flags) then
and not(pi_has_label in current_procinfo.flags) then
begin
{RedoDFA:=}OptimizeInductionVariables(code);
end;