aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.h
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2015-03-09 05:53:54 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2015-03-09 04:53:54 +0000
commite0d514da7ba05dabd279fee99a1ef8f40f098ab0 (patch)
tree4d0fa49deb182f96c355f84d405543db33394f5d /gcc/cgraph.h
parent68ca4ac90b7413e7007ae6b08d372205e42bdb7d (diff)
downloadgcc-e0d514da7ba05dabd279fee99a1ef8f40f098ab0.zip
gcc-e0d514da7ba05dabd279fee99a1ef8f40f098ab0.tar.gz
gcc-e0d514da7ba05dabd279fee99a1ef8f40f098ab0.tar.bz2
ipa-inline-analysis.c (check_callers): Check node->can_remove_if_no_direct_calls_and_refs_p.
* ipa-inline-analysis.c (check_callers): Check node->can_remove_if_no_direct_calls_and_refs_p. (growth_likely_positive): Reorganize to call can_remove_if_no_direct_calls_p later. * cgraph.h (will_be_removed_from_program_if_no_direct_calls_p, will_be_removed_from_program_if_no_direct_calls_p): Add will_inline parameter. * cgraph.c (cgraph_node::can_remove_if_no_direct_calls_p, cgraph_node::will_be_removed_from_program_if_no_direct_calls_p): Handle inliner case correctly. From-SVN: r221277
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r--gcc/cgraph.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index dcf383b..2b96b6bc 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -1110,16 +1110,23 @@ public:
all uses of COMDAT function does not make it necessarily disappear from
the program unless we are compiling whole program or we do LTO. In this
case we know we win since dynamic linking will not really discard the
- linkonce section. */
- bool will_be_removed_from_program_if_no_direct_calls_p (void);
+ linkonce section.
+
+ If WILL_INLINE is true, assume that function will be inlined into all the
+ direct calls. */
+ bool will_be_removed_from_program_if_no_direct_calls_p
+ (bool will_inline = false);
/* Return true when function can be removed from callgraph
- if all direct calls are eliminated. */
+ if all direct calls and references are eliminated. The function does
+ not take into account comdat groups. */
bool can_remove_if_no_direct_calls_and_refs_p (void);
/* Return true when function cgraph_node and its aliases can be removed from
- callgraph if all direct calls are eliminated. */
- bool can_remove_if_no_direct_calls_p (void);
+ callgraph if all direct calls are eliminated.
+ If WILL_INLINE is true, assume that function will be inlined into all the
+ direct calls. */
+ bool can_remove_if_no_direct_calls_p (bool will_inline = false);
/* Return true when callgraph node is a function with Gimple body defined
in current unit. Functions can also be define externally or they