Commit 3b4459f9 by Richard Sandiford Committed by Richard Sandiford

var-tracking.c (add_uses): Take an rtx rather than an rtx *.

gcc/
	* var-tracking.c (add_uses): Take an rtx rather than an rtx *.
	Give real type of data parameter.  Remove return value.
	(add_uses_1): Use FOR_EACH_SUBRTX_VAR rather than for_each_rtx
	to iterate over subrtxes.

From-SVN: r214664
parent b328e730
2014-08-28 Richard Sandiford <rdsandiford@googlemail.com>
* var-tracking.c (add_uses): Take an rtx rather than an rtx *.
Give real type of data parameter. Remove return value.
(add_uses_1): Use FOR_EACH_SUBRTX_VAR rather than for_each_rtx
to iterate over subrtxes.
2014-08-28 Richard Sandiford <rdsandiford@googlemail.com>
* var-tracking.c (use_narrower_mode_test): Turn from being a
for_each_rtx callback to being a function that examines each
subrtx itself.
......@@ -665,7 +665,6 @@ static void dataflow_set_destroy (dataflow_set *);
static bool contains_symbol_ref (rtx);
static bool track_expr_p (tree, bool);
static bool same_variable_part_p (rtx, tree, HOST_WIDE_INT);
static int add_uses (rtx *, void *);
static void add_uses_1 (rtx *, void *);
static void add_stores (rtx, const_rtx, void *);
static bool compute_bb_dataflow (basic_block);
......@@ -5552,14 +5551,12 @@ non_suitable_const (const_rtx x)
}
/* Add uses (register and memory references) LOC which will be tracked
to VTI (bb)->mos. INSN is instruction which the LOC is part of. */
to VTI (bb)->mos. */
static int
add_uses (rtx *ploc, void *data)
static void
add_uses (rtx loc, struct count_use_info *cui)
{
rtx loc = *ploc;
enum machine_mode mode = VOIDmode;
struct count_use_info *cui = (struct count_use_info *)data;
enum micro_operation_type type = use_type (loc, cui, &mode);
if (type != MO_CLOBBER)
......@@ -5705,8 +5702,6 @@ add_uses (rtx *ploc, void *data)
log_op_type (mo.u.loc, cui->bb, cui->insn, mo.type, dump_file);
VTI (bb)->mos.safe_push (mo);
}
return 0;
}
/* Helper function for finding all uses of REG/MEM in X in insn INSN. */
......@@ -5714,7 +5709,9 @@ add_uses (rtx *ploc, void *data)
static void
add_uses_1 (rtx *x, void *cui)
{
for_each_rtx (x, add_uses, cui);
subrtx_var_iterator::array_type array;
FOR_EACH_SUBRTX_VAR (iter, array, *x, NONCONST)
add_uses (*iter, (struct count_use_info *) cui);
}
/* This is the value used during expansion of locations. We want it
......
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