aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.h
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2017-04-28 15:04:48 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2017-04-28 13:04:48 +0000
commitab38481ceff08c995ade3e88eccee6ab92914a44 (patch)
tree605e718598b0f75578b041856d9df7946d8b7787 /gcc/ipa-inline.h
parentb26f45f0694604745bbb3d269cacecefd28b4faf (diff)
downloadgcc-ab38481ceff08c995ade3e88eccee6ab92914a44.zip
gcc-ab38481ceff08c995ade3e88eccee6ab92914a44.tar.gz
gcc-ab38481ceff08c995ade3e88eccee6ab92914a44.tar.bz2
ipa-cp.c (perform_estimation_of_a_value): Turn time to sreal.
* ipa-cp.c (perform_estimation_of_a_value): Turn time to sreal. (estimate_local_effects): Likewise. * ipa-inline.c (compute_inlined_call_time, want_inline_small_function_p, edge_badness, inline_small_functions, dump_overall_stats): LIkewise. * ipa-inline.h (edge_growth_cache_entry, estimate_time_after_inlining, estimate_ipcp_clone_size_and_time, do_estimate_edge_time, do_estimate_edge_time, estimate_edge_time): Likewise. * ipa-inline-analysis.c (estimate_node_size_and_time, estimate_ipcp_clone_size_and_time, do_estimate_edge_time): Likewise. (estimate_time_after_inlining): Remove. From-SVN: r247380
Diffstat (limited to 'gcc/ipa-inline.h')
-rw-r--r--gcc/ipa-inline.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/ipa-inline.h b/gcc/ipa-inline.h
index 077f0cc..8acf4d7 100644
--- a/gcc/ipa-inline.h
+++ b/gcc/ipa-inline.h
@@ -232,7 +232,8 @@ extern vec<inline_edge_summary_t> inline_edge_summary_vec;
struct edge_growth_cache_entry
{
- int time, size;
+ sreal time;
+ int size;
inline_hints hints;
};
@@ -249,19 +250,18 @@ void inline_write_summary (void);
void inline_free_summary (void);
void inline_analyze_function (struct cgraph_node *node);
void initialize_inline_failed (struct cgraph_edge *);
-int estimate_time_after_inlining (struct cgraph_node *, struct cgraph_edge *);
int estimate_size_after_inlining (struct cgraph_node *, struct cgraph_edge *);
void estimate_ipcp_clone_size_and_time (struct cgraph_node *,
vec<tree>,
vec<ipa_polymorphic_call_context>,
vec<ipa_agg_jump_function_p>,
- int *, int *, inline_hints *);
+ int *, sreal *, inline_hints *);
int estimate_growth (struct cgraph_node *);
bool growth_likely_positive (struct cgraph_node *, int);
void inline_merge_summary (struct cgraph_edge *edge);
void inline_update_overall_summary (struct cgraph_node *node);
int do_estimate_edge_size (struct cgraph_edge *edge);
-int do_estimate_edge_time (struct cgraph_edge *edge);
+sreal do_estimate_edge_time (struct cgraph_edge *edge);
inline_hints do_estimate_edge_hints (struct cgraph_edge *edge);
void initialize_growth_caches (void);
void free_growth_caches (void);
@@ -314,14 +314,14 @@ estimate_edge_growth (struct cgraph_edge *edge)
/* Return estimated callee runtime increase after inlining
EDGE. */
-static inline int
+static inline sreal
estimate_edge_time (struct cgraph_edge *edge)
{
- int ret;
+ sreal ret;
if ((int)edge_growth_cache.length () <= edge->uid
- || !(ret = edge_growth_cache[edge->uid].time))
+ || !edge_growth_cache[edge->uid].size)
return do_estimate_edge_time (edge);
- return ret - (ret > 0);
+ return edge_growth_cache[edge->uid].time;
}