+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
/* 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 ();
/* 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 ();
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);
static HARD_REG_SET pending_dead_regs;
\f
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,
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. */
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 *);
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);
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);
call instruction. */
bool
-keep_with_call_p (const_rtx insn)
+keep_with_call_p (const rtx_insn *insn)
{
rtx set;
/* 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;
}