From dc6fafc62cf3863e622effaa3ec828cbfc830679 Mon Sep 17 00:00:00 2001 From: rguenth Date: Wed, 28 Mar 2007 15:01:08 +0000 Subject: 2007-03-28 Richard Guenther * tree.c (is_global_var): Move ... * tree-flow-inline.h (is_global_var): ... here. * tree.h (is_global_var): Remove declaration. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123303 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/tree-flow-inline.h | 11 +++++++++++ gcc/tree.c | 11 ----------- gcc/tree.h | 1 - 4 files changed, 17 insertions(+), 12 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f9c69a14311..5f29dbebff9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-03-28 Richard Guenther + + * tree.c (is_global_var): Move ... + * tree-flow-inline.h (is_global_var): ... here. + * tree.h (is_global_var): Remove declaration. + 2007-03-28 Uros Bizjak * config/i386/i386.h (X86_TUNE_PROMOTE_HIMODE_IMUL): New tuning diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index 8d1072aaf4d..f7728e43ed8 100644 --- a/gcc/tree-flow-inline.h +++ b/gcc/tree-flow-inline.h @@ -718,6 +718,17 @@ is_label_stmt (tree t) return false; } +/* Return true if T (assumed to be a DECL) is a global variable. */ + +static inline bool +is_global_var (tree t) +{ + if (MTAG_P (t)) + return (TREE_STATIC (t) || MTAG_GLOBAL (t)); + else + return (TREE_STATIC (t) || DECL_EXTERNAL (t)); +} + /* PHI nodes should contain only ssa_names and invariants. A test for ssa_name is definitely simpler; don't let invalid contents slip in in the meantime. */ diff --git a/gcc/tree.c b/gcc/tree.c index 411e3f16746..c0cd2ae2ba5 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -7602,17 +7602,6 @@ range_in_array_bounds_p (tree ref) return true; } -/* Return true if T (assumed to be a DECL) is a global variable. */ - -bool -is_global_var (tree t) -{ - if (MTAG_P (t)) - return (TREE_STATIC (t) || MTAG_GLOBAL (t)); - else - return (TREE_STATIC (t) || DECL_EXTERNAL (t)); -} - /* Return true if T (assumed to be a DECL) must be assigned a memory location. */ diff --git a/gcc/tree.h b/gcc/tree.h index 429b2022c27..c3512960be2 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4542,7 +4542,6 @@ extern void expand_function_start (tree); extern void stack_protect_prologue (void); extern void stack_protect_epilogue (void); extern void recompute_tree_invariant_for_addr_expr (tree); -extern bool is_global_var (tree t); extern bool needs_to_live_in_memory (tree); extern tree reconstruct_complex_type (tree, tree); -- cgit v1.2.1