aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorZdenek Dvorak <dvorakz@suse.cz>2005-03-14 17:21:16 +0100
committerZdenek Dvorak <rakdver@gcc.gnu.org>2005-03-14 16:21:16 +0000
commitdcd6de6d69c1e59a28345db24de577f8e60fdbd0 (patch)
tree5260f74234c5264de982dff0fa79d5c8f864f9e6 /gcc/tree.h
parent0e8c2b0d432304242caaf3d6415bdb887431cee5 (diff)
downloadgcc-dcd6de6d69c1e59a28345db24de577f8e60fdbd0.zip
gcc-dcd6de6d69c1e59a28345db24de577f8e60fdbd0.tar.gz
gcc-dcd6de6d69c1e59a28345db24de577f8e60fdbd0.tar.bz2
builtin-attrs.def (ATTR_NOVOPS, [...]): New.
* 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. From-SVN: r96438
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 3857ff9..8854b7d 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2185,6 +2185,11 @@ struct tree_binfo GTY (())
as "pure" function (like const function, but may read global memory). */
#define DECL_IS_PURE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.pure_flag)
+/* Nonzero in a FUNCTION_DECL means this function should be treated
+ as "novops" function (function that does not read global memory,
+ but may have arbitrary side effects). */
+#define DECL_IS_NOVOPS(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.novops_flag)
+
/* Nonzero in a FIELD_DECL means it is a bit field, and must be accessed
specially. */
#define DECL_BIT_FIELD(NODE) (FIELD_DECL_CHECK (NODE)->decl.bit_field_flag)
@@ -2365,7 +2370,6 @@ struct tree_decl GTY(())
unsigned uninlinable : 1;
unsigned thread_local_flag : 1;
unsigned declared_inline_flag : 1;
- unsigned seen_in_bind_expr : 1;
ENUM_BITFIELD(symbol_visibility) visibility : 2;
unsigned visibility_specified : 1;
@@ -2383,7 +2387,9 @@ struct tree_decl GTY(())
unsigned gimple_formal_temp : 1;
unsigned debug_expr_is_from : 1;
unsigned returns_twice_flag : 1;
- /* 11 unused bits. */
+ unsigned seen_in_bind_expr : 1;
+ unsigned novops_flag : 1;
+ /* 9 unused bits. */
union tree_decl_u1 {
/* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is
@@ -3688,6 +3694,9 @@ extern rtx emit_line_note (location_t);
#define ECF_SP_DEPRESSED 256
/* Create libcall block around the call. */
#define ECF_LIBCALL_BLOCK 512
+/* Function does not read or write memory (but may have side effects, so
+ it does not necessarily fit ECF_CONST). */
+#define ECF_NOVOPS 1024
extern int flags_from_decl_or_type (tree);
extern int call_expr_flags (tree);