]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
get_ebb_head_tail works with rtx_insn
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 22 Aug 2014 18:47:27 +0000 (18:47 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Fri, 22 Aug 2014 18:47:27 +0000 (18:47 +0000)
gcc/
* sched-int.h (get_ebb_head_tail): Strengthen params "headp" and
"tailp" from rtx * to rtx_insn **.

* ddg.c (build_intra_loop_deps): Strengthen locals head", "tail"
from rtx to rtx_insn *.
* haifa-sched.c (get_ebb_head_tail): Strengthen params "headp" and
"tailp" from rtx * to rtx_insn **.  Strengthen locals "beg_head",
"beg_tail", "end_head", "end_tail", "note", "next", "prev" from
rtx to rtx_insn *.
* modulo-sched.c (const_iteration_count): Strengthen return type
and locals "insn", "head", "tail" from rtx to rtx_insn *.  Replace
use of NULL_RTX with NULL when working with insns.
(loop_single_full_bb_p): Strengthen locals "head", "tail" from rtx
to rtx_insn *.
(sms_schedule): Likewise.
* sched-rgn.c (init_ready_list): Likewise, also for locals
"src_head" and "src_next_tail".
(compute_block_dependences): Likewise.
(free_block_dependencies): Likewise.
(debug_rgn_dependencies): Likewise.
(free_rgn_deps): Likewise.
(compute_priorities): Likewise.
(schedule_region): Likewise.
* sel-sched.c (find_ebb_boundaries): Likewise.

* config/sh/sh.c (find_insn_regmode_weight): Strengthen locals
"insn", "next_tail", "head", "tail" from rtx to rtx_insn *.

From-SVN: r214352

gcc/ChangeLog
gcc/config/sh/sh.c
gcc/ddg.c
gcc/haifa-sched.c
gcc/modulo-sched.c
gcc/sched-int.h
gcc/sched-rgn.c
gcc/sel-sched.c

index 3c1cc8c16448345c446bbf3029a3a2370a57111b..995ba931d00b079f9c5d12a5c57519b91d7fc17d 100644 (file)
@@ -1,3 +1,33 @@
+2014-08-22  David Malcolm  <dmalcolm@redhat.com>
+
+       * sched-int.h (get_ebb_head_tail): Strengthen params "headp" and
+       "tailp" from rtx * to rtx_insn **.
+
+       * ddg.c (build_intra_loop_deps): Strengthen locals head", "tail"
+       from rtx to rtx_insn *.
+       * haifa-sched.c (get_ebb_head_tail): Strengthen params "headp" and
+       "tailp" from rtx * to rtx_insn **.  Strengthen locals "beg_head",
+       "beg_tail", "end_head", "end_tail", "note", "next", "prev" from
+       rtx to rtx_insn *.
+       * modulo-sched.c (const_iteration_count): Strengthen return type
+       and locals "insn", "head", "tail" from rtx to rtx_insn *.  Replace
+       use of NULL_RTX with NULL when working with insns.
+       (loop_single_full_bb_p): Strengthen locals "head", "tail" from rtx
+       to rtx_insn *.
+       (sms_schedule): Likewise.
+       * sched-rgn.c (init_ready_list): Likewise, also for locals
+       "src_head" and "src_next_tail".
+       (compute_block_dependences): Likewise.
+       (free_block_dependencies): Likewise.
+       (debug_rgn_dependencies): Likewise.
+       (free_rgn_deps): Likewise.
+       (compute_priorities): Likewise.
+       (schedule_region): Likewise.
+       * sel-sched.c (find_ebb_boundaries): Likewise.
+
+       * config/sh/sh.c (find_insn_regmode_weight): Strengthen locals
+       "insn", "next_tail", "head", "tail" from rtx to rtx_insn *.
+
 2014-08-22  David Malcolm  <dmalcolm@redhat.com>
 
        * mode-switching.c (struct seginfo): Strengthen field "insn_ptr"
index d927f6683f805180bcd9e0d1856f1f7ddcd3656f..13eb714750c48b3fea29ad91b1ad7ddcd0e3108a 100644 (file)
@@ -11094,7 +11094,7 @@ find_insn_regmode_weight (rtx insn, enum machine_mode mode)
 static void
 find_regmode_weight (basic_block b, enum machine_mode mode)
 {
-  rtx insn, next_tail, head, tail;
+  rtx_insn *insn, *next_tail, *head, *tail;
 
   get_ebb_head_tail (b, b, &head, &tail);
   next_tail = NEXT_INSN (tail);
index 503965f0e6083b7a83810fd944db645a7f855c1f..1971ef884f38e6b16ee0b7c46c44fd06beb8be81 100644 (file)
--- a/gcc/ddg.c
+++ b/gcc/ddg.c
@@ -507,7 +507,7 @@ build_intra_loop_deps (ddg_ptr g)
   int i;
   /* Hold the dependency analysis state during dependency calculations.  */
   struct deps_desc tmp_deps;
-  rtx head, tail;
+  rtx_insn *head, *tail;
 
   /* Build the dependence information, using the sched_analyze function.  */
   init_deps_global ();
index 34aa207d8dfd430e7b6c8f9cf2cf55dc7f7f7450..aa1476db8298869d909b2fc39a8778c184d59e99 100644 (file)
@@ -4738,12 +4738,13 @@ resolve_dependencies (rtx insn)
 /* Return the head and tail pointers of ebb starting at BEG and ending
    at END.  */
 void
-get_ebb_head_tail (basic_block beg, basic_block end, rtx *headp, rtx *tailp)
+get_ebb_head_tail (basic_block beg, basic_block end,
+                  rtx_insn **headp, rtx_insn **tailp)
 {
-  rtx beg_head = BB_HEAD (beg);
-  rtx beg_tail = BB_END (beg);
-  rtx end_head = BB_HEAD (end);
-  rtx end_tail = BB_END (end);
+  rtx_insn *beg_head = BB_HEAD (beg);
+  rtx_insn * beg_tail = BB_END (beg);
+  rtx_insn * end_head = BB_HEAD (end);
+  rtx_insn * end_tail = BB_END (end);
 
   /* Don't include any notes or labels at the beginning of the BEG
      basic block, or notes at the end of the END basic blocks.  */
@@ -4756,7 +4757,7 @@ get_ebb_head_tail (basic_block beg, basic_block end, rtx *headp, rtx *tailp)
       beg_head = NEXT_INSN (beg_head);
     else if (DEBUG_INSN_P (beg_head))
       {
-       rtx note, next;
+       rtx_insn * note, *next;
 
        for (note = NEXT_INSN (beg_head);
             note != beg_tail;
@@ -4794,7 +4795,7 @@ get_ebb_head_tail (basic_block beg, basic_block end, rtx *headp, rtx *tailp)
       end_tail = PREV_INSN (end_tail);
     else if (DEBUG_INSN_P (end_tail))
       {
-       rtx note, prev;
+       rtx_insn * note, *prev;
 
        for (note = PREV_INSN (end_tail);
             note != end_head;
index 1ae7c16f6bef97670744e54ecac36812b01d0c2a..7ac92894fa9426e811ca79781bf463ba9b0e258a 100644 (file)
@@ -392,17 +392,17 @@ doloop_register_get (rtx head ATTRIBUTE_UNUSED, rtx tail ATTRIBUTE_UNUSED)
 
 /* Check if COUNT_REG is set to a constant in the PRE_HEADER block, so
    that the number of iterations is a compile-time constant.  If so,
-   return the rtx that sets COUNT_REG to a constant, and set COUNT to
+   return the rtx_insn that sets COUNT_REG to a constant, and set COUNT to
    this constant.  Otherwise return 0.  */
-static rtx
+static rtx_insn *
 const_iteration_count (rtx count_reg, basic_block pre_header,
                       int64_t * count)
 {
-  rtx insn;
-  rtx head, tail;
+  rtx_insn *insn;
+  rtx_insn *head, *tail;
 
   if (! pre_header)
-    return NULL_RTX;
+    return NULL;
 
   get_ebb_head_tail (pre_header, pre_header, &head, &tail);
 
@@ -418,10 +418,10 @@ const_iteration_count (rtx count_reg, basic_block pre_header,
            return insn;
          }
 
-       return NULL_RTX;
+       return NULL;
       }
 
-  return NULL_RTX;
+  return NULL;
 }
 
 /* A very simple resource-based lower bound on the initiation interval.
@@ -1211,7 +1211,7 @@ loop_single_full_bb_p (struct loop *loop)
 
   for (i = 0; i < loop->num_nodes ; i++)
     {
-      rtx head, tail;
+      rtx_insn *head, *tail;
       bool empty_bb = true;
 
       if (bbs[i] == loop->header)
@@ -1398,7 +1398,7 @@ sms_schedule (void)
      indexed by the loop index.  */
   FOR_EACH_LOOP (loop, 0)
     {
-      rtx head, tail;
+      rtx_insn *head, *tail;
       rtx count_reg;
 
       /* For debugging.  */
@@ -1536,7 +1536,7 @@ sms_schedule (void)
   /* We don't want to perform SMS on new loops - created by versioning.  */
   FOR_EACH_LOOP (loop, 0)
     {
-      rtx head, tail;
+      rtx_insn *head, *tail;
       rtx count_reg, count_init;
       int mii, rec_mii, stage_count, min_cycle;
       int64_t loop_count = 0;
index 7f236a127d342c22471fb221da82ff5a4670c966..df7795d5516bb0cf0db93ac85d9b11ea59dc6fca 100644 (file)
@@ -1342,7 +1342,8 @@ extern void finish_live_range_shrinkage (void);
 extern void sched_init_region_reg_pressure_info (void);
 extern void free_global_sched_pressure_data (void);
 extern int haifa_classify_insn (const_rtx);
-extern void get_ebb_head_tail (basic_block, basic_block, rtx *, rtx *);
+extern void get_ebb_head_tail (basic_block, basic_block,
+                              rtx_insn **, rtx_insn **);
 extern int no_real_insns_p (const_rtx, const_rtx);
 
 extern int insn_cost (rtx);
index 5a86c85625c403b544c399e3d909a401619305b9..ee769ecce5601fc75681afe90a24001f4100091c 100644 (file)
@@ -2140,9 +2140,9 @@ init_ready_list (void)
   for (bb_src = target_bb + 1; bb_src < current_nr_blocks; bb_src++)
     if (IS_VALID (bb_src))
       {
-       rtx src_head;
-       rtx src_next_tail;
-       rtx tail, head;
+       rtx_insn *src_head;
+       rtx_insn *src_next_tail;
+       rtx_insn *tail, *head;
 
        get_ebb_head_tail (EBB_FIRST_BB (bb_src), EBB_LAST_BB (bb_src),
                           &head, &tail);
@@ -2721,7 +2721,7 @@ propagate_deps (int bb, struct deps_desc *pred_deps)
 static void
 compute_block_dependences (int bb)
 {
-  rtx head, tail;
+  rtx_insn *head, *tail;
   struct deps_desc tmp_deps;
 
   tmp_deps = bb_deps[bb];
@@ -2750,8 +2750,8 @@ compute_block_dependences (int bb)
 static void
 free_block_dependencies (int bb)
 {
-  rtx head;
-  rtx tail;
+  rtx_insn *head;
+  rtx_insn *tail;
 
   get_ebb_head_tail (EBB_FIRST_BB (bb), EBB_LAST_BB (bb), &head, &tail);
 
@@ -2793,7 +2793,7 @@ debug_rgn_dependencies (int from_bb)
 
   for (bb = from_bb; bb < current_nr_blocks; bb++)
     {
-      rtx head, tail;
+      rtx_insn *head, *tail;
 
       get_ebb_head_tail (EBB_FIRST_BB (bb), EBB_LAST_BB (bb), &head, &tail);
       fprintf (sched_dump, "\n;;   --- Region Dependences --- b %d bb %d \n",
@@ -2894,7 +2894,7 @@ free_rgn_deps (void)
 
   for (bb = 0; bb < current_nr_blocks; bb++)
     {
-      rtx head, tail;
+      rtx_insn *head, *tail;
 
       gcc_assert (EBB_FIRST_BB (bb) == EBB_LAST_BB (bb));
       get_ebb_head_tail (EBB_FIRST_BB (bb), EBB_LAST_BB (bb), &head, &tail);
@@ -2914,7 +2914,7 @@ compute_priorities (void)
   current_sched_info->sched_max_insns_priority = 0;
   for (bb = 0; bb < current_nr_blocks; bb++)
     {
-      rtx head, tail;
+      rtx_insn *head, *tail;
 
       gcc_assert (EBB_FIRST_BB (bb) == EBB_LAST_BB (bb));
       get_ebb_head_tail (EBB_FIRST_BB (bb), EBB_LAST_BB (bb), &head, &tail);
@@ -3025,7 +3025,7 @@ schedule_region (int rgn)
       for (bb = 0; bb < current_nr_blocks; bb++)
        {
          basic_block first_bb, last_bb;
-         rtx head, tail;
+         rtx_insn *head, *tail;
 
          first_bb = EBB_FIRST_BB (bb);
          last_bb = EBB_LAST_BB (bb);
@@ -3045,7 +3045,7 @@ schedule_region (int rgn)
   for (bb = 0; bb < current_nr_blocks; bb++)
     {
       basic_block first_bb, last_bb, curr_bb;
-      rtx head, tail;
+      rtx_insn *head, *tail;
 
       first_bb = EBB_FIRST_BB (bb);
       last_bb = EBB_LAST_BB (bb);
index 3248629e89d7be2f538b415ad7b775323c97e9ba..e4a07fd91ac098b41d2ebe7d7245572faeb26827 100644 (file)
@@ -7024,7 +7024,7 @@ simplify_changed_insns (void)
 static void
 find_ebb_boundaries (basic_block bb, bitmap scheduled_blocks)
 {
-  insn_t head, tail;
+  rtx_insn *head, *tail;
   basic_block bb1 = bb;
   if (sched_verbose >= 2)
     sel_print ("Finishing schedule in bbs: ");