diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2019-11-03 23:32:56 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2019-11-03 22:32:56 +0000 |
commit | 40a777e840f74dd5c19ea26c55d1248a335fd11b (patch) | |
tree | d986b1ce6aa2a9086a52ad6e19d0181b37c71a3c /gcc/ipa-predicate.c | |
parent | 4bcd578ab4927bc42b72b66d6d4d816ae5598ae7 (diff) | |
download | gcc-40a777e840f74dd5c19ea26c55d1248a335fd11b.zip gcc-40a777e840f74dd5c19ea26c55d1248a335fd11b.tar.gz gcc-40a777e840f74dd5c19ea26c55d1248a335fd11b.tar.bz2 |
Improve effectivity of ipa_polymorphi_context cache.
* ipa-fnsummary.c (set_cond_stmt_execution_predicate,
set_switch_stmt_execution_predicate, compute_bb_predicates,
will_be_nonconstant_expr_predicate,
phi_result_unknown_predicate,
analyze_function_body): Pass arround params summary.
(ipa_call_context::duplicate_from): New comment;
only duplicate useful values.
(ipa_call_context::equal_to): Only compare useful values.
(remap_edge_summaries): Pass params_summary.
(remap_hint_predicate): Likewise.
(ipa_merge_fn_summary_after_inlining): Likewise.
(inline_read_section): Initialize params summary used flags.
* ipa-predicate.c (predicate::remap_after_inlining): Pass
around param_summary.
(add_condition): Initialized used params summary flags.
* ipa-predicate.h (inline_param_summary::equals_to): Make const.
(inline_param_summary::useless_p): New predicate.
(remap_after_inlining, add_condition): Update prototype
* ipa-prop.c (ipa_populate_param_decls): Watch overflow in
move_cost.
(ipa_note_param_call): Add parameter POLYMORPHIC; update params
summaries.
(ipa_analyze_indirect_call_uses): Update use of ipa_note_param_call.
(ipa_analyze_virtual_call_uses): Likewise.
(update_indirect_edges_after_inlining): Update param summaries.
(ipa_print_node_params): Print used flags.
(ipa_read_indirect_edge_info): Update param summareis.
* ipa-prop.h (ipa_param_descriptor): Add
used_by_ipa_predicates, used_by_indirect_call
and used_by_polymorphic_call.
(ipa_set_param_used_by_ipa_predicates,
ipa_set_param_used_by_indirect_call,
ipa_set_param_used_by_polymorphic_call,
ipa_is_param_used_by_ipa_predicates,
ipa_is_param_used_by_indirect_call,
ipa_is_param_used_by_polymorphic_call): New inline functions.
From-SVN: r277759
Diffstat (limited to 'gcc/ipa-predicate.c')
-rw-r--r-- | gcc/ipa-predicate.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ipa-predicate.c b/gcc/ipa-predicate.c index b5e3cf4..721f095 100644 --- a/gcc/ipa-predicate.c +++ b/gcc/ipa-predicate.c @@ -505,6 +505,7 @@ predicate::remap_after_duplication (clause_t possible_truths) predicate predicate::remap_after_inlining (class ipa_fn_summary *info, + class ipa_node_params *params_summary, class ipa_fn_summary *callee_info, vec<int> operand_map, vec<int> offset_map, @@ -566,7 +567,7 @@ predicate::remap_after_inlining (class ipa_fn_summary *info, ap.offset = c->offset + offset_delta; ap.agg_contents = c->agg_contents; ap.by_ref = c->by_ref; - cond_predicate = add_condition (info, + cond_predicate = add_condition (info, params_summary, operand_map[c->operand_num], c->type, &ap, c->code, c->val, c->param_ops); @@ -629,7 +630,9 @@ predicate::stream_out (struct output_block *ob) aggregate. */ predicate -add_condition (class ipa_fn_summary *summary, int operand_num, +add_condition (class ipa_fn_summary *summary, + class ipa_node_params *params_summary, + int operand_num, tree type, struct agg_position_info *aggpos, enum tree_code code, tree val, expr_eval_ops param_ops) { @@ -640,6 +643,9 @@ add_condition (class ipa_fn_summary *summary, int operand_num, bool agg_contents, by_ref; expr_eval_op *op; + if (params_summary) + ipa_set_param_used_by_ipa_predicates (params_summary, operand_num, true); + if (aggpos) { offset = aggpos->offset; |