This commit imports the latest isl version into lib/External/isl. The changes
relavant for Polly are:
1) Schedule trees [1] have been introduced as a more structured way to
describe schedules. Polly does not yet use them, but we may switch to them
in the near future.
2) Another set of coalescing changes [2] simplifies some data dependences and
removes a couple of code generation artifacts.
We now understand that the following sets can be merged:
{ Stmt_S1[i0, i1] -> Stmt_S2[i0 + i1] :
i0 >= 0 and i1 <= 1023 - i0 and i1 >= 1
Stmt_S1[i0, 0] -> Stmt_S2[i0] : i0 <= 1023 and i0 >= 1}
into:
{ Stmt_S1[i0, i1] -> Stmt_S2[i0 + i1] : i1 <= 1023 - i0 and i1 >= 0 and
i1 >= 1 - i0 and i0 >= 0 }
Changes of this kind reduce unnecessary specialization during code
generation.
- for (int c3 = 0; c3 <= 1023; c3 += 1) {
- if (c3 % 2 == 0) {
- Stmt_for_body3(c1, c3);
- } else
- Stmt_for_body3(c1, c3);
- }
+ for (int c3 = 0; c3 <= 1023; c3 += 1)
+ Stmt_for_body3(c1, c3);
[1] http://impact.gforge.inria.fr/impact2014/papers/impact2014-verdoolaege.pdf
[2] http://impact.gforge.inria.fr/impact2015/papers/impact2015-verdoolaege.pdf
llvm-svn: 229423
40 lines
908 B
C
40 lines
908 B
C
#include <assert.h>
|
|
#include <isl/map.h>
|
|
#include <isl/options.h>
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
struct isl_ctx *ctx;
|
|
struct isl_map *map;
|
|
struct isl_options *options;
|
|
isl_printer *p;
|
|
int exact;
|
|
|
|
options = isl_options_new_with_defaults();
|
|
assert(options);
|
|
argc = isl_options_parse(options, argc, argv, ISL_ARG_ALL);
|
|
|
|
ctx = isl_ctx_alloc_with_options(&isl_options_args, options);
|
|
|
|
p = isl_printer_to_file(ctx, stdout);
|
|
|
|
map = isl_map_read_from_file(ctx, stdin);
|
|
map = isl_map_transitive_closure(map, &exact);
|
|
if (!exact)
|
|
p = isl_printer_print_str(p, "# NOT exact\n");
|
|
p = isl_printer_print_map(p, map);
|
|
p = isl_printer_end_line(p);
|
|
map = isl_map_compute_divs(map);
|
|
map = isl_map_coalesce(map);
|
|
p = isl_printer_print_str(p, "# coalesced\n");
|
|
p = isl_printer_print_map(p, map);
|
|
p = isl_printer_end_line(p);
|
|
isl_map_free(map);
|
|
|
|
isl_printer_free(p);
|
|
|
|
isl_ctx_free(ctx);
|
|
|
|
return 0;
|
|
}
|