Browse Source

* load nodes for variables in registers do not generated instructions, so their complexity is zero

git-svn-id: trunk@43319 -
florian 5 years ago
parent
commit
b7f58dd8c8
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/nutils.pas

+ 2 - 1
compiler/nutils.pas

@@ -777,7 +777,8 @@ implementation
                   if (tloadnode(p).symtableentry.typ=staticvarsym) and
                      (vo_is_thread_var in tstaticvarsym(tloadnode(p).symtableentry).varoptions) then
                     inc(result,5)
-                  else
+                  else if not((tloadnode(p).symtableentry.typ in [staticvarsym,localvarsym,paravarsym,fieldvarsym]) and
+                    (tabstractvarsym(tloadnode(p).symtableentry).varregable in [vr_intreg,vr_mmreg,vr_fpureg])) then
                     inc(result);
                   if (tloadnode(p).symtableentry.typ=paravarsym) and tloadnode(p).is_addr_param_load then
                     inc(result);