summaryrefslogtreecommitdiff
path: root/gcc/cgraph.h
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-30 22:28:02 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-30 22:28:02 +0000
commitc1dcd13cb59b3fb5c8c2448eeccc809a76df8c7f (patch)
treeddb809af63fbede05531dda040e688b7ae54b743 /gcc/cgraph.h
parent10eb6bce2f0f650de299e79316ba4e02863e7da8 (diff)
downloadgcc-c1dcd13cb59b3fb5c8c2448eeccc809a76df8c7f.tar.gz
2005-03-31 Jan Hubicka <jh@suse.cz>
2004-11-02 Jan Hubicka <jh@suse.cz> * cgraph.c (cgraph_varpool_node_name): New function. (dump_cgraph_varpool_node): New function. (dump_varpool): New function. * cgraphunit.c (cgraph_optimize): Dump varpool. 2004-10-16 Jan Hubicka <jh@suse.cz> * cgraph.c (decide_is_variable_needed): New function. (cgraph_varpool_finalize_decl): Use it. * cgraphunit.c (cgraph_optimize): Assemble_pending_decls when not doing unit-at-a-time. * final.c (output_addr_const): Do not call mark_referenced. * passes.c (rest_of_decl_compilation): ifdef out DECL_RTL_SET_P hack; always go via cgraph. * toplev.c (wrapup_global_declarations): Kill non-unit-at-a-time code. (check_global_declarations): Ifdef out code clearing DECL_RTL. * tree-optimize.c (execute_inline): Mark functions called. * i386.c (output_pic_addr_const): Do not call mark_decl_referenced. 2004-10-11 Jan Hubicka <jh@suse.cz> * cgraph.c (cgraph_varpool_first_unanalyzed_node): New global voriable (cgraph_varpool_last_needed_node): New static variable. (enqueue_needed_varpool_node): Break out from ...; add items to the end of queue; update first pointers. (cgraph_varpool_mark_needed_node): ... here. (cgraph_varpool_finalize_decl): Use enqueue_needed_varpool_node. (cgraph_varpool_assemble_pending_decls): Move to cgraphunit.c * cgraph.h (cgraph_varpool_node): Add analyzed field. (cgraph_varpool_first_unanalyzed_node): Declare. * cgraphunit.c: Include output.h. (cgraph_varpool_analyze_pending_decls): New function. (cgraph_varpool_assemble_pending_decls): Move from cgraph.c; bail out for errors, analyze pending decls. (cgraph_finalize_compilation_unit): Only analyze decls. (cgraph_optimize): Assemble the decls after expanding. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97287 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r--gcc/cgraph.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index b9a8d6e319f..e701e5625f1 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -151,6 +151,12 @@ struct cgraph_varpool_node GTY(())
/* Set when function must be output - it is externally visible
or its address is taken. */
bool needed;
+ /* Needed variables might become dead by optimization. This flag
+ forces the variable to be output even if it appears dead otherwise. */
+ bool force_output;
+ /* Set once the variable has been instantiated and its callee
+ lists created. */
+ bool analyzed;
/* Set once it has been finalized so we consider it to be output. */
bool finalized;
/* Set when function is scheduled to be assembled. */
@@ -165,11 +171,14 @@ extern GTY(()) int cgraph_max_uid;
extern bool cgraph_global_info_ready;
extern GTY(()) struct cgraph_node *cgraph_nodes_queue;
+extern GTY(()) struct cgraph_varpool_node *cgraph_varpool_first_unanalyzed_node;
extern GTY(()) struct cgraph_varpool_node *cgraph_varpool_nodes_queue;
/* In cgraph.c */
void dump_cgraph (FILE *);
void dump_cgraph_node (FILE *, struct cgraph_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);
@@ -190,14 +199,17 @@ struct cgraph_varpool_node *cgraph_varpool_node (tree decl);
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);
-bool cgraph_varpool_assemble_pending_decls (void);
void cgraph_redirect_edge_callee (struct cgraph_edge *, struct cgraph_node *);
bool cgraph_function_possibly_inlined_p (tree);
void cgraph_unnest_node (struct cgraph_node *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);
/* In cgraphunit.c */
bool cgraph_assemble_pending_functions (void);
+bool cgraph_varpool_assemble_pending_decls (void);
void cgraph_finalize_function (tree, bool);
void cgraph_finalize_compilation_unit (void);
void cgraph_create_edges (struct cgraph_node *, tree);