summaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.h
diff options
context:
space:
mode:
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-11 10:50:24 +0000
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-11 10:50:24 +0000
commita4f60e55a178cb5500186d27ff3fd4a62d0281e3 (patch)
tree43a439de6e36e3979859d9e70595d7bc11210e62 /gcc/ipa-inline.h
parent02b699d50d860e2554adddf09753492b6f4bda66 (diff)
downloadgcc-a4f60e55a178cb5500186d27ff3fd4a62d0281e3.tar.gz
2012-08-11 Martin Jambor <mjambor@suse.cz>
PR fortran/48636 * ipa-inline.h (condition): New fields offset, agg_contents and by_ref. * ipa-inline-analysis.c (agg_position_info): New type. (add_condition): New parameter aggpos, also store agg_contents, by_ref and offset. (dump_condition): Also dump aggregate conditions. (evaluate_conditions_for_known_args): Also handle aggregate conditions. New parameter known_aggs. (evaluate_properties_for_edge): Gather known aggregate contents. (inline_node_duplication_hook): Pass NULL known_aggs to evaluate_conditions_for_known_args. (unmodified_parm): Split into unmodified_parm and unmodified_parm_1. (unmodified_parm_or_parm_agg_item): New function. (set_cond_stmt_execution_predicate): Handle values passed in aggregates. (set_switch_stmt_execution_predicate): Likewise. (will_be_nonconstant_predicate): Likewise. (estimate_edge_devirt_benefit): Pass new parameter known_aggs to ipa_get_indirect_edge_target. (estimate_calls_size_and_time): New parameter known_aggs, pass it recrsively to itself and to estimate_edge_devirt_benefit. (estimate_node_size_and_time): New vector known_aggs, pass it o functions which need it. (remap_predicate): New parameter offset_map, use it to remap aggregate conditions. (remap_edge_summaries): New parameter offset_map, pass it recursively to itself and to remap_predicate. (inline_merge_summary): Also create and populate vector offset_map. (do_estimate_edge_time): New vector of known aggregate contents, passed to functions which need it. (inline_read_section): Stream new fields of condition. (inline_write_summary): Likewise. * ipa-cp.c (ipa_get_indirect_edge_target): Also examine the aggregate contents. Let all local callers pass NULL for known_aggs. * testsuite/gfortran.dg/pr48636.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190313 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline.h')
-rw-r--r--gcc/ipa-inline.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ipa-inline.h b/gcc/ipa-inline.h
index fbd0b9982b7..db3f8d4e56b 100644
--- a/gcc/ipa-inline.h
+++ b/gcc/ipa-inline.h
@@ -28,9 +28,18 @@ along with GCC; see the file COPYING3. If not see
typedef struct GTY(()) condition
{
+ /* If agg_contents is set, this is the offset from which the used data was
+ loaded. */
+ HOST_WIDE_INT offset;
tree val;
int operand_num;
- enum tree_code code;
+ ENUM_BITFIELD(tree_code) code : 16;
+ /* Set if the used data were loaded from an aggregate parameter or from
+ data received by reference. */
+ unsigned agg_contents : 1;
+ /* If agg_contents is set, this differentiates between loads from data
+ passed by reference and by value. */
+ unsigned by_ref : 1;
} condition;
DEF_VEC_O (condition);