bb_note returns a rtx_note *
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 19 Aug 2014 19:43:08 +0000 (19:43 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Tue, 19 Aug 2014 19:43:08 +0000 (19:43 +0000)
2014-08-19  David Malcolm  <dmalcolm@redhat.com>

* basic-block.h (bb_note): Strengthen return type from rtx to
rtx_note *.
* sched-int.h (bb_note): Likewise.
* cfgrtl.c (bb_note): Likewise.  Add a checked cast to rtx_note *.

From-SVN: r214188

gcc/ChangeLog
gcc/basic-block.h
gcc/cfgrtl.c
gcc/sched-int.h

index 3b92fbf46ca77e291b65293cf07f6674c84b738a..c6b92873d8030af6f43834e7f42d65c95e6c720c 100644 (file)
@@ -1,3 +1,10 @@
+2014-08-19  David Malcolm  <dmalcolm@redhat.com>
+
+       * basic-block.h (bb_note): Strengthen return type from rtx to
+       rtx_note *.
+       * sched-int.h (bb_note): Likewise.
+       * cfgrtl.c (bb_note): Likewise.  Add a checked cast to rtx_note *.
+
 2014-08-19  David Malcolm  <dmalcolm@redhat.com>
 
        * rtl.h (make_insn_raw): Strengthen return type from rtx to
index d6aebb45df71fe32ddf933298ea161fe642664b2..518dce244793ef8683e96b013a87a15ea064f221 100644 (file)
@@ -801,7 +801,7 @@ extern basic_block * single_pred_before_succ_order (void);
 
 /* In cfgrtl.c  */
 extern rtx block_label (basic_block);
-extern rtx bb_note (basic_block);
+extern rtx_note *bb_note (basic_block);
 extern bool purge_all_dead_edges (void);
 extern bool purge_dead_edges (basic_block);
 extern bool fixup_abnormal_edges (void);
index 5babdf9d15f89b11eb5a109da1fa86c46af9248e..c6176a5ba878f2bdac4f98163224a552fb3a9177 100644 (file)
@@ -661,7 +661,7 @@ could_fall_through (basic_block src, basic_block target)
 }
 \f
 /* Return the NOTE_INSN_BASIC_BLOCK of BB.  */
-rtx
+rtx_note *
 bb_note (basic_block bb)
 {
   rtx note;
@@ -671,7 +671,7 @@ bb_note (basic_block bb)
     note = NEXT_INSN (note);
 
   gcc_assert (NOTE_INSN_BASIC_BLOCK_P (note));
-  return note;
+  return as_a <rtx_note *> (note);
 }
 
 /* Return the INSN immediately following the NOTE_INSN_BASIC_BLOCK
index 3680889fff55fa466ea763fbfe5b5e564e549baa..7f236a127d342c22471fb221da82ff5a4670c966 100644 (file)
@@ -1368,7 +1368,7 @@ extern void sched_change_pattern (rtx, rtx);
 extern int sched_speculate_insn (rtx, ds_t, rtx *);
 extern void unlink_bb_notes (basic_block, basic_block);
 extern void add_block (basic_block, basic_block);
-extern rtx bb_note (basic_block);
+extern rtx_note *bb_note (basic_block);
 extern void concat_note_lists (rtx, rtx *);
 extern rtx sched_emit_insn (rtx);
 extern rtx get_ready_element (int);