From f7bd3f3931337a54d0a73f304830073edc4abca5 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 4 Oct 2013 18:59:29 +0200 Subject: [PATCH] gpu.c: compute_group_tilings: take ppcg_kernel instead of gpu_gen This function only depends on the kernel, so there is no need to pass along the gpu_gen. Signed-off-by: Sven Verdoolaege --- gpu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gpu.c b/gpu.c index 8cb4dc4..5c3ada0 100644 --- a/gpu.c +++ b/gpu.c @@ -1566,14 +1566,14 @@ static void check_shared_memory_bound(struct ppcg_kernel *kernel) isl_val_free(left); } -/* Compute a tiling for all the array reference groups. +/* Compute a tiling for all the array reference groups in "kernel". */ -static void compute_group_tilings(struct gpu_gen *gen) +static void compute_group_tilings(struct ppcg_kernel *kernel) { int i, j; - for (i = 0; i < gen->kernel->n_array; ++i) { - struct gpu_local_array_info *array = &gen->kernel->array[i]; + for (i = 0; i < kernel->n_array; ++i) { + struct gpu_local_array_info *array = &kernel->array[i]; for (j = 0; j < array->n_group; ++j) gpu_array_ref_group_compute_tiling(array->groups[j]); @@ -3598,7 +3598,7 @@ static __isl_give isl_ast_node *create_host_leaf( gen->local_sched = interchange_for_unroll(gen, gen->local_sched); check_shared_memory_bound(gen->kernel); - compute_group_tilings(gen); + compute_group_tilings(gen->kernel); kernel->tree = generate_kernel(gen, build, host_domain, kernel->grid_size); -- 2.11.4.GIT