From 1b355ce1e4faa08d27f15d82adf2ebcf35285922 Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 25 Jan 2014 08:50:13 +0000 Subject: [PATCH] * apply cse to all non-regable variables if possible git-svn-id: trunk@26579 - --- compiler/optcse.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/optcse.pas b/compiler/optcse.pas index 9a88cdd8e8..8f85157c8a 100644 --- a/compiler/optcse.pas +++ b/compiler/optcse.pas @@ -180,8 +180,10 @@ unit optcse; } (not(actualtargetnode(@n)^.nodetype=loadn) or not(tloadnode(actualtargetnode(@n)^).symtableentry.typ in [paravarsym,localvarsym,staticvarsym]) or - { apply cse on non-regable static variables } - ((tloadnode(actualtargetnode(@n)^).symtableentry.typ=staticvarsym) and (tstaticvarsym(tloadnode(actualtargetnode(@n)^).symtableentry).varregable=vr_none)) or + { apply cse on non-regable variables } + ((tloadnode(actualtargetnode(@n)^).symtableentry.typ in [paravarsym,localvarsym,staticvarsym]) and + not(tabstractvarsym(tloadnode(actualtargetnode(@n)^).symtableentry).is_regvar(false)) and + not(vo_volatile in tabstractvarsym(tloadnode(actualtargetnode(@n)^).symtableentry).varoptions)) or (node_complexity(n)>1) ) and