瀏覽代碼

* work with actualtargetnode when checking load nodes for cse

git-svn-id: trunk@25434 -
florian 12 年之前
父節點
當前提交
b4481544ef
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      compiler/optcse.pas

+ 3 - 3
compiler/optcse.pas

@@ -178,10 +178,10 @@ unit optcse;
               load nodes are not considered if they load para or local symbols from the
               load nodes are not considered if they load para or local symbols from the
               current stack frame, those are in registers anyways if possible
               current stack frame, those are in registers anyways if possible
             }
             }
-            (not(n.nodetype=loadn) or
-             not(tloadnode(n).symtableentry.typ in [paravarsym,localvarsym,staticvarsym]) or
+            (not(actualtargetnode(@n)^.nodetype=loadn) or
+             not(tloadnode(actualtargetnode(@n)^).symtableentry.typ in [paravarsym,localvarsym,staticvarsym]) or
              { apply cse on non-regable static variables }
              { apply cse on non-regable static variables }
-             ((tloadnode(n).symtableentry.typ=staticvarsym) and (tstaticvarsym(tloadnode(n).symtableentry).varregable=vr_none)) or
+             ((tloadnode(actualtargetnode(@n)^).symtableentry.typ=staticvarsym) and (tstaticvarsym(tloadnode(actualtargetnode(@n)^).symtableentry).varregable=vr_none)) or
              (node_complexity(n)>1)
              (node_complexity(n)>1)
             ) and
             ) and