diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-08 12:32:37 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-08 12:32:37 +0000 |
commit | 313d62a349ecb8ad8a419783fe776c7ecd5384d0 (patch) | |
tree | 7717c5e62d64af14c96a1abe2b5c0bd6b8300db2 /gcc/ipa-inline.h | |
parent | a540eb41c1e6735a9a0b9c549e6be624a25c9e6a (diff) | |
download | gcc-313d62a349ecb8ad8a419783fe776c7ecd5384d0.tar.gz |
2012-10-08 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 192205 using svnmerge.py
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@192206 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline.h')
-rw-r--r-- | gcc/ipa-inline.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/gcc/ipa-inline.h b/gcc/ipa-inline.h index ec9cf4d13ac..df8b3a7e202 100644 --- a/gcc/ipa-inline.h +++ b/gcc/ipa-inline.h @@ -201,7 +201,7 @@ void estimate_ipcp_clone_size_and_time (struct cgraph_node *, int do_estimate_growth (struct cgraph_node *); void inline_merge_summary (struct cgraph_edge *edge); void inline_update_overall_summary (struct cgraph_node *node); -int do_estimate_edge_growth (struct cgraph_edge *edge); +int do_estimate_edge_size (struct cgraph_edge *edge); int do_estimate_edge_time (struct cgraph_edge *edge); inline_hints do_estimate_edge_hints (struct cgraph_edge *edge); void initialize_growth_caches (void); @@ -245,20 +245,31 @@ estimate_growth (struct cgraph_node *node) } -/* Return estimated callee growth after inlining EDGE. */ +/* Return estimated size of the inline sequence of EDGE. */ static inline int -estimate_edge_growth (struct cgraph_edge *edge) +estimate_edge_size (struct cgraph_edge *edge) { int ret; if ((int)VEC_length (edge_growth_cache_entry, edge_growth_cache) <= edge->uid || !(ret = VEC_index (edge_growth_cache_entry, edge_growth_cache, edge->uid).size)) - return do_estimate_edge_growth (edge); + return do_estimate_edge_size (edge); return ret - (ret > 0); } +/* Return estimated callee growth after inlining EDGE. */ + +static inline int +estimate_edge_growth (struct cgraph_edge *edge) +{ +#ifdef ENABLE_CHECKING + gcc_checking_assert (inline_edge_summary (edge)->call_stmt_size); +#endif + return (estimate_edge_size (edge) + - inline_edge_summary (edge)->call_stmt_size); +} /* Return estimated callee runtime increase after inlning EDGE. */ |