+2014-08-27 David Malcolm <dmalcolm@redhat.com>
+
+ * rtl.h (free_EXPR_LIST_list): Strengthen param from rtx * to
+ rtx_expr_list **.
+ (alloc_EXPR_LIST): Strengthen return type from rtx to
+ rtx_expr_list *.
+ (remove_free_EXPR_LIST_node): Likewise for param.
+ * reload.h (struct reg_equivs_t): Strengthen field "alt_mem_list"
+ from rtx to rtx_expr_list *.
+ * sched-int.h (struct deps_desc): Strengthen fields
+ "pending_read_mems" and "pending_write_mems" from rtx to
+ rtx_expr_list *.
+
+ * dwarf2out.c (decl_piece_varloc_ptr): Strengthen return type from
+ rtx to rtx_expr_list *.
+ * lists.c (alloc_INSN_LIST): Likewise, also for local "r".
+ (free_EXPR_LIST_list): Strengthen param "listp" from rtx * to
+ rtx_expr_list **.
+ (remove_free_EXPR_LIST_node): Likewise. Strengthen local "node"
+ from rtx to rtx_expr_list *.
+ * loop-iv.c (simplify_using_initial_values): Strengthen local
+ "cond_list" from rtx to rtx_expr_list *, and locals "pnode",
+ "pnote_next" from rtx * to rtx_expr_list **.
+ * sched-deps.c (remove_from_both_dependence_lists): Strengthen
+ param "exprp" from rtx * to rtx_expr_list **.
+ (add_insn_mem_dependence): Strengthen local "mem_list" from
+ rtx * to rtx_expr_list **. Strengthen local "mem_node" from rtx
+ to rtx_expr_list *.
+ * sched-rgn.c (concat_insn_mem_list): Strengthen param "copy_mems"
+ and local "new_mems" from rtx to rtx_expr_list *. Strengthen
+ param "old_mems_p" from rtx * to rtx_expr_list **.
+ * var-tracking.c (struct adjust_mem_data): Strengthen field
+ "side_effects" from rtx to rtx_expr_list *.
+ (adjust_insn): Replace NULL_RTX with NULL when assigning to
+ rtx_expr_list *.
+ (prepare_call_arguments): Likewise.
+
2014-08-27 David Malcolm <dmalcolm@redhat.com>
* function.h (struct rtl_data): Strengthen field
/* Create an EXPR_LIST for location note LOC_NOTE covering BITSIZE bits.
Next is the chain of following piece nodes. */
-static rtx
+static rtx_expr_list *
decl_piece_node (rtx loc_note, HOST_WIDE_INT bitsize, rtx next)
{
if (bitsize <= (int) MAX_MACHINE_MODE)
/* This call is used in place of a gen_rtx_EXPR_LIST. If there is a cached
node available, we'll use it, otherwise a call to gen_rtx_EXPR_LIST
is made. */
-rtx
+rtx_expr_list *
alloc_EXPR_LIST (int kind, rtx val, rtx next)
{
- rtx r;
+ rtx_expr_list *r;
if (unused_expr_list)
{
- r = unused_expr_list;
+ r = as_a <rtx_expr_list *> (unused_expr_list);
unused_expr_list = XEXP (r, 1);
XEXP (r, 0) = val;
XEXP (r, 1) = next;
/* This function will free up an entire list of EXPR_LIST nodes. */
void
-free_EXPR_LIST_list (rtx *listp)
+free_EXPR_LIST_list (rtx_expr_list **listp)
{
if (*listp == 0)
return;
- free_list (listp, &unused_expr_list);
+ free_list ((rtx *)listp, &unused_expr_list);
}
/* This function will free up an entire list of INSN_LIST nodes. */
/* Remove and free the first node in the EXPR_LIST pointed to by LISTP. */
rtx
-remove_free_EXPR_LIST_node (rtx *listp)
+remove_free_EXPR_LIST_node (rtx_expr_list **listp)
{
- rtx node = *listp;
+ rtx_expr_list *node = *listp;
rtx elem = XEXP (node, 0);
- remove_list_node (listp);
+ remove_list_node ((rtx *)listp);
free_EXPR_LIST_node (node);
return elem;
simplify_using_initial_values (struct loop *loop, enum rtx_code op, rtx *expr)
{
bool expression_valid;
- rtx head, tail, cond_list, last_valid_expr;
+ rtx head, tail, last_valid_expr;
+ rtx_expr_list *cond_list;
rtx_insn *insn;
rtx neutral, aggr;
regset altered, this_altered;
expression_valid = true;
last_valid_expr = *expr;
- cond_list = NULL_RTX;
+ cond_list = NULL;
while (1)
{
insn = BB_END (e->src);
if (suitable_set_for_replacement (insn, &dest, &src))
{
- rtx *pnote, *pnote_next;
+ rtx_expr_list **pnote, **pnote_next;
replace_in_expr (expr, dest, src);
if (CONSTANT_P (*expr))
rtx note = *pnote;
rtx old_cond = XEXP (note, 0);
- pnote_next = &XEXP (note, 1);
+ pnote_next = (rtx_expr_list **)&XEXP (note, 1);
replace_in_expr (&XEXP (note, 0), dest, src);
/* We can no longer use a condition that has been simplified
}
else
{
- rtx *pnote, *pnote_next;
+ rtx_expr_list **pnote, **pnote_next;
/* If we did not use this insn to make a replacement, any overlap
between stores in this insn and our expression will cause the
rtx note = *pnote;
rtx old_cond = XEXP (note, 0);
- pnote_next = &XEXP (note, 1);
+ pnote_next = (rtx_expr_list **)&XEXP (note, 1);
if (for_each_rtx (&old_cond, altered_reg_used, this_altered))
{
*pnote = *pnote_next;
/* An EXPR_LIST of REG_EQUIVs containing MEMs with
alternate representations of the location of pseudo reg N. */
- rtx alt_mem_list;
+ rtx_expr_list *alt_mem_list;
/* The list of insns that initialized reg N from its equivalent
constant or memory slot. */
/* lists.c */
-extern void free_EXPR_LIST_list (rtx *);
+extern void free_EXPR_LIST_list (rtx_expr_list **);
extern void free_INSN_LIST_list (rtx_insn_list **);
extern void free_EXPR_LIST_node (rtx);
extern void free_INSN_LIST_node (rtx);
extern rtx_insn_list *alloc_INSN_LIST (rtx, rtx);
extern rtx_insn_list *copy_INSN_LIST (rtx_insn_list *);
extern rtx_insn_list *concat_INSN_LIST (rtx_insn_list *, rtx_insn_list *);
-extern rtx alloc_EXPR_LIST (int, rtx, rtx);
+extern rtx_expr_list *alloc_EXPR_LIST (int, rtx, rtx);
extern void remove_free_INSN_LIST_elem (rtx_insn *, rtx_insn_list **);
extern rtx remove_list_elem (rtx, rtx *);
extern rtx_insn *remove_free_INSN_LIST_node (rtx_insn_list **);
-extern rtx remove_free_EXPR_LIST_node (rtx *);
+extern rtx remove_free_EXPR_LIST_node (rtx_expr_list **);
/* reginfo.c */
static int
remove_from_both_dependence_lists (rtx insn,
rtx_insn_list **listp,
- rtx *exprp)
+ rtx_expr_list **exprp)
{
int removed = 0;
}
listp = (rtx_insn_list **)&XEXP (*listp, 1);
- exprp = &XEXP (*exprp, 1);
+ exprp = (rtx_expr_list **)&XEXP (*exprp, 1);
}
return removed;
{
rtx_insn_list **insn_list;
rtx_insn_list *insn_node;
- rtx *mem_list;
- rtx mem_node;
+ rtx_expr_list **mem_list;
+ rtx_expr_list *mem_node;
gcc_assert (!deps->readonly);
if (read_p)
rtx_insn_list *pending_read_insns;
/* An EXPR_LIST containing all MEM rtx's which are pending reads. */
- rtx pending_read_mems;
+ rtx_expr_list *pending_read_mems;
/* An INSN_LIST containing all insns with pending write operations. */
rtx_insn_list *pending_write_insns;
/* An EXPR_LIST containing all MEM rtx's which are pending writes. */
- rtx pending_write_mems;
+ rtx_expr_list *pending_write_mems;
/* An INSN_LIST containing all jump insns. */
rtx_insn_list *pending_jump_insns;
static void compute_block_dependences (int);
static void schedule_region (int);
-static void concat_insn_mem_list (rtx_insn_list *, rtx,
- rtx_insn_list **, rtx *);
+static void concat_insn_mem_list (rtx_insn_list *, rtx_expr_list *,
+ rtx_insn_list **, rtx_expr_list **);
static void propagate_deps (int, struct deps_desc *);
static void free_pending_lists (void);
static struct deps_desc *bb_deps;
static void
-concat_insn_mem_list (rtx_insn_list *copy_insns, rtx copy_mems,
+concat_insn_mem_list (rtx_insn_list *copy_insns,
+ rtx_expr_list *copy_mems,
rtx_insn_list **old_insns_p,
- rtx *old_mems_p)
+ rtx_expr_list **old_mems_p)
{
rtx_insn_list *new_insns = *old_insns_p;
- rtx new_mems = *old_mems_p;
+ rtx_expr_list *new_mems = *old_mems_p;
while (copy_insns)
{
new_insns = alloc_INSN_LIST (copy_insns->insn (), new_insns);
- new_mems = alloc_EXPR_LIST (VOIDmode, XEXP (copy_mems, 0), new_mems);
+ new_mems = alloc_EXPR_LIST (VOIDmode, copy_mems->element (), new_mems);
copy_insns = copy_insns->next ();
- copy_mems = XEXP (copy_mems, 1);
+ copy_mems = copy_mems->next ();
}
*old_insns_p = new_insns;
bool store;
enum machine_mode mem_mode;
HOST_WIDE_INT stack_adjust;
- rtx side_effects;
+ rtx_expr_list *side_effects;
};
/* Helper for adjust_mems. Return 1 if *loc is unsuitable for
amd.mem_mode = VOIDmode;
amd.stack_adjust = -VTI (bb)->out.stack_adjust;
- amd.side_effects = NULL_RTX;
+ amd.side_effects = NULL;
amd.store = true;
note_stores (PATTERN (insn), adjust_mem_stores, &amd);
struct adjust_mem_data amd;
amd.mem_mode = VOIDmode;
amd.stack_adjust = -VTI (bb)->out.stack_adjust;
- amd.side_effects = NULL_RTX;
+ amd.side_effects = NULL;
amd.store = true;
mem = simplify_replace_fn_rtx (mem, NULL_RTX, adjust_mems,
&amd);