diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-26 18:23:32 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-26 18:23:32 +0000 |
commit | d747fdfb151cf2d935ff3916c67919ae9cc58722 (patch) | |
tree | 6390d7426655b799c3e583c3c54f543275010601 /gcc/function.h | |
parent | f9fa0459195973440fbd7c4de17ad64140b9ea68 (diff) | |
download | gcc-d747fdfb151cf2d935ff3916c67919ae9cc58722.tar.gz |
* function.h (struct function): Add cannot_be_copied_reason,
and cannot_be_copied_set.
* tree-inline.c (has_label_address_in_static_1): Rename from
inline_forbidden_p_2; don't set inline_forbidden_reason here.
(cannot_copy_type_1): Rename from inline_forbidden_p_op; likewise
don't set inline_forbidden_reason.
(copy_forbidden): New function, split out of inline_forbidden_p.
(inline_forbidden_p_stmt): Don't check for nonlocal labels here.
(inline_forbidden_p): Use copy_forbidden.
(tree_versionable_function_p): Likewise.
(inlinable_function_p): Merge into tree_inlinable_function_p.
(tree_function_versioning): Remap cfun->nonlocal_goto_save_area.
* ipa-cp.c (ipcp_versionable_function_p): New function.
(ipcp_cloning_candidate_p): Use it.
(ipcp_node_modifiable_p): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148981 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.h')
-rw-r--r-- | gcc/function.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/function.h b/gcc/function.h index de3a46acc52..8f69429d150 100644 --- a/gcc/function.h +++ b/gcc/function.h @@ -524,11 +524,17 @@ struct GTY(()) function { /* Properties used by the pass manager. */ unsigned int curr_properties; unsigned int last_verified; + /* 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; + /* Non-null if the function does something that would prevent it from + being copied; this applies to both versioning and inlining. Set to + a string describing the reason for failure. */ + const char * GTY((skip)) cannot_be_copied_reason; + /* Collected bit flags. */ /* Number of units of general registers that need saving in stdarg @@ -540,7 +546,6 @@ struct GTY(()) function { function. */ unsigned int va_list_fpr_size : 8; - /* How commonly executed the function is. Initialized during branch probabilities pass. */ ENUM_BITFIELD (function_frequency) function_frequency : 2; @@ -556,6 +561,11 @@ struct GTY(()) function { from nested functions. */ unsigned int has_nonlocal_label : 1; + /* Nonzero if we've set cannot_be_copied_reason. I.e. if + (cannot_be_copied_set && !cannot_be_copied_reason), the function + can in fact be copied. */ + unsigned int cannot_be_copied_set : 1; + /* Nonzero if current function uses stdarg.h or equivalent. */ unsigned int stdarg : 1; |