Browse Source

* the register allocator always knows the exact number of the first imaginary
supreg of the current register type, so use that rather than the maximum of
all possible register types

git-svn-id: trunk@21623 -

Jonas Maebe 13 years ago
parent
commit
6f336a5d13
1 changed files with 3 additions and 1 deletions
  1. 3 1
      compiler/rgobj.pas

+ 3 - 1
compiler/rgobj.pas

@@ -1371,7 +1371,7 @@ unit rgobj;
           n:=coalescednodes.buf^[i-1];
           n:=coalescednodes.buf^[i-1];
           k:=get_alias(n);
           k:=get_alias(n);
           reginfo[n].colour:=reginfo[k].colour;
           reginfo[n].colour:=reginfo[k].colour;
-          if reginfo[k].colour<maxcpuregister then
+          if reginfo[k].colour<first_imaginary then
             include(used_in_proc,reginfo[k].colour);
             include(used_in_proc,reginfo[k].colour);
         end;
         end;
     end;
     end;
@@ -1567,6 +1567,7 @@ unit rgobj;
         p:=headertai;
         p:=headertai;
         while assigned(p) do
         while assigned(p) do
           begin
           begin
+            prefetch(pointer(p.next)^);
             if p.typ=ait_regalloc then
             if p.typ=ait_regalloc then
               with Tai_regalloc(p) do
               with Tai_regalloc(p) do
                 begin
                 begin
@@ -1632,6 +1633,7 @@ unit rgobj;
         p:=Tai(list.first);
         p:=Tai(list.first);
         while assigned(p) do
         while assigned(p) do
           begin
           begin
+            prefetch(pointer(p.next)^);
             case p.typ of
             case p.typ of
               ait_regalloc:
               ait_regalloc:
                 with Tai_regalloc(p) do
                 with Tai_regalloc(p) do