diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2014-11-26 18:10:29 +0000 |
---|---|---|
committer | Bernd Edlinger <edlinger@gcc.gnu.org> | 2014-11-26 18:10:29 +0000 |
commit | 6cbde2e317bb4be42e88000de6b927e55904f0dc (patch) | |
tree | 6293fca73098e7b3f8d1ab85fb4e3532798064e4 /gcc/cgraph.h | |
parent | 69d7fa342c0ff1932ad451d1ebd5aab53e79dd10 (diff) | |
download | gcc-6cbde2e317bb4be42e88000de6b927e55904f0dc.zip gcc-6cbde2e317bb4be42e88000de6b927e55904f0dc.tar.gz gcc-6cbde2e317bb4be42e88000de6b927e55904f0dc.tar.bz2 |
re PR ipa/61190 (g++.old-deja/g++.mike/p4736b.C FAILs at -O2/-Os/-O3)
2014-11-26 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR ipa/61190
* cgraph.h (symtab_node::call_for_symbol_and_aliases): Fix comment.
(cgraph_node::function_or_virtual_thunk_symbol): New function.
(cgraph_node::call_for_symbol_and_aliases): Fix comment.
(cgraph_node::call_for_symbol_thunks_and_aliases): Adjust comment.
Add new optional parameter exclude_virtual_thunks.
* cgraph.c (cgraph_node::call_for_symbol_thunks_and_aliases): Add new
optional parameter exclude_virtual_thunks.
(cgraph_node::set_const_flag): Don't propagate to virtual thunks.
(cgraph_node::set_pure_flag): Likewise.
(cgraph_node::function_symbol): Simplified.
(cgraph_node::function_or_virtual_thunk_symbol): New function.
* ipa-pure-const.c (analyze_function): For virtual thunks set
pure_const_state to IPA_NEITHER.
(propagate_pure_const): Use function_or_virtual_thunk_symbol.
testsuite/ChangeLog:
2014-11-26 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR ipa/61190
* g++.old-deja/g++.mike/p4736b.C: Use -O2.
From-SVN: r218091
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r-- | gcc/cgraph.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h index a5c5f56..04318f5 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -254,9 +254,9 @@ public: body aliases. */ void fixup_same_cpp_alias_visibility (symtab_node *target); - /* Call calback on symtab node and aliases associated to this node. + /* Call callback on symtab node and aliases associated to this node. When INCLUDE_OVERWRITABLE is false, overwritable aliases and thunks are - skipped. */ + skipped. */ bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite); @@ -793,6 +793,13 @@ public: When AVAILABILITY is non-NULL, get minimal availability in the chain. */ cgraph_node *function_symbol (enum availability *avail = NULL); + /* Walk the alias chain to return the function cgraph_node is alias of. + Walk through non virtual thunks, too. Thus we return either a function + or a virtual thunk node. + When AVAILABILITY is non-NULL, get minimal availability in the chain. */ + cgraph_node *function_or_virtual_thunk_symbol + (enum availability *avail = NULL); + /* Create node representing clone of N executed COUNT times. Decrease the execution counts from original node too. The new clone will have decl set to DECL that may or may not be the same @@ -1015,7 +1022,7 @@ public: if any to PURE. */ void set_pure_flag (bool pure, bool looping); - /* Call calback on function and aliases associated to the function. + /* Call callback on function and aliases associated to the function. When INCLUDE_OVERWRITABLE is false, overwritable aliases and thunks are skipped. */ @@ -1023,13 +1030,15 @@ public: void *), void *data, bool include_overwritable); - /* Call calback on cgraph_node, thunks and aliases associated to NODE. + /* Call callback on cgraph_node, thunks and aliases associated to NODE. When INCLUDE_OVERWRITABLE is false, overwritable aliases and thunks are + skipped. When EXCLUDE_VIRTUAL_THUNKS is true, virtual thunks are skipped. */ bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, - void *data), - void *data, - bool include_overwritable); + void *data), + void *data, + bool include_overwritable, + bool exclude_virtual_thunks = false); /* Likewise indicate that a node is needed, i.e. reachable via some external means. */ |