summaryrefslogtreecommitdiff
path: root/gcc/builtin-attrs.def
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2010-09-28 18:34:36 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2010-09-28 16:34:36 +0000
commit0d6e14fdda97a04b5bfba17b3a0fd30e08f814da (patch)
treedf17a1c6a564a87e23e89f03d7cabc50414014c4 /gcc/builtin-attrs.def
parent697c3575e2a72e4957cccd73a32930f8697847bd (diff)
downloadgcc-0d6e14fdda97a04b5bfba17b3a0fd30e08f814da.tar.gz
builtin-attrs.def (ATTR_LEAF): New attribute.
* builtin-attrs.def (ATTR_LEAF): New attribute. (ATTR_NOVOPS_LEAF_LIST, ATTR_LEAF_LIST, ATTR_NOTHROW_LEAF_LIST, ATTR_CONST_NOTHROW_LEAF_LIST, ATTR_PURE_NOTHROW_LEAF_LIST, ATTR_PURE_NOTHROW_NOVOPS_LEAF_LIST, ATTR_NORETURN_NOTHROW_LEAF_LIST, ATTR_MALLOC_NOTHROW_LEAF_LIST, ATTR_SENTINEL_NOTHROW_LEAF_LIST, ATTR_NOTHROW_NONNULL_LEAF, ATTR_CONST_NOTHROW_NONNULL_LEAF, ATTR_CONST_NOTHROW_TYPEGENERIC_LEAF, ATTR_PURE_NOTHROW_NONNULL_LEAF, ATTR_MALLOC_NOTHROW_NONNULL_LEAF): New attribute lists. * sync-builtins.def: Annotate all builtins by leaf. * omp-builtins.def: Annotate all builtins by leaf. * builtins.def: Annotate relevant builtins with leaf attribute. (ATTR_MATHFN_ERRNO, ATTR_MATHFN_FPROUNDING, ATTR_MATHFN_FPROUNDING_ERRNO, ATTR_MATHFN_FPROUNDING_STORE): Make leaf. * gcc-interface/utils.c (handle_leaf_attribute): New function. (gnat_internal_attribute_tables): Add leaf. * lto-lang.c (handle_leaf_attribute): New function. (lto_attribute_tables): Add leaf. * f95-lang.c (gfc_define_builtin): Make leaf. (gfc_init_builtin_functions): Handle only ATTR_CONST_NOTHROW_LEAF_LIST and ATTR_NOTHROW_LEAF_LIST. (DEF_SYNC_BUILTIN): Check ATTR_CONST_NOTHROW_LEAF_LIST. (DEF_GOMP_BUILTIN): Likewise. From-SVN: r164689
Diffstat (limited to 'gcc/builtin-attrs.def')
-rw-r--r--gcc/builtin-attrs.def34
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/builtin-attrs.def b/gcc/builtin-attrs.def
index 81700cc77bd..587671b574e 100644
--- a/gcc/builtin-attrs.def
+++ b/gcc/builtin-attrs.def
@@ -82,6 +82,7 @@ DEF_ATTR_IDENT (ATTR_MALLOC, "malloc")
DEF_ATTR_IDENT (ATTR_NONNULL, "nonnull")
DEF_ATTR_IDENT (ATTR_NORETURN, "noreturn")
DEF_ATTR_IDENT (ATTR_NOTHROW, "nothrow")
+DEF_ATTR_IDENT (ATTR_LEAF, "leaf")
DEF_ATTR_IDENT (ATTR_PRINTF, "printf")
DEF_ATTR_IDENT (ATTR_ASM_FPRINTF, "asm_fprintf")
DEF_ATTR_IDENT (ATTR_GCC_DIAG, "gcc_diag")
@@ -97,20 +98,38 @@ DEF_ATTR_IDENT (ATTR_TYPEGENERIC, "type generic")
DEF_ATTR_TREE_LIST (ATTR_NOVOPS_LIST, ATTR_NOVOPS, ATTR_NULL, ATTR_NULL)
+DEF_ATTR_TREE_LIST (ATTR_NOVOPS_LEAF_LIST, ATTR_LEAF, ATTR_NULL, ATTR_NOVOPS_LIST)
+
+DEF_ATTR_TREE_LIST (ATTR_LEAF_LIST, ATTR_LEAF, ATTR_NULL, ATTR_NULL)
+
DEF_ATTR_TREE_LIST (ATTR_NOTHROW_LIST, ATTR_NOTHROW, ATTR_NULL, ATTR_NULL)
+DEF_ATTR_TREE_LIST (ATTR_NOTHROW_LEAF_LIST, ATTR_LEAF, ATTR_NULL, ATTR_NOTHROW_LIST)
+
DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_LIST, ATTR_CONST, \
ATTR_NULL, ATTR_NOTHROW_LIST)
+DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_LEAF_LIST, ATTR_CONST, \
+ ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_LIST, ATTR_PURE, \
ATTR_NULL, ATTR_NOTHROW_LIST)
+DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_LEAF_LIST, ATTR_PURE, \
+ ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_NOVOPS_LIST, ATTR_NOVOPS, \
ATTR_NULL, ATTR_PURE_NOTHROW_LIST)
+DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_NOVOPS_LEAF_LIST, ATTR_NOVOPS,\
+ ATTR_NULL, ATTR_PURE_NOTHROW_LEAF_LIST)
DEF_ATTR_TREE_LIST (ATTR_NORETURN_NOTHROW_LIST, ATTR_NORETURN, \
ATTR_NULL, ATTR_NOTHROW_LIST)
+DEF_ATTR_TREE_LIST (ATTR_NORETURN_NOTHROW_LEAF_LIST, ATTR_NORETURN,\
+ ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
DEF_ATTR_TREE_LIST (ATTR_MALLOC_NOTHROW_LIST, ATTR_MALLOC, \
ATTR_NULL, ATTR_NOTHROW_LIST)
+DEF_ATTR_TREE_LIST (ATTR_MALLOC_NOTHROW_LEAF_LIST, ATTR_MALLOC, \
+ ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
DEF_ATTR_TREE_LIST (ATTR_SENTINEL_NOTHROW_LIST, ATTR_SENTINEL, \
ATTR_NULL, ATTR_NOTHROW_LIST)
+DEF_ATTR_TREE_LIST (ATTR_SENTINEL_NOTHROW_LEAF_LIST, ATTR_SENTINEL, \
+ ATTR_NULL, ATTR_NOTHROW_LEAF_LIST)
/* Functions whose pointer parameter(s) are all nonnull. */
DEF_ATTR_TREE_LIST (ATTR_NONNULL_LIST, ATTR_NONNULL, ATTR_NULL, ATTR_NULL)
@@ -126,6 +145,9 @@ DEF_ATTR_TREE_LIST (ATTR_NOTHROW_SENTINEL_1, ATTR_SENTINEL, ATTR_LIST_1, \
/* Nothrow functions whose pointer parameter(s) are all nonnull. */
DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL, ATTR_NONNULL, ATTR_NULL, \
ATTR_NOTHROW_LIST)
+/* Nothrow leaf functions whose pointer parameter(s) are all nonnull. */
+DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_LEAF, ATTR_NONNULL, ATTR_NULL, \
+ ATTR_NOTHROW_LEAF_LIST)
/* Nothrow functions whose first parameter is a nonnull pointer. */
DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_1, ATTR_NONNULL, ATTR_LIST_1, \
ATTR_NOTHROW_LIST)
@@ -144,15 +166,27 @@ DEF_ATTR_TREE_LIST (ATTR_NOTHROW_NONNULL_5, ATTR_NONNULL, ATTR_LIST_5, \
/* Nothrow const functions whose pointer parameter(s) are all nonnull. */
DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_NONNULL, ATTR_CONST, ATTR_NULL, \
ATTR_NOTHROW_NONNULL)
+/* Nothrow const leaf functions whose pointer parameter(s) are all nonnull. */
+DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_NONNULL_LEAF, ATTR_CONST, ATTR_NULL, \
+ ATTR_NOTHROW_NONNULL_LEAF)
/* Nothrow const functions which are type-generic. */
DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_TYPEGENERIC, ATTR_TYPEGENERIC, ATTR_NULL, \
ATTR_CONST_NOTHROW_LIST)
+/* Nothrow const leaf functions which are type-generic. */
+DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_TYPEGENERIC_LEAF, ATTR_TYPEGENERIC, ATTR_NULL, \
+ ATTR_CONST_NOTHROW_LEAF_LIST)
/* Nothrow pure functions whose pointer parameter(s) are all nonnull. */
DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_NONNULL, ATTR_PURE, ATTR_NULL, \
ATTR_NOTHROW_NONNULL)
+/* Nothrow pure leaf functions whose pointer parameter(s) are all nonnull. */
+DEF_ATTR_TREE_LIST (ATTR_PURE_NOTHROW_NONNULL_LEAF, ATTR_PURE, ATTR_NULL, \
+ ATTR_NOTHROW_NONNULL_LEAF)
/* Nothrow malloc functions whose pointer parameter(s) are all nonnull. */
DEF_ATTR_TREE_LIST (ATTR_MALLOC_NOTHROW_NONNULL, ATTR_MALLOC, ATTR_NULL, \
ATTR_NOTHROW_NONNULL)
+/* Nothrow malloc leaf functions whose pointer parameter(s) are all nonnull. */
+DEF_ATTR_TREE_LIST (ATTR_MALLOC_NOTHROW_NONNULL_LEAF, ATTR_MALLOC, ATTR_NULL, \
+ ATTR_NOTHROW_NONNULL_LEAF)
/* Construct a tree for a format attribute. */
#define DEF_FORMAT_ATTRIBUTE(TYPE, FA, VALUES) \