diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-29 15:47:54 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-29 15:47:54 +0000 |
commit | 81bdf64f2035b8979549fc533915ea17d429dc9f (patch) | |
tree | 69e2b47b22500339535d6f5f37e3fca2350d4f3a /gcc/varpool.c | |
parent | 7f1c23c2e7981438c251121d85cf5d807b9a4f5d (diff) | |
download | gcc-81bdf64f2035b8979549fc533915ea17d429dc9f.tar.gz |
2008-07-29 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r138226 [after tuple merge into trunk]
some compiler probe stuff are missing
* gcc/compiler-probe.h: more gimple, less tree
* gcc/compiler-probe.c: incomplete merge.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@138247 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varpool.c')
-rw-r--r-- | gcc/varpool.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/gcc/varpool.c b/gcc/varpool.c index c2410f664f5..1d1cc9ed630 100644 --- a/gcc/varpool.c +++ b/gcc/varpool.c @@ -32,7 +32,7 @@ along with GCC; see the file COPYING3. If not see #include "debug.h" #include "target.h" #include "output.h" -#include "tree-gimple.h" +#include "gimple.h" #include "tree-flow.h" /* This file contains basic routines manipulating variable pool. @@ -61,7 +61,7 @@ struct varpool_node *varpool_nodes; maintained in forward order. GTY is needed to make it friendly to PCH. - During unit-at-a-time compilation we construct the queue of needed variables + During compilation we construct the queue of needed variables twice: first time it is during cgraph construction, second time it is at the end of compilation in VARPOOL_REMOVE_UNREFERENCED_DECLS so we can avoid optimized out variables being output. @@ -214,17 +214,13 @@ varpool_reset_queue (void) /* Determine if variable DECL is needed. That is, visible to something either outside this translation unit, something magic in the system - configury, or (if not doing unit-at-a-time) to something we haven't - seen yet. */ + configury */ bool decide_is_variable_needed (struct varpool_node *node, tree decl) { /* If the user told us it is used, then it must be so. */ if (node->externally_visible || node->force_output) return true; - if (!flag_unit_at_a_time - && lookup_attribute ("used", DECL_ATTRIBUTES (decl))) - return true; /* ??? If the assembler name is set by hand, it is possible to assemble the name later after finalizing the function and the fact is noticed @@ -257,7 +253,7 @@ decide_is_variable_needed (struct varpool_node *node, tree decl) /* When not reordering top level variables, we have to assume that we are going to keep everything. */ - if (flag_unit_at_a_time && flag_toplevel_reorder) + if (flag_toplevel_reorder) return false; /* We want to emit COMDAT variables only when absolutely necessary. */ @@ -280,7 +276,7 @@ varpool_finalize_decl (tree decl) if this function has already run. */ if (node->finalized) { - if (cgraph_global_info_ready || (!flag_unit_at_a_time && !flag_openmp)) + if (cgraph_global_info_ready) varpool_assemble_pending_decls (); return; } @@ -295,7 +291,7 @@ varpool_finalize_decl (tree decl) there. */ else if (TREE_PUBLIC (decl) && !DECL_COMDAT (decl) && !DECL_EXTERNAL (decl)) varpool_mark_needed_node (node); - if (cgraph_global_info_ready || (!flag_unit_at_a_time && !flag_openmp)) + if (cgraph_global_info_ready) varpool_assemble_pending_decls (); } |