Message ID | 871tf8kdrz.fsf@kepler.schwinge.homeip.net |
---|---|
State | New |
Headers | show |
On 08/12/15 06:21, Thomas Schwinge wrote: > Hi! OpenACC offloading code for Intel MIC doesn't make > a lot of sense (currently), but it is what's being done, and has caused a > lot of regressions in my testing, so I committed the following workaround > to gomp-4_0-branch in r226804. A different approach would have been to > invent some machinery to not compile OpenACC offloading code on the Intel > MIC offloading path, but as the latter eventually is to support OpenACC > offloading, too (see The right solution is probably for the default validated_dims to set the size to unity, just like the host. Thereby forcing any backend that wants to provide a larger size to override that hook. I.e. remove the #ifndef ACCEL_COMPILER from default_validate_dims in omp-low nathan
On 08/12/15 08:46, Nathan Sidwell wrote: > On 08/12/15 06:21, Thomas Schwinge wrote: >> Hi! > OpenACC offloading code for Intel MIC doesn't make >> a lot of sense (currently), but it is what's being done, and has caused a >> lot of regressions in my testing, so I committed the following workaround >> to gomp-4_0-branch in r226804. A different approach would have been to >> invent some machinery to not compile OpenACC offloading code on the Intel >> MIC offloading path, but as the latter eventually is to support OpenACC >> offloading, too (see > > The right solution is probably for the default validated_dims to set the size to > unity, just like the host. Thereby forcing any backend that wants to provide a > larger size to override that hook. > > I.e. remove the #ifndef ACCEL_COMPILER from default_validate_dims in omp-low for avoidance of doubt, I'll add that to the patch I have in progress. nathan
diff --git gcc/ChangeLog.gomp gcc/ChangeLog.gomp index ea254c5..044fdf7 100644 --- gcc/ChangeLog.gomp +++ gcc/ChangeLog.gomp @@ -1,3 +1,9 @@ +2015-08-12 Thomas Schwinge <thomas@codesourcery.com> + + * internal-fn.c: Include "builtins.h". + (expand_GOACC_DIM_SIZE, expand_GOACC_DIM_POS): Instead of + gcc_unreachable, expand_builtin_trap. + 2015-08-10 Nathan Sidwell <nathan@acm.org> * tree-ssa-phiopt.c (minmax_replacement): Create new ssa name if diff --git gcc/internal-fn.c gcc/internal-fn.c index 8b8c6e1..70bffd4 100644 --- gcc/internal-fn.c +++ gcc/internal-fn.c @@ -47,6 +47,7 @@ along with GCC; see the file COPYING3. If not see #include "stringpool.h" #include "tree-ssanames.h" #include "diagnostic-core.h" +#include "builtins.h" /* The names of each internal function, indexed by function number. */ const char *const internal_fn_name_array[] = { @@ -2003,7 +2004,7 @@ expand_GOACC_DIM_SIZE (gcall *ARG_UNUSED (stmt)) VOIDmode, EXPAND_NORMAL); emit_insn (gen_oacc_dim_size (target, dim)); #else - gcc_unreachable (); + expand_builtin_trap (); #endif } @@ -2021,7 +2022,7 @@ expand_GOACC_DIM_POS (gcall *ARG_UNUSED (stmt)) VOIDmode, EXPAND_NORMAL); emit_insn (gen_oacc_dim_pos (target, dim)); #else - gcc_unreachable (); + expand_builtin_trap (); #endif }