diff options
author | Jan Hubicka <jh@suse.cz> | 2006-12-30 12:58:01 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2006-12-30 11:58:01 +0000 |
commit | f45e0ad1c79faefabb17a699052140687ee3bca2 (patch) | |
tree | 4ee7560469c1e50ca7f51f6e50bca995ec5871a0 /gcc/cgraph.h | |
parent | e288c21aea32c7a9424cc4b89fc4a7c75b9e5fb2 (diff) | |
download | gcc-f45e0ad1c79faefabb17a699052140687ee3bca2.zip gcc-f45e0ad1c79faefabb17a699052140687ee3bca2.tar.gz gcc-f45e0ad1c79faefabb17a699052140687ee3bca2.tar.bz2 |
cgraph.c (cgraph_exapnd_queue): Rename to...
* cgraph.c (cgraph_exapnd_queue): Rename to...
(cgraph_new_nodes): ... this one.
(cgraph_state): New global variable.
(cgraph_add_new_function): Work in more cases.
* cgraph.h (cgraph_expand_queue): Rename to ...
(cgraph_new_nodes): ... this one.
(cgraph_state): New enum and static variable.
(cgraph_add_new_function): Update prototype.
(cgraph_process_new_functions): New.
* omp-low.c (expand_omp_parallel): Update.
* cgraphunit.c (initialize_inline_failed): Declare early.
(cgraph_process_new_functions): New function.
(cgraph_assemble_pending_functions): Use it.
(cgraph_expand_all_functions): Use it.
(cgraph_optimize): Use it; set cgraph_state.
* passes.c (execute_one_pass, execute_ipa_pass_list): Process new
functions
From-SVN: r120282
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r-- | gcc/cgraph.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 8d4fe75..e363819 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -254,9 +254,21 @@ extern GTY(()) struct cgraph_node *cgraph_nodes; extern GTY(()) int cgraph_n_nodes; extern GTY(()) int cgraph_max_uid; extern bool cgraph_global_info_ready; +enum cgraph_state +{ + /* Callgraph is being constructed. It is safe to add new functions. */ + CGRAPH_STATE_CONSTRUCTION, + /* Callgraph is built and IPA passes are being run. */ + CGRAPH_STATE_IPA, + /* Functions are now ordered and being passed to RTL expanders. */ + CGRAPH_STATE_EXPANSION, + /* All cgraph expansion is done. */ + CGRAPH_STATE_FINISHED +}; +extern enum cgraph_state cgraph_state; 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_node *cgraph_new_nodes; extern GTY(()) struct cgraph_asm_node *cgraph_asm_nodes; extern GTY(()) int cgraph_order; @@ -295,7 +307,7 @@ void cgraph_unnest_node (struct cgraph_node *); enum availability cgraph_function_body_availability (struct cgraph_node *); bool cgraph_is_master_clone (struct cgraph_node *); struct cgraph_node *cgraph_master_clone (struct cgraph_node *); -void cgraph_add_new_function (tree); +void cgraph_add_new_function (tree, bool); /* In cgraphunit.c */ void cgraph_finalize_function (tree, bool); @@ -316,6 +328,7 @@ struct cgraph_node *cgraph_function_versioning (struct cgraph_node *, void cgraph_analyze_function (struct cgraph_node *); struct cgraph_node *save_inline_function_body (struct cgraph_node *); void record_references_in_initializer (tree); +bool cgraph_process_new_functions (void); /* In ipa.c */ bool cgraph_remove_unreachable_nodes (bool, FILE *); |