diff options
author | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-22 17:43:43 -0300 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-22 17:43:43 -0300 |
commit | a926878ddbd5a98b272c22171ce58663fc04c3e0 (patch) | |
tree | 86af256e5d9a9c06263c00adc90e5fe348008c43 /gcc/gimple.h | |
parent | 542730f087133690b47e036dfd43eb0db8a650ce (diff) | |
parent | 07cbaed8ba7d1b6e4ab3a9f44175502a4e1ecdb1 (diff) | |
download | gcc-a926878ddbd5a98b272c22171ce58663fc04c3e0.zip gcc-a926878ddbd5a98b272c22171ce58663fc04c3e0.tar.gz gcc-a926878ddbd5a98b272c22171ce58663fc04c3e0.tar.bz2 |
Merge branch 'autopar_rebase2' into autopar_develdevel/autopar_devel
Quickly commit changes in the rebase branch.
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r-- | gcc/gimple.h | 134 |
1 files changed, 10 insertions, 124 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h index ca7fec6..6f7c7ff 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -150,7 +150,6 @@ enum gf_mask { GF_CALL_BY_DESCRIPTOR = 1 << 10, GF_CALL_NOCF_CHECK = 1 << 11, GF_OMP_PARALLEL_COMBINED = 1 << 0, - GF_OMP_PARALLEL_GRID_PHONY = 1 << 1, GF_OMP_TASK_TASKLOOP = 1 << 0, GF_OMP_TASK_TASKWAIT = 1 << 1, GF_OMP_FOR_KIND_MASK = (1 << 3) - 1, @@ -158,17 +157,9 @@ enum gf_mask { GF_OMP_FOR_KIND_DISTRIBUTE = 1, GF_OMP_FOR_KIND_TASKLOOP = 2, GF_OMP_FOR_KIND_OACC_LOOP = 4, - GF_OMP_FOR_KIND_GRID_LOOP = 5, - GF_OMP_FOR_KIND_SIMD = 6, + GF_OMP_FOR_KIND_SIMD = 5, GF_OMP_FOR_COMBINED = 1 << 3, GF_OMP_FOR_COMBINED_INTO = 1 << 4, - /* The following flag must not be used on GF_OMP_FOR_KIND_GRID_LOOP loop - statements. */ - GF_OMP_FOR_GRID_PHONY = 1 << 5, - /* The following two flags should only be set on GF_OMP_FOR_KIND_GRID_LOOP - loop statements. */ - GF_OMP_FOR_GRID_INTRA_GROUP = 1 << 5, - GF_OMP_FOR_GRID_GROUP_ITER = 1 << 6, GF_OMP_TARGET_KIND_MASK = (1 << 4) - 1, GF_OMP_TARGET_KIND_REGION = 0, GF_OMP_TARGET_KIND_DATA = 1, @@ -183,8 +174,7 @@ enum gf_mask { GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA = 10, GF_OMP_TARGET_KIND_OACC_DECLARE = 11, GF_OMP_TARGET_KIND_OACC_HOST_DATA = 12, - GF_OMP_TEAMS_GRID_PHONY = 1 << 0, - GF_OMP_TEAMS_HOST = 1 << 1, + GF_OMP_TEAMS_HOST = 1 << 0, /* True on an GIMPLE_OMP_RETURN statement if the return does not require a thread synchronization via some sort of barrier. The exact barrier @@ -1559,7 +1549,6 @@ gomp_task *gimple_build_omp_task (gimple_seq, tree, tree, tree, tree, tree, tree); gimple *gimple_build_omp_section (gimple_seq); gimple *gimple_build_omp_master (gimple_seq); -gimple *gimple_build_omp_grid_body (gimple_seq); gimple *gimple_build_omp_taskgroup (gimple_seq, tree); gomp_continue *gimple_build_omp_continue (tree, tree); gomp_ordered *gimple_build_omp_ordered (gimple_seq, tree); @@ -1830,7 +1819,6 @@ gimple_has_substatements (gimple *g) case GIMPLE_OMP_CRITICAL: case GIMPLE_WITH_CLEANUP_EXPR: case GIMPLE_TRANSACTION: - case GIMPLE_OMP_GRID_BODY: return true; default: @@ -3472,6 +3460,13 @@ gimple_call_alloca_for_var_p (gcall *s) return (s->subcode & GF_CALL_ALLOCA_FOR_VAR) != 0; } +static inline bool +gimple_call_alloca_for_var_p (gimple *s) +{ + const gcall *gc = GIMPLE_CHECK2<gcall *> (s); + return (gc->subcode & GF_CALL_ALLOCA_FOR_VAR) != 0; +} + /* If BY_DESCRIPTOR_P is true, GIMPLE_CALL S is an indirect call for which pointers to nested function are descriptors instead of trampolines. */ @@ -5433,76 +5428,6 @@ gimple_omp_for_set_pre_body (gimple *gs, gimple_seq pre_body) omp_for_stmt->pre_body = pre_body; } -/* Return the kernel_phony of OMP_FOR statement. */ - -static inline bool -gimple_omp_for_grid_phony (const gomp_for *omp_for) -{ - gcc_checking_assert (gimple_omp_for_kind (omp_for) - != GF_OMP_FOR_KIND_GRID_LOOP); - return (gimple_omp_subcode (omp_for) & GF_OMP_FOR_GRID_PHONY) != 0; -} - -/* Set kernel_phony flag of OMP_FOR to VALUE. */ - -static inline void -gimple_omp_for_set_grid_phony (gomp_for *omp_for, bool value) -{ - gcc_checking_assert (gimple_omp_for_kind (omp_for) - != GF_OMP_FOR_KIND_GRID_LOOP); - if (value) - omp_for->subcode |= GF_OMP_FOR_GRID_PHONY; - else - omp_for->subcode &= ~GF_OMP_FOR_GRID_PHONY; -} - -/* Return the kernel_intra_group of a GRID_LOOP OMP_FOR statement. */ - -static inline bool -gimple_omp_for_grid_intra_group (const gomp_for *omp_for) -{ - gcc_checking_assert (gimple_omp_for_kind (omp_for) - == GF_OMP_FOR_KIND_GRID_LOOP); - return (gimple_omp_subcode (omp_for) & GF_OMP_FOR_GRID_INTRA_GROUP) != 0; -} - -/* Set kernel_intra_group flag of OMP_FOR to VALUE. */ - -static inline void -gimple_omp_for_set_grid_intra_group (gomp_for *omp_for, bool value) -{ - gcc_checking_assert (gimple_omp_for_kind (omp_for) - == GF_OMP_FOR_KIND_GRID_LOOP); - if (value) - omp_for->subcode |= GF_OMP_FOR_GRID_INTRA_GROUP; - else - omp_for->subcode &= ~GF_OMP_FOR_GRID_INTRA_GROUP; -} - -/* Return true if iterations of a grid OMP_FOR statement correspond to HSA - groups. */ - -static inline bool -gimple_omp_for_grid_group_iter (const gomp_for *omp_for) -{ - gcc_checking_assert (gimple_omp_for_kind (omp_for) - == GF_OMP_FOR_KIND_GRID_LOOP); - return (gimple_omp_subcode (omp_for) & GF_OMP_FOR_GRID_GROUP_ITER) != 0; -} - -/* Set group_iter flag of OMP_FOR to VALUE. */ - -static inline void -gimple_omp_for_set_grid_group_iter (gomp_for *omp_for, bool value) -{ - gcc_checking_assert (gimple_omp_for_kind (omp_for) - == GF_OMP_FOR_KIND_GRID_LOOP); - if (value) - omp_for->subcode |= GF_OMP_FOR_GRID_GROUP_ITER; - else - omp_for->subcode &= ~GF_OMP_FOR_GRID_GROUP_ITER; -} - /* Return the clauses associated with OMP_PARALLEL GS. */ static inline tree @@ -5588,25 +5513,6 @@ gimple_omp_parallel_set_data_arg (gomp_parallel *omp_parallel_stmt, omp_parallel_stmt->data_arg = data_arg; } -/* Return the kernel_phony flag of OMP_PARALLEL_STMT. */ - -static inline bool -gimple_omp_parallel_grid_phony (const gomp_parallel *stmt) -{ - return (gimple_omp_subcode (stmt) & GF_OMP_PARALLEL_GRID_PHONY) != 0; -} - -/* Set kernel_phony flag of OMP_PARALLEL_STMT to VALUE. */ - -static inline void -gimple_omp_parallel_set_grid_phony (gomp_parallel *stmt, bool value) -{ - if (value) - stmt->subcode |= GF_OMP_PARALLEL_GRID_PHONY; - else - stmt->subcode &= ~GF_OMP_PARALLEL_GRID_PHONY; -} - /* Return the clauses associated with OMP_TASK GS. */ static inline tree @@ -6158,25 +6064,6 @@ gimple_omp_teams_set_data_arg (gomp_teams *omp_teams_stmt, tree data_arg) omp_teams_stmt->data_arg = data_arg; } -/* Return the kernel_phony flag of an OMP_TEAMS_STMT. */ - -static inline bool -gimple_omp_teams_grid_phony (const gomp_teams *omp_teams_stmt) -{ - return (gimple_omp_subcode (omp_teams_stmt) & GF_OMP_TEAMS_GRID_PHONY) != 0; -} - -/* Set kernel_phony flag of an OMP_TEAMS_STMT to VALUE. */ - -static inline void -gimple_omp_teams_set_grid_phony (gomp_teams *omp_teams_stmt, bool value) -{ - if (value) - omp_teams_stmt->subcode |= GF_OMP_TEAMS_GRID_PHONY; - else - omp_teams_stmt->subcode &= ~GF_OMP_TEAMS_GRID_PHONY; -} - /* Return the host flag of an OMP_TEAMS_STMT. */ static inline bool @@ -6540,8 +6427,7 @@ gimple_return_set_retval (greturn *gs, tree retval) case GIMPLE_OMP_RETURN: \ case GIMPLE_OMP_ATOMIC_LOAD: \ case GIMPLE_OMP_ATOMIC_STORE: \ - case GIMPLE_OMP_CONTINUE: \ - case GIMPLE_OMP_GRID_BODY + case GIMPLE_OMP_CONTINUE static inline bool is_gimple_omp (const gimple *stmt) |