From 82a3f9f22f74ddf63aaf65643f4d163d600c7403 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 30 Jun 2022 16:22:10 +0100 Subject: [PATCH 4/5] Build fixes for OG12 on more recent GCC versions This fixes a number of minor issues that can cause the build to fail on recent versions of GCC. 2022-06-30 Kwok Cheung Yeung gcc/fortran/ * openmp.cc (gfc_resolve_omp_allocate): Initialize tail to NULL. (This should be a fixup to 491478d12b83e102f72858e8a871a25c951df293: 'Add parsing support for allocate directive (OpenMP 5.0)') 2022-06-30 Kwok Cheung Yeung gcc/ * omp-offload.cc (oacc_loop_get_cfg_loop): Cast tail_mark to gimple* for dump_printf. * tree-scalar-evolution.cc (oacc_ifn_call_extract): Remove unused variable 'call'. (This should be a fixup to 491478d12b83e102f72858e8a871a25c951df293: 'Build fix for 'openacc: Use Graphite for dependence analysis in "kernels" region') 2022-06-30 Kwok Cheung Yeung gcc/ * omp-low.cc (usm_transform): Remove unused function argument. (This should be a fixup to 54c2d861ac62e30ebf34a4e62ee0d55478a742b9: 'Build fix for 'openmp: Use libgomp memory allocation functions with unified shared memory') 2022-06-30 Kwok Cheung Yeung gcc/ * omp-offload.cc (oacc_loop_warn_if_false_independent): Remove extra '.' at end of message. (This should be a fixup to 01e6774b725ffa667efd818a46795189a281addf: 'Build fix for 'openacc: Warn about "independent" "kernels" loops with data-dependences') 2022-06-30 Tobias Burnus gcc/ * graphite-isl-ast-to-gimple.cc (graphite_oacc_analyze_scop): Update arguments of dump_printf. (This should be a fixup to a7e863fc4d54fb645fef05f01a024250184964bb: 'openacc: Add runtime alias checking for OpenACC kernels') --- gcc/ChangeLog.omp | 21 +++++++++++++++++++++ gcc/fortran/ChangeLog.omp | 4 ++++ gcc/fortran/openmp.cc | 2 +- gcc/graphite-isl-ast-to-gimple.cc | 5 +++-- gcc/omp-low.cc | 2 +- gcc/omp-offload.cc | 4 ++-- gcc/tree-scalar-evolution.cc | 2 -- 7 files changed, 32 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp index 1455a9605c2..af922a6cb1e 100644 --- a/gcc/ChangeLog.omp +++ b/gcc/ChangeLog.omp @@ -1,3 +1,24 @@ +2022-06-30 Tobias Burnus + + * graphite-isl-ast-to-gimple.cc (graphite_oacc_analyze_scop): Update + arguments of dump_printf. + +2022-06-30 Kwok Cheung Yeung + + * omp-offload.cc (oacc_loop_warn_if_false_independent): Remove extra + '.' at end of message. + +2022-06-30 Kwok Cheung Yeung + + * omp-low.cc (usm_transform): Remove unused function argument. + +2022-06-30 Kwok Cheung Yeung + + * omp-offload.cc (oacc_loop_get_cfg_loop): Cast tail_mark to + gimple* for dump_printf. + * tree-scalar-evolution.cc (oacc_ifn_call_extract): Remove + unused variable 'call'. + 2022-06-30 Kwok Cheung Yeung * gimplify.cc (gimplify_scan_omp_clauses): Remove extra diff --git a/gcc/fortran/ChangeLog.omp b/gcc/fortran/ChangeLog.omp index 59f47d73b73..63eba462c43 100644 --- a/gcc/fortran/ChangeLog.omp +++ b/gcc/fortran/ChangeLog.omp @@ -1,3 +1,7 @@ +2022-06-30 Kwok Cheung Yeung + + * openmp.cc (gfc_resolve_omp_allocate): Initialize tail to NULL. + 2022-05-22 Kwok Cheung Yeung * trans-array.cc (gfc_conv_array_ref): Update arguments to diff --git a/gcc/fortran/openmp.cc b/gcc/fortran/openmp.cc index b6f070bc876..2ff923af9b5 100644 --- a/gcc/fortran/openmp.cc +++ b/gcc/fortran/openmp.cc @@ -10128,7 +10128,7 @@ gfc_resolve_omp_allocate (gfc_code *code, gfc_namespace *ns) gfc_alloc *al; gfc_omp_namelist *n = NULL; gfc_omp_namelist *cn = NULL; - gfc_omp_namelist *p, *tail; + gfc_omp_namelist *p, *tail = NULL; gfc_code *cur; hash_set vars; diff --git a/gcc/graphite-isl-ast-to-gimple.cc b/gcc/graphite-isl-ast-to-gimple.cc index 49cbb9d5cfe..2b825bac3d5 100644 --- a/gcc/graphite-isl-ast-to-gimple.cc +++ b/gcc/graphite-isl-ast-to-gimple.cc @@ -1781,7 +1781,7 @@ graphite_oacc_analyze_scop (scop_p scop) if (dump_enabled_p () && dump_flags & TDF_DETAILS) dump_printf (MSG_NOTE, "Runtime alias condition applied to: %G", - goacc_call); + stmt); } } } @@ -1793,7 +1793,8 @@ graphite_oacc_analyze_scop (scop_p scop) nothing much to do here. */ if (dump_enabled_p ()) dump_printf (MSG_NOTE, "Runtime alias check *not* inserted for" - " bb %d (GOACC_LOOP not found)"); + " bb %d (GOACC_LOOP not found)", + goacc_loop_block->index); /* Unset can_be_parallel, in case something else might use it. */ for (unsigned int i = 0; i < region->bbs.length (); i++) diff --git a/gcc/omp-low.cc b/gcc/omp-low.cc index bd7515d6b78..dc53373cac7 100644 --- a/gcc/omp-low.cc +++ b/gcc/omp-low.cc @@ -16232,7 +16232,7 @@ make_pass_diagnose_omp_blocks (gcc::context *ctxt) static tree usm_transform (gimple_stmt_iterator *gsi_p, bool *, - struct walk_stmt_info *wi) + struct walk_stmt_info *) { gimple *stmt = gsi_stmt (*gsi_p); /* ompx_unified_shared_mem_alloc is 10. */ diff --git a/gcc/omp-offload.cc b/gcc/omp-offload.cc index b3f534c579d..6656bc48e95 100644 --- a/gcc/omp-offload.cc +++ b/gcc/omp-offload.cc @@ -1867,7 +1867,7 @@ oacc_loop_get_cfg_loop (oacc_loop *loop) if (dump_file && (dump_flags & TDF_DETAILS)) dump_printf (MSG_OPTIMIZED_LOCATIONS | MSG_PRIORITY_INTERNALS, "%G", - tail_mark); + (gimple *) tail_mark); loop_p mark_cfg_loop = tail_mark->bb->loop_father; loop_p current_cfg_loop = mark_cfg_loop; @@ -2096,7 +2096,7 @@ oacc_loop_warn_if_false_independent (oacc_loop *loop) if (!can_be_parallel) warning_at (loop->loc, 0, "loop has \"independent\" clause but data dependences were " - "found."); + "found"); } /* Walk the OpenACC loop hierarchy checking and assigning the diff --git a/gcc/tree-scalar-evolution.cc b/gcc/tree-scalar-evolution.cc index 3c01bd608f0..8f4099046de 100644 --- a/gcc/tree-scalar-evolution.cc +++ b/gcc/tree-scalar-evolution.cc @@ -614,8 +614,6 @@ oacc_call_analyzable_p (tree t) tree oacc_ifn_call_extract (gimple *stmt) { - gcall *call = as_a (stmt); - if (oacc_call_analyzable_p (stmt)) { gcc_assert (gimple_call_internal_p (stmt, IFN_GOACC_LOOP)); -- 2.25.1