aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.h
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2006-12-11 09:07:52 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2006-12-11 08:07:52 +0000
commit8a4a83ed921b2f28db38cf1e7384f1fec2cd22f5 (patch)
treed172f85045dead90ab3d5c93716d8db81074fdec /gcc/cgraph.h
parentce133c3fa2b6dba35d406285f420fef56cb2c445 (diff)
downloadgcc-8a4a83ed921b2f28db38cf1e7384f1fec2cd22f5.zip
gcc-8a4a83ed921b2f28db38cf1e7384f1fec2cd22f5.tar.gz
gcc-8a4a83ed921b2f28db38cf1e7384f1fec2cd22f5.tar.bz2
Move all varpool routines out of cgraph/cgraphunit to varpool.c
Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r--gcc/cgraph.h52
1 files changed, 31 insertions, 21 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 8965563..b60239c 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -46,6 +46,8 @@ enum availability
AVAIL_LOCAL
};
+extern const char * const cgraph_availability_names[];
+
/* Information about the function collected locally.
Available after function is analyzed. */
@@ -204,16 +206,16 @@ typedef struct cgraph_edge *cgraph_edge_p;
DEF_VEC_P(cgraph_edge_p);
DEF_VEC_ALLOC_P(cgraph_edge_p,heap);
-/* The cgraph_varpool data structure.
- Each static variable decl has assigned cgraph_varpool_node. */
+/* The varpool data structure.
+ Each static variable decl has assigned varpool_node. */
-struct cgraph_varpool_node GTY(())
+struct varpool_node GTY(())
{
tree decl;
- /* Pointer to the next function in cgraph_varpool_nodes. */
- struct cgraph_varpool_node *next;
- /* Pointer to the next function in cgraph_varpool_nodes_queue. */
- struct cgraph_varpool_node *next_needed;
+ /* Pointer to the next function in varpool_nodes. */
+ struct varpool_node *next;
+ /* Pointer to the next function in varpool_nodes_queue. */
+ struct varpool_node *next_needed;
/* Ordering of all cgraph nodes. */
int order;
@@ -256,9 +258,6 @@ extern bool cgraph_function_flags_ready;
extern GTY(()) struct cgraph_node *cgraph_nodes_queue;
extern GTY(()) struct cgraph_node *cgraph_expand_queue;
-extern GTY(()) struct cgraph_varpool_node *cgraph_varpool_first_unanalyzed_node;
-extern GTY(()) struct cgraph_varpool_node *cgraph_varpool_nodes_queue;
-extern GTY(()) struct cgraph_varpool_node *cgraph_varpool_nodes;
extern GTY(()) struct cgraph_asm_node *cgraph_asm_nodes;
extern GTY(()) int cgraph_order;
@@ -266,8 +265,6 @@ extern GTY(()) int cgraph_order;
void dump_cgraph (FILE *);
void dump_cgraph_node (FILE *, struct cgraph_node *);
void cgraph_insert_node_to_hashtable (struct cgraph_node *node);
-void dump_varpool (FILE *);
-void dump_cgraph_varpool_node (FILE *, struct cgraph_varpool_node *);
void cgraph_remove_edge (struct cgraph_edge *);
void cgraph_remove_node (struct cgraph_node *);
void cgraph_node_remove_callees (struct cgraph_node *node);
@@ -288,28 +285,19 @@ struct cgraph_edge * cgraph_clone_edge (struct cgraph_edge *,
struct cgraph_node * cgraph_clone_node (struct cgraph_node *, gcov_type,
int, bool);
-struct cgraph_varpool_node *cgraph_varpool_node (tree);
-struct cgraph_varpool_node *cgraph_varpool_node_for_asm (tree asmname);
-void cgraph_varpool_mark_needed_node (struct cgraph_varpool_node *);
-void cgraph_varpool_finalize_decl (tree);
void cgraph_redirect_edge_callee (struct cgraph_edge *, struct cgraph_node *);
struct cgraph_asm_node *cgraph_add_asm_node (tree);
bool cgraph_function_possibly_inlined_p (tree);
void cgraph_unnest_node (struct cgraph_node *);
-void cgraph_varpool_enqueue_needed_node (struct cgraph_varpool_node *);
-void cgraph_varpool_reset_queue (void);
-bool decide_is_variable_needed (struct cgraph_varpool_node *, tree);
enum availability cgraph_function_body_availability (struct cgraph_node *);
-enum availability cgraph_variable_initializer_availability (struct cgraph_varpool_node *);
bool cgraph_is_master_clone (struct cgraph_node *);
struct cgraph_node *cgraph_master_clone (struct cgraph_node *);
void cgraph_add_new_function (tree);
/* In cgraphunit.c */
-bool cgraph_varpool_assemble_pending_decls (void);
void cgraph_finalize_function (tree, bool);
void cgraph_finalize_compilation_unit (void);
void cgraph_optimize (void);
@@ -327,11 +315,33 @@ struct cgraph_node *cgraph_function_versioning (struct cgraph_node *,
varray_type);
void cgraph_analyze_function (struct cgraph_node *);
struct cgraph_node *save_inline_function_body (struct cgraph_node *);
+void record_references_in_initializer (tree);
/* In ipa.c */
bool cgraph_remove_unreachable_nodes (bool, FILE *);
int cgraph_postorder (struct cgraph_node **);
+/* In varpool.c */
+
+extern GTY(()) struct varpool_node *varpool_nodes_queue;
+extern GTY(()) struct varpool_node *varpool_nodes;
+
+struct varpool_node *varpool_node (tree);
+struct varpool_node *varpool_node_for_asm (tree asmname);
+void varpool_mark_needed_node (struct varpool_node *);
+void dump_varpool (FILE *);
+void dump_varpool_node (FILE *, struct varpool_node *);
+
+void varpool_finalize_decl (tree);
+bool decide_is_variable_needed (struct varpool_node *, tree);
+enum availability cgraph_variable_initializer_availability (struct varpool_node *);
+
+bool varpool_assemble_pending_decls (void);
+bool varpool_assemble_decl (struct varpool_node *node);
+bool varpool_analyze_pending_decls (void);
+void varpool_output_debug_info (void);
+void varpool_remove_unreferenced_decls (void);
+
/* In ipa-inline.c */
bool cgraph_decide_inlining_incrementally (struct cgraph_node *, bool);
void cgraph_clone_inlined_nodes (struct cgraph_edge *, bool, bool);