diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-23 17:30:34 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-23 17:30:34 +0000 |
commit | eb4ae06472b01a694fedb122056497c7fd1303e4 (patch) | |
tree | b7d4d86552fa108883f41793fa83d183e8bf9df5 /gcc/ipa-inline.h | |
parent | 154d17823e5805a9acf57facb7714e0440fa2beb (diff) | |
download | gcc-eb4ae06472b01a694fedb122056497c7fd1303e4.tar.gz |
* gcc.dg/ipa/inline-1.c: new testcase.
* gcc.dg/ipa/inline-2.c: new testcase.
* gcc.dg/ipa/inline-3.c: new testcase.
* gcc.dg/ipa/inline-4.c: new testcase.
* ipa-inline-transform.c (inline_call): Add comment.
* ipa-inline.h (inline_param_summary): New structure and vector.
(struct inline_edge_summary): Add param field.
* ipa-inline-analysis.c (CHANGED): New constant.
(add_clause): Handle CHANGED and NOT_CONSTANT.
(predicate_probability): New function.
(dump_condition): Dump CHANGED predicate.
(evaluate_conditions_for_known_args): Handle ERROR_MARK as marker
of unknown function wide invariant.
(evaluate_conditions_for_edge): Handle change probabilities.
(inline_edge_duplication_hook): Copy param summaries.
(inline_edge_removal_hook): Free param summaries.
(dump_inline_edge_summary): Fix dumping of indirect edges and callee sizes;
dump param summaries.
(will_be_nonconstant_predicate): Use CHANGED predicate.
(record_modified_bb_info): New structure.
(record_modified): New function.
(param_change_prob): New function.
(estimate_function_body_sizes): Compute param summaries.
(estimate_edge_size_and_time): Add probability argument.
(estimate_node_size_and_time): Add inline_param_summary argument;
handle predicate probabilities.
(remap_predicate): Fix formating.
(remap_edge_change_prob): New function.
(remap_edge_summaries): Rename from ...; use remap_edge_change_prob.
(remap_edge_predicates): ... this one.
(inline_merge_summary): Remap edge summaries; handle predicate probabilities;
remove param summaries after we are done.
(do_estimate_edge_time): Update.
(do_estimate_edge_growth): Update.
(read_inline_edge_summary): Read param info.
(inline_read_summary): Fix formating.
(write_inline_edge_summary): Write param summaries.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179126 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline.h')
-rw-r--r-- | gcc/ipa-inline.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/ipa-inline.h b/gcc/ipa-inline.h index c129d28f239..6df7867b019 100644 --- a/gcc/ipa-inline.h +++ b/gcc/ipa-inline.h @@ -104,11 +104,28 @@ struct GTY(()) inline_summary VEC(size_time_entry,gc) *entry; }; + typedef struct inline_summary inline_summary_t; DEF_VEC_O(inline_summary_t); DEF_VEC_ALLOC_O(inline_summary_t,gc); extern GTY(()) VEC(inline_summary_t,gc) *inline_summary_vec; +/* Information kept about parameter of call site. */ +struct inline_param_summary +{ + /* REG_BR_PROB_BASE based probability that parameter will change in between + two invocation of the calls. + I.e. loop invariant parameters + REG_BR_PROB_BASE/estimated_iterations and regular + parameters REG_BR_PROB_BASE. + + Value 0 is reserved for compile time invariants. */ + int change_prob; +}; +typedef struct inline_param_summary inline_param_summary_t; +DEF_VEC_O(inline_param_summary_t); +DEF_VEC_ALLOC_O(inline_param_summary_t,heap); + /* Information kept about callgraph edges. */ struct inline_edge_summary { @@ -118,6 +135,10 @@ struct inline_edge_summary /* Depth of loop nest, 0 means no nesting. */ unsigned short int loop_depth; struct predicate *predicate; + /* Array indexed by parameters. + 0 means that parameter change all the time, REG_BR_PROB_BASE means + that parameter is constant. */ + VEC (inline_param_summary_t, heap) *param; }; typedef struct inline_edge_summary inline_edge_summary_t; |