diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-20 09:09:50 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-20 09:09:50 +0000 |
commit | 960df59076491b4de4b135d99b0d09f7b3d82301 (patch) | |
tree | 21dd0c062d62565d1fbbf16f1fd779965b554ca6 /gcc/ipa-reference.c | |
parent | 8d665d11985d6b49622470f839796b725ab37a27 (diff) | |
download | gcc-960df59076491b4de4b135d99b0d09f7b3d82301.tar.gz |
* cgraph.h (FOR_EACH_STATIC_VARIABLE, FOR_EACH_STATIC_INITIALIZER): New
macros.
(varpool_first_static_initializer, varpol_next_static_initializer): New
inline functions.
* ipa-reference.c (analyze_variable): Simplify.
(static_execute): Use FOR_EACH_STATIC_INITIALIZER.
* ipa-type-escape.c (type_escape_execute): Use FOR_EACH_STATIC_VARIABLE.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120070 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-reference.c')
-rw-r--r-- | gcc/ipa-reference.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c index 521c84c6424..8602afda0b0 100644 --- a/gcc/ipa-reference.c +++ b/gcc/ipa-reference.c @@ -774,13 +774,8 @@ static void analyze_variable (struct varpool_node *vnode) { tree global = vnode->decl; - if (TREE_CODE (global) == VAR_DECL) - { - if (DECL_INITIAL (global)) - walk_tree (&DECL_INITIAL (global), scan_for_static_refs, - NULL, visited_nodes); - } - else gcc_unreachable (); + walk_tree (&DECL_INITIAL (global), scan_for_static_refs, + NULL, visited_nodes); } /* This is the main routine for finding the reference patterns for @@ -903,7 +898,7 @@ static_execute (void) ipa_init (); /* Process all of the variables first. */ - for (vnode = varpool_nodes_queue; vnode; vnode = vnode->next_needed) + FOR_EACH_STATIC_INITIALIZER (vnode) analyze_variable (vnode); /* Process all of the functions next. |