mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 13:11:06 +02:00
+ introduces vo_volatile for variables, the node cse optimizer takes care of it
git-svn-id: trunk@16851 -
This commit is contained in:
parent
726339c443
commit
1fef7e4b6c
@ -57,12 +57,12 @@ unit optcse;
|
|||||||
procinfo,
|
procinfo,
|
||||||
nbas,nld,ninl,ncal,ncnv,nadd,
|
nbas,nld,ninl,ncal,ncnv,nadd,
|
||||||
pass_1,
|
pass_1,
|
||||||
symconst,symtype,symdef,
|
symconst,symtype,symdef,symsym,
|
||||||
defutil,
|
defutil,
|
||||||
optbase;
|
optbase;
|
||||||
|
|
||||||
const
|
const
|
||||||
cseinvariant : set of tnodetype = [loadn,addn,muln,subn,divn,slashn,modn,andn,orn,xorn,notn,vecn,
|
cseinvariant : set of tnodetype = [addn,muln,subn,divn,slashn,modn,andn,orn,xorn,notn,vecn,
|
||||||
derefn,equaln,unequaln,ltn,gtn,lten,gten,typeconvn,subscriptn,
|
derefn,equaln,unequaln,ltn,gtn,lten,gten,typeconvn,subscriptn,
|
||||||
inn,symdifn,shrn,shln,ordconstn,realconstn,unaryminusn,pointerconstn,stringconstn,setconstn,
|
inn,symdifn,shrn,shln,ordconstn,realconstn,unaryminusn,pointerconstn,stringconstn,setconstn,
|
||||||
isn,asn,starstarn,nothingn,temprefn,loadparentfpn {,callparan}];
|
isn,asn,starstarn,nothingn,temprefn,loadparentfpn {,callparan}];
|
||||||
@ -72,6 +72,10 @@ unit optcse;
|
|||||||
if (n.nodetype in cseinvariant) or
|
if (n.nodetype in cseinvariant) or
|
||||||
((n.nodetype=inlinen) and
|
((n.nodetype=inlinen) and
|
||||||
(tinlinenode(n).inlinenumber in [in_assigned_x])
|
(tinlinenode(n).inlinenumber in [in_assigned_x])
|
||||||
|
) or
|
||||||
|
((n.nodetype=loadn) and
|
||||||
|
not((tloadnode(n).symtableentry.typ in [staticvarsym,localvarsym,paravarsym]) and
|
||||||
|
(vo_volatile in tabstractvarsym(tloadnode(n).symtableentry).varoptions))
|
||||||
) then
|
) then
|
||||||
result:=fen_true
|
result:=fen_true
|
||||||
else
|
else
|
||||||
|
@ -422,7 +422,8 @@ type
|
|||||||
{ Objective-C message selector parameter }
|
{ Objective-C message selector parameter }
|
||||||
vo_is_msgsel,
|
vo_is_msgsel,
|
||||||
{ first field of variant part of a record }
|
{ first field of variant part of a record }
|
||||||
vo_is_first_field
|
vo_is_first_field,
|
||||||
|
vo_volatile
|
||||||
);
|
);
|
||||||
tvaroptions=set of tvaroption;
|
tvaroptions=set of tvaroption;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user