Commit 1f00691e by Trevor Saunders Committed by Trevor Saunders

make next/prev nonnote_nondebug_insn take rtx_insn *

gcc/ChangeLog:

2016-09-22  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config/cris/cris.c (cris_asm_output_case_end): Change argument
	type to rtx_insn *.
	* emit-rtl.c (next_nonnote_nondebug_insn): Likewise.
	(prev_nonnote_nondebug_insn): Likewise.
	* config/cris/cris-protos.h: Adjust prototype.
	* rtl.h: Likewise.
	* jump.c (rtx_renumbered_equal_p): Adjust.

From-SVN: r240360
parent d8fd56b2
2016-09-22 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> 2016-09-22 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* config/cris/cris.c (cris_asm_output_case_end): Change argument
type to rtx_insn *.
* emit-rtl.c (next_nonnote_nondebug_insn): Likewise.
(prev_nonnote_nondebug_insn): Likewise.
* config/cris/cris-protos.h: Adjust prototype.
* rtl.h: Likewise.
* jump.c (rtx_renumbered_equal_p): Adjust.
2016-09-22 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* emit-rtl.c (prev_real_insn): Change argument type to rtx_insn *. * emit-rtl.c (prev_real_insn): Change argument type to rtx_insn *.
* rtl.h: Adjust prototype. * rtl.h: Adjust prototype.
* config/sh/sh.md: Adjust. * config/sh/sh.md: Adjust.
......
...@@ -44,7 +44,7 @@ extern bool cris_store_multiple_op_p (rtx); ...@@ -44,7 +44,7 @@ extern bool cris_store_multiple_op_p (rtx);
extern bool cris_movem_load_rest_p (rtx, int); extern bool cris_movem_load_rest_p (rtx, int);
extern void cris_asm_output_symbol_ref (FILE *, rtx); extern void cris_asm_output_symbol_ref (FILE *, rtx);
extern int cris_cfun_uses_pic_table (void); extern int cris_cfun_uses_pic_table (void);
extern void cris_asm_output_case_end (FILE *, int, rtx); extern void cris_asm_output_case_end (FILE *, int, rtx_insn *);
extern rtx cris_gen_movem_load (rtx, rtx, int); extern rtx cris_gen_movem_load (rtx, rtx, int);
extern rtx cris_emit_movem_store (rtx, rtx, int, bool); extern rtx cris_emit_movem_store (rtx, rtx, int, bool);
extern void cris_expand_pic_call_address (rtx *, rtx *); extern void cris_expand_pic_call_address (rtx *, rtx *);
......
...@@ -2588,11 +2588,11 @@ cris_asm_output_ident (const char *string) ...@@ -2588,11 +2588,11 @@ cris_asm_output_ident (const char *string)
/* The ASM_OUTPUT_CASE_END worker. */ /* The ASM_OUTPUT_CASE_END worker. */
void void
cris_asm_output_case_end (FILE *stream, int num, rtx table) cris_asm_output_case_end (FILE *stream, int num, rtx_insn *table)
{ {
/* Step back, over the label for the table, to the actual casejump and /* Step back, over the label for the table, to the actual casejump and
assert that we find only what's expected. */ assert that we find only what's expected. */
rtx whole_jump_insn = prev_nonnote_nondebug_insn (table); rtx_insn *whole_jump_insn = prev_nonnote_nondebug_insn (table);
gcc_assert (whole_jump_insn != NULL_RTX && LABEL_P (whole_jump_insn)); gcc_assert (whole_jump_insn != NULL_RTX && LABEL_P (whole_jump_insn));
whole_jump_insn = prev_nonnote_nondebug_insn (whole_jump_insn); whole_jump_insn = prev_nonnote_nondebug_insn (whole_jump_insn);
gcc_assert (whole_jump_insn != NULL_RTX gcc_assert (whole_jump_insn != NULL_RTX
...@@ -2600,15 +2600,15 @@ cris_asm_output_case_end (FILE *stream, int num, rtx table) ...@@ -2600,15 +2600,15 @@ cris_asm_output_case_end (FILE *stream, int num, rtx table)
|| (TARGET_V32 && INSN_P (whole_jump_insn) || (TARGET_V32 && INSN_P (whole_jump_insn)
&& GET_CODE (PATTERN (whole_jump_insn)) == SEQUENCE))); && GET_CODE (PATTERN (whole_jump_insn)) == SEQUENCE)));
/* Get the pattern of the casejump, so we can extract the default label. */ /* Get the pattern of the casejump, so we can extract the default label. */
whole_jump_insn = PATTERN (whole_jump_insn); rtx whole_jump_pat = PATTERN (whole_jump_insn);
if (TARGET_V32) if (TARGET_V32)
{ {
/* This can be a SEQUENCE, meaning the delay-slot of the jump is /* This can be a SEQUENCE, meaning the delay-slot of the jump is
filled. We also output the offset word a little differently. */ filled. We also output the offset word a little differently. */
rtx parallel_jump rtx parallel_jump
= (GET_CODE (whole_jump_insn) == SEQUENCE = (GET_CODE (whole_jump_pat) == SEQUENCE
? PATTERN (XVECEXP (whole_jump_insn, 0, 0)) : whole_jump_insn); ? PATTERN (XVECEXP (whole_jump_pat, 0, 0)) : whole_jump_pat);
asm_fprintf (stream, asm_fprintf (stream,
"\t.word %LL%d-.%s\n", "\t.word %LL%d-.%s\n",
...@@ -2623,7 +2623,7 @@ cris_asm_output_case_end (FILE *stream, int num, rtx table) ...@@ -2623,7 +2623,7 @@ cris_asm_output_case_end (FILE *stream, int num, rtx table)
"\t.word %LL%d-%LL%d%s\n", "\t.word %LL%d-%LL%d%s\n",
CODE_LABEL_NUMBER (XEXP CODE_LABEL_NUMBER (XEXP
(XEXP (XEXP
(XEXP (XVECEXP (whole_jump_insn, 0, 0), 1), (XEXP (XVECEXP (whole_jump_pat, 0, 0), 1),
2), 0)), 2), 0)),
num, num,
(TARGET_PDEBUG ? "; default" : "")); (TARGET_PDEBUG ? "; default" : ""));
......
...@@ -3405,10 +3405,8 @@ prev_nondebug_insn (rtx_insn *insn) ...@@ -3405,10 +3405,8 @@ prev_nondebug_insn (rtx_insn *insn)
This routine does not look inside SEQUENCEs. */ This routine does not look inside SEQUENCEs. */
rtx_insn * rtx_insn *
next_nonnote_nondebug_insn (rtx uncast_insn) next_nonnote_nondebug_insn (rtx_insn *insn)
{ {
rtx_insn *insn = safe_as_a <rtx_insn *> (uncast_insn);
while (insn) while (insn)
{ {
insn = NEXT_INSN (insn); insn = NEXT_INSN (insn);
...@@ -3423,10 +3421,8 @@ next_nonnote_nondebug_insn (rtx uncast_insn) ...@@ -3423,10 +3421,8 @@ next_nonnote_nondebug_insn (rtx uncast_insn)
This routine does not look inside SEQUENCEs. */ This routine does not look inside SEQUENCEs. */
rtx_insn * rtx_insn *
prev_nonnote_nondebug_insn (rtx uncast_insn) prev_nonnote_nondebug_insn (rtx_insn *insn)
{ {
rtx_insn *insn = safe_as_a <rtx_insn *> (uncast_insn);
while (insn) while (insn)
{ {
insn = PREV_INSN (insn); insn = PREV_INSN (insn);
......
...@@ -1806,8 +1806,10 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y) ...@@ -1806,8 +1806,10 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y)
in the same position in the instruction stream. */ in the same position in the instruction stream. */
else else
{ {
rtx_insn *xi = next_nonnote_nondebug_insn (LABEL_REF_LABEL (x)); rtx_insn *xi = next_nonnote_nondebug_insn
rtx_insn *yi = next_nonnote_nondebug_insn (LABEL_REF_LABEL (y)); (as_a<rtx_insn *> (LABEL_REF_LABEL (x)));
rtx_insn *yi = next_nonnote_nondebug_insn
(as_a<rtx_insn *> (LABEL_REF_LABEL (y)));
while (xi && LABEL_P (xi)) while (xi && LABEL_P (xi))
xi = next_nonnote_nondebug_insn (xi); xi = next_nonnote_nondebug_insn (xi);
while (yi && LABEL_P (yi)) while (yi && LABEL_P (yi))
......
...@@ -2840,8 +2840,8 @@ extern rtx_insn *next_nonnote_insn (rtx_insn *); ...@@ -2840,8 +2840,8 @@ extern rtx_insn *next_nonnote_insn (rtx_insn *);
extern rtx_insn *next_nonnote_insn_bb (rtx_insn *); extern rtx_insn *next_nonnote_insn_bb (rtx_insn *);
extern rtx_insn *prev_nondebug_insn (rtx_insn *); extern rtx_insn *prev_nondebug_insn (rtx_insn *);
extern rtx_insn *next_nondebug_insn (rtx_insn *); extern rtx_insn *next_nondebug_insn (rtx_insn *);
extern rtx_insn *prev_nonnote_nondebug_insn (rtx); extern rtx_insn *prev_nonnote_nondebug_insn (rtx_insn *);
extern rtx_insn *next_nonnote_nondebug_insn (rtx); extern rtx_insn *next_nonnote_nondebug_insn (rtx_insn *);
extern rtx_insn *prev_real_insn (rtx_insn *); extern rtx_insn *prev_real_insn (rtx_insn *);
extern rtx_insn *next_real_insn (rtx); extern rtx_insn *next_real_insn (rtx);
extern rtx_insn *prev_active_insn (rtx); extern rtx_insn *prev_active_insn (rtx);
......
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