diff options
author | Tobias Grosser <tobias@grosser.es> | 2017-08-19 20:21:22 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2017-08-19 20:21:22 +0000 |
commit | ecb94a039291145aab487ba1713f05c3684bc8f4 (patch) | |
tree | 93bfade4018c43caa2b36ecb7ac14585d325800f /polly/lib/External | |
parent | 91522ffa12309176ce555f4c0bcbd2888135b85c (diff) | |
download | bcm5719-llvm-ecb94a039291145aab487ba1713f05c3684bc8f4.tar.gz bcm5719-llvm-ecb94a039291145aab487ba1713f05c3684bc8f4.zip |
[GPGPU] Correctly initialize array order and fixed_element information
Summary:
This information is necessary for PPCG to perform correct life range reordering.
With these changes applied we can live-range reorder some of the important
kernels in COSMO.
We also update and rename one test case, which previously could not be optimized
and now is optimized thanks to live-range reordering. To preserve test coverage
we add a new test case scalar-writes-in-scop-requires-abort.ll, which exercises
our automatic abort in case of scalar writes in the kernel.
Reviewers: Meinersbur, bollu, singam-sanjay
Subscribers: nemanjai, pollydev, llvm-commits, kbarton
Tags: #polly
Differential Revision: https://reviews.llvm.org/D36929
llvm-svn: 311259
Diffstat (limited to 'polly/lib/External')
-rw-r--r-- | polly/lib/External/ppcg/gpu.c | 5 | ||||
-rw-r--r-- | polly/lib/External/ppcg/gpu.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/polly/lib/External/ppcg/gpu.c b/polly/lib/External/ppcg/gpu.c index feff3081890..cfd998f1c31 100644 --- a/polly/lib/External/ppcg/gpu.c +++ b/polly/lib/External/ppcg/gpu.c @@ -162,7 +162,7 @@ static int is_read_only_scalar(struct gpu_array_info *array, /* Is "array" only accessed as individual, fixed elements? * That is, does each access to "array" access a single, fixed element? */ -static isl_bool only_fixed_element_accessed(struct gpu_array_info *array) +isl_bool only_fixed_element_accessed(struct gpu_array_info *array) { int i; @@ -250,6 +250,9 @@ static int extract_array_info(struct gpu_prog *prog, static __isl_give isl_union_map *remove_independences(struct gpu_prog *prog, struct gpu_array_info *array, __isl_take isl_union_map *order) { + // We do not have independence information in Polly. Hence, make this + // function a no-op. + return order; int i; for (i = 0; i < prog->scop->pet->n_independence; ++i) { diff --git a/polly/lib/External/ppcg/gpu.h b/polly/lib/External/ppcg/gpu.h index 893f468a364..62fb0f741bb 100644 --- a/polly/lib/External/ppcg/gpu.h +++ b/polly/lib/External/ppcg/gpu.h @@ -454,4 +454,6 @@ __isl_give isl_ast_node *generate_code(struct gpu_gen *gen, __isl_give isl_union_set *compute_may_persist(struct gpu_prog *prog); void collect_references(struct gpu_prog *prog, struct gpu_array_info *array); +void collect_order_dependences(struct gpu_prog *prog); +isl_bool only_fixed_element_accessed(struct gpu_array_info *array); #endif |