aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2014-08-28 06:25:05 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2014-08-28 06:25:05 +0000
commit3b4459f903c6da3b6c6e867bf1c62d6471ba5702 (patch)
tree33ac4c3a6c83894fefa3b61a6610c1d3515e9298 /gcc
parentb328e73048fedb84ae4d79dee704193c07b81e19 (diff)
downloadgcc-3b4459f903c6da3b6c6e867bf1c62d6471ba5702.zip
gcc-3b4459f903c6da3b6c6e867bf1c62d6471ba5702.tar.gz
gcc-3b4459f903c6da3b6c6e867bf1c62d6471ba5702.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/var-tracking.c15
2 files changed, 13 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1200668..93dac73 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
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.
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index 149d1ae..792aacb 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -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