From 848a392af3fffc1d66fc359861e02f8f5edf0ab6 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Wed, 18 May 2016 15:04:23 +0200 Subject: [PR 70646] Store size to inlining predicate conditions 2016-05-18 Martin Jambor PR ipa/70646 * ipa-inline.h (condition): New field size. * ipa-inline-analysis.c (add_condition): New parameter SIZE, use it for comaprison and store it into the new condition. (evaluate_conditions_for_known_args): Use condition size to check access sizes for all but CHANGED conditions. (unmodified_parm_1): New parameter size_p, store access size into it. (unmodified_parm): Likewise. (unmodified_parm_or_parm_agg_item): Likewise. (eliminated_by_inlining_prob): Pass NULL to unmodified_parm as size_p. (set_cond_stmt_execution_predicate): Extract access sizes and store them to conditions. (set_switch_stmt_execution_predicate): Likewise. (will_be_nonconstant_expr_predicate): Likewise. (will_be_nonconstant_predicate): Likewise. (inline_read_section): Stream condition size. (inline_write_summary): Likewise. testsuite/ * gcc.dg/ipa/pr70646.c: New test. From-SVN: r236389 --- gcc/ipa-inline.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/ipa-inline.h') diff --git a/gcc/ipa-inline.h b/gcc/ipa-inline.h index df535d0..47f8832 100644 --- a/gcc/ipa-inline.h +++ b/gcc/ipa-inline.h @@ -34,6 +34,8 @@ struct GTY(()) condition /* If agg_contents is set, this is the offset from which the used data was loaded. */ HOST_WIDE_INT offset; + /* Size of the access reading the data (or the PARM_DECL SSA_NAME). */ + HOST_WIDE_INT size; tree val; int operand_num; ENUM_BITFIELD(tree_code) code : 16; -- cgit v1.1