diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2019-11-16 10:51:09 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2019-11-16 09:51:09 +0000 |
commit | 23ff8c05804c2d3fc6e9179d2e9c2940ae53d592 (patch) | |
tree | eb076794121af38d2f19d07062e9a403f264d6e2 | |
parent | 6d1402f0edf15480a1eb37141bc165cab5bca508 (diff) | |
download | gcc-23ff8c05804c2d3fc6e9179d2e9c2940ae53d592.zip gcc-23ff8c05804c2d3fc6e9179d2e9c2940ae53d592.tar.gz gcc-23ff8c05804c2d3fc6e9179d2e9c2940ae53d592.tar.bz2 |
Fix nonspec_time when there is no cached value.
* ipa-inline.h (do_estimate_edge_time): Add nonspec_time
parameter.
(estimate_edge_time): Use it.
* ipa-inline-analysis.c (do_estimate_edge_time): Add
ret_nonspec_time parameter.
From-SVN: r278333
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/ipa-inline-analysis.c | 4 | ||||
-rw-r--r-- | gcc/ipa-inline.h | 4 |
3 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ef62b5d..db51b83 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-11-15 Jan Hubicka <hubicka@ucw.cz> + + * ipa-inline.h (do_estimate_edge_time): Add nonspec_time + parameter. + (estimate_edge_time): Use it. + * ipa-inline-analysis.c (do_estimate_edge_time): Add + ret_nonspec_time parameter. + 2019-11-15 Szabolcs Nagy <szabolcs.nagy@arm.com> * config/m68k/linux.h (MUSL_DYNAMIC_LINKER): Define. diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index 1e124fd..d550d30 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -179,7 +179,7 @@ simple_edge_hints (struct cgraph_edge *edge) size, since we always need both metrics eventually. */ sreal -do_estimate_edge_time (struct cgraph_edge *edge) +do_estimate_edge_time (struct cgraph_edge *edge, sreal *ret_nonspec_time) { sreal time, nonspec_time; int size; @@ -275,6 +275,8 @@ do_estimate_edge_time (struct cgraph_edge *edge) hints |= simple_edge_hints (edge); entry->hints = hints + 1; } + if (ret_nonspec_time) + *ret_nonspec_time = nonspec_time; return time; } diff --git a/gcc/ipa-inline.h b/gcc/ipa-inline.h index f650b0e..626f264 100644 --- a/gcc/ipa-inline.h +++ b/gcc/ipa-inline.h @@ -46,7 +46,7 @@ int estimate_size_after_inlining (struct cgraph_node *, struct cgraph_edge *); int estimate_growth (struct cgraph_node *); bool growth_positive_p (struct cgraph_node *, struct cgraph_edge *, int); int do_estimate_edge_size (struct cgraph_edge *edge); -sreal do_estimate_edge_time (struct cgraph_edge *edge); +sreal do_estimate_edge_time (struct cgraph_edge *edge, sreal *nonspec_time = NULL); ipa_hints do_estimate_edge_hints (struct cgraph_edge *edge); void reset_node_cache (struct cgraph_node *node); void initialize_growth_caches (); @@ -99,7 +99,7 @@ estimate_edge_time (struct cgraph_edge *edge, sreal *nonspec_time = NULL) if (edge_growth_cache == NULL || (entry = edge_growth_cache->get (edge)) == NULL || entry->time == 0) - return do_estimate_edge_time (edge); + return do_estimate_edge_time (edge, nonspec_time); if (nonspec_time) *nonspec_time = edge_growth_cache->get (edge)->nonspec_time; return entry->time; |