diff options
author | Jan Hubicka <jh@suse.cz> | 2009-11-16 14:26:40 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2009-11-16 13:26:40 +0000 |
commit | 0e3776dbeef569670b356754e9c38bcc9474a090 (patch) | |
tree | ece4c3265c5f578e93ab9450ccf60b597e2a02e3 /gcc/cgraph.h | |
parent | 0229b692f4cba2d23b960284c79384b6f5b2309a (diff) | |
download | gcc-0e3776dbeef569670b356754e9c38bcc9474a090.zip gcc-0e3776dbeef569670b356754e9c38bcc9474a090.tar.gz gcc-0e3776dbeef569670b356754e9c38bcc9474a090.tar.bz2 |
cgraph.c (cgraph_release_function_body): Update use of ipa_transforms_to_apply.
* cgraph.c (cgraph_release_function_body): Update use of
ipa_transforms_to_apply.
(cgraph_remove_node): Remove ipa_transforms_to_apply.
* cgraph.h (struct cgraph_node): Add ipa_transforms_to_apply.
* cgraphunit.c (save_inline_function_body): Clear ipa_transforms for
copied body.
(cgraph_materialize_clone): Remove original if dead.
* lto-streamer-in.c (lto_read_body): Remove FIXME and
ipa_transforms_to_apply hack.
* function.h (struct function): Add ipa_transforms_to_apply.
* ipa.c (cgraph_remove_unreachable_nodes): Handle dead clone originals.
* tree-inline.c (copy_bb): Update sanity check.
(initialize_cfun): Do not copy ipa_transforms_to_apply.
(expand_call_inline): remove dead clone originals.
(tree_function_versioning): Merge transformation queues.
* passes.c (add_ipa_transform_pass): Remove.
(execute_one_ipa_transform_pass): Update ipa_transforms_to_apply
tracking.
(execute_all_ipa_transforms): Update.
(execute_one_pass): Update.
* lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
From-SVN: r154200
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r-- | gcc/cgraph.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 46fee67..33eb821 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -190,6 +190,11 @@ struct GTY((chain_next ("%h.next"), chain_prev ("%h.previous"))) cgraph_node { PTR GTY ((skip)) aux; + /* Interprocedural passes scheduled to have their transform functions + applied next time we execute local pass on them. We maintain it + per-function in order to allow IPA passes to introduce new functions. */ + VEC(ipa_opt_pass,heap) * GTY((skip)) ipa_transforms_to_apply; + struct cgraph_local_info local; struct cgraph_global_info global; struct cgraph_rtl_info rtl; @@ -206,16 +211,24 @@ struct GTY((chain_next ("%h.next"), chain_prev ("%h.previous"))) cgraph_node { number of cfg nodes with -fprofile-generate and -fprofile-use */ int pid; - /* Set when function must be output - it is externally visible - or its address is taken. */ + /* Set when function must be output for some reason. The primary + use of this flag is to mark functions needed to be output for + non-standard reason. Functions that are externally visible + or reachable from functions needed to be output are marked + by specialized flags. */ unsigned needed : 1; - /* Set when function has address taken. */ + /* Set when function has address taken. + In current implementation it imply needed flag. */ unsigned address_taken : 1; /* Set when decl is an abstract function pointed to by the ABSTRACT_DECL_ORIGIN of a reachable function. */ unsigned abstract_and_needed : 1; /* Set when function is reachable by call from other function - that is either reachable or needed. */ + that is either reachable or needed. + This flag is computed at original cgraph construction and then + updated in cgraph_remove_unreachable_nodes. Note that after + cgraph_remove_unreachable_nodes cgraph still can contain unreachable + nodes when they are needed for virtual clone instantiation. */ unsigned reachable : 1; /* Set once the function is lowered (i.e. its CFG is built). */ unsigned lowered : 1; |