aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.h
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2003-06-24 18:50:29 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2003-06-24 16:50:29 +0000
commite69529cd536c79f1849f271e230e0b61fede7b84 (patch)
tree6d104fc83b2d07c080d44ba705184072c8821bf6 /gcc/cgraph.h
parent6df5158a36cb2b8c5f6642f0208648c1ea2d5786 (diff)
downloadgcc-e69529cd536c79f1849f271e230e0b61fede7b84.zip
gcc-e69529cd536c79f1849f271e230e0b61fede7b84.tar.gz
gcc-e69529cd536c79f1849f271e230e0b61fede7b84.tar.bz2
Makefile.in (cgraph.o): Depend on output.h, not depend on tree-inline.h
* Makefile.in (cgraph.o): Depend on output.h, not depend on tree-inline.h * cgraph.c: Do not include tree-inline.h; include output.h (known_fns): Rename to ... (known_decls): ... this one; update all uses. (cgraph_varpool_hash): New static variable. (cgraph_varpool_n_nodes, cgraph_varpool_nodes_queue): New global variables. (cgraph_varpool_hash_node, eq_cgraph_varpool_node, cgraph_varpool_node, cgraph_varpool_node_for_identifier, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_assemble_pending_decls): New functions. * cgraph.h (cgraph_varpool_node): New structure. (cgraph_varpool_n_nodes, cgraph_varpool_nodes_queue): Declare. (cgraph_varpool_node, cgraph_varpool_node_for_identifier, cgraph_varpool_finalize_decl, cgraph_varpool_mark_needed_node, cgraph_varpool_asemble_pending_decls): Declare. * cgraphunit.c (record_call_1): Notice variable references. (cgraph_finalize_compilation_unit): Assemble pending variables. * toplev.c (wrapup_global_declarations): Use varpool. (compile_file): Assemble pending declarations. (rest_of_decl_compilation): Use varpool in unit-at-a-time mode. * varasm.c (assemble_name): Notice varpool references. From-SVN: r68426
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r--gcc/cgraph.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index d29e190d..de35a0d 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -97,11 +97,32 @@ struct cgraph_edge
struct cgraph_edge *next_callee;
};
+/* The cgraph_varpool data strutcture.
+ Each static variable decl has assigned cgraph_varpool_node. */
+
+struct cgraph_varpool_node
+{
+ tree decl;
+ void *aux;
+
+ /* Set when function must be output - it is externally visible
+ or it's address is taken. */
+ bool needed;
+ /* Set once it has been finalized so we consider it to be output. */
+ bool finalized;
+ /* Set when function is scheduled to be assembled. */
+ bool output;
+};
+
extern struct cgraph_node *cgraph_nodes;
extern int cgraph_n_nodes;
extern bool cgraph_global_info_ready;
extern struct cgraph_node *cgraph_nodes_queue;
+extern int cgraph_varpool_n_nodes;
+extern struct cgraph_varpool_node *cgraph_varpool_nodes_queue;
+
+
/* In cgraph.c */
void dump_cgraph PARAMS ((FILE *));
void cgraph_remove_call PARAMS ((tree, tree));
@@ -114,6 +135,12 @@ struct cgraph_local_info *cgraph_local_info PARAMS ((tree));
struct cgraph_global_info *cgraph_global_info PARAMS ((tree));
struct cgraph_rtl_info *cgraph_rtl_info PARAMS ((tree));
+struct cgraph_varpool_node *cgraph_varpool_node (tree decl);
+struct cgraph_varpool_node *cgraph_varpool_node_for_identifier (tree id);
+void cgraph_varpool_mark_needed_node (struct cgraph_varpool_node *);
+void cgraph_varpool_finalize_decl (tree);
+bool cgraph_varpool_assemble_pending_decls (void);
+
/* In cgraphunit.c */
void cgraph_finalize_function PARAMS ((tree, tree));
void cgraph_finalize_compilation_unit PARAMS ((void));