Commit c5db5458 by David Malcolm Committed by David Malcolm

sel_bb_{head|end} return rtx_insn

2014-08-21  David Malcolm  <dmalcolm@redhat.com>

	* sel-sched-ir.h (exit_insn): Strengthen from rtx to rtx_insn *.
	(sel_bb_head): Strengthen return type insn_t (currently just an
	rtx) to rtx_insn *.
	(sel_bb_end): Likewise.

	* sel-sched-ir.c (exit_insn): Strengthen from rtx to rtx_insn *.
	(sel_bb_head): Strengthen return type and local "head" from
	insn_t (currently just an rtx) to rtx_insn *.
	(sel_bb_end): Likewise for return type.
	(free_nop_and_exit_insns): Replace use of NULL_RTX with NULL when
	working with insn.

From-SVN: r214247
parent 636eb204
2014-08-21 David Malcolm <dmalcolm@redhat.com> 2014-08-21 David Malcolm <dmalcolm@redhat.com>
* sel-sched-ir.h (exit_insn): Strengthen from rtx to rtx_insn *.
(sel_bb_head): Strengthen return type insn_t (currently just an
rtx) to rtx_insn *.
(sel_bb_end): Likewise.
* sel-sched-ir.c (exit_insn): Strengthen from rtx to rtx_insn *.
(sel_bb_head): Strengthen return type and local "head" from
insn_t (currently just an rtx) to rtx_insn *.
(sel_bb_end): Likewise for return type.
(free_nop_and_exit_insns): Replace use of NULL_RTX with NULL when
working with insn.
2014-08-21 David Malcolm <dmalcolm@redhat.com>
* basic-block.h (get_last_bb_insn): Strengthen return type from * basic-block.h (get_last_bb_insn): Strengthen return type from
rtx to rtx_insn *. rtx to rtx_insn *.
* cfgrtl.c (get_last_bb_insn): Likewise, and for locals "tmp" and * cfgrtl.c (get_last_bb_insn): Likewise, and for locals "tmp" and
......
...@@ -132,7 +132,7 @@ static vec<rtx_note *> bb_note_pool; ...@@ -132,7 +132,7 @@ static vec<rtx_note *> bb_note_pool;
rtx nop_pattern = NULL_RTX; rtx nop_pattern = NULL_RTX;
/* A special instruction that resides in EXIT_BLOCK. /* A special instruction that resides in EXIT_BLOCK.
EXIT_INSN is successor of the insns that lead to EXIT_BLOCK. */ EXIT_INSN is successor of the insns that lead to EXIT_BLOCK. */
rtx exit_insn = NULL_RTX; rtx_insn *exit_insn = NULL;
/* TRUE if while scheduling current region, which is loop, its preheader /* TRUE if while scheduling current region, which is loop, its preheader
was removed. */ was removed. */
...@@ -4530,10 +4530,10 @@ static struct ...@@ -4530,10 +4530,10 @@ static struct
/* Functions to work with control-flow graph. */ /* Functions to work with control-flow graph. */
/* Return basic block note of BB. */ /* Return basic block note of BB. */
insn_t rtx_insn *
sel_bb_head (basic_block bb) sel_bb_head (basic_block bb)
{ {
insn_t head; rtx_insn *head;
if (bb == EXIT_BLOCK_PTR_FOR_FN (cfun)) if (bb == EXIT_BLOCK_PTR_FOR_FN (cfun))
{ {
...@@ -4548,7 +4548,7 @@ sel_bb_head (basic_block bb) ...@@ -4548,7 +4548,7 @@ sel_bb_head (basic_block bb)
head = next_nonnote_insn (note); head = next_nonnote_insn (note);
if (head && (BARRIER_P (head) || BLOCK_FOR_INSN (head) != bb)) if (head && (BARRIER_P (head) || BLOCK_FOR_INSN (head) != bb))
head = NULL_RTX; head = NULL;
} }
return head; return head;
...@@ -4562,11 +4562,11 @@ sel_bb_head_p (insn_t insn) ...@@ -4562,11 +4562,11 @@ sel_bb_head_p (insn_t insn)
} }
/* Return last insn of BB. */ /* Return last insn of BB. */
insn_t rtx_insn *
sel_bb_end (basic_block bb) sel_bb_end (basic_block bb)
{ {
if (sel_bb_empty_p (bb)) if (sel_bb_empty_p (bb))
return NULL_RTX; return NULL;
gcc_assert (bb != EXIT_BLOCK_PTR_FOR_FN (cfun)); gcc_assert (bb != EXIT_BLOCK_PTR_FOR_FN (cfun));
...@@ -5853,7 +5853,7 @@ setup_nop_and_exit_insns (void) ...@@ -5853,7 +5853,7 @@ setup_nop_and_exit_insns (void)
void void
free_nop_and_exit_insns (void) free_nop_and_exit_insns (void)
{ {
exit_insn = NULL_RTX; exit_insn = NULL;
nop_pattern = NULL_RTX; nop_pattern = NULL_RTX;
} }
......
...@@ -809,7 +809,7 @@ extern flist_t fences; ...@@ -809,7 +809,7 @@ extern flist_t fences;
extern rtx nop_pattern; extern rtx nop_pattern;
/* An insn that 'contained' in EXIT block. */ /* An insn that 'contained' in EXIT block. */
extern rtx exit_insn; extern rtx_insn *exit_insn;
/* Provide a separate luid for the insn. */ /* Provide a separate luid for the insn. */
#define INSN_INIT_TODO_LUID (1) #define INSN_INIT_TODO_LUID (1)
...@@ -1012,8 +1012,8 @@ struct succs_info ...@@ -1012,8 +1012,8 @@ struct succs_info
/* Some needed definitions. */ /* Some needed definitions. */
extern basic_block after_recovery; extern basic_block after_recovery;
extern insn_t sel_bb_head (basic_block); extern rtx_insn *sel_bb_head (basic_block);
extern insn_t sel_bb_end (basic_block); extern rtx_insn *sel_bb_end (basic_block);
extern bool sel_bb_empty_p (basic_block); extern bool sel_bb_empty_p (basic_block);
extern bool in_current_region_p (basic_block); extern bool in_current_region_p (basic_block);
...@@ -1583,9 +1583,9 @@ extern bool insn_at_boundary_p (insn_t); ...@@ -1583,9 +1583,9 @@ extern bool insn_at_boundary_p (insn_t);
/* Basic block and CFG functions. */ /* Basic block and CFG functions. */
extern insn_t sel_bb_head (basic_block); extern rtx_insn *sel_bb_head (basic_block);
extern bool sel_bb_head_p (insn_t); extern bool sel_bb_head_p (insn_t);
extern insn_t sel_bb_end (basic_block); extern rtx_insn *sel_bb_end (basic_block);
extern bool sel_bb_end_p (insn_t); extern bool sel_bb_end_p (insn_t);
extern bool sel_bb_empty_p (basic_block); extern bool sel_bb_empty_p (basic_block);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment