diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2013-10-17 17:41:07 +0000 |
---|---|---|
committer | Andrew Macleod <amacleod@gcc.gnu.org> | 2013-10-17 17:41:07 +0000 |
commit | 0645c1a22d29fcbe12ee8f774709b20b1bc3f594 (patch) | |
tree | 7581ded8e73540ef06a21726e484e189f067777a /gcc/gimple.c | |
parent | 6f1abb55073c46b93155e13eb5308aee7f13dd5e (diff) | |
download | gcc-0645c1a22d29fcbe12ee8f774709b20b1bc3f594.zip gcc-0645c1a22d29fcbe12ee8f774709b20b1bc3f594.tar.gz gcc-0645c1a22d29fcbe12ee8f774709b20b1bc3f594.tar.bz2 |
tree-flow.h (struct omp_region): Move to omp-low.c.
* tree-flow.h (struct omp_region): Move to omp-low.c.
Remove omp_ prototypes and variables.
* gimple.h (omp_reduction_init): Move prototype to omp-low.h.
(copy_var_decl): Relocate prototype from tree-flow.h.
* gimple.c (copy_var_decl): Relocate from omp-low.c.
* tree.h: Move prototype to omp-low.h.
* omp-low.h: New File. Relocate prototypes here.
* omp-low.c (struct omp_region): Make local here.
(root_omp_region): Make static.
(copy_var_decl) Move to gimple.c.
(new_omp_region): Make static.
(make_gimple_omp_edges): New. Refactored from tree-cfg.c make_edges.
* tree-cfg.c: Include omp-low.h.
(make_edges): Factor out OMP specific bits to make_gimple_omp_edges.
* gimplify.c: Include omp-low.h.
* tree-parloops.c: Likewise.
c
* c-parser.c: Include omp-low.h.
* c-typeck.c: Likewise.
cp
* parser.c: Include omp-low.h.
* semantics.c: Likewise.
fortran
* trans-openmp.c: Include omp-low.h.
From-SVN: r203786
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index 9bc62c0..573dbb1 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -4063,3 +4063,24 @@ nonfreeing_call_p (gimple call) return false; } + +/* Create a new VAR_DECL and copy information from VAR to it. */ + +tree +copy_var_decl (tree var, tree name, tree type) +{ + tree copy = build_decl (DECL_SOURCE_LOCATION (var), VAR_DECL, name, type); + + TREE_ADDRESSABLE (copy) = TREE_ADDRESSABLE (var); + TREE_THIS_VOLATILE (copy) = TREE_THIS_VOLATILE (var); + DECL_GIMPLE_REG_P (copy) = DECL_GIMPLE_REG_P (var); + DECL_ARTIFICIAL (copy) = DECL_ARTIFICIAL (var); + DECL_IGNORED_P (copy) = DECL_IGNORED_P (var); + DECL_CONTEXT (copy) = DECL_CONTEXT (var); + TREE_NO_WARNING (copy) = TREE_NO_WARNING (var); + TREE_USED (copy) = 1; + DECL_SEEN_IN_BIND_EXPR_P (copy) = 1; + DECL_ATTRIBUTES (copy) = DECL_ATTRIBUTES (var); + + return copy; +} |