aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2009-06-26 18:23:32 +0000
committerRichard Henderson <rth@redhat.com>2009-06-26 18:23:32 +0000
commit030b2b3576586c9f8165ba71f694d1a2580984ce (patch)
tree6390d7426655b799c3e583c3c54f543275010601 /gcc/function.h
parenteeeb71cee53c9b004df05c1640a77e906462575d (diff)
* 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: https://gcc.gnu.org/svn/gcc/trunk@148981 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.h')
-rw-r--r--gcc/function.h12
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;