mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 13:30:33 +02:00
* The label which is generated by traisenode is not a jump target. Mark
this label as nf_internal, which means the label does not impact the
code flow. This leads to a much better register allocation.
(cherry picked from commit e04df465ef
)
This commit is contained in:
parent
fb672fe645
commit
41c9661d6d
@ -512,8 +512,8 @@ implementation
|
||||
procedure tcglabelnode.pass_generate_code;
|
||||
begin
|
||||
location_reset(location,LOC_VOID,OS_NO);
|
||||
|
||||
include(flowcontrol,fc_gotolabel);
|
||||
if not (nf_internal in flags) then
|
||||
include(flowcontrol,fc_gotolabel);
|
||||
{$ifdef OLDREGVARS}
|
||||
load_all_regvars(current_asmdata.CurrAsmList);
|
||||
{$endif OLDREGVARS}
|
||||
|
@ -2118,7 +2118,8 @@ implementation
|
||||
result:=nil;
|
||||
expectloc:=LOC_VOID;
|
||||
|
||||
include(current_procinfo.flags,pi_has_label);
|
||||
if not (nf_internal in flags) then
|
||||
include(current_procinfo.flags,pi_has_label);
|
||||
|
||||
if assigned(labsym) and labsym.nonlocal then
|
||||
begin
|
||||
@ -2223,6 +2224,7 @@ implementation
|
||||
begin
|
||||
third:=cinlinenode.create(in_get_frame,false,nil);
|
||||
current_addr:=clabelnode.create(cnothingnode.create,clabelsym.create('$raiseaddr'));
|
||||
current_addr.toggleflag(nf_internal);
|
||||
addstatement(statements,current_addr);
|
||||
right:=caddrnode.create(cloadnode.create(current_addr.labsym,current_addr.labsym.owner));
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user