Jelajahi Sumber

- removed tabstractnormalvarsym.currentregloc: the new location will
always be different from the old location, since we just allocated
the registers for the new one above. Should the old registers ever
be needed again for tai_varloc: rr.old/rr.oldhi contains it

git-svn-id: trunk@34086 -

Jonas Maebe 9 tahun lalu
induk
melakukan
571d053a60
3 mengubah file dengan 3 tambahan dan 18 penghapusan
  1. 3 13
      compiler/hlcgobj.pas
  2. 0 1
      compiler/llvm/hlcgllvm.pas
  3. 0 4
      compiler/symsym.pas

+ 3 - 13
compiler/hlcgobj.pas

@@ -4301,13 +4301,9 @@ implementation
         begin
           n.location.register128.reglo := rr.new;
           n.location.register128.reghi := rr.newhi;
-          if assigned(rr.sym) and
-             ((rr.sym.currentregloc.register<>rr.new) or
-              (rr.sym.currentregloc.registerhi<>rr.newhi)) then
+          if assigned(rr.sym) then
             begin
               varloc:=tai_varloc.create128(rr.sym,rr.new,rr.newhi);
-              rr.sym.currentregloc.register:=rr.new;
-              rr.sym.currentregloc.registerHI:=rr.newhi;
               list.concat(varloc);
             end;
         end
@@ -4317,13 +4313,9 @@ implementation
         begin
           n.location.register64.reglo := rr.new;
           n.location.register64.reghi := rr.newhi;
-          if assigned(rr.sym) and
-             ((rr.sym.currentregloc.register<>rr.new) or
-              (rr.sym.currentregloc.registerhi<>rr.newhi)) then
+          if assigned(rr.sym) then
             begin
               varloc:=tai_varloc.create64(rr.sym,rr.new,rr.newhi);
-              rr.sym.currentregloc.register:=rr.new;
-              rr.sym.currentregloc.registerHI:=rr.newhi;
               list.concat(varloc);
             end;
         end
@@ -4331,10 +4323,9 @@ implementation
 {$endif cpu64bitalu}
         begin
           n.location.register := rr.new;
-          if assigned(rr.sym) and (rr.sym.currentregloc.register<>rr.new) then
+          if assigned(rr.sym) then
             begin
               varloc:=tai_varloc.create(rr.sym,rr.new);
-              rr.sym.currentregloc.register:=rr.new;
               list.concat(varloc);
             end;
         end;
@@ -4581,7 +4572,6 @@ implementation
           end;
         end;
       vs.localloc:=vs.initialloc;
-      FillChar(vs.currentregloc,sizeof(vs.currentregloc),0);
     end;
 
   procedure thlcgobj.paravarsym_set_initialloc_to_paraloc(vs: tparavarsym);

+ 0 - 1
compiler/llvm/hlcgllvm.pas

@@ -1943,7 +1943,6 @@ implementation
           end;
         end;
       vs.localloc:=vs.initialloc;
-      FillChar(vs.currentregloc,sizeof(vs.currentregloc),0);
     end;
 
 

+ 0 - 4
compiler/symsym.pas

@@ -235,8 +235,6 @@ interface
           localloc      : TLocation;
           { initial location so it can still be initialized later after the location was changed by SSA }
           initialloc    : TLocation;
-          { current registers for register variables with moving register numbers }
-          currentregloc  : TLocation;
           { migrated to a parentfpstruct because of nested access (not written to ppu, because not important and would change interface crc) }
           inparentfpstruct : boolean;
           { the variable is not living at entry of the scope, so it does not need to be initialized if it is a reg. var
@@ -1838,7 +1836,6 @@ implementation
       begin
          inherited create(st,n,vsp,def,vopts,doregister);
          fillchar(localloc,sizeof(localloc),0);
-         fillchar(currentregloc,sizeof(localloc),0);
          fillchar(initialloc,sizeof(initialloc),0);
          defaultconstsym:=nil;
       end;
@@ -1848,7 +1845,6 @@ implementation
       begin
          inherited ppuload(st,ppufile);
          fillchar(localloc,sizeof(localloc),0);
-         fillchar(currentregloc,sizeof(localloc),0);
          fillchar(initialloc,sizeof(initialloc),0);
          ppufile.getderef(defaultconstsymderef);
       end;