mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-31 08:22:37 +02:00
+ tempinfo flag ti_no_final_regsync which prevents that the final reg. sync. is emitted
git-svn-id: trunk@34787 -
This commit is contained in:
parent
8c701eaa7b
commit
82e6e1eb34
@ -159,12 +159,16 @@ interface
|
||||
that temp is not deallocated until this temp is deleted (since
|
||||
otherwise the assigned value may be freed before the last use of
|
||||
the temp) }
|
||||
ti_const
|
||||
ti_const,
|
||||
{ the temp. needs no final sync instruction if it is located in a register,
|
||||
so there are no loops involved in the usage of the temp.
|
||||
}
|
||||
ti_no_final_regsync
|
||||
);
|
||||
ttempinfoflags = set of ttempinfoflag;
|
||||
|
||||
const
|
||||
tempinfostoreflags = [ti_may_be_in_reg,ti_addr_taken,ti_reference,ti_readonly];
|
||||
tempinfostoreflags = [ti_may_be_in_reg,ti_addr_taken,ti_reference,ti_readonly,ti_no_final_regsync];
|
||||
|
||||
type
|
||||
{ to allow access to the location by temp references even after the temp has }
|
||||
|
@ -567,8 +567,8 @@ interface
|
||||
LOC_CREGISTER,
|
||||
LOC_REGISTER:
|
||||
begin
|
||||
if not(cs_opt_regvar in current_settings.optimizerswitches) or
|
||||
(pi_has_label in current_procinfo.flags) then
|
||||
if (not(cs_opt_regvar in current_settings.optimizerswitches) or
|
||||
(pi_has_label in current_procinfo.flags)) and not(ti_no_final_regsync in tempflags) then
|
||||
begin
|
||||
{ make sure the register allocator doesn't reuse the }
|
||||
{ register e.g. in the middle of a loop }
|
||||
@ -632,8 +632,8 @@ interface
|
||||
LOC_CFPUREGISTER,
|
||||
LOC_FPUREGISTER:
|
||||
begin
|
||||
if not(cs_opt_regvar in current_settings.optimizerswitches) or
|
||||
(pi_has_label in current_procinfo.flags) then
|
||||
if (not(cs_opt_regvar in current_settings.optimizerswitches) or
|
||||
(pi_has_label in current_procinfo.flags)) and not(ti_no_final_regsync in tempflags) then
|
||||
begin
|
||||
{ make sure the register allocator doesn't reuse the }
|
||||
{ register e.g. in the middle of a loop }
|
||||
@ -647,8 +647,8 @@ interface
|
||||
LOC_CMMREGISTER,
|
||||
LOC_MMREGISTER:
|
||||
begin
|
||||
if not(cs_opt_regvar in current_settings.optimizerswitches) or
|
||||
(pi_has_label in current_procinfo.flags) then
|
||||
if (not(cs_opt_regvar in current_settings.optimizerswitches) or
|
||||
(pi_has_label in current_procinfo.flags)) and not(ti_no_final_regsync in tempflags) then
|
||||
begin
|
||||
{ make sure the register allocator doesn't reuse the }
|
||||
{ register e.g. in the middle of a loop }
|
||||
|
Loading…
Reference in New Issue
Block a user