summaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-03-21 11:52:50 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-03-21 11:52:50 +0000
commite7e444390f931238f09524973e93d4519ee231f1 (patch)
treef0a8757132cc149da091da8ed1fe7d71537f8744 /gcc/tree.h
parentee055341d8d291a33c4a5cf541d9f34c33a9cdfa (diff)
downloadgcc-e7e444390f931238f09524973e93d4519ee231f1.tar.gz
2014-03-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/60577 * tree-core.h (struct tree_base): Document nothrow_flag use in VAR_DECL_NONALIASED. * tree.h (VAR_DECL_NONALIASED): New. (may_be_aliased): Adjust. * coverage.c (build_var): Set VAR_DECL_NONALIASED. * gcc.dg/tree-ssa/ssa-lim-11.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208746 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 71d68321a55..9fbc5c4ec2c 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2441,6 +2441,10 @@ extern void decl_fini_priority_insert (tree, priority_type);
#define DECL_NONLOCAL_FRAME(NODE) \
(VAR_DECL_CHECK (NODE)->base.default_def_flag)
+/* In a VAR_DECL, nonzero if this variable is not aliased by any pointer. */
+#define DECL_NONALIASED(NODE) \
+ (VAR_DECL_CHECK (NODE)->base.nothrow_flag)
+
/* This field is used to reference anything in decl.result and is meant only
for use by the garbage collector. */
#define DECL_RESULT_FLD(NODE) \
@@ -4462,12 +4466,14 @@ static inline bool
may_be_aliased (const_tree var)
{
return (TREE_CODE (var) != CONST_DECL
- && !((TREE_STATIC (var) || TREE_PUBLIC (var) || DECL_EXTERNAL (var))
- && TREE_READONLY (var)
- && !TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (var)))
&& (TREE_PUBLIC (var)
|| DECL_EXTERNAL (var)
- || TREE_ADDRESSABLE (var)));
+ || TREE_ADDRESSABLE (var))
+ && !((TREE_STATIC (var) || TREE_PUBLIC (var) || DECL_EXTERNAL (var))
+ && ((TREE_READONLY (var)
+ && !TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (var)))
+ || (TREE_CODE (var) == VAR_DECL
+ && DECL_NONALIASED (var)))));
}
/* Return pointer to optimization flags of FNDECL. */