diff mbox

[hsa-branch] Replace all omp references of GPGPU with HSA grid

Message ID 20161115180859.l6q3wvox4ixfj6th@virgil.suse.cz
State New
Headers show

Commit Message

Martin Jambor Nov. 15, 2016, 6:08 p.m. UTC
Hi,

this is the last patch to the hsa branch before using it to create the
merge-to-trunk patches.  Basically, it replaces all references to
"GPGPU gridification" in omp-low.c to "HSA gridification" as requested
by Jakub at the Cauldron.

Committed to the HSA branch, it is part of the posted patches merging
it to trunk.

Thanks,

Martin



2016-11-12  Martin Jambor  <mjambor@suse.cz>

gcc/
	* omp-low.c (grid references): Replace GPGPU in the function
	comment with a reference to HSA grids.
	(grid_dist_follows_simple_pattern): Likewise.
	(grid_dist_follows_tiling_pattern): Likewise.
	(grid_target_follows_gridifiable_pattern): Likewise.
	(grid_expand_target_grid_body): Update function comment.
	(GRID_MISSED_MSG_PREFIX): Replece GPGPU with HSA kernel.
	(grid_attempt_target_gridification): Likewise.

testsuite/
	* c-c++-common/gomp/gridify-1.c: Adjusted scan dump.
	* c-c++-common/gomp/gridify-2.c: Likewise.
	* c-c++-common/gomp/gridify-3.c: Likewise.
	* gfortran.dg/gomp/gridify-1.f90: Likewise.
---
 gcc/omp-low.c                                | 25 ++++++++++++-------------
 gcc/testsuite/c-c++-common/gomp/gridify-1.c  |  2 +-
 gcc/testsuite/c-c++-common/gomp/gridify-2.c  |  2 +-
 gcc/testsuite/c-c++-common/gomp/gridify-3.c  |  2 +-
 gcc/testsuite/gfortran.dg/gomp/gridify-1.f90 |  2 +-
 5 files changed, 16 insertions(+), 17 deletions(-)
diff mbox

Patch

diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index d6d5272..cf228bf 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -13600,10 +13600,10 @@  expand_omp_target (struct omp_region *region)
     }
 }
 
-/* Expand KFOR loop as a GPGPU kernel, i.e. as a body only with iteration
-   variable derived from the thread number.  INTRA_GROUP means this is an
-   expansion of a loop iterating over work-items within a separate iteration
-   over groups. */
+/* Expand KFOR loop as a HSA grifidied kernel, i.e. as a body only with
+   iteration variable derived from the thread number.  INTRA_GROUP means this
+   is an expansion of a loop iterating over work-items within a separate
+   iteration over groups. */
 
 static void
 grid_expand_omp_for_loop (struct omp_region *kfor, bool intra_group)
@@ -13729,7 +13729,7 @@  grid_remap_kernel_arg_accesses (tree *tp, int *walk_subtrees, void *data)
 static void expand_omp (struct omp_region *region);
 
 /* If TARGET region contains a kernel body for loop, remove its region from the
-   TARGET and expand it in GPGPU kernel fashion. */
+   TARGET and expand it in HSA gridified kernel fashion. */
 
 static void
 grid_expand_target_grid_body (struct omp_region *target)
@@ -17368,7 +17368,7 @@  struct grid_prop
 };
 
 #define GRID_MISSED_MSG_PREFIX "Will not turn target construct into a " \
-  "gridified GPGPU kernel because "
+  "gridified HSA kernel because "
 
 /* Return true if STMT is an assignment of a register-type into a local
    VAR_DECL.  If GRID is non-NULL, the assignment additionally must not be to
@@ -17682,7 +17682,7 @@  grid_inner_loop_gridifiable_p (gomp_for *gfor, grid_prop *grid)
 
 /* Given distribute omp construct represented by DIST, which in the original
    source forms a compound construct with a looping construct, return true if it
-   can be turned into a gridified GPGPU kernel.  Otherwise return false. GRID
+   can be turned into a gridified HSA kernel.  Otherwise return false. GRID
    describes hitherto discovered properties of the loop that is evaluated for
    possible gridification.  */
 
@@ -17867,7 +17867,7 @@  grid_handle_call_in_distribute (gimple_stmt_iterator *gsi)
 /* Given a sequence of statements within a distribute omp construct or a
    parallel construct, which in the original source does not form a compound
    construct with a looping construct, return true if it does not prevent us
-   from turning it into a gridified GPGPU kernel.  Otherwise return false. GRID
+   from turning it into a gridified HSA kernel.  Otherwise return false. GRID
    describes hitherto discovered properties of the loop that is evaluated for
    possible gridification.  IN_PARALLEL must be true if seq is within a
    parallel construct and flase if it is only within a distribute
@@ -17991,10 +17991,9 @@  grid_dist_follows_tiling_pattern (gimple_seq seq, grid_prop *grid,
     return true;
 }
 
-/* If TARGET follows a pattern that can be turned into a gridified GPGPU
-   kernel, return true, otherwise return false.  In the case of success, also
-   fill in GROUP_SIZE_P with the requested group size or NULL if there is
-   none.  */
+/* If TARGET follows a pattern that can be turned into a gridified HSA kernel,
+   return true, otherwise return false.  In the case of success, also fill in
+   GRID with information describing the kernel grid.  */
 
 static bool
 grid_target_follows_gridifiable_pattern (gomp_target *target, grid_prop *grid)
@@ -18530,7 +18529,7 @@  grid_attempt_target_gridification (gomp_target *target,
   location_t loc = gimple_location (target);
   if (dump_enabled_p ())
     dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc,
-		     "Target construct will be turned into a gridified GPGPU "
+		     "Target construct will be turned into a gridified HSA "
 		     "kernel\n");
 
   /* Copy target body to a GPUKERNEL construct:  */
diff --git a/gcc/testsuite/c-c++-common/gomp/gridify-1.c b/gcc/testsuite/c-c++-common/gomp/gridify-1.c
index ba7a866..f9b03eb 100644
--- a/gcc/testsuite/c-c++-common/gomp/gridify-1.c
+++ b/gcc/testsuite/c-c++-common/gomp/gridify-1.c
@@ -51,4 +51,4 @@  foo4 (int j, int n, int *a)
 }
 
 
-/* { dg-final { scan-tree-dump-times "Target construct will be turned into a gridified GPGPU kernel" 4 "omplower" } } */
+/* { dg-final { scan-tree-dump-times "Target construct will be turned into a gridified HSA kernel" 4 "omplower" } } */
diff --git a/gcc/testsuite/c-c++-common/gomp/gridify-2.c b/gcc/testsuite/c-c++-common/gomp/gridify-2.c
index 3c13025..6b5cc9a 100644
--- a/gcc/testsuite/c-c++-common/gomp/gridify-2.c
+++ b/gcc/testsuite/c-c++-common/gomp/gridify-2.c
@@ -63,4 +63,4 @@  void tiled_sgemm_tt(const int M, const int N, const int K, const float alpha, co
       }	   /* end target teams distribute */
 }
 
-/* { dg-final { scan-tree-dump "Target construct will be turned into a gridified GPGPU kernel" "omplower" } } */
+/* { dg-final { scan-tree-dump "Target construct will be turned into a gridified HSA kernel" "omplower" } } */
diff --git a/gcc/testsuite/c-c++-common/gomp/gridify-3.c b/gcc/testsuite/c-c++-common/gomp/gridify-3.c
index 9e73133..8dbeaef 100644
--- a/gcc/testsuite/c-c++-common/gomp/gridify-3.c
+++ b/gcc/testsuite/c-c++-common/gomp/gridify-3.c
@@ -65,4 +65,4 @@  void tiled_sgemm_tt(const int M, const int N, const int K, const float alpha, co
       }	/* End distribute */
 }
 
-/* { dg-final { scan-tree-dump "Target construct will be turned into a gridified GPGPU kernel" "omplower" } } */
+/* { dg-final { scan-tree-dump "Target construct will be turned into a gridified HSA kernel" "omplower" } } */
diff --git a/gcc/testsuite/gfortran.dg/gomp/gridify-1.f90 b/gcc/testsuite/gfortran.dg/gomp/gridify-1.f90
index 00ff7f5..7def279 100644
--- a/gcc/testsuite/gfortran.dg/gomp/gridify-1.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/gridify-1.f90
@@ -13,4 +13,4 @@  subroutine vector_square(n, a, b)
 !$omp end target teams
 end subroutine vector_square
 
-! { dg-final { scan-tree-dump "Target construct will be turned into a gridified GPGPU kernel" "omplower" } }
+! { dg-final { scan-tree-dump "Target construct will be turned into a gridified HSA kernel" "omplower" } }