diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-14 16:21:16 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-14 16:21:16 +0000 |
commit | fc09b2000b21b17f7c6ea3c27cd9e0a05912f703 (patch) | |
tree | 5260f74234c5264de982dff0fa79d5c8f864f9e6 /gcc/c-common.c | |
parent | 2c5d3eb17dd92800cd7cf57f329aa561f8d073cd (diff) | |
download | gcc-fc09b2000b21b17f7c6ea3c27cd9e0a05912f703.tar.gz |
* builtin-attrs.def (ATTR_NOVOPS, ATTR_NOVOPS_LIST,
ATTR_PURE_NOTHROW_NOVOPS_LIST): New.
* builtins.def (ATTR_MATHFN_FPROUNDING): Use NOVOPS.
(BUILT_IN_PREFETCH): Set the NOVOPS attribute.
* c-common.c (handle_novops_attribute): New function.
(c_common_attribute_table): Add "no vops" entry.
* c-decl.c (merge_decls): Copy DECL_IS_NOVOPS.
* calls.c (flags_from_decl_or_type): Set ECF_NOVOPS.
* tree-ssa-operands.c (get_call_expr_operands): Do not
create virtual operands for calls with ECF_NOVOPS flag.
* tree.h (DECL_IS_NOVOPS): New macro.
(struct tree_decl): Add novops_flag.
(ECF_NOVOPS): New constant.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96438 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index d26c8b1452d..313b554249d 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -541,6 +541,7 @@ static tree handle_returns_twice_attribute (tree *, tree, tree, int, bool *); static tree handle_no_limit_stack_attribute (tree *, tree, tree, int, bool *); static tree handle_pure_attribute (tree *, tree, tree, int, bool *); +static tree handle_novops_attribute (tree *, tree, tree, int, bool *); static tree handle_deprecated_attribute (tree *, tree, tree, int, bool *); static tree handle_vector_size_attribute (tree *, tree, tree, int, @@ -614,6 +615,10 @@ const struct attribute_spec c_common_attribute_table[] = handle_no_limit_stack_attribute }, { "pure", 0, 0, true, false, false, handle_pure_attribute }, + /* For internal use (marking of builtins) only. The name contains space + to prevent its usage in source code. */ + { "no vops", 0, 0, true, false, false, + handle_novops_attribute }, { "deprecated", 0, 0, false, false, false, handle_deprecated_attribute }, { "vector_size", 1, 1, false, true, false, @@ -4854,6 +4859,19 @@ handle_pure_attribute (tree *node, tree name, tree ARG_UNUSED (args), return NULL_TREE; } +/* Handle a "no vops" attribute; arguments as in + struct attribute_spec.handler. */ + +static tree +handle_novops_attribute (tree *node, tree ARG_UNUSED (name), + tree ARG_UNUSED (args), int ARG_UNUSED (flags), + bool *ARG_UNUSED (no_add_attrs)) +{ + gcc_assert (TREE_CODE (*node) == FUNCTION_DECL); + DECL_IS_NOVOPS (*node) = 1; + return NULL_TREE; +} + /* Handle a "deprecated" attribute; arguments as in struct attribute_spec.handler. */ |