aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2019-08-07 13:18:35 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2019-08-07 13:18:35 +0000
commit8600364582f24d2a3f227111c6a87b7d98561c69 (patch)
treee1cd0535b1274de714311e9eaa23ef8742633eee /gcc/ipa-prop.c
parent12bbb1f78e610e665077f6ed58013b4c9f57741b (diff)
downloadgcc-8600364582f24d2a3f227111c6a87b7d98561c69.zip
gcc-8600364582f24d2a3f227111c6a87b7d98561c69.tar.gz
gcc-8600364582f24d2a3f227111c6a87b7d98561c69.tar.bz2
Make IPA predicate::size a poly_int64
This patch changes the IPA predicate::size field from a HOST_WIDE_INT to a poly_int64. 2019-08-07 Richard Sandiford <richard.sandiford@arm.com> gcc/ * data-streamer.h (streamer_write_poly_uint64): Declare. (streamer_read_poly_uint64): Likewise. * data-streamer-in.c (streamer_read_poly_uint64): New function. * data-streamer-out.c (streamer_write_poly_uint64): Likewise. * ipa-predicate.h (condition::size): Turn into a poly_int64. (add_condition): Take a poly_int64 size. * ipa-predicate.c (add_condition): Likewise. * ipa-prop.h (ipa_load_from_parm_agg): Take a poly_int64 size pointer. * ipa-prop.c (ipa_load_from_parm_agg): Likewise. (ipcp_modif_dom_walker::before_dom_children): Update accordingly. * ipa-fnsummary.c (evaluate_conditions_for_known_args): Handle condition::size as a poly_int64. (unmodified_parm_1): Take a poly_int64 size pointer. (unmodified_parm): Likewise. (unmodified_parm_or_parm_agg_item): Likewise. (set_cond_stmt_execution_predicate): Update accordingly. (set_switch_stmt_execution_predicate): Likewise. (will_be_nonconstant_expr_predicate): Likewise. (will_be_nonconstant_predicate): Likewise. (inline_read_section): Stream condition::size as a poly_int. (ipa_fn_summary_write): Likewise. From-SVN: r274162
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r--gcc/ipa-prop.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 344b78e..ce669f8 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -1059,7 +1059,7 @@ bool
ipa_load_from_parm_agg (struct ipa_func_body_info *fbi,
vec<ipa_param_descriptor, va_gc> *descriptors,
gimple *stmt, tree op, int *index_p,
- HOST_WIDE_INT *offset_p, HOST_WIDE_INT *size_p,
+ HOST_WIDE_INT *offset_p, poly_int64 *size_p,
bool *by_ref_p, bool *guaranteed_unmodified)
{
int index;
@@ -4917,7 +4917,8 @@ ipcp_modif_dom_walker::before_dom_children (basic_block bb)
struct ipa_agg_replacement_value *v;
gimple *stmt = gsi_stmt (gsi);
tree rhs, val, t;
- HOST_WIDE_INT offset, size;
+ HOST_WIDE_INT offset;
+ poly_int64 size;
int index;
bool by_ref, vce;
@@ -4952,7 +4953,8 @@ ipcp_modif_dom_walker::before_dom_children (basic_block bb)
break;
if (!v
|| v->by_ref != by_ref
- || tree_to_shwi (TYPE_SIZE (TREE_TYPE (v->value))) != size)
+ || maybe_ne (tree_to_poly_int64 (TYPE_SIZE (TREE_TYPE (v->value))),
+ size))
continue;
gcc_checking_assert (is_gimple_ip_invariant (v->value));