Change the types of arguments and return values for several functions from rtx to rtx_insn *

gcc/ChangeLog:

2014-09-04  Trevor Saunders  <tsaunders@mozilla.com>

	* emit-rtl.c (get_first_nonnote_insn): Return rtx_insn * instead of
	rtx.
	(get_last_nonnote_insn): Likewise.
	(next_nonnote_insn_bb): Take rtx_insn * instead of rtx.
	* resource.c (find_basic_block): Likewise.
	* rtl.h: Adjust.
	* rtlanal.c (keep_with_call_p): Take const rtx_insn * instead of
	const_rtx.

From-SVN: r214922
This commit is contained in:
Trevor Saunders 2014-09-04 21:11:23 +00:00 committed by Trevor Saunders
parent b28e4e4427
commit e4685bc8ca
5 changed files with 23 additions and 13 deletions

View File

@ -1,3 +1,14 @@
2014-09-04 Trevor Saunders <tsaunders@mozilla.com>
* emit-rtl.c (get_first_nonnote_insn): Return rtx_insn * instead of
rtx.
(get_last_nonnote_insn): Likewise.
(next_nonnote_insn_bb): Take rtx_insn * instead of rtx.
* resource.c (find_basic_block): Likewise.
* rtl.h: Adjust.
* rtlanal.c (keep_with_call_p): Take const rtx_insn * instead of
const_rtx.
2014-09-04 David Malcolm <dmalcolm@redhat.com>
* genattr.c (main): Within the prototype of insn_latency written

View File

@ -3141,7 +3141,7 @@ get_last_insn_anywhere (void)
/* Return the first nonnote insn emitted in current sequence or current
function. This routine looks inside SEQUENCEs. */
rtx
rtx_insn *
get_first_nonnote_insn (void)
{
rtx_insn *insn = get_insns ();
@ -3167,7 +3167,7 @@ get_first_nonnote_insn (void)
/* Return the last nonnote insn emitted in current sequence or current
function. This routine looks inside SEQUENCEs. */
rtx
rtx_insn *
get_last_nonnote_insn (void)
{
rtx_insn *insn = get_last_insn ();
@ -3267,10 +3267,8 @@ next_nonnote_insn (rtx uncast_insn)
look inside SEQUENCEs. */
rtx_insn *
next_nonnote_insn_bb (rtx uncast_insn)
next_nonnote_insn_bb (rtx_insn *insn)
{
rtx_insn *insn = safe_as_a <rtx_insn *> (uncast_insn);
while (insn)
{
insn = NEXT_INSN (insn);

View File

@ -78,7 +78,7 @@ static HARD_REG_SET current_live_regs;
static HARD_REG_SET pending_dead_regs;
static void update_live_status (rtx, const_rtx, void *);
static int find_basic_block (rtx, int);
static int find_basic_block (rtx_insn *, int);
static rtx_insn *next_insn_no_annul (rtx_insn *);
static rtx_insn *find_dead_or_set_registers (rtx_insn *, struct resources*,
rtx *, int, struct resources,
@ -132,7 +132,7 @@ update_live_status (rtx dest, const_rtx x, void *data ATTRIBUTE_UNUSED)
correct. */
static int
find_basic_block (rtx insn, int search_limit)
find_basic_block (rtx_insn *insn, int search_limit)
{
/* Scan backwards to the previous BARRIER. Then see if we can find a
label that starts a basic block. Return the basic block number. */

View File

@ -2530,8 +2530,8 @@ extern rtx convert_memory_address_addr_space (enum machine_mode, rtx,
convert_memory_address_addr_space ((to_mode), (x), ADDR_SPACE_GENERIC)
extern const char *get_insn_name (int);
extern rtx_insn *get_last_insn_anywhere (void);
extern rtx get_first_nonnote_insn (void);
extern rtx get_last_nonnote_insn (void);
extern rtx_insn *get_first_nonnote_insn (void);
extern rtx_insn *get_last_nonnote_insn (void);
extern void start_sequence (void);
extern void push_to_sequence (rtx_insn *);
extern void push_to_sequence2 (rtx_insn *, rtx_insn *);
@ -2625,7 +2625,7 @@ extern rtx_insn *next_insn (rtx_insn *);
extern rtx_insn *prev_nonnote_insn (rtx);
extern rtx_insn *prev_nonnote_insn_bb (rtx);
extern rtx_insn *next_nonnote_insn (rtx);
extern rtx_insn *next_nonnote_insn_bb (rtx);
extern rtx_insn *next_nonnote_insn_bb (rtx_insn *);
extern rtx_insn *prev_nondebug_insn (rtx);
extern rtx_insn *next_nondebug_insn (rtx);
extern rtx_insn *prev_nonnote_nondebug_insn (rtx);
@ -2830,7 +2830,7 @@ extern void remove_node_from_expr_list (const_rtx, rtx_expr_list **);
extern void remove_node_from_insn_list (const rtx_insn *, rtx_insn_list **);
extern int loc_mentioned_in_p (rtx *, const_rtx);
extern rtx_insn *find_first_parameter_load (rtx_insn *, rtx_insn *);
extern bool keep_with_call_p (const_rtx);
extern bool keep_with_call_p (const rtx_insn *);
extern bool label_is_jump_target_p (const_rtx, const rtx_insn *);
extern int insn_rtx_cost (rtx, bool);

View File

@ -3800,7 +3800,7 @@ find_first_parameter_load (rtx_insn *call_insn, rtx_insn *boundary)
call instruction. */
bool
keep_with_call_p (const_rtx insn)
keep_with_call_p (const rtx_insn *insn)
{
rtx set;
@ -3824,7 +3824,8 @@ keep_with_call_p (const_rtx insn)
/* This CONST_CAST is okay because next_nonnote_insn just
returns its argument and we assign it to a const_rtx
variable. */
const rtx_insn *i2 = next_nonnote_insn (CONST_CAST_RTX (insn));
const rtx_insn *i2
= next_nonnote_insn (const_cast<rtx_insn *> (insn));
if (i2 && keep_with_call_p (i2))
return true;
}