OSDN Git Service

* sched-vis.c (MAX_VISUAL_NO_UNIT): Define.
authorgrahams <grahams@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Aug 2001 13:32:57 +0000 (13:32 +0000)
committergrahams <grahams@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Aug 2001 13:32:57 +0000 (13:32 +0000)
        (vis_no_unit): Use it.
        (visualize_no_unit): Add the insn only if room exists.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44739 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/sched-vis.c

index 3efda2c..fd0a9e6 100644 (file)
@@ -1,5 +1,11 @@
 2001-08-09  Graham Stott  <grahams@redhat.com>
 
+       * sched-vis.c (MAX_VISUAL_NO_UNIT): Define.
+       (vis_no_unit): Use it.
+       (visualize_no_unit): Add the insn only if room exists.
+
+2001-08-09  Graham Stott  <grahams@redhat.com>
+
        * predict.c (estimate_probability): Replace magic numbers with 
        appropriate enumeration.        
 
index 4aad9f9..ecd6fbd 100644 (file)
@@ -87,7 +87,8 @@ int n_visual_lines;
 static unsigned visual_tbl_line_length;
 char *visual_tbl;
 int n_vis_no_unit;
-rtx vis_no_unit[10];
+#define MAX_VISUAL_NO_UNIT 20
+rtx vis_no_unit[MAX_VISUAL_NO_UNIT];
 
 /* Finds units that are in use in this fuction.  Required only
    for visualization.  */
@@ -844,8 +845,11 @@ void
 visualize_no_unit (insn)
      rtx insn;
 {
-  vis_no_unit[n_vis_no_unit] = insn;
-  n_vis_no_unit++;
+  if (n_vis_no_unit < MAX_VISUAL_NO_UNIT)
+    {
+      vis_no_unit[n_vis_no_unit] = insn;
+      n_vis_no_unit++;
+    }
 }
 
 /* Print insns scheduled in clock, for visualization.  */