]> gcc.gnu.org Git - gcc.git/commitdiff
loop.c (loop_number): Delete function.
authorJeffrey A Law <law@cygnus.com>
Mon, 22 Sep 1997 03:04:36 +0000 (03:04 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 22 Sep 1997 03:04:36 +0000 (21:04 -0600)
        * loop.c (loop_number): Delete function.  Change all references
        to use uid_loop_num array.
        * loop.h (loop_number): Delete declaration.
        * unroll.c (unroll_loop): Change "loop_number" references to
        use uid_loop_num instead.
Still cleaning up haifa.

From-SVN: r15623

gcc/ChangeLog
gcc/loop.c
gcc/loop.h
gcc/unroll.c

index 6b582e9afc2c946738d5b4853da4953298cf9c49..5707f37ed88362e1a73783779b375ac1d8f49a54 100644 (file)
@@ -1,5 +1,11 @@
 Sun Sep 21 17:45:45 1997  Jeffrey A Law  (law@cygnus.com)
 
+       * loop.c (loop_number): Delete function.  Change all references
+       to use uid_loop_num array.
+       * loop.h (loop_number): Delete declaration.
+       * unroll.c (unroll_loop): Change "loop_number" references to
+       use uid_loop_num instead.
+
        * loop.c (loop_unroll_factor): Move outside #ifdef HAIFA
        conditional.
        (loop_unroll_iter): Remove unused variable and all references.
index a72fdcbc427a7f83068ad984a544ccf93f136304..37dd01193924d42d4fc568991a8aa2a7e477f506 100644 (file)
@@ -327,9 +327,6 @@ static void insert_bct ();
 
 /* Auxiliary function that inserts the bct pattern into the loop */
 static void instrument_loop_bct ();
-
-
-int loop_number ();
 #endif  /* HAIFA */
 
 /* Indirect_jump_in_function is computed once per function.  */
@@ -7066,7 +7063,7 @@ void analyze_loop_iterations (loop_start, loop_end)
   enum machine_mode original_mode;
 
   /* find the number of the loop */
-  int loop_num = loop_number (loop_start, loop_end);
+  int loop_num = uid_loop_num [INSN_UID (loop_start)];
 
   /* we change our mind only when we are sure that loop will be instrumented */
   loop_can_insert_bct[loop_num] = 0;
@@ -7257,7 +7254,7 @@ insert_bct (loop_start, loop_end)
      machine has */
   enum machine_mode loop_var_mode = SImode;
 
-  int loop_num = loop_number (loop_start, loop_end);
+  int loop_num = uid_loop_num [INSN_UID (loop_start)];
 
   /* get loop-variables. No need to check that these are valid - already
      checked in analyze_loop_iterations ().  */
@@ -7569,23 +7566,6 @@ instrument_loop_bct (loop_start, loop_end, loop_num_iterations)
 
 #endif /* HAVE_decrement_and_branch_on_count */
 }
-
-/* calculate the uid of the given loop */
-int
-loop_number (loop_start, loop_end)
-     rtx loop_start, loop_end;
-{
-  int loop_num = -1;
-
-  /* assume that this insn contains the LOOP_START
-     note, so it will not be changed by the loop unrolling */
-  loop_num = uid_loop_num[INSN_UID (loop_start)];
-  /* sanity check - should never happen */
-  if (loop_num == -1)
-    abort ();
-
-  return loop_num;
-}
 #endif /* HAIFA */
 
 /* Scan the function and determine whether it has indirect (computed) jumps.
index 44e150020282a757e5f7219af79434e28e2cd0ef..8a92a321185a29824f65ae5f4558b7c57051dad7 100644 (file)
@@ -187,6 +187,5 @@ extern int *loop_unroll_factor;
 /* variables for interaction between unroll.c and loop.c, for
    the insertion of branch-on-count instruction. */
 extern rtx *loop_start_value;
-extern int loop_number();
 #endif  /* HAIFA */
 
index b9cbcfe6a48b144ffc7b67ac54b9056c238b6f26..0c298751685acf727243555739d171233a0f0157 100644 (file)
@@ -1098,7 +1098,7 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
 #ifdef HAIFA
          /* Fix the initial value for the loop as needed.  */
          if (loop_n_iterations <= 0)
-           loop_start_value [loop_number (loop_start, loop_end)]
+           loop_start_value [uid_loop_num [INSN_UID (loop_start)]]
              = initial_value;
 #endif
        }
@@ -1117,9 +1117,9 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
 
   /* Keep track of the unroll factor for each loop.  */
   if (unroll_type == UNROLL_COMPLETELY)
-    loop_unroll_factor [loop_number (loop_start, loop_end)] = -1;
+    loop_unroll_factor [uid_loop_num [INSN_UID (loop_start)]] = -1;
   else
-    loop_unroll_factor [loop_number (loop_start, loop_end)] = unroll_number;
+    loop_unroll_factor [uid_loop_num [INSN_UID (loop_start)]] = unroll_number;
 
 
   /* For each biv and giv, determine whether it can be safely split into
This page took 0.084033 seconds and 5 git commands to generate.