* tree-flow.h (struct omp_region): Move to omp-low.h
* gimple.h: Move prototype to omp-low.h.
* tree.h: Move prototype to omp-low.h.
* omp-low.h: New File. Relocate struct and prototypes here.
* omp-low.c (root_omp_region): Make static.
* gimplify.c: Include omp-low.h.
* tree-cfg.c: Include omp-low.h.
(make_edges): Don't check root_omp_region.
* tree-parloops.c: Include omp-low.h.
fortran
* trans-openmp.c: Include omp-low.h.
===================================================================
*************** along with GCC; see the file COPYING3.
OpenMP Region Tree
---------------------------------------------------------------------------*/
- /* Parallel region information. Every parallel and workshare
- directive is enclosed between two markers, the OMP_* directive
- and a corresponding OMP_RETURN statement. */
-
- struct omp_region
- {
- /* The enclosing region. */
- struct omp_region *outer;
-
- /* First child region. */
- struct omp_region *inner;
-
- /* Next peer region. */
- struct omp_region *next;
-
- /* Block containing the omp directive as its last stmt. */
- basic_block entry;
-
- /* Block containing the OMP_RETURN as its last stmt. */
- basic_block exit;
-
- /* Block containing the OMP_CONTINUE as its last stmt. */
- basic_block cont;
-
- /* If this is a combined parallel+workshare region, this is a list
- of additional arguments needed by the combined parallel+workshare
- library call. */
- vec<tree, va_gc> *ws_args;
-
- /* The code for the omp directive of this region. */
- enum gimple_code type;
-
- /* Schedule kind, only used for OMP_FOR type regions. */
- enum omp_clause_schedule_kind sched_kind;
-
- /* True if this is a combined parallel+workshare region. */
- bool is_combined_parallel;
- };
-
- extern struct omp_region *root_omp_region;
- extern struct omp_region *new_omp_region (basic_block, enum gimple_code,
- struct omp_region *);
- extern void free_omp_regions (void);
- void omp_expand_local (basic_block);
- tree copy_var_decl (tree, tree, tree);
/* Location to track pending stmt for edge insertion. */
#define PENDING_STMT(e) ((e)->insns.g)
===================================================================
*************** extern void dump_decl_set (FILE *, bitma
extern bool gimple_can_coalesce_p (tree, tree);
extern bool nonfreeing_call_p (gimple);
- /* In omp-low.c. */
- extern tree omp_reduction_init (tree, tree);
/* In trans-mem.c. */
extern void diagnose_tm_safe_errors (tree);
===================================================================
*************** extern tree build_translation_unit_decl
extern tree build_block (tree, tree, tree, tree);
extern tree build_empty_stmt (location_t);
extern tree build_omp_clause (location_t, enum omp_clause_code);
- extern tree find_omp_clause (tree, enum omp_clause_code);
extern tree build_vl_exp_stat (enum tree_code, int MEM_STAT_DECL);
#define build_vl_exp(c, n) build_vl_exp_stat (c, n MEM_STAT_INFO)
===================================================================
***************
+ /* Header file for openMP lowering directives.
+ Copyright (C) 2013 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 3, or (at your option) any later
+ version.
+
+ GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
+ #ifndef GCC_OMP_LOW__H
+ #define GCC_OMP_LOW__H
+
+ /* Parallel region information. Every parallel and workshare
+ directive is enclosed between two markers, the OMP_* directive
+ and a corresponding OMP_RETURN statement. */
+
+ struct omp_region
+ {
+ /* The enclosing region. */
+ struct omp_region *outer;
+
+ /* First child region. */
+ struct omp_region *inner;
+
+ /* Next peer region. */
+ struct omp_region *next;
+
+ /* Block containing the omp directive as its last stmt. */
+ basic_block entry;
+
+ /* Block containing the OMP_RETURN as its last stmt. */
+ basic_block exit;
+
+ /* Block containing the OMP_CONTINUE as its last stmt. */
+ basic_block cont;
+
+ /* If this is a combined parallel+workshare region, this is a list
+ of additional arguments needed by the combined parallel+workshare
+ library call. */
+ vec<tree, va_gc> *ws_args;
+
+ /* The code for the omp directive of this region. */
+ enum gimple_code type;
+
+ /* Schedule kind, only used for OMP_FOR type regions. */
+ enum omp_clause_schedule_kind sched_kind;
+
+ /* True if this is a combined parallel+workshare region. */
+ bool is_combined_parallel;
+ };
+
+ extern tree find_omp_clause (tree, enum omp_clause_code);
+ void omp_expand_local (basic_block);
+ extern struct omp_region *new_omp_region (basic_block, enum gimple_code,
+ struct omp_region *);
+ extern void free_omp_regions (void);
+ extern tree omp_reduction_init (tree, tree);
+
+ tree copy_var_decl (tree, tree, tree);
+
+ #endif /* GCC_OMP_LOW__H */
===================================================================
*************** along with GCC; see the file COPYING3.
#include "optabs.h"
#include "cfgloop.h"
#include "target.h"
+ #include "omp-low.h"
/* Lowering of OpenMP parallel and workshare constructs proceeds in two
*************** struct omp_for_data
static splay_tree all_contexts;
static int taskreg_nesting_level;
! struct omp_region *root_omp_region;
static bitmap task_shared_vars;
static void scan_omp (gimple_seq *, omp_context *);
static splay_tree all_contexts;
static int taskreg_nesting_level;
! static struct omp_region *root_omp_region;
static bitmap task_shared_vars;
static void scan_omp (gimple_seq *, omp_context *);
===================================================================
*************** along with GCC; see the file COPYING3.
#include "pointer-set.h"
#include "splay-tree.h"
#include "vec.h"
+ #include "omp-low.h"
#include "langhooks-def.h" /* FIXME: for lhd_set_decl_assembler_name */
#include "tree-pass.h" /* FIXME: only for PROP_gimple_any */
===================================================================
*************** along with GCC; see the file COPYING3.
#include "tree-inline.h"
#include "target.h"
#include "tree-ssa-live.h"
+ #include "omp-low.h"
/* This file contains functions for building the Control Flow Graph (CFG)
for a function tree. */
*************** make_edges (void)
make_edge (bb, bb->next_bb, EDGE_FALLTHRU);
}
! if (root_omp_region)
! free_omp_regions ();
/* Fold COND_EXPR_COND of each COND_EXPR. */
fold_cond_expr_cond ();
make_edge (bb, bb->next_bb, EDGE_FALLTHRU);
}
! free_omp_regions ();
/* Fold COND_EXPR_COND of each COND_EXPR. */
fold_cond_expr_cond ();
===================================================================
*************** along with GCC; see the file COPYING3.
#include "tree-vectorizer.h"
#include "tree-hasher.h"
#include "tree-parloops.h"
+ #include "omp-low.h"
/* This pass tries to distribute iterations of loops into several threads.
The implementation is straightforward -- for each loop we test whether its
===================================================================
*************** along with GCC; see the file COPYING3.
#include "trans-array.h"
#include "trans-const.h"
#include "arith.h"
+ #include "omp-low.h"
int ompws_flags;