From 466659612b3f276fbfac51ecadf0c2cf803270f3 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Tue, 26 Aug 2014 19:03:10 +0000 Subject: [PATCH] cselib_record_sets_hook takes an rtx_insn gcc/ * cselib.h (cselib_record_sets_hook): Strengthen initial param "insn" from rtx to rtx_insn *. * cselib.c (cselib_record_sets_hook): Likewise. * var-tracking.c (add_with_sets): Likewise, renaming back from "uncast_insn" to "insn" and eliminating the checked cast from rtx to rtx_insn *. From-SVN: r214535 --- gcc/ChangeLog | 11 +++++++++++ gcc/cselib.c | 2 +- gcc/cselib.h | 2 +- gcc/var-tracking.c | 3 +-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 75a77eaf8b8..e6414bc79ae 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2014-08-26 David Malcolm + + * cselib.h (cselib_record_sets_hook): Strengthen initial param + "insn" from rtx to rtx_insn *. + + * cselib.c (cselib_record_sets_hook): Likewise. + + * var-tracking.c (add_with_sets): Likewise, renaming back from + "uncast_insn" to "insn" and eliminating the checked cast from rtx + to rtx_insn *. + 2014-08-26 David Malcolm * basic-block.h (struct rtl_bb_info): Strengthen fields "end_" diff --git a/gcc/cselib.c b/gcc/cselib.c index 090cd35c33c..45dd99b79ef 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -258,7 +258,7 @@ void (*cselib_discard_hook) (cselib_val *); represented in the array sets[n_sets]. new_val_min can be used to tell whether values present in sets are introduced by this instruction. */ -void (*cselib_record_sets_hook) (rtx insn, struct cselib_set *sets, +void (*cselib_record_sets_hook) (rtx_insn *insn, struct cselib_set *sets, int n_sets); #define PRESERVED_VALUE_P(RTX) \ diff --git a/gcc/cselib.h b/gcc/cselib.h index 62374c0d546..67ce6dac7c3 100644 --- a/gcc/cselib.h +++ b/gcc/cselib.h @@ -65,7 +65,7 @@ enum cselib_record_what }; extern void (*cselib_discard_hook) (cselib_val *); -extern void (*cselib_record_sets_hook) (rtx insn, struct cselib_set *sets, +extern void (*cselib_record_sets_hook) (rtx_insn *insn, struct cselib_set *sets, int n_sets); extern cselib_val *cselib_lookup (rtx, enum machine_mode, diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 3309b6dff81..b3bda998f87 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -6464,9 +6464,8 @@ prepare_call_arguments (basic_block bb, rtx_insn *insn) first place, in which case sets and n_sets will be 0). */ static void -add_with_sets (rtx uncast_insn, struct cselib_set *sets, int n_sets) +add_with_sets (rtx_insn *insn, struct cselib_set *sets, int n_sets) { - rtx_insn *insn = as_a (uncast_insn); basic_block bb = BLOCK_FOR_INSN (insn); int n1, n2; struct count_use_info cui; -- 2.30.2