From 80facfa0bf6b866c9ca14d2222f3631f8f7caa54 Mon Sep 17 00:00:00 2001
From: yury <jura@cp-lab.com>
Date: Thu, 23 Jul 2020 12:45:40 +0000
Subject: [PATCH] * Fixed indentations of the interference graph. * Added
 register names to the interference graph.

git-svn-id: trunk@45832 -
---
 compiler/rgobj.pas | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/compiler/rgobj.pas b/compiler/rgobj.pas
index 993bf23664..608a1189b2 100644
--- a/compiler/rgobj.pas
+++ b/compiler/rgobj.pas
@@ -710,25 +710,33 @@ unit rgobj;
 
     var f:text;
         i,j:cardinal;
-
+        sr:TSubRegister;
     begin
       assign(f,current_procinfo.procdef.mangledname+'_igraph'+tostr(loopidx));
       rewrite(f);
       writeln(f,'Interference graph of ',current_procinfo.procdef.fullprocname(true));
-      writeln(f,'First imaginary register is ',first_imaginary,' ($',hexstr(first_imaginary,2),')');
+      writeln(f,'Register type: ',regtype,', First imaginary register is ',first_imaginary,' ($',hexstr(first_imaginary,2),')');
       writeln(f);
-      write(f,'                  ');
+      write(f,'                                   ');
       for i:=0 to maxreg div 16 do
         for j:=0 to 15 do
           write(f,hexstr(i,1));
       writeln(f);
-      write(f,'Weight Degree     ');
+      write(f,'Weight Degree Uses   IntfCnt       ');
       for i:=0 to maxreg div 16 do
         write(f,'0123456789ABCDEF');
       writeln(f);
+      if regtype=R_INTREGISTER then
+        sr:=R_SUBWHOLE
+      else
+        sr:=R_SUBNONE;
       for i:=0 to maxreg-1 do
         begin
-          write(f,reginfo[i].weight:5,'  ',reginfo[i].degree:5,'  ',reginfo[i].count_uses:5,'  ',reginfo[i].total_interferences:5,'  ',hexstr(i,2):4);
+          write(f,reginfo[i].weight:5,'  ',reginfo[i].degree:5,'  ',reginfo[i].count_uses:5,'  ',reginfo[i].total_interferences:5,'  ');
+          if findreg_by_number(newreg(regtype,TSuperRegister(i),sr))<>0 then
+            write(f,std_regname(newreg(regtype,TSuperRegister(i),sr))+':'+hexstr(i,2):7)
+          else
+            write(f,'   ',hexstr(i,2):4);
           for j:=0 to maxreg-1 do
             if ibitmap[i,j] then
               write(f,'*')