diagnose_openacc_conflict (bool optval, const char *optname)
{
if (flag_openacc && optval)
- error ("option %s is not supported together with -fopenacc", optname);
+ error ("option %s is not supported together with %<-fopenacc%>", optname);
}
/* Implement TARGET_OPTION_OVERRIDE. */
fputs (";\n", file);
if (!CONST_INT_P (size) || UINTVAL (align) > GET_MODE_SIZE (DImode))
fprintf (file,
- "\t\tand.u%d %%r%d, %%r%d, -" HOST_WIDE_INT_PRINT_DEC ";\n",
+ "\t\tand.b%d %%r%d, %%r%d, -" HOST_WIDE_INT_PRINT_DEC ";\n",
bits, regno, regno, UINTVAL (align));
}
if (cfun->machine->has_softstack)
unsigned mask = UINTVAL (XVECEXP (PATTERN (end), 0, 0));
gcc_assert (par->mask == mask);
+ gcc_assert (par->join_block == NULL);
par->join_block = block;
par->join_insn = end;
if (nvptx_needs_shared_bcast (mask))
size_t offset = (dir > 0 ? offsetof (edge_def, dest)
: offsetof (edge_def, src));
edge e;
- edge_iterator (ei);
+ edge_iterator ei;
FOR_EACH_EDGE (e, ei, edges)
{
vec<edge, va_gc> *edges, size_t offset)
{
edge e;
- edge_iterator (ei);
+ edge_iterator ei;
int hi_back = depth;
pseudo_node_t node_back (0, depth);
int hi_child = depth;
{
rtx_code_label *label = gen_label_rtx ();
rtx pred = cfun->machine->axis_predicate[mode - GOMP_DIM_WORKER];
- rtx_insn **mode_jump = mode == GOMP_DIM_VECTOR ? &vector_jump : &worker_jump;
- rtx_insn **mode_label = mode == GOMP_DIM_VECTOR ? &vector_label : &worker_label;
+ rtx_insn **mode_jump
+ = mode == GOMP_DIM_VECTOR ? &vector_jump : &worker_jump;
+ rtx_insn **mode_label
+ = mode == GOMP_DIM_VECTOR ? &vector_label : &worker_label;
if (!pred)
{
emit_insn_after (gen_exit (), label_insn);
}
- if (mode == GOMP_DIM_VECTOR)
- vector_label = label_insn;
- else
- worker_label = label_insn;
+ *mode_label = label_insn;
}
/* Now deal with propagating the branch condition. */
else
gcc_unreachable ();
- if (routine_p)
- {
- /* OpenACC routines in C arrive here with the following attributes
- (omitting the 'omp declare target'):
- seq : __attribute__((oacc function (0 1, 0 1, 0 1)))
- vector: __attribute__((oacc function (0 1, 0 1, 1 0)))
- worker: __attribute__((oacc function (0 1, 1 0, 1 0)))
- gang : __attribute__((oacc function (1 0, 1 0, 1 0)))
-
- If we take f.i. the oacc function attribute of the worker routine
- (0 1, 1 0, 1 0), then:
- - the slice (0, 1, 1) is interpreted by oacc_fn_attrib_level as
- meaning: worker routine, that is:
- - can't contain gang loop (0),
- - can contain worker loop (1),
- - can contain vector loop (1).
- - the slice (1, 0, 0) is interpreted by oacc_validate_dims as the
- dimensions: gang: 1, worker: 0, vector: 0.
-
- OTOH, routines in Fortran arrive here with these attributes:
- seq : __attribute__((oacc function (0 0, 0 0, 0 0)))
- vector: __attribute__((oacc function (0 0, 0 0, 1 0)))
- worker: __attribute__((oacc function (0 0, 1 0, 1 0)))
- gang : __attribute__((oacc function (1 0, 1 0, 1 0)))
- that is, the same as for C but with the dimensions set to 0.
-
- This is due to a bug in the Fortran front-end: PR72741. Work around
- this bug by forcing the dimensions to be the same in Fortran as for C,
- to be able to handle C and Fortran routines uniformly in this
- function. */
- dims[GOMP_DIM_VECTOR] = fn_level > GOMP_DIM_VECTOR ? 1 : 0;
- dims[GOMP_DIM_WORKER] = fn_level > GOMP_DIM_WORKER ? 1 : 0;
- dims[GOMP_DIM_GANG] = fn_level > GOMP_DIM_GANG ? 1 : 0;
- }
-
if (oacc_min_dims_p)
{
gcc_assert (dims[GOMP_DIM_VECTOR] == 1);
if (oacc_default_dims_p)
{
- dims[GOMP_DIM_VECTOR] = default_vector_length;
+ if (dims[GOMP_DIM_VECTOR] < 0)
+ dims[GOMP_DIM_VECTOR] = default_vector_length;
if (dims[GOMP_DIM_WORKER] < 0)
dims[GOMP_DIM_WORKER] = PTX_DEFAULT_RUNTIME_DIM;
if (dims[GOMP_DIM_GANG] < 0)
init = var;
}
- gimplify_assign (lhs, init, &seq);
+ if (lhs != NULL_TREE)
+ gimplify_assign (lhs, init, &seq);
}
pop_gimplify_context (NULL);