diff -Nru isl-0.11.2/ChangeLog isl-0.12.1/ChangeLog --- isl-0.11.2/ChangeLog 2013-04-09 16:45:12.000000000 +0000 +++ isl-0.12.1/ChangeLog 2013-07-24 11:02:36.000000000 +0000 @@ -1,3 +1,14 @@ +version: 0.12.1 +date: Wed Jul 24 12:54:46 CEST 2013 +changes: + - handle malloc returning NULL on zero-size allocation + - fix regression in AST generator +--- +version: 0.12 +date: Sun Jun 23 20:23:05 CEST 2013 +changes: + - add isl_val abstraction +--- version: 0.11.2 date: Tue Apr 9 18:45:10 CEST 2013 changes: @@ -97,8 +108,4 @@ - fix several hard to trigger bugs - improved argument parsing - support parametric vertex enumeration for barvinok ---- -version: 0.08 -date: Fri Oct 21 12:36:20 CEST 2011 -changes: - optionally use Bernstein expansion to compute bounds diff -Nru isl-0.11.2/GIT_HEAD_ID isl-0.12.1/GIT_HEAD_ID --- isl-0.11.2/GIT_HEAD_ID 2013-04-09 16:45:55.000000000 +0000 +++ isl-0.12.1/GIT_HEAD_ID 2013-07-24 11:05:30.000000000 +0000 @@ -1 +1 @@ -isl-0.11.2 +isl-0.12.1 diff -Nru isl-0.11.2/Makefile.am isl-0.12.1/Makefile.am --- isl-0.11.2/Makefile.am 2013-04-09 16:44:46.000000000 +0000 +++ isl-0.12.1/Makefile.am 2013-07-24 11:04:50.000000000 +0000 @@ -83,8 +83,7 @@ isl_hmap_map_basic_set.h \ isl_ilp.c \ isl_input.c \ - isl_list.c \ - isl_list_private.h \ + isl_int.h \ isl_local_space_private.h \ isl_local_space.c \ isl_lp.c \ @@ -122,6 +121,7 @@ isl_scan.h \ isl_schedule.c \ isl_schedule_private.h \ + isl_set_list.c \ isl_sort.c \ isl_sort.h \ isl_space.c \ @@ -137,6 +137,9 @@ isl_transitive_closure.c \ isl_union_map.c \ isl_union_map_private.h \ + isl_val.c \ + isl_val_gmp.c \ + isl_val_private.h \ isl_vec.c \ isl_version.c \ isl_vertices_private.h \ @@ -250,6 +253,9 @@ include/isl/union_map_type.h \ include/isl/union_set.h \ include/isl/union_set_type.h \ + include/isl/val.h \ + include/isl/val_gmp.h \ + include/isl/val_int.h \ include/isl/vec.h \ include/isl/version.h \ include/isl/vertices.h diff -Nru isl-0.11.2/Makefile.in isl-0.12.1/Makefile.in --- isl-0.11.2/Makefile.in 2013-04-09 16:45:43.000000000 +0000 +++ isl-0.12.1/Makefile.in 2013-07-24 11:05:05.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -19,6 +19,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -122,22 +139,23 @@ isl_equalities.h isl_factorization.c isl_factorization.h \ isl_farkas.c isl_flow.c isl_fold.c isl_gmp.c isl_hash.c \ isl_hmap_map_basic_set.c isl_hmap_map_basic_set.h isl_ilp.c \ - isl_input.c isl_list.c isl_list_private.h \ - isl_local_space_private.h isl_local_space.c isl_lp.c \ - isl_lp_piplib.h isl_map.c isl_map_simplify.c \ - isl_map_subtract.c isl_map_private.h isl_map_piplib.h \ - isl_mat.c isl_mat_private.h isl_morph.c isl_morph.h isl_id.c \ - isl_id_private.h isl_obj.c isl_options.c isl_options_private.h \ - isl_output.c isl_piplib.h isl_point_private.h isl_point.c \ - isl_polynomial_private.h isl_polynomial.c \ - isl_printer_private.h isl_printer.c print.c isl_range.c \ - isl_range.h isl_reordering.c isl_reordering.h isl_sample.h \ - isl_sample.c isl_scan.c isl_scan.h isl_schedule.c \ - isl_schedule_private.h isl_sort.c isl_sort.h isl_space.c \ - isl_space_private.h isl_stream.c isl_stream_private.h \ - isl_seq.c isl_tab.c isl_tab.h isl_tab_pip.c isl_tarjan.c \ - isl_tarjan.h isl_transitive_closure.c isl_union_map.c \ - isl_union_map_private.h isl_vec.c isl_version.c \ + isl_input.c isl_int.h isl_local_space_private.h \ + isl_local_space.c isl_lp.c isl_lp_piplib.h isl_map.c \ + isl_map_simplify.c isl_map_subtract.c isl_map_private.h \ + isl_map_piplib.h isl_mat.c isl_mat_private.h isl_morph.c \ + isl_morph.h isl_id.c isl_id_private.h isl_obj.c isl_options.c \ + isl_options_private.h isl_output.c isl_piplib.h \ + isl_point_private.h isl_point.c isl_polynomial_private.h \ + isl_polynomial.c isl_printer_private.h isl_printer.c print.c \ + isl_range.c isl_range.h isl_reordering.c isl_reordering.h \ + isl_sample.h isl_sample.c isl_scan.c isl_scan.h isl_schedule.c \ + isl_schedule_private.h isl_set_list.c isl_sort.c isl_sort.h \ + isl_space.c isl_space_private.h isl_stream.c \ + isl_stream_private.h isl_seq.c isl_tab.c isl_tab.h \ + isl_tab_pip.c isl_tarjan.c isl_tarjan.h \ + isl_transitive_closure.c isl_union_map.c \ + isl_union_map_private.h isl_val.c isl_val_gmp.c \ + isl_val_private.h isl_vec.c isl_version.c \ isl_vertices_private.h isl_vertices.c @HAVE_PIPLIB_FALSE@am__objects_1 = libisl_la-isl_lp_no_piplib.lo \ @HAVE_PIPLIB_FALSE@ libisl_la-isl_map_no_piplib.lo \ @@ -163,21 +181,22 @@ libisl_la-isl_fold.lo libisl_la-isl_gmp.lo \ libisl_la-isl_hash.lo libisl_la-isl_hmap_map_basic_set.lo \ libisl_la-isl_ilp.lo libisl_la-isl_input.lo \ - libisl_la-isl_list.lo libisl_la-isl_local_space.lo \ - libisl_la-isl_lp.lo libisl_la-isl_map.lo \ - libisl_la-isl_map_simplify.lo libisl_la-isl_map_subtract.lo \ - libisl_la-isl_mat.lo libisl_la-isl_morph.lo \ - libisl_la-isl_id.lo libisl_la-isl_obj.lo \ - libisl_la-isl_options.lo libisl_la-isl_output.lo \ - libisl_la-isl_point.lo libisl_la-isl_polynomial.lo \ - libisl_la-isl_printer.lo libisl_la-print.lo \ - libisl_la-isl_range.lo libisl_la-isl_reordering.lo \ - libisl_la-isl_sample.lo libisl_la-isl_scan.lo \ - libisl_la-isl_schedule.lo libisl_la-isl_sort.lo \ + libisl_la-isl_local_space.lo libisl_la-isl_lp.lo \ + libisl_la-isl_map.lo libisl_la-isl_map_simplify.lo \ + libisl_la-isl_map_subtract.lo libisl_la-isl_mat.lo \ + libisl_la-isl_morph.lo libisl_la-isl_id.lo \ + libisl_la-isl_obj.lo libisl_la-isl_options.lo \ + libisl_la-isl_output.lo libisl_la-isl_point.lo \ + libisl_la-isl_polynomial.lo libisl_la-isl_printer.lo \ + libisl_la-print.lo libisl_la-isl_range.lo \ + libisl_la-isl_reordering.lo libisl_la-isl_sample.lo \ + libisl_la-isl_scan.lo libisl_la-isl_schedule.lo \ + libisl_la-isl_set_list.lo libisl_la-isl_sort.lo \ libisl_la-isl_space.lo libisl_la-isl_stream.lo \ libisl_la-isl_seq.lo libisl_la-isl_tab.lo \ libisl_la-isl_tab_pip.lo libisl_la-isl_tarjan.lo \ libisl_la-isl_transitive_closure.lo libisl_la-isl_union_map.lo \ + libisl_la-isl_val.lo libisl_la-isl_val_gmp.lo \ libisl_la-isl_vec.lo libisl_la-isl_version.lo \ libisl_la-isl_vertices.lo libisl_la_OBJECTS = $(am_libisl_la_OBJECTS) @@ -287,6 +306,11 @@ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DATA = $(pkgconfig_DATA) HEADERS = $(nodist_pkginclude_HEADERS) $(pkginclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ @@ -548,8 +572,7 @@ isl_hmap_map_basic_set.h \ isl_ilp.c \ isl_input.c \ - isl_list.c \ - isl_list_private.h \ + isl_int.h \ isl_local_space_private.h \ isl_local_space.c \ isl_lp.c \ @@ -587,6 +610,7 @@ isl_scan.h \ isl_schedule.c \ isl_schedule_private.h \ + isl_set_list.c \ isl_sort.c \ isl_sort.h \ isl_space.c \ @@ -602,6 +626,9 @@ isl_transitive_closure.c \ isl_union_map.c \ isl_union_map_private.h \ + isl_val.c \ + isl_val_gmp.c \ + isl_val_private.h \ isl_vec.c \ isl_version.c \ isl_vertices_private.h \ @@ -717,6 +744,9 @@ include/isl/union_map_type.h \ include/isl/union_set.h \ include/isl/union_set_type.h \ + include/isl/val.h \ + include/isl/val_gmp.h \ + include/isl/val_int.h \ include/isl/vec.h \ include/isl/version.h \ include/isl/vertices.h @@ -819,7 +849,6 @@ cd $(top_builddir) && $(SHELL) ./config.status $@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -827,6 +856,8 @@ else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } @@ -937,7 +968,6 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_id.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_ilp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_input.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_local_space.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_lp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_lp_no_piplib.Plo@am__quote@ @@ -964,6 +994,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_scan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_schedule.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_seq.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_set_list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_sort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_space.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_stream.Plo@am__quote@ @@ -972,6 +1003,8 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_tarjan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_transitive_closure.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_union_map.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_val.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_val_gmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_vec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_version.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libisl_la-isl_vertices.Plo@am__quote@ @@ -1265,13 +1298,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_input.lo `test -f 'isl_input.c' || echo '$(srcdir)/'`isl_input.c -libisl_la-isl_list.lo: isl_list.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_list.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_list.Tpo -c -o libisl_la-isl_list.lo `test -f 'isl_list.c' || echo '$(srcdir)/'`isl_list.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_list.Tpo $(DEPDIR)/libisl_la-isl_list.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='isl_list.c' object='libisl_la-isl_list.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_list.lo `test -f 'isl_list.c' || echo '$(srcdir)/'`isl_list.c - libisl_la-isl_local_space.lo: isl_local_space.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_local_space.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_local_space.Tpo -c -o libisl_la-isl_local_space.lo `test -f 'isl_local_space.c' || echo '$(srcdir)/'`isl_local_space.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_local_space.Tpo $(DEPDIR)/libisl_la-isl_local_space.Plo @@ -1412,6 +1438,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_schedule.lo `test -f 'isl_schedule.c' || echo '$(srcdir)/'`isl_schedule.c +libisl_la-isl_set_list.lo: isl_set_list.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_set_list.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_set_list.Tpo -c -o libisl_la-isl_set_list.lo `test -f 'isl_set_list.c' || echo '$(srcdir)/'`isl_set_list.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_set_list.Tpo $(DEPDIR)/libisl_la-isl_set_list.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='isl_set_list.c' object='libisl_la-isl_set_list.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_set_list.lo `test -f 'isl_set_list.c' || echo '$(srcdir)/'`isl_set_list.c + libisl_la-isl_sort.lo: isl_sort.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_sort.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_sort.Tpo -c -o libisl_la-isl_sort.lo `test -f 'isl_sort.c' || echo '$(srcdir)/'`isl_sort.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_sort.Tpo $(DEPDIR)/libisl_la-isl_sort.Plo @@ -1475,6 +1508,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_union_map.lo `test -f 'isl_union_map.c' || echo '$(srcdir)/'`isl_union_map.c +libisl_la-isl_val.lo: isl_val.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_val.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_val.Tpo -c -o libisl_la-isl_val.lo `test -f 'isl_val.c' || echo '$(srcdir)/'`isl_val.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_val.Tpo $(DEPDIR)/libisl_la-isl_val.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='isl_val.c' object='libisl_la-isl_val.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_val.lo `test -f 'isl_val.c' || echo '$(srcdir)/'`isl_val.c + +libisl_la-isl_val_gmp.lo: isl_val_gmp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_val_gmp.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_val_gmp.Tpo -c -o libisl_la-isl_val_gmp.lo `test -f 'isl_val_gmp.c' || echo '$(srcdir)/'`isl_val_gmp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_val_gmp.Tpo $(DEPDIR)/libisl_la-isl_val_gmp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='isl_val_gmp.c' object='libisl_la-isl_val_gmp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libisl_la-isl_val_gmp.lo `test -f 'isl_val_gmp.c' || echo '$(srcdir)/'`isl_val_gmp.c + libisl_la-isl_vec.lo: isl_vec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libisl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libisl_la-isl_vec.lo -MD -MP -MF $(DEPDIR)/libisl_la-isl_vec.Tpo -c -o libisl_la-isl_vec.lo `test -f 'isl_vec.c' || echo '$(srcdir)/'`isl_vec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libisl_la-isl_vec.Tpo $(DEPDIR)/libisl_la-isl_vec.Plo @@ -1646,8 +1693,11 @@ -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1664,8 +1714,11 @@ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-nodist_pkgincludeHEADERS: $(nodist_pkginclude_HEADERS) @$(NORMAL_INSTALL) - test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1682,8 +1735,11 @@ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) - test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1961,13 +2017,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -2056,7 +2109,7 @@ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) diff -Nru isl-0.11.2/aclocal.m4 isl-0.12.1/aclocal.m4 --- isl-0.11.2/aclocal.m4 2013-04-09 16:45:42.000000000 +0000 +++ isl-0.12.1/aclocal.m4 2013-07-24 11:05:04.000000000 +0000 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.11.3 -*- Autoconf -*- +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, @@ -14,8 +14,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, -[m4_warning([this file was generated for autoconf 2.68. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) @@ -38,7 +38,7 @@ [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.3], [], +m4_if([$1], [1.11.6], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -54,7 +54,7 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.3])dnl +[AM_AUTOMAKE_VERSION([1.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) diff -Nru isl-0.11.2/bound.c isl-0.12.1/bound.c --- isl-0.11.2/bound.c 2013-01-08 11:20:43.000000000 +0000 +++ isl-0.12.1/bound.c 2013-07-24 11:04:50.000000000 +0000 @@ -62,10 +62,12 @@ unsigned nparam; struct verify_point_bound *vpb = (struct verify_point_bound *) user; isl_int t; + isl_ctx *ctx; isl_pw_qpolynomial_fold *pwf; isl_qpolynomial *bound = NULL; isl_qpolynomial *opt = NULL; isl_set *dom = NULL; + isl_printer *p; const char *minmax; int bounded; int sign; @@ -82,6 +84,9 @@ sign = -1; } + ctx = isl_point_get_ctx(pnt); + p = isl_printer_to_file(ctx, out); + isl_int_init(t); pwf = isl_pw_qpolynomial_fold_copy(vpb->pwf); @@ -123,24 +128,28 @@ goto error; if (vpb->options->print_all || !ok) { - fprintf(out, "%s(", minmax); + p = isl_printer_print_str(p, minmax); + p = isl_printer_print_str(p, "("); for (i = 0; i < nparam; ++i) { if (i) - fprintf(out, ", "); + p = isl_printer_print_str(p, ", "); isl_point_get_coordinate(pnt, isl_dim_param, i, &t); - isl_int_print(out, t, 0); + p = isl_printer_print_isl_int(p, t); } - fprintf(out, ") = "); - isl_qpolynomial_print(bound, out, ISL_FORMAT_ISL); - fprintf(out, ", %s = ", bounded ? "opt" : "sample"); - isl_qpolynomial_print(opt, out, ISL_FORMAT_ISL); + p = isl_printer_print_str(p, ") = "); + p = isl_printer_print_qpolynomial(p, bound); + p = isl_printer_print_str(p, ", "); + p = isl_printer_print_str(p, bounded ? "opt" : "sample"); + p = isl_printer_print_str(p, " = "); + p = isl_printer_print_qpolynomial(p, opt); if (ok) - fprintf(out, ". OK\n"); + p = isl_printer_print_str(p, ". OK"); else - fprintf(out, ". NOT OK\n"); + p = isl_printer_print_str(p, ". NOT OK"); + p = isl_printer_end_line(p); } else if ((vpb->n % vpb->stride) == 0) { - printf("o"); - fflush(stdout); + p = isl_printer_print_str(p, "o"); + p = isl_printer_flush(p); } if (0) { @@ -156,6 +165,8 @@ isl_int_clear(t); + isl_printer_free(p); + if (!ok) vpb->error = 1; diff -Nru isl-0.11.2/codegen_test.sh.in isl-0.12.1/codegen_test.sh.in --- isl-0.11.2/codegen_test.sh.in 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/codegen_test.sh.in 2013-07-01 13:12:40.000000000 +0000 @@ -3,6 +3,8 @@ EXEEXT=@EXEEXT@ srcdir=@srcdir@ +failed=0 + for i in $srcdir/test_inputs/codegen/*.in \ $srcdir/test_inputs/codegen/cloog/*.in \ $srcdir/test_inputs/codegen/omega/*.in \ @@ -13,5 +15,7 @@ dir=`dirname $i` ref=$dir/$base.c (./isl_codegen$EXEEXT < $i > $test && - diff -uw $ref $test && rm $test) || exit + diff -uw $ref $test && rm $test) || failed=1 done + +test $failed -eq 0 || exit diff -Nru isl-0.11.2/config.guess isl-0.12.1/config.guess --- isl-0.11.2/config.guess 2011-11-24 12:37:46.000000000 +0000 +++ isl-0.12.1/config.guess 2013-07-16 10:46:31.000000000 +0000 @@ -2,9 +2,9 @@ # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2011-05-11' +timestamp='2012-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,9 +17,7 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -57,8 +55,8 @@ Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -145,7 +143,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -792,13 +790,12 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) @@ -807,6 +804,9 @@ *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 @@ -861,6 +861,13 @@ i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -895,13 +902,16 @@ echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu @@ -943,7 +953,7 @@ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) - echo or32-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu @@ -978,13 +988,13 @@ echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-tilera-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -1315,6 +1325,9 @@ i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 diff -Nru isl-0.11.2/config.sub isl-0.12.1/config.sub --- isl-0.11.2/config.sub 2011-11-24 12:37:46.000000000 +0000 +++ isl-0.12.1/config.sub 2013-07-16 10:46:31.000000000 +0000 @@ -2,9 +2,9 @@ # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2011-03-23' +timestamp='2012-04-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,9 +21,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -76,8 +74,8 @@ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -132,6 +130,10 @@ os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -223,6 +225,12 @@ -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -247,17 +255,22 @@ # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ + | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ @@ -291,7 +304,7 @@ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | rx \ + | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ @@ -300,7 +313,7 @@ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ - | v850 | v850e \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -315,8 +328,7 @@ c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -329,7 +341,10 @@ strongarm | thumb | xscale) basic_machine=arm-unknown ;; - + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; xscaleeb) basic_machine=armeb-unknown ;; @@ -352,11 +367,13 @@ # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ @@ -365,8 +382,10 @@ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ @@ -400,7 +419,7 @@ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ @@ -408,10 +427,11 @@ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ + | tile*-* \ | tron-* \ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -711,7 +731,6 @@ i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -808,10 +827,18 @@ ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i386-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -1120,13 +1147,8 @@ basic_machine=t90-cray os=-unicos ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1336,7 +1358,7 @@ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ @@ -1521,6 +1543,9 @@ c4x-* | tic4x-*) os=-coff ;; + hexagon-*) + os=-elf + ;; tic54x-*) os=-coff ;; @@ -1548,9 +1573,6 @@ ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout diff -Nru isl-0.11.2/configure isl-0.12.1/configure --- isl-0.11.2/configure 2013-04-09 16:45:44.000000000 +0000 +++ isl-0.12.1/configure 2013-07-24 11:05:06.000000000 +0000 @@ -1,13 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for isl 0.11.2. +# Generated by GNU Autoconf 2.69 for isl 0.12.1. # # Report bugs to . # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -136,6 +134,31 @@ # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -169,7 +192,8 @@ else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -222,21 +246,25 @@ if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -339,6 +367,14 @@ } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -460,6 +496,10 @@ chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -494,16 +534,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -515,28 +555,8 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -570,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='isl' PACKAGE_TARNAME='isl' -PACKAGE_VERSION='0.11.2' -PACKAGE_STRING='isl 0.11.2' +PACKAGE_VERSION='0.12.1' +PACKAGE_STRING='isl 0.12.1' PACKAGE_BUGREPORT='isl-development@googlegroups.com' PACKAGE_URL='' @@ -1258,8 +1278,6 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1345,7 +1363,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures isl 0.11.2 to adapt to many kinds of systems. +\`configure' configures isl 0.12.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1415,7 +1433,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of isl 0.11.2:";; + short | recursive ) echo "Configuration of isl 0.12.1:";; esac cat <<\_ACEOF @@ -1543,10 +1561,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -isl configure 0.11.2 -generated by GNU Autoconf 2.68 +isl configure 0.12.1 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1702,7 +1720,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1920,7 +1938,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -2010,7 +2028,8 @@ main () { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2026,7 +2045,8 @@ main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2052,7 +2072,8 @@ main () { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2068,7 +2089,8 @@ main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2102,7 +2124,8 @@ main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2171,6 +2194,97 @@ } # ac_fn_c_compute_int +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ----------------------------------------------- ## +## Report this to isl-development@googlegroups.com ## +## ----------------------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR @@ -2368,8 +2482,8 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by isl $as_me 0.11.2, which was -generated by GNU Autoconf 2.68. Invocation command line was +It was created by isl $as_me 0.12.1, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2785,7 +2899,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2954,7 +3068,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2994,7 +3108,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3045,7 +3159,7 @@ test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -3098,7 +3212,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3184,7 +3298,7 @@ # Define the identity of the package. PACKAGE='isl' - VERSION='0.11.2' + VERSION='0.12.1' cat >>confdefs.h <<_ACEOF @@ -3264,7 +3378,7 @@ AM_BACKSLASH='\' -versioninfo=11:2:1 +versioninfo=12:1:2 if test "x$prefix" != "xNONE"; then prefix_wd=`cd $prefix && pwd` @@ -3300,7 +3414,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3340,7 +3454,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3393,7 +3507,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3434,7 +3548,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3492,7 +3606,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3536,7 +3650,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3982,8 +4096,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -4287,7 +4400,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4331,7 +4444,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5392,7 +5505,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PRTDIAG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5667,8 +5780,8 @@ -macro_version='2.4' -macro_revision='1.3293' +macro_version='2.4.2' +macro_revision='1.3337' @@ -5775,7 +5888,7 @@ for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -5851,7 +5964,7 @@ for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -5917,7 +6030,7 @@ for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -5984,7 +6097,7 @@ for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -6240,7 +6353,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6284,7 +6397,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6703,7 +6816,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6743,7 +6856,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7049,7 +7162,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7089,7 +7202,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7192,7 +7305,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7236,7 +7349,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7361,7 +7474,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7401,7 +7514,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7460,7 +7573,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7500,7 +7613,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8135,7 +8248,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8175,7 +8288,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8255,7 +8368,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8295,7 +8408,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8347,7 +8460,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8387,7 +8500,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8439,7 +8552,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8479,7 +8592,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8531,7 +8644,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8571,7 +8684,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8623,7 +8736,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8663,7 +8776,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -16366,7 +16479,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PERL="perl" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -16403,7 +16516,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PDFLATEX="pdflatex" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -16440,7 +16553,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_POD2HTML="pod2html" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -17034,6 +17147,86 @@ GMP_LDFLAGS="-L$with_gmp_prefix/lib" fi GMP_LIBS=-lgmp + SAVE_CPPFLAGS="$CPPFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + SAVE_LIBS="$LIBS" + CPPFLAGS="$GMP_CPPFLAGS $CPPFLAGS" + LDFLAGS="$GMP_LDFLAGS $LDFLAGS" + LIBS="$GMP_LIBS $LIBS" + ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default" +if test "x$ac_cv_header_gmp_h" = xyes; then : + +else + as_fn_error $? "gmp.h header not found" "$LINENO" 5 +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgmp" >&5 +$as_echo_n "checking for main in -lgmp... " >&6; } +if ${ac_cv_lib_gmp_main+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgmp $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gmp_main=yes +else + ac_cv_lib_gmp_main=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp_main" >&5 +$as_echo "$ac_cv_lib_gmp_main" >&6; } +if test "x$ac_cv_lib_gmp_main" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBGMP 1 +_ACEOF + + LIBS="-lgmp $LIBS" + +else + as_fn_error $? "gmp library not found" "$LINENO" 5 +fi + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + mpz_t n, d; + if (mpz_divisible_p(n, d)) + mpz_divexact_ui(n, n, 4); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + as_fn_error $? "gmp library too old" "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CPPFLAGS="$SAVE_CPPFLAGS" + LDFLAGS="$SAVE_LDFLAGS" + LIBS="$SAVE_LIBS" ;; build) GMP_CPPFLAGS="-I$gmp_srcdir -I$with_gmp_builddir" @@ -17041,7 +17234,11 @@ ;; esac SAVE_CPPFLAGS="$CPPFLAGS" +SAVE_LDFLAGS="$LDFLAGS" +SAVE_LIBS="$LIBS" CPPFLAGS="$GMP_CPPFLAGS $CPPFLAGS" +LDFLAGS="$GMP_LDFLAGS $LDFLAGS" +LIBS="$GMP_LIBS $LIBS" need_get_memory_functions=false ac_fn_c_check_decl "$LINENO" "mp_get_memory_functions" "ac_cv_have_decl_mp_get_memory_functions" "#include " @@ -17062,7 +17259,46 @@ fi +if test "$cross_compiling" = yes; then : + need_normalized_gcdext=true +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + mpz_t x,y,g,a,b; + mpz_init(x); + mpz_init(y); + mpz_init(g); + mpz_init(a); + mpz_init(b); + mpz_set_si(x, -1); + mpz_set_si(y, 9); + mpz_gcdext(g, a, b, x, y); + if (mpz_get_si(a) == -1 && mpz_get_si(b) == 0) + return 0; + else + return 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + need_normalized_gcdext=false +else + need_normalized_gcdext=true +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + CPPFLAGS="$SAVE_CPPFLAGS" +LDFLAGS="$SAVE_LDFLAGS" +LIBS="$SAVE_LIBS" if test x$need_get_memory_functions = xtrue; then NEED_GET_MEMORY_FUNCTIONS_TRUE= NEED_GET_MEMORY_FUNCTIONS_FALSE='#' @@ -17071,6 +17307,11 @@ NEED_GET_MEMORY_FUNCTIONS_FALSE= fi +if test $need_normalized_gcdext = true; then + +$as_echo "#define GMP_NORMALIZE_GCDEXT /**/" >>confdefs.h + +fi @@ -17347,6 +17588,69 @@ case "$with_clang" in system) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + llvm_config="llvm-config" # Extract the first word of ""$llvm_config"", so it can be a program name with args. set dummy "$llvm_config"; ac_word=$2 @@ -17364,7 +17668,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_llvm_config_found="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -17397,7 +17701,12 @@ CLANG_CXXFLAGS=`$llvm_config --cxxflags` CLANG_LDFLAGS=`$llvm_config --ldflags` targets=`$llvm_config --targets-built` - CLANG_LIBS=`$llvm_config --libs $targets asmparser bitreader support mc` + components="$targets asmparser bitreader support mc" + $llvm_config --components | $GREP option > /dev/null 2> /dev/null + if test $? -eq 0; then + components="$components option" + fi + CLANG_LIBS=`$llvm_config --libs $components` CLANG_PREFIX=`$llvm_config --prefix` cat >>confdefs.h <<_ACEOF @@ -17800,7 +18109,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig cppflags" >&5 $as_echo_n "checking our pkgconfig cppflags... " >&6; } -ax_create_pkgconfig_cppflags="$CPPFLAGS $PACKAGE_CFLAGS" +ax_create_pkgconfig_cppflags="$PACKAGE_CFLAGS" ax_create_pkgconfig_cppflags=`eval echo "$ax_create_pkgconfig_cppflags"` ax_create_pkgconfig_cppflags=`eval echo "$ax_create_pkgconfig_cppflags"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_cppflags" >&5 @@ -17808,7 +18117,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking our pkgconfig ldflags" >&5 $as_echo_n "checking our pkgconfig ldflags... " >&6; } -ax_create_pkgconfig_ldflags="$LDFLAGS $PACKAGE_LDFLAGS" +ax_create_pkgconfig_ldflags="$PACKAGE_LDFLAGS" ax_create_pkgconfig_ldflags=`eval echo "$ax_create_pkgconfig_ldflags"` ax_create_pkgconfig_ldflags=`eval echo "$ax_create_pkgconfig_ldflags"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_create_pkgconfig_ldflags" >&5 @@ -18386,16 +18695,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -18455,28 +18764,16 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -18497,8 +18794,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by isl $as_me 0.11.2, which was -generated by GNU Autoconf 2.68. Invocation command line was +This file was extended by isl $as_me 0.12.1, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -18563,11 +18860,11 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -isl config.status 0.11.2 -configured by $0, generated by GNU Autoconf 2.68, +isl config.status 0.12.1 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -18658,7 +18955,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' diff -Nru isl-0.11.2/configure.ac isl-0.12.1/configure.ac --- isl-0.11.2/configure.ac 2013-04-09 16:44:46.000000000 +0000 +++ isl-0.12.1/configure.ac 2013-07-24 11:04:50.000000000 +0000 @@ -1,10 +1,10 @@ -AC_INIT([isl], [0.11.2], [isl-development@googlegroups.com]) +AC_INIT([isl], [0.12.1], [isl-development@googlegroups.com]) AC_CONFIG_AUX_DIR([.]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign]) m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) AC_SUBST(versioninfo) -versioninfo=11:2:1 +versioninfo=12:1:2 if test "x$prefix" != "xNONE"; then prefix_wd=`cd $prefix && pwd` @@ -48,6 +48,22 @@ GMP_LDFLAGS="-L$with_gmp_prefix/lib" fi GMP_LIBS=-lgmp + SAVE_CPPFLAGS="$CPPFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + SAVE_LIBS="$LIBS" + CPPFLAGS="$GMP_CPPFLAGS $CPPFLAGS" + LDFLAGS="$GMP_LDFLAGS $LDFLAGS" + LIBS="$GMP_LIBS $LIBS" + AC_CHECK_HEADER([gmp.h], [], [AC_ERROR([gmp.h header not found])]) + AC_CHECK_LIB([gmp], [main], [], [AC_ERROR([gmp library not found])]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ + mpz_t n, d; + if (mpz_divisible_p(n, d)) + mpz_divexact_ui(n, n, 4); + ]])], [], [AC_ERROR([gmp library too old])]) + CPPFLAGS="$SAVE_CPPFLAGS" + LDFLAGS="$SAVE_LDFLAGS" + LIBS="$SAVE_LIBS" ;; build) GMP_CPPFLAGS="-I$gmp_srcdir -I$with_gmp_builddir" @@ -55,13 +71,39 @@ ;; esac SAVE_CPPFLAGS="$CPPFLAGS" +SAVE_LDFLAGS="$LDFLAGS" +SAVE_LIBS="$LIBS" CPPFLAGS="$GMP_CPPFLAGS $CPPFLAGS" +LDFLAGS="$GMP_LDFLAGS $LDFLAGS" +LIBS="$GMP_LIBS $LIBS" need_get_memory_functions=false AC_CHECK_DECLS(mp_get_memory_functions,[],[ need_get_memory_functions=true ],[#include ]) +AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ + mpz_t x,y,g,a,b; + mpz_init(x); + mpz_init(y); + mpz_init(g); + mpz_init(a); + mpz_init(b); + mpz_set_si(x, -1); + mpz_set_si(y, 9); + mpz_gcdext(g, a, b, x, y); + if (mpz_get_si(a) == -1 && mpz_get_si(b) == 0) + return 0; + else + return 1; +]])], [need_normalized_gcdext=false], [need_normalized_gcdext=true], +[need_normalized_gcdext=true]) CPPFLAGS="$SAVE_CPPFLAGS" +LDFLAGS="$SAVE_LDFLAGS" +LIBS="$SAVE_LIBS" AM_CONDITIONAL(NEED_GET_MEMORY_FUNCTIONS, test x$need_get_memory_functions = xtrue) +if test $need_normalized_gcdext = true; then +AC_DEFINE([GMP_NORMALIZE_GCDEXT], [], + [result of mpz_gcdext needs to be normalized]) +fi AX_SUBMODULE(piplib,no|system|build,no) @@ -112,6 +154,7 @@ AX_SUBMODULE(clang,system|no,no) case "$with_clang" in system) + AC_PROG_GREP llvm_config="llvm-config" AC_CHECK_PROG([llvm_config_found], ["$llvm_config"], [yes]) if test "x$with_clang_prefix" != "x"; then @@ -126,7 +169,12 @@ CLANG_CXXFLAGS=`$llvm_config --cxxflags` CLANG_LDFLAGS=`$llvm_config --ldflags` targets=`$llvm_config --targets-built` - CLANG_LIBS=`$llvm_config --libs $targets asmparser bitreader support mc` + components="$targets asmparser bitreader support mc" + $llvm_config --components | $GREP option > /dev/null 2> /dev/null + if test $? -eq 0; then + components="$components option" + fi + CLANG_LIBS=`$llvm_config --libs $components` CLANG_PREFIX=`$llvm_config --prefix` AC_DEFINE_UNQUOTED(CLANG_PREFIX, ["$CLANG_PREFIX"], [Clang installation prefix]) diff -Nru isl-0.11.2/debian/autoreconf.after isl-0.12.1/debian/autoreconf.after --- isl-0.11.2/debian/autoreconf.after 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/debian/autoreconf.after 2013-10-17 14:26:50.000000000 +0000 @@ -0,0 +1,918 @@ +903c73f5f38062b6edb969c8745d05e8 ./isl_vertices.c +0c7c9ea0d2ff040ba4a25afa0089624b ./LICENSE +d2f125b3ef068a78e4d3cdd91e41df57 ./isl_hmap_map_basic_set.h +b6f058a9acd23690cccc8385a9ab843f ./isl_lp_piplib.c +93030d819bf1e193092267e47641c96b ./isl_union_map.c +e33cdfd638e3048eee64f3b5608d5691 ./isl_vec.c +4d0f4bfd0a8b05d9839cd5d7eae8b404 ./isl_map_no_piplib.c +ea5a31c8f93b4037f864364b079f9822 ./isl_multi_templ.c +2a3faf63a9a6341825f7e38c7de318a4 ./isl_pw_templ.c +71a0acf07de06f13f7f634daea100d28 ./isl_ast_build_expr.h +f101a42312522164547b2648ef83bc3d ./codegen.c +0a76c899ccbd03eb5364d8b65614ad50 ./isl_scan.h +f816e214ea75485bad017e4d09a7f28f ./autom4te.cache/traces.0 +344ad02e13cff0be2a4d5493ad1c9f90 ./autom4te.cache/requests +d0a3283378e4a3d4bfbef93831144734 ./autom4te.cache/traces.1 +5476c3fad77416b38f5e093009274b9f ./autom4te.cache/output.1 +5476c3fad77416b38f5e093009274b9f ./autom4te.cache/output.2 +5476c3fad77416b38f5e093009274b9f ./autom4te.cache/output.0 +fe7fbd3482f19bcb266265a3e90a2984 ./autom4te.cache/traces.2 +91dd5e1355d100dbdab7d71244ed2625 ./m4/ltversion.m4 +fcb132a1eec75f4e23d3f68c2c9522ca ./m4/ax_check_compiler_flags.m4 +36e6102321c85769fa9ef24d4478b7ff ./m4/ax_set_warning_flags.m4 +6eac793c85ebaba2e32713c7bd7722dc ./m4/ax_detect_git_head.m4 +2e0fe130c02ffb5fdf067a031abbe185 ./m4/ax_create_stdint_h.m4 +fe93d39c1d0429554bc88a3260641e54 ./m4/ax_gcc_x86_cpuid.m4 +23e6c706b531023ed97e97fc4cc03339 ./m4/ax_gcc_warn_unused_result.m4 +d22544df107d96eaa32e3dd53b8f56e2 ./m4/ax_compiler_vendor.m4 +47d420a13f9ba4e171772c3e3eee3e63 ./m4/lt~obsolete.m4 +4839228149cc1790b958c0a949b58386 ./m4/ax_cc_maxopt.m4 +16ac5681e44622f64e70a2da8a5a2009 ./m4/ax_gcc_archflag.m4 +4cb6e0797e8b8d0d0cb589507cc9a06e ./m4/libtool.m4 +b500d549c1efa9371f6bc7ebbbc8caf8 ./m4/ax_submodule.m4 +9558b0c44b561a0362294323220e8503 ./m4/ax_create_pkgconfig_info.m4 +67d5ebceaac562ddf0dde4e5cdffbe09 ./m4/ltoptions.m4 +bc2f6032c98896249eadb56177c7d357 ./m4/ltsugar.m4 +b454b26bc1756d05a2cf316f0fc4895c ./m4/ax_c___attribute__.m4 +3dab30434f3580bdecee4b55271530b5 ./polytope_scan.c +101c661080c71773ae89f894b7c080b1 ./isl_aff_private.h +7f2205770f7b51dd197d05863db713df ./isl_version.c +c4270748760d095a028de2c45fee1eaa ./polyhedron_sample.c +70d9b03819310177936f0f6cb5bbb68c ./isl_fold.c +4afffe1036f7952d97d925e9048e417e ./isl_ast_graft.c +edc65b5482bffcbe2644d492d6619f38 ./isl_bound.h +5c78b6f1cd8c6f9fe6841c31ef54c49a ./isl_arg.c +674c1b708be189b4bbb6057f5b92f221 ./isl_space_private.h +b27e9d938ee0db17076c8a62e28f939f ./isl_sample_piplib.c +5f72d5f666023498007ac6035f985530 ./pip_test.sh.in +6e5fe73723cd40a28adc5b7b5650c8d1 ./install-sh +2a8283883b97c3c5f0934b7ddf979dbf ./isl_point_private.h +aa19736538cbc95203230c1264bdc3e8 ./isl_deprecated.c +0ba88052a1dc5202649375d827e9f1f7 ./test-driver +bfd37fefc515ba3cf1148af7406d7a5d ./isl_schedule.c +1013044a6bc2f2db115e44b5299c24c0 ./isl_hash.c +dabd38c7463ded26c01c171c5a25cf6b ./Makefile.am +546ce060422261ea4b2bd9bc7b7ed77c ./isl_scan.c +21e09bf51917c9e82aa53dc0a0a61ace ./isl_printer.c +85fc7db7a19655f4a7693a84cfbfe16d ./isl_point.c +7678ba2fa230528b8ef936693766cb70 ./isl_dim_map.h +6644588be18d04f417c2911d2ccdded4 ./test_inputs/application2.omega +e97ee14dccaad98e391c89f667a82096 ./test_inputs/philippe3vars.pwqp +d0863bbf92d5a2a9bb0c7399e6d0bf5c ./test_inputs/neg.pwqp +bc3ea6198a980e8441ac36e255829d2d ./test_inputs/basicTestParameterPosNeg.pwqp +8a8ea58ef97ff1a7687dbd5313356265 ./test_inputs/codegen/separation_class2.in +7fe95ee18bc768a79ffb896eebfb0646 ./test_inputs/codegen/separate2.in +9420c985750c88f3ceedbb82f8938df9 ./test_inputs/codegen/stride6.in +d6819b2de4ef409581328e13fc995498 ./test_inputs/codegen/atomic4.in +51120b1ea51647054b1cae8da5e01ca6 ./test_inputs/codegen/shift2.c +a9da6ad41eba4247a125e0fe13a88278 ./test_inputs/codegen/separation_class3.in +5fe8eb390f2ce85590077cd547602254 ./test_inputs/codegen/separation_class.in +91012403f444e7ca2bcae1e31cda7f3d ./test_inputs/codegen/stride5.c +e146bfb819cd6220b7e4a2ae30d2b18f ./test_inputs/codegen/single_valued.c +232523233b2a7ff86703273d4809df5b ./test_inputs/codegen/hoist2.c +b7cd9faf968748b031dcb6e6cd7b8204 ./test_inputs/codegen/separate2.c +67d472c2bb2b87bebfc14fd65d402ea0 ./test_inputs/codegen/stride.c +fde7969c14624c57d37dfd0912c33937 ./test_inputs/codegen/unroll6.in +bbdab4d0e089e84d719a593b931e5d05 ./test_inputs/codegen/unroll.c +19eadc0e0572b7ec64f03fff9eb38ff5 ./test_inputs/codegen/atomic.in +02170b73f3be6cf67731acda6863cc45 ./test_inputs/codegen/disjuncts.in +00493d44956821b51f84ec7f17101963 ./test_inputs/codegen/mod.in +611a7fc882c9bd5d21ca5b71d5e1e85b ./test_inputs/codegen/separation_class3.c +e07e2aab954cce374df9fd7dfbf2d267 ./test_inputs/codegen/separate.c +942a5f59f5ccb06540e85731ffc6df77 ./test_inputs/codegen/dwt.c +a74c906b87dc87ce33f3083d68df9488 ./test_inputs/codegen/hoist.c +70ac1f6b093f5aaacd279682eaed05db ./test_inputs/codegen/atomic2.c +53e9a11f2c635086abdd14af13b8b6d6 ./test_inputs/codegen/unroll2.in +a246f24792f691e47a29a296196ec43b ./test_inputs/codegen/atomic3.c +cd8e010b9ab14baaa2d10beba6c566f2 ./test_inputs/codegen/atomic.c +240e03b2f69c670513021b0546b23d24 ./test_inputs/codegen/hoist2.in +c5db9101d6f221c1505ea048e4dc867e ./test_inputs/codegen/unroll6.c +3070e00c65ae8cf2ca204fd21c9d57de ./test_inputs/codegen/atomic2.in +7bc9d83033d37327ef289eb255dc30b8 ./test_inputs/codegen/shift_unroll.c +e7076eefb826845f27c0e4d9291053ed ./test_inputs/codegen/unroll4.c +b99ccea319b440fb69a80f077f6c9bf0 ./test_inputs/codegen/unroll3.in +28dfc2fb1b707f81958756f22c46c474 ./test_inputs/codegen/mod.c +8ca50d25793170d5512fdea6d49f7d2f ./test_inputs/codegen/shift2.in +d65cdc135e34892bbf50627d6a41ddf8 ./test_inputs/codegen/shift.c +e26233006d7a5afaf5d97923eb117e1a ./test_inputs/codegen/separation_class.c +ddf5c75e49bfd3c9c5700f8bc45bc4d7 ./test_inputs/codegen/hoist.in +ba22fb7522a984f0c475bdaa1859111e ./test_inputs/codegen/atomic3.in +a03464aa14d9710e09692d0fdca3d812 ./test_inputs/codegen/shift_unroll.in +5a9b84d6336b7087257d299b599ce2d3 ./test_inputs/codegen/pldi2012/figure8_b.c +37f506af8f5a5e3828575270b17a8e5f ./test_inputs/codegen/pldi2012/figure7_c.c +87a8321461e0a976e74764280df42e27 ./test_inputs/codegen/pldi2012/README +4d1dd1e1a96d61cdce60358da9b28c0b ./test_inputs/codegen/pldi2012/figure7_b.in +973a6b9c20fba13d1e58bcd05bf819b8 ./test_inputs/codegen/pldi2012/figure7_d.in +aedc342eecc273166d3aaf32d901e3c4 ./test_inputs/codegen/pldi2012/figure7_c.in +6feb63a74791ffbc19c464a5af263a44 ./test_inputs/codegen/pldi2012/figure8_a.c +a0eb0b5cb78f242966eb6f567e784976 ./test_inputs/codegen/pldi2012/figure7_d.c +fa1fc4278413c58046f13f6a5a6562ad ./test_inputs/codegen/pldi2012/figure8_a.in +7e90d68fb9381061f6db39d4a6e5abf8 ./test_inputs/codegen/pldi2012/figure7_b.c +a73c6a18b84f3ec917be135a209fd9f2 ./test_inputs/codegen/pldi2012/figure8_b.in +22ad762b0afd043e5e2d76a0419e1cc2 ./test_inputs/codegen/shift.in +e8dc63a942a11c0e72fa3f1894be6328 ./test_inputs/codegen/single_valued.in +a742c88219305cdf8b89c8e2cd6adfe4 ./test_inputs/codegen/dwt.in +67b1489a711c3cdd4c420095f924856b ./test_inputs/codegen/unroll4.in +027294e59bb02a5795b3dc86f94507d2 ./test_inputs/codegen/stride6.c +ea8e88103c1e38c012c2fbb1f9e734ab ./test_inputs/codegen/stride.in +47513d43f9513ec4f19841b8eec58d7f ./test_inputs/codegen/unroll2.c +c781780edc51a09e1b7b02cb911674a8 ./test_inputs/codegen/omega/lu_ijk-1.in +a80cd77f90cd58e98a4795c250c30642 ./test_inputs/codegen/omega/wak3-1.in +6b644728927980b2625a33f844369cae ./test_inputs/codegen/omega/lefur04-0.in +90c80ff52d9d61aebe85a41dd4d1893e ./test_inputs/codegen/omega/dagstuhl1-1.in +eb1b4d92529cc01f3423ec3926d2197c ./test_inputs/codegen/omega/basics-0.in +377867cb426c95691d939b0430609a39 ./test_inputs/codegen/omega/iter7-0.in +0f00e5f0409f4fb7656f295128f93e46 ./test_inputs/codegen/omega/fc2-1.c +c7d0c55d6ba7a63de5ae4ddc8a9f74d9 ./test_inputs/codegen/omega/lu_spmd-1.in +04c595d251882f7eaa8c85264db589a7 ./test_inputs/codegen/omega/stride1-0.in +17b4df4faeb3edbec6a6dccc10dae5c4 ./test_inputs/codegen/omega/m7-0.in +a958a33a166c4a66697dd9e4a6aa1ed1 ./test_inputs/codegen/omega/code_gen-1.c +184fcec0f4d287597cf6f18cdf255e09 ./test_inputs/codegen/omega/lefur03-0.c +acd7e26a3091268adad778dbe506afb9 ./test_inputs/codegen/omega/fc1-0.in +5b36f2aa6e3174a4c73ab1112ee6a23e ./test_inputs/codegen/omega/hpf-0.in +20b77c7f61da782eadedbe8022b0dc66 ./test_inputs/codegen/omega/stride6-0.c +91a5dfa82c4dab352e1f6e5e31aad8cd ./test_inputs/codegen/omega/wak3-0.in +b0a44d7b43f0ad63b4367aef5b11a863 ./test_inputs/codegen/omega/lift2-2.in +a95dfb969dbc891628a21a0110938c31 ./test_inputs/codegen/omega/wak2-0.c +cdd4aeb166d830cbd04ebb5284542dd5 ./test_inputs/codegen/omega/m10-0.c +52be200b5b9538752ea20d161af95eb2 ./test_inputs/codegen/omega/dagstuhl1-1.c +3232bd30c0bab6d13d2e6a116680807d ./test_inputs/codegen/omega/stride7-1.c +81be741f4c6eee452168c100f3a4f4ac ./test_inputs/codegen/omega/stride6-1.in +c7832b248ffc295b8794cb8928684d83 ./test_inputs/codegen/omega/iter9-0.c +acd7e26a3091268adad778dbe506afb9 ./test_inputs/codegen/omega/fc2-0.in +4895538c02081336ff3b087d5d761fd9 ./test_inputs/codegen/omega/wak3-0.c +5abe9b22975ad2e2bc33b96f5e32837e ./test_inputs/codegen/omega/m9-0.c +79c02328d53f731e4bcb18a9cec1d561 ./test_inputs/codegen/omega/stride5-0.in +92c2a2c7f9e5308fc4550070c726cb74 ./test_inputs/codegen/omega/floor_bound-0.c +eebbc457f27b18a4080996599c596d0c ./test_inputs/codegen/omega/p.delft2-0.in +e3fa6fe7e6affc8fdd35e6b7e42ec57c ./test_inputs/codegen/omega/m10-0.in +698f2fba5278e0c5ec94b5c233aeffad ./test_inputs/codegen/omega/substitution-1.c +37f506af8f5a5e3828575270b17a8e5f ./test_inputs/codegen/omega/if_then-2.c +7ba0c52d71366ca9cb740c2ce0a55778 ./test_inputs/codegen/omega/lu_ijk-1.c +562ae85fc4315bc164585a40bb2f2ef8 ./test_inputs/codegen/omega/stride3-0.c +ef979c3a6602006d4d47da3723481543 ./test_inputs/codegen/omega/if_then-0.in +eb1b4d92529cc01f3423ec3926d2197c ./test_inputs/codegen/omega/p6-0.in +837015659c742cb9ef2c4e0245848a36 ./test_inputs/codegen/omega/ts1d-orig0-0.in +7f22b830d2784c36f3b1be1c99401c06 ./test_inputs/codegen/omega/m1-0.c +230fdd1603a30164175abdb66ef7ad7e ./test_inputs/codegen/omega/p6-0.c +fe131adc8d24752ed9c5cfcabe0c83a9 ./test_inputs/codegen/omega/dagstuhl1-0.c +58bdd8fafe3a1bc37b932c60ddc5b033 ./test_inputs/codegen/omega/olda-0.in +c056fb5866c36b500e1d4c4633a4aa79 ./test_inputs/codegen/omega/chosol-1.c +02c4ff112981ff964c4c6b0a1b09657a ./test_inputs/codegen/omega/p.delft-0.c +89573c24beba8a46a27ddf0b37257d29 ./test_inputs/codegen/omega/ts1d-check-sblock-0.in +1197cdd77a22b295bc1657684ff76c7a ./test_inputs/codegen/omega/iter3-0.in +b0163afae4e2e450aec389321e5089d9 ./test_inputs/codegen/omega/iter7-0.c +b9cf1fab9fdff553cea9893f8b30f1d3 ./test_inputs/codegen/omega/substitution-2.in +7083f865f19e0e842c1e01169cc9a244 ./test_inputs/codegen/omega/iter4-0.in +82c850793604225df7120bdbffe7f838 ./test_inputs/codegen/omega/lu-3.c +228aed9c710847cf689a0fb936780a7f ./test_inputs/codegen/omega/iter5-0.in +897398c54f35ea9d7a120f05d0dd2fa1 ./test_inputs/codegen/omega/wak2-0.in +c056fb5866c36b500e1d4c4633a4aa79 ./test_inputs/codegen/omega/chosol-0.c +aace395985f0aa32c66ceca472e57355 ./test_inputs/codegen/omega/README +0f7ed11cea521e6c590e619907571162 ./test_inputs/codegen/omega/syr2k-3.in +cf83e2b7249e0d58dcde62785fb6a0b6 ./test_inputs/codegen/omega/p.delft2-0.c +85f20992759b5ece7583c572d02c1a0e ./test_inputs/codegen/omega/iter6-0.c +372a4af3efdd7eb440c4f1ed1dcab750 ./test_inputs/codegen/omega/floor_bound-4.in +982c95381c3a76b348f27b31c24b3e01 ./test_inputs/codegen/omega/chosol-0.in +fcc0701bb4824c04cd52c78b9699d772 ./test_inputs/codegen/omega/lefur01-1.c +1dd615420a5ddfa0f476cb6aebe81e13 ./test_inputs/codegen/omega/m9-0.in +1c2093790dd2949c2b17b1bb89547809 ./test_inputs/codegen/omega/m3-0.in +6a0babb278a1d51fcb9f3956042b40d1 ./test_inputs/codegen/omega/m7-0.c +63c4b10d46c85f59f642db325f7a8529 ./test_inputs/codegen/omega/m7-1.in +0f623214f01c6c5b29782816ec198d33 ./test_inputs/codegen/omega/iter2-0.c +8a7f8cc63b50dd8e9bc97bb2854a8d09 ./test_inputs/codegen/omega/m12-1.in +333e8937b4b965fcfacaa9642ccf9dc2 ./test_inputs/codegen/omega/guard1-1.c +c4e8728b65ceb90246be9277e691b2fc ./test_inputs/codegen/omega/if_then-5.in +e16b8aac84b5f8edf4f5ce2322fc2a39 ./test_inputs/codegen/omega/ts1d-mp-i_ts-m_b-0.in +c7aa27ca2ebca44f7b0313e0d8f7ae9f ./test_inputs/codegen/omega/guard1-0.in +4e8ab0802e9990cda6046977b9611358 ./test_inputs/codegen/omega/iter6-1.c +7e90d68fb9381061f6db39d4a6e5abf8 ./test_inputs/codegen/omega/if_then-1.c +ee98793eb1bede43b128b6c53fa53c7b ./test_inputs/codegen/omega/stride7-0.c +4da5018d6dce4be69ba0e207ac8aae61 ./test_inputs/codegen/omega/floor_bound-2.in +0f7ed11cea521e6c590e619907571162 ./test_inputs/codegen/omega/syr2k-1.in +7320bc8a4bd1ee76a25ac333730069cf ./test_inputs/codegen/omega/lefur00-0.in +29175d6b71ad41f59e59a8d2548d364d ./test_inputs/codegen/omega/lift1-5.c +55e796d935193970dd86cc77b140c8a3 ./test_inputs/codegen/omega/fc1-1.in +54cb3de23ccecadfabdd5485b79165c2 ./test_inputs/codegen/omega/lift2-4.c +1c2093790dd2949c2b17b1bb89547809 ./test_inputs/codegen/omega/basics-1.in +64f1075e7670ab5e038cb7b8b63a7d81 ./test_inputs/codegen/omega/m9-1.in +7f8a88e638fb2521a3ffeb2a015b2fa1 ./test_inputs/codegen/omega/floor_bound-2.c +d50368f84dda08f7d0d2e09916fc8e08 ./test_inputs/codegen/omega/lift1-1.c +12225bda2a6012fc3917d7e87119ad98 ./test_inputs/codegen/omega/lift1-3.c +b4b3783cee4aa29e6a47cf16f7703d55 ./test_inputs/codegen/omega/iter3-0.c +82004cd05074ee36def30084a3fcfa47 ./test_inputs/codegen/omega/stride3-0.in +c9d3a6bf9e11e80cdd238013a1749a07 ./test_inputs/codegen/omega/substitution-4.c +7d8bef10f64ba1a7ee5ca54dbdec5697 ./test_inputs/codegen/omega/x-1.in +26f8d061589d67c1acf4c39cb4ddb771 ./test_inputs/codegen/omega/m12-1.c +02c4ff112981ff964c4c6b0a1b09657a ./test_inputs/codegen/omega/hpf-0.c +a7c8f7f994f0d3e324167d8c388d5c7e ./test_inputs/codegen/omega/m8-1.in +bc8c808c7bcd67aee9ff20a6c877bc51 ./test_inputs/codegen/omega/iter2-0.in +df2165b3622e891789b5614a760ea97b ./test_inputs/codegen/omega/floor_bound-1.c +611057fb9d624c6550aef522cd86f72a ./test_inputs/codegen/omega/lift2-1.in +da76a8707e33c1aa8b032f6f37f3c634 ./test_inputs/codegen/omega/gist-2.in +d9b1e12623ece7d847c3d773dc64ba9a ./test_inputs/codegen/omega/stride7-1.in +28cfd29665b53c4a58da513405f430ab ./test_inputs/codegen/omega/floor_bound-3.in +ef3536a5acbc5505d8e8c99318574fb9 ./test_inputs/codegen/omega/m7-1.c +fcb94247bd9d4f1f406f4e205fb0c54c ./test_inputs/codegen/omega/wak3-1.c +69def64736dd8f3bec963c8754ee521c ./test_inputs/codegen/omega/wak1-1.in +3909f9f6375549bd83e4b5cf021bcdb9 ./test_inputs/codegen/omega/ts1d-check-sblock-0.c +14c56e8e331e889c3ec9fd4efaf51787 ./test_inputs/codegen/omega/lu-0.c +bc18c114705ca4d6428e34f702d70a79 ./test_inputs/codegen/omega/iter1-0.c +32065e48dfeabfa16eb5c64f1f424660 ./test_inputs/codegen/omega/m3-0.c +2baaac6191efad95803678b03da15b3e ./test_inputs/codegen/omega/floor_bound-4.c +449ecbba06d4c3b2023296f118f95e75 ./test_inputs/codegen/omega/lift2-0.in +c8e73cae1596069aa097a46a1d93e2d8 ./test_inputs/codegen/omega/m2-1.in +a901f20e641abc144fc8389c9e1ced44 ./test_inputs/codegen/omega/ge-0.c +0f00e5f0409f4fb7656f295128f93e46 ./test_inputs/codegen/omega/fc1-1.c +4cc58bb05c645552be9722725525a522 ./test_inputs/codegen/omega/ge-1.in +7320bc8a4bd1ee76a25ac333730069cf ./test_inputs/codegen/omega/lefur01-0.in +9169c781a8093884afdfce7c462950e8 ./test_inputs/codegen/omega/m12-0.c +800526458f8ee79b3e01adb14150a7e3 ./test_inputs/codegen/omega/iter5-0.c +c25a76a6ccf6928506052ca0535ab8e5 ./test_inputs/codegen/omega/lift2-3.c +7ba754d7e8c61fc908c25d3d02eb3324 ./test_inputs/codegen/omega/gc-0.c +05d239d4042f28244ddf1a6494774f92 ./test_inputs/codegen/omega/gist-5.c +69681f1af189a32aae7b06c79c01caf6 ./test_inputs/codegen/omega/m11-0.c +5abe9b22975ad2e2bc33b96f5e32837e ./test_inputs/codegen/omega/m9-1.c +01b0da684ba46c096453393eeb97bdad ./test_inputs/codegen/omega/x-0.c +7dc83835470cd5e1c01be3cce2faf13c ./test_inputs/codegen/omega/m4-1.in +2e867c447b50d83f020b972bcddf0171 ./test_inputs/codegen/omega/wak4-1.c +1e67fa3045fad4b8c896249f75b81344 ./test_inputs/codegen/omega/wak2-1.in +1f0801a7b36078815f2e18d3a04627d0 ./test_inputs/codegen/omega/syr2k-2.c +6b4750955bc53f25259c2a85cf05ff08 ./test_inputs/codegen/omega/m8-0.c +5bf08a1069739cbe77c1b5220adaf821 ./test_inputs/codegen/omega/olda-1.c +6c84f9ca665bcebb9a3438d4ba2a9c1f ./test_inputs/codegen/omega/syr2k-0.in +5b9214196aa62e6827b82fbb2602d207 ./test_inputs/codegen/omega/lift1-4.in +01f214f7fdaf47d73642db585522656f ./test_inputs/codegen/omega/wak4-1.in +29db37879da2d5f803905ca260edfe54 ./test_inputs/codegen/omega/m1-1.c +e8e2de2dcba5c2f4372b8562c3c1493e ./test_inputs/codegen/omega/if_then-4.c +7829a194432a0016c99dadf62a05ccca ./test_inputs/codegen/omega/dagstuhl1-0.in +fba6f8622dc06bae1bc9b35d1a6dfce1 ./test_inputs/codegen/omega/gc-0.in +082eb23b3ee886ad64f25475f0f56965 ./test_inputs/codegen/omega/syr2k-3.c +8ee51cd408fd9ca9867dcd0a10bf7ce3 ./test_inputs/codegen/omega/p.delft-0.in +0606a483e9b222ef1a8c717c9d366ce9 ./test_inputs/codegen/omega/lift2-5.in +dd01536bd1247acc50c5d9d844c14bea ./test_inputs/codegen/omega/gist-3.in +e3749bea5bd0d8f0340ca2e3d55ccb55 ./test_inputs/codegen/omega/lu-3.in +d0f46270a36621255fbdb14e3e692247 ./test_inputs/codegen/omega/m12-0.in +e2af18f4e5180679864c2e4c83554213 ./test_inputs/codegen/omega/gist-5.in +34cb234466db0d70fe0ed996413f7533 ./test_inputs/codegen/omega/lu_spmd-0.c +37b09f5affa64c3a12767ef7dd13a517 ./test_inputs/codegen/omega/floor_bound-5.c +a79db9f0ad524607b056fcfc0c807280 ./test_inputs/codegen/omega/wak1-1.c +350511c263d8934124d57d9ba049fa13 ./test_inputs/codegen/omega/lift2-1.c +7ba0c52d71366ca9cb740c2ce0a55778 ./test_inputs/codegen/omega/lu_ijk-0.c +ed776665bea219854f087a663689dfb5 ./test_inputs/codegen/omega/fc1-0.c +67f8d1445b5042410a51d10c06405989 ./test_inputs/codegen/omega/lu-2.in +7d8bef10f64ba1a7ee5ca54dbdec5697 ./test_inputs/codegen/omega/x-0.in +b390d502e0ae0a550a96f4892bf9e52b ./test_inputs/codegen/omega/gist-2.c +2b8fe7b076780bfdc3ccc78326de9e29 ./test_inputs/codegen/omega/m10-1.c +434773b76631d029260461cfeed54978 ./test_inputs/codegen/omega/stride4-0.in +6c84f9ca665bcebb9a3438d4ba2a9c1f ./test_inputs/codegen/omega/syr2k-2.in +63f10115ea373321e13d9a86a26e5d14 ./test_inputs/codegen/omega/stride5-0.c +6421bec1258a5280396bc0582011df12 ./test_inputs/codegen/omega/stride4-0.c +81be741f4c6eee452168c100f3a4f4ac ./test_inputs/codegen/omega/stride6-2.in +88e5d46871928637eddfb25f82791bcb ./test_inputs/codegen/omega/stride2-0.c +14c56e8e331e889c3ec9fd4efaf51787 ./test_inputs/codegen/omega/lu-2.c +a901f20e641abc144fc8389c9e1ced44 ./test_inputs/codegen/omega/ge-1.c +c2e18044b3517198389a9d4f3c6b1db0 ./test_inputs/codegen/omega/substitution-3.c +4097b5b715e79be371a47de5a3d4e7ef ./test_inputs/codegen/omega/fc1-2.in +c64e05124d32dee630c2eb5647ed3b12 ./test_inputs/codegen/omega/floor_bound-1.in +735f4d2ca33aff465a2a3d39a67c8231 ./test_inputs/codegen/omega/lefur04-0.c +39a04487aff4f06ba5218ea56afb6b5f ./test_inputs/codegen/omega/stride6-1.c +e9733c6122862e99bf3296074200897d ./test_inputs/codegen/omega/m1-0.in +7aeb88856d9d8b00f4b59b376eaf8ec7 ./test_inputs/codegen/omega/iter1-0.in +2e867c447b50d83f020b972bcddf0171 ./test_inputs/codegen/omega/wak4-0.c +99943b13e7e1c034fde72155a5eaa805 ./test_inputs/codegen/omega/ts1d-orig0-0.c +48cb62db61c182f0201ae31ff3a5f3f2 ./test_inputs/codegen/omega/guard1-1.in +65da1ec683e160909add125c787bfc97 ./test_inputs/codegen/omega/lefur00-0.c +dd16d11827596228b1bab2d23c529b38 ./test_inputs/codegen/omega/stride6-0.in +95bc74ef5ee5e7c576a70c29848d4770 ./test_inputs/codegen/omega/gist-1.in +d7f938c2bbea00de27dcfdd46d8a6801 ./test_inputs/codegen/omega/substitution-0.c +914bbea377169b7422958ee66a3edbca ./test_inputs/codegen/omega/code_gen-2.in +230fdd1603a30164175abdb66ef7ad7e ./test_inputs/codegen/omega/basics-0.c +08d1ed5a8987d854d64854383024b5d5 ./test_inputs/codegen/omega/floor_bound-0.in +e72eb9c17f13896afa2061ef7054d23b ./test_inputs/codegen/omega/gist-4.c +ede8b17849b454caf135cd6a687bad93 ./test_inputs/codegen/omega/iter6-0.in +1bef97fc6a5012588386ba354d4681c1 ./test_inputs/codegen/omega/m2-1.c +ba06f694641baf9d41feb890377d95d6 ./test_inputs/codegen/omega/lu_ijk-2.c +55e796d935193970dd86cc77b140c8a3 ./test_inputs/codegen/omega/fc2-1.in +e9e0b33729c3b3be7d63db23cb99b940 ./test_inputs/codegen/omega/ge-0.in +32c3645bba3108aac00f4bbd33d3f0c3 ./test_inputs/codegen/omega/lift1-5.in +bbdafed93f1ccccf2b3037db4c0c604f ./test_inputs/codegen/omega/iter8-0.c +285c607aed03cb6499256aec548d769c ./test_inputs/codegen/omega/if_then-2.in +b839b869a2f6bac00381c21de1c06373 ./test_inputs/codegen/omega/substitution-4.in +a0eb0b5cb78f242966eb6f567e784976 ./test_inputs/codegen/omega/if_then-3.c +39a04487aff4f06ba5218ea56afb6b5f ./test_inputs/codegen/omega/stride6-2.c +14c56e8e331e889c3ec9fd4efaf51787 ./test_inputs/codegen/omega/lu-1.c +9cf5bab507ac73355e50fa96c81050ee ./test_inputs/codegen/omega/substitution-1.in +da1daee4c83df0c62081d60baea8e1df ./test_inputs/codegen/omega/lu-1.in +b2b1ce04875c2e98b785c7316ae5e62b ./test_inputs/codegen/omega/chosol-1.in +148844f79ce4d3f4fefecff8b6a20ac7 ./test_inputs/codegen/omega/lu_ijk-0.in +65da1ec683e160909add125c787bfc97 ./test_inputs/codegen/omega/lefur01-0.c +8a15a718e93d0af88c2eb3c01bb87f42 ./test_inputs/codegen/omega/stride2-0.in +0f00e5f0409f4fb7656f295128f93e46 ./test_inputs/codegen/omega/fc1-2.c +c890cc16640a81c451c25fcffa615e50 ./test_inputs/codegen/omega/wak2-1.c +5abe9b22975ad2e2bc33b96f5e32837e ./test_inputs/codegen/omega/m4-1.c +52827a19fdcb3c3f8f377120167d5be8 ./test_inputs/codegen/omega/iter8-0.in +1a7a8766cdfd955b876d00d6d09bc2c9 ./test_inputs/codegen/omega/floor_bound-5.in +b180ba7041c20812663fc5dd8bfb1b81 ./test_inputs/codegen/omega/floor_bound-3.c +e2d710b1eb00e8432cc4b2ea50bd94d6 ./test_inputs/codegen/omega/lu_spmd-0.in +70fa9426f9bb7594c1f522181376219f ./test_inputs/codegen/omega/iter4-0.c +86ede3c53344f7bc9102927aa21428d6 ./test_inputs/codegen/omega/lu_ijk-2.in +ebaa4a6cc13240f8f990b25bf2f9b7af ./test_inputs/codegen/omega/gist-1.c +cbe1d7a078245836dc52cae2f6864ef2 ./test_inputs/codegen/omega/gist-4.in +713e985aca464a5d1d7f3e6cb9b19d58 ./test_inputs/codegen/omega/substitution-2.c +315627eec221f817af8ed5aaa48d5f3f ./test_inputs/codegen/omega/guard1-0.c +01b0da684ba46c096453393eeb97bdad ./test_inputs/codegen/omega/x-1.c +47ab37ecabc12821c8a2a0ea885f6c9b ./test_inputs/codegen/omega/m2-0.in +f4b90d6d676673af57669563e92394e3 ./test_inputs/codegen/omega/code_gen-1.in +e8e2de2dcba5c2f4372b8562c3c1493e ./test_inputs/codegen/omega/if_then-5.c +f593c00b48c74a4da23cba6fb4a61050 ./test_inputs/codegen/omega/collard-0.c +672c71b40a119d34460e082eac018b78 ./test_inputs/codegen/omega/gist-3.c +a12c9a4bde144b80b5b594812f76bfbb ./test_inputs/codegen/omega/code_gen-0.in +65c93fde9c53788925fbda181ca06f45 ./test_inputs/codegen/omega/iter9-0.in +32065e48dfeabfa16eb5c64f1f424660 ./test_inputs/codegen/omega/basics-1.c +1f0801a7b36078815f2e18d3a04627d0 ./test_inputs/codegen/omega/syr2k-0.c +bfd0abcec8db5c646387da5c908c1aeb ./test_inputs/codegen/omega/lift1-3.in +6feb63a74791ffbc19c464a5af263a44 ./test_inputs/codegen/omega/gist-0.c +de97ef08c5acfca0692bb2d1ae754319 ./test_inputs/codegen/omega/lift1-1.in +c57b889cb9d0c2e044fcfe822fd595c4 ./test_inputs/codegen/omega/floor_bound-6.c +dd88e665c4a3126bade7e8c9d4360815 ./test_inputs/codegen/omega/m8-1.c +1bb689c1f964a751355d4d7f5f87cdf6 ./test_inputs/codegen/omega/ts1d-check0-0.in +c60fbfb273b408f7c326a317257511ed ./test_inputs/codegen/omega/substitution-3.in +2260eebe2b5996c646ee689951c2c345 ./test_inputs/codegen/omega/m1-1.in +e314e913ee567b9a6fcbae90775ec591 ./test_inputs/codegen/omega/if_then-0.c +9a7597e49b623a7a5d9335778430a6f6 ./test_inputs/codegen/omega/lift2-2.c +88eea6da74fe40ea02ef1d4d22a5f84d ./test_inputs/codegen/omega/m11-0.in +70de35226b27a8d97d7c3a04b8e840d1 ./test_inputs/codegen/omega/iter6-1.in +7dd0cafcd9919b4b223b933293ab56fe ./test_inputs/codegen/omega/lift1-0.c +0ff1f434a994d753dab9d0107e6b4344 ./test_inputs/codegen/omega/substitution-0.in +1c2093790dd2949c2b17b1bb89547809 ./test_inputs/codegen/omega/p6-1.in +411d20ccce31745897678e19467af395 ./test_inputs/codegen/omega/stride7-0.in +75534063fdc9cc12522d4bc7edfab88f ./test_inputs/codegen/omega/lift1-4.c +51339d4a0a42b4784a8932cf2cd50303 ./test_inputs/codegen/omega/if_then-4.in +e6a7f88bf9228619e4e86cefed3f45e8 ./test_inputs/codegen/omega/ts1d-check0-0.c +e2da3009de781dedbdeeb84ad9c07d0c ./test_inputs/codegen/omega/m10-1.in +bd9547e41a4c7514aa0027ddd3cc2dc7 ./test_inputs/codegen/omega/code_gen-0.c +267450db952b66e8cfe5a1a51d1bd2db ./test_inputs/codegen/omega/m8-0.in +a4d4c27d25cde1bc5582123492cf9fdc ./test_inputs/codegen/omega/m4-0.in +353dcb24d8bb9f787d2b298a4749977d ./test_inputs/codegen/omega/olda-0.c +8c8406d04be12b143b47da391fb8ae63 ./test_inputs/codegen/omega/lift1-0.in +7f4184bf00ff163f022dfd04e4bc1035 ./test_inputs/codegen/omega/olda-1.in +83d1247cd0dac2174561842bcbf58bac ./test_inputs/codegen/omega/ts1d-mp-i_ts-m_b-0.c +9a104272e5c11dd105d02bce36c4222b ./test_inputs/codegen/omega/lift2-5.c +c70884777261591669e1841b3a9b1b7a ./test_inputs/codegen/omega/lift1-2.c +b2c1b915c5667acdafab6fe0c0ba04f4 ./test_inputs/codegen/omega/lefur01-1.in +f7bdd4a664a21811908bc0e404f5b4cd ./test_inputs/codegen/omega/if_then-3.in +9e96479726ca7dba3def6456557e4070 ./test_inputs/codegen/omega/if_then-1.in +69fb08b48d4b30a0a9897f6e3920f3dc ./test_inputs/codegen/omega/lift2-3.in +4e0479d2d8d98bf7580a563ce8037b84 ./test_inputs/codegen/omega/m2-0.c +9fdc90050d1bec30a68ec0c446416244 ./test_inputs/codegen/omega/collard-0.in +cb36da59e4431c68e01c84b722e0a0d1 ./test_inputs/codegen/omega/floor_bound-6.in +34cb234466db0d70fe0ed996413f7533 ./test_inputs/codegen/omega/lu_spmd-1.c +f3da1794adbe62ce337fc2c2d46abead ./test_inputs/codegen/omega/gist-0.in +71f3ae0e51885986c712ea135c6c0337 ./test_inputs/codegen/omega/wak1-0.c +dba48730751beb92149a30e3fe4489a0 ./test_inputs/codegen/omega/code_gen-2.c +5abe9b22975ad2e2bc33b96f5e32837e ./test_inputs/codegen/omega/m4-0.c +32065e48dfeabfa16eb5c64f1f424660 ./test_inputs/codegen/omega/p6-1.c +082eb23b3ee886ad64f25475f0f56965 ./test_inputs/codegen/omega/syr2k-1.c +2ab9d75c8c5f18da9de9c730306c219a ./test_inputs/codegen/omega/lu-0.in +86c114ae106f89cff818cce99009af42 ./test_inputs/codegen/omega/lift2-4.in +c4cd06f5930f31e5c45a30b6f049cec8 ./test_inputs/codegen/omega/wak1-0.in +ed776665bea219854f087a663689dfb5 ./test_inputs/codegen/omega/fc2-0.c +4a7faa437d26723c0e015f7342d48a13 ./test_inputs/codegen/omega/stride1-0.c +bc2d9088a42d8f8b89bd9a8f23d40c99 ./test_inputs/codegen/omega/lift2-0.c +3d77eedf9f86edb0379eb1d956ddea9e ./test_inputs/codegen/omega/lefur03-0.in +cf4eb1c47a385d7ffa133b7647b3f145 ./test_inputs/codegen/omega/wak4-0.in +ba78da065083ac2913cd0f4ba7f17b0c ./test_inputs/codegen/omega/lift1-2.in +92e6a40c22c09b172cf6d4d70fcc6414 ./test_inputs/codegen/unroll3.c +54fb54084149cd95790c91f2b8f49aa3 ./test_inputs/codegen/separation_class2.c +6eaa6fca5a5256ca6371a71ee90172b9 ./test_inputs/codegen/cloog/block3.in +8730b9ca5ca4b996b4f5a6978d300d6e ./test_inputs/codegen/cloog/walters.c +96e6a16d5b1e9b79717e549ee566fe81 ./test_inputs/codegen/cloog/christian.c +d49c6b7ca54a903cfe248b61182c8b72 ./test_inputs/codegen/cloog/constant.c +312b5280ae4b914b8f03025f0698048e ./test_inputs/codegen/cloog/reservoir-mg-interp.c +801d62b41df8269b678d3c461cd6b50f ./test_inputs/codegen/cloog/reservoir-pingali1.c +3c6529d8aba738f676112fdff77c1de6 ./test_inputs/codegen/cloog/test.c +a4d782d6a7d0b3d1ed44203cc557236c ./test_inputs/codegen/cloog/vivien2.c +fd43b392cbdd91ccbbca6f52a2838143 ./test_inputs/codegen/cloog/mod2.c +6ab73575e1f2e81d2ae310db947d34ab ./test_inputs/codegen/cloog/basic-bounds-5.in +a4c2d2de5e73cb55db8aa6e649b3dc70 ./test_inputs/codegen/cloog/rectangle.c +89fa4731956bfedda5f9ed83b3e64a35 ./test_inputs/codegen/cloog/min-1-1.c +609bdfb2d050de3c7268e67b5e6999cf ./test_inputs/codegen/cloog/4-param.c +a8dce515c191bee60a3996551246a361 ./test_inputs/codegen/cloog/vivien.in +2972058254af0c76d21485a7cf13eb63 ./test_inputs/codegen/cloog/singleton.c +f9d9e4061b74f10e367557b783e52fa1 ./test_inputs/codegen/cloog/merge.in +b8bb13a3d48aa6db6515afb89daf6753 ./test_inputs/codegen/cloog/dot.c +066f011f426acb011a1ccde501d164c5 ./test_inputs/codegen/cloog/reservoir-mg-rprj3.c +5b385da1ed4e37325c9efe7c3590b982 ./test_inputs/codegen/cloog/union.c +f9d98d498aedbae740897c10d20464f8 ./test_inputs/codegen/cloog/reservoir-mg-interp.in +58373fec97430c5041cc2a8f579db499 ./test_inputs/codegen/cloog/reservoir-mg-interp2.in +9badd33c77b478ec2fbf5c3b34357a5c ./test_inputs/codegen/cloog/dot.in +0e420a5af663dc22ea89421a407d4a77 ./test_inputs/codegen/cloog/min-4-1.in +f4e6f6f9f3b26ffb37085a34b37e8abe ./test_inputs/codegen/cloog/stride2.c +d16f6009912d9898cc16b30b1508a885 ./test_inputs/codegen/cloog/gesced.c +f96eb190e382438a3eeca6ad92d89bb2 ./test_inputs/codegen/cloog/swim.in +a81aaa9562a4967f82aa5845c8eaebd1 ./test_inputs/codegen/cloog/reservoir-stride.in +3936b9d9a992bccb685f56ab95c67eca ./test_inputs/codegen/cloog/reservoir-loechner4.in +60527787a60cabca8bfaddfd6be5823a ./test_inputs/codegen/cloog/constbound.c +171a6dae4269b47b326683e0c0f1346a ./test_inputs/codegen/cloog/stride.c +402ea456f27c8b35a779ecf9a7ec6cef ./test_inputs/codegen/cloog/reservoir-lim-lam3.in +98a66a01505e508d27d964a27605f19d ./test_inputs/codegen/cloog/emploi.in +af8968cb34c8d55e5297a75498d78477 ./test_inputs/codegen/cloog/reservoir-liu-zhuge1.c +f76e6c58efc4b132404b3462fec3fa53 ./test_inputs/codegen/cloog/4-param.in +84e2cac6083adeab76af61c0ee372ad4 ./test_inputs/codegen/cloog/largeur.c +893232f3ecfd9b34c5fdbffa82796593 ./test_inputs/codegen/cloog/reservoir-pingali4.c +22ab0dfa531117f16e17021e7c31a3a0 ./test_inputs/codegen/cloog/unroll.c +5f14c566685b8e6456aa4fe9120fbab5 ./test_inputs/codegen/cloog/basic-bounds-2.c +4aa4e08533d5cacedd26488c5bbf3c58 ./test_inputs/codegen/cloog/cholesky2.c +fb75e2d08846519eef295df9b61229d4 ./test_inputs/codegen/cloog/min-1-1.in +76a828045fe25dcd19581d93b7d4906b ./test_inputs/codegen/cloog/reservoir-lim-lam6.c +4f862e2e5ff5b07f4cab73ea3891fcaa ./test_inputs/codegen/cloog/esced.c +50535abd9eb91e2d794d2ea6640db737 ./test_inputs/codegen/cloog/classen.in +871f3de8acfdb4b4e00bdc919e82684b ./test_inputs/codegen/cloog/iftest.in +ca32b8be27b434fb15c4192d54575477 ./test_inputs/codegen/cloog/nul_basic2.c +e2cd3b83da1df0adef6d14fd2eb1b70f ./test_inputs/codegen/cloog/durbin_e_s.c +540787f80c2deded6560c7cb5c01e92a ./test_inputs/codegen/cloog/lex.in +f4756d1e584002f2bd49c0ba16671475 ./test_inputs/codegen/cloog/youcefn.in +832287077d91d944026780209649cef6 ./test_inputs/codegen/cloog/min-2-1.c +c3a79d088d2f656adefae0be0199c305 ./test_inputs/codegen/cloog/pouchet.c +19680becbe0f938e662415941bf6504d ./test_inputs/codegen/cloog/yosr2.c +cffe58d1fddfcaef7309964959b38f22 ./test_inputs/codegen/cloog/wavefront.in +587f8dcec54f80da7694e51ab5728860 ./test_inputs/codegen/cloog/lu.c +74187389bc4ea79b5f74494eff7314ed ./test_inputs/codegen/cloog/reservoir-mg-interp2.c +ad0d0b04c6219cba4bdeae1e18d96449 ./test_inputs/codegen/cloog/byu98-1-2-3.in +482472cc991363fd2658190fcf0741b2 ./test_inputs/codegen/cloog/largeur.in +74603e681190fa20958baceab56c4bdb ./test_inputs/codegen/cloog/0D-1.in +5f32ed990386c211e9954b2054a27bb4 ./test_inputs/codegen/cloog/reservoir-tang-xue1.in +71bcbc67d3a616a3bde2c5e1b32096bc ./test_inputs/codegen/cloog/swim.c +9944668ffb4a8ffad9e9d9af27480622 ./test_inputs/codegen/cloog/reservoir-mg-rprj3.in +8c646a3f0ad6666d3f52530d37c5a25d ./test_inputs/codegen/cloog/mod.in +dccc91d51d37ddf1b1274c60834cfe13 ./test_inputs/codegen/cloog/reservoir-jacobi3.in +906c97b8df83aada3864ef49aec76203 ./test_inputs/codegen/cloog/mxm-shared.in +ea0091482e03e758306a4787504c3eac ./test_inputs/codegen/cloog/reservoir-mg-psinv.c +ccf666ec333c0f9e4b7b6f56b3fd0f0c ./test_inputs/codegen/cloog/1point-2.c +f9581508a0dd4353642f98a936a60086 ./test_inputs/codegen/cloog/reservoir-pingali6.c +3d2a4b8cbfc053a3a4bd2bdc8a79b7e3 ./test_inputs/codegen/cloog/reservoir-loechner5.in +17dcf42681a759e0a9a6e1e0378e372f ./test_inputs/codegen/cloog/README +62e06d6c90fc673d9b18c07459d5bea7 ./test_inputs/codegen/cloog/forwardsub-2-1-2-3.in +c84d0e0bb4d99a0d71f57454df48c783 ./test_inputs/codegen/cloog/cholesky.c +cab6f3747942bf419e8efc94cb15165e ./test_inputs/codegen/cloog/logopar.in +c3bafb2f3ec88da20f56eaa14dbc0f97 ./test_inputs/codegen/cloog/0D-2.in +1b8398ae221895156b4ce51183425682 ./test_inputs/codegen/cloog/yosr.c +567454cb16f59ca0e3e624c6194f106a ./test_inputs/codegen/cloog/reservoir-stride2.c +2857c9e7ff01ee35005e2167ace444d2 ./test_inputs/codegen/cloog/param-split.c +f7ccd191a231b3fbe868ac70fae8ba1d ./test_inputs/codegen/cloog/gauss.in +fab58b45ca475b86d96b21f838065ddf ./test_inputs/codegen/cloog/equality.in +b39305241563be3eb1313b29757364f8 ./test_inputs/codegen/cloog/otl.c +fa9b05bc904a3f0e90178e78f5622379 ./test_inputs/codegen/cloog/darte.c +b496acb778d60bad52e83e744968fed2 ./test_inputs/codegen/cloog/reservoir-loechner4.c +a4cecc2e1b7c6c14771a520e29bfe0f3 ./test_inputs/codegen/cloog/reservoir-fusion1.in +4e1aa8b5a4b52fe764a03555ed742805 ./test_inputs/codegen/cloog/byu98-1-2-3.c +79b23ffa973a1e788684752989d7e4c1 ./test_inputs/codegen/cloog/mxm-shared.c +ed1887ba2e834de6e710335d68c175e4 ./test_inputs/codegen/cloog/dealII.in +cebe37ee71834c63b0a0d8a886e4c521 ./test_inputs/codegen/cloog/dot2.in +d135a6c26da0d4f78e6f3f57c3b76b73 ./test_inputs/codegen/cloog/tiling.c +c32fbef2640f5dc4fd91fa86c2d811bb ./test_inputs/codegen/cloog/block2.c +c0146ded226f3de4600daadf02480907 ./test_inputs/codegen/cloog/jacobi-shared.in +fd505a30367da04bf088955ccf812df1 ./test_inputs/codegen/cloog/classen2.c +be3ed11675da1e6b849f62dbfbc82c68 ./test_inputs/codegen/cloog/lu2.in +ae24c2caf7ccd23b46670e36ed656ff8 ./test_inputs/codegen/cloog/lex.c +2bdba4fd133226e95e4218344240dabb ./test_inputs/codegen/cloog/guide.c +e63e5a39916a8d8c90aa0cec8f7679bb ./test_inputs/codegen/cloog/reservoir-loechner5.c +3440a9d740c0ce02b5abfd4816d4b828 ./test_inputs/codegen/cloog/forwardsub-1-1-2.in +0be7e08b698404133f58172d73526075 ./test_inputs/codegen/cloog/guide.in +35cb27a205f0553c1f721cbc14fa1866 ./test_inputs/codegen/cloog/union.in +9cc6d62b8e7940f7daf8516cd2839f6d ./test_inputs/codegen/cloog/reservoir-loechner3.in +86f0c3e44321041760f6da4113f3eb59 ./test_inputs/codegen/cloog/christian.in +988911a661e385c53710039430d03abb ./test_inputs/codegen/cloog/0D-3.c +85c829fdfc5e03a43c5351a573afa5c2 ./test_inputs/codegen/cloog/nul_complex1.in +70f2fd17939ab66d4534e2661104b1ad ./test_inputs/codegen/cloog/nul_lcpc.in +a002daf3af6bd758dd5ec7271560c57e ./test_inputs/codegen/cloog/vasilache.c +5c7a38e40c81a818ce696f8d548ced8a ./test_inputs/codegen/cloog/unroll2.in +298b697b2f9d2c5e573802270cebf2ba ./test_inputs/codegen/cloog/reservoir-two.in +88824f32e5910aa085a019df520f6735 ./test_inputs/codegen/cloog/mod3.c +7e6649cf99e435480dcb48fba8641df6 ./test_inputs/codegen/cloog/reservoir-stride2.in +e4c4f7358e678758a467dcde45d65e8a ./test_inputs/codegen/cloog/block.in +8afc6f5e3a52818e5380eb22a5051b6b ./test_inputs/codegen/cloog/reservoir-bastoul3.c +f670946d7daeafb8c815194d0c5f411f ./test_inputs/codegen/cloog/dealII.c +569ca7d3c6a1631575010b66351419cd ./test_inputs/codegen/cloog/merge.c +fcbd4066288def81bd29aaa4e46b213d ./test_inputs/codegen/cloog/reservoir-fusion2.c +d3f621452df8d3477d143fa751eac24d ./test_inputs/codegen/cloog/reservoir-pingali4.in +3dade8c694c743513ab017bc0c2ede6a ./test_inputs/codegen/cloog/lineality-1-2.c +ef2377d0c018055d1a6d0eff4c285207 ./test_inputs/codegen/cloog/reservoir-lim-lam3.c +9cafb09b0ae7c6f44b196d8472298481 ./test_inputs/codegen/cloog/reservoir-lim-lam1.c +d9c4917103a5c25297b2660e43ffb84c ./test_inputs/codegen/cloog/nul_complex1.c +3aa3497018855f67a24a48dda3097056 ./test_inputs/codegen/cloog/vasilache.in +497c3cc65bd18c0689703c9777e4fb09 ./test_inputs/codegen/cloog/jacobi-shared.c +1ddb44cb0986f7009cca0eaf19361bb7 ./test_inputs/codegen/cloog/reservoir-jacobi2.in +2e552ad759b1941a7329417cba0898a8 ./test_inputs/codegen/cloog/multi-stride2.in +e6fde8798ffa9c456c6421b264af5462 ./test_inputs/codegen/cloog/reservoir-two.c +b16895bfc29248724fc69fea6db593ee ./test_inputs/codegen/cloog/dot2.c +bace761d21435b50e9ef2a25259469f2 ./test_inputs/codegen/cloog/pouchet.in +1dcaa372909be7ec09bc19db60177715 ./test_inputs/codegen/cloog/0D-3.in +893232f3ecfd9b34c5fdbffa82796593 ./test_inputs/codegen/cloog/reservoir-pingali2.c +55dabf90f96fea06e275fc45a260075c ./test_inputs/codegen/cloog/nul_basic1.c +92801a431363207608647a91bf7d0ad6 ./test_inputs/codegen/cloog/reservoir-pingali1.in +a11da63161f94cd576ca5d61a324e803 ./test_inputs/codegen/cloog/lux.c +4e1649f032ef59b549cdf73752e67192 ./test_inputs/codegen/cloog/basic-bounds-4.in +536ffae79a4ae471882d219c58d8290c ./test_inputs/codegen/cloog/rectangle.in +73fd3184687d13416b3ea9983b09d34c ./test_inputs/codegen/cloog/reservoir-pingali3.c +c8fff5bfd353a46ab8f590567f8802a5 ./test_inputs/codegen/cloog/param-split.in +bae40ef5c40ddb662b311d18dbd9c6d1 ./test_inputs/codegen/cloog/min-3-1.c +701bf382b89804a15f0869e3606bd8b7 ./test_inputs/codegen/cloog/reservoir-fusion2.in +c67262a64c92dc188a15c550440adf55 ./test_inputs/codegen/cloog/emploi.c +fd43b392cbdd91ccbbca6f52a2838143 ./test_inputs/codegen/cloog/mod.c +c78ccae197459fd882135bc70117795d ./test_inputs/codegen/cloog/reservoir-pingali5.c +2f1d2c00658ba370963771e6ac2172c7 ./test_inputs/codegen/cloog/durbin_e_s.in +bf80f46707cf3b9a57d14b65a41a732a ./test_inputs/codegen/cloog/reservoir-lim-lam1.in +7fc685ddca2450b14d3da32ca34f34d4 ./test_inputs/codegen/cloog/reservoir-lim-lam4.c +a654c472d9a29aeb40086ebf5db52452 ./test_inputs/codegen/cloog/lineality-2-1-2.c +c2108f311a2a1150100084d444b6ea33 ./test_inputs/codegen/cloog/donotsimp.c +5b61583c3e8cb3f0692b18afa41da105 ./test_inputs/codegen/cloog/stride4.in +a0142c5b772c61ca57a5434543e77d72 ./test_inputs/codegen/cloog/reservoir-tang-xue1.c +7b354a21379b7124a040f236f860067e ./test_inputs/codegen/cloog/1point-1.c +8806522723803b39501f0b3eb4aaccdb ./test_inputs/codegen/cloog/gesced2.c +988911a661e385c53710039430d03abb ./test_inputs/codegen/cloog/0D-1.c +727bcef266ac21c9ee5d6b1f3936a40e ./test_inputs/codegen/cloog/multi-mm-1.c +637dbde5d9cb6c4d1b5123c4e08616bb ./test_inputs/codegen/cloog/usvd_e_t.c +1f73d1936c9c2aa495ace7654df46178 ./test_inputs/codegen/cloog/basic-bounds-4.c +242fe2c723f4b9a5c108258b179d8187 ./test_inputs/codegen/cloog/constbound.in +61914dc51e3f5f67b5035cbfd9713ac0 ./test_inputs/codegen/cloog/usvd_e_t.in +6579f0e104a61fd4bb178058bee8581f ./test_inputs/codegen/cloog/thomasset.in +e3ad4699973bb6ae858d4e123bbd6a78 ./test_inputs/codegen/cloog/nul_lcpc.c +2ac8bd09085b29cca1eb33bbee4f21ef ./test_inputs/codegen/cloog/constant.in +31831051f070ecde1cd051d0003adcd0 ./test_inputs/codegen/cloog/reservoir-loechner3.c +c32b97c358fbe3ae00da9eca1281d7b4 ./test_inputs/codegen/cloog/reservoir-QR.c +9b59c5b54f773cee4e885922d733ac8f ./test_inputs/codegen/cloog/levenshtein-1-2-3.c +238583fec60d41fc54f3834e337be76f ./test_inputs/codegen/cloog/logopar.c +71cb8d1e120af7c598413e0ec1c066be ./test_inputs/codegen/cloog/mode.c +3fe74f4071c3328eb82a2c3d39d8d5fc ./test_inputs/codegen/cloog/1point-2.in +ea0091482e03e758306a4787504c3eac ./test_inputs/codegen/cloog/reservoir-mg-resid.c +35e3a202889b799fb9aac611fe1ac78d ./test_inputs/codegen/cloog/reservoir-pingali3.in +f59aedd54c6d943b2a18d4d7c015c3ce ./test_inputs/codegen/cloog/reservoir-pingali6.in +5dc73fc5700fff9450397b77f72d45fc ./test_inputs/codegen/cloog/reservoir-pingali5.in +df64965af0d1e2ea8946b4c30572b009 ./test_inputs/codegen/cloog/reservoir-bastoul3.in +b5251ea247d2825b597fe5465c6f79d4 ./test_inputs/codegen/cloog/reservoir-liu-zhuge1.in +f9581508a0dd4353642f98a936a60086 ./test_inputs/codegen/cloog/reservoir-jacobi3.c +5b76b0eef9af8a2300673e0553f609f9 ./test_inputs/codegen/cloog/multi-stride.c +a9ddf7e02182a5a9f59168ff162bda7f ./test_inputs/codegen/cloog/equality2.in +520c5ea0b1983d959a056fb030262bd6 ./test_inputs/codegen/cloog/mod2.in +0177116352504dac087fbd4f1e0a87cc ./test_inputs/codegen/cloog/forwardsub-3-1-2.c +d372ddda377b4a1f93896ef2b1430c1a ./test_inputs/codegen/cloog/no_lindep.c +fca8ed39c4567a6f72abf4c93b8f41b8 ./test_inputs/codegen/cloog/mod4.c +a034dd2c103186c55ce173971483c3da ./test_inputs/codegen/cloog/multi-stride.in +ebb8150d152c22e8476cf47b8f99b1bf ./test_inputs/codegen/cloog/mod3.in +b175146ec376b18f0e63e2c497fe39d5 ./test_inputs/codegen/cloog/reservoir-cholesky2.in +3cc64adb850e0b9c724dabf315a92574 ./test_inputs/codegen/cloog/iftest.c +7b06255142287d746d59073d3c0561f4 ./test_inputs/codegen/cloog/walters2.c +42a7ee4126146f4e2024dcdedb9f52d0 ./test_inputs/codegen/cloog/stride4.c +9c14f7b926565eadfaa531146460eb3d ./test_inputs/codegen/cloog/square+triangle-1-1-2-3.c +7930aa84c111f54fe7f5809f6343d444 ./test_inputs/codegen/cloog/reservoir-lim-lam6.in +23f48ae1c589922d8491c8697872709c ./test_inputs/codegen/cloog/reservoir-QR.in +84f2ac61bc87fc9b8f162346f84fe4eb ./test_inputs/codegen/cloog/stride3.in +c42bb5a6203ab74e71f9c9fe94294029 ./test_inputs/codegen/cloog/min-3-1.in +f1c5cfb87d09126e9465b124af8111d2 ./test_inputs/codegen/cloog/test.in +b1cc65f8ed27dfe464081cc8969ea828 ./test_inputs/codegen/cloog/yosr.in +97d1f6af342171ddc3248e5b2e1c98a5 ./test_inputs/codegen/cloog/thomasset.c +6d0b0451aadde3c656474426ce899632 ./test_inputs/codegen/cloog/gesced3.in +4e25677c48a4635ac8c6e4accd6b72e4 ./test_inputs/codegen/cloog/gesced2.in +396e8572bafc99421fa3e6884f028806 ./test_inputs/codegen/cloog/cholesky.in +e84044cc586562dfcfb614d647ae4abe ./test_inputs/codegen/cloog/multi-stride2.c +15877e8a4ba1b42fda7f9fc64a43a5f9 ./test_inputs/codegen/cloog/iftest2.c +66eb5642d017e1bbfd17a04960d2089c ./test_inputs/codegen/cloog/reservoir-lim-lam5.in +5786e5209f8819586f6ce8b0d1c2e294 ./test_inputs/codegen/cloog/uday_scalars.in +fdc01624ae06ad1cc8096b318f122048 ./test_inputs/codegen/cloog/block2.in +f9fa8861c391eddefbc14ffc5c3ed4d2 ./test_inputs/codegen/cloog/lu2.c +feaa5a0759b2e7a8c24521933cddd741 ./test_inputs/codegen/cloog/levenshtein-1-2-3.in +530e3abca9258a30c05035904dc4bf95 ./test_inputs/codegen/cloog/reservoir-lim-lam2.in +8a3e0b21ee38c4a13619d5b7ab10963e ./test_inputs/codegen/cloog/uday_scalars.c +ce01d99bf5a96670afe49d631975c45e ./test_inputs/codegen/cloog/basic-bounds-3.in +9b6e8a114c8aa6070cdecb50d0d7f2d7 ./test_inputs/codegen/cloog/1point-1.in +f03b26c35086edc95415d352ad1f3bb7 ./test_inputs/codegen/cloog/gesced.in +5d19a8b2c7cd750fea7e1054813b0aa3 ./test_inputs/codegen/cloog/tiling.in +878364ef405b5ce1ce7c3fc7d58e804c ./test_inputs/codegen/cloog/nul_basic2.in +7b2bfbcbfc4d15919544b9b2f57f3521 ./test_inputs/codegen/cloog/square+triangle-1-1-2-3.in +494dc1ceff12042d2ea0900d8bf79f2f ./test_inputs/codegen/cloog/cholesky2.in +916c902c69d4bbe3438345e4a423c78c ./test_inputs/codegen/cloog/stride.in +7073fe19076aabe2f7b0f88adb0e6fcf ./test_inputs/codegen/cloog/basic-bounds-1.in +d5b0456293ca45dba0f69b7f0277f9fa ./test_inputs/codegen/cloog/singleton.in +7d8685a157faad499c255f8106269ac0 ./test_inputs/codegen/cloog/min-2-1.in +cf13f7e4bcb9bd9293938d4766c00a20 ./test_inputs/codegen/cloog/lu.in +810be24256acc460f6964157791533f0 ./test_inputs/codegen/cloog/unroll2.c +8e2be6acdfb8248fd91fc8c16ef64d51 ./test_inputs/codegen/cloog/reservoir-fusion1.c +cb2d1074e9e94a80f1e23d56d13b9532 ./test_inputs/codegen/cloog/lux.in +40a35952247b553e5680794e5e656a30 ./test_inputs/codegen/cloog/forwardsub-3-1-2.in +07c2fe807d0cf779a1da2e617978660d ./test_inputs/codegen/cloog/reservoir-pingali2.in +4cace394e81d7b3fcf404ed3582ef0be ./test_inputs/codegen/cloog/block.c +a92d7a6b210d387d4b7bdffc64a34913 ./test_inputs/codegen/cloog/multi-mm-1.in +72720db2cca0ce27dd2d1802c9cf65fd ./test_inputs/codegen/cloog/backtrack.in +617b946c0542f1e6523cada0ad7aadd4 ./test_inputs/codegen/cloog/basic-bounds-1.c +d464f69ba6cfba0634266ccd09750a2d ./test_inputs/codegen/cloog/basic-bounds-2.in +d5cdb57ac36adca51d66384ae046b0e5 ./test_inputs/codegen/cloog/forwardsub-1-1-2.c +4b3818aefc7fa2b701236b582cf829a3 ./test_inputs/codegen/cloog/youcef.c +877d8ca72284cc0f89a6d3f779ea0656 ./test_inputs/codegen/cloog/otl.in +01670e061681ae50148ae31c1994552d ./test_inputs/codegen/cloog/yosr2.in +567454cb16f59ca0e3e624c6194f106a ./test_inputs/codegen/cloog/reservoir-stride.c +f8230219c1f9aa7b0077f6af3381ea70 ./test_inputs/codegen/cloog/orc.in +70bdde830e1acbf2121717235125220b ./test_inputs/codegen/cloog/lineality-2-1-2.in +8456cb99e523e275e256a4413fe9e637 ./test_inputs/codegen/cloog/iftest2.in +e5fd0001cde440fd0f522e5b6f82bcf4 ./test_inputs/codegen/cloog/wavefront.c +f5809124dba3430b81b448c6de8a0e41 ./test_inputs/codegen/cloog/donotsimp.in +519a3276dacd277e3fa627c8a036c502 ./test_inputs/codegen/cloog/equality.c +7d4fd6951fcd3633e878be83c046f191 ./test_inputs/codegen/cloog/esced.in +960035c8b41b852a89eadd753292d75b ./test_inputs/codegen/cloog/classen2.in +e11cffc2cb77e039a82ca8fd4de0a81c ./test_inputs/codegen/cloog/walters2.in +5f14c566685b8e6456aa4fe9120fbab5 ./test_inputs/codegen/cloog/backtrack.c +aa70c832b943c4eaf9508e547b37c81a ./test_inputs/codegen/cloog/reservoir-jacobi2.c +2af53b271789a7f5237f7029dc132f72 ./test_inputs/codegen/cloog/infinite2.in +cd36e347d170cd76d42f676b2e99f4a7 ./test_inputs/codegen/cloog/logo.c +17d427e61f3e174702a2f749e57c5e9e ./test_inputs/codegen/cloog/ex1.c +53e939b9ea870d01c66c6d9011c9b49d ./test_inputs/codegen/cloog/mod4.in +268fe7a026ad3d037b56aa8f60614bde ./test_inputs/codegen/cloog/reservoir-lim-lam4.in +a9771fe3ea18bb75cea85775fe564e9e ./test_inputs/codegen/cloog/reservoir-lim-lam2.c +346ab4af28fe3789dc37bf46dec12991 ./test_inputs/codegen/cloog/equality2.c +81eba2c2c6ae4b948bbb91e088e9c915 ./test_inputs/codegen/cloog/vivien2.in +2b7c1a4a0d8dbee9d4da98a8e47890b5 ./test_inputs/codegen/cloog/no_lindep.in +c715155656199cc2cebd3824a64125f0 ./test_inputs/codegen/cloog/forwardsub-2-1-2-3.c +50607c65019a8da579597f0dd9ce00a4 ./test_inputs/codegen/cloog/0D-2.c +50df594d4b55df5cc138a1b2df1d4aef ./test_inputs/codegen/cloog/logo.in +bdc95b3b2bfc5d785da1650c926199ba ./test_inputs/codegen/cloog/mode.in +7d1278988f3f8a2431de77bea2e0cb78 ./test_inputs/codegen/cloog/orc.c +0f05ee1b0430794b5fca3eb5423dd42a ./test_inputs/codegen/cloog/min-4-1.c +0a0240495f832327fdeb89eb8883072c ./test_inputs/codegen/cloog/reservoir-mg-resid.in +1b56ce27580377ece3ac106ae74e7794 ./test_inputs/codegen/cloog/darte.in +2805187169b3935ff929e6939d9425f2 ./test_inputs/codegen/cloog/stride2.in +52c06f4bbb565750dc78402e21c34350 ./test_inputs/codegen/cloog/gauss.c +f173489f75acb151fd384c6e3a65c6d4 ./test_inputs/codegen/cloog/reservoir-lim-lam5.c +70e92af421abeb99041e4628eaaefa12 ./test_inputs/codegen/cloog/lineality-1-2.in +76af26c0b49e1a06ab8d1439f1681309 ./test_inputs/codegen/cloog/stride3.c +0e42c49f32a0f4fd5c79ed0b166c9f7f ./test_inputs/codegen/cloog/ex1.in +28693a515e6b3d504054eb50f4bb89d1 ./test_inputs/codegen/cloog/youcefn.c +184181388c68f8b0d02f19e4b5c6d8b1 ./test_inputs/codegen/cloog/reservoir-cholesky2.c +33dd85ebb9e4081aa924296e35feaffb ./test_inputs/codegen/cloog/vivien.c +3e3a3487b7f3c838120fe235a6714596 ./test_inputs/codegen/cloog/infinite2.c +89be10a7fe4b89869b58efe68d4ceef3 ./test_inputs/codegen/cloog/gesced3.c +c56bcdb945a0cee7cd85b8e8024d4409 ./test_inputs/codegen/cloog/block3.c +ce52d849334b3aab8478c6605e0f687d ./test_inputs/codegen/cloog/walters3.c +ae5ca6676c45e69b7adc7d90d99ca3e0 ./test_inputs/codegen/cloog/youcef.in +7e0a145aa3bae461b5f23c8c96daee4c ./test_inputs/codegen/cloog/unroll.in +0a0240495f832327fdeb89eb8883072c ./test_inputs/codegen/cloog/reservoir-mg-psinv.in +c0a88a55846ba8c8a070477a7553ba78 ./test_inputs/codegen/cloog/classen.c +2a03c6a47261eac68b0518a47fcb3a75 ./test_inputs/codegen/cloog/basic-bounds-3.c +9adceae6966c22bd4751c293a5257267 ./test_inputs/codegen/cloog/nul_basic1.in +dcb044cb0a45e7d5ea92a16c1ddcfaba ./test_inputs/codegen/cloog/walters3.in +69ec5e1f1077bdd335b45aa3f7c326f2 ./test_inputs/codegen/cloog/basic-bounds-5.c +92f3bfffe5651432621cec7ce10035a8 ./test_inputs/codegen/cloog/walters.in +6e4f41763e10853efec7b5e216aaa4bc ./test_inputs/codegen/disjuncts.c +82e619d71d3e25c198acb687d0ab70fa ./test_inputs/codegen/separate.in +bafd18a6b0ee91289b8da0bc9883147e ./test_inputs/codegen/unroll.in +acb01e870f39a6c3b5c8990f850dc86f ./test_inputs/codegen/stride5.in +6ffd66c8a9de578db2ac4e701d6b6201 ./test_inputs/codegen/atomic4.c +7d63a3971d6aa04616b8ff21c522396a ./test_inputs/ex2.pip +070d06b51eb2899b912b23c2e0cae306 ./test_inputs/unexpanded.pwqp +237b1fec536b99d552bbcf754e0df796 ./test_inputs/convex12.polylib +4d27331d8ed4bcc3c96283e4f1c6642b ./test_inputs/cg1.pip +cb23403af19ef53e065d59cabc8cfecc ./test_inputs/equality4.pwqp +3b33b4296c5d76258e71efe6b2056455 ./test_inputs/affine.polylib +829cc4e63d89bc1dea59257a35eeba0f ./test_inputs/max.pip +cac1cea89ed7a28cf6c3b36ee7e66f48 ./test_inputs/convex3.polylib +a580d8773973b92e34030bbb04652381 ./test_inputs/affine3.polylib +e3548828901c931ec64fd84bac5aa034 ./test_inputs/square.pip +a5120b804bd7878ff8e30332669eff39 ./test_inputs/equality3.pwqp +1d4c44dac15e2e61a263d3b0905342b9 ./test_inputs/philippePolynomialCoeff1P.pwqp +8e851c2af1cbb0a27b5f440f2c542f75 ./test_inputs/affine2.polylib +5b2650fc8eeb775559e6f661d668d7f3 ./test_inputs/equality1.pwqp +7f14b56616a62497e87ad58b44d24214 ./test_inputs/negative.pip +4495ae7e4a0c26c976fc789492369b65 ./test_inputs/ex.pip +da1ef36bf22176650c82cb0522af9121 ./test_inputs/sor1d.pip +01af9cd85ea93361757bc2e37162561d ./test_inputs/esced.pip +a2970b2397d1de29010848081c35c109 ./test_inputs/split.pwqp +0051332a1c0bb8a8c7f73c506f3211e1 ./test_inputs/devos.pwqp +6774c11e2695a13668760fd8966f8efa ./test_inputs/boulet.pip +b40b76c807d0bf55602e2a8c37bd2474 ./test_inputs/convex10.polylib +c926ce78b2048b70702450383e5aa749 ./test_inputs/small.pip +c0a9287150e8f783806e3eba220f8a75 ./test_inputs/convex5.polylib +fb7cc3d91df552839df691a0bf0bb044 ./test_inputs/fimmel.pip +f6083a1f7d53e2afb6e9ad7f749e7706 ./test_inputs/philippe3vars3pars.pwqp +156b4db5546daf78279068aad6be72f9 ./test_inputs/convex4.polylib +5f844c7218d32fad0c9dbcb2727c917a ./test_inputs/basicTest.pwqp +8069b6a0f1a1f35f043d3e169df74215 ./test_inputs/basicLinear2.pwqp +7e50b48e9849b0edff7030f92bddadcc ./test_inputs/toplas.pwqp +d6d27442f4a23067de047ae5a9085710 ./test_inputs/convex7.polylib +1ce001f63b2eca1307823ee64c593590 ./test_inputs/philippePolynomialCoeff.pwqp +fe57dc0bc47247773ecd8dfd4896531f ./test_inputs/convex15.polylib +79bb9ea7ca1bfaf4a2bc1da8bddf0bba ./test_inputs/equality2.pwqp +d29fd5552b8cedd3f36374b5c5f0c5e6 ./test_inputs/convex0.polylib +ed17235bdf55ad3099484e2ffbda673b ./test_inputs/gist1.polylib +a757ef09a889f63b0f54276d394a3ce1 ./test_inputs/set.omega +0b740fad4fce279e45451119d06d8751 ./test_inputs/equality5.pwqp +5c8a3e76b4b4e0a7e21342ed0db320ec ./test_inputs/convex2.polylib +0c63fcb79c0145e6f5be84f3cdac4774 ./test_inputs/convex11.polylib +9ad9c94feaeb2172119f36fea0e64ce1 ./test_inputs/faddeev.pwqp +57cda0742755b4160165804e42efc883 ./test_inputs/tobi.pip +d81db5367ad01cf1025deeb707f23a28 ./test_inputs/sven.pip +96cb47bbf9bbf2316909d6aabdb13419 ./test_inputs/convex6.polylib +afc70ade28d177190bc61848170c7c8f ./test_inputs/brisebarre.pip +3706cc30d10f775828f3b4878d6ea2f3 ./test_inputs/convex14.polylib +b249890155ab2c10ff57643c0a33cffd ./test_inputs/seghir-vd.pip +28f0caa42e042804348a800bba6064c0 ./test_inputs/convex1.polylib +5899f760d611c1f0d3dfb7585becac11 ./test_inputs/philippe.pwqp +9829d2d0a30dbf6c689b979783fb43b4 ./test_inputs/philippeNeg.pwqp +105383ff43381fb5088dd4dad989a533 ./test_inputs/basicLinear.pwqp +d4d4d809bda66c0054ccc31d5d2cd918 ./test_inputs/convex9.polylib +9f8fcb32e24ebc39e1bdc9c92350c31a ./test_inputs/convex13.polylib +ab0e3e36803717743eb67dff13ddcb7e ./test_inputs/product.pwqp +1fbb536cc911eb067151eb8acd5ddc70 ./test_inputs/application.omega +cc2624e98e6c5dd3dedec6be8ed2d44e ./test_inputs/convex8.polylib +0f9eec3431f098fb8c436959056a0a51 ./test_inputs/linearExample.pwqp +8077263f6e193cae37bc1394e2f37fb2 ./test_inputs/test3Deg3Var.pwqp +f1971b17bf747677ec5aa0ece87fffd3 ./isl_factorization.c +7dd6cf1e6138bbb4fc26f46272114c1f ./isl_sort.c +e509979d10c7f434b3590bd7dcde9101 ./README +ce2e30e6c1d264d21ef85197ee9e99b1 ./isl_convex_hull.c +aac3cf4a8d45c6aa26f632c1e49aa95f ./isl_bernstein.h +f0f30b89c38b8c98332d3a579bcce009 ./isl_piplib.c +84490bf51fc57c21fa43f4b488a9f196 ./isl_constraint.c +e58c0e719beef72376f13818ffa627b4 ./isl_printer_private.h +2782b5ec39b1c1718d8a5de6abbe6d90 ./isl_band_private.h +1b7ec82a2267f8a91a6b01f606df55e2 ./isl_ast_graft_private.h +c9c858c6d71956629c40946ffe0ed676 ./isl_morph.h +e7ac1767d76143aed7eabc9e66c42b6a ./isl_seq.c +dd53a36fd72f7eefd40f91001b4d2131 ./isl_config.h.in +fd0333ce6183602b6f768712c6b691cf ./isl_tarjan.c +0c8b042f99995c11aeb81bccc23c4c05 ./compile +7fbcdd04354840d48b6bc4226dd785c5 ./isl_equalities.h +664a4fdf46e6f243e0551b80ce3d47fb ./isl_map_piplib.h +6204d29faf4be9ba6dcdfc1665060604 ./isl_reordering.c +7ef823040b1bcad1b3eea13ee2506217 ./ChangeLog +95dc72fb13260064babc53191847e0a7 ./isl_ast.c +611849992bd1ed1233b72d5e4a27ae37 ./isl_id_private.h +323d247aa90c0309ca6282e1b3f893c4 ./isl.py +ad6f8caf80b1a4c057da434f754ab503 ./isl_stream.c +fbc831a6fe16ff0d917be474b61fcf88 ./isl_obj.c +127400d88dd7cf8b8a17f5e1508cdeb7 ./closure.c +b67314963c79f50f653b21a84ea411e2 ./isl_ast_build_private.h +6f4648f4a2198fd2ed2d53d53a72f25c ./print.c +f55c041dbb59e513654f5c27a1efd2cd ./polyhedron_minimize.c +b33284b9a9fbe371e03b71e17e1709b2 ./isl_morph.c +bdd233ba48f31ae5a785e1bb9db100ad ./aclocal.m4 +a9a34995cbd407eddd05d361ddcc6fc5 ./isl_reordering.h +230b680c3dfc054f97b152bab0a4bc89 ./ltmain.sh +2e93d3a6c2c39aa760457535dc219fc4 ./interface/Makefile.am +2065743e73892a14fb117a71a843ddb0 ./interface/extract_interface.cc +7bf57503bab3dbdb014c1c84373f0c9d ./interface/isl.py +c9d6f6f4d7ee9b8d9c07002d859b97a0 ./interface/python.cc +95f75b535fd9a7ffdefee47dc33eb4da ./interface/python.h +fcf63d6f9c361ad44c2b0b979e5ffe15 ./interface/extract_interface.h +2bfcfb2de8c97325e3f1fff5947cd627 ./interface/all.h +7655966588824d4ba38e9c33e312a8d5 ./interface/Makefile.in +684f3071d6e4eef6310a66a1608d9db1 ./interface/isl.py.top +de9ce58e4c486217dd113dbe7bfb7c28 ./cat.c +0be1d4cbf7a89ebea737b20552254a94 ./isl_input.c +f8aedf299736ec5c62bb5a04257bcf1b ./isl_power_templ.c +33822573bd5432b334473b057335c16c ./bound.c +8fa5b69b9acfc5be6f476941aa0a9e6d ./isl_constraint_private.h +7535b8e37bd657b099043bdc0eda563c ./isl_sample_no_piplib.c +b2647f2dd1585ff01aaacb3767318581 ./doc/mypod2latex +a30e64c44e7228aa662ab479cb113a2d ./doc/Makefile.am +d4ab9666128602b22b5d869b3ac4ab1b ./doc/isl.bib +25016e6c2fd62945f7e53710ec9050b4 ./doc/implementation.tex +e024d48919edb842c59f3cf9e3c6ae34 ./doc/manual.pdf +2c85b89ab0b58130b96d762cd2b50c3f ./doc/chicago.sty +33a55c584a81f79b99ebc1986b6b99a8 ./doc/Makefile.in +221f120a78457dce66e2eac0b81d0c84 ./doc/user.pod +9cb06cb0fe1f3312267e6b43c4a84c7f ./doc/chicago.bst +24aee10acdbf1195b0f23533e17e9317 ./doc/SubmittingPatches +0b13f8ebd5f56d1a292f62fa5d127473 ./doc/manual.tex +75a47a60827e98e1ced005e1bb9d82a6 ./isl_options.c +2eb9e531e14f0f1f91d46c1fbcb0e90a ./isl_test.c +dac0b765d94ac4ad71ea7f98610db613 ./isl_map_subtract.c +ffebf875c08cd1ac34ef88ae69fe1c4e ./isl_output.c +eb51b36b1ac5c7689558dcc612f72aef ./isl_basis_reduction.h +4b9a34059c6e0d9dbff3ec7d381fb4b8 ./isl_ast_codegen.c +a4dc61c5b0b90507c8f3ec474a5ddd50 ./isl_map.c +5856754085c05d79877ad18e917a50f1 ./isl_tab_pip.c +8aa7fd49d60915136f3759baa1218452 ./isl_list_templ.h +f8ee2f99c7c8b21395d3fe6f18531d24 ./codegen_test.sh.in +917114516a8aafdfe41589369638b455 ./isl_lp_no_piplib.c +4d0584c5d30872e08c231f52221cdc13 ./isl_stream_private.h +d7b1a0bc7719d6ee6fb5999c448fa13f ./isl_blk.c +a3952ef74b5d654091f6561a45fe7564 ./isl_options_private.h +bfcf5ed56f8f99d1292837fef32cf9c1 ./isl_mat_private.h +13d4dadec306ee8fba46b34ad39d8e0a ./isl_range.c +d654138059e853382fa276f6def4dad4 ./isl_coalesce.c +be6b0cca036b58fbe4d6fbdaba031684 ./isl_factorization.h +2715e1697e24a010f066cfa1a3a11033 ./isl_piplib.h +f8c6b72f42f802b8f6a95630cc6f5ced ./isl_space.c +ed46344b42fc34f464a70b0f4098b70b ./isl_farkas.c +071cb63abd021a79458ef56ee896cf6d ./GIT_HEAD_ID +88d64490f2e242ba6057af5cc94d689e ./isl_sort.h +d5dc4c2062fb52090ef31052ef85a64f ./isl_mat.c +1fc3d38bfb0c14d86bd1e25c3da48e18 ./isl_map_private.h +e3af31512c2d38818a3dd7025f005977 ./isl_local_space.c +b3a701f5447259af7237bff8e1a41f23 ./isl_ctx.c +4f190dcc7e09e77fc3d72f9c88de44f8 ./isl_int.h +3f815aff5a555e70487e48c9fa529c35 ./Makefile.in +48bb8b237248262e7aaf0c3466a33679 ./isl_id.c +abd037762415c9ee84144a39f610112d ./configure.ac +f79d2fcc6472b36f5e062449285db9f7 ./isl_union_map_private.h +9f03c4c07903a231b4f81e5e5ca35244 ./isl_affine_hull.c +ab4d43d0e7aeb6b938f467871ab9a424 ./isl_equalities.c +eb8a456247b7a66b32ecd37b4d6f32af ./isl_vertices_private.h +0a4084e6bac978755df18201a0efb65a ./basis_reduction_templ.c +d3b7ecf5aac17d5f6837328016d3cd87 ./isl_dim.c +433a3c3dee811b266f84f3bcd9d31936 ./isl_schedule_private.h +5d37169fe99d95b45d84d67617a9d951 ./isl_val.c +06bce01b48f427e86244e25de8210e78 ./isl_ast_build_expr.c +3e63d598c2e249e94bd6dd7ffb4e31e5 ./configure +91ca771d7a3f9d2ecba5416b85778325 ./isl_hmap_map_basic_set.c +f111419f1f25c3e304c56d99efd30e7f ./print_templ.c +2bf1eb747c3e8b7ce34d18d9a57d204b ./isl_map_piplib.c +ff4c6c364b27887a1c48a8d4c4430340 ./AUTHORS +4057cf107e55c92a4051ce5365fda21d ./isl_lp_piplib.h +e8fdad7bc2977a5acbdc8781fcf67a31 ./polyhedron_detect_equalities.c +c5fccc17252c784ca8fc7b7aa371f02d ./isl_union_templ.c +83a8dcab53eaebeb7d1c76844fae71f9 ./isl_sample.h +7e289a328d1675030815637268eaf030 ./isl_band.c +c508c372d76f04f26ac80428cd8ff4fe ./isl_polynomial_private.h +63dd310f23073a63ecc476f85b7d9b83 ./isl_val_gmp.c +ce22bc1f6f9e428042a664dc178d5aa5 ./isl_tab.c +cd9568712b5da7dd09ba8680b96b990e ./isl_tab.h +dd53a36fd72f7eefd40f91001b4d2131 ./isl_config.h.in~ +9e2531a63463c5200fc0487382450556 ./pip.c +635e797beb6fbfc9ba9fa6cbbe6d5480 ./isl_map_simplify.c +fc48ea7306a287cf5042ae66f41ee7a9 ./isl_multi_templ.h +f4aafb270c2f983f35b365aad5fe8870 ./depcomp +2dbdb27d0fb0858dcc762d47e4ee1e3d ./include/isl/set_type.h +9a353b485a2c3801a12baad14b89b9c8 ./include/isl/union_set_type.h +4e5b66d79ebeb1905da5ea44deacbb94 ./include/isl/version.h +3a2a1594b7344ae1debbe5d40f66b816 ./include/isl/aff_type.h +48e00b36d8b5f684b8c23f2bab683948 ./include/isl/mat.h +447ef6eb51afab0baf217d8a02db1a9a ./include/isl/val.h +0e5c8cf7188aea452c6a600b96421572 ./include/isl/map_type.h +3220ce21996c2892f491b52c49c39d36 ./include/isl/polynomial_type.h +30ce58a30bd5d655821585b781496024 ./include/isl/val_int.h +4e975a693ae8ce25d38c82d2344f7a67 ./include/isl/ilp.h +5502ac3c7797261de038cbc81263a2fc ./include/isl/config.h.in +1ad6efd3e153aa5a6b1ce472166dd970 ./include/isl/int.h +fe6dda8778cc3c8d355692e2f1c67f67 ./include/isl/set.h +6c2a19ad956a6df4d6a58e94d1a978f1 ./include/isl/dim.h +87f9db3dbc286f33e3711b4f9cae004b ./include/isl/arg.h +1f184a710353793bfc139748c722a335 ./include/isl/union_map_type.h +cf9d96e20cb354728fc101c5ea97a082 ./include/isl/val_gmp.h +fba16e4001c6231a8f444d9827cb5cf9 ./include/isl/vertices.h +f7242b828b6c8911eae5dc5e489c03fb ./include/isl/lp.h +792dd8c70b7dab12a41b20c3d173a530 ./include/isl/blk.h +363d959c0446ddc0e969f80dc5af9ab7 ./include/isl/obj.h +08472100c8c609891c94a0faf67c889e ./include/isl/ast.h +5b99bb05a90641c28bc5499ce66b233e ./include/isl/polynomial.h +a847f0ee22ad83d0a90feac52d1296c6 ./include/isl/union_set.h +fa46c4fbac05a4624f820d30fbbee156 ./include/isl/local_space.h +c3b66e90911c1745cae4aa2c03adce86 ./include/isl/ctx.h +40fde48d03b5a33bc9e1bfffafa1ed9b ./include/isl/constraint.h +089c7054dff568d50c9af4e3a81aa74a ./include/isl/options.h +95a8d03d17d7a52eb890e509279dd4b1 ./include/isl/id.h +62f2f0057b13ede4f54ba407989a8138 ./include/isl/band.h +354af6d4a7eec785ce0e25171253f31f ./include/isl/hash.h +0934f75febf50adc116a89aabf964ef2 ./include/isl/stream.h +0a03ac18557ae70f35e304e0c5c43c92 ./include/isl/union_map.h +250fac0f2e77293393c7948afc834677 ./include/isl/space.h +f89a244269e123c9ff7607225f47071e ./include/isl/list.h +aa4a9713e0ab08e27a10067d5adfdff2 ./include/isl/printer.h +11cf3b1e997b011871e58aeea54db822 ./include/isl/vec.h +e6c94f9f982f1eafeebf20e0bb7e5389 ./include/isl/point.h +ea75fd39da751983f6ab1e358756e907 ./include/isl/schedule.h +b2b98f53ffb0477f3693589aa33c7c6b ./include/isl/flow.h +8a404ec3482004e89f7e1484fa15974e ./include/isl/multi.h +4fc443e216227298d37b7d472ac7ffc4 ./include/isl/ast_build.h +a35a257ffd588d231fe5a882e6a52efa ./include/isl/seq.h +2966c845e750897f0efe3f5b222c1471 ./include/isl/aff.h +bad19b3fde1ad498df07631a9ce8e543 ./include/isl/map.h +32980aa420a4cfda0d6cff87847a7fe3 ./isl_flow.c +3d892ad47a1c3186819a21651d2164fb ./isl_bernstein.c +5a7ff62141102cf059064ef910089d46 ./isl_local_space_private.h +a211a9883b53c5ef2021dd23c4f6d24e ./isl_sample_piplib.h +6ffa949dd51b19a7fe3df9de33913b34 ./isl_gmp.c +ba67d589a17b479cb3f568cd7b52b0c3 ./missing +65f3ae3c6425d9d293e14c1e65a30a77 ./isl_polynomial.c +78e34b2ebd7480438f26ca5cdbf0e34a ./isl_ast_private.h +90938326314555c92e97431398ebb9d7 ./isl_lp.c +955aaa8ed14dd3de0af5eaf79f49d120 ./isl_transitive_closure.c +a07461510dc1bd66e70ccfe8b7833323 ./isl_aff.c +bfb0370c1004d4e8a3d909bcd374ae56 ./isl_config_post.h +936bd33f6b91669cf49aaf0e94d84fde ./isl_bound.c +d973023f8f6a7a12efa23f8311fceb69 ./basis_reduction_tab.c +01f95674d4044e809b2aa827817c2fa5 ./isl_sample.c +2744a24b3bddc555f9949be552cdee48 ./isl_ilp.c +eea34cf893bb060ee20189e256a8065a ./config.guess +150cff5f53444031ecde97ef0504bbfa ./isl_dim_map.c +7938d1f81c5fff87a3d89edf7c336725 ./isl_tarjan.h +6d765dbf822e5c3f018ecbce9bf78ed2 ./isl_list_templ.c +fb2b49a9dabbd12a3aba580ba6801319 ./mp_get_memory_functions.c +3c0a044b2b9403a8ee54de002c6cdfab ./isl_ctx_private.h +ef80364021e8daa7d5971979ed6718bb ./isl_range.h +77e09c9c52b48f82a37e118a17661c7d ./isl_map_lexopt_templ.c +4b54c92fea14d68169996861496f77e1 ./isl_val_private.h +3cb8c660e3ebbba0d01df25ec367b406 ./isl_set_list.c +8a6c9da335b8fdce655cc2f944ff224b ./config.sub +6bcd16a8d7eac57a84bf594ed762ec4d ./bound_test.sh.in +ddbeea37713cb0759eb9ab0f55b887b3 ./isl_ast_build.c diff -Nru isl-0.11.2/debian/autoreconf.before isl-0.12.1/debian/autoreconf.before --- isl-0.11.2/debian/autoreconf.before 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/debian/autoreconf.before 2013-10-17 14:26:37.000000000 +0000 @@ -0,0 +1,895 @@ +903c73f5f38062b6edb969c8745d05e8 ./isl_vertices.c +0c7c9ea0d2ff040ba4a25afa0089624b ./LICENSE +d2f125b3ef068a78e4d3cdd91e41df57 ./isl_hmap_map_basic_set.h +b6f058a9acd23690cccc8385a9ab843f ./isl_lp_piplib.c +93030d819bf1e193092267e47641c96b ./isl_union_map.c +e33cdfd638e3048eee64f3b5608d5691 ./isl_vec.c +4d0f4bfd0a8b05d9839cd5d7eae8b404 ./isl_map_no_piplib.c +ea5a31c8f93b4037f864364b079f9822 ./isl_multi_templ.c +2a3faf63a9a6341825f7e38c7de318a4 ./isl_pw_templ.c +71a0acf07de06f13f7f634daea100d28 ./isl_ast_build_expr.h +f101a42312522164547b2648ef83bc3d ./codegen.c +0a76c899ccbd03eb5364d8b65614ad50 ./isl_scan.h +91dd5e1355d100dbdab7d71244ed2625 ./m4/ltversion.m4 +fcb132a1eec75f4e23d3f68c2c9522ca ./m4/ax_check_compiler_flags.m4 +36e6102321c85769fa9ef24d4478b7ff ./m4/ax_set_warning_flags.m4 +6eac793c85ebaba2e32713c7bd7722dc ./m4/ax_detect_git_head.m4 +2e0fe130c02ffb5fdf067a031abbe185 ./m4/ax_create_stdint_h.m4 +fe93d39c1d0429554bc88a3260641e54 ./m4/ax_gcc_x86_cpuid.m4 +23e6c706b531023ed97e97fc4cc03339 ./m4/ax_gcc_warn_unused_result.m4 +d22544df107d96eaa32e3dd53b8f56e2 ./m4/ax_compiler_vendor.m4 +47d420a13f9ba4e171772c3e3eee3e63 ./m4/lt~obsolete.m4 +4839228149cc1790b958c0a949b58386 ./m4/ax_cc_maxopt.m4 +16ac5681e44622f64e70a2da8a5a2009 ./m4/ax_gcc_archflag.m4 +b500d549c1efa9371f6bc7ebbbc8caf8 ./m4/ax_submodule.m4 +9558b0c44b561a0362294323220e8503 ./m4/ax_create_pkgconfig_info.m4 +bc2f6032c98896249eadb56177c7d357 ./m4/ltsugar.m4 +b454b26bc1756d05a2cf316f0fc4895c ./m4/ax_c___attribute__.m4 +3dab30434f3580bdecee4b55271530b5 ./polytope_scan.c +101c661080c71773ae89f894b7c080b1 ./isl_aff_private.h +7f2205770f7b51dd197d05863db713df ./isl_version.c +c4270748760d095a028de2c45fee1eaa ./polyhedron_sample.c +70d9b03819310177936f0f6cb5bbb68c ./isl_fold.c +4afffe1036f7952d97d925e9048e417e ./isl_ast_graft.c +edc65b5482bffcbe2644d492d6619f38 ./isl_bound.h +5c78b6f1cd8c6f9fe6841c31ef54c49a ./isl_arg.c +674c1b708be189b4bbb6057f5b92f221 ./isl_space_private.h +b27e9d938ee0db17076c8a62e28f939f ./isl_sample_piplib.c +5f72d5f666023498007ac6035f985530 ./pip_test.sh.in +2a8283883b97c3c5f0934b7ddf979dbf ./isl_point_private.h +aa19736538cbc95203230c1264bdc3e8 ./isl_deprecated.c +bfd37fefc515ba3cf1148af7406d7a5d ./isl_schedule.c +1013044a6bc2f2db115e44b5299c24c0 ./isl_hash.c +dabd38c7463ded26c01c171c5a25cf6b ./Makefile.am +546ce060422261ea4b2bd9bc7b7ed77c ./isl_scan.c +21e09bf51917c9e82aa53dc0a0a61ace ./isl_printer.c +85fc7db7a19655f4a7693a84cfbfe16d ./isl_point.c +7678ba2fa230528b8ef936693766cb70 ./isl_dim_map.h +6644588be18d04f417c2911d2ccdded4 ./test_inputs/application2.omega +e97ee14dccaad98e391c89f667a82096 ./test_inputs/philippe3vars.pwqp +d0863bbf92d5a2a9bb0c7399e6d0bf5c ./test_inputs/neg.pwqp +bc3ea6198a980e8441ac36e255829d2d ./test_inputs/basicTestParameterPosNeg.pwqp +8a8ea58ef97ff1a7687dbd5313356265 ./test_inputs/codegen/separation_class2.in +7fe95ee18bc768a79ffb896eebfb0646 ./test_inputs/codegen/separate2.in +9420c985750c88f3ceedbb82f8938df9 ./test_inputs/codegen/stride6.in +d6819b2de4ef409581328e13fc995498 ./test_inputs/codegen/atomic4.in +51120b1ea51647054b1cae8da5e01ca6 ./test_inputs/codegen/shift2.c +a9da6ad41eba4247a125e0fe13a88278 ./test_inputs/codegen/separation_class3.in +5fe8eb390f2ce85590077cd547602254 ./test_inputs/codegen/separation_class.in +91012403f444e7ca2bcae1e31cda7f3d ./test_inputs/codegen/stride5.c +e146bfb819cd6220b7e4a2ae30d2b18f ./test_inputs/codegen/single_valued.c +232523233b2a7ff86703273d4809df5b ./test_inputs/codegen/hoist2.c +b7cd9faf968748b031dcb6e6cd7b8204 ./test_inputs/codegen/separate2.c +67d472c2bb2b87bebfc14fd65d402ea0 ./test_inputs/codegen/stride.c +fde7969c14624c57d37dfd0912c33937 ./test_inputs/codegen/unroll6.in +bbdab4d0e089e84d719a593b931e5d05 ./test_inputs/codegen/unroll.c +19eadc0e0572b7ec64f03fff9eb38ff5 ./test_inputs/codegen/atomic.in +02170b73f3be6cf67731acda6863cc45 ./test_inputs/codegen/disjuncts.in +00493d44956821b51f84ec7f17101963 ./test_inputs/codegen/mod.in +611a7fc882c9bd5d21ca5b71d5e1e85b ./test_inputs/codegen/separation_class3.c +e07e2aab954cce374df9fd7dfbf2d267 ./test_inputs/codegen/separate.c +942a5f59f5ccb06540e85731ffc6df77 ./test_inputs/codegen/dwt.c +a74c906b87dc87ce33f3083d68df9488 ./test_inputs/codegen/hoist.c +70ac1f6b093f5aaacd279682eaed05db ./test_inputs/codegen/atomic2.c +53e9a11f2c635086abdd14af13b8b6d6 ./test_inputs/codegen/unroll2.in +a246f24792f691e47a29a296196ec43b ./test_inputs/codegen/atomic3.c +cd8e010b9ab14baaa2d10beba6c566f2 ./test_inputs/codegen/atomic.c +240e03b2f69c670513021b0546b23d24 ./test_inputs/codegen/hoist2.in +c5db9101d6f221c1505ea048e4dc867e ./test_inputs/codegen/unroll6.c +3070e00c65ae8cf2ca204fd21c9d57de ./test_inputs/codegen/atomic2.in +7bc9d83033d37327ef289eb255dc30b8 ./test_inputs/codegen/shift_unroll.c +e7076eefb826845f27c0e4d9291053ed ./test_inputs/codegen/unroll4.c +b99ccea319b440fb69a80f077f6c9bf0 ./test_inputs/codegen/unroll3.in +28dfc2fb1b707f81958756f22c46c474 ./test_inputs/codegen/mod.c +8ca50d25793170d5512fdea6d49f7d2f ./test_inputs/codegen/shift2.in +d65cdc135e34892bbf50627d6a41ddf8 ./test_inputs/codegen/shift.c +e26233006d7a5afaf5d97923eb117e1a ./test_inputs/codegen/separation_class.c +ddf5c75e49bfd3c9c5700f8bc45bc4d7 ./test_inputs/codegen/hoist.in +ba22fb7522a984f0c475bdaa1859111e ./test_inputs/codegen/atomic3.in +a03464aa14d9710e09692d0fdca3d812 ./test_inputs/codegen/shift_unroll.in +5a9b84d6336b7087257d299b599ce2d3 ./test_inputs/codegen/pldi2012/figure8_b.c +37f506af8f5a5e3828575270b17a8e5f ./test_inputs/codegen/pldi2012/figure7_c.c +87a8321461e0a976e74764280df42e27 ./test_inputs/codegen/pldi2012/README +4d1dd1e1a96d61cdce60358da9b28c0b ./test_inputs/codegen/pldi2012/figure7_b.in +973a6b9c20fba13d1e58bcd05bf819b8 ./test_inputs/codegen/pldi2012/figure7_d.in +aedc342eecc273166d3aaf32d901e3c4 ./test_inputs/codegen/pldi2012/figure7_c.in +6feb63a74791ffbc19c464a5af263a44 ./test_inputs/codegen/pldi2012/figure8_a.c +a0eb0b5cb78f242966eb6f567e784976 ./test_inputs/codegen/pldi2012/figure7_d.c +fa1fc4278413c58046f13f6a5a6562ad ./test_inputs/codegen/pldi2012/figure8_a.in +7e90d68fb9381061f6db39d4a6e5abf8 ./test_inputs/codegen/pldi2012/figure7_b.c +a73c6a18b84f3ec917be135a209fd9f2 ./test_inputs/codegen/pldi2012/figure8_b.in +22ad762b0afd043e5e2d76a0419e1cc2 ./test_inputs/codegen/shift.in +e8dc63a942a11c0e72fa3f1894be6328 ./test_inputs/codegen/single_valued.in +a742c88219305cdf8b89c8e2cd6adfe4 ./test_inputs/codegen/dwt.in +67b1489a711c3cdd4c420095f924856b ./test_inputs/codegen/unroll4.in +027294e59bb02a5795b3dc86f94507d2 ./test_inputs/codegen/stride6.c +ea8e88103c1e38c012c2fbb1f9e734ab ./test_inputs/codegen/stride.in +47513d43f9513ec4f19841b8eec58d7f ./test_inputs/codegen/unroll2.c +c781780edc51a09e1b7b02cb911674a8 ./test_inputs/codegen/omega/lu_ijk-1.in +a80cd77f90cd58e98a4795c250c30642 ./test_inputs/codegen/omega/wak3-1.in +6b644728927980b2625a33f844369cae ./test_inputs/codegen/omega/lefur04-0.in +90c80ff52d9d61aebe85a41dd4d1893e ./test_inputs/codegen/omega/dagstuhl1-1.in +eb1b4d92529cc01f3423ec3926d2197c ./test_inputs/codegen/omega/basics-0.in +377867cb426c95691d939b0430609a39 ./test_inputs/codegen/omega/iter7-0.in +0f00e5f0409f4fb7656f295128f93e46 ./test_inputs/codegen/omega/fc2-1.c +c7d0c55d6ba7a63de5ae4ddc8a9f74d9 ./test_inputs/codegen/omega/lu_spmd-1.in +04c595d251882f7eaa8c85264db589a7 ./test_inputs/codegen/omega/stride1-0.in +17b4df4faeb3edbec6a6dccc10dae5c4 ./test_inputs/codegen/omega/m7-0.in +a958a33a166c4a66697dd9e4a6aa1ed1 ./test_inputs/codegen/omega/code_gen-1.c +184fcec0f4d287597cf6f18cdf255e09 ./test_inputs/codegen/omega/lefur03-0.c +acd7e26a3091268adad778dbe506afb9 ./test_inputs/codegen/omega/fc1-0.in +5b36f2aa6e3174a4c73ab1112ee6a23e ./test_inputs/codegen/omega/hpf-0.in +20b77c7f61da782eadedbe8022b0dc66 ./test_inputs/codegen/omega/stride6-0.c +91a5dfa82c4dab352e1f6e5e31aad8cd ./test_inputs/codegen/omega/wak3-0.in +b0a44d7b43f0ad63b4367aef5b11a863 ./test_inputs/codegen/omega/lift2-2.in +a95dfb969dbc891628a21a0110938c31 ./test_inputs/codegen/omega/wak2-0.c +cdd4aeb166d830cbd04ebb5284542dd5 ./test_inputs/codegen/omega/m10-0.c +52be200b5b9538752ea20d161af95eb2 ./test_inputs/codegen/omega/dagstuhl1-1.c +3232bd30c0bab6d13d2e6a116680807d ./test_inputs/codegen/omega/stride7-1.c +81be741f4c6eee452168c100f3a4f4ac ./test_inputs/codegen/omega/stride6-1.in +c7832b248ffc295b8794cb8928684d83 ./test_inputs/codegen/omega/iter9-0.c +acd7e26a3091268adad778dbe506afb9 ./test_inputs/codegen/omega/fc2-0.in +4895538c02081336ff3b087d5d761fd9 ./test_inputs/codegen/omega/wak3-0.c +5abe9b22975ad2e2bc33b96f5e32837e ./test_inputs/codegen/omega/m9-0.c +79c02328d53f731e4bcb18a9cec1d561 ./test_inputs/codegen/omega/stride5-0.in +92c2a2c7f9e5308fc4550070c726cb74 ./test_inputs/codegen/omega/floor_bound-0.c +eebbc457f27b18a4080996599c596d0c ./test_inputs/codegen/omega/p.delft2-0.in +e3fa6fe7e6affc8fdd35e6b7e42ec57c ./test_inputs/codegen/omega/m10-0.in +698f2fba5278e0c5ec94b5c233aeffad ./test_inputs/codegen/omega/substitution-1.c +37f506af8f5a5e3828575270b17a8e5f ./test_inputs/codegen/omega/if_then-2.c +7ba0c52d71366ca9cb740c2ce0a55778 ./test_inputs/codegen/omega/lu_ijk-1.c +562ae85fc4315bc164585a40bb2f2ef8 ./test_inputs/codegen/omega/stride3-0.c +ef979c3a6602006d4d47da3723481543 ./test_inputs/codegen/omega/if_then-0.in +eb1b4d92529cc01f3423ec3926d2197c ./test_inputs/codegen/omega/p6-0.in +837015659c742cb9ef2c4e0245848a36 ./test_inputs/codegen/omega/ts1d-orig0-0.in +7f22b830d2784c36f3b1be1c99401c06 ./test_inputs/codegen/omega/m1-0.c +230fdd1603a30164175abdb66ef7ad7e ./test_inputs/codegen/omega/p6-0.c +fe131adc8d24752ed9c5cfcabe0c83a9 ./test_inputs/codegen/omega/dagstuhl1-0.c +58bdd8fafe3a1bc37b932c60ddc5b033 ./test_inputs/codegen/omega/olda-0.in +c056fb5866c36b500e1d4c4633a4aa79 ./test_inputs/codegen/omega/chosol-1.c +02c4ff112981ff964c4c6b0a1b09657a ./test_inputs/codegen/omega/p.delft-0.c +89573c24beba8a46a27ddf0b37257d29 ./test_inputs/codegen/omega/ts1d-check-sblock-0.in +1197cdd77a22b295bc1657684ff76c7a ./test_inputs/codegen/omega/iter3-0.in +b0163afae4e2e450aec389321e5089d9 ./test_inputs/codegen/omega/iter7-0.c +b9cf1fab9fdff553cea9893f8b30f1d3 ./test_inputs/codegen/omega/substitution-2.in +7083f865f19e0e842c1e01169cc9a244 ./test_inputs/codegen/omega/iter4-0.in +82c850793604225df7120bdbffe7f838 ./test_inputs/codegen/omega/lu-3.c +228aed9c710847cf689a0fb936780a7f ./test_inputs/codegen/omega/iter5-0.in +897398c54f35ea9d7a120f05d0dd2fa1 ./test_inputs/codegen/omega/wak2-0.in +c056fb5866c36b500e1d4c4633a4aa79 ./test_inputs/codegen/omega/chosol-0.c +aace395985f0aa32c66ceca472e57355 ./test_inputs/codegen/omega/README +0f7ed11cea521e6c590e619907571162 ./test_inputs/codegen/omega/syr2k-3.in +cf83e2b7249e0d58dcde62785fb6a0b6 ./test_inputs/codegen/omega/p.delft2-0.c +85f20992759b5ece7583c572d02c1a0e ./test_inputs/codegen/omega/iter6-0.c +372a4af3efdd7eb440c4f1ed1dcab750 ./test_inputs/codegen/omega/floor_bound-4.in +982c95381c3a76b348f27b31c24b3e01 ./test_inputs/codegen/omega/chosol-0.in +fcc0701bb4824c04cd52c78b9699d772 ./test_inputs/codegen/omega/lefur01-1.c +1dd615420a5ddfa0f476cb6aebe81e13 ./test_inputs/codegen/omega/m9-0.in +1c2093790dd2949c2b17b1bb89547809 ./test_inputs/codegen/omega/m3-0.in +6a0babb278a1d51fcb9f3956042b40d1 ./test_inputs/codegen/omega/m7-0.c +63c4b10d46c85f59f642db325f7a8529 ./test_inputs/codegen/omega/m7-1.in +0f623214f01c6c5b29782816ec198d33 ./test_inputs/codegen/omega/iter2-0.c +8a7f8cc63b50dd8e9bc97bb2854a8d09 ./test_inputs/codegen/omega/m12-1.in +333e8937b4b965fcfacaa9642ccf9dc2 ./test_inputs/codegen/omega/guard1-1.c +c4e8728b65ceb90246be9277e691b2fc ./test_inputs/codegen/omega/if_then-5.in +e16b8aac84b5f8edf4f5ce2322fc2a39 ./test_inputs/codegen/omega/ts1d-mp-i_ts-m_b-0.in +c7aa27ca2ebca44f7b0313e0d8f7ae9f ./test_inputs/codegen/omega/guard1-0.in +4e8ab0802e9990cda6046977b9611358 ./test_inputs/codegen/omega/iter6-1.c +7e90d68fb9381061f6db39d4a6e5abf8 ./test_inputs/codegen/omega/if_then-1.c +ee98793eb1bede43b128b6c53fa53c7b ./test_inputs/codegen/omega/stride7-0.c +4da5018d6dce4be69ba0e207ac8aae61 ./test_inputs/codegen/omega/floor_bound-2.in +0f7ed11cea521e6c590e619907571162 ./test_inputs/codegen/omega/syr2k-1.in +7320bc8a4bd1ee76a25ac333730069cf ./test_inputs/codegen/omega/lefur00-0.in +29175d6b71ad41f59e59a8d2548d364d ./test_inputs/codegen/omega/lift1-5.c +55e796d935193970dd86cc77b140c8a3 ./test_inputs/codegen/omega/fc1-1.in +54cb3de23ccecadfabdd5485b79165c2 ./test_inputs/codegen/omega/lift2-4.c +1c2093790dd2949c2b17b1bb89547809 ./test_inputs/codegen/omega/basics-1.in +64f1075e7670ab5e038cb7b8b63a7d81 ./test_inputs/codegen/omega/m9-1.in +7f8a88e638fb2521a3ffeb2a015b2fa1 ./test_inputs/codegen/omega/floor_bound-2.c +d50368f84dda08f7d0d2e09916fc8e08 ./test_inputs/codegen/omega/lift1-1.c +12225bda2a6012fc3917d7e87119ad98 ./test_inputs/codegen/omega/lift1-3.c +b4b3783cee4aa29e6a47cf16f7703d55 ./test_inputs/codegen/omega/iter3-0.c +82004cd05074ee36def30084a3fcfa47 ./test_inputs/codegen/omega/stride3-0.in +c9d3a6bf9e11e80cdd238013a1749a07 ./test_inputs/codegen/omega/substitution-4.c +7d8bef10f64ba1a7ee5ca54dbdec5697 ./test_inputs/codegen/omega/x-1.in +26f8d061589d67c1acf4c39cb4ddb771 ./test_inputs/codegen/omega/m12-1.c +02c4ff112981ff964c4c6b0a1b09657a ./test_inputs/codegen/omega/hpf-0.c +a7c8f7f994f0d3e324167d8c388d5c7e ./test_inputs/codegen/omega/m8-1.in +bc8c808c7bcd67aee9ff20a6c877bc51 ./test_inputs/codegen/omega/iter2-0.in +df2165b3622e891789b5614a760ea97b ./test_inputs/codegen/omega/floor_bound-1.c +611057fb9d624c6550aef522cd86f72a ./test_inputs/codegen/omega/lift2-1.in +da76a8707e33c1aa8b032f6f37f3c634 ./test_inputs/codegen/omega/gist-2.in +d9b1e12623ece7d847c3d773dc64ba9a ./test_inputs/codegen/omega/stride7-1.in +28cfd29665b53c4a58da513405f430ab ./test_inputs/codegen/omega/floor_bound-3.in +ef3536a5acbc5505d8e8c99318574fb9 ./test_inputs/codegen/omega/m7-1.c +fcb94247bd9d4f1f406f4e205fb0c54c ./test_inputs/codegen/omega/wak3-1.c +69def64736dd8f3bec963c8754ee521c ./test_inputs/codegen/omega/wak1-1.in +3909f9f6375549bd83e4b5cf021bcdb9 ./test_inputs/codegen/omega/ts1d-check-sblock-0.c +14c56e8e331e889c3ec9fd4efaf51787 ./test_inputs/codegen/omega/lu-0.c +bc18c114705ca4d6428e34f702d70a79 ./test_inputs/codegen/omega/iter1-0.c +32065e48dfeabfa16eb5c64f1f424660 ./test_inputs/codegen/omega/m3-0.c +2baaac6191efad95803678b03da15b3e ./test_inputs/codegen/omega/floor_bound-4.c +449ecbba06d4c3b2023296f118f95e75 ./test_inputs/codegen/omega/lift2-0.in +c8e73cae1596069aa097a46a1d93e2d8 ./test_inputs/codegen/omega/m2-1.in +a901f20e641abc144fc8389c9e1ced44 ./test_inputs/codegen/omega/ge-0.c +0f00e5f0409f4fb7656f295128f93e46 ./test_inputs/codegen/omega/fc1-1.c +4cc58bb05c645552be9722725525a522 ./test_inputs/codegen/omega/ge-1.in +7320bc8a4bd1ee76a25ac333730069cf ./test_inputs/codegen/omega/lefur01-0.in +9169c781a8093884afdfce7c462950e8 ./test_inputs/codegen/omega/m12-0.c +800526458f8ee79b3e01adb14150a7e3 ./test_inputs/codegen/omega/iter5-0.c +c25a76a6ccf6928506052ca0535ab8e5 ./test_inputs/codegen/omega/lift2-3.c +7ba754d7e8c61fc908c25d3d02eb3324 ./test_inputs/codegen/omega/gc-0.c +05d239d4042f28244ddf1a6494774f92 ./test_inputs/codegen/omega/gist-5.c +69681f1af189a32aae7b06c79c01caf6 ./test_inputs/codegen/omega/m11-0.c +5abe9b22975ad2e2bc33b96f5e32837e ./test_inputs/codegen/omega/m9-1.c +01b0da684ba46c096453393eeb97bdad ./test_inputs/codegen/omega/x-0.c +7dc83835470cd5e1c01be3cce2faf13c ./test_inputs/codegen/omega/m4-1.in +2e867c447b50d83f020b972bcddf0171 ./test_inputs/codegen/omega/wak4-1.c +1e67fa3045fad4b8c896249f75b81344 ./test_inputs/codegen/omega/wak2-1.in +1f0801a7b36078815f2e18d3a04627d0 ./test_inputs/codegen/omega/syr2k-2.c +6b4750955bc53f25259c2a85cf05ff08 ./test_inputs/codegen/omega/m8-0.c +5bf08a1069739cbe77c1b5220adaf821 ./test_inputs/codegen/omega/olda-1.c +6c84f9ca665bcebb9a3438d4ba2a9c1f ./test_inputs/codegen/omega/syr2k-0.in +5b9214196aa62e6827b82fbb2602d207 ./test_inputs/codegen/omega/lift1-4.in +01f214f7fdaf47d73642db585522656f ./test_inputs/codegen/omega/wak4-1.in +29db37879da2d5f803905ca260edfe54 ./test_inputs/codegen/omega/m1-1.c +e8e2de2dcba5c2f4372b8562c3c1493e ./test_inputs/codegen/omega/if_then-4.c +7829a194432a0016c99dadf62a05ccca ./test_inputs/codegen/omega/dagstuhl1-0.in +fba6f8622dc06bae1bc9b35d1a6dfce1 ./test_inputs/codegen/omega/gc-0.in +082eb23b3ee886ad64f25475f0f56965 ./test_inputs/codegen/omega/syr2k-3.c +8ee51cd408fd9ca9867dcd0a10bf7ce3 ./test_inputs/codegen/omega/p.delft-0.in +0606a483e9b222ef1a8c717c9d366ce9 ./test_inputs/codegen/omega/lift2-5.in +dd01536bd1247acc50c5d9d844c14bea ./test_inputs/codegen/omega/gist-3.in +e3749bea5bd0d8f0340ca2e3d55ccb55 ./test_inputs/codegen/omega/lu-3.in +d0f46270a36621255fbdb14e3e692247 ./test_inputs/codegen/omega/m12-0.in +e2af18f4e5180679864c2e4c83554213 ./test_inputs/codegen/omega/gist-5.in +34cb234466db0d70fe0ed996413f7533 ./test_inputs/codegen/omega/lu_spmd-0.c +37b09f5affa64c3a12767ef7dd13a517 ./test_inputs/codegen/omega/floor_bound-5.c +a79db9f0ad524607b056fcfc0c807280 ./test_inputs/codegen/omega/wak1-1.c +350511c263d8934124d57d9ba049fa13 ./test_inputs/codegen/omega/lift2-1.c +7ba0c52d71366ca9cb740c2ce0a55778 ./test_inputs/codegen/omega/lu_ijk-0.c +ed776665bea219854f087a663689dfb5 ./test_inputs/codegen/omega/fc1-0.c +67f8d1445b5042410a51d10c06405989 ./test_inputs/codegen/omega/lu-2.in +7d8bef10f64ba1a7ee5ca54dbdec5697 ./test_inputs/codegen/omega/x-0.in +b390d502e0ae0a550a96f4892bf9e52b ./test_inputs/codegen/omega/gist-2.c +2b8fe7b076780bfdc3ccc78326de9e29 ./test_inputs/codegen/omega/m10-1.c +434773b76631d029260461cfeed54978 ./test_inputs/codegen/omega/stride4-0.in +6c84f9ca665bcebb9a3438d4ba2a9c1f ./test_inputs/codegen/omega/syr2k-2.in +63f10115ea373321e13d9a86a26e5d14 ./test_inputs/codegen/omega/stride5-0.c +6421bec1258a5280396bc0582011df12 ./test_inputs/codegen/omega/stride4-0.c +81be741f4c6eee452168c100f3a4f4ac ./test_inputs/codegen/omega/stride6-2.in +88e5d46871928637eddfb25f82791bcb ./test_inputs/codegen/omega/stride2-0.c +14c56e8e331e889c3ec9fd4efaf51787 ./test_inputs/codegen/omega/lu-2.c +a901f20e641abc144fc8389c9e1ced44 ./test_inputs/codegen/omega/ge-1.c +c2e18044b3517198389a9d4f3c6b1db0 ./test_inputs/codegen/omega/substitution-3.c +4097b5b715e79be371a47de5a3d4e7ef ./test_inputs/codegen/omega/fc1-2.in +c64e05124d32dee630c2eb5647ed3b12 ./test_inputs/codegen/omega/floor_bound-1.in +735f4d2ca33aff465a2a3d39a67c8231 ./test_inputs/codegen/omega/lefur04-0.c +39a04487aff4f06ba5218ea56afb6b5f ./test_inputs/codegen/omega/stride6-1.c +e9733c6122862e99bf3296074200897d ./test_inputs/codegen/omega/m1-0.in +7aeb88856d9d8b00f4b59b376eaf8ec7 ./test_inputs/codegen/omega/iter1-0.in +2e867c447b50d83f020b972bcddf0171 ./test_inputs/codegen/omega/wak4-0.c +99943b13e7e1c034fde72155a5eaa805 ./test_inputs/codegen/omega/ts1d-orig0-0.c +48cb62db61c182f0201ae31ff3a5f3f2 ./test_inputs/codegen/omega/guard1-1.in +65da1ec683e160909add125c787bfc97 ./test_inputs/codegen/omega/lefur00-0.c +dd16d11827596228b1bab2d23c529b38 ./test_inputs/codegen/omega/stride6-0.in +95bc74ef5ee5e7c576a70c29848d4770 ./test_inputs/codegen/omega/gist-1.in +d7f938c2bbea00de27dcfdd46d8a6801 ./test_inputs/codegen/omega/substitution-0.c +914bbea377169b7422958ee66a3edbca ./test_inputs/codegen/omega/code_gen-2.in +230fdd1603a30164175abdb66ef7ad7e ./test_inputs/codegen/omega/basics-0.c +08d1ed5a8987d854d64854383024b5d5 ./test_inputs/codegen/omega/floor_bound-0.in +e72eb9c17f13896afa2061ef7054d23b ./test_inputs/codegen/omega/gist-4.c +ede8b17849b454caf135cd6a687bad93 ./test_inputs/codegen/omega/iter6-0.in +1bef97fc6a5012588386ba354d4681c1 ./test_inputs/codegen/omega/m2-1.c +ba06f694641baf9d41feb890377d95d6 ./test_inputs/codegen/omega/lu_ijk-2.c +55e796d935193970dd86cc77b140c8a3 ./test_inputs/codegen/omega/fc2-1.in +e9e0b33729c3b3be7d63db23cb99b940 ./test_inputs/codegen/omega/ge-0.in +32c3645bba3108aac00f4bbd33d3f0c3 ./test_inputs/codegen/omega/lift1-5.in +bbdafed93f1ccccf2b3037db4c0c604f ./test_inputs/codegen/omega/iter8-0.c +285c607aed03cb6499256aec548d769c ./test_inputs/codegen/omega/if_then-2.in +b839b869a2f6bac00381c21de1c06373 ./test_inputs/codegen/omega/substitution-4.in +a0eb0b5cb78f242966eb6f567e784976 ./test_inputs/codegen/omega/if_then-3.c +39a04487aff4f06ba5218ea56afb6b5f ./test_inputs/codegen/omega/stride6-2.c +14c56e8e331e889c3ec9fd4efaf51787 ./test_inputs/codegen/omega/lu-1.c +9cf5bab507ac73355e50fa96c81050ee ./test_inputs/codegen/omega/substitution-1.in +da1daee4c83df0c62081d60baea8e1df ./test_inputs/codegen/omega/lu-1.in +b2b1ce04875c2e98b785c7316ae5e62b ./test_inputs/codegen/omega/chosol-1.in +148844f79ce4d3f4fefecff8b6a20ac7 ./test_inputs/codegen/omega/lu_ijk-0.in +65da1ec683e160909add125c787bfc97 ./test_inputs/codegen/omega/lefur01-0.c +8a15a718e93d0af88c2eb3c01bb87f42 ./test_inputs/codegen/omega/stride2-0.in +0f00e5f0409f4fb7656f295128f93e46 ./test_inputs/codegen/omega/fc1-2.c +c890cc16640a81c451c25fcffa615e50 ./test_inputs/codegen/omega/wak2-1.c +5abe9b22975ad2e2bc33b96f5e32837e ./test_inputs/codegen/omega/m4-1.c +52827a19fdcb3c3f8f377120167d5be8 ./test_inputs/codegen/omega/iter8-0.in +1a7a8766cdfd955b876d00d6d09bc2c9 ./test_inputs/codegen/omega/floor_bound-5.in +b180ba7041c20812663fc5dd8bfb1b81 ./test_inputs/codegen/omega/floor_bound-3.c +e2d710b1eb00e8432cc4b2ea50bd94d6 ./test_inputs/codegen/omega/lu_spmd-0.in +70fa9426f9bb7594c1f522181376219f ./test_inputs/codegen/omega/iter4-0.c +86ede3c53344f7bc9102927aa21428d6 ./test_inputs/codegen/omega/lu_ijk-2.in +ebaa4a6cc13240f8f990b25bf2f9b7af ./test_inputs/codegen/omega/gist-1.c +cbe1d7a078245836dc52cae2f6864ef2 ./test_inputs/codegen/omega/gist-4.in +713e985aca464a5d1d7f3e6cb9b19d58 ./test_inputs/codegen/omega/substitution-2.c +315627eec221f817af8ed5aaa48d5f3f ./test_inputs/codegen/omega/guard1-0.c +01b0da684ba46c096453393eeb97bdad ./test_inputs/codegen/omega/x-1.c +47ab37ecabc12821c8a2a0ea885f6c9b ./test_inputs/codegen/omega/m2-0.in +f4b90d6d676673af57669563e92394e3 ./test_inputs/codegen/omega/code_gen-1.in +e8e2de2dcba5c2f4372b8562c3c1493e ./test_inputs/codegen/omega/if_then-5.c +f593c00b48c74a4da23cba6fb4a61050 ./test_inputs/codegen/omega/collard-0.c +672c71b40a119d34460e082eac018b78 ./test_inputs/codegen/omega/gist-3.c +a12c9a4bde144b80b5b594812f76bfbb ./test_inputs/codegen/omega/code_gen-0.in +65c93fde9c53788925fbda181ca06f45 ./test_inputs/codegen/omega/iter9-0.in +32065e48dfeabfa16eb5c64f1f424660 ./test_inputs/codegen/omega/basics-1.c +1f0801a7b36078815f2e18d3a04627d0 ./test_inputs/codegen/omega/syr2k-0.c +bfd0abcec8db5c646387da5c908c1aeb ./test_inputs/codegen/omega/lift1-3.in +6feb63a74791ffbc19c464a5af263a44 ./test_inputs/codegen/omega/gist-0.c +de97ef08c5acfca0692bb2d1ae754319 ./test_inputs/codegen/omega/lift1-1.in +c57b889cb9d0c2e044fcfe822fd595c4 ./test_inputs/codegen/omega/floor_bound-6.c +dd88e665c4a3126bade7e8c9d4360815 ./test_inputs/codegen/omega/m8-1.c +1bb689c1f964a751355d4d7f5f87cdf6 ./test_inputs/codegen/omega/ts1d-check0-0.in +c60fbfb273b408f7c326a317257511ed ./test_inputs/codegen/omega/substitution-3.in +2260eebe2b5996c646ee689951c2c345 ./test_inputs/codegen/omega/m1-1.in +e314e913ee567b9a6fcbae90775ec591 ./test_inputs/codegen/omega/if_then-0.c +9a7597e49b623a7a5d9335778430a6f6 ./test_inputs/codegen/omega/lift2-2.c +88eea6da74fe40ea02ef1d4d22a5f84d ./test_inputs/codegen/omega/m11-0.in +70de35226b27a8d97d7c3a04b8e840d1 ./test_inputs/codegen/omega/iter6-1.in +7dd0cafcd9919b4b223b933293ab56fe ./test_inputs/codegen/omega/lift1-0.c +0ff1f434a994d753dab9d0107e6b4344 ./test_inputs/codegen/omega/substitution-0.in +1c2093790dd2949c2b17b1bb89547809 ./test_inputs/codegen/omega/p6-1.in +411d20ccce31745897678e19467af395 ./test_inputs/codegen/omega/stride7-0.in +75534063fdc9cc12522d4bc7edfab88f ./test_inputs/codegen/omega/lift1-4.c +51339d4a0a42b4784a8932cf2cd50303 ./test_inputs/codegen/omega/if_then-4.in +e6a7f88bf9228619e4e86cefed3f45e8 ./test_inputs/codegen/omega/ts1d-check0-0.c +e2da3009de781dedbdeeb84ad9c07d0c ./test_inputs/codegen/omega/m10-1.in +bd9547e41a4c7514aa0027ddd3cc2dc7 ./test_inputs/codegen/omega/code_gen-0.c +267450db952b66e8cfe5a1a51d1bd2db ./test_inputs/codegen/omega/m8-0.in +a4d4c27d25cde1bc5582123492cf9fdc ./test_inputs/codegen/omega/m4-0.in +353dcb24d8bb9f787d2b298a4749977d ./test_inputs/codegen/omega/olda-0.c +8c8406d04be12b143b47da391fb8ae63 ./test_inputs/codegen/omega/lift1-0.in +7f4184bf00ff163f022dfd04e4bc1035 ./test_inputs/codegen/omega/olda-1.in +83d1247cd0dac2174561842bcbf58bac ./test_inputs/codegen/omega/ts1d-mp-i_ts-m_b-0.c +9a104272e5c11dd105d02bce36c4222b ./test_inputs/codegen/omega/lift2-5.c +c70884777261591669e1841b3a9b1b7a ./test_inputs/codegen/omega/lift1-2.c +b2c1b915c5667acdafab6fe0c0ba04f4 ./test_inputs/codegen/omega/lefur01-1.in +f7bdd4a664a21811908bc0e404f5b4cd ./test_inputs/codegen/omega/if_then-3.in +9e96479726ca7dba3def6456557e4070 ./test_inputs/codegen/omega/if_then-1.in +69fb08b48d4b30a0a9897f6e3920f3dc ./test_inputs/codegen/omega/lift2-3.in +4e0479d2d8d98bf7580a563ce8037b84 ./test_inputs/codegen/omega/m2-0.c +9fdc90050d1bec30a68ec0c446416244 ./test_inputs/codegen/omega/collard-0.in +cb36da59e4431c68e01c84b722e0a0d1 ./test_inputs/codegen/omega/floor_bound-6.in +34cb234466db0d70fe0ed996413f7533 ./test_inputs/codegen/omega/lu_spmd-1.c +f3da1794adbe62ce337fc2c2d46abead ./test_inputs/codegen/omega/gist-0.in +71f3ae0e51885986c712ea135c6c0337 ./test_inputs/codegen/omega/wak1-0.c +dba48730751beb92149a30e3fe4489a0 ./test_inputs/codegen/omega/code_gen-2.c +5abe9b22975ad2e2bc33b96f5e32837e ./test_inputs/codegen/omega/m4-0.c +32065e48dfeabfa16eb5c64f1f424660 ./test_inputs/codegen/omega/p6-1.c +082eb23b3ee886ad64f25475f0f56965 ./test_inputs/codegen/omega/syr2k-1.c +2ab9d75c8c5f18da9de9c730306c219a ./test_inputs/codegen/omega/lu-0.in +86c114ae106f89cff818cce99009af42 ./test_inputs/codegen/omega/lift2-4.in +c4cd06f5930f31e5c45a30b6f049cec8 ./test_inputs/codegen/omega/wak1-0.in +ed776665bea219854f087a663689dfb5 ./test_inputs/codegen/omega/fc2-0.c +4a7faa437d26723c0e015f7342d48a13 ./test_inputs/codegen/omega/stride1-0.c +bc2d9088a42d8f8b89bd9a8f23d40c99 ./test_inputs/codegen/omega/lift2-0.c +3d77eedf9f86edb0379eb1d956ddea9e ./test_inputs/codegen/omega/lefur03-0.in +cf4eb1c47a385d7ffa133b7647b3f145 ./test_inputs/codegen/omega/wak4-0.in +ba78da065083ac2913cd0f4ba7f17b0c ./test_inputs/codegen/omega/lift1-2.in +92e6a40c22c09b172cf6d4d70fcc6414 ./test_inputs/codegen/unroll3.c +54fb54084149cd95790c91f2b8f49aa3 ./test_inputs/codegen/separation_class2.c +6eaa6fca5a5256ca6371a71ee90172b9 ./test_inputs/codegen/cloog/block3.in +8730b9ca5ca4b996b4f5a6978d300d6e ./test_inputs/codegen/cloog/walters.c +96e6a16d5b1e9b79717e549ee566fe81 ./test_inputs/codegen/cloog/christian.c +d49c6b7ca54a903cfe248b61182c8b72 ./test_inputs/codegen/cloog/constant.c +312b5280ae4b914b8f03025f0698048e ./test_inputs/codegen/cloog/reservoir-mg-interp.c +801d62b41df8269b678d3c461cd6b50f ./test_inputs/codegen/cloog/reservoir-pingali1.c +3c6529d8aba738f676112fdff77c1de6 ./test_inputs/codegen/cloog/test.c +a4d782d6a7d0b3d1ed44203cc557236c ./test_inputs/codegen/cloog/vivien2.c +fd43b392cbdd91ccbbca6f52a2838143 ./test_inputs/codegen/cloog/mod2.c +6ab73575e1f2e81d2ae310db947d34ab ./test_inputs/codegen/cloog/basic-bounds-5.in +a4c2d2de5e73cb55db8aa6e649b3dc70 ./test_inputs/codegen/cloog/rectangle.c +89fa4731956bfedda5f9ed83b3e64a35 ./test_inputs/codegen/cloog/min-1-1.c +609bdfb2d050de3c7268e67b5e6999cf ./test_inputs/codegen/cloog/4-param.c +a8dce515c191bee60a3996551246a361 ./test_inputs/codegen/cloog/vivien.in +2972058254af0c76d21485a7cf13eb63 ./test_inputs/codegen/cloog/singleton.c +f9d9e4061b74f10e367557b783e52fa1 ./test_inputs/codegen/cloog/merge.in +b8bb13a3d48aa6db6515afb89daf6753 ./test_inputs/codegen/cloog/dot.c +066f011f426acb011a1ccde501d164c5 ./test_inputs/codegen/cloog/reservoir-mg-rprj3.c +5b385da1ed4e37325c9efe7c3590b982 ./test_inputs/codegen/cloog/union.c +f9d98d498aedbae740897c10d20464f8 ./test_inputs/codegen/cloog/reservoir-mg-interp.in +58373fec97430c5041cc2a8f579db499 ./test_inputs/codegen/cloog/reservoir-mg-interp2.in +9badd33c77b478ec2fbf5c3b34357a5c ./test_inputs/codegen/cloog/dot.in +0e420a5af663dc22ea89421a407d4a77 ./test_inputs/codegen/cloog/min-4-1.in +f4e6f6f9f3b26ffb37085a34b37e8abe ./test_inputs/codegen/cloog/stride2.c +d16f6009912d9898cc16b30b1508a885 ./test_inputs/codegen/cloog/gesced.c +f96eb190e382438a3eeca6ad92d89bb2 ./test_inputs/codegen/cloog/swim.in +a81aaa9562a4967f82aa5845c8eaebd1 ./test_inputs/codegen/cloog/reservoir-stride.in +3936b9d9a992bccb685f56ab95c67eca ./test_inputs/codegen/cloog/reservoir-loechner4.in +60527787a60cabca8bfaddfd6be5823a ./test_inputs/codegen/cloog/constbound.c +171a6dae4269b47b326683e0c0f1346a ./test_inputs/codegen/cloog/stride.c +402ea456f27c8b35a779ecf9a7ec6cef ./test_inputs/codegen/cloog/reservoir-lim-lam3.in +98a66a01505e508d27d964a27605f19d ./test_inputs/codegen/cloog/emploi.in +af8968cb34c8d55e5297a75498d78477 ./test_inputs/codegen/cloog/reservoir-liu-zhuge1.c +f76e6c58efc4b132404b3462fec3fa53 ./test_inputs/codegen/cloog/4-param.in +84e2cac6083adeab76af61c0ee372ad4 ./test_inputs/codegen/cloog/largeur.c +893232f3ecfd9b34c5fdbffa82796593 ./test_inputs/codegen/cloog/reservoir-pingali4.c +22ab0dfa531117f16e17021e7c31a3a0 ./test_inputs/codegen/cloog/unroll.c +5f14c566685b8e6456aa4fe9120fbab5 ./test_inputs/codegen/cloog/basic-bounds-2.c +4aa4e08533d5cacedd26488c5bbf3c58 ./test_inputs/codegen/cloog/cholesky2.c +fb75e2d08846519eef295df9b61229d4 ./test_inputs/codegen/cloog/min-1-1.in +76a828045fe25dcd19581d93b7d4906b ./test_inputs/codegen/cloog/reservoir-lim-lam6.c +4f862e2e5ff5b07f4cab73ea3891fcaa ./test_inputs/codegen/cloog/esced.c +50535abd9eb91e2d794d2ea6640db737 ./test_inputs/codegen/cloog/classen.in +871f3de8acfdb4b4e00bdc919e82684b ./test_inputs/codegen/cloog/iftest.in +ca32b8be27b434fb15c4192d54575477 ./test_inputs/codegen/cloog/nul_basic2.c +e2cd3b83da1df0adef6d14fd2eb1b70f ./test_inputs/codegen/cloog/durbin_e_s.c +540787f80c2deded6560c7cb5c01e92a ./test_inputs/codegen/cloog/lex.in +f4756d1e584002f2bd49c0ba16671475 ./test_inputs/codegen/cloog/youcefn.in +832287077d91d944026780209649cef6 ./test_inputs/codegen/cloog/min-2-1.c +c3a79d088d2f656adefae0be0199c305 ./test_inputs/codegen/cloog/pouchet.c +19680becbe0f938e662415941bf6504d ./test_inputs/codegen/cloog/yosr2.c +cffe58d1fddfcaef7309964959b38f22 ./test_inputs/codegen/cloog/wavefront.in +587f8dcec54f80da7694e51ab5728860 ./test_inputs/codegen/cloog/lu.c +74187389bc4ea79b5f74494eff7314ed ./test_inputs/codegen/cloog/reservoir-mg-interp2.c +ad0d0b04c6219cba4bdeae1e18d96449 ./test_inputs/codegen/cloog/byu98-1-2-3.in +482472cc991363fd2658190fcf0741b2 ./test_inputs/codegen/cloog/largeur.in +74603e681190fa20958baceab56c4bdb ./test_inputs/codegen/cloog/0D-1.in +5f32ed990386c211e9954b2054a27bb4 ./test_inputs/codegen/cloog/reservoir-tang-xue1.in +71bcbc67d3a616a3bde2c5e1b32096bc ./test_inputs/codegen/cloog/swim.c +9944668ffb4a8ffad9e9d9af27480622 ./test_inputs/codegen/cloog/reservoir-mg-rprj3.in +8c646a3f0ad6666d3f52530d37c5a25d ./test_inputs/codegen/cloog/mod.in +dccc91d51d37ddf1b1274c60834cfe13 ./test_inputs/codegen/cloog/reservoir-jacobi3.in +906c97b8df83aada3864ef49aec76203 ./test_inputs/codegen/cloog/mxm-shared.in +ea0091482e03e758306a4787504c3eac ./test_inputs/codegen/cloog/reservoir-mg-psinv.c +ccf666ec333c0f9e4b7b6f56b3fd0f0c ./test_inputs/codegen/cloog/1point-2.c +f9581508a0dd4353642f98a936a60086 ./test_inputs/codegen/cloog/reservoir-pingali6.c +3d2a4b8cbfc053a3a4bd2bdc8a79b7e3 ./test_inputs/codegen/cloog/reservoir-loechner5.in +17dcf42681a759e0a9a6e1e0378e372f ./test_inputs/codegen/cloog/README +62e06d6c90fc673d9b18c07459d5bea7 ./test_inputs/codegen/cloog/forwardsub-2-1-2-3.in +c84d0e0bb4d99a0d71f57454df48c783 ./test_inputs/codegen/cloog/cholesky.c +cab6f3747942bf419e8efc94cb15165e ./test_inputs/codegen/cloog/logopar.in +c3bafb2f3ec88da20f56eaa14dbc0f97 ./test_inputs/codegen/cloog/0D-2.in +1b8398ae221895156b4ce51183425682 ./test_inputs/codegen/cloog/yosr.c +567454cb16f59ca0e3e624c6194f106a ./test_inputs/codegen/cloog/reservoir-stride2.c +2857c9e7ff01ee35005e2167ace444d2 ./test_inputs/codegen/cloog/param-split.c +f7ccd191a231b3fbe868ac70fae8ba1d ./test_inputs/codegen/cloog/gauss.in +fab58b45ca475b86d96b21f838065ddf ./test_inputs/codegen/cloog/equality.in +b39305241563be3eb1313b29757364f8 ./test_inputs/codegen/cloog/otl.c +fa9b05bc904a3f0e90178e78f5622379 ./test_inputs/codegen/cloog/darte.c +b496acb778d60bad52e83e744968fed2 ./test_inputs/codegen/cloog/reservoir-loechner4.c +a4cecc2e1b7c6c14771a520e29bfe0f3 ./test_inputs/codegen/cloog/reservoir-fusion1.in +4e1aa8b5a4b52fe764a03555ed742805 ./test_inputs/codegen/cloog/byu98-1-2-3.c +79b23ffa973a1e788684752989d7e4c1 ./test_inputs/codegen/cloog/mxm-shared.c +ed1887ba2e834de6e710335d68c175e4 ./test_inputs/codegen/cloog/dealII.in +cebe37ee71834c63b0a0d8a886e4c521 ./test_inputs/codegen/cloog/dot2.in +d135a6c26da0d4f78e6f3f57c3b76b73 ./test_inputs/codegen/cloog/tiling.c +c32fbef2640f5dc4fd91fa86c2d811bb ./test_inputs/codegen/cloog/block2.c +c0146ded226f3de4600daadf02480907 ./test_inputs/codegen/cloog/jacobi-shared.in +fd505a30367da04bf088955ccf812df1 ./test_inputs/codegen/cloog/classen2.c +be3ed11675da1e6b849f62dbfbc82c68 ./test_inputs/codegen/cloog/lu2.in +ae24c2caf7ccd23b46670e36ed656ff8 ./test_inputs/codegen/cloog/lex.c +2bdba4fd133226e95e4218344240dabb ./test_inputs/codegen/cloog/guide.c +e63e5a39916a8d8c90aa0cec8f7679bb ./test_inputs/codegen/cloog/reservoir-loechner5.c +3440a9d740c0ce02b5abfd4816d4b828 ./test_inputs/codegen/cloog/forwardsub-1-1-2.in +0be7e08b698404133f58172d73526075 ./test_inputs/codegen/cloog/guide.in +35cb27a205f0553c1f721cbc14fa1866 ./test_inputs/codegen/cloog/union.in +9cc6d62b8e7940f7daf8516cd2839f6d ./test_inputs/codegen/cloog/reservoir-loechner3.in +86f0c3e44321041760f6da4113f3eb59 ./test_inputs/codegen/cloog/christian.in +988911a661e385c53710039430d03abb ./test_inputs/codegen/cloog/0D-3.c +85c829fdfc5e03a43c5351a573afa5c2 ./test_inputs/codegen/cloog/nul_complex1.in +70f2fd17939ab66d4534e2661104b1ad ./test_inputs/codegen/cloog/nul_lcpc.in +a002daf3af6bd758dd5ec7271560c57e ./test_inputs/codegen/cloog/vasilache.c +5c7a38e40c81a818ce696f8d548ced8a ./test_inputs/codegen/cloog/unroll2.in +298b697b2f9d2c5e573802270cebf2ba ./test_inputs/codegen/cloog/reservoir-two.in +88824f32e5910aa085a019df520f6735 ./test_inputs/codegen/cloog/mod3.c +7e6649cf99e435480dcb48fba8641df6 ./test_inputs/codegen/cloog/reservoir-stride2.in +e4c4f7358e678758a467dcde45d65e8a ./test_inputs/codegen/cloog/block.in +8afc6f5e3a52818e5380eb22a5051b6b ./test_inputs/codegen/cloog/reservoir-bastoul3.c +f670946d7daeafb8c815194d0c5f411f ./test_inputs/codegen/cloog/dealII.c +569ca7d3c6a1631575010b66351419cd ./test_inputs/codegen/cloog/merge.c +fcbd4066288def81bd29aaa4e46b213d ./test_inputs/codegen/cloog/reservoir-fusion2.c +d3f621452df8d3477d143fa751eac24d ./test_inputs/codegen/cloog/reservoir-pingali4.in +3dade8c694c743513ab017bc0c2ede6a ./test_inputs/codegen/cloog/lineality-1-2.c +ef2377d0c018055d1a6d0eff4c285207 ./test_inputs/codegen/cloog/reservoir-lim-lam3.c +9cafb09b0ae7c6f44b196d8472298481 ./test_inputs/codegen/cloog/reservoir-lim-lam1.c +d9c4917103a5c25297b2660e43ffb84c ./test_inputs/codegen/cloog/nul_complex1.c +3aa3497018855f67a24a48dda3097056 ./test_inputs/codegen/cloog/vasilache.in +497c3cc65bd18c0689703c9777e4fb09 ./test_inputs/codegen/cloog/jacobi-shared.c +1ddb44cb0986f7009cca0eaf19361bb7 ./test_inputs/codegen/cloog/reservoir-jacobi2.in +2e552ad759b1941a7329417cba0898a8 ./test_inputs/codegen/cloog/multi-stride2.in +e6fde8798ffa9c456c6421b264af5462 ./test_inputs/codegen/cloog/reservoir-two.c +b16895bfc29248724fc69fea6db593ee ./test_inputs/codegen/cloog/dot2.c +bace761d21435b50e9ef2a25259469f2 ./test_inputs/codegen/cloog/pouchet.in +1dcaa372909be7ec09bc19db60177715 ./test_inputs/codegen/cloog/0D-3.in +893232f3ecfd9b34c5fdbffa82796593 ./test_inputs/codegen/cloog/reservoir-pingali2.c +55dabf90f96fea06e275fc45a260075c ./test_inputs/codegen/cloog/nul_basic1.c +92801a431363207608647a91bf7d0ad6 ./test_inputs/codegen/cloog/reservoir-pingali1.in +a11da63161f94cd576ca5d61a324e803 ./test_inputs/codegen/cloog/lux.c +4e1649f032ef59b549cdf73752e67192 ./test_inputs/codegen/cloog/basic-bounds-4.in +536ffae79a4ae471882d219c58d8290c ./test_inputs/codegen/cloog/rectangle.in +73fd3184687d13416b3ea9983b09d34c ./test_inputs/codegen/cloog/reservoir-pingali3.c +c8fff5bfd353a46ab8f590567f8802a5 ./test_inputs/codegen/cloog/param-split.in +bae40ef5c40ddb662b311d18dbd9c6d1 ./test_inputs/codegen/cloog/min-3-1.c +701bf382b89804a15f0869e3606bd8b7 ./test_inputs/codegen/cloog/reservoir-fusion2.in +c67262a64c92dc188a15c550440adf55 ./test_inputs/codegen/cloog/emploi.c +fd43b392cbdd91ccbbca6f52a2838143 ./test_inputs/codegen/cloog/mod.c +c78ccae197459fd882135bc70117795d ./test_inputs/codegen/cloog/reservoir-pingali5.c +2f1d2c00658ba370963771e6ac2172c7 ./test_inputs/codegen/cloog/durbin_e_s.in +bf80f46707cf3b9a57d14b65a41a732a ./test_inputs/codegen/cloog/reservoir-lim-lam1.in +7fc685ddca2450b14d3da32ca34f34d4 ./test_inputs/codegen/cloog/reservoir-lim-lam4.c +a654c472d9a29aeb40086ebf5db52452 ./test_inputs/codegen/cloog/lineality-2-1-2.c +c2108f311a2a1150100084d444b6ea33 ./test_inputs/codegen/cloog/donotsimp.c +5b61583c3e8cb3f0692b18afa41da105 ./test_inputs/codegen/cloog/stride4.in +a0142c5b772c61ca57a5434543e77d72 ./test_inputs/codegen/cloog/reservoir-tang-xue1.c +7b354a21379b7124a040f236f860067e ./test_inputs/codegen/cloog/1point-1.c +8806522723803b39501f0b3eb4aaccdb ./test_inputs/codegen/cloog/gesced2.c +988911a661e385c53710039430d03abb ./test_inputs/codegen/cloog/0D-1.c +727bcef266ac21c9ee5d6b1f3936a40e ./test_inputs/codegen/cloog/multi-mm-1.c +637dbde5d9cb6c4d1b5123c4e08616bb ./test_inputs/codegen/cloog/usvd_e_t.c +1f73d1936c9c2aa495ace7654df46178 ./test_inputs/codegen/cloog/basic-bounds-4.c +242fe2c723f4b9a5c108258b179d8187 ./test_inputs/codegen/cloog/constbound.in +61914dc51e3f5f67b5035cbfd9713ac0 ./test_inputs/codegen/cloog/usvd_e_t.in +6579f0e104a61fd4bb178058bee8581f ./test_inputs/codegen/cloog/thomasset.in +e3ad4699973bb6ae858d4e123bbd6a78 ./test_inputs/codegen/cloog/nul_lcpc.c +2ac8bd09085b29cca1eb33bbee4f21ef ./test_inputs/codegen/cloog/constant.in +31831051f070ecde1cd051d0003adcd0 ./test_inputs/codegen/cloog/reservoir-loechner3.c +c32b97c358fbe3ae00da9eca1281d7b4 ./test_inputs/codegen/cloog/reservoir-QR.c +9b59c5b54f773cee4e885922d733ac8f ./test_inputs/codegen/cloog/levenshtein-1-2-3.c +238583fec60d41fc54f3834e337be76f ./test_inputs/codegen/cloog/logopar.c +71cb8d1e120af7c598413e0ec1c066be ./test_inputs/codegen/cloog/mode.c +3fe74f4071c3328eb82a2c3d39d8d5fc ./test_inputs/codegen/cloog/1point-2.in +ea0091482e03e758306a4787504c3eac ./test_inputs/codegen/cloog/reservoir-mg-resid.c +35e3a202889b799fb9aac611fe1ac78d ./test_inputs/codegen/cloog/reservoir-pingali3.in +f59aedd54c6d943b2a18d4d7c015c3ce ./test_inputs/codegen/cloog/reservoir-pingali6.in +5dc73fc5700fff9450397b77f72d45fc ./test_inputs/codegen/cloog/reservoir-pingali5.in +df64965af0d1e2ea8946b4c30572b009 ./test_inputs/codegen/cloog/reservoir-bastoul3.in +b5251ea247d2825b597fe5465c6f79d4 ./test_inputs/codegen/cloog/reservoir-liu-zhuge1.in +f9581508a0dd4353642f98a936a60086 ./test_inputs/codegen/cloog/reservoir-jacobi3.c +5b76b0eef9af8a2300673e0553f609f9 ./test_inputs/codegen/cloog/multi-stride.c +a9ddf7e02182a5a9f59168ff162bda7f ./test_inputs/codegen/cloog/equality2.in +520c5ea0b1983d959a056fb030262bd6 ./test_inputs/codegen/cloog/mod2.in +0177116352504dac087fbd4f1e0a87cc ./test_inputs/codegen/cloog/forwardsub-3-1-2.c +d372ddda377b4a1f93896ef2b1430c1a ./test_inputs/codegen/cloog/no_lindep.c +fca8ed39c4567a6f72abf4c93b8f41b8 ./test_inputs/codegen/cloog/mod4.c +a034dd2c103186c55ce173971483c3da ./test_inputs/codegen/cloog/multi-stride.in +ebb8150d152c22e8476cf47b8f99b1bf ./test_inputs/codegen/cloog/mod3.in +b175146ec376b18f0e63e2c497fe39d5 ./test_inputs/codegen/cloog/reservoir-cholesky2.in +3cc64adb850e0b9c724dabf315a92574 ./test_inputs/codegen/cloog/iftest.c +7b06255142287d746d59073d3c0561f4 ./test_inputs/codegen/cloog/walters2.c +42a7ee4126146f4e2024dcdedb9f52d0 ./test_inputs/codegen/cloog/stride4.c +9c14f7b926565eadfaa531146460eb3d ./test_inputs/codegen/cloog/square+triangle-1-1-2-3.c +7930aa84c111f54fe7f5809f6343d444 ./test_inputs/codegen/cloog/reservoir-lim-lam6.in +23f48ae1c589922d8491c8697872709c ./test_inputs/codegen/cloog/reservoir-QR.in +84f2ac61bc87fc9b8f162346f84fe4eb ./test_inputs/codegen/cloog/stride3.in +c42bb5a6203ab74e71f9c9fe94294029 ./test_inputs/codegen/cloog/min-3-1.in +f1c5cfb87d09126e9465b124af8111d2 ./test_inputs/codegen/cloog/test.in +b1cc65f8ed27dfe464081cc8969ea828 ./test_inputs/codegen/cloog/yosr.in +97d1f6af342171ddc3248e5b2e1c98a5 ./test_inputs/codegen/cloog/thomasset.c +6d0b0451aadde3c656474426ce899632 ./test_inputs/codegen/cloog/gesced3.in +4e25677c48a4635ac8c6e4accd6b72e4 ./test_inputs/codegen/cloog/gesced2.in +396e8572bafc99421fa3e6884f028806 ./test_inputs/codegen/cloog/cholesky.in +e84044cc586562dfcfb614d647ae4abe ./test_inputs/codegen/cloog/multi-stride2.c +15877e8a4ba1b42fda7f9fc64a43a5f9 ./test_inputs/codegen/cloog/iftest2.c +66eb5642d017e1bbfd17a04960d2089c ./test_inputs/codegen/cloog/reservoir-lim-lam5.in +5786e5209f8819586f6ce8b0d1c2e294 ./test_inputs/codegen/cloog/uday_scalars.in +fdc01624ae06ad1cc8096b318f122048 ./test_inputs/codegen/cloog/block2.in +f9fa8861c391eddefbc14ffc5c3ed4d2 ./test_inputs/codegen/cloog/lu2.c +feaa5a0759b2e7a8c24521933cddd741 ./test_inputs/codegen/cloog/levenshtein-1-2-3.in +530e3abca9258a30c05035904dc4bf95 ./test_inputs/codegen/cloog/reservoir-lim-lam2.in +8a3e0b21ee38c4a13619d5b7ab10963e ./test_inputs/codegen/cloog/uday_scalars.c +ce01d99bf5a96670afe49d631975c45e ./test_inputs/codegen/cloog/basic-bounds-3.in +9b6e8a114c8aa6070cdecb50d0d7f2d7 ./test_inputs/codegen/cloog/1point-1.in +f03b26c35086edc95415d352ad1f3bb7 ./test_inputs/codegen/cloog/gesced.in +5d19a8b2c7cd750fea7e1054813b0aa3 ./test_inputs/codegen/cloog/tiling.in +878364ef405b5ce1ce7c3fc7d58e804c ./test_inputs/codegen/cloog/nul_basic2.in +7b2bfbcbfc4d15919544b9b2f57f3521 ./test_inputs/codegen/cloog/square+triangle-1-1-2-3.in +494dc1ceff12042d2ea0900d8bf79f2f ./test_inputs/codegen/cloog/cholesky2.in +916c902c69d4bbe3438345e4a423c78c ./test_inputs/codegen/cloog/stride.in +7073fe19076aabe2f7b0f88adb0e6fcf ./test_inputs/codegen/cloog/basic-bounds-1.in +d5b0456293ca45dba0f69b7f0277f9fa ./test_inputs/codegen/cloog/singleton.in +7d8685a157faad499c255f8106269ac0 ./test_inputs/codegen/cloog/min-2-1.in +cf13f7e4bcb9bd9293938d4766c00a20 ./test_inputs/codegen/cloog/lu.in +810be24256acc460f6964157791533f0 ./test_inputs/codegen/cloog/unroll2.c +8e2be6acdfb8248fd91fc8c16ef64d51 ./test_inputs/codegen/cloog/reservoir-fusion1.c +cb2d1074e9e94a80f1e23d56d13b9532 ./test_inputs/codegen/cloog/lux.in +40a35952247b553e5680794e5e656a30 ./test_inputs/codegen/cloog/forwardsub-3-1-2.in +07c2fe807d0cf779a1da2e617978660d ./test_inputs/codegen/cloog/reservoir-pingali2.in +4cace394e81d7b3fcf404ed3582ef0be ./test_inputs/codegen/cloog/block.c +a92d7a6b210d387d4b7bdffc64a34913 ./test_inputs/codegen/cloog/multi-mm-1.in +72720db2cca0ce27dd2d1802c9cf65fd ./test_inputs/codegen/cloog/backtrack.in +617b946c0542f1e6523cada0ad7aadd4 ./test_inputs/codegen/cloog/basic-bounds-1.c +d464f69ba6cfba0634266ccd09750a2d ./test_inputs/codegen/cloog/basic-bounds-2.in +d5cdb57ac36adca51d66384ae046b0e5 ./test_inputs/codegen/cloog/forwardsub-1-1-2.c +4b3818aefc7fa2b701236b582cf829a3 ./test_inputs/codegen/cloog/youcef.c +877d8ca72284cc0f89a6d3f779ea0656 ./test_inputs/codegen/cloog/otl.in +01670e061681ae50148ae31c1994552d ./test_inputs/codegen/cloog/yosr2.in +567454cb16f59ca0e3e624c6194f106a ./test_inputs/codegen/cloog/reservoir-stride.c +f8230219c1f9aa7b0077f6af3381ea70 ./test_inputs/codegen/cloog/orc.in +70bdde830e1acbf2121717235125220b ./test_inputs/codegen/cloog/lineality-2-1-2.in +8456cb99e523e275e256a4413fe9e637 ./test_inputs/codegen/cloog/iftest2.in +e5fd0001cde440fd0f522e5b6f82bcf4 ./test_inputs/codegen/cloog/wavefront.c +f5809124dba3430b81b448c6de8a0e41 ./test_inputs/codegen/cloog/donotsimp.in +519a3276dacd277e3fa627c8a036c502 ./test_inputs/codegen/cloog/equality.c +7d4fd6951fcd3633e878be83c046f191 ./test_inputs/codegen/cloog/esced.in +960035c8b41b852a89eadd753292d75b ./test_inputs/codegen/cloog/classen2.in +e11cffc2cb77e039a82ca8fd4de0a81c ./test_inputs/codegen/cloog/walters2.in +5f14c566685b8e6456aa4fe9120fbab5 ./test_inputs/codegen/cloog/backtrack.c +aa70c832b943c4eaf9508e547b37c81a ./test_inputs/codegen/cloog/reservoir-jacobi2.c +2af53b271789a7f5237f7029dc132f72 ./test_inputs/codegen/cloog/infinite2.in +cd36e347d170cd76d42f676b2e99f4a7 ./test_inputs/codegen/cloog/logo.c +17d427e61f3e174702a2f749e57c5e9e ./test_inputs/codegen/cloog/ex1.c +53e939b9ea870d01c66c6d9011c9b49d ./test_inputs/codegen/cloog/mod4.in +268fe7a026ad3d037b56aa8f60614bde ./test_inputs/codegen/cloog/reservoir-lim-lam4.in +a9771fe3ea18bb75cea85775fe564e9e ./test_inputs/codegen/cloog/reservoir-lim-lam2.c +346ab4af28fe3789dc37bf46dec12991 ./test_inputs/codegen/cloog/equality2.c +81eba2c2c6ae4b948bbb91e088e9c915 ./test_inputs/codegen/cloog/vivien2.in +2b7c1a4a0d8dbee9d4da98a8e47890b5 ./test_inputs/codegen/cloog/no_lindep.in +c715155656199cc2cebd3824a64125f0 ./test_inputs/codegen/cloog/forwardsub-2-1-2-3.c +50607c65019a8da579597f0dd9ce00a4 ./test_inputs/codegen/cloog/0D-2.c +50df594d4b55df5cc138a1b2df1d4aef ./test_inputs/codegen/cloog/logo.in +bdc95b3b2bfc5d785da1650c926199ba ./test_inputs/codegen/cloog/mode.in +7d1278988f3f8a2431de77bea2e0cb78 ./test_inputs/codegen/cloog/orc.c +0f05ee1b0430794b5fca3eb5423dd42a ./test_inputs/codegen/cloog/min-4-1.c +0a0240495f832327fdeb89eb8883072c ./test_inputs/codegen/cloog/reservoir-mg-resid.in +1b56ce27580377ece3ac106ae74e7794 ./test_inputs/codegen/cloog/darte.in +2805187169b3935ff929e6939d9425f2 ./test_inputs/codegen/cloog/stride2.in +52c06f4bbb565750dc78402e21c34350 ./test_inputs/codegen/cloog/gauss.c +f173489f75acb151fd384c6e3a65c6d4 ./test_inputs/codegen/cloog/reservoir-lim-lam5.c +70e92af421abeb99041e4628eaaefa12 ./test_inputs/codegen/cloog/lineality-1-2.in +76af26c0b49e1a06ab8d1439f1681309 ./test_inputs/codegen/cloog/stride3.c +0e42c49f32a0f4fd5c79ed0b166c9f7f ./test_inputs/codegen/cloog/ex1.in +28693a515e6b3d504054eb50f4bb89d1 ./test_inputs/codegen/cloog/youcefn.c +184181388c68f8b0d02f19e4b5c6d8b1 ./test_inputs/codegen/cloog/reservoir-cholesky2.c +33dd85ebb9e4081aa924296e35feaffb ./test_inputs/codegen/cloog/vivien.c +3e3a3487b7f3c838120fe235a6714596 ./test_inputs/codegen/cloog/infinite2.c +89be10a7fe4b89869b58efe68d4ceef3 ./test_inputs/codegen/cloog/gesced3.c +c56bcdb945a0cee7cd85b8e8024d4409 ./test_inputs/codegen/cloog/block3.c +ce52d849334b3aab8478c6605e0f687d ./test_inputs/codegen/cloog/walters3.c +ae5ca6676c45e69b7adc7d90d99ca3e0 ./test_inputs/codegen/cloog/youcef.in +7e0a145aa3bae461b5f23c8c96daee4c ./test_inputs/codegen/cloog/unroll.in +0a0240495f832327fdeb89eb8883072c ./test_inputs/codegen/cloog/reservoir-mg-psinv.in +c0a88a55846ba8c8a070477a7553ba78 ./test_inputs/codegen/cloog/classen.c +2a03c6a47261eac68b0518a47fcb3a75 ./test_inputs/codegen/cloog/basic-bounds-3.c +9adceae6966c22bd4751c293a5257267 ./test_inputs/codegen/cloog/nul_basic1.in +dcb044cb0a45e7d5ea92a16c1ddcfaba ./test_inputs/codegen/cloog/walters3.in +69ec5e1f1077bdd335b45aa3f7c326f2 ./test_inputs/codegen/cloog/basic-bounds-5.c +92f3bfffe5651432621cec7ce10035a8 ./test_inputs/codegen/cloog/walters.in +6e4f41763e10853efec7b5e216aaa4bc ./test_inputs/codegen/disjuncts.c +82e619d71d3e25c198acb687d0ab70fa ./test_inputs/codegen/separate.in +bafd18a6b0ee91289b8da0bc9883147e ./test_inputs/codegen/unroll.in +acb01e870f39a6c3b5c8990f850dc86f ./test_inputs/codegen/stride5.in +6ffd66c8a9de578db2ac4e701d6b6201 ./test_inputs/codegen/atomic4.c +7d63a3971d6aa04616b8ff21c522396a ./test_inputs/ex2.pip +070d06b51eb2899b912b23c2e0cae306 ./test_inputs/unexpanded.pwqp +237b1fec536b99d552bbcf754e0df796 ./test_inputs/convex12.polylib +4d27331d8ed4bcc3c96283e4f1c6642b ./test_inputs/cg1.pip +cb23403af19ef53e065d59cabc8cfecc ./test_inputs/equality4.pwqp +3b33b4296c5d76258e71efe6b2056455 ./test_inputs/affine.polylib +829cc4e63d89bc1dea59257a35eeba0f ./test_inputs/max.pip +cac1cea89ed7a28cf6c3b36ee7e66f48 ./test_inputs/convex3.polylib +a580d8773973b92e34030bbb04652381 ./test_inputs/affine3.polylib +e3548828901c931ec64fd84bac5aa034 ./test_inputs/square.pip +a5120b804bd7878ff8e30332669eff39 ./test_inputs/equality3.pwqp +1d4c44dac15e2e61a263d3b0905342b9 ./test_inputs/philippePolynomialCoeff1P.pwqp +8e851c2af1cbb0a27b5f440f2c542f75 ./test_inputs/affine2.polylib +5b2650fc8eeb775559e6f661d668d7f3 ./test_inputs/equality1.pwqp +7f14b56616a62497e87ad58b44d24214 ./test_inputs/negative.pip +4495ae7e4a0c26c976fc789492369b65 ./test_inputs/ex.pip +da1ef36bf22176650c82cb0522af9121 ./test_inputs/sor1d.pip +01af9cd85ea93361757bc2e37162561d ./test_inputs/esced.pip +a2970b2397d1de29010848081c35c109 ./test_inputs/split.pwqp +0051332a1c0bb8a8c7f73c506f3211e1 ./test_inputs/devos.pwqp +6774c11e2695a13668760fd8966f8efa ./test_inputs/boulet.pip +b40b76c807d0bf55602e2a8c37bd2474 ./test_inputs/convex10.polylib +c926ce78b2048b70702450383e5aa749 ./test_inputs/small.pip +c0a9287150e8f783806e3eba220f8a75 ./test_inputs/convex5.polylib +fb7cc3d91df552839df691a0bf0bb044 ./test_inputs/fimmel.pip +f6083a1f7d53e2afb6e9ad7f749e7706 ./test_inputs/philippe3vars3pars.pwqp +156b4db5546daf78279068aad6be72f9 ./test_inputs/convex4.polylib +5f844c7218d32fad0c9dbcb2727c917a ./test_inputs/basicTest.pwqp +8069b6a0f1a1f35f043d3e169df74215 ./test_inputs/basicLinear2.pwqp +7e50b48e9849b0edff7030f92bddadcc ./test_inputs/toplas.pwqp +d6d27442f4a23067de047ae5a9085710 ./test_inputs/convex7.polylib +1ce001f63b2eca1307823ee64c593590 ./test_inputs/philippePolynomialCoeff.pwqp +fe57dc0bc47247773ecd8dfd4896531f ./test_inputs/convex15.polylib +79bb9ea7ca1bfaf4a2bc1da8bddf0bba ./test_inputs/equality2.pwqp +d29fd5552b8cedd3f36374b5c5f0c5e6 ./test_inputs/convex0.polylib +ed17235bdf55ad3099484e2ffbda673b ./test_inputs/gist1.polylib +a757ef09a889f63b0f54276d394a3ce1 ./test_inputs/set.omega +0b740fad4fce279e45451119d06d8751 ./test_inputs/equality5.pwqp +5c8a3e76b4b4e0a7e21342ed0db320ec ./test_inputs/convex2.polylib +0c63fcb79c0145e6f5be84f3cdac4774 ./test_inputs/convex11.polylib +9ad9c94feaeb2172119f36fea0e64ce1 ./test_inputs/faddeev.pwqp +57cda0742755b4160165804e42efc883 ./test_inputs/tobi.pip +d81db5367ad01cf1025deeb707f23a28 ./test_inputs/sven.pip +96cb47bbf9bbf2316909d6aabdb13419 ./test_inputs/convex6.polylib +afc70ade28d177190bc61848170c7c8f ./test_inputs/brisebarre.pip +3706cc30d10f775828f3b4878d6ea2f3 ./test_inputs/convex14.polylib +b249890155ab2c10ff57643c0a33cffd ./test_inputs/seghir-vd.pip +28f0caa42e042804348a800bba6064c0 ./test_inputs/convex1.polylib +5899f760d611c1f0d3dfb7585becac11 ./test_inputs/philippe.pwqp +9829d2d0a30dbf6c689b979783fb43b4 ./test_inputs/philippeNeg.pwqp +105383ff43381fb5088dd4dad989a533 ./test_inputs/basicLinear.pwqp +d4d4d809bda66c0054ccc31d5d2cd918 ./test_inputs/convex9.polylib +9f8fcb32e24ebc39e1bdc9c92350c31a ./test_inputs/convex13.polylib +ab0e3e36803717743eb67dff13ddcb7e ./test_inputs/product.pwqp +1fbb536cc911eb067151eb8acd5ddc70 ./test_inputs/application.omega +cc2624e98e6c5dd3dedec6be8ed2d44e ./test_inputs/convex8.polylib +0f9eec3431f098fb8c436959056a0a51 ./test_inputs/linearExample.pwqp +8077263f6e193cae37bc1394e2f37fb2 ./test_inputs/test3Deg3Var.pwqp +f1971b17bf747677ec5aa0ece87fffd3 ./isl_factorization.c +7dd6cf1e6138bbb4fc26f46272114c1f ./isl_sort.c +e509979d10c7f434b3590bd7dcde9101 ./README +ce2e30e6c1d264d21ef85197ee9e99b1 ./isl_convex_hull.c +aac3cf4a8d45c6aa26f632c1e49aa95f ./isl_bernstein.h +f0f30b89c38b8c98332d3a579bcce009 ./isl_piplib.c +84490bf51fc57c21fa43f4b488a9f196 ./isl_constraint.c +e58c0e719beef72376f13818ffa627b4 ./isl_printer_private.h +2782b5ec39b1c1718d8a5de6abbe6d90 ./isl_band_private.h +1b7ec82a2267f8a91a6b01f606df55e2 ./isl_ast_graft_private.h +c9c858c6d71956629c40946ffe0ed676 ./isl_morph.h +e7ac1767d76143aed7eabc9e66c42b6a ./isl_seq.c +dd53a36fd72f7eefd40f91001b4d2131 ./isl_config.h.in +fd0333ce6183602b6f768712c6b691cf ./isl_tarjan.c +7fbcdd04354840d48b6bc4226dd785c5 ./isl_equalities.h +664a4fdf46e6f243e0551b80ce3d47fb ./isl_map_piplib.h +6204d29faf4be9ba6dcdfc1665060604 ./isl_reordering.c +7ef823040b1bcad1b3eea13ee2506217 ./ChangeLog +95dc72fb13260064babc53191847e0a7 ./isl_ast.c +611849992bd1ed1233b72d5e4a27ae37 ./isl_id_private.h +323d247aa90c0309ca6282e1b3f893c4 ./isl.py +ad6f8caf80b1a4c057da434f754ab503 ./isl_stream.c +fbc831a6fe16ff0d917be474b61fcf88 ./isl_obj.c +127400d88dd7cf8b8a17f5e1508cdeb7 ./closure.c +b67314963c79f50f653b21a84ea411e2 ./isl_ast_build_private.h +6f4648f4a2198fd2ed2d53d53a72f25c ./print.c +f55c041dbb59e513654f5c27a1efd2cd ./polyhedron_minimize.c +b33284b9a9fbe371e03b71e17e1709b2 ./isl_morph.c +a9a34995cbd407eddd05d361ddcc6fc5 ./isl_reordering.h +2e93d3a6c2c39aa760457535dc219fc4 ./interface/Makefile.am +2065743e73892a14fb117a71a843ddb0 ./interface/extract_interface.cc +7bf57503bab3dbdb014c1c84373f0c9d ./interface/isl.py +c9d6f6f4d7ee9b8d9c07002d859b97a0 ./interface/python.cc +95f75b535fd9a7ffdefee47dc33eb4da ./interface/python.h +fcf63d6f9c361ad44c2b0b979e5ffe15 ./interface/extract_interface.h +2bfcfb2de8c97325e3f1fff5947cd627 ./interface/all.h +684f3071d6e4eef6310a66a1608d9db1 ./interface/isl.py.top +de9ce58e4c486217dd113dbe7bfb7c28 ./cat.c +0be1d4cbf7a89ebea737b20552254a94 ./isl_input.c +f8aedf299736ec5c62bb5a04257bcf1b ./isl_power_templ.c +33822573bd5432b334473b057335c16c ./bound.c +8fa5b69b9acfc5be6f476941aa0a9e6d ./isl_constraint_private.h +7535b8e37bd657b099043bdc0eda563c ./isl_sample_no_piplib.c +b2647f2dd1585ff01aaacb3767318581 ./doc/mypod2latex +a30e64c44e7228aa662ab479cb113a2d ./doc/Makefile.am +d4ab9666128602b22b5d869b3ac4ab1b ./doc/isl.bib +25016e6c2fd62945f7e53710ec9050b4 ./doc/implementation.tex +e024d48919edb842c59f3cf9e3c6ae34 ./doc/manual.pdf +2c85b89ab0b58130b96d762cd2b50c3f ./doc/chicago.sty +221f120a78457dce66e2eac0b81d0c84 ./doc/user.pod +9cb06cb0fe1f3312267e6b43c4a84c7f ./doc/chicago.bst +24aee10acdbf1195b0f23533e17e9317 ./doc/SubmittingPatches +0b13f8ebd5f56d1a292f62fa5d127473 ./doc/manual.tex +75a47a60827e98e1ced005e1bb9d82a6 ./isl_options.c +2eb9e531e14f0f1f91d46c1fbcb0e90a ./isl_test.c +dac0b765d94ac4ad71ea7f98610db613 ./isl_map_subtract.c +ffebf875c08cd1ac34ef88ae69fe1c4e ./isl_output.c +eb51b36b1ac5c7689558dcc612f72aef ./isl_basis_reduction.h +4b9a34059c6e0d9dbff3ec7d381fb4b8 ./isl_ast_codegen.c +a4dc61c5b0b90507c8f3ec474a5ddd50 ./isl_map.c +5856754085c05d79877ad18e917a50f1 ./isl_tab_pip.c +8aa7fd49d60915136f3759baa1218452 ./isl_list_templ.h +f8ee2f99c7c8b21395d3fe6f18531d24 ./codegen_test.sh.in +917114516a8aafdfe41589369638b455 ./isl_lp_no_piplib.c +4d0584c5d30872e08c231f52221cdc13 ./isl_stream_private.h +d7b1a0bc7719d6ee6fb5999c448fa13f ./isl_blk.c +a3952ef74b5d654091f6561a45fe7564 ./isl_options_private.h +bfcf5ed56f8f99d1292837fef32cf9c1 ./isl_mat_private.h +13d4dadec306ee8fba46b34ad39d8e0a ./isl_range.c +d654138059e853382fa276f6def4dad4 ./isl_coalesce.c +be6b0cca036b58fbe4d6fbdaba031684 ./isl_factorization.h +2715e1697e24a010f066cfa1a3a11033 ./isl_piplib.h +f8c6b72f42f802b8f6a95630cc6f5ced ./isl_space.c +ed46344b42fc34f464a70b0f4098b70b ./isl_farkas.c +071cb63abd021a79458ef56ee896cf6d ./GIT_HEAD_ID +88d64490f2e242ba6057af5cc94d689e ./isl_sort.h +d5dc4c2062fb52090ef31052ef85a64f ./isl_mat.c +1fc3d38bfb0c14d86bd1e25c3da48e18 ./isl_map_private.h +e3af31512c2d38818a3dd7025f005977 ./isl_local_space.c +b3a701f5447259af7237bff8e1a41f23 ./isl_ctx.c +4f190dcc7e09e77fc3d72f9c88de44f8 ./isl_int.h +48bb8b237248262e7aaf0c3466a33679 ./isl_id.c +abd037762415c9ee84144a39f610112d ./configure.ac +f79d2fcc6472b36f5e062449285db9f7 ./isl_union_map_private.h +9f03c4c07903a231b4f81e5e5ca35244 ./isl_affine_hull.c +ab4d43d0e7aeb6b938f467871ab9a424 ./isl_equalities.c +eb8a456247b7a66b32ecd37b4d6f32af ./isl_vertices_private.h +0a4084e6bac978755df18201a0efb65a ./basis_reduction_templ.c +d3b7ecf5aac17d5f6837328016d3cd87 ./isl_dim.c +433a3c3dee811b266f84f3bcd9d31936 ./isl_schedule_private.h +5d37169fe99d95b45d84d67617a9d951 ./isl_val.c +06bce01b48f427e86244e25de8210e78 ./isl_ast_build_expr.c +91ca771d7a3f9d2ecba5416b85778325 ./isl_hmap_map_basic_set.c +f111419f1f25c3e304c56d99efd30e7f ./print_templ.c +2bf1eb747c3e8b7ce34d18d9a57d204b ./isl_map_piplib.c +ff4c6c364b27887a1c48a8d4c4430340 ./AUTHORS +4057cf107e55c92a4051ce5365fda21d ./isl_lp_piplib.h +e8fdad7bc2977a5acbdc8781fcf67a31 ./polyhedron_detect_equalities.c +c5fccc17252c784ca8fc7b7aa371f02d ./isl_union_templ.c +83a8dcab53eaebeb7d1c76844fae71f9 ./isl_sample.h +7e289a328d1675030815637268eaf030 ./isl_band.c +c508c372d76f04f26ac80428cd8ff4fe ./isl_polynomial_private.h +63dd310f23073a63ecc476f85b7d9b83 ./isl_val_gmp.c +ce22bc1f6f9e428042a664dc178d5aa5 ./isl_tab.c +cd9568712b5da7dd09ba8680b96b990e ./isl_tab.h +9e2531a63463c5200fc0487382450556 ./pip.c +635e797beb6fbfc9ba9fa6cbbe6d5480 ./isl_map_simplify.c +fc48ea7306a287cf5042ae66f41ee7a9 ./isl_multi_templ.h +2dbdb27d0fb0858dcc762d47e4ee1e3d ./include/isl/set_type.h +9a353b485a2c3801a12baad14b89b9c8 ./include/isl/union_set_type.h +4e5b66d79ebeb1905da5ea44deacbb94 ./include/isl/version.h +3a2a1594b7344ae1debbe5d40f66b816 ./include/isl/aff_type.h +48e00b36d8b5f684b8c23f2bab683948 ./include/isl/mat.h +447ef6eb51afab0baf217d8a02db1a9a ./include/isl/val.h +0e5c8cf7188aea452c6a600b96421572 ./include/isl/map_type.h +3220ce21996c2892f491b52c49c39d36 ./include/isl/polynomial_type.h +30ce58a30bd5d655821585b781496024 ./include/isl/val_int.h +4e975a693ae8ce25d38c82d2344f7a67 ./include/isl/ilp.h +5502ac3c7797261de038cbc81263a2fc ./include/isl/config.h.in +1ad6efd3e153aa5a6b1ce472166dd970 ./include/isl/int.h +fe6dda8778cc3c8d355692e2f1c67f67 ./include/isl/set.h +6c2a19ad956a6df4d6a58e94d1a978f1 ./include/isl/dim.h +87f9db3dbc286f33e3711b4f9cae004b ./include/isl/arg.h +1f184a710353793bfc139748c722a335 ./include/isl/union_map_type.h +cf9d96e20cb354728fc101c5ea97a082 ./include/isl/val_gmp.h +fba16e4001c6231a8f444d9827cb5cf9 ./include/isl/vertices.h +f7242b828b6c8911eae5dc5e489c03fb ./include/isl/lp.h +792dd8c70b7dab12a41b20c3d173a530 ./include/isl/blk.h +363d959c0446ddc0e969f80dc5af9ab7 ./include/isl/obj.h +08472100c8c609891c94a0faf67c889e ./include/isl/ast.h +5b99bb05a90641c28bc5499ce66b233e ./include/isl/polynomial.h +a847f0ee22ad83d0a90feac52d1296c6 ./include/isl/union_set.h +fa46c4fbac05a4624f820d30fbbee156 ./include/isl/local_space.h +c3b66e90911c1745cae4aa2c03adce86 ./include/isl/ctx.h +40fde48d03b5a33bc9e1bfffafa1ed9b ./include/isl/constraint.h +089c7054dff568d50c9af4e3a81aa74a ./include/isl/options.h +95a8d03d17d7a52eb890e509279dd4b1 ./include/isl/id.h +62f2f0057b13ede4f54ba407989a8138 ./include/isl/band.h +354af6d4a7eec785ce0e25171253f31f ./include/isl/hash.h +0934f75febf50adc116a89aabf964ef2 ./include/isl/stream.h +0a03ac18557ae70f35e304e0c5c43c92 ./include/isl/union_map.h +250fac0f2e77293393c7948afc834677 ./include/isl/space.h +f89a244269e123c9ff7607225f47071e ./include/isl/list.h +aa4a9713e0ab08e27a10067d5adfdff2 ./include/isl/printer.h +11cf3b1e997b011871e58aeea54db822 ./include/isl/vec.h +e6c94f9f982f1eafeebf20e0bb7e5389 ./include/isl/point.h +ea75fd39da751983f6ab1e358756e907 ./include/isl/schedule.h +b2b98f53ffb0477f3693589aa33c7c6b ./include/isl/flow.h +8a404ec3482004e89f7e1484fa15974e ./include/isl/multi.h +4fc443e216227298d37b7d472ac7ffc4 ./include/isl/ast_build.h +a35a257ffd588d231fe5a882e6a52efa ./include/isl/seq.h +2966c845e750897f0efe3f5b222c1471 ./include/isl/aff.h +bad19b3fde1ad498df07631a9ce8e543 ./include/isl/map.h +32980aa420a4cfda0d6cff87847a7fe3 ./isl_flow.c +3d892ad47a1c3186819a21651d2164fb ./isl_bernstein.c +5a7ff62141102cf059064ef910089d46 ./isl_local_space_private.h +a211a9883b53c5ef2021dd23c4f6d24e ./isl_sample_piplib.h +6ffa949dd51b19a7fe3df9de33913b34 ./isl_gmp.c +65f3ae3c6425d9d293e14c1e65a30a77 ./isl_polynomial.c +78e34b2ebd7480438f26ca5cdbf0e34a ./isl_ast_private.h +90938326314555c92e97431398ebb9d7 ./isl_lp.c +955aaa8ed14dd3de0af5eaf79f49d120 ./isl_transitive_closure.c +a07461510dc1bd66e70ccfe8b7833323 ./isl_aff.c +bfb0370c1004d4e8a3d909bcd374ae56 ./isl_config_post.h +936bd33f6b91669cf49aaf0e94d84fde ./isl_bound.c +d973023f8f6a7a12efa23f8311fceb69 ./basis_reduction_tab.c +01f95674d4044e809b2aa827817c2fa5 ./isl_sample.c +2744a24b3bddc555f9949be552cdee48 ./isl_ilp.c +150cff5f53444031ecde97ef0504bbfa ./isl_dim_map.c +7938d1f81c5fff87a3d89edf7c336725 ./isl_tarjan.h +6d765dbf822e5c3f018ecbce9bf78ed2 ./isl_list_templ.c +fb2b49a9dabbd12a3aba580ba6801319 ./mp_get_memory_functions.c +3c0a044b2b9403a8ee54de002c6cdfab ./isl_ctx_private.h +ef80364021e8daa7d5971979ed6718bb ./isl_range.h +77e09c9c52b48f82a37e118a17661c7d ./isl_map_lexopt_templ.c +4b54c92fea14d68169996861496f77e1 ./isl_val_private.h +3cb8c660e3ebbba0d01df25ec367b406 ./isl_set_list.c +6bcd16a8d7eac57a84bf594ed762ec4d ./bound_test.sh.in +ddbeea37713cb0759eb9ab0f55b887b3 ./isl_ast_build.c diff -Nru isl-0.11.2/debian/changelog isl-0.12.1/debian/changelog --- isl-0.11.2/debian/changelog 2013-05-09 12:43:21.000000000 +0000 +++ isl-0.12.1/debian/changelog 2013-10-17 14:50:21.000000000 +0000 @@ -1,3 +1,22 @@ +isl (0.12.1-1) unstable; urgency=low + + * New upstream release. Closes: #714830. + * libisl10: Breaks libcloog-isl4 (<< 0.18.1). + * Update symbols file. + * Build-depend on libcloog-isl-dev (>= 0.18.1) to make sure that the + cloog version compatible with isl-0.12 already is in the archive. + * Use dh_autotools-dev, not autoreconf to update config.{sub,guess}. + Closes: #721854. + * Update project home page. Closes: #682352. + + -- Matthias Klose Thu, 17 Oct 2013 15:30:11 +0200 + +isl (0.12-1) experimental; urgency=low + + * New upstream release. + + -- Matthias Klose Tue, 16 Jul 2013 01:06:25 +0200 + isl (0.11.2-1) unstable; urgency=low * New upstream release. diff -Nru isl-0.11.2/debian/control isl-0.12.1/debian/control --- isl-0.11.2/debian/control 2013-02-27 16:29:21.000000000 +0000 +++ isl-0.12.1/debian/control 2013-10-17 14:35:36.000000000 +0000 @@ -2,7 +2,8 @@ Priority: optional Maintainer: Debian GCC Maintainers Uploaders: Matthias Klose -Build-Depends: debhelper (>= 7.0.50~), autotools-dev, libgmp-dev, dh-autoreconf +Build-Depends: debhelper (>= 7.0.50~), autotools-dev, + libgmp-dev, libcloog-isl-dev (>= 0.18.1) Standards-Version: 3.9.4 Section: libs Homepage: http://freecode.com/projects/isl @@ -45,6 +46,7 @@ Multi-Arch: same Pre-Depends: multiarch-support Depends: ${shlibs:Depends}, ${misc:Depends} +Breaks: libcloog-isl4 (<< 0.18.1) Description: manipulating sets and relations of integer points bounded by linear constraints isl is a library for manipulating sets and relations of integer points bounded by linear constraints. Supported operations on sets include diff -Nru isl-0.11.2/debian/libisl10.symbols isl-0.12.1/debian/libisl10.symbols --- isl-0.11.2/debian/libisl10.symbols 2013-05-09 12:43:06.000000000 +0000 +++ isl-0.12.1/debian/libisl10.symbols 2013-10-17 14:43:19.000000000 +0000 @@ -8,10 +8,12 @@ isl_aff_add@Base 0.10 isl_aff_add_coefficient@Base 0.10 isl_aff_add_coefficient_si@Base 0.10 + isl_aff_add_coefficient_val@Base 0.12.1 isl_aff_add_constant@Base 0.10 isl_aff_add_constant_num@Base 0.11 isl_aff_add_constant_num_si@Base 0.11 isl_aff_add_constant_si@Base 0.10 + isl_aff_add_constant_val@Base 0.12.1 isl_aff_add_dims@Base 0.10 isl_aff_add_on_domain@Base 0.10 isl_aff_align_divs@Base 0.10 @@ -19,6 +21,7 @@ isl_aff_alloc@Base 0.10 isl_aff_alloc_vec@Base 0.10 isl_aff_ceil@Base 0.10 + isl_aff_check_match_domain_space@Base 0.12.1 isl_aff_copy@Base 0.10 isl_aff_cow@Base 0.10 isl_aff_dim@Base 0.10 @@ -31,9 +34,12 @@ isl_aff_free@Base 0.10 isl_aff_ge_basic_set@Base 0.10 isl_aff_get_coefficient@Base 0.10 + isl_aff_get_coefficient_val@Base 0.12.1 isl_aff_get_constant@Base 0.10 + isl_aff_get_constant_val@Base 0.12.1 isl_aff_get_ctx@Base 0.10 isl_aff_get_denominator@Base 0.10 + isl_aff_get_denominator_val@Base 0.12.1 isl_aff_get_dim@Base 0.10 isl_aff_get_dim_name@Base 0.10 isl_aff_get_div@Base 0.10 @@ -58,6 +64,7 @@ isl_aff_list_dump@Base 0.10 isl_aff_list_dup@Base 0.10 isl_aff_list_foreach@Base 0.10 + isl_aff_list_foreach_scc@Base 0.12.1 isl_aff_list_free@Base 0.10 isl_aff_list_from_aff@Base 0.10 isl_aff_list_get_aff@Base 0.10 @@ -65,7 +72,9 @@ isl_aff_list_insert@Base 0.11 isl_aff_list_n_aff@Base 0.10 isl_aff_list_set_aff@Base 0.11 + isl_aff_list_sort@Base 0.12.1 isl_aff_mod@Base 0.10 + isl_aff_mod_val@Base 0.12.1 isl_aff_mul@Base 0.10 isl_aff_neg@Base 0.10 isl_aff_neg_basic_set@Base 0.11 @@ -83,10 +92,14 @@ isl_aff_scale@Base 0.10 isl_aff_scale_down@Base 0.10 isl_aff_scale_down_ui@Base 0.10 + isl_aff_scale_down_val@Base 0.12.1 + isl_aff_scale_val@Base 0.12.1 isl_aff_set_coefficient@Base 0.10 isl_aff_set_coefficient_si@Base 0.10 + isl_aff_set_coefficient_val@Base 0.12.1 isl_aff_set_constant@Base 0.10 isl_aff_set_constant_si@Base 0.10 + isl_aff_set_constant_val@Base 0.12.1 isl_aff_set_denominator@Base 0.10 isl_aff_set_dim_id@Base 0.10 isl_aff_set_dim_name@Base 0.10 @@ -147,8 +160,6 @@ isl_ast_build_increase_depth@Base 0.11 isl_ast_build_insert_dim@Base 0.11 isl_ast_build_map_to_iterator@Base 0.11 - isl_ast_build_max@Base 0.11 - isl_ast_build_min@Base 0.11 isl_ast_build_need_schedule_map@Base 0.11 isl_ast_build_options_involve_depth@Base 0.11 isl_ast_build_product@Base 0.11 @@ -166,10 +177,10 @@ isl_ast_build_set_loop_bounds@Base 0.11 isl_ast_build_set_options@Base 0.11 isl_ast_build_set_single_valued@Base 0.11.2 + isl_ast_build_substitute_values_union_map_domain@Base 0.12.1 isl_ast_expr_add@Base 0.11 isl_ast_expr_alloc_binary@Base 0.11 - isl_ast_expr_alloc_int@Base 0.11 - isl_ast_expr_alloc_int_si@Base 0.11 + isl_ast_expr_alloc_int_si@Base 0.12.1 isl_ast_expr_alloc_op@Base 0.11 isl_ast_expr_and@Base 0.11 isl_ast_expr_copy@Base 0.11 @@ -180,6 +191,7 @@ isl_ast_expr_free@Base 0.11 isl_ast_expr_from_aff@Base 0.11 isl_ast_expr_from_id@Base 0.11 + isl_ast_expr_from_val@Base 0.12.1 isl_ast_expr_get_ctx@Base 0.11 isl_ast_expr_get_id@Base 0.11 isl_ast_expr_get_int@Base 0.11 @@ -187,6 +199,7 @@ isl_ast_expr_get_op_n_arg@Base 0.11 isl_ast_expr_get_op_type@Base 0.11 isl_ast_expr_get_type@Base 0.11 + isl_ast_expr_get_val@Base 0.12.1 isl_ast_expr_list_add@Base 0.11 isl_ast_expr_list_alloc@Base 0.11 isl_ast_expr_list_concat@Base 0.11 @@ -196,6 +209,7 @@ isl_ast_expr_list_dump@Base 0.11 isl_ast_expr_list_dup@Base 0.11 isl_ast_expr_list_foreach@Base 0.11 + isl_ast_expr_list_foreach_scc@Base 0.12.1 isl_ast_expr_list_free@Base 0.11 isl_ast_expr_list_from_ast_expr@Base 0.11 isl_ast_expr_list_get_ast_expr@Base 0.11 @@ -203,6 +217,7 @@ isl_ast_expr_list_insert@Base 0.11 isl_ast_expr_list_n_ast_expr@Base 0.11 isl_ast_expr_list_set_ast_expr@Base 0.11 + isl_ast_expr_list_sort@Base 0.12.1 isl_ast_expr_mul@Base 0.11 isl_ast_expr_neg@Base 0.11 isl_ast_expr_or@Base 0.11 @@ -230,6 +245,7 @@ isl_ast_graft_list_dump@Base 0.11 isl_ast_graft_list_dup@Base 0.11 isl_ast_graft_list_foreach@Base 0.11 + isl_ast_graft_list_foreach_scc@Base 0.12.1 isl_ast_graft_list_free@Base 0.11 isl_ast_graft_list_from_ast_graft@Base 0.11 isl_ast_graft_list_fuse@Base 0.11 @@ -241,6 +257,7 @@ isl_ast_graft_list_preimage_multi_aff@Base 0.11 isl_ast_graft_list_set_ast_graft@Base 0.11 isl_ast_graft_list_sort@Base 0.11 + isl_ast_graft_list_sort_guard@Base 0.12.1 isl_ast_graft_list_unembed@Base 0.11 isl_ast_graft_preimage_multi_aff@Base 0.11 isl_ast_graft_set_enforced@Base 0.11 @@ -287,6 +304,7 @@ isl_ast_node_list_dump@Base 0.11 isl_ast_node_list_dup@Base 0.11 isl_ast_node_list_foreach@Base 0.11 + isl_ast_node_list_foreach_scc@Base 0.12.1 isl_ast_node_list_free@Base 0.11 isl_ast_node_list_from_ast_node@Base 0.11 isl_ast_node_list_get_ast_node@Base 0.11 @@ -295,6 +313,7 @@ isl_ast_node_list_n_ast_node@Base 0.11 isl_ast_node_list_print@Base 0.11 isl_ast_node_list_set_ast_node@Base 0.11 + isl_ast_node_list_sort@Base 0.12.1 isl_ast_node_print@Base 0.11 isl_ast_node_print_macros@Base 0.11 isl_ast_node_set_annotation@Base 0.11 @@ -332,6 +351,7 @@ isl_band_list_dup@Base 0.10 isl_band_list_foreach@Base 0.10 isl_band_list_foreach_band@Base 0.10 + isl_band_list_foreach_scc@Base 0.12.1 isl_band_list_free@Base 0.10 isl_band_list_from_band@Base 0.10 isl_band_list_get_band@Base 0.10 @@ -341,8 +361,10 @@ isl_band_list_insert@Base 0.11 isl_band_list_n_band@Base 0.10 isl_band_list_set_band@Base 0.11 + isl_band_list_sort@Base 0.12.1 isl_band_member_is_zero_distance@Base 0.10 isl_band_n_member@Base 0.10 + isl_band_split@Base 0.12.1 isl_band_tile@Base 0.10 isl_band_to_str@Base 0.10 isl_basic_map_add@Base 0.10 @@ -411,6 +433,7 @@ isl_basic_map_fix@Base 0.10 isl_basic_map_fix_input_si@Base 0.10 isl_basic_map_fix_si@Base 0.10 + isl_basic_map_fix_val@Base 0.12.1 isl_basic_map_flat_product@Base 0.10 isl_basic_map_flat_range_product@Base 0.10 isl_basic_map_flatten@Base 0.10 @@ -491,6 +514,7 @@ isl_basic_map_offset@Base 0.10 isl_basic_map_order_divs@Base 0.10 isl_basic_map_order_ge@Base 0.11 + isl_basic_map_order_gt@Base 0.12.1 isl_basic_map_overlying_set@Base 0.10 isl_basic_map_partial_lexmax@Base 0.10 isl_basic_map_partial_lexmax_pw_multi_aff@Base 0.10 @@ -498,12 +522,14 @@ isl_basic_map_partial_lexmin_pw_multi_aff@Base 0.10 isl_basic_map_partial_lexopt_pw_multi_aff@Base 0.10 isl_basic_map_plain_cmp@Base 0.10 + isl_basic_map_plain_get_val_if_fixed@Base 0.12.1 isl_basic_map_plain_is_disjoint@Base 0.10 isl_basic_map_plain_is_empty@Base 0.10 isl_basic_map_plain_is_equal@Base 0.10 isl_basic_map_plain_is_fixed@Base 0.10 isl_basic_map_plain_is_single_valued@Base 0.10 isl_basic_map_plain_is_singleton@Base 0.10 + isl_basic_map_preimage_multi_aff@Base 0.12.1 isl_basic_map_print@Base 0.10 isl_basic_map_print_internal@Base 0.10 isl_basic_map_product@Base 0.10 @@ -603,6 +629,7 @@ isl_basic_set_fix@Base 0.10 isl_basic_set_fix_dim_si@Base 0.10 isl_basic_set_fix_si@Base 0.10 + isl_basic_set_fix_val@Base 0.12.1 isl_basic_set_flat_product@Base 0.10 isl_basic_set_flatten@Base 0.10 isl_basic_set_follows_at@Base 0.10 @@ -628,6 +655,7 @@ isl_basic_set_get_dim_id@Base 0.10 isl_basic_set_get_dim_name@Base 0.10 isl_basic_set_get_div@Base 0.10 + isl_basic_set_get_divs@Base 0.12.1 isl_basic_set_get_hash@Base 0.10 isl_basic_set_get_local_space@Base 0.10 isl_basic_set_get_space@Base 0.10 @@ -665,6 +693,7 @@ isl_basic_set_list_dump@Base 0.10 isl_basic_set_list_dup@Base 0.10 isl_basic_set_list_foreach@Base 0.10 + isl_basic_set_list_foreach_scc@Base 0.12.1 isl_basic_set_list_free@Base 0.10 isl_basic_set_list_from_basic_set@Base 0.10 isl_basic_set_list_get_basic_set@Base 0.10 @@ -673,8 +702,12 @@ isl_basic_set_list_n_basic_set@Base 0.10 isl_basic_set_list_product@Base 0.10 isl_basic_set_list_set_basic_set@Base 0.11 + isl_basic_set_list_sort@Base 0.12.1 isl_basic_set_lower_bound_dim@Base 0.10 isl_basic_set_max@Base 0.10 + isl_basic_set_max_lp_val@Base 0.12.1 + isl_basic_set_max_val@Base 0.12.1 + isl_basic_set_min_lp_val@Base 0.12.1 isl_basic_set_move_dims@Base 0.10 isl_basic_set_multiplicative_call@Base 0.10 isl_basic_set_n_constraint@Base 0.10 @@ -686,6 +719,7 @@ isl_basic_set_normalize_constraints@Base 0.10 isl_basic_set_offset@Base 0.10 isl_basic_set_opt@Base 0.10 + isl_basic_set_opt_val@Base 0.12.1 isl_basic_set_order_divs@Base 0.10 isl_basic_set_parameter_compression@Base 0.10 isl_basic_set_params@Base 0.10 @@ -769,7 +803,9 @@ isl_constraint_get_aff@Base 0.10 isl_constraint_get_bound@Base 0.10 isl_constraint_get_coefficient@Base 0.10 + isl_constraint_get_coefficient_val@Base 0.12.1 isl_constraint_get_constant@Base 0.10 + isl_constraint_get_constant_val@Base 0.12.1 isl_constraint_get_ctx@Base 0.10 isl_constraint_get_dim@Base 0.10 isl_constraint_get_dim_name@Base 0.10 @@ -791,6 +827,7 @@ isl_constraint_list_dump@Base 0.11 isl_constraint_list_dup@Base 0.11 isl_constraint_list_foreach@Base 0.11 + isl_constraint_list_foreach_scc@Base 0.12.1 isl_constraint_list_free@Base 0.11 isl_constraint_list_from_constraint@Base 0.11 isl_constraint_list_get_constraint@Base 0.11 @@ -798,11 +835,14 @@ isl_constraint_list_insert@Base 0.11 isl_constraint_list_n_constraint@Base 0.11 isl_constraint_list_set_constraint@Base 0.11 + isl_constraint_list_sort@Base 0.12.1 isl_constraint_negate@Base 0.10 isl_constraint_set_coefficient@Base 0.10 isl_constraint_set_coefficient_si@Base 0.10 + isl_constraint_set_coefficient_val@Base 0.12.1 isl_constraint_set_constant@Base 0.10 isl_constraint_set_constant_si@Base 0.10 + isl_constraint_set_constant_val@Base 0.12.1 isl_constraint_to_str@Base 0.10 isl_context_gbr_op@Base 0.10 isl_context_lex_op@Base 0.10 @@ -875,6 +915,7 @@ isl_flow_get_no_source@Base 0.10 isl_fold_type_negate@Base 0.10 isl_gbr_choice@Base 0.10 + isl_gmp_gcdext@Base 0.12.1 isl_gmp_hash@Base 0.10 isl_handle_error@Base 0.10 isl_hash_id@Base 0.10 @@ -908,6 +949,7 @@ isl_id_list_dump@Base 0.11 isl_id_list_dup@Base 0.11 isl_id_list_foreach@Base 0.11 + isl_id_list_foreach_scc@Base 0.12.1 isl_id_list_free@Base 0.11 isl_id_list_from_id@Base 0.11 isl_id_list_get_ctx@Base 0.11 @@ -915,6 +957,7 @@ isl_id_list_insert@Base 0.11 isl_id_list_n_id@Base 0.11 isl_id_list_set_id@Base 0.11 + isl_id_list_sort@Base 0.12.1 isl_id_none@Base 0.10 isl_id_set_free_user@Base 0.11 isl_id_to_str@Base 0.10 @@ -1036,7 +1079,9 @@ isl_map_fix@Base 0.10 isl_map_fix_input_si@Base 0.10 isl_map_fix_si@Base 0.10 + isl_map_fix_val@Base 0.12.1 isl_map_fixed_power@Base 0.10 + isl_map_fixed_power_val@Base 0.12.1 isl_map_flat_domain_product@Base 0.10 isl_map_flat_product@Base 0.10 isl_map_flat_range_product@Base 0.10 @@ -1044,6 +1089,7 @@ isl_map_flatten_domain@Base 0.10 isl_map_flatten_range@Base 0.10 isl_map_floordiv@Base 0.10 + isl_map_floordiv_val@Base 0.12.1 isl_map_foreach_basic_map@Base 0.10 isl_map_free@Base 0.10 isl_map_from_aff@Base 0.10 @@ -1135,6 +1181,7 @@ isl_map_params@Base 0.10 isl_map_partial_lexmax@Base 0.10 isl_map_partial_lexmin@Base 0.10 + isl_map_plain_get_val_if_fixed@Base 0.12.1 isl_map_plain_input_is_fixed@Base 0.10 isl_map_plain_is_disjoint@Base 0.10 isl_map_plain_is_empty@Base 0.10 @@ -1146,6 +1193,8 @@ isl_map_plain_is_universe@Base 0.10 isl_map_polyhedral_hull@Base 0.10 isl_map_power@Base 0.10 + isl_map_preimage_domain_multi_aff@Base 0.12.1 + isl_map_preimage_multi_aff@Base 0.12.1 isl_map_print@Base 0.10 isl_map_print_internal@Base 0.10 isl_map_product@Base 0.10 @@ -1220,6 +1269,7 @@ isl_mat_gcd@Base 0.10 isl_mat_get_ctx@Base 0.10 isl_mat_get_element@Base 0.10 + isl_mat_get_element_val@Base 0.12.1 isl_mat_identity@Base 0.10 isl_mat_initial_non_zero_cols@Base 0.10 isl_mat_insert_cols@Base 0.10 @@ -1234,6 +1284,7 @@ isl_mat_normalize@Base 0.10 isl_mat_normalize_row@Base 0.10 isl_mat_parameter_compression@Base 0.10 + isl_mat_parameter_compression_ext@Base 0.12.1 isl_mat_print_internal@Base 0.10 isl_mat_product@Base 0.10 isl_mat_right_inverse@Base 0.10 @@ -1243,6 +1294,7 @@ isl_mat_scale_down_row@Base 0.10 isl_mat_set_element@Base 0.10 isl_mat_set_element_si@Base 0.10 + isl_mat_set_element_val@Base 0.12.1 isl_mat_sub_alloc6@Base 0.10 isl_mat_sub_alloc@Base 0.10 isl_mat_sub_copy@Base 0.10 @@ -1321,11 +1373,14 @@ isl_multi_aff_reset_space@Base 0.10 isl_multi_aff_reset_space_and_domain@Base 0.10 isl_multi_aff_scale@Base 0.10 + isl_multi_aff_scale_multi_val@Base 0.12.1 + isl_multi_aff_scale_val@Base 0.12.1 isl_multi_aff_set_aff@Base 0.10 isl_multi_aff_set_dim_name@Base 0.10 isl_multi_aff_set_tuple_id@Base 0.10 isl_multi_aff_set_tuple_name@Base 0.11 isl_multi_aff_splice@Base 0.11 + isl_multi_aff_sub@Base 0.12.1 isl_multi_aff_substitute@Base 0.10 isl_multi_aff_to_str@Base 0.10 isl_multi_aff_zero@Base 0.10 @@ -1359,6 +1414,8 @@ isl_multi_pw_aff_reset_domain_space@Base 0.11 isl_multi_pw_aff_reset_space@Base 0.11 isl_multi_pw_aff_reset_space_and_domain@Base 0.11 + isl_multi_pw_aff_scale_multi_val@Base 0.12.1 + isl_multi_pw_aff_scale_val@Base 0.12.1 isl_multi_pw_aff_set_dim_name@Base 0.11 isl_multi_pw_aff_set_pw_aff@Base 0.11 isl_multi_pw_aff_set_tuple_id@Base 0.11 @@ -1366,6 +1423,40 @@ isl_multi_pw_aff_splice@Base 0.11 isl_multi_pw_aff_to_str@Base 0.11 isl_multi_pw_aff_zero@Base 0.11 + isl_multi_val_add_dims@Base 0.12.1 + isl_multi_val_add_val@Base 0.12.1 + isl_multi_val_align_params@Base 0.12.1 + isl_multi_val_alloc@Base 0.12.1 + isl_multi_val_copy@Base 0.12.1 + isl_multi_val_cow@Base 0.12.1 + isl_multi_val_dim@Base 0.12.1 + isl_multi_val_drop_dims@Base 0.12.1 + isl_multi_val_dup@Base 0.12.1 + isl_multi_val_flat_range_product@Base 0.12.1 + isl_multi_val_flatten_range@Base 0.12.1 + isl_multi_val_free@Base 0.12.1 + isl_multi_val_from_val_list@Base 0.12.1 + isl_multi_val_get_ctx@Base 0.12.1 + isl_multi_val_get_domain_space@Base 0.12.1 + isl_multi_val_get_space@Base 0.12.1 + isl_multi_val_get_tuple_name@Base 0.12.1 + isl_multi_val_get_val@Base 0.12.1 + isl_multi_val_insert_dims@Base 0.12.1 + isl_multi_val_mod_val@Base 0.12.1 + isl_multi_val_range_product@Base 0.12.1 + isl_multi_val_range_splice@Base 0.12.1 + isl_multi_val_realign_domain@Base 0.12.1 + isl_multi_val_reset_domain_space@Base 0.12.1 + isl_multi_val_reset_space@Base 0.12.1 + isl_multi_val_reset_space_and_domain@Base 0.12.1 + isl_multi_val_scale_multi_val@Base 0.12.1 + isl_multi_val_scale_val@Base 0.12.1 + isl_multi_val_set_dim_name@Base 0.12.1 + isl_multi_val_set_tuple_id@Base 0.12.1 + isl_multi_val_set_tuple_name@Base 0.12.1 + isl_multi_val_set_val@Base 0.12.1 + isl_multi_val_splice@Base 0.12.1 + isl_multi_val_zero@Base 0.12.1 isl_obj_int_vtable@Base 0.10 isl_obj_map_vtable@Base 0.10 isl_obj_none_vtable@Base 0.10 @@ -1376,10 +1467,12 @@ isl_obj_union_pw_qpolynomial_fold_vtable@Base 0.10 isl_obj_union_pw_qpolynomial_vtable@Base 0.10 isl_obj_union_set_vtable@Base 0.10 + isl_obj_val_vtable@Base 0.12.1 isl_options_args@Base 0.10 isl_options_argsLIST@Base 0.10 isl_options_free@Base 0.10 isl_options_get_ast_build_allow_else@Base 0.11 + isl_options_get_ast_build_allow_or@Base 0.12.1 isl_options_get_ast_build_atomic_upper_bound@Base 0.11 isl_options_get_ast_build_exploit_nested_bounds@Base 0.11 isl_options_get_ast_build_group_coscheduled@Base 0.11 @@ -1400,9 +1493,11 @@ isl_options_get_schedule_separate_components@Base 0.10 isl_options_get_schedule_split_scaled@Base 0.10 isl_options_get_tile_scale_tile_loops@Base 0.10 + isl_options_get_tile_shift_point_loops@Base 0.12.1 isl_options_new_with_defaults@Base 0.10 isl_options_parse@Base 0.10 isl_options_set_ast_build_allow_else@Base 0.11 + isl_options_set_ast_build_allow_or@Base 0.12.1 isl_options_set_ast_build_atomic_upper_bound@Base 0.11 isl_options_set_ast_build_exploit_nested_bounds@Base 0.11 isl_options_set_ast_build_group_coscheduled@Base 0.11 @@ -1423,6 +1518,7 @@ isl_options_set_schedule_separate_components@Base 0.10 isl_options_set_schedule_split_scaled@Base 0.10 isl_options_set_tile_scale_tile_loops@Base 0.10 + isl_options_set_tile_shift_point_loops@Base 0.12.1 isl_parameter_alignment_reordering@Base 0.10 isl_pip_basic_map_lexopt@Base 0.10 isl_pip_basic_set_sample@Base 0.10 @@ -1437,11 +1533,13 @@ isl_point_dup@Base 0.10 isl_point_free@Base 0.10 isl_point_get_coordinate@Base 0.10 + isl_point_get_coordinate_val@Base 0.12.1 isl_point_get_ctx@Base 0.10 isl_point_get_dim@Base 0.10 isl_point_get_space@Base 0.10 isl_point_is_void@Base 0.10 isl_point_set_coordinate@Base 0.10 + isl_point_set_coordinate_val@Base 0.12.1 isl_point_sub_ui@Base 0.10 isl_point_to_str@Base 0.11 isl_point_void@Base 0.10 @@ -1496,6 +1594,8 @@ isl_printer_print_union_pw_qpolynomial@Base 0.10 isl_printer_print_union_pw_qpolynomial_fold@Base 0.10 isl_printer_print_union_set@Base 0.10 + isl_printer_print_val@Base 0.12.1 + isl_printer_print_val_list@Base 0.12.1 isl_printer_print_vec@Base 0.10 isl_printer_set_indent@Base 0.10 isl_printer_set_isl_int_width@Base 0.10 @@ -1513,6 +1613,7 @@ isl_pw_aff_alloc@Base 0.10 isl_pw_aff_alloc_size@Base 0.10 isl_pw_aff_ceil@Base 0.10 + isl_pw_aff_check_match_domain_space@Base 0.12.1 isl_pw_aff_coalesce@Base 0.10 isl_pw_aff_cond@Base 0.10 isl_pw_aff_copy@Base 0.10 @@ -1526,6 +1627,7 @@ isl_pw_aff_empty@Base 0.10 isl_pw_aff_eq_set@Base 0.10 isl_pw_aff_fix_dim@Base 0.10 + isl_pw_aff_fix_val@Base 0.12.1 isl_pw_aff_floor@Base 0.10 isl_pw_aff_foreach_piece@Base 0.10 isl_pw_aff_free@Base 0.10 @@ -1563,6 +1665,7 @@ isl_pw_aff_list_dup@Base 0.10 isl_pw_aff_list_eq_set@Base 0.10 isl_pw_aff_list_foreach@Base 0.10 + isl_pw_aff_list_foreach_scc@Base 0.12.1 isl_pw_aff_list_free@Base 0.10 isl_pw_aff_list_from_pw_aff@Base 0.10 isl_pw_aff_list_ge_set@Base 0.10 @@ -1578,10 +1681,12 @@ isl_pw_aff_list_ne_set@Base 0.10 isl_pw_aff_list_set_pw_aff@Base 0.11 isl_pw_aff_list_set_rational@Base 0.11 + isl_pw_aff_list_sort@Base 0.12.1 isl_pw_aff_lt_set@Base 0.10 isl_pw_aff_max@Base 0.10 isl_pw_aff_min@Base 0.10 isl_pw_aff_mod@Base 0.10 + isl_pw_aff_mod_val@Base 0.12.1 isl_pw_aff_mul@Base 0.10 isl_pw_aff_mul_isl_int@Base 0.10 isl_pw_aff_n_piece@Base 0.10 @@ -1601,6 +1706,8 @@ isl_pw_aff_reset_space@Base 0.10 isl_pw_aff_scale@Base 0.10 isl_pw_aff_scale_down@Base 0.10 + isl_pw_aff_scale_down_val@Base 0.12.1 + isl_pw_aff_scale_val@Base 0.12.1 isl_pw_aff_set_dim_id@Base 0.10 isl_pw_aff_set_dim_name@Base 0.10 isl_pw_aff_set_rational@Base 0.11 @@ -1633,6 +1740,7 @@ isl_pw_multi_aff_dup@Base 0.10 isl_pw_multi_aff_empty@Base 0.10 isl_pw_multi_aff_fix_dim@Base 0.10 + isl_pw_multi_aff_fix_val@Base 0.12.1 isl_pw_multi_aff_flat_range_product@Base 0.10 isl_pw_multi_aff_foreach_piece@Base 0.10 isl_pw_multi_aff_free@Base 0.10 @@ -1673,11 +1781,14 @@ isl_pw_multi_aff_reset_domain_space@Base 0.10 isl_pw_multi_aff_reset_space@Base 0.10 isl_pw_multi_aff_scale@Base 0.10 + isl_pw_multi_aff_scale_multi_val@Base 0.12.1 + isl_pw_multi_aff_scale_val@Base 0.12.1 isl_pw_multi_aff_set_dim_id@Base 0.10 isl_pw_multi_aff_set_dim_name@Base 0.10 isl_pw_multi_aff_set_pw_aff@Base 0.11 isl_pw_multi_aff_set_tuple_id@Base 0.10 isl_pw_multi_aff_split_dims@Base 0.10 + isl_pw_multi_aff_sub@Base 0.12.1 isl_pw_multi_aff_substitute@Base 0.10 isl_pw_multi_aff_to_str@Base 0.10 isl_pw_multi_aff_union_add@Base 0.10 @@ -1701,6 +1812,7 @@ isl_pw_qpolynomial_dup@Base 0.10 isl_pw_qpolynomial_eval@Base 0.10 isl_pw_qpolynomial_fix_dim@Base 0.10 + isl_pw_qpolynomial_fix_val@Base 0.12.1 isl_pw_qpolynomial_fold_add@Base 0.10 isl_pw_qpolynomial_fold_add_disjoint@Base 0.10 isl_pw_qpolynomial_fold_add_piece@Base 0.10 @@ -1719,6 +1831,7 @@ isl_pw_qpolynomial_fold_dup@Base 0.10 isl_pw_qpolynomial_fold_eval@Base 0.10 isl_pw_qpolynomial_fold_fix_dim@Base 0.10 + isl_pw_qpolynomial_fold_fix_val@Base 0.12.1 isl_pw_qpolynomial_fold_fold@Base 0.10 isl_pw_qpolynomial_fold_foreach_lifted_piece@Base 0.10 isl_pw_qpolynomial_fold_foreach_piece@Base 0.10 @@ -1759,6 +1872,7 @@ isl_pw_qpolynomial_fold_reset_domain_space@Base 0.10 isl_pw_qpolynomial_fold_reset_space@Base 0.10 isl_pw_qpolynomial_fold_scale@Base 0.10 + isl_pw_qpolynomial_fold_scale_val@Base 0.12.1 isl_pw_qpolynomial_fold_set_dim_id@Base 0.10 isl_pw_qpolynomial_fold_set_dim_name@Base 0.10 isl_pw_qpolynomial_fold_set_tuple_id@Base 0.10 @@ -1812,6 +1926,7 @@ isl_pw_qpolynomial_reset_domain_space@Base 0.10 isl_pw_qpolynomial_reset_space@Base 0.10 isl_pw_qpolynomial_scale@Base 0.10 + isl_pw_qpolynomial_scale_val@Base 0.12.1 isl_pw_qpolynomial_set_dim_id@Base 0.10 isl_pw_qpolynomial_set_dim_name@Base 0.10 isl_pw_qpolynomial_set_tuple_id@Base 0.10 @@ -1876,6 +1991,7 @@ isl_qpolynomial_fold_reset_domain_space@Base 0.10 isl_qpolynomial_fold_reset_space_and_domain@Base 0.10 isl_qpolynomial_fold_scale@Base 0.10 + isl_qpolynomial_fold_scale_val@Base 0.12.1 isl_qpolynomial_fold_set_dim_name@Base 0.10 isl_qpolynomial_fold_substitute@Base 0.10 isl_qpolynomial_fold_substitute_equalities@Base 0.10 @@ -1886,6 +2002,7 @@ isl_qpolynomial_from_affine@Base 0.10 isl_qpolynomial_from_constraint@Base 0.10 isl_qpolynomial_from_term@Base 0.10 + isl_qpolynomial_get_constant_val@Base 0.12.1 isl_qpolynomial_get_ctx@Base 0.10 isl_qpolynomial_get_den@Base 0.10 isl_qpolynomial_get_dim@Base 0.10 @@ -1926,6 +2043,7 @@ isl_qpolynomial_reset_domain_space@Base 0.10 isl_qpolynomial_reset_space_and_domain@Base 0.10 isl_qpolynomial_scale@Base 0.10 + isl_qpolynomial_scale_val@Base 0.12.1 isl_qpolynomial_set_dim_name@Base 0.10 isl_qpolynomial_sgn@Base 0.10 isl_qpolynomial_sub@Base 0.10 @@ -1933,6 +2051,7 @@ isl_qpolynomial_substitute_equalities@Base 0.10 isl_qpolynomial_terms_of_sign@Base 0.10 isl_qpolynomial_to_str@Base 0.10 + isl_qpolynomial_val_on_domain@Base 0.12.1 isl_qpolynomial_var_on_domain@Base 0.10 isl_qpolynomial_var_pow_on_domain@Base 0.10 isl_qpolynomial_zero_on_domain@Base 0.10 @@ -2010,6 +2129,7 @@ isl_set_copy_basic_set@Base 0.10 isl_set_count@Base 0.10 isl_set_count_upto@Base 0.10 + isl_set_count_val@Base 0.12.1 isl_set_cow@Base 0.10 isl_set_detect_equalities@Base 0.10 isl_set_dim@Base 0.10 @@ -2022,6 +2142,7 @@ isl_set_dim_max@Base 0.10 isl_set_dim_min@Base 0.10 isl_set_dim_residue_class@Base 0.10 + isl_set_dim_residue_class_val@Base 0.12.1 isl_set_drop@Base 0.10 isl_set_drop_basic_set@Base 0.10 isl_set_drop_constraints_involving_dims@Base 0.11 @@ -2046,6 +2167,7 @@ isl_set_fix@Base 0.10 isl_set_fix_dim_si@Base 0.10 isl_set_fix_si@Base 0.10 + isl_set_fix_val@Base 0.12.1 isl_set_flat_product@Base 0.10 isl_set_flatten@Base 0.10 isl_set_flatten_map@Base 0.10 @@ -2102,7 +2224,9 @@ isl_set_lex_le_set@Base 0.10 isl_set_lex_lt_set@Base 0.10 isl_set_lexmax@Base 0.10 + isl_set_lexmax_pw_multi_aff@Base 0.12.1 isl_set_lexmin@Base 0.10 + isl_set_lexmin_pw_multi_aff@Base 0.12.1 isl_set_lift@Base 0.10 isl_set_lifting@Base 0.10 isl_set_list_add@Base 0.10 @@ -2114,6 +2238,7 @@ isl_set_list_dump@Base 0.10 isl_set_list_dup@Base 0.10 isl_set_list_foreach@Base 0.10 + isl_set_list_foreach_scc@Base 0.12.1 isl_set_list_free@Base 0.10 isl_set_list_from_set@Base 0.10 isl_set_list_get_ctx@Base 0.10 @@ -2121,12 +2246,16 @@ isl_set_list_insert@Base 0.11 isl_set_list_n_set@Base 0.10 isl_set_list_set_set@Base 0.11 + isl_set_list_sort@Base 0.12.1 isl_set_lower_bound@Base 0.10 isl_set_lower_bound_dim@Base 0.10 isl_set_lower_bound_si@Base 0.10 + isl_set_lower_bound_val@Base 0.12.1 isl_set_make_disjoint@Base 0.10 isl_set_max@Base 0.10 + isl_set_max_val@Base 0.12.1 isl_set_min@Base 0.10 + isl_set_min_val@Base 0.12.1 isl_set_move_dims@Base 0.10 isl_set_n_basic_set@Base 0.10 isl_set_n_dim@Base 0.10 @@ -2135,12 +2264,14 @@ isl_set_neg@Base 0.10 isl_set_normalize@Base 0.10 isl_set_opt@Base 0.10 + isl_set_opt_val@Base 0.12.1 isl_set_params@Base 0.10 isl_set_partial_lexmax@Base 0.10 isl_set_partial_lexmin@Base 0.10 isl_set_plain_cmp@Base 0.10 isl_set_plain_dim_has_fixed_lower_bound@Base 0.10 isl_set_plain_dim_is_fixed@Base 0.10 + isl_set_plain_get_val_if_fixed@Base 0.12.1 isl_set_plain_is_disjoint@Base 0.10 isl_set_plain_is_empty@Base 0.10 isl_set_plain_is_equal@Base 0.10 @@ -2192,6 +2323,7 @@ isl_set_unwrap@Base 0.10 isl_set_upper_bound@Base 0.10 isl_set_upper_bound_si@Base 0.10 + isl_set_upper_bound_val@Base 0.12.1 isl_set_wrap_facet@Base 0.10 isl_sort@Base 0.11 isl_space_add_dims@Base 0.10 @@ -2298,8 +2430,10 @@ isl_stream_read_pw_qpolynomial@Base 0.10 isl_stream_read_set@Base 0.10 isl_stream_read_union_map@Base 0.10 + isl_stream_read_union_pw_multi_aff@Base 0.12.1 isl_stream_read_union_pw_qpolynomial@Base 0.10 isl_stream_read_union_set@Base 0.10 + isl_stream_read_val@Base 0.12.1 isl_stream_register_keyword@Base 0.10 isl_stream_skip_line@Base 0.10 isl_tab_add_div@Base 0.10 @@ -2330,6 +2464,7 @@ isl_tab_from_basic_map@Base 0.10 isl_tab_from_basic_set@Base 0.10 isl_tab_from_recession_cone@Base 0.10 + isl_tab_get_ctx@Base 0.12.1 isl_tab_get_sample_value@Base 0.10 isl_tab_ineq_type@Base 0.10 isl_tab_init_samples@Base 0.10 @@ -2361,6 +2496,7 @@ isl_tab_solve_lp@Base 0.10 isl_tab_track_bmap@Base 0.10 isl_tab_track_bset@Base 0.10 + isl_tab_unrestrict@Base 0.12.1 isl_tab_var_from_row@Base 0.10 isl_tarjan_graph_free@Base 0.11 isl_tarjan_graph_init@Base 0.11 @@ -2370,12 +2506,16 @@ isl_term_dim@Base 0.10 isl_term_dup@Base 0.10 isl_term_free@Base 0.10 + isl_term_get_coefficient_val@Base 0.12.1 isl_term_get_ctx@Base 0.10 isl_term_get_den@Base 0.10 isl_term_get_div@Base 0.10 isl_term_get_exp@Base 0.10 isl_term_get_num@Base 0.10 isl_token_free@Base 0.10 + isl_token_get_str@Base 0.12.1 + isl_token_get_type@Base 0.12.1 + isl_token_get_val@Base 0.12.1 isl_token_new@Base 0.10 isl_union_map_add_map@Base 0.10 isl_union_map_affine_hull@Base 0.10 @@ -2401,6 +2541,7 @@ isl_union_map_empty@Base 0.10 isl_union_map_extract_map@Base 0.10 isl_union_map_fixed_power@Base 0.10 + isl_union_map_fixed_power_val@Base 0.12.1 isl_union_map_flat_range_product@Base 0.10 isl_union_map_foreach_map@Base 0.10 isl_union_map_free@Base 0.10 @@ -2440,6 +2581,7 @@ isl_union_map_plain_is_injective@Base 0.10 isl_union_map_polyhedral_hull@Base 0.10 isl_union_map_power@Base 0.10 + isl_union_map_preimage_domain_multi_aff@Base 0.12.1 isl_union_map_product@Base 0.10 isl_union_map_range@Base 0.10 isl_union_map_range_map@Base 0.10 @@ -2475,6 +2617,8 @@ isl_union_pw_multi_aff_free@Base 0.10 isl_union_pw_multi_aff_from_domain@Base 0.10 isl_union_pw_multi_aff_from_pw_multi_aff@Base 0.10 + isl_union_pw_multi_aff_from_union_map@Base 0.12.1 + isl_union_pw_multi_aff_from_union_set@Base 0.12.1 isl_union_pw_multi_aff_get_ctx@Base 0.10 isl_union_pw_multi_aff_get_space@Base 0.10 isl_union_pw_multi_aff_gist@Base 0.10 @@ -2483,6 +2627,10 @@ isl_union_pw_multi_aff_intersect_params@Base 0.10 isl_union_pw_multi_aff_mul_isl_int@Base 0.10 isl_union_pw_multi_aff_plain_is_equal@Base 0.10 + isl_union_pw_multi_aff_read_from_str@Base 0.12.1 + isl_union_pw_multi_aff_scale_multi_val@Base 0.12.1 + isl_union_pw_multi_aff_scale_val@Base 0.12.1 + isl_union_pw_multi_aff_sub@Base 0.12.1 isl_union_pw_multi_aff_to_str@Base 0.10 isl_union_pw_qpolynomial_add@Base 0.10 isl_union_pw_qpolynomial_add_pw_qpolynomial@Base 0.10 @@ -2523,6 +2671,7 @@ isl_union_pw_qpolynomial_fold_intersect_params@Base 0.10 isl_union_pw_qpolynomial_fold_mul_isl_int@Base 0.10 isl_union_pw_qpolynomial_fold_plain_is_equal@Base 0.10 + isl_union_pw_qpolynomial_fold_scale_val@Base 0.12.1 isl_union_pw_qpolynomial_fold_to_str@Base 0.10 isl_union_pw_qpolynomial_fold_zero@Base 0.10 isl_union_pw_qpolynomial_foreach_pw_qpolynomial@Base 0.10 @@ -2540,6 +2689,7 @@ isl_union_pw_qpolynomial_neg@Base 0.10 isl_union_pw_qpolynomial_plain_is_equal@Base 0.10 isl_union_pw_qpolynomial_read_from_str@Base 0.10 + isl_union_pw_qpolynomial_scale_val@Base 0.12.1 isl_union_pw_qpolynomial_sub@Base 0.10 isl_union_pw_qpolynomial_to_polynomial@Base 0.10 isl_union_pw_qpolynomial_to_str@Base 0.10 @@ -2645,10 +2795,109 @@ isl_upoly_update_affine@Base 0.10 isl_upoly_var_pow@Base 0.10 isl_upoly_zero@Base 0.10 + isl_val_2exp@Base 0.12.1 + isl_val_abs@Base 0.12.1 + isl_val_add@Base 0.12.1 + isl_val_add_ui@Base 0.12.1 + isl_val_alloc@Base 0.12.1 + isl_val_ceil@Base 0.12.1 + isl_val_check_match_domain_space@Base 0.12.1 + isl_val_cmp_si@Base 0.12.1 + isl_val_copy@Base 0.12.1 + isl_val_cow@Base 0.12.1 + isl_val_div@Base 0.12.1 + isl_val_drop_dims@Base 0.12.1 + isl_val_dump@Base 0.12.1 + isl_val_dup@Base 0.12.1 + isl_val_eq@Base 0.12.1 + isl_val_floor@Base 0.12.1 + isl_val_free@Base 0.12.1 + isl_val_from_gmp@Base 0.12.1 + isl_val_gcd@Base 0.12.1 + isl_val_gcdext@Base 0.12.1 + isl_val_ge@Base 0.12.1 + isl_val_get_abs_num_chunks@Base 0.12.1 + isl_val_get_ctx@Base 0.12.1 + isl_val_get_d@Base 0.12.1 + isl_val_get_den_gmp@Base 0.12.1 + isl_val_get_den_si@Base 0.12.1 + isl_val_get_num_gmp@Base 0.12.1 + isl_val_get_num_isl_int@Base 0.12.1 + isl_val_get_num_si@Base 0.12.1 + isl_val_gt@Base 0.12.1 + isl_val_infty@Base 0.12.1 + isl_val_insert_dims@Base 0.12.1 + isl_val_int_from_chunks@Base 0.12.1 + isl_val_int_from_gmp@Base 0.12.1 + isl_val_int_from_isl_int@Base 0.12.1 + isl_val_int_from_si@Base 0.12.1 + isl_val_int_from_ui@Base 0.12.1 + isl_val_is_divisible_by@Base 0.12.1 + isl_val_is_infty@Base 0.12.1 + isl_val_is_int@Base 0.12.1 + isl_val_is_nan@Base 0.12.1 + isl_val_is_neg@Base 0.12.1 + isl_val_is_neginfty@Base 0.12.1 + isl_val_is_negone@Base 0.12.1 + isl_val_is_nonneg@Base 0.12.1 + isl_val_is_nonpos@Base 0.12.1 + isl_val_is_one@Base 0.12.1 + isl_val_is_pos@Base 0.12.1 + isl_val_is_rat@Base 0.12.1 + isl_val_is_zero@Base 0.12.1 + isl_val_le@Base 0.12.1 + isl_val_list_add@Base 0.12.1 + isl_val_list_alloc@Base 0.12.1 + isl_val_list_concat@Base 0.12.1 + isl_val_list_copy@Base 0.12.1 + isl_val_list_cow@Base 0.12.1 + isl_val_list_drop@Base 0.12.1 + isl_val_list_dump@Base 0.12.1 + isl_val_list_dup@Base 0.12.1 + isl_val_list_foreach@Base 0.12.1 + isl_val_list_foreach_scc@Base 0.12.1 + isl_val_list_free@Base 0.12.1 + isl_val_list_from_val@Base 0.12.1 + isl_val_list_get_ctx@Base 0.12.1 + isl_val_list_get_val@Base 0.12.1 + isl_val_list_insert@Base 0.12.1 + isl_val_list_n_val@Base 0.12.1 + isl_val_list_set_val@Base 0.12.1 + isl_val_list_sort@Base 0.12.1 + isl_val_lt@Base 0.12.1 + isl_val_max@Base 0.12.1 + isl_val_min@Base 0.12.1 + isl_val_mod@Base 0.12.1 + isl_val_mul@Base 0.12.1 + isl_val_mul_ui@Base 0.12.1 + isl_val_n_abs_num_chunks@Base 0.12.1 + isl_val_nan@Base 0.12.1 + isl_val_ne@Base 0.12.1 + isl_val_neg@Base 0.12.1 + isl_val_neginfty@Base 0.12.1 + isl_val_normalize@Base 0.12.1 + isl_val_one@Base 0.12.1 + isl_val_rat_from_isl_int@Base 0.12.1 + isl_val_read_from_str@Base 0.12.1 + isl_val_realign_domain@Base 0.12.1 + isl_val_reset_domain_space@Base 0.12.1 + isl_val_scale_val@Base 0.12.1 + isl_val_set_dim_name@Base 0.12.1 + isl_val_set_nan@Base 0.12.1 + isl_val_set_si@Base 0.12.1 + isl_val_set_zero@Base 0.12.1 + isl_val_sgn@Base 0.12.1 + isl_val_sub@Base 0.12.1 + isl_val_sub_ui@Base 0.12.1 + isl_val_to_str@Base 0.12.1 + isl_val_trunc@Base 0.12.1 + isl_val_zero@Base 0.12.1 + isl_val_zero_on_domain@Base 0.12.1 isl_vec_add@Base 0.10 isl_vec_alloc@Base 0.10 isl_vec_ceil@Base 0.10 isl_vec_clr@Base 0.10 + isl_vec_cmp_element@Base 0.12.1 isl_vec_concat@Base 0.11 isl_vec_copy@Base 0.10 isl_vec_cow@Base 0.10 @@ -2660,6 +2909,7 @@ isl_vec_free@Base 0.10 isl_vec_get_ctx@Base 0.10 isl_vec_get_element@Base 0.10 + isl_vec_get_element_val@Base 0.12.1 isl_vec_insert_els@Base 0.10 isl_vec_insert_zero_els@Base 0.10 isl_vec_is_equal@Base 0.10 @@ -2672,7 +2922,9 @@ isl_vec_set@Base 0.10 isl_vec_set_element@Base 0.10 isl_vec_set_element_si@Base 0.10 + isl_vec_set_element_val@Base 0.12.1 isl_vec_set_si@Base 0.10 + isl_vec_set_val@Base 0.12.1 isl_vec_size@Base 0.10 isl_vec_sort@Base 0.10 isl_vec_zero_extend@Base 0.10 diff -Nru isl-0.11.2/debian/rules isl-0.12.1/debian/rules --- isl-0.11.2/debian/rules 2013-02-27 16:29:54.000000000 +0000 +++ isl-0.12.1/debian/rules 2013-10-17 14:35:55.000000000 +0000 @@ -4,7 +4,7 @@ DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) %: - dh $@ --with autoreconf + dh $@ --with autotools_dev override_dh_auto_configure: $(shell dpkg-buildflags --export=configure) \ diff -Nru isl-0.11.2/debian/watch isl-0.12.1/debian/watch --- isl-0.11.2/debian/watch 2011-08-11 09:57:39.000000000 +0000 +++ isl-0.12.1/debian/watch 2013-10-17 13:44:59.000000000 +0000 @@ -1,2 +1,2 @@ version=3 -ftp://ftp.linux.student.kuleuven.be/pub/people/skimo/isl/isl-(.*)\.tar\.gz debian uupdate +http://isl.gforge.inria.fr/isl-(.*)\.tar\.gz debian uupdate diff -Nru isl-0.11.2/doc/Makefile.in isl-0.12.1/doc/Makefile.in --- isl-0.11.2/doc/Makefile.in 2013-04-09 16:45:43.000000000 +0000 +++ isl-0.12.1/doc/Makefile.in 2013-07-24 11:05:05.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -66,6 +83,11 @@ am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ diff -Nru isl-0.11.2/doc/implementation.tex isl-0.12.1/doc/implementation.tex --- isl-0.11.2/doc/implementation.tex 2012-11-29 08:47:32.000000000 +0000 +++ isl-0.12.1/doc/implementation.tex 2013-07-24 11:02:36.000000000 +0000 @@ -1650,7 +1650,7 @@ However, it is also possible to detect disjoint domains and ranges and to apply Floyd-Warshall internally. -\linesnumbered +\LinesNumbered \begin{algorithm} \caption{The modified Floyd-Warshall algorithm of \protect\shortciteN{Kelly1996closure}} @@ -1662,8 +1662,8 @@ $R_{pq}$ contains all indirect paths from $p$ to $q$ in the input graph} % \BlankLine -\SetVline -\dontprintsemicolon +\SetAlgoVlined +\DontPrintSemicolon % \For{$r \in [0, n-1]$}{ $R_{rr} \coloneqq R_{rr}^+$ \nllabel{l:Floyd:closure}\; Binary files /tmp/1hqTMEDyS7/isl-0.11.2/doc/manual.pdf and /tmp/oDGOvfXaX7/isl-0.12.1/doc/manual.pdf differ diff -Nru isl-0.11.2/doc/user.pod isl-0.12.1/doc/user.pod --- isl-0.11.2/doc/user.pod 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/doc/user.pod 2013-07-24 11:04:50.000000000 +0000 @@ -343,16 +343,221 @@ isl_ctx *isl_ctx_alloc(); void isl_ctx_free(isl_ctx *ctx); -=head2 Integers +=head2 Values -All operations on integers, mainly the coefficients -of the constraints describing the sets and relations, -are performed in exact integer arithmetic using C. -However, to allow future versions of C to optionally -support fixed integer arithmetic, all calls to C -are wrapped inside C specific macros. -The basic type is C and the operations below -are available on this type. +An C represents an integer value, a rational value +or one of three special values, infinity, negative infinity and NaN. +Some predefined values can be created using the following functions. + + #include + __isl_give isl_val *isl_val_zero(isl_ctx *ctx); + __isl_give isl_val *isl_val_one(isl_ctx *ctx); + __isl_give isl_val *isl_val_nan(isl_ctx *ctx); + __isl_give isl_val *isl_val_infty(isl_ctx *ctx); + __isl_give isl_val *isl_val_neginfty(isl_ctx *ctx); + +Specific integer values can be created using the following functions. + + #include + __isl_give isl_val *isl_val_int_from_si(isl_ctx *ctx, + long i); + __isl_give isl_val *isl_val_int_from_ui(isl_ctx *ctx, + unsigned long u); + __isl_give isl_val *isl_val_int_from_chunks(isl_ctx *ctx, + size_t n, size_t size, const void *chunks); + +The function C constructs an C +from the C I, each consisting of C bytes, stored at C. +The least significant digit is assumed to be stored first. + +Value objects can be copied and freed using the following functions. + + #include + __isl_give isl_val *isl_val_copy(__isl_keep isl_val *v); + void *isl_val_free(__isl_take isl_val *v); + +They can be inspected using the following functions. + + #include + isl_ctx *isl_val_get_ctx(__isl_keep isl_val *val); + long isl_val_get_num_si(__isl_keep isl_val *v); + long isl_val_get_den_si(__isl_keep isl_val *v); + double isl_val_get_d(__isl_keep isl_val *v); + size_t isl_val_n_abs_num_chunks(__isl_keep isl_val *v, + size_t size); + int isl_val_get_abs_num_chunks(__isl_keep isl_val *v, + size_t size, void *chunks); + +C returns the number of I +of C bytes needed to store the absolute value of the +numerator of C. +C stores these digits at C, +which is assumed to have been preallocated by the caller. +The least significant digit is stored first. +Note that C, C, +C, C +and C can only be applied to rational values. + +An C can be modified using the following function. + + #include + __isl_give isl_val *isl_val_set_si(__isl_take isl_val *v, + long i); + +The following unary properties are defined on Cs. + + #include + int isl_val_sgn(__isl_keep isl_val *v); + int isl_val_is_zero(__isl_keep isl_val *v); + int isl_val_is_one(__isl_keep isl_val *v); + int isl_val_is_negone(__isl_keep isl_val *v); + int isl_val_is_nonneg(__isl_keep isl_val *v); + int isl_val_is_nonpos(__isl_keep isl_val *v); + int isl_val_is_pos(__isl_keep isl_val *v); + int isl_val_is_neg(__isl_keep isl_val *v); + int isl_val_is_int(__isl_keep isl_val *v); + int isl_val_is_rat(__isl_keep isl_val *v); + int isl_val_is_nan(__isl_keep isl_val *v); + int isl_val_is_infty(__isl_keep isl_val *v); + int isl_val_is_neginfty(__isl_keep isl_val *v); + +Note that the sign of NaN is undefined. + +The following binary properties are defined on pairs of Cs. + + #include + int isl_val_lt(__isl_keep isl_val *v1, + __isl_keep isl_val *v2); + int isl_val_le(__isl_keep isl_val *v1, + __isl_keep isl_val *v2); + int isl_val_gt(__isl_keep isl_val *v1, + __isl_keep isl_val *v2); + int isl_val_ge(__isl_keep isl_val *v1, + __isl_keep isl_val *v2); + int isl_val_eq(__isl_keep isl_val *v1, + __isl_keep isl_val *v2); + int isl_val_ne(__isl_keep isl_val *v1, + __isl_keep isl_val *v2); + +For integer Cs we additionally have the following binary property. + + #include + int isl_val_is_divisible_by(__isl_keep isl_val *v1, + __isl_keep isl_val *v2); + +An C can also be compared to an integer using the following +function. The result is undefined for NaN. + + #include + int isl_val_cmp_si(__isl_keep isl_val *v, long i); + +The following unary operations are available on Cs. + + #include + __isl_give isl_val *isl_val_abs(__isl_take isl_val *v); + __isl_give isl_val *isl_val_neg(__isl_take isl_val *v); + __isl_give isl_val *isl_val_floor(__isl_take isl_val *v); + __isl_give isl_val *isl_val_ceil(__isl_take isl_val *v); + __isl_give isl_val *isl_val_trunc(__isl_take isl_val *v); + +The following binary operations are available on Cs. + + #include + __isl_give isl_val *isl_val_abs(__isl_take isl_val *v); + __isl_give isl_val *isl_val_neg(__isl_take isl_val *v); + __isl_give isl_val *isl_val_floor(__isl_take isl_val *v); + __isl_give isl_val *isl_val_ceil(__isl_take isl_val *v); + __isl_give isl_val *isl_val_trunc(__isl_take isl_val *v); + __isl_give isl_val *isl_val_2exp(__isl_take isl_val *v); + __isl_give isl_val *isl_val_min(__isl_take isl_val *v1, + __isl_take isl_val *v2); + __isl_give isl_val *isl_val_max(__isl_take isl_val *v1, + __isl_take isl_val *v2); + __isl_give isl_val *isl_val_add(__isl_take isl_val *v1, + __isl_take isl_val *v2); + __isl_give isl_val *isl_val_add_ui(__isl_take isl_val *v1, + unsigned long v2); + __isl_give isl_val *isl_val_sub(__isl_take isl_val *v1, + __isl_take isl_val *v2); + __isl_give isl_val *isl_val_sub_ui(__isl_take isl_val *v1, + unsigned long v2); + __isl_give isl_val *isl_val_mul(__isl_take isl_val *v1, + __isl_take isl_val *v2); + __isl_give isl_val *isl_val_mul_ui(__isl_take isl_val *v1, + unsigned long v2); + __isl_give isl_val *isl_val_div(__isl_take isl_val *v1, + __isl_take isl_val *v2); + +On integer values, we additionally have the following operations. + + #include + __isl_give isl_val *isl_val_2exp(__isl_take isl_val *v); + __isl_give isl_val *isl_val_mod(__isl_take isl_val *v1, + __isl_take isl_val *v2); + __isl_give isl_val *isl_val_gcd(__isl_take isl_val *v1, + __isl_take isl_val *v2); + __isl_give isl_val *isl_val_gcdext(__isl_take isl_val *v1, + __isl_take isl_val *v2, __isl_give isl_val **x, + __isl_give isl_val **y); + +The function C returns the greatest common divisor g +of C and C as well as two integers C<*x> and C<*y> such +that C<*x> * C + C<*y> * C = g. + +A value can be read from input using + + #include + __isl_give isl_val *isl_val_read_from_str(isl_ctx *ctx, + const char *str); + +A value can be printed using + + #include + __isl_give isl_printer *isl_printer_print_val( + __isl_take isl_printer *p, __isl_keep isl_val *v); + +=head3 GMP specific functions + +These functions are only available if C has been compiled with C +support. + +Specific integer and rational values can be created from C values using +the following functions. + + #include + __isl_give isl_val *isl_val_int_from_gmp(isl_ctx *ctx, + mpz_t z); + __isl_give isl_val *isl_val_from_gmp(isl_ctx *ctx, + const mpz_t n, const mpz_t d); + +The numerator and denominator of a rational value can be extracted as +C values using the following functions. + + #include + int isl_val_get_num_gmp(__isl_keep isl_val *v, mpz_t z); + int isl_val_get_den_gmp(__isl_keep isl_val *v, mpz_t z); + +=head3 Conversion from C + +The following functions are only temporarily available to ease +the transition from C to C. They will be removed +in the next release. + + #include + __isl_give isl_val *isl_val_int_from_isl_int(isl_ctx *ctx, + isl_int n); + int isl_val_get_num_isl_int(__isl_keep isl_val *v, + isl_int *n); + +=head2 Integers (obsolescent) + +In previous versions of C, integers were represented +in the external interface using the C type. +This type has now been superseded by C. +The C type will be removed from the external interface +in future releases. New code should not use C. + +The operations below are currently available on Cs. The meanings of these operations are essentially the same as their C C counterparts. As always with C types, Cs need to be @@ -734,6 +939,10 @@ __isl_give isl_space *isl_union_pw_qpolynomial_fold_get_space( __isl_keep isl_union_pw_qpolynomial_fold *upwf); + #include + __isl_give isl_space *isl_multi_val_get_space( + __isl_keep isl_multi_val *mv); + #include __isl_give isl_space *isl_aff_get_domain_space( __isl_keep isl_aff *aff); @@ -950,6 +1159,9 @@ __isl_keep isl_local_space *ls); void *isl_local_space_free(__isl_take isl_local_space *ls); +Note that C can only be used on local spaces +of sets. + Two local spaces can be compared using int isl_local_space_is_equal(__isl_keep isl_local_space *ls1, @@ -1325,12 +1537,19 @@ __isl_take isl_constraint *constraint, isl_int v); __isl_give isl_constraint *isl_constraint_set_constant_si( __isl_take isl_constraint *constraint, int v); + __isl_give isl_constraint *isl_constraint_set_constant_val( + __isl_take isl_constraint *constraint, + __isl_take isl_val *v); __isl_give isl_constraint *isl_constraint_set_coefficient( __isl_take isl_constraint *constraint, enum isl_dim_type type, int pos, isl_int v); __isl_give isl_constraint *isl_constraint_set_coefficient_si( __isl_take isl_constraint *constraint, enum isl_dim_type type, int pos, int v); + __isl_give isl_constraint * + isl_constraint_set_coefficient_val( + __isl_take isl_constraint *constraint, + enum isl_dim_type type, int pos, isl_val *v); __isl_give isl_basic_map *isl_basic_map_add_constraint( __isl_take isl_basic_map *bmap, __isl_take isl_constraint *constraint); @@ -1602,9 +1821,14 @@ enum isl_dim_type type, unsigned pos); void isl_constraint_get_constant( __isl_keep isl_constraint *constraint, isl_int *v); + __isl_give isl_val *isl_constraint_get_constant_val( + __isl_keep isl_constraint *constraint); void isl_constraint_get_coefficient( __isl_keep isl_constraint *constraint, enum isl_dim_type type, int pos, isl_int *v); + __isl_give isl_val *isl_constraint_get_coefficient_val( + __isl_keep isl_constraint *constraint, + enum isl_dim_type type, int pos); int isl_constraint_involves_dims( __isl_keep isl_constraint *constraint, enum isl_dim_type type, unsigned first, unsigned n); @@ -1864,6 +2088,36 @@ Check if the relation obviously lies on a hyperplane where the given dimension has a fixed value and if so, return that value in C<*val>. + __isl_give isl_val * + isl_basic_map_plain_get_val_if_fixed( + __isl_keep isl_basic_map *bmap, + enum isl_dim_type type, unsigned pos); + __isl_give isl_val *isl_set_plain_get_val_if_fixed( + __isl_keep isl_set *set, + enum isl_dim_type type, unsigned pos); + __isl_give isl_val *isl_map_plain_get_val_if_fixed( + __isl_keep isl_map *map, + enum isl_dim_type type, unsigned pos); + +If the set or relation obviously lies on a hyperplane where the given dimension +has a fixed value, then return that value. +Otherwise return NaN. + +=item * Stride + + int isl_set_dim_residue_class_val( + __isl_keep isl_set *set, + int pos, __isl_give isl_val **modulo, + __isl_give isl_val **residue); + +Check if the values of the given set dimension are equal to a fixed +value modulo some integer value. If so, assign the modulo to C<*modulo> +and the fixed value to C<*residue>. If the given dimension attains only +a single value, then assign C<0> to C<*modulo> and the fixed value to +C<*residue>. +If the dimension does not attain only a single value and if no modulo +can be found then assign C<1> to C<*modulo> and C<1> to C<*residue>. + =item * Space To check whether a set is a parameter domain, use this function: @@ -2087,19 +2341,35 @@ __isl_give isl_basic_set *isl_basic_set_fix_si( __isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned pos, int value); + __isl_give isl_basic_set *isl_basic_set_fix_val( + __isl_take isl_basic_set *bset, + enum isl_dim_type type, unsigned pos, + __isl_take isl_val *v); __isl_give isl_set *isl_set_fix(__isl_take isl_set *set, enum isl_dim_type type, unsigned pos, isl_int value); __isl_give isl_set *isl_set_fix_si(__isl_take isl_set *set, enum isl_dim_type type, unsigned pos, int value); + __isl_give isl_set *isl_set_fix_val( + __isl_take isl_set *set, + enum isl_dim_type type, unsigned pos, + __isl_take isl_val *v); __isl_give isl_basic_map *isl_basic_map_fix_si( __isl_take isl_basic_map *bmap, enum isl_dim_type type, unsigned pos, int value); + __isl_give isl_basic_map *isl_basic_map_fix_val( + __isl_take isl_basic_map *bmap, + enum isl_dim_type type, unsigned pos, + __isl_take isl_val *v); __isl_give isl_map *isl_map_fix(__isl_take isl_map *map, enum isl_dim_type type, unsigned pos, isl_int value); __isl_give isl_map *isl_map_fix_si(__isl_take isl_map *map, enum isl_dim_type type, unsigned pos, int value); + __isl_give isl_map *isl_map_fix_val( + __isl_take isl_map *map, + enum isl_dim_type type, unsigned pos, + __isl_take isl_val *v); Intersect the set or relation with the hyperplane where the given dimension has the fixed given value. @@ -2117,6 +2387,10 @@ __isl_give isl_set *isl_set_lower_bound_si( __isl_take isl_set *set, enum isl_dim_type type, unsigned pos, int value); + __isl_give isl_set *isl_set_lower_bound_val( + __isl_take isl_set *set, + enum isl_dim_type type, unsigned pos, + __isl_take isl_val *value); __isl_give isl_map *isl_map_lower_bound_si( __isl_take isl_map *map, enum isl_dim_type type, unsigned pos, int value); @@ -2127,12 +2401,16 @@ __isl_give isl_set *isl_set_upper_bound_si( __isl_take isl_set *set, enum isl_dim_type type, unsigned pos, int value); + __isl_give isl_set *isl_set_upper_bound_val( + __isl_take isl_set *set, + enum isl_dim_type type, unsigned pos, + __isl_take isl_val *value); __isl_give isl_map *isl_map_upper_bound_si( __isl_take isl_map *map, enum isl_dim_type type, unsigned pos, int value); Intersect the set or relation with the half-space where the given -dimension has a value bounded by the fixed given value. +dimension has a value bounded by the fixed given integer value. __isl_give isl_set *isl_set_equate(__isl_take isl_set *set, enum isl_dim_type type1, int pos1, @@ -2162,6 +2440,10 @@ __isl_give isl_map *isl_map_order_lt(__isl_take isl_map *map, enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); + __isl_give isl_basic_map *isl_basic_map_order_gt( + __isl_take isl_basic_map *bmap, + enum isl_dim_type type1, int pos1, + enum isl_dim_type type2, int pos2); __isl_give isl_map *isl_map_order_gt(__isl_take isl_map *map, enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); @@ -2332,6 +2614,11 @@ __isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned first, unsigned n); + __isl_give isl_basic_map * + isl_basic_map_drop_constraints_involving_dims( + __isl_take isl_basic_map *bmap, + enum isl_dim_type type, + unsigned first, unsigned n); __isl_give isl_basic_set * isl_basic_set_drop_constraints_not_involving_dims( __isl_take isl_basic_set *bset, @@ -2371,15 +2658,28 @@ enum isl_lp_result isl_basic_set_max( __isl_keep isl_basic_set *bset, __isl_keep isl_aff *obj, isl_int *opt) + __isl_give isl_val *isl_basic_set_max_val( + __isl_keep isl_basic_set *bset, + __isl_keep isl_aff *obj); enum isl_lp_result isl_set_min(__isl_keep isl_set *set, __isl_keep isl_aff *obj, isl_int *opt); + __isl_give isl_val *isl_set_min_val( + __isl_keep isl_set *set, + __isl_keep isl_aff *obj); enum isl_lp_result isl_set_max(__isl_keep isl_set *set, __isl_keep isl_aff *obj, isl_int *opt); + __isl_give isl_val *isl_set_max_val( + __isl_keep isl_set *set, + __isl_keep isl_aff *obj); Compute the minimum or maximum of the integer affine expression C over the points in C, returning the result in C. The return value may be one of C, -C, C or C. +C, C or C, in case of +an C. If the result is an C then +the result is C in case of an error, the optimal value in case +there is one, negative infinity or infinity if the problem is unbounded and +NaN if the problem is empty. =item * Parametric optimization @@ -2425,8 +2725,15 @@ __isl_give isl_map *isl_map_fixed_power( __isl_take isl_map *map, isl_int exp); + __isl_give isl_map *isl_map_fixed_power_val( + __isl_take isl_map *map, + __isl_take isl_val *exp); __isl_give isl_union_map *isl_union_map_fixed_power( __isl_take isl_union_map *umap, isl_int exp); + __isl_give isl_union_map * + isl_union_map_fixed_power_val( + __isl_take isl_union_map *umap, + __isl_take isl_val *exp); Compute the given power of C, where C is assumed to be non-zero. If the exponent C is negative, then the -C th power of the inverse @@ -2809,10 +3116,17 @@ __isl_give isl_set *isl_set_preimage_pw_multi_aff( __isl_take isl_set *set, __isl_take isl_pw_multi_aff *pma); + __isl_give isl_map *isl_map_preimage_domain_multi_aff( + __isl_take isl_map *map, + __isl_take isl_multi_aff *ma); + __isl_give isl_union_map * + isl_union_map_preimage_domain_multi_aff( + __isl_take isl_union_map *umap, + __isl_take isl_multi_aff *ma); -These functions compute the preimage of the given set under +These functions compute the preimage of the given set or map domain under the given function. In other words, the expression is plugged -into the set description. +into the set description or into the domain of the map. Objects of types C and C are described in L. @@ -3058,6 +3372,10 @@ __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, __isl_give isl_set **empty); + __isl_give isl_pw_multi_aff *isl_set_lexmin_pw_multi_aff( + __isl_take isl_set *set); + __isl_give isl_pw_multi_aff *isl_set_lexmax_pw_multi_aff( + __isl_take isl_set *set); __isl_give isl_pw_multi_aff *isl_map_lexmin_pw_multi_aff( __isl_take isl_map *map); __isl_give isl_pw_multi_aff *isl_map_lexmax_pw_multi_aff( @@ -3066,7 +3384,7 @@ =head2 Lists Lists are defined over several element types, including -C, C, C, C, +C, C, C, C, C, C, C, C and C. Here we take lists of Cs as an example. Lists can be created, copied, modified and freed using the following functions. @@ -3093,6 +3411,11 @@ __isl_give isl_set_list *isl_set_list_concat( __isl_take isl_set_list *list1, __isl_take isl_set_list *list2); + __isl_give isl_set_list *isl_set_list_sort( + __isl_take isl_set_list *list, + int (*cmp)(__isl_keep isl_set *a, + __isl_keep isl_set *b, void *user), + void *user); void *isl_set_list_free(__isl_take isl_set_list *list); C creates an empty list with a capacity for @@ -3109,6 +3432,18 @@ int isl_set_list_foreach(__isl_keep isl_set_list *list, int (*fn)(__isl_take isl_set *el, void *user), void *user); + int isl_set_list_foreach_scc(__isl_keep isl_set_list *list, + int (*follows)(__isl_keep isl_set *a, + __isl_keep isl_set *b, void *user), + void *follows_user + int (*fn)(__isl_take isl_set *el, void *user), + void *fn_user); + +The function C calls C on each of the +strongly connected components of the graph with as vertices the elements +of C and a directed edge from vertex C to vertex C +iff C returns C<1>. The callbacks C and C +should return C<-1> on error. Lists can be printed using @@ -3117,6 +3452,100 @@ __isl_take isl_printer *p, __isl_keep isl_set_list *list); +=head2 Multiple Values + +An C object represents a sequence of zero or more values, +living in a set space. + +An C can be constructed from an C +using the following function + + #include + __isl_give isl_multi_val *isl_multi_val_from_val_list( + __isl_take isl_space *space, + __isl_take isl_val_list *list); + +The zero multiple value (with value zero for each set dimension) +can be created using the following function. + + #include + __isl_give isl_multi_val *isl_multi_val_zero( + __isl_take isl_space *space); + +Multiple values can be copied and freed using + + #include + __isl_give isl_multi_val *isl_multi_val_copy( + __isl_keep isl_multi_val *mv); + void *isl_multi_val_free(__isl_take isl_multi_val *mv); + +They can be inspected using + + #include + isl_ctx *isl_multi_val_get_ctx( + __isl_keep isl_multi_val *mv); + unsigned isl_multi_val_dim(__isl_keep isl_multi_val *mv, + enum isl_dim_type type); + __isl_give isl_val *isl_multi_val_get_val( + __isl_keep isl_multi_val *mv, int pos); + const char *isl_multi_val_get_tuple_name( + __isl_keep isl_multi_val *mv, + enum isl_dim_type type); + +They can be modified using + + #include + __isl_give isl_multi_val *isl_multi_val_set_val( + __isl_take isl_multi_val *mv, int pos, + __isl_take isl_val *val); + __isl_give isl_multi_val *isl_multi_val_set_dim_name( + __isl_take isl_multi_val *mv, + enum isl_dim_type type, unsigned pos, const char *s); + __isl_give isl_multi_val *isl_multi_val_set_tuple_name( + __isl_take isl_multi_val *mv, + enum isl_dim_type type, const char *s); + __isl_give isl_multi_val *isl_multi_val_set_tuple_id( + __isl_take isl_multi_val *mv, + enum isl_dim_type type, __isl_take isl_id *id); + + __isl_give isl_multi_val *isl_multi_val_insert_dims( + __isl_take isl_multi_val *mv, + enum isl_dim_type type, unsigned first, unsigned n); + __isl_give isl_multi_val *isl_multi_val_add_dims( + __isl_take isl_multi_val *mv, + enum isl_dim_type type, unsigned n); + __isl_give isl_multi_val *isl_multi_val_drop_dims( + __isl_take isl_multi_val *mv, + enum isl_dim_type type, unsigned first, unsigned n); + +Operations include + + #include + __isl_give isl_multi_val *isl_multi_val_align_params( + __isl_take isl_multi_val *mv, + __isl_take isl_space *model); + __isl_give isl_multi_val *isl_multi_val_range_splice( + __isl_take isl_multi_val *mv1, unsigned pos, + __isl_take isl_multi_val *mv2); + __isl_give isl_multi_val *isl_multi_val_range_product( + __isl_take isl_multi_val *mv1, + __isl_take isl_multi_val *mv2); + __isl_give isl_multi_val *isl_multi_val_flat_range_product( + __isl_take isl_multi_val *mv1, + __isl_take isl_multi_aff *mv2); + __isl_give isl_multi_val *isl_multi_val_add_val( + __isl_take isl_multi_val *mv, + __isl_take isl_val *v); + __isl_give isl_multi_val *isl_multi_val_mod_val( + __isl_take isl_multi_val *mv, + __isl_take isl_val *v); + __isl_give isl_multi_val *isl_multi_val_scale_val( + __isl_take isl_multi_val *mv, + __isl_take isl_val *v); + __isl_give isl_multi_val *isl_multi_val_scale_multi_val( + __isl_take isl_multi_val *mv1, + __isl_take isl_multi_val *mv2); + =head2 Vectors Vectors can be created, copied and freed using the following functions. @@ -3134,14 +3563,23 @@ int isl_vec_size(__isl_keep isl_vec *vec); int isl_vec_get_element(__isl_keep isl_vec *vec, int pos, isl_int *v); + __isl_give isl_val *isl_vec_get_element_val( + __isl_keep isl_vec *vec, int pos); __isl_give isl_vec *isl_vec_set_element( __isl_take isl_vec *vec, int pos, isl_int v); __isl_give isl_vec *isl_vec_set_element_si( __isl_take isl_vec *vec, int pos, int v); + __isl_give isl_vec *isl_vec_set_element_val( + __isl_take isl_vec *vec, int pos, + __isl_take isl_val *v); __isl_give isl_vec *isl_vec_set(__isl_take isl_vec *vec, isl_int v); __isl_give isl_vec *isl_vec_set_si(__isl_take isl_vec *vec, int v); + __isl_give isl_vec *isl_vec_set_val( + __isl_take isl_vec *vec, __isl_take isl_val *v); + int isl_vec_cmp_element(__isl_keep isl_vec *vec1, + __isl_keep isl_vec *vec2, int pos); __isl_give isl_vec *isl_vec_fdiv_r(__isl_take isl_vec *vec, isl_int m); @@ -3161,7 +3599,7 @@ __isl_give isl_mat *isl_mat_alloc(isl_ctx *ctx, unsigned n_row, unsigned n_col); __isl_give isl_mat *isl_mat_copy(__isl_keep isl_mat *mat); - void isl_mat_free(__isl_take isl_mat *mat); + void *isl_mat_free(__isl_take isl_mat *mat); Note that the elements of a newly created matrix may have arbitrary values. The elements can be changed and inspected using the following functions. @@ -3171,10 +3609,15 @@ int isl_mat_cols(__isl_keep isl_mat *mat); int isl_mat_get_element(__isl_keep isl_mat *mat, int row, int col, isl_int *v); + __isl_give isl_val *isl_mat_get_element_val( + __isl_keep isl_mat *mat, int row, int col); __isl_give isl_mat *isl_mat_set_element(__isl_take isl_mat *mat, int row, int col, isl_int v); __isl_give isl_mat *isl_mat_set_element_si(__isl_take isl_mat *mat, int row, int col, int v); + __isl_give isl_mat *isl_mat_set_element_val( + __isl_take isl_mat *mat, int row, int col, + __isl_take isl_val *v); C will return a negative value if anything went wrong. In that case, the value of C<*v> is undefined. @@ -3290,10 +3733,17 @@ enum isl_dim_type type); int isl_aff_get_constant(__isl_keep isl_aff *aff, isl_int *v); + __isl_give isl_val *isl_aff_get_constant_val( + __isl_keep isl_aff *aff); int isl_aff_get_coefficient(__isl_keep isl_aff *aff, enum isl_dim_type type, int pos, isl_int *v); + __isl_give isl_val *isl_aff_get_coefficient_val( + __isl_keep isl_aff *aff, + enum isl_dim_type type, int pos); int isl_aff_get_denominator(__isl_keep isl_aff *aff, isl_int *v); + __isl_give isl_val *isl_aff_get_denominator_val( + __isl_keep isl_aff *aff); __isl_give isl_aff *isl_aff_get_div( __isl_keep isl_aff *aff, int pos); @@ -3336,12 +3786,18 @@ __isl_take isl_aff *aff, isl_int v); __isl_give isl_aff *isl_aff_set_constant_si( __isl_take isl_aff *aff, int v); + __isl_give isl_aff *isl_aff_set_constant_val( + __isl_take isl_aff *aff, __isl_take isl_val *v); __isl_give isl_aff *isl_aff_set_coefficient( __isl_take isl_aff *aff, enum isl_dim_type type, int pos, isl_int v); __isl_give isl_aff *isl_aff_set_coefficient_si( __isl_take isl_aff *aff, enum isl_dim_type type, int pos, int v); + __isl_give isl_aff *isl_aff_set_coefficient_val( + __isl_take isl_aff *aff, + enum isl_dim_type type, int pos, + __isl_take isl_val *v); __isl_give isl_aff *isl_aff_set_denominator( __isl_take isl_aff *aff, isl_int v); @@ -3349,6 +3805,8 @@ __isl_take isl_aff *aff, isl_int v); __isl_give isl_aff *isl_aff_add_constant_si( __isl_take isl_aff *aff, int v); + __isl_give isl_aff *isl_aff_add_constant_val( + __isl_take isl_aff *aff, __isl_take isl_val *v); __isl_give isl_aff *isl_aff_add_constant_num( __isl_take isl_aff *aff, isl_int v); __isl_give isl_aff *isl_aff_add_constant_num_si( @@ -3359,6 +3817,10 @@ __isl_give isl_aff *isl_aff_add_coefficient_si( __isl_take isl_aff *aff, enum isl_dim_type type, int pos, int v); + __isl_give isl_aff *isl_aff_add_coefficient_val( + __isl_take isl_aff *aff, + enum isl_dim_type type, int pos, + __isl_take isl_val *v); __isl_give isl_aff *isl_aff_insert_dims( __isl_take isl_aff *aff, @@ -3379,9 +3841,13 @@ __isl_take isl_pw_aff *pwaff, enum isl_dim_type type, unsigned first, unsigned n); -Note that the C and C functions +Note that C, C, +C and C set the I of the constant or coefficient, while -C and C add an integer value to +C and C set +the constant or coefficient as a whole. +The C and C functions add an integer +or rational value to the possibly rational constant or coefficient. The C functions add an integer value to the numerator. @@ -3427,18 +3893,32 @@ __isl_take isl_pw_aff *pwaff); __isl_give isl_aff *isl_aff_mod(__isl_take isl_aff *aff, isl_int mod); + __isl_give isl_aff *isl_aff_mod_val(__isl_take isl_aff *aff, + __isl_take isl_val *mod); __isl_give isl_pw_aff *isl_pw_aff_mod( __isl_take isl_pw_aff *pwaff, isl_int mod); + __isl_give isl_pw_aff *isl_pw_aff_mod_val( + __isl_take isl_pw_aff *pa, + __isl_take isl_val *mod); __isl_give isl_aff *isl_aff_scale(__isl_take isl_aff *aff, isl_int f); + __isl_give isl_aff *isl_aff_scale_val(__isl_take isl_aff *aff, + __isl_take isl_val *v); __isl_give isl_pw_aff *isl_pw_aff_scale( __isl_take isl_pw_aff *pwaff, isl_int f); + __isl_give isl_pw_aff *isl_pw_aff_scale_val( + __isl_take isl_pw_aff *pa, __isl_take isl_val *v); __isl_give isl_aff *isl_aff_scale_down(__isl_take isl_aff *aff, isl_int f); __isl_give isl_aff *isl_aff_scale_down_ui( __isl_take isl_aff *aff, unsigned f); + __isl_give isl_aff *isl_aff_scale_down_val( + __isl_take isl_aff *aff, __isl_take isl_val *v); __isl_give isl_pw_aff *isl_pw_aff_scale_down( __isl_take isl_pw_aff *pwaff, isl_int f); + __isl_give isl_pw_aff *isl_pw_aff_scale_down_val( + __isl_take isl_pw_aff *pa, + __isl_take isl_val *f); __isl_give isl_pw_aff *isl_pw_aff_list_min( __isl_take isl_pw_aff_list *list); @@ -3704,12 +4184,21 @@ A piecewise multiple quasi affine expression can also be initialized from an C or C, provided the C is a singleton and the C is single-valued. +In case of a conversion from an C or an C +to an C, these properties need to hold in each space. __isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_set( __isl_take isl_set *set); __isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_map( __isl_take isl_map *map); + __isl_give isl_union_pw_multi_aff * + isl_union_pw_multi_aff_from_union_set( + __isl_take isl_union_set *uset); + __isl_give isl_union_pw_multi_aff * + isl_union_pw_multi_aff_from_union_map( + __isl_take isl_union_map *umap); + Multiple quasi affine expressions can be copied and freed using #include @@ -3872,15 +4361,59 @@ __isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_add( __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2); + __isl_give isl_multi_aff *isl_multi_aff_sub( + __isl_take isl_multi_aff *ma1, + __isl_take isl_multi_aff *ma2); + __isl_give isl_pw_multi_aff *isl_pw_multi_aff_sub( + __isl_take isl_pw_multi_aff *pma1, + __isl_take isl_pw_multi_aff *pma2); + __isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_sub( + __isl_take isl_union_pw_multi_aff *upma1, + __isl_take isl_union_pw_multi_aff *upma2); + +C subtracts the second argument from the first. + __isl_give isl_multi_aff *isl_multi_aff_scale( __isl_take isl_multi_aff *maff, isl_int f); + __isl_give isl_multi_aff *isl_multi_aff_scale_val( + __isl_take isl_multi_aff *ma, + __isl_take isl_val *v); + __isl_give isl_pw_multi_aff *isl_pw_multi_aff_scale_val( + __isl_take isl_pw_multi_aff *pma, + __isl_take isl_val *v); + __isl_give isl_multi_pw_aff *isl_multi_pw_aff_scale_val( + __isl_take isl_multi_pw_aff *mpa, + __isl_take isl_val *v); + __isl_give isl_multi_aff *isl_multi_aff_scale_multi_val( + __isl_take isl_multi_aff *ma, + __isl_take isl_multi_val *mv); + __isl_give isl_pw_multi_aff * + isl_pw_multi_aff_scale_multi_val( + __isl_take isl_pw_multi_aff *pma, + __isl_take isl_multi_val *mv); + __isl_give isl_multi_pw_aff * + isl_multi_pw_aff_scale_multi_val( + __isl_take isl_multi_pw_aff *mpa, + __isl_take isl_multi_val *mv); + __isl_give isl_union_pw_multi_aff * + isl_union_pw_multi_aff_scale_multi_val( + __isl_take isl_union_pw_multi_aff *upma, + __isl_take isl_multi_val *mv); + +C scales the elements of C +by the corresponding elements of C. + __isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_params( __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set); __isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_domain( __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set); + __isl_give isl_union_pw_multi_aff * + isl_union_pw_multi_aff_intersect_domain( + __isl_take isl_union_pw_multi_aff *upma, + __isl_take isl_union_set *uset); __isl_give isl_multi_aff *isl_multi_aff_lift( __isl_take isl_multi_aff *maff, __isl_give isl_local_space **ls); @@ -3999,6 +4532,9 @@ isl_ctx *ctx, const char *str); __isl_give isl_pw_multi_aff *isl_pw_multi_aff_read_from_str( isl_ctx *ctx, const char *str); + __isl_give isl_union_pw_multi_aff * + isl_union_pw_multi_aff_read_from_str( + isl_ctx *ctx, const char *str); An expression can be printed using @@ -4030,9 +4566,16 @@ int isl_point_get_coordinate(__isl_keep isl_point *pnt, enum isl_dim_type type, int pos, isl_int *v); + __isl_give isl_val *isl_point_get_coordinate_val( + __isl_keep isl_point *pnt, + enum isl_dim_type type, int pos); __isl_give isl_point *isl_point_set_coordinate( __isl_take isl_point *pnt, enum isl_dim_type type, int pos, isl_int v); + __isl_give isl_point *isl_point_set_coordinate_val( + __isl_take isl_point *pnt, + enum isl_dim_type type, int pos, + __isl_take isl_val *v); __isl_give isl_point *isl_point_add_ui( __isl_take isl_point *pnt, @@ -4186,6 +4729,9 @@ __isl_give isl_qpolynomial *isl_qpolynomial_rat_cst_on_domain( __isl_take isl_space *domain, const isl_int n, const isl_int d); + __isl_give isl_qpolynomial *isl_qpolynomial_val_on_domain( + __isl_take isl_space *domain, + __isl_take isl_val *val); __isl_give isl_qpolynomial *isl_qpolynomial_var_on_domain( __isl_take isl_space *domain, enum isl_dim_type type, unsigned pos); @@ -4280,6 +4826,11 @@ the dimensions of the sets may be different for different invocations of C. +The constant term of a quasipolynomial can be extracted using + + __isl_give isl_val *isl_qpolynomial_get_constant_val( + __isl_keep isl_qpolynomial *qp); + To iterate over all terms in a quasipolynomial, use @@ -4297,6 +4848,8 @@ isl_int *n); void isl_term_get_den(__isl_keep isl_term *term, isl_int *d); + __isl_give isl_val *isl_term_get_coefficient_val( + __isl_keep isl_term *term); int isl_term_get_exp(__isl_keep isl_term *term, enum isl_dim_type type, unsigned pos); __isl_give isl_aff *isl_term_get_div( @@ -4333,6 +4886,9 @@ __isl_give isl_qpolynomial *isl_qpolynomial_scale( __isl_take isl_qpolynomial *qp, isl_int v); + __isl_give isl_qpolynomial *isl_qpolynomial_scale_val( + __isl_take isl_qpolynomial *qp, + __isl_take isl_val *v); __isl_give isl_qpolynomial *isl_qpolynomial_neg( __isl_take isl_qpolynomial *qp); __isl_give isl_qpolynomial *isl_qpolynomial_add( @@ -4347,6 +4903,14 @@ __isl_give isl_qpolynomial *isl_qpolynomial_pow( __isl_take isl_qpolynomial *qp, unsigned exponent); + __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_fix_val( + __isl_take isl_pw_qpolynomial *pwqp, + enum isl_dim_type type, unsigned n, + __isl_take isl_val *v); + __isl_give isl_pw_qpolynomial * + isl_pw_qpolynomial_scale_val( + __isl_take isl_pw_qpolynomial *pwqp, + __isl_take isl_val *v); __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add( __isl_take isl_pw_qpolynomial *pwqp1, __isl_take isl_pw_qpolynomial *pwqp2); @@ -4364,6 +4928,10 @@ __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_pow( __isl_take isl_pw_qpolynomial *pwqp, unsigned exponent); + __isl_give isl_union_pw_qpolynomial * + isl_union_pw_qpolynomial_scale_val( + __isl_take isl_union_pw_qpolynomial *upwqp, + __isl_take isl_val *v); __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_add( __isl_take isl_union_pw_qpolynomial *upwqp1, __isl_take isl_union_pw_qpolynomial *upwqp2); @@ -4569,6 +5137,17 @@ __isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_scale( __isl_take isl_qpolynomial_fold *fold, isl_int v); + __isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_scale_val( + __isl_take isl_qpolynomial_fold *fold, + __isl_take isl_val *v); + __isl_give isl_pw_qpolynomial_fold * + isl_pw_qpolynomial_fold_scale_val( + __isl_take isl_pw_qpolynomial_fold *pwf, + __isl_take isl_val *v); + __isl_give isl_union_pw_qpolynomial_fold * + isl_union_pw_qpolynomial_fold_scale_val( + __isl_take isl_union_pw_qpolynomial_fold *upwf, + __isl_take isl_val *v); __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_add( __isl_take isl_pw_qpolynomial_fold *pwf1, @@ -5071,6 +5650,9 @@ int isl_options_set_tile_scale_tile_loops(isl_ctx *ctx, int val); int isl_options_get_tile_scale_tile_loops(isl_ctx *ctx); + int isl_options_set_tile_shift_point_loops(isl_ctx *ctx, + int val); + int isl_options_get_tile_shift_point_loops(isl_ctx *ctx); The C function tiles the band using the given tile sizes inside its schedule. @@ -5078,6 +5660,15 @@ inserted between the modified band and its children. The C option specifies whether the tile loops iterators should be scaled by the tile sizes. +If the C option is set, then the point loops +are shifted to start at zero. + +A band can be split into two nested bands using the following function. + + int isl_band_split(__isl_keep isl_band *band, int pos); + +The resulting outer band contains the first C dimensions of C +while the inner band contains the remaining dimensions. A representation of the band can be printed using @@ -5449,10 +6040,13 @@ #include int isl_ast_expr_get_int(__isl_keep isl_ast_expr *expr, isl_int *v); + __isl_give isl_val *isl_ast_expr_get_val( + __isl_keep isl_ast_expr *expr); Return the integer represented by the AST expression. -Note that the integer is returned through the C argument. -The return value of the function itself indicates whether the +Note that the integer is returned by C +through the C argument. +The return value of this function itself indicates whether the operation was performed successfully. =head3 Manipulating and printing the AST @@ -5475,6 +6069,8 @@ the context of an C. #include + __isl_give isl_ast_expr *isl_ast_expr_from_val( + __isl_take isl_val *v); __isl_give isl_ast_expr *isl_ast_expr_from_id( __isl_take isl_id *id); __isl_give isl_ast_expr *isl_ast_expr_neg( @@ -5642,6 +6238,9 @@ int isl_options_set_ast_build_allow_else(isl_ctx *ctx, int val); int isl_options_get_ast_build_allow_else(isl_ctx *ctx); + int isl_options_set_ast_build_allow_or(isl_ctx *ctx, + int val); + int isl_options_get_ast_build_allow_or(isl_ctx *ctx); =over @@ -5740,6 +6339,11 @@ This option specifies whether the AST generator is allowed to construct if statements with else branches. +=item * ast_build_allow_or + +This option specifies whether the AST generator is allowed +to construct if conditions with disjunctions. + =back =head3 Fine-grained Control over AST Generation diff -Nru isl-0.11.2/include/isl/aff.h isl-0.12.1/include/isl/aff.h --- isl-0.11.2/include/isl/aff.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/include/isl/aff.h 2013-07-24 11:04:50.000000000 +0000 @@ -8,6 +8,7 @@ #include #include #include +#include #if defined(__cplusplus) extern "C" { @@ -35,18 +36,28 @@ const char *isl_aff_get_dim_name(__isl_keep isl_aff *aff, enum isl_dim_type type, unsigned pos); int isl_aff_get_constant(__isl_keep isl_aff *aff, isl_int *v); +__isl_give isl_val *isl_aff_get_constant_val(__isl_keep isl_aff *aff); int isl_aff_get_coefficient(__isl_keep isl_aff *aff, enum isl_dim_type type, int pos, isl_int *v); +__isl_give isl_val *isl_aff_get_coefficient_val(__isl_keep isl_aff *aff, + enum isl_dim_type type, int pos); int isl_aff_get_denominator(__isl_keep isl_aff *aff, isl_int *v); +__isl_give isl_val *isl_aff_get_denominator_val(__isl_keep isl_aff *aff); __isl_give isl_aff *isl_aff_set_constant(__isl_take isl_aff *aff, isl_int v); __isl_give isl_aff *isl_aff_set_constant_si(__isl_take isl_aff *aff, int v); +__isl_give isl_aff *isl_aff_set_constant_val(__isl_take isl_aff *aff, + __isl_take isl_val *v); __isl_give isl_aff *isl_aff_set_coefficient(__isl_take isl_aff *aff, enum isl_dim_type type, int pos, isl_int v); __isl_give isl_aff *isl_aff_set_coefficient_si(__isl_take isl_aff *aff, enum isl_dim_type type, int pos, int v); +__isl_give isl_aff *isl_aff_set_coefficient_val(__isl_take isl_aff *aff, + enum isl_dim_type type, int pos, __isl_take isl_val *v); __isl_give isl_aff *isl_aff_set_denominator(__isl_take isl_aff *aff, isl_int v); __isl_give isl_aff *isl_aff_add_constant(__isl_take isl_aff *aff, isl_int v); __isl_give isl_aff *isl_aff_add_constant_si(__isl_take isl_aff *aff, int v); +__isl_give isl_aff *isl_aff_add_constant_val(__isl_take isl_aff *aff, + __isl_take isl_val *v); __isl_give isl_aff *isl_aff_add_constant_num(__isl_take isl_aff *aff, isl_int v); __isl_give isl_aff *isl_aff_add_constant_num_si(__isl_take isl_aff *aff, int v); @@ -54,6 +65,8 @@ enum isl_dim_type type, int pos, isl_int v); __isl_give isl_aff *isl_aff_add_coefficient_si(__isl_take isl_aff *aff, enum isl_dim_type type, int pos, int v); +__isl_give isl_aff *isl_aff_add_coefficient_val(__isl_take isl_aff *aff, + enum isl_dim_type type, int pos, __isl_take isl_val *v); int isl_aff_is_cst(__isl_keep isl_aff *aff); @@ -71,6 +84,8 @@ __isl_give isl_aff *isl_aff_ceil(__isl_take isl_aff *aff); __isl_give isl_aff *isl_aff_floor(__isl_take isl_aff *aff); __isl_give isl_aff *isl_aff_mod(__isl_take isl_aff *aff, isl_int mod); +__isl_give isl_aff *isl_aff_mod_val(__isl_take isl_aff *aff, + __isl_take isl_val *mod); __isl_give isl_aff *isl_aff_mul(__isl_take isl_aff *aff1, __isl_take isl_aff *aff2); @@ -82,8 +97,12 @@ __isl_take isl_aff *aff2); __isl_give isl_aff *isl_aff_scale(__isl_take isl_aff *aff, isl_int f); +__isl_give isl_aff *isl_aff_scale_val(__isl_take isl_aff *aff, + __isl_take isl_val *v); __isl_give isl_aff *isl_aff_scale_down(__isl_take isl_aff *aff, isl_int f); __isl_give isl_aff *isl_aff_scale_down_ui(__isl_take isl_aff *aff, unsigned f); +__isl_give isl_aff *isl_aff_scale_down_val(__isl_take isl_aff *aff, + __isl_take isl_val *v); __isl_give isl_aff *isl_aff_insert_dims(__isl_take isl_aff *aff, enum isl_dim_type type, unsigned first, unsigned n); @@ -188,6 +207,8 @@ __isl_give isl_pw_aff *isl_pw_aff_floor(__isl_take isl_pw_aff *pwaff); __isl_give isl_pw_aff *isl_pw_aff_mod(__isl_take isl_pw_aff *pwaff, isl_int mod); +__isl_give isl_pw_aff *isl_pw_aff_mod_val(__isl_take isl_pw_aff *pa, + __isl_take isl_val *mod); __isl_give isl_pw_aff *isl_pw_aff_tdiv_q(__isl_take isl_pw_aff *pa1, __isl_take isl_pw_aff *pa2); __isl_give isl_pw_aff *isl_pw_aff_tdiv_r(__isl_take isl_pw_aff *pa1, @@ -203,8 +224,12 @@ __isl_give isl_pw_aff *isl_pw_aff_scale(__isl_take isl_pw_aff *pwaff, isl_int f); +__isl_give isl_pw_aff *isl_pw_aff_scale_val(__isl_take isl_pw_aff *pa, + __isl_take isl_val *v); __isl_give isl_pw_aff *isl_pw_aff_scale_down(__isl_take isl_pw_aff *pwaff, isl_int f); +__isl_give isl_pw_aff *isl_pw_aff_scale_down_val(__isl_take isl_pw_aff *pa, + __isl_take isl_val *f); __isl_give isl_pw_aff *isl_pw_aff_insert_dims(__isl_take isl_pw_aff *pwaff, enum isl_dim_type type, unsigned first, unsigned n); @@ -270,66 +295,25 @@ __isl_give isl_set *isl_pw_aff_list_gt_set(__isl_take isl_pw_aff_list *list1, __isl_take isl_pw_aff_list *list2); +ISL_DECLARE_MULTI(aff) + __isl_give isl_multi_aff *isl_multi_aff_from_aff(__isl_take isl_aff *aff); -__isl_give isl_multi_aff *isl_multi_aff_zero(__isl_take isl_space *space); __isl_give isl_multi_aff *isl_multi_aff_identity(__isl_take isl_space *space); -isl_ctx *isl_multi_aff_get_ctx(__isl_keep isl_multi_aff *maff); -__isl_give isl_space *isl_multi_aff_get_space(__isl_keep isl_multi_aff *maff); -__isl_give isl_space *isl_multi_aff_get_domain_space( - __isl_keep isl_multi_aff *maff); -__isl_give isl_multi_aff *isl_multi_aff_set_tuple_name( - __isl_take isl_multi_aff *maff, - enum isl_dim_type type, const char *s); -__isl_give isl_multi_aff *isl_multi_aff_set_tuple_id( - __isl_take isl_multi_aff *maff, - enum isl_dim_type type, __isl_take isl_id *id); -__isl_give isl_multi_aff *isl_multi_aff_copy(__isl_keep isl_multi_aff *maff); -void *isl_multi_aff_free(__isl_take isl_multi_aff *maff); - -unsigned isl_multi_aff_dim(__isl_keep isl_multi_aff *maff, - enum isl_dim_type type); -__isl_give isl_aff *isl_multi_aff_get_aff(__isl_keep isl_multi_aff *multi, - int pos); - -__isl_give isl_multi_aff *isl_multi_aff_insert_dims( - __isl_take isl_multi_aff *ma, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_multi_aff *isl_multi_aff_add_dims(__isl_take isl_multi_aff *ma, - enum isl_dim_type type, unsigned n); -__isl_give isl_multi_aff *isl_multi_aff_drop_dims( - __isl_take isl_multi_aff *maff, - enum isl_dim_type type, unsigned first, unsigned n); - -__isl_give isl_multi_aff *isl_multi_aff_set_dim_name( - __isl_take isl_multi_aff *maff, - enum isl_dim_type type, unsigned pos, const char *s); - int isl_multi_aff_plain_is_equal(__isl_keep isl_multi_aff *maff1, __isl_keep isl_multi_aff *maff2); __isl_give isl_multi_aff *isl_multi_aff_add(__isl_take isl_multi_aff *maff1, __isl_take isl_multi_aff *maff2); +__isl_give isl_multi_aff *isl_multi_aff_sub(__isl_take isl_multi_aff *ma1, + __isl_take isl_multi_aff *ma2); __isl_give isl_multi_aff *isl_multi_aff_scale(__isl_take isl_multi_aff *maff, isl_int f); -__isl_give isl_multi_aff *isl_multi_aff_range_splice( - __isl_take isl_multi_aff *ma1, unsigned pos, - __isl_take isl_multi_aff *ma2); -__isl_give isl_multi_aff *isl_multi_aff_splice( - __isl_take isl_multi_aff *ma1, unsigned in_pos, unsigned out_pos, - __isl_take isl_multi_aff *ma2); -__isl_give isl_multi_aff *isl_multi_aff_range_product( - __isl_take isl_multi_aff *ma1, __isl_take isl_multi_aff *ma2); -__isl_give isl_multi_aff *isl_multi_aff_flat_range_product( - __isl_take isl_multi_aff *ma1, __isl_take isl_multi_aff *ma2); __isl_give isl_multi_aff *isl_multi_aff_product( __isl_take isl_multi_aff *ma1, __isl_take isl_multi_aff *ma2); -__isl_give isl_multi_aff *isl_multi_aff_align_params( - __isl_take isl_multi_aff *multi, __isl_take isl_space *model); - __isl_give isl_multi_aff *isl_multi_aff_gist_params( __isl_take isl_multi_aff *maff, __isl_take isl_set *context); __isl_give isl_multi_aff *isl_multi_aff_gist(__isl_take isl_multi_aff *maff, @@ -353,6 +337,8 @@ const char *str); void isl_multi_aff_dump(__isl_keep isl_multi_aff *maff); +ISL_DECLARE_MULTI(pw_aff) + __isl_give isl_pw_multi_aff *isl_pw_multi_aff_identity( __isl_take isl_space *space); __isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_multi_aff( @@ -415,6 +401,13 @@ __isl_give isl_pw_multi_aff *isl_pw_multi_aff_add( __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_sub( + __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2); + +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_scale_val( + __isl_take isl_pw_multi_aff *pma, __isl_take isl_val *v); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_scale_multi_val( + __isl_take isl_pw_multi_aff *pma, __isl_take isl_multi_val *mv); __isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_lexmin( __isl_take isl_pw_multi_aff *pma1, @@ -498,61 +491,43 @@ __isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_add( __isl_take isl_union_pw_multi_aff *upma1, __isl_take isl_union_pw_multi_aff *upma2); +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_sub( + __isl_take isl_union_pw_multi_aff *upma1, + __isl_take isl_union_pw_multi_aff *upma2); + +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_scale_multi_val( + __isl_take isl_union_pw_multi_aff *upma, __isl_take isl_multi_val *mv); __isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_flat_range_product( __isl_take isl_union_pw_multi_aff *upma1, __isl_take isl_union_pw_multi_aff *upma2); +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_intersect_domain( + __isl_take isl_union_pw_multi_aff *upma, + __isl_take isl_union_set *uset); + __isl_give isl_union_map *isl_union_map_from_union_pw_multi_aff( __isl_take isl_union_pw_multi_aff *upma); __isl_give isl_printer *isl_printer_print_union_pw_multi_aff( __isl_take isl_printer *p, __isl_keep isl_union_pw_multi_aff *upma); -__isl_give isl_multi_pw_aff *isl_multi_pw_aff_zero(__isl_take isl_space *space); +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_from_union_set( + __isl_take isl_union_set *uset); +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_from_union_map( + __isl_take isl_union_map *umap); + +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_read_from_str( + isl_ctx *ctx, const char *str); +void isl_union_pw_multi_aff_dump(__isl_keep isl_union_pw_multi_aff *upma); +__isl_give char *isl_union_pw_multi_aff_to_str( + __isl_keep isl_union_pw_multi_aff *upma); + __isl_give isl_multi_pw_aff *isl_multi_pw_aff_identity( __isl_take isl_space *space); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_from_pw_aff( __isl_take isl_pw_aff *pa); -isl_ctx *isl_multi_pw_aff_get_ctx(__isl_keep isl_multi_pw_aff *mpa); -__isl_give isl_space *isl_multi_pw_aff_get_space( - __isl_keep isl_multi_pw_aff *mpa); -__isl_give isl_space *isl_multi_pw_aff_get_domain_space( - __isl_keep isl_multi_pw_aff *mpa); -__isl_give isl_multi_pw_aff *isl_multi_pw_aff_set_tuple_name( - __isl_take isl_multi_pw_aff *mpa, - enum isl_dim_type type, const char *s); -__isl_give isl_multi_pw_aff *isl_multi_pw_aff_copy( - __isl_keep isl_multi_pw_aff *mpa); -void *isl_multi_pw_aff_free(__isl_take isl_multi_pw_aff *mpa); - -unsigned isl_multi_pw_aff_dim(__isl_keep isl_multi_pw_aff *mpa, - enum isl_dim_type type); -__isl_give isl_pw_aff *isl_multi_pw_aff_get_pw_aff( - __isl_keep isl_multi_pw_aff *mpa, int pos); - -__isl_give isl_multi_pw_aff *isl_multi_pw_aff_insert_dims( - __isl_take isl_multi_pw_aff *mpa, - enum isl_dim_type type, unsigned first, unsigned n); -__isl_give isl_multi_pw_aff *isl_multi_pw_aff_add_dims( - __isl_take isl_multi_pw_aff *mpa, enum isl_dim_type type, unsigned n); - -__isl_give isl_multi_pw_aff *isl_multi_pw_aff_set_dim_name( - __isl_take isl_multi_pw_aff *mpa, - enum isl_dim_type type, unsigned pos, const char *s); - -__isl_give isl_multi_pw_aff *isl_multi_pw_aff_range_splice( - __isl_take isl_multi_pw_aff *mpa1, unsigned pos, - __isl_take isl_multi_pw_aff *mpa2); -__isl_give isl_multi_pw_aff *isl_multi_pw_aff_splice( - __isl_take isl_multi_pw_aff *mpa1, unsigned in_pos, unsigned out_pos, - __isl_take isl_multi_pw_aff *mpa2); -__isl_give isl_multi_pw_aff *isl_multi_pw_aff_flat_range_product( - __isl_take isl_multi_pw_aff *mpa1, __isl_take isl_multi_pw_aff *mpa2); -__isl_give isl_multi_pw_aff *isl_multi_pw_aff_range_product( - __isl_take isl_multi_pw_aff *mpa1, __isl_take isl_multi_pw_aff *mpa2); - __isl_give isl_printer *isl_printer_print_multi_pw_aff( __isl_take isl_printer *p, __isl_keep isl_multi_pw_aff *mpa); void isl_multi_pw_aff_dump(__isl_keep isl_multi_pw_aff *mpa); diff -Nru isl-0.11.2/include/isl/aff_type.h isl-0.12.1/include/isl/aff_type.h --- isl-0.11.2/include/isl/aff_type.h 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/include/isl/aff_type.h 2013-07-01 13:12:40.000000000 +0000 @@ -1,12 +1,22 @@ #ifndef ISL_AFF_TYPE_H #define ISL_AFF_TYPE_H +#include + +#if defined(__cplusplus) +extern "C" { +#endif + struct isl_aff; typedef struct isl_aff isl_aff; +ISL_DECLARE_LIST(aff) + struct isl_pw_aff; typedef struct isl_pw_aff isl_pw_aff; +ISL_DECLARE_LIST(pw_aff) + struct isl_multi_aff; typedef struct isl_multi_aff isl_multi_aff; @@ -19,4 +29,8 @@ struct isl_multi_pw_aff; typedef struct isl_multi_pw_aff isl_multi_pw_aff; +#if defined(__cplusplus) +} +#endif + #endif diff -Nru isl-0.11.2/include/isl/ast.h isl-0.12.1/include/isl/ast.h --- isl-0.11.2/include/isl/ast.h 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/include/isl/ast.h 2013-07-24 11:04:50.000000000 +0000 @@ -3,6 +3,7 @@ #include #include +#include #include #include @@ -66,6 +67,7 @@ int isl_options_set_ast_iterator_type(isl_ctx *ctx, const char *val); const char *isl_options_get_ast_iterator_type(isl_ctx *ctx); +__isl_give isl_ast_expr *isl_ast_expr_from_val(__isl_take isl_val *v); __isl_give isl_ast_expr *isl_ast_expr_from_id(__isl_take isl_id *id); __isl_give isl_ast_expr *isl_ast_expr_neg(__isl_take isl_ast_expr *expr); __isl_give isl_ast_expr *isl_ast_expr_add(__isl_take isl_ast_expr *expr1, @@ -87,6 +89,7 @@ isl_ctx *isl_ast_expr_get_ctx(__isl_keep isl_ast_expr *expr); enum isl_ast_expr_type isl_ast_expr_get_type(__isl_keep isl_ast_expr *expr); int isl_ast_expr_get_int(__isl_keep isl_ast_expr *expr, isl_int *v); +__isl_give isl_val *isl_ast_expr_get_val(__isl_keep isl_ast_expr *expr); __isl_give isl_id *isl_ast_expr_get_id(__isl_keep isl_ast_expr *expr); enum isl_ast_op_type isl_ast_expr_get_op_type(__isl_keep isl_ast_expr *expr); diff -Nru isl-0.11.2/include/isl/ast_build.h isl-0.12.1/include/isl/ast_build.h --- isl-0.11.2/include/isl/ast_build.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/include/isl/ast_build.h 2013-07-24 11:02:32.000000000 +0000 @@ -36,6 +36,9 @@ int isl_options_set_ast_build_allow_else(isl_ctx *ctx, int val); int isl_options_get_ast_build_allow_else(isl_ctx *ctx); +int isl_options_set_ast_build_allow_or(isl_ctx *ctx, int val); +int isl_options_get_ast_build_allow_or(isl_ctx *ctx); + isl_ctx *isl_ast_build_get_ctx(__isl_keep isl_ast_build *build); __isl_give isl_ast_build *isl_ast_build_from_context(__isl_take isl_set *set); diff -Nru isl-0.11.2/include/isl/band.h isl-0.12.1/include/isl/band.h --- isl-0.11.2/include/isl/band.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/include/isl/band.h 2013-07-02 09:10:01.000000000 +0000 @@ -13,6 +13,8 @@ struct isl_band; typedef struct isl_band isl_band; +ISL_DECLARE_LIST(band) + __isl_give isl_band *isl_band_copy(__isl_keep isl_band *band); void *isl_band_free(__isl_take isl_band *band); @@ -31,8 +33,11 @@ int isl_options_set_tile_scale_tile_loops(isl_ctx *ctx, int val); int isl_options_get_tile_scale_tile_loops(isl_ctx *ctx); +int isl_options_set_tile_shift_point_loops(isl_ctx *ctx, int val); +int isl_options_get_tile_shift_point_loops(isl_ctx *ctx); int isl_band_tile(__isl_keep isl_band *band, __isl_take isl_vec *sizes); +int isl_band_split(__isl_keep isl_band *band, int pos); int isl_band_n_member(__isl_keep isl_band *band); int isl_band_member_is_zero_distance(__isl_keep isl_band *band, int pos); diff -Nru isl-0.11.2/include/isl/constraint.h isl-0.12.1/include/isl/constraint.h --- isl-0.11.2/include/isl/constraint.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/include/isl/constraint.h 2013-07-24 11:04:50.000000000 +0000 @@ -14,6 +14,8 @@ #include #include #include +#include +#include #include #if defined(__cplusplus) @@ -23,6 +25,8 @@ struct isl_constraint; typedef struct isl_constraint isl_constraint; +ISL_DECLARE_LIST(constraint) + isl_ctx *isl_constraint_get_ctx(__isl_keep isl_constraint *c); __isl_give isl_constraint *isl_equality_alloc(__isl_take isl_local_space *ls); @@ -80,18 +84,27 @@ enum isl_dim_type type, unsigned pos); void isl_constraint_get_constant(__isl_keep isl_constraint *constraint, isl_int *v); +__isl_give isl_val *isl_constraint_get_constant_val( + __isl_keep isl_constraint *constraint); void isl_constraint_get_coefficient(__isl_keep isl_constraint *constraint, enum isl_dim_type type, int pos, isl_int *v); +__isl_give isl_val *isl_constraint_get_coefficient_val( + __isl_keep isl_constraint *constraint, enum isl_dim_type type, int pos); __isl_give isl_constraint *isl_constraint_set_constant( __isl_take isl_constraint *constraint, isl_int v); __isl_give isl_constraint *isl_constraint_set_constant_si( __isl_take isl_constraint *constraint, int v); +__isl_give isl_constraint *isl_constraint_set_constant_val( + __isl_take isl_constraint *constraint, __isl_take isl_val *v); __isl_give isl_constraint *isl_constraint_set_coefficient( __isl_take isl_constraint *constraint, enum isl_dim_type type, int pos, isl_int v); __isl_give isl_constraint *isl_constraint_set_coefficient_si( __isl_take isl_constraint *constraint, enum isl_dim_type type, int pos, int v); +__isl_give isl_constraint *isl_constraint_set_coefficient_val( + __isl_take isl_constraint *constraint, + enum isl_dim_type type, int pos, isl_val *v); __isl_give isl_aff *isl_constraint_get_div(__isl_keep isl_constraint *constraint, int pos); diff -Nru isl-0.11.2/include/isl/ctx.h isl-0.12.1/include/isl/ctx.h --- isl-0.11.2/include/isl/ctx.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/include/isl/ctx.h 2013-07-24 11:04:50.000000000 +0000 @@ -102,7 +102,7 @@ * returns the value of 'expr'. It is used to ensure, that always an isl_ctx is * passed to the following macros, even if they currently do not use it. */ -#define isl_check_ctx(ctx, expr) ((ctx != (isl_ctx *) 0) ? expr : expr) +#define isl_check_ctx(ctx, expr) ((ctx != (isl_ctx *) 0) ? expr : NULL) #define isl_alloc(ctx,type,size) ((type *)isl_check_ctx(ctx,\ malloc(size))) diff -Nru isl-0.11.2/include/isl/id.h isl-0.12.1/include/isl/id.h --- isl-0.11.2/include/isl/id.h 2013-03-27 11:09:33.000000000 +0000 +++ isl-0.12.1/include/isl/id.h 2013-07-24 11:02:32.000000000 +0000 @@ -2,6 +2,7 @@ #define ISL_ID_H #include +#include #include #if defined(__cplusplus) @@ -11,6 +12,8 @@ struct isl_id; typedef struct isl_id isl_id; +ISL_DECLARE_LIST(id) + isl_ctx *isl_id_get_ctx(__isl_keep isl_id *id); __isl_give isl_id *isl_id_alloc(isl_ctx *ctx, diff -Nru isl-0.11.2/include/isl/ilp.h isl-0.12.1/include/isl/ilp.h --- isl-0.11.2/include/isl/ilp.h 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/include/isl/ilp.h 2013-07-24 11:04:50.000000000 +0000 @@ -12,6 +12,7 @@ #include #include +#include #if defined(__cplusplus) extern "C" { @@ -22,10 +23,16 @@ struct isl_vec **sol_p); enum isl_lp_result isl_basic_set_max(__isl_keep isl_basic_set *bset, __isl_keep isl_aff *obj, isl_int *opt); +__isl_give isl_val *isl_basic_set_max_val(__isl_keep isl_basic_set *bset, + __isl_keep isl_aff *obj); enum isl_lp_result isl_set_min(__isl_keep isl_set *set, __isl_keep isl_aff *obj, isl_int *opt); enum isl_lp_result isl_set_max(__isl_keep isl_set *set, __isl_keep isl_aff *obj, isl_int *opt); +__isl_give isl_val *isl_set_min_val(__isl_keep isl_set *set, + __isl_keep isl_aff *obj); +__isl_give isl_val *isl_set_max_val(__isl_keep isl_set *set, + __isl_keep isl_aff *obj); #if defined(__cplusplus) } diff -Nru isl-0.11.2/include/isl/list.h isl-0.12.1/include/isl/list.h --- isl-0.11.2/include/isl/list.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/include/isl/list.h 2013-07-01 13:12:40.000000000 +0000 @@ -17,10 +17,11 @@ extern "C" { #endif -#define ISL_DECLARE_LIST(EL) \ +#define ISL_DECLARE_LIST_TYPE(EL) \ struct isl_##EL; \ struct isl_##EL##_list; \ -typedef struct isl_##EL##_list isl_##EL##_list; \ +typedef struct isl_##EL##_list isl_##EL##_list; +#define ISL_DECLARE_LIST_FN(EL) \ isl_ctx *isl_##EL##_list_get_ctx(__isl_keep isl_##EL##_list *list); \ __isl_give isl_##EL##_list *isl_##EL##_list_from_##EL( \ __isl_take struct isl_##EL *el); \ @@ -48,17 +49,24 @@ int isl_##EL##_list_foreach(__isl_keep isl_##EL##_list *list, \ int (*fn)(__isl_take struct isl_##EL *el, void *user), \ void *user); \ +__isl_give isl_##EL##_list *isl_##EL##_list_sort( \ + __isl_take isl_##EL##_list *list, \ + int (*cmp)(__isl_keep struct isl_##EL *a, \ + __isl_keep struct isl_##EL *b, \ + void *user), void *user); \ +int isl_##EL##_list_foreach_scc(__isl_keep isl_##EL##_list *list, \ + int (*follows)(__isl_keep struct isl_##EL *a, \ + __isl_keep struct isl_##EL *b, void *user), \ + void *follows_user, \ + int (*fn)(__isl_take isl_##EL##_list *scc, void *user), \ + void *fn_user); \ __isl_give isl_printer *isl_printer_print_##EL##_list( \ __isl_take isl_printer *p, __isl_keep isl_##EL##_list *list); \ void isl_##EL##_list_dump(__isl_keep isl_##EL##_list *list); -ISL_DECLARE_LIST(id) -ISL_DECLARE_LIST(constraint) -ISL_DECLARE_LIST(basic_set) -ISL_DECLARE_LIST(set) -ISL_DECLARE_LIST(aff) -ISL_DECLARE_LIST(pw_aff) -ISL_DECLARE_LIST(band) +#define ISL_DECLARE_LIST(EL) \ + ISL_DECLARE_LIST_TYPE(EL) \ + ISL_DECLARE_LIST_FN(EL) #if defined(__cplusplus) } diff -Nru isl-0.11.2/include/isl/lp.h isl-0.12.1/include/isl/lp.h --- isl-0.11.2/include/isl/lp.h 2013-04-09 16:33:55.000000000 +0000 +++ isl-0.12.1/include/isl/lp.h 2013-07-24 11:04:50.000000000 +0000 @@ -10,6 +10,8 @@ #ifndef ISL_LP_H #define ISL_LP_H +#include +#include #include #include #include @@ -42,6 +44,10 @@ isl_int *f, isl_int denom, isl_int *opt, isl_int *opt_denom, struct isl_vec **sol); +__isl_give isl_val *isl_basic_set_min_lp_val(__isl_keep isl_basic_set *bset, + __isl_keep isl_aff *obj); +__isl_give isl_val *isl_basic_set_max_lp_val(__isl_keep isl_basic_set *bset, + __isl_keep isl_aff *obj); #if defined(__cplusplus) } diff -Nru isl-0.11.2/include/isl/map.h isl-0.12.1/include/isl/map.h --- isl-0.11.2/include/isl/map.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/include/isl/map.h 2013-07-24 11:04:50.000000000 +0000 @@ -23,6 +23,7 @@ #include #include #include +#include #if defined(__cplusplus) extern "C" { @@ -213,6 +214,8 @@ __isl_keep isl_map *map); __isl_give isl_basic_map *isl_basic_map_fix_si(__isl_take isl_basic_map *bmap, enum isl_dim_type type, unsigned pos, int value); +__isl_give isl_basic_map *isl_basic_map_fix_val(__isl_take isl_basic_map *bmap, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *v); __isl_give isl_basic_map *isl_basic_map_lower_bound_si( __isl_take isl_basic_map *bmap, enum isl_dim_type type, unsigned pos, int value); @@ -229,6 +232,8 @@ struct isl_map *isl_map_sum(struct isl_map *map1, struct isl_map *map2); struct isl_map *isl_map_neg(struct isl_map *map); struct isl_map *isl_map_floordiv(struct isl_map *map, isl_int d); +__isl_give isl_map *isl_map_floordiv_val(__isl_take isl_map *map, + __isl_take isl_val *d); __isl_export int isl_basic_map_is_equal( @@ -277,6 +282,9 @@ int isl_basic_map_plain_is_fixed(__isl_keep isl_basic_map *bmap, enum isl_dim_type type, unsigned pos, isl_int *val); +__isl_give isl_val *isl_basic_map_plain_get_val_if_fixed( + __isl_keep isl_basic_map *bmap, + enum isl_dim_type type, unsigned pos); int isl_basic_map_image_is_bounded(__isl_keep isl_basic_map *bmap); int isl_basic_map_is_universe(__isl_keep isl_basic_map *bmap); @@ -341,6 +349,8 @@ __isl_give isl_map *isl_map_apply_range( __isl_take isl_map *map1, __isl_take isl_map *map2); +__isl_give isl_map *isl_map_preimage_domain_multi_aff(__isl_take isl_map *map, + __isl_take isl_multi_aff *ma); __isl_give isl_basic_map *isl_basic_map_product( __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2); __isl_give isl_map *isl_map_product(__isl_take isl_map *map1, @@ -385,6 +395,8 @@ enum isl_dim_type type, unsigned pos, isl_int value); __isl_give isl_map *isl_map_fix_si(__isl_take isl_map *map, enum isl_dim_type type, unsigned pos, int value); +__isl_give isl_map *isl_map_fix_val(__isl_take isl_map *map, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *v); __isl_give isl_map *isl_map_lower_bound_si(__isl_take isl_map *map, enum isl_dim_type type, unsigned pos, int value); __isl_give isl_map *isl_map_upper_bound_si(__isl_take isl_map *map, @@ -450,6 +462,8 @@ enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); __isl_give isl_map *isl_map_order_lt(__isl_take isl_map *map, enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); +__isl_give isl_basic_map *isl_basic_map_order_gt(__isl_take isl_basic_map *bmap, + enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); __isl_give isl_map *isl_map_order_gt(__isl_take isl_map *map, enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); @@ -551,6 +565,9 @@ __isl_give isl_map *isl_map_compute_divs(__isl_take isl_map *map); __isl_give isl_map *isl_map_align_divs(__isl_take isl_map *map); +__isl_give isl_basic_map *isl_basic_map_drop_constraints_involving_dims( + __isl_take isl_basic_map *bmap, + enum isl_dim_type type, unsigned first, unsigned n); __isl_give isl_map *isl_map_drop_constraints_involving_dims( __isl_take isl_map *map, enum isl_dim_type type, unsigned first, unsigned n); @@ -568,6 +585,8 @@ enum isl_dim_type type, unsigned pos, isl_int *val); int isl_map_fast_is_fixed(__isl_keep isl_map *map, enum isl_dim_type type, unsigned pos, isl_int *val); +__isl_give isl_val *isl_map_plain_get_val_if_fixed(__isl_keep isl_map *map, + enum isl_dim_type type, unsigned pos); __isl_export __isl_give isl_basic_map *isl_basic_map_gist(__isl_take isl_basic_map *bmap, @@ -600,6 +619,8 @@ __isl_give isl_map *isl_set_lifting(__isl_take isl_set *set); __isl_give isl_map *isl_map_fixed_power(__isl_take isl_map *map, isl_int exp); +__isl_give isl_map *isl_map_fixed_power_val(__isl_take isl_map *map, + __isl_take isl_val *exp); __isl_give isl_map *isl_map_power(__isl_take isl_map *map, int *exact); __isl_give isl_map *isl_map_reaching_path_lengths(__isl_take isl_map *map, int *exact); diff -Nru isl-0.11.2/include/isl/map_type.h isl-0.12.1/include/isl/map_type.h --- isl-0.11.2/include/isl/map_type.h 2013-01-08 11:20:43.000000000 +0000 +++ isl-0.12.1/include/isl/map_type.h 2013-07-01 13:12:40.000000000 +0000 @@ -2,6 +2,7 @@ #define ISL_MAP_TYPE_H #include +#include #if defined(__cplusplus) extern "C" { @@ -15,12 +16,18 @@ #ifndef isl_basic_set struct __isl_subclass(isl_set) isl_basic_set; typedef struct isl_basic_set isl_basic_set; +ISL_DECLARE_LIST_TYPE(basic_set) #endif + #ifndef isl_set struct __isl_subclass(isl_union_set) isl_set; typedef struct isl_set isl_set; +ISL_DECLARE_LIST_TYPE(set) #endif +ISL_DECLARE_LIST_FN(basic_set) +ISL_DECLARE_LIST_FN(set) + #if defined(__cplusplus) } #endif diff -Nru isl-0.11.2/include/isl/mat.h isl-0.12.1/include/isl/mat.h --- isl-0.11.2/include/isl/mat.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/include/isl/mat.h 2013-07-24 11:04:50.000000000 +0000 @@ -16,6 +16,7 @@ #include #include #include +#include #if defined(__cplusplus) extern "C" { @@ -34,15 +35,19 @@ struct isl_mat *isl_mat_identity(struct isl_ctx *ctx, unsigned n_row); __isl_give isl_mat *isl_mat_copy(__isl_keep isl_mat *mat); struct isl_mat *isl_mat_cow(struct isl_mat *mat); -void isl_mat_free(__isl_take isl_mat *mat); +void *isl_mat_free(__isl_take isl_mat *mat); int isl_mat_rows(__isl_keep isl_mat *mat); int isl_mat_cols(__isl_keep isl_mat *mat); int isl_mat_get_element(__isl_keep isl_mat *mat, int row, int col, isl_int *v); +__isl_give isl_val *isl_mat_get_element_val(__isl_keep isl_mat *mat, + int row, int col); __isl_give isl_mat *isl_mat_set_element(__isl_take isl_mat *mat, int row, int col, isl_int v); __isl_give isl_mat *isl_mat_set_element_si(__isl_take isl_mat *mat, int row, int col, int v); +__isl_give isl_mat *isl_mat_set_element_val(__isl_take isl_mat *mat, + int row, int col, __isl_take isl_val *v); struct isl_mat *isl_mat_swap_cols(struct isl_mat *mat, unsigned i, unsigned j); struct isl_mat *isl_mat_swap_rows(struct isl_mat *mat, unsigned i, unsigned j); @@ -60,7 +65,8 @@ struct isl_mat *isl_mat_lin_to_aff(struct isl_mat *mat); struct isl_mat *isl_mat_inverse_product(struct isl_mat *left, struct isl_mat *right); -struct isl_mat *isl_mat_product(struct isl_mat *left, struct isl_mat *right); +__isl_give isl_mat *isl_mat_product(__isl_take isl_mat *left, + __isl_take isl_mat *right); struct isl_mat *isl_mat_transpose(struct isl_mat *mat); __isl_give isl_mat *isl_mat_right_inverse(__isl_take isl_mat *mat); __isl_give isl_mat *isl_mat_right_kernel(__isl_take isl_mat *mat); diff -Nru isl-0.11.2/include/isl/multi.h isl-0.12.1/include/isl/multi.h --- isl-0.11.2/include/isl/multi.h 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/include/isl/multi.h 2013-07-24 11:02:32.000000000 +0000 @@ -1,6 +1,7 @@ #ifndef ISL_MULTI_H #define ISL_MULTI_H +#include #include #if defined(__cplusplus) @@ -8,16 +9,66 @@ #endif #define ISL_DECLARE_MULTI(BASE) \ +unsigned isl_multi_##BASE##_dim(__isl_keep isl_multi_##BASE *multi, \ + enum isl_dim_type type); \ +isl_ctx *isl_multi_##BASE##_get_ctx( \ + __isl_keep isl_multi_##BASE *multi); \ +__isl_give isl_space *isl_multi_##BASE##_get_space( \ + __isl_keep isl_multi_##BASE *multi); \ +__isl_give isl_space *isl_multi_##BASE##_get_domain_space( \ + __isl_keep isl_multi_##BASE *multi); \ __isl_give isl_multi_##BASE *isl_multi_##BASE##_from_##BASE##_list( \ __isl_take isl_space *space, __isl_take isl_##BASE##_list *list); \ +__isl_give isl_multi_##BASE *isl_multi_##BASE##_zero( \ + __isl_take isl_space *space); \ +__isl_give isl_multi_##BASE *isl_multi_##BASE##_copy( \ + __isl_keep isl_multi_##BASE *multi); \ +void *isl_multi_##BASE##_free(__isl_take isl_multi_##BASE *multi); \ +__isl_give isl_multi_##BASE *isl_multi_##BASE##_set_dim_name( \ + __isl_take isl_multi_##BASE *multi, \ + enum isl_dim_type type, unsigned pos, const char *s); \ const char *isl_multi_##BASE##_get_tuple_name( \ __isl_keep isl_multi_##BASE *multi, enum isl_dim_type type); \ +__isl_give isl_multi_##BASE *isl_multi_##BASE##_set_tuple_name( \ + __isl_take isl_multi_##BASE *multi, \ + enum isl_dim_type type, const char *s); \ +__isl_give isl_multi_##BASE *isl_multi_##BASE##_set_tuple_id( \ + __isl_take isl_multi_##BASE *multi, \ + enum isl_dim_type type, __isl_take isl_id *id); \ +__isl_give isl_multi_##BASE *isl_multi_##BASE##_insert_dims( \ + __isl_take isl_multi_##BASE *multi, enum isl_dim_type type, \ + unsigned first, unsigned n); \ +__isl_give isl_multi_##BASE *isl_multi_##BASE##_add_dims( \ + __isl_take isl_multi_##BASE *multi, enum isl_dim_type type, \ + unsigned n); \ +__isl_give isl_multi_##BASE *isl_multi_##BASE##_drop_dims( \ + __isl_take isl_multi_##BASE *multi, enum isl_dim_type type, \ + unsigned first, unsigned n); \ +__isl_give isl_##BASE *isl_multi_##BASE##_get_##BASE( \ + __isl_keep isl_multi_##BASE *multi, int pos); \ __isl_give isl_multi_##BASE *isl_multi_##BASE##_set_##BASE( \ __isl_take isl_multi_##BASE *multi, int pos, \ - __isl_take isl_##BASE *el); - -ISL_DECLARE_MULTI(aff) -ISL_DECLARE_MULTI(pw_aff) + __isl_take isl_##BASE *el); \ +__isl_give isl_multi_##BASE *isl_multi_##BASE##_range_splice( \ + __isl_take isl_multi_##BASE *multi1, unsigned pos, \ + __isl_take isl_multi_##BASE *multi2); \ +__isl_give isl_multi_##BASE *isl_multi_##BASE##_splice( \ + __isl_take isl_multi_##BASE *multi1, unsigned in_pos, \ + unsigned out_pos, __isl_take isl_multi_##BASE *multi2); \ +__isl_give isl_multi_##BASE *isl_multi_##BASE##_flat_range_product( \ + __isl_take isl_multi_##BASE *multi1, \ + __isl_take isl_multi_##BASE *multi2); \ +__isl_give isl_multi_##BASE *isl_multi_##BASE##_range_product( \ + __isl_take isl_multi_##BASE *multi1, \ + __isl_take isl_multi_##BASE *multi2); \ +__isl_give isl_multi_##BASE *isl_multi_##BASE##_scale_val( \ + __isl_take isl_multi_##BASE *multi, __isl_take isl_val *v); \ +__isl_give isl_multi_##BASE *isl_multi_##BASE##_scale_multi_val( \ + __isl_take isl_multi_##BASE *multi, \ + __isl_take isl_multi_val *mv); \ +__isl_give isl_multi_##BASE *isl_multi_##BASE##_align_params( \ + __isl_take isl_multi_##BASE *multi, \ + __isl_take isl_space *model); #if defined(__cplusplus) } diff -Nru isl-0.11.2/include/isl/obj.h isl-0.12.1/include/isl/obj.h --- isl-0.11.2/include/isl/obj.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/include/isl/obj.h 2013-07-24 11:04:50.000000000 +0000 @@ -23,6 +23,8 @@ #define isl_obj_none (&isl_obj_none_vtable) extern struct isl_obj_vtable isl_obj_int_vtable; #define isl_obj_int (&isl_obj_int_vtable) +extern struct isl_obj_vtable isl_obj_val_vtable; +#define isl_obj_val (&isl_obj_val_vtable) extern struct isl_obj_vtable isl_obj_set_vtable; #define isl_obj_set (&isl_obj_set_vtable) extern struct isl_obj_vtable isl_obj_union_set_vtable; diff -Nru isl-0.11.2/include/isl/point.h isl-0.12.1/include/isl/point.h --- isl-0.11.2/include/isl/point.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/include/isl/point.h 2013-07-24 11:04:50.000000000 +0000 @@ -3,6 +3,7 @@ #include #include +#include #if defined(__cplusplus) extern "C" { @@ -20,8 +21,12 @@ int isl_point_get_coordinate(__isl_keep isl_point *pnt, enum isl_dim_type type, int pos, isl_int *v); +__isl_give isl_val *isl_point_get_coordinate_val(__isl_keep isl_point *pnt, + enum isl_dim_type type, int pos); __isl_give isl_point *isl_point_set_coordinate(__isl_take isl_point *pnt, enum isl_dim_type type, int pos, isl_int v); +__isl_give isl_point *isl_point_set_coordinate_val(__isl_take isl_point *pnt, + enum isl_dim_type type, int pos, __isl_take isl_val *v); __isl_give isl_point *isl_point_add_ui(__isl_take isl_point *pnt, enum isl_dim_type type, int pos, unsigned val); diff -Nru isl-0.11.2/include/isl/polynomial.h isl-0.12.1/include/isl/polynomial.h --- isl-0.11.2/include/isl/polynomial.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/include/isl/polynomial.h 2013-07-24 11:04:50.000000000 +0000 @@ -10,6 +10,7 @@ #include #include #include +#include #if defined(__cplusplus) extern "C" { @@ -24,6 +25,9 @@ int isl_qpolynomial_involves_dims(__isl_keep isl_qpolynomial *qp, enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_val *isl_qpolynomial_get_constant_val( + __isl_keep isl_qpolynomial *qp); + __isl_give isl_qpolynomial *isl_qpolynomial_set_dim_name( __isl_take isl_qpolynomial *qp, enum isl_dim_type type, unsigned pos, const char *s); @@ -35,6 +39,8 @@ __isl_give isl_qpolynomial *isl_qpolynomial_nan_on_domain(__isl_take isl_space *dim); __isl_give isl_qpolynomial *isl_qpolynomial_rat_cst_on_domain(__isl_take isl_space *dim, const isl_int n, const isl_int d); +__isl_give isl_qpolynomial *isl_qpolynomial_val_on_domain( + __isl_take isl_space *space, __isl_take isl_val *val); __isl_give isl_qpolynomial *isl_qpolynomial_var_on_domain(__isl_take isl_space *dim, enum isl_dim_type type, unsigned pos); __isl_give isl_qpolynomial *isl_qpolynomial_copy(__isl_keep isl_qpolynomial *qp); @@ -66,6 +72,8 @@ __isl_take isl_qpolynomial *qp, isl_int v); __isl_give isl_qpolynomial *isl_qpolynomial_scale( __isl_take isl_qpolynomial *qp, isl_int v); +__isl_give isl_qpolynomial *isl_qpolynomial_scale_val( + __isl_take isl_qpolynomial *qp, __isl_take isl_val *v); __isl_give isl_qpolynomial *isl_qpolynomial_insert_dims( __isl_take isl_qpolynomial *qp, enum isl_dim_type type, @@ -106,6 +114,7 @@ unsigned isl_term_dim(__isl_keep isl_term *term, enum isl_dim_type type); void isl_term_get_num(__isl_keep isl_term *term, isl_int *n); void isl_term_get_den(__isl_keep isl_term *term, isl_int *d); +__isl_give isl_val *isl_term_get_coefficient_val(__isl_keep isl_term *term); int isl_term_get_exp(__isl_keep isl_term *term, enum isl_dim_type type, unsigned pos); __isl_give isl_aff *isl_term_get_div(__isl_keep isl_term *term, unsigned pos); @@ -198,6 +207,8 @@ __isl_take isl_pw_qpolynomial *pwqp2); __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_mul_isl_int( __isl_take isl_pw_qpolynomial *pwqp, isl_int v); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_scale_val( + __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_val *v); __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_pow( __isl_take isl_pw_qpolynomial *pwqp, unsigned exponent); @@ -215,6 +226,9 @@ __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_fix_dim( __isl_take isl_pw_qpolynomial *pwqp, enum isl_dim_type type, unsigned n, isl_int v); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_fix_val( + __isl_take isl_pw_qpolynomial *pwqp, + enum isl_dim_type type, unsigned n, __isl_take isl_val *v); __isl_give isl_qpolynomial *isl_pw_qpolynomial_eval( __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_point *pnt); @@ -285,6 +299,8 @@ __isl_take isl_qpolynomial_fold *fold, isl_int v); __isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_scale( __isl_take isl_qpolynomial_fold *fold, isl_int v); +__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_scale_val( + __isl_take isl_qpolynomial_fold *fold, __isl_take isl_val *v); __isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_move_dims( __isl_take isl_qpolynomial_fold *fold, @@ -371,6 +387,8 @@ __isl_take isl_pw_qpolynomial_fold *pwf2); __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_mul_isl_int( __isl_take isl_pw_qpolynomial_fold *pwf, isl_int v); +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_scale_val( + __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_val *v); __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_project_domain_on_params( __isl_take isl_pw_qpolynomial_fold *pwf); @@ -462,6 +480,8 @@ __isl_take isl_union_pw_qpolynomial *upwqp2); __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_mul_isl_int( __isl_take isl_union_pw_qpolynomial *upwqp, isl_int v); +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_scale_val( + __isl_take isl_union_pw_qpolynomial *upwqp, __isl_take isl_val *v); __isl_give isl_union_set *isl_union_pw_qpolynomial_domain( __isl_take isl_union_pw_qpolynomial *upwqp); @@ -526,6 +546,9 @@ __isl_take isl_union_pw_qpolynomial *upwqp); __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_mul_isl_int( __isl_take isl_union_pw_qpolynomial_fold *upwf, isl_int v); +__isl_give isl_union_pw_qpolynomial_fold * +isl_union_pw_qpolynomial_fold_scale_val( + __isl_take isl_union_pw_qpolynomial_fold *upwf, __isl_take isl_val *v); __isl_give isl_union_set *isl_union_pw_qpolynomial_fold_domain( __isl_take isl_union_pw_qpolynomial_fold *upwf); diff -Nru isl-0.11.2/include/isl/set.h isl-0.12.1/include/isl/set.h --- isl-0.11.2/include/isl/set.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/include/isl/set.h 2013-07-24 11:04:50.000000000 +0000 @@ -16,6 +16,7 @@ #include #include #include +#include #if defined(__cplusplus) extern "C" { @@ -162,16 +163,22 @@ enum isl_dim_type type, unsigned pos, isl_int value); __isl_give isl_basic_set *isl_basic_set_fix_si(__isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned pos, int value); +__isl_give isl_basic_set *isl_basic_set_fix_val(__isl_take isl_basic_set *bset, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *v); __isl_give isl_set *isl_set_fix_si(__isl_take isl_set *set, enum isl_dim_type type, unsigned pos, int value); __isl_give isl_set *isl_set_lower_bound_si(__isl_take isl_set *set, enum isl_dim_type type, unsigned pos, int value); __isl_give isl_set *isl_set_lower_bound(__isl_take isl_set *set, enum isl_dim_type type, unsigned pos, isl_int value); +__isl_give isl_set *isl_set_lower_bound_val(__isl_take isl_set *set, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *value); __isl_give isl_set *isl_set_upper_bound_si(__isl_take isl_set *set, enum isl_dim_type type, unsigned pos, int value); __isl_give isl_set *isl_set_upper_bound(__isl_take isl_set *set, enum isl_dim_type type, unsigned pos, isl_int value); +__isl_give isl_set *isl_set_upper_bound_val(__isl_take isl_set *set, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *value); __isl_give isl_set *isl_set_equate(__isl_take isl_set *set, enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); @@ -212,6 +219,10 @@ __isl_give isl_pw_multi_aff *isl_basic_set_partial_lexmax_pw_multi_aff( __isl_take isl_basic_set *bset, __isl_take isl_basic_set *dom, __isl_give isl_set **empty); +__isl_give isl_pw_multi_aff *isl_set_lexmin_pw_multi_aff( + __isl_take isl_set *set); +__isl_give isl_pw_multi_aff *isl_set_lexmax_pw_multi_aff( + __isl_take isl_set *set); __isl_export __isl_give isl_set *isl_basic_set_union( @@ -311,6 +322,8 @@ __isl_take isl_pw_multi_aff *pma); __isl_give isl_set *isl_set_fix(__isl_take isl_set *set, enum isl_dim_type type, unsigned pos, isl_int value); +__isl_give isl_set *isl_set_fix_val(__isl_take isl_set *set, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *v); struct isl_set *isl_set_fix_dim_si(struct isl_set *set, unsigned dim, int value); struct isl_set *isl_set_lower_bound_dim(struct isl_set *set, @@ -420,6 +433,8 @@ unsigned dim, isl_int *val); int isl_set_fast_dim_is_fixed(__isl_keep isl_set *set, unsigned dim, isl_int *val); +__isl_give isl_val *isl_set_plain_get_val_if_fixed(__isl_keep isl_set *set, + enum isl_dim_type type, unsigned pos); int isl_set_plain_dim_has_fixed_lower_bound(__isl_keep isl_set *set, unsigned dim, isl_int *val); int isl_set_dim_is_bounded(__isl_keep isl_set *set, @@ -447,6 +462,8 @@ int pos, isl_int *modulo, isl_int *residue); int isl_set_dim_residue_class(struct isl_set *set, int pos, isl_int *modulo, isl_int *residue); +int isl_set_dim_residue_class_val(__isl_keep isl_set *set, + int pos, __isl_give isl_val **modulo, __isl_give isl_val **residue); __isl_export __isl_give isl_set *isl_set_coalesce(__isl_take isl_set *set); @@ -471,6 +488,7 @@ int isl_set_foreach_point(__isl_keep isl_set *set, int (*fn)(__isl_take isl_point *pnt, void *user), void *user); int isl_set_count(__isl_keep isl_set *set, isl_int *count); +__isl_give isl_val *isl_set_count_val(__isl_keep isl_set *set); int isl_basic_set_count_upto(__isl_keep isl_basic_set *bset, isl_int max, isl_int *count); int isl_set_count_upto(__isl_keep isl_set *set, isl_int max, isl_int *count); diff -Nru isl-0.11.2/include/isl/stream.h isl-0.12.1/include/isl/stream.h --- isl-0.11.2/include/isl/stream.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/include/isl/stream.h 2013-07-24 11:04:50.000000000 +0000 @@ -14,6 +14,7 @@ #include #include #include +#include #if defined(__cplusplus) extern "C" { @@ -34,6 +35,8 @@ ISL_TOKEN_CEILD, ISL_TOKEN_FLOORD, ISL_TOKEN_MOD, ISL_TOKEN_STRING, ISL_TOKEN_MAP, ISL_TOKEN_AFF, + ISL_TOKEN_CEIL, ISL_TOKEN_FLOOR, + ISL_TOKEN_IMPLIES, ISL_TOKEN_LAST }; struct isl_token { @@ -52,6 +55,9 @@ } u; }; +__isl_give isl_val *isl_token_get_val(isl_ctx *ctx, struct isl_token *tok); +__isl_give char *isl_token_get_str(isl_ctx *ctx, struct isl_token *tok); +int isl_token_get_type(struct isl_token *tok); void isl_token_free(struct isl_token *tok); struct isl_stream { diff -Nru isl-0.11.2/include/isl/union_map.h isl-0.12.1/include/isl/union_map.h --- isl-0.11.2/include/isl/union_map.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/include/isl/union_map.h 2013-07-24 11:04:50.000000000 +0000 @@ -5,6 +5,7 @@ #include #include #include +#include #if defined(__cplusplus) extern "C" { @@ -109,6 +110,8 @@ __isl_export __isl_give isl_union_map *isl_union_map_apply_range( __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); +__isl_give isl_union_map *isl_union_map_preimage_domain_multi_aff( + __isl_take isl_union_map *umap, __isl_take isl_multi_aff *ma); __isl_export __isl_give isl_union_map *isl_union_map_reverse(__isl_take isl_union_map *umap); __isl_give isl_union_map *isl_union_map_from_domain_and_range( @@ -158,6 +161,8 @@ __isl_give isl_union_map *isl_union_map_fixed_power( __isl_take isl_union_map *umap, isl_int exp); +__isl_give isl_union_map *isl_union_map_fixed_power_val( + __isl_take isl_union_map *umap, __isl_take isl_val *exp); __isl_give isl_union_map *isl_union_map_power(__isl_take isl_union_map *umap, int *exact); __isl_give isl_union_map *isl_union_map_transitive_closure( diff -Nru isl-0.11.2/include/isl/val.h isl-0.12.1/include/isl/val.h --- isl-0.11.2/include/isl/val.h 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/include/isl/val.h 2013-07-24 11:02:32.000000000 +0000 @@ -0,0 +1,106 @@ +#ifndef ISL_VAL_H +#define ISL_VAL_H + +#include +#include +#include +#include + +#if defined(__cplusplus) +extern "C" { +#endif + +struct isl_val; +typedef struct isl_val isl_val; + +ISL_DECLARE_LIST(val) + +struct isl_multi_val; +typedef struct isl_multi_val isl_multi_val; + +ISL_DECLARE_MULTI(val) + +__isl_give isl_val *isl_val_zero(isl_ctx *ctx); +__isl_give isl_val *isl_val_one(isl_ctx *ctx); +__isl_give isl_val *isl_val_nan(isl_ctx *ctx); +__isl_give isl_val *isl_val_infty(isl_ctx *ctx); +__isl_give isl_val *isl_val_neginfty(isl_ctx *ctx); +__isl_give isl_val *isl_val_int_from_si(isl_ctx *ctx, long i); +__isl_give isl_val *isl_val_int_from_ui(isl_ctx *ctx, unsigned long u); +__isl_give isl_val *isl_val_int_from_chunks(isl_ctx *ctx, size_t n, + size_t size, const void *chunks); + +__isl_give isl_val *isl_val_copy(__isl_keep isl_val *v); +void *isl_val_free(__isl_take isl_val *v); + +isl_ctx *isl_val_get_ctx(__isl_keep isl_val *val); +long isl_val_get_num_si(__isl_keep isl_val *v); +long isl_val_get_den_si(__isl_keep isl_val *v); +double isl_val_get_d(__isl_keep isl_val *v); +size_t isl_val_n_abs_num_chunks(__isl_keep isl_val *v, size_t size); +int isl_val_get_abs_num_chunks(__isl_keep isl_val *v, size_t size, + void *chunks); + +__isl_give isl_val *isl_val_set_si(__isl_take isl_val *v, long i); + +__isl_give isl_val *isl_val_abs(__isl_take isl_val *v); +__isl_give isl_val *isl_val_neg(__isl_take isl_val *v); +__isl_give isl_val *isl_val_floor(__isl_take isl_val *v); +__isl_give isl_val *isl_val_ceil(__isl_take isl_val *v); +__isl_give isl_val *isl_val_trunc(__isl_take isl_val *v); +__isl_give isl_val *isl_val_2exp(__isl_take isl_val *v); +__isl_give isl_val *isl_val_min(__isl_take isl_val *v1, __isl_take isl_val *v2); +__isl_give isl_val *isl_val_max(__isl_take isl_val *v1, __isl_take isl_val *v2); +__isl_give isl_val *isl_val_add(__isl_take isl_val *v1, __isl_take isl_val *v2); +__isl_give isl_val *isl_val_add_ui(__isl_take isl_val *v1, unsigned long v2); +__isl_give isl_val *isl_val_sub(__isl_take isl_val *v1, __isl_take isl_val *v2); +__isl_give isl_val *isl_val_sub_ui(__isl_take isl_val *v1, unsigned long v2); +__isl_give isl_val *isl_val_mul(__isl_take isl_val *v1, __isl_take isl_val *v2); +__isl_give isl_val *isl_val_mul_ui(__isl_take isl_val *v1, unsigned long v2); +__isl_give isl_val *isl_val_div(__isl_take isl_val *v1, __isl_take isl_val *v2); +__isl_give isl_val *isl_val_mod(__isl_take isl_val *v1, __isl_take isl_val *v2); +__isl_give isl_val *isl_val_gcd(__isl_take isl_val *v1, __isl_take isl_val *v2); +__isl_give isl_val *isl_val_gcdext(__isl_take isl_val *v1, + __isl_take isl_val *v2, __isl_give isl_val **x, __isl_give isl_val **y); + +int isl_val_sgn(__isl_keep isl_val *v); +int isl_val_is_zero(__isl_keep isl_val *v); +int isl_val_is_one(__isl_keep isl_val *v); +int isl_val_is_negone(__isl_keep isl_val *v); +int isl_val_is_nonneg(__isl_keep isl_val *v); +int isl_val_is_nonpos(__isl_keep isl_val *v); +int isl_val_is_pos(__isl_keep isl_val *v); +int isl_val_is_neg(__isl_keep isl_val *v); +int isl_val_is_int(__isl_keep isl_val *v); +int isl_val_is_rat(__isl_keep isl_val *v); +int isl_val_is_nan(__isl_keep isl_val *v); +int isl_val_is_infty(__isl_keep isl_val *v); +int isl_val_is_neginfty(__isl_keep isl_val *v); + +int isl_val_cmp_si(__isl_keep isl_val *v, long i); + +int isl_val_lt(__isl_keep isl_val *v1, __isl_keep isl_val *v2); +int isl_val_le(__isl_keep isl_val *v1, __isl_keep isl_val *v2); +int isl_val_gt(__isl_keep isl_val *v1, __isl_keep isl_val *v2); +int isl_val_ge(__isl_keep isl_val *v1, __isl_keep isl_val *v2); +int isl_val_eq(__isl_keep isl_val *v1, __isl_keep isl_val *v2); +int isl_val_ne(__isl_keep isl_val *v1, __isl_keep isl_val *v2); + +int isl_val_is_divisible_by(__isl_keep isl_val *v1, __isl_keep isl_val *v2); + +__isl_give isl_val *isl_val_read_from_str(isl_ctx *ctx, const char *str); +__isl_give isl_printer *isl_printer_print_val(__isl_take isl_printer *p, + __isl_keep isl_val *v); +void isl_val_dump(__isl_keep isl_val *v); +__isl_give char *isl_val_to_str(__isl_keep isl_val *v); + +__isl_give isl_multi_val *isl_multi_val_add_val(__isl_take isl_multi_val *mv, + __isl_take isl_val *v); +__isl_give isl_multi_val *isl_multi_val_mod_val(__isl_take isl_multi_val *mv, + __isl_take isl_val *v); + +#if defined(__cplusplus) +} +#endif + +#endif diff -Nru isl-0.11.2/include/isl/val_gmp.h isl-0.12.1/include/isl/val_gmp.h --- isl-0.11.2/include/isl/val_gmp.h 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/include/isl/val_gmp.h 2013-07-01 13:12:40.000000000 +0000 @@ -0,0 +1,13 @@ +#ifndef ISL_VAL_GMP_H +#define ISL_VAL_GMP_H + +#include +#include + +__isl_give isl_val *isl_val_int_from_gmp(isl_ctx *ctx, mpz_t z); +__isl_give isl_val *isl_val_from_gmp(isl_ctx *ctx, + const mpz_t n, const mpz_t d); +int isl_val_get_num_gmp(__isl_keep isl_val *v, mpz_t z); +int isl_val_get_den_gmp(__isl_keep isl_val *v, mpz_t z); + +#endif diff -Nru isl-0.11.2/include/isl/val_int.h isl-0.12.1/include/isl/val_int.h --- isl-0.11.2/include/isl/val_int.h 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/include/isl/val_int.h 2013-07-24 11:04:50.000000000 +0000 @@ -0,0 +1,10 @@ +#ifndef ISL_VAL_INT_H +#define ISL_VAL_INT_H + +#include +#include + +__isl_give isl_val *isl_val_int_from_isl_int(isl_ctx *ctx, isl_int n); +int isl_val_get_num_isl_int(__isl_keep isl_val *v, isl_int *n); + +#endif diff -Nru isl-0.11.2/include/isl/vec.h isl-0.12.1/include/isl/vec.h --- isl-0.11.2/include/isl/vec.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/include/isl/vec.h 2013-07-24 11:04:50.000000000 +0000 @@ -15,6 +15,7 @@ #include #include #include +#include #include #if defined(__cplusplus) @@ -42,12 +43,17 @@ int isl_vec_size(__isl_keep isl_vec *vec); int isl_vec_get_element(__isl_keep isl_vec *vec, int pos, isl_int *v); +__isl_give isl_val *isl_vec_get_element_val(__isl_keep isl_vec *vec, int pos); __isl_give isl_vec *isl_vec_set_element(__isl_take isl_vec *vec, int pos, isl_int v); __isl_give isl_vec *isl_vec_set_element_si(__isl_take isl_vec *vec, int pos, int v); +__isl_give isl_vec *isl_vec_set_element_val(__isl_take isl_vec *vec, + int pos, __isl_take isl_val *v); int isl_vec_is_equal(__isl_keep isl_vec *vec1, __isl_keep isl_vec *vec2); +int isl_vec_cmp_element(__isl_keep isl_vec *vec1, __isl_keep isl_vec *vec2, + int pos); void isl_vec_dump(__isl_keep isl_vec *vec); __isl_give isl_printer *isl_printer_print_vec(__isl_take isl_printer *printer, @@ -58,6 +64,8 @@ struct isl_vec *isl_vec_normalize(struct isl_vec *vec); __isl_give isl_vec *isl_vec_set(__isl_take isl_vec *vec, isl_int v); __isl_give isl_vec *isl_vec_set_si(__isl_take isl_vec *vec, int v); +__isl_give isl_vec *isl_vec_set_val(__isl_take isl_vec *vec, + __isl_take isl_val *v); __isl_give isl_vec *isl_vec_clr(__isl_take isl_vec *vec); __isl_give isl_vec *isl_vec_neg(__isl_take isl_vec *vec); __isl_give isl_vec *isl_vec_scale(__isl_take isl_vec *vec, isl_int m); diff -Nru isl-0.11.2/interface/Makefile.in isl-0.12.1/interface/Makefile.in --- isl-0.11.2/interface/Makefile.in 2013-04-09 16:45:43.000000000 +0000 +++ isl-0.12.1/interface/Makefile.in 2013-07-24 11:05:05.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -114,6 +131,11 @@ am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(extract_interface_SOURCES) DIST_SOURCES = $(extract_interface_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) diff -Nru isl-0.11.2/interface/isl.py isl-0.12.1/interface/isl.py --- isl-0.11.2/interface/isl.py 2013-04-09 16:45:55.000000000 +0000 +++ isl-0.12.1/interface/isl.py 2013-07-24 11:05:30.000000000 +0000 @@ -34,10 +34,6 @@ self.ctx = keywords["ctx"] self.ptr = keywords["ptr"] return - if len(args) == 1 and type(args[0]) == str: - self.ctx = Context.getDefaultInstance() - self.ptr = isl.isl_union_map_read_from_str(self.ctx, args[0]) - return if len(args) == 1 and args[0].__class__ is basic_map: self.ctx = Context.getDefaultInstance() self.ptr = isl.isl_union_map_from_basic_map(isl.isl_basic_map_copy(args[0].ptr)) @@ -46,6 +42,10 @@ self.ctx = Context.getDefaultInstance() self.ptr = isl.isl_union_map_from_map(isl.isl_map_copy(args[0].ptr)) return + if len(args) == 1 and type(args[0]) == str: + self.ctx = Context.getDefaultInstance() + self.ptr = isl.isl_union_map_read_from_str(self.ctx, args[0]) + return raise Error def __del__(self): if hasattr(self, 'ptr'): @@ -57,34 +57,6 @@ return res def __repr__(self): return 'isl.union_map("%s")' % str(self) - def is_strict_subset(self, arg1): - try: - if not arg1.__class__ is union_map: - arg1 = union_map(arg1) - except: - raise - res = isl.isl_union_map_is_strict_subset(self.ptr, arg1.ptr) - return res - def foreach_map(self, arg1): - exc_info = [None] - fn = CFUNCTYPE(c_int, c_void_p, c_void_p) - def cb_func(cb_arg0, cb_arg1): - cb_arg0 = map(ctx=self.ctx, ptr=cb_arg0) - try: - arg1(cb_arg0) - except: - import sys - exc_info[0] = sys.exc_info() - return -1 - return 0 - cb = fn(cb_func) - res = isl.isl_union_map_foreach_map(self.ptr, cb, None) - if exc_info[0] != None: - raise exc_info[0][0], exc_info[0][1], exc_info[0][2] - return res - def affine_hull(self): - res = isl.isl_union_map_affine_hull(isl.isl_union_map_copy(self.ptr)) - return union_map(ctx=self.ctx, ptr=res) def polyhedral_hull(self): res = isl.isl_union_map_polyhedral_hull(isl.isl_union_map_copy(self.ptr)) return union_map(ctx=self.ctx, ptr=res) @@ -121,6 +93,9 @@ raise res = isl.isl_union_map_intersect(isl.isl_union_map_copy(self.ptr), isl.isl_union_map_copy(arg1.ptr)) return union_map(ctx=self.ctx, ptr=res) + def affine_hull(self): + res = isl.isl_union_map_affine_hull(isl.isl_union_map_copy(self.ptr)) + return union_map(ctx=self.ctx, ptr=res) def intersect_params(self, arg1): try: if not arg1.__class__ is set: @@ -246,14 +221,38 @@ raise res = isl.isl_union_map_is_equal(self.ptr, arg1.ptr) return res + def is_strict_subset(self, arg1): + try: + if not arg1.__class__ is union_map: + arg1 = union_map(arg1) + except: + raise + res = isl.isl_union_map_is_strict_subset(self.ptr, arg1.ptr) + return res + def foreach_map(self, arg1): + exc_info = [None] + fn = CFUNCTYPE(c_int, c_void_p, c_void_p) + def cb_func(cb_arg0, cb_arg1): + cb_arg0 = map(ctx=self.ctx, ptr=cb_arg0) + try: + arg1(cb_arg0) + except: + import sys + exc_info[0] = sys.exc_info() + return -1 + return 0 + cb = fn(cb_func) + res = isl.isl_union_map_foreach_map(self.ptr, cb, None) + if exc_info[0] != None: + raise exc_info[0][0], exc_info[0][1], exc_info[0][2] + return res -isl.isl_union_map_read_from_str.restype = c_void_p -isl.isl_union_map_read_from_str.argtypes = [Context, c_char_p] isl.isl_union_map_from_basic_map.restype = c_void_p isl.isl_union_map_from_basic_map.argtypes = [c_void_p] isl.isl_union_map_from_map.restype = c_void_p isl.isl_union_map_from_map.argtypes = [c_void_p] -isl.isl_union_map_affine_hull.restype = c_void_p +isl.isl_union_map_read_from_str.restype = c_void_p +isl.isl_union_map_read_from_str.argtypes = [Context, c_char_p] isl.isl_union_map_polyhedral_hull.restype = c_void_p isl.isl_union_map_coalesce.restype = c_void_p isl.isl_union_map_lexmin.restype = c_void_p @@ -261,6 +260,7 @@ isl.isl_union_map_union.restype = c_void_p isl.isl_union_map_subtract.restype = c_void_p isl.isl_union_map_intersect.restype = c_void_p +isl.isl_union_map_affine_hull.restype = c_void_p isl.isl_union_map_intersect_params.restype = c_void_p isl.isl_union_map_gist.restype = c_void_p isl.isl_union_map_gist_params.restype = c_void_p @@ -672,6 +672,10 @@ self.ctx = keywords["ctx"] self.ptr = keywords["ptr"] return + if len(args) == 1 and type(args[0]) == str: + self.ctx = Context.getDefaultInstance() + self.ptr = isl.isl_union_set_read_from_str(self.ctx, args[0]) + return if len(args) == 1 and args[0].__class__ is basic_set: self.ctx = Context.getDefaultInstance() self.ptr = isl.isl_union_set_from_basic_set(isl.isl_basic_set_copy(args[0].ptr)) @@ -680,10 +684,6 @@ self.ctx = Context.getDefaultInstance() self.ptr = isl.isl_union_set_from_set(isl.isl_set_copy(args[0].ptr)) return - if len(args) == 1 and type(args[0]) == str: - self.ctx = Context.getDefaultInstance() - self.ptr = isl.isl_union_set_read_from_str(self.ctx, args[0]) - return raise Error def __del__(self): if hasattr(self, 'ptr'): @@ -695,6 +695,9 @@ return res def __repr__(self): return 'isl.union_set("%s")' % str(self) + def identity(self): + res = isl.isl_union_set_identity(isl.isl_union_set_copy(self.ptr)) + return union_map(ctx=self.ctx, ptr=res) def detect_equalities(self): res = isl.isl_union_set_detect_equalities(isl.isl_union_set_copy(self.ptr)) return union_set(ctx=self.ctx, ptr=res) @@ -805,16 +808,14 @@ if exc_info[0] != None: raise exc_info[0][0], exc_info[0][1], exc_info[0][2] return res - def identity(self): - res = isl.isl_union_set_identity(isl.isl_union_set_copy(self.ptr)) - return union_map(ctx=self.ctx, ptr=res) +isl.isl_union_set_read_from_str.restype = c_void_p +isl.isl_union_set_read_from_str.argtypes = [Context, c_char_p] isl.isl_union_set_from_basic_set.restype = c_void_p isl.isl_union_set_from_basic_set.argtypes = [c_void_p] isl.isl_union_set_from_set.restype = c_void_p isl.isl_union_set_from_set.argtypes = [c_void_p] -isl.isl_union_set_read_from_str.restype = c_void_p -isl.isl_union_set_read_from_str.argtypes = [Context, c_char_p] +isl.isl_union_set_identity.restype = c_void_p isl.isl_union_set_detect_equalities.restype = c_void_p isl.isl_union_set_affine_hull.restype = c_void_p isl.isl_union_set_polyhedral_hull.restype = c_void_p @@ -827,7 +828,6 @@ isl.isl_union_set_gist.restype = c_void_p isl.isl_union_set_gist_params.restype = c_void_p isl.isl_union_set_apply.restype = c_void_p -isl.isl_union_set_identity.restype = c_void_p isl.isl_union_set_free.argtypes = [c_void_p] isl.isl_union_set_to_str.argtypes = [c_void_p] isl.isl_union_set_to_str.restype = POINTER(c_char) @@ -857,6 +857,32 @@ return res def __repr__(self): return 'isl.set("%s")' % str(self) + def lexmin(self): + res = isl.isl_set_lexmin(isl.isl_set_copy(self.ptr)) + return set(ctx=self.ctx, ptr=res) + def lexmax(self): + res = isl.isl_set_lexmax(isl.isl_set_copy(self.ptr)) + return set(ctx=self.ctx, ptr=res) + def sample(self): + res = isl.isl_set_sample(isl.isl_set_copy(self.ptr)) + return basic_set(ctx=self.ctx, ptr=res) + def detect_equalities(self): + res = isl.isl_set_detect_equalities(isl.isl_set_copy(self.ptr)) + return set(ctx=self.ctx, ptr=res) + def affine_hull(self): + res = isl.isl_set_affine_hull(isl.isl_set_copy(self.ptr)) + return basic_set(ctx=self.ctx, ptr=res) + def polyhedral_hull(self): + res = isl.isl_set_polyhedral_hull(isl.isl_set_copy(self.ptr)) + return basic_set(ctx=self.ctx, ptr=res) + def union(self, arg1): + try: + if not arg1.__class__ is set: + arg1 = set(arg1) + except: + return union_set(self).union(arg1) + res = isl.isl_set_union(isl.isl_set_copy(self.ptr), isl.isl_set_copy(arg1.ptr)) + return set(ctx=self.ctx, ptr=res) def intersect(self, arg1): try: if not arg1.__class__ is set: @@ -892,32 +918,6 @@ return union_set(self).apply(arg1) res = isl.isl_set_apply(isl.isl_set_copy(self.ptr), isl.isl_map_copy(arg1.ptr)) return set(ctx=self.ctx, ptr=res) - def lexmin(self): - res = isl.isl_set_lexmin(isl.isl_set_copy(self.ptr)) - return set(ctx=self.ctx, ptr=res) - def lexmax(self): - res = isl.isl_set_lexmax(isl.isl_set_copy(self.ptr)) - return set(ctx=self.ctx, ptr=res) - def sample(self): - res = isl.isl_set_sample(isl.isl_set_copy(self.ptr)) - return basic_set(ctx=self.ctx, ptr=res) - def detect_equalities(self): - res = isl.isl_set_detect_equalities(isl.isl_set_copy(self.ptr)) - return set(ctx=self.ctx, ptr=res) - def affine_hull(self): - res = isl.isl_set_affine_hull(isl.isl_set_copy(self.ptr)) - return basic_set(ctx=self.ctx, ptr=res) - def polyhedral_hull(self): - res = isl.isl_set_polyhedral_hull(isl.isl_set_copy(self.ptr)) - return basic_set(ctx=self.ctx, ptr=res) - def union(self, arg1): - try: - if not arg1.__class__ is set: - arg1 = set(arg1) - except: - return union_set(self).union(arg1) - res = isl.isl_set_union(isl.isl_set_copy(self.ptr), isl.isl_set_copy(arg1.ptr)) - return set(ctx=self.ctx, ptr=res) def is_empty(self): res = isl.isl_set_is_empty(self.ptr) return res @@ -995,11 +995,6 @@ isl.isl_set_read_from_str.argtypes = [Context, c_char_p] isl.isl_set_from_basic_set.restype = c_void_p isl.isl_set_from_basic_set.argtypes = [c_void_p] -isl.isl_set_intersect.restype = c_void_p -isl.isl_set_intersect_params.restype = c_void_p -isl.isl_set_subtract.restype = c_void_p -isl.isl_set_complement.restype = c_void_p -isl.isl_set_apply.restype = c_void_p isl.isl_set_lexmin.restype = c_void_p isl.isl_set_lexmax.restype = c_void_p isl.isl_set_sample.restype = c_void_p @@ -1007,6 +1002,11 @@ isl.isl_set_affine_hull.restype = c_void_p isl.isl_set_polyhedral_hull.restype = c_void_p isl.isl_set_union.restype = c_void_p +isl.isl_set_intersect.restype = c_void_p +isl.isl_set_intersect_params.restype = c_void_p +isl.isl_set_subtract.restype = c_void_p +isl.isl_set_complement.restype = c_void_p +isl.isl_set_apply.restype = c_void_p isl.isl_set_gist.restype = c_void_p isl.isl_set_coalesce.restype = c_void_p isl.isl_set_identity.restype = c_void_p diff -Nru isl-0.11.2/isl_aff.c isl-0.12.1/isl_aff.c --- isl-0.11.2/isl_aff.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_aff.c 2013-07-24 11:04:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Copyright 2011 INRIA Saclay * Copyright 2011 Sven Verdoolaege - * Copyright 2012 Ecole Normale Superieure + * Copyright 2012-2013 Ecole Normale Superieure * * Use of this software is governed by the MIT license * @@ -19,12 +19,22 @@ #include #include #include -#include #include #include #include +#include #include +#undef BASE +#define BASE aff + +#include + +#undef BASE +#define BASE pw_aff + +#include + __isl_give isl_aff *isl_aff_alloc_vec(__isl_take isl_local_space *ls, __isl_take isl_vec *v) { @@ -399,6 +409,19 @@ return 0; } +/* Return the common denominator of "aff". + */ +__isl_give isl_val *isl_aff_get_denominator_val(__isl_keep isl_aff *aff) +{ + isl_ctx *ctx; + + if (!aff) + return NULL; + + ctx = isl_aff_get_ctx(aff); + return isl_val_int_from_isl_int(ctx, aff->v->el[0]); +} + int isl_aff_get_constant(__isl_keep isl_aff *aff, isl_int *v) { if (!aff) @@ -407,6 +430,21 @@ return 0; } +/* Return the constant term of "aff". + */ +__isl_give isl_val *isl_aff_get_constant_val(__isl_keep isl_aff *aff) +{ + isl_ctx *ctx; + isl_val *v; + + if (!aff) + return NULL; + + ctx = isl_aff_get_ctx(aff); + v = isl_val_rat_from_isl_int(ctx, aff->v->el[1], aff->v->el[0]); + return isl_val_normalize(v); +} + int isl_aff_get_coefficient(__isl_keep isl_aff *aff, enum isl_dim_type type, int pos, isl_int *v) { @@ -430,6 +468,35 @@ return 0; } +/* Return the coefficient of the variable of type "type" at position "pos" + * of "aff". + */ +__isl_give isl_val *isl_aff_get_coefficient_val(__isl_keep isl_aff *aff, + enum isl_dim_type type, int pos) +{ + isl_ctx *ctx; + isl_val *v; + + if (!aff) + return NULL; + + ctx = isl_aff_get_ctx(aff); + if (type == isl_dim_out) + isl_die(ctx, isl_error_invalid, + "output/set dimension does not have a coefficient", + return NULL); + if (type == isl_dim_in) + type = isl_dim_set; + + if (pos >= isl_local_space_dim(aff->ls, type)) + isl_die(ctx, isl_error_invalid, + "position out of bounds", return NULL); + + pos += isl_local_space_offset(aff->ls, type); + v = isl_val_rat_from_isl_int(ctx, aff->v->el[1 + pos], aff->v->el[0]); + return isl_val_normalize(v); +} + __isl_give isl_aff *isl_aff_set_denominator(__isl_take isl_aff *aff, isl_int v) { aff = isl_aff_cow(aff); @@ -460,6 +527,53 @@ return aff; } +/* Replace the constant term of "aff" by "v". + */ +__isl_give isl_aff *isl_aff_set_constant_val(__isl_take isl_aff *aff, + __isl_take isl_val *v) +{ + if (!aff || !v) + goto error; + + if (!isl_val_is_rat(v)) + isl_die(isl_aff_get_ctx(aff), isl_error_invalid, + "expecting rational value", goto error); + + if (isl_int_eq(aff->v->el[1], v->n) && + isl_int_eq(aff->v->el[0], v->d)) { + isl_val_free(v); + return aff; + } + + aff = isl_aff_cow(aff); + if (!aff) + goto error; + aff->v = isl_vec_cow(aff->v); + if (!aff->v) + goto error; + + if (isl_int_eq(aff->v->el[0], v->d)) { + isl_int_set(aff->v->el[1], v->n); + } else if (isl_int_is_one(v->d)) { + isl_int_mul(aff->v->el[1], aff->v->el[0], v->n); + } else { + isl_seq_scale(aff->v->el + 1, + aff->v->el + 1, v->d, aff->v->size - 1); + isl_int_mul(aff->v->el[1], aff->v->el[0], v->n); + isl_int_mul(aff->v->el[0], aff->v->el[0], v->d); + aff->v = isl_vec_normalize(aff->v); + if (!aff->v) + goto error; + } + + isl_val_free(v); + return aff; +error: + isl_aff_free(aff); + isl_val_free(v); + return NULL; +} + __isl_give isl_aff *isl_aff_add_constant(__isl_take isl_aff *aff, isl_int v) { if (isl_int_is_zero(v)) @@ -478,6 +592,56 @@ return aff; } +/* Add "v" to the constant term of "aff". + */ +__isl_give isl_aff *isl_aff_add_constant_val(__isl_take isl_aff *aff, + __isl_take isl_val *v) +{ + if (!aff || !v) + goto error; + + if (isl_val_is_zero(v)) { + isl_val_free(v); + return aff; + } + + if (!isl_val_is_rat(v)) + isl_die(isl_aff_get_ctx(aff), isl_error_invalid, + "expecting rational value", goto error); + + aff = isl_aff_cow(aff); + if (!aff) + goto error; + + aff->v = isl_vec_cow(aff->v); + if (!aff->v) + goto error; + + if (isl_int_is_one(v->d)) { + isl_int_addmul(aff->v->el[1], aff->v->el[0], v->n); + } else if (isl_int_eq(aff->v->el[0], v->d)) { + isl_int_add(aff->v->el[1], aff->v->el[1], v->n); + aff->v = isl_vec_normalize(aff->v); + if (!aff->v) + goto error; + } else { + isl_seq_scale(aff->v->el + 1, + aff->v->el + 1, v->d, aff->v->size - 1); + isl_int_addmul(aff->v->el[1], aff->v->el[0], v->n); + isl_int_mul(aff->v->el[0], aff->v->el[0], v->d); + aff->v = isl_vec_normalize(aff->v); + if (!aff->v) + goto error; + } + + isl_val_free(v); + return aff; +error: + isl_aff_free(aff); + isl_val_free(v); + return NULL; +} + __isl_give isl_aff *isl_aff_add_constant_si(__isl_take isl_aff *aff, int v) { isl_int t; @@ -604,6 +768,66 @@ return aff; } +/* Replace the coefficient of the variable of type "type" at position "pos" + * of "aff" by "v". + */ +__isl_give isl_aff *isl_aff_set_coefficient_val(__isl_take isl_aff *aff, + enum isl_dim_type type, int pos, __isl_take isl_val *v) +{ + if (!aff || !v) + goto error; + + if (type == isl_dim_out) + isl_die(aff->v->ctx, isl_error_invalid, + "output/set dimension does not have a coefficient", + goto error); + if (type == isl_dim_in) + type = isl_dim_set; + + if (pos >= isl_local_space_dim(aff->ls, type)) + isl_die(aff->v->ctx, isl_error_invalid, + "position out of bounds", goto error); + + if (!isl_val_is_rat(v)) + isl_die(isl_aff_get_ctx(aff), isl_error_invalid, + "expecting rational value", goto error); + + pos += isl_local_space_offset(aff->ls, type); + if (isl_int_eq(aff->v->el[1 + pos], v->n) && + isl_int_eq(aff->v->el[0], v->d)) { + isl_val_free(v); + return aff; + } + + aff = isl_aff_cow(aff); + if (!aff) + goto error; + aff->v = isl_vec_cow(aff->v); + if (!aff->v) + goto error; + + if (isl_int_eq(aff->v->el[0], v->d)) { + isl_int_set(aff->v->el[1 + pos], v->n); + } else if (isl_int_is_one(v->d)) { + isl_int_mul(aff->v->el[1 + pos], aff->v->el[0], v->n); + } else { + isl_seq_scale(aff->v->el + 1, + aff->v->el + 1, v->d, aff->v->size - 1); + isl_int_mul(aff->v->el[1 + pos], aff->v->el[0], v->n); + isl_int_mul(aff->v->el[0], aff->v->el[0], v->d); + aff->v = isl_vec_normalize(aff->v); + if (!aff->v) + goto error; + } + + isl_val_free(v); + return aff; +error: + isl_aff_free(aff); + isl_val_free(v); + return NULL; +} + __isl_give isl_aff *isl_aff_add_coefficient(__isl_take isl_aff *aff, enum isl_dim_type type, int pos, isl_int v) { @@ -635,6 +859,69 @@ return aff; } +/* Add "v" to the coefficient of the variable of type "type" + * at position "pos" of "aff". + */ +__isl_give isl_aff *isl_aff_add_coefficient_val(__isl_take isl_aff *aff, + enum isl_dim_type type, int pos, __isl_take isl_val *v) +{ + if (!aff || !v) + goto error; + + if (isl_val_is_zero(v)) { + isl_val_free(v); + return aff; + } + + if (type == isl_dim_out) + isl_die(aff->v->ctx, isl_error_invalid, + "output/set dimension does not have a coefficient", + goto error); + if (type == isl_dim_in) + type = isl_dim_set; + + if (pos >= isl_local_space_dim(aff->ls, type)) + isl_die(aff->v->ctx, isl_error_invalid, + "position out of bounds", goto error); + + if (!isl_val_is_rat(v)) + isl_die(isl_aff_get_ctx(aff), isl_error_invalid, + "expecting rational value", goto error); + + aff = isl_aff_cow(aff); + if (!aff) + goto error; + + aff->v = isl_vec_cow(aff->v); + if (!aff->v) + goto error; + + pos += isl_local_space_offset(aff->ls, type); + if (isl_int_is_one(v->d)) { + isl_int_addmul(aff->v->el[1 + pos], aff->v->el[0], v->n); + } else if (isl_int_eq(aff->v->el[0], v->d)) { + isl_int_add(aff->v->el[1 + pos], aff->v->el[1 + pos], v->n); + aff->v = isl_vec_normalize(aff->v); + if (!aff->v) + goto error; + } else { + isl_seq_scale(aff->v->el + 1, + aff->v->el + 1, v->d, aff->v->size - 1); + isl_int_addmul(aff->v->el[1 + pos], aff->v->el[0], v->n); + isl_int_mul(aff->v->el[0], aff->v->el[0], v->d); + aff->v = isl_vec_normalize(aff->v); + if (!aff->v) + goto error; + } + + isl_val_free(v); + return aff; +error: + isl_aff_free(aff); + isl_val_free(v); + return NULL; +} + __isl_give isl_aff *isl_aff_add_coefficient_si(__isl_take isl_aff *aff, enum isl_dim_type type, int pos, int v) { @@ -1024,6 +1311,37 @@ /* Compute * + * aff mod m = aff - m * floor(aff/m) + * + * with m an integer value. + */ +__isl_give isl_aff *isl_aff_mod_val(__isl_take isl_aff *aff, + __isl_take isl_val *m) +{ + isl_aff *res; + + if (!aff || !m) + goto error; + + if (!isl_val_is_int(m)) + isl_die(isl_val_get_ctx(m), isl_error_invalid, + "expecting integer modulo", goto error); + + res = isl_aff_copy(aff); + aff = isl_aff_scale_down_val(aff, isl_val_copy(m)); + aff = isl_aff_floor(aff); + aff = isl_aff_scale_val(aff, m); + res = isl_aff_sub(res, aff); + + return res; +error: + isl_aff_free(aff); + isl_val_free(m); + return NULL; +} + +/* Compute + * * pwaff mod m = pwaff - m * floor(pwaff/m) */ __isl_give isl_pw_aff *isl_pw_aff_mod(__isl_take isl_pw_aff *pwaff, isl_int m) @@ -1039,6 +1357,29 @@ return res; } +/* Compute + * + * pa mod m = pa - m * floor(pa/m) + * + * with m an integer value. + */ +__isl_give isl_pw_aff *isl_pw_aff_mod_val(__isl_take isl_pw_aff *pa, + __isl_take isl_val *m) +{ + if (!pa || !m) + goto error; + if (!isl_val_is_int(m)) + isl_die(isl_pw_aff_get_ctx(pa), isl_error_invalid, + "expecting integer modulo", goto error); + pa = isl_pw_aff_mod(pa, m->n); + isl_val_free(m); + return pa; +error: + isl_pw_aff_free(pa); + isl_val_free(m); + return NULL; +} + /* Given f, return ceil(f). * If f is an integer expression, then just return f. * Otherwise, let f be the expression @@ -1162,6 +1503,7 @@ int *exp1 = NULL; int *exp2 = NULL; isl_mat *div; + int n_div1, n_div2; if (!aff1 || !aff2) goto error; @@ -1171,12 +1513,14 @@ isl_die(ctx, isl_error_invalid, "spaces don't match", goto error); - if (aff1->ls->div->n_row == 0 && aff2->ls->div->n_row == 0) + n_div1 = isl_aff_dim(aff1, isl_dim_div); + n_div2 = isl_aff_dim(aff2, isl_dim_div); + if (n_div1 == 0 && n_div2 == 0) return add_expanded(aff1, aff2); - exp1 = isl_alloc_array(ctx, int, aff1->ls->div->n_row); - exp2 = isl_alloc_array(ctx, int, aff2->ls->div->n_row); - if (!exp1 || !exp2) + exp1 = isl_alloc_array(ctx, int, n_div1); + exp2 = isl_alloc_array(ctx, int, n_div2); + if ((n_div1 && !exp1) || (n_div2 && !exp2)) goto error; div = isl_merge_divs(aff1->ls->div, aff2->ls->div, exp1, exp2); @@ -1214,6 +1558,11 @@ if (!aff->v) return isl_aff_free(aff); + if (isl_int_is_pos(f) && isl_int_is_divisible_by(aff->v->el[0], f)) { + isl_int_divexact(aff->v->el[0], aff->v->el[0], f); + return aff; + } + isl_int_init(gcd); isl_int_gcd(gcd, aff->v->el[0], f); isl_int_divexact(aff->v->el[0], aff->v->el[0], gcd); @@ -1224,6 +1573,34 @@ return aff; } +/* Multiple "aff" by "v". + */ +__isl_give isl_aff *isl_aff_scale_val(__isl_take isl_aff *aff, + __isl_take isl_val *v) +{ + if (!aff || !v) + goto error; + + if (isl_val_is_one(v)) { + isl_val_free(v); + return aff; + } + + if (!isl_val_is_rat(v)) + isl_die(isl_aff_get_ctx(aff), isl_error_invalid, + "expecting rational factor", goto error); + + aff = isl_aff_scale(aff, v->n); + aff = isl_aff_scale_down(aff, v->d); + + isl_val_free(v); + return aff; +error: + isl_aff_free(aff); + isl_val_free(v); + return NULL; +} + __isl_give isl_aff *isl_aff_scale_down(__isl_take isl_aff *aff, isl_int f) { isl_int gcd; @@ -1254,6 +1631,37 @@ return aff; } +/* Divide "aff" by "v". + */ +__isl_give isl_aff *isl_aff_scale_down_val(__isl_take isl_aff *aff, + __isl_take isl_val *v) +{ + if (!aff || !v) + goto error; + + if (isl_val_is_one(v)) { + isl_val_free(v); + return aff; + } + + if (!isl_val_is_rat(v)) + isl_die(isl_aff_get_ctx(aff), isl_error_invalid, + "expecting rational factor", goto error); + if (!isl_val_is_pos(v)) + isl_die(isl_aff_get_ctx(aff), isl_error_invalid, + "factor needs to be positive", goto error); + + aff = isl_aff_scale(aff, v->d); + aff = isl_aff_scale_down(aff, v->n); + + isl_val_free(v); + return aff; +error: + isl_aff_free(aff); + isl_val_free(v); + return NULL; +} + __isl_give isl_aff *isl_aff_scale_down_ui(__isl_take isl_aff *aff, unsigned f) { isl_int v; @@ -2231,6 +2639,49 @@ return pwaff; } +/* Divide "pa" by "f". + */ +__isl_give isl_pw_aff *isl_pw_aff_scale_down_val(__isl_take isl_pw_aff *pa, + __isl_take isl_val *f) +{ + int i; + + if (!pa || !f) + goto error; + + if (isl_val_is_one(f)) { + isl_val_free(f); + return pa; + } + + if (!isl_val_is_rat(f)) + isl_die(isl_pw_aff_get_ctx(pa), isl_error_invalid, + "expecting rational factor", goto error); + if (!isl_val_is_pos(f)) + isl_die(isl_pw_aff_get_ctx(pa), isl_error_invalid, + "factor needs to be positive", goto error); + + pa = isl_pw_aff_cow(pa); + if (!pa) + return NULL; + if (pa->n == 0) + return pa; + + for (i = 0; i < pa->n; ++i) { + pa->p[i].aff = isl_aff_scale_down_val(pa->p[i].aff, + isl_val_copy(f)); + if (!pa->p[i].aff) + goto error; + } + + isl_val_free(f); + return pa; +error: + isl_pw_aff_free(pa); + isl_val_free(f); + return NULL; +} + __isl_give isl_pw_aff *isl_pw_aff_floor(__isl_take isl_pw_aff *pwaff) { int i; @@ -2645,6 +3096,41 @@ return list; } +/* Check that the domain space of "aff" matches "space". + * + * Return 0 on success and -1 on error. + */ +int isl_aff_check_match_domain_space(__isl_keep isl_aff *aff, + __isl_keep isl_space *space) +{ + isl_space *aff_space; + int match; + + if (!aff || !space) + return -1; + + aff_space = isl_aff_get_domain_space(aff); + + match = isl_space_match(space, isl_dim_param, aff_space, isl_dim_param); + if (match < 0) + goto error; + if (!match) + isl_die(isl_aff_get_ctx(aff), isl_error_invalid, + "parameters don't match", goto error); + match = isl_space_tuple_match(space, isl_dim_in, + aff_space, isl_dim_set); + if (match < 0) + goto error; + if (!match) + isl_die(isl_aff_get_ctx(aff), isl_error_invalid, + "domains don't match", goto error); + isl_space_free(aff_space); + return 0; +error: + isl_space_free(aff_space); + return -1; +} + #undef BASE #define BASE aff @@ -2672,31 +3158,15 @@ __isl_give isl_multi_aff *isl_multi_aff_add(__isl_take isl_multi_aff *maff1, __isl_take isl_multi_aff *maff2) { - int i; - isl_ctx *ctx; - - maff1 = isl_multi_aff_cow(maff1); - if (!maff1 || !maff2) - goto error; - - ctx = isl_multi_aff_get_ctx(maff1); - if (!isl_space_is_equal(maff1->space, maff2->space)) - isl_die(ctx, isl_error_invalid, - "spaces don't match", goto error); - - for (i = 0; i < maff1->n; ++i) { - maff1->p[i] = isl_aff_add(maff1->p[i], - isl_aff_copy(maff2->p[i])); - if (!maff1->p[i]) - goto error; - } + return isl_multi_aff_bin_op(maff1, maff2, &isl_aff_add); +} - isl_multi_aff_free(maff2); - return maff1; -error: - isl_multi_aff_free(maff1); - isl_multi_aff_free(maff2); - return NULL; +/* Subtract "ma2" from "ma1" and return the result. + */ +__isl_give isl_multi_aff *isl_multi_aff_sub(__isl_take isl_multi_aff *ma1, + __isl_take isl_multi_aff *ma2) +{ + return isl_multi_aff_bin_op(ma1, ma2, &isl_aff_sub); } /* Given two multi-affine expressions A -> B and C -> D, @@ -3057,6 +3527,22 @@ &pw_multi_aff_add); } +static __isl_give isl_pw_multi_aff *pw_multi_aff_sub( + __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2) +{ + return isl_pw_multi_aff_on_shared_domain(pma1, pma2, + &isl_multi_aff_sub); +} + +/* Subtract "pma2" from "pma1" and return the result. + */ +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_sub( + __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2) +{ + return isl_pw_multi_aff_align_params_pw_pw_and(pma1, pma2, + &pw_multi_aff_sub); +} + __isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_add( __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2) { @@ -3090,7 +3576,7 @@ isl_set_copy(pma2->p[j].set)); ma = isl_multi_aff_product( isl_multi_aff_copy(pma1->p[i].maff), - isl_multi_aff_copy(pma2->p[i].maff)); + isl_multi_aff_copy(pma2->p[j].maff)); res = isl_pw_multi_aff_add_piece(res, domain, ma); } } @@ -3761,6 +4247,51 @@ return isl_pw_multi_aff_from_map(set); } +/* Convert "map" into an isl_pw_multi_aff (if possible) and + * add it to *user. + */ +static int pw_multi_aff_from_map(__isl_take isl_map *map, void *user) +{ + isl_union_pw_multi_aff **upma = user; + isl_pw_multi_aff *pma; + + pma = isl_pw_multi_aff_from_map(map); + *upma = isl_union_pw_multi_aff_add_pw_multi_aff(*upma, pma); + + return *upma ? 0 : -1; +} + +/* Try and create an isl_union_pw_multi_aff that is equivalent + * to the given isl_union_map. + * The isl_union_map is required to be single-valued in each space. + * Otherwise, an error is produced. + */ +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_from_union_map( + __isl_take isl_union_map *umap) +{ + isl_space *space; + isl_union_pw_multi_aff *upma; + + space = isl_union_map_get_space(umap); + upma = isl_union_pw_multi_aff_empty(space); + if (isl_union_map_foreach_map(umap, &pw_multi_aff_from_map, &upma) < 0) + upma = isl_union_pw_multi_aff_free(upma); + isl_union_map_free(umap); + + return upma; +} + +/* Try and create an isl_union_pw_multi_aff that is equivalent + * to the given isl_union_set. + * The isl_union_set is required to be a singleton in each space. + * Otherwise, an error is produced. + */ +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_from_union_set( + __isl_take isl_union_set *uset) +{ + return isl_union_pw_multi_aff_from_union_map(uset); +} + /* Return the piecewise affine expression "set ? 1 : 0". */ __isl_give isl_pw_aff *isl_set_indicator_function(__isl_take isl_set *set) @@ -3923,8 +4454,12 @@ return NULL; } -/* Compute the preimage of the affine expression "src" under "ma" - * and put the result in "dst". If "has_denom" is set (to one), +/* Compute the preimage of a range of dimensions in the affine expression "src" + * under "ma" and put the result in "dst". The number of dimensions in "src" + * that precede the range is given by "n_before". The number of dimensions + * in the range is given by the number of output dimensions of "ma". + * The number of dimensions that follow the range is given by "n_after". + * If "has_denom" is set (to one), * then "src" and "dst" have an extra initial denominator. * "n_div_ma" is the number of existentials in "ma" * "n_div_bset" is the number of existentials in "src" @@ -3936,17 +4471,18 @@ * * Let src represent the expression * - * (a(p) + b x + c(divs))/d + * (a(p) + f_u u + b v + f_w w + c(divs))/d * * and let ma represent the expressions * - * x_i = (r_i(p) + s_i(y) + t_i(divs'))/m_i + * v_i = (r_i(p) + s_i(y) + t_i(divs'))/m_i * * We start out with the following expression for dst: * - * (a(p) + 0 y + 0 divs' + f \sum_i b_i x_i + c(divs))/d + * (a(p) + f_u u + 0 y + f_w w + 0 divs' + c(divs) + f \sum_i b_i v_i)/d * - * with the multiplication factor f initially equal to 1. + * with the multiplication factor f initially equal to 1 + * and f \sum_i b_i v_i kept separately. * For each x_i that we substitute, we multiply the numerator * (and denominator) of dst by c_1 = m_i and add the numerator * of the x_i expression multiplied by c_2 = f b_i, @@ -3955,40 +4491,63 @@ * for the next x_j, j > i. */ void isl_seq_preimage(isl_int *dst, isl_int *src, - __isl_keep isl_multi_aff *ma, int n_div_ma, int n_div_bset, + __isl_keep isl_multi_aff *ma, int n_before, int n_after, + int n_div_ma, int n_div_bmap, isl_int f, isl_int c1, isl_int c2, isl_int g, int has_denom) { int i; int n_param, n_in, n_out; - int o_div_bset; + int o_dst, o_src; n_param = isl_multi_aff_dim(ma, isl_dim_param); n_in = isl_multi_aff_dim(ma, isl_dim_in); n_out = isl_multi_aff_dim(ma, isl_dim_out); - o_div_bset = has_denom + 1 + n_param + n_in + n_div_ma; - - isl_seq_cpy(dst, src, has_denom + 1 + n_param); - isl_seq_clr(dst + has_denom + 1 + n_param, n_in + n_div_ma); - isl_seq_cpy(dst + o_div_bset, - src + has_denom + 1 + n_param + n_out, n_div_bset); + isl_seq_cpy(dst, src, has_denom + 1 + n_param + n_before); + o_dst = o_src = has_denom + 1 + n_param + n_before; + isl_seq_clr(dst + o_dst, n_in); + o_dst += n_in; + o_src += n_out; + isl_seq_cpy(dst + o_dst, src + o_src, n_after); + o_dst += n_after; + o_src += n_after; + isl_seq_clr(dst + o_dst, n_div_ma); + o_dst += n_div_ma; + isl_seq_cpy(dst + o_dst, src + o_src, n_div_bmap); isl_int_set_si(f, 1); for (i = 0; i < n_out; ++i) { - if (isl_int_is_zero(src[has_denom + 1 + n_param + i])) + int offset = has_denom + 1 + n_param + n_before + i; + + if (isl_int_is_zero(src[offset])) continue; isl_int_set(c1, ma->p[i]->v->el[0]); - isl_int_mul(c2, f, src[has_denom + 1 + n_param + i]); + isl_int_mul(c2, f, src[offset]); isl_int_gcd(g, c1, c2); isl_int_divexact(c1, c1, g); isl_int_divexact(c2, c2, g); isl_int_mul(f, f, c1); - isl_seq_combine(dst + has_denom, c1, dst + has_denom, - c2, ma->p[i]->v->el + 1, ma->p[i]->v->size - 1); - isl_seq_scale(dst + o_div_bset, - dst + o_div_bset, c1, n_div_bset); + o_dst = has_denom; + o_src = 1; + isl_seq_combine(dst + o_dst, c1, dst + o_dst, + c2, ma->p[i]->v->el + o_src, 1 + n_param); + o_dst += 1 + n_param; + o_src += 1 + n_param; + isl_seq_scale(dst + o_dst, dst + o_dst, c1, n_before); + o_dst += n_before; + isl_seq_combine(dst + o_dst, c1, dst + o_dst, + c2, ma->p[i]->v->el + o_src, n_in); + o_dst += n_in; + o_src += n_in; + isl_seq_scale(dst + o_dst, dst + o_dst, c1, n_after); + o_dst += n_after; + isl_seq_combine(dst + o_dst, c1, dst + o_dst, + c2, ma->p[i]->v->el + o_src, n_div_ma); + o_dst += n_div_ma; + o_src += n_div_ma; + isl_seq_scale(dst + o_dst, dst + o_dst, c1, n_div_bmap); if (has_denom) isl_int_mul(dst[0], dst[0], c1); } @@ -4039,7 +4598,7 @@ isl_int_init(c2); isl_int_init(g); - isl_seq_preimage(res->v->el, aff->v->el, ma, n_div_ma, n_div_aff, + isl_seq_preimage(res->v->el, aff->v->el, ma, 0, 0, n_div_ma, n_div_aff, f, c1, c2, g, 1); isl_int_clear(f); @@ -4116,7 +4675,7 @@ exp1 = isl_alloc_array(ctx, int, src->ls->div->n_row); exp2 = isl_alloc_array(ctx, int, dst->ls->div->n_row); - if (!exp1 || !exp2) + if (!exp1 || (dst->ls->div->n_row && !exp2)) goto error; div = isl_merge_divs(src->ls->div, dst->ls->div, exp1, exp2); @@ -4591,7 +5150,146 @@ return NULL; } +/* Check that the domain space of "pa" matches "space". + * + * Return 0 on success and -1 on error. + */ +int isl_pw_aff_check_match_domain_space(__isl_keep isl_pw_aff *pa, + __isl_keep isl_space *space) +{ + isl_space *pa_space; + int match; + + if (!pa || !space) + return -1; + + pa_space = isl_pw_aff_get_space(pa); + + match = isl_space_match(space, isl_dim_param, pa_space, isl_dim_param); + if (match < 0) + goto error; + if (!match) + isl_die(isl_pw_aff_get_ctx(pa), isl_error_invalid, + "parameters don't match", goto error); + match = isl_space_tuple_match(space, isl_dim_in, pa_space, isl_dim_in); + if (match < 0) + goto error; + if (!match) + isl_die(isl_pw_aff_get_ctx(pa), isl_error_invalid, + "domains don't match", goto error); + isl_space_free(pa_space); + return 0; +error: + isl_space_free(pa_space); + return -1; +} + #undef BASE #define BASE pw_aff #include + +/* Scale the elements of "pma" by the corresponding elements of "mv". + */ +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_scale_multi_val( + __isl_take isl_pw_multi_aff *pma, __isl_take isl_multi_val *mv) +{ + int i; + + pma = isl_pw_multi_aff_cow(pma); + if (!pma || !mv) + goto error; + if (!isl_space_tuple_match(pma->dim, isl_dim_out, + mv->space, isl_dim_set)) + isl_die(isl_pw_multi_aff_get_ctx(pma), isl_error_invalid, + "spaces don't match", goto error); + if (!isl_space_match(pma->dim, isl_dim_param, + mv->space, isl_dim_param)) { + pma = isl_pw_multi_aff_align_params(pma, + isl_multi_val_get_space(mv)); + mv = isl_multi_val_align_params(mv, + isl_pw_multi_aff_get_space(pma)); + if (!pma || !mv) + goto error; + } + + for (i = 0; i < pma->n; ++i) { + pma->p[i].maff = isl_multi_aff_scale_multi_val(pma->p[i].maff, + isl_multi_val_copy(mv)); + if (!pma->p[i].maff) + goto error; + } + + isl_multi_val_free(mv); + return pma; +error: + isl_multi_val_free(mv); + isl_pw_multi_aff_free(pma); + return NULL; +} + +/* Internal data structure for isl_union_pw_multi_aff_scale_multi_val. + * mv contains the mv argument. + * res collects the results. + */ +struct isl_union_pw_multi_aff_scale_multi_val_data { + isl_multi_val *mv; + isl_union_pw_multi_aff *res; +}; + +/* This function is called for each entry of an isl_union_pw_multi_aff. + * If the space of the entry matches that of data->mv, + * then apply isl_pw_multi_aff_scale_multi_val and add the result + * to data->res. + */ +static int union_pw_multi_aff_scale_multi_val_entry(void **entry, void *user) +{ + struct isl_union_pw_multi_aff_scale_multi_val_data *data = user; + isl_pw_multi_aff *pma = *entry; + + if (!pma) + return -1; + if (!isl_space_tuple_match(pma->dim, isl_dim_out, + data->mv->space, isl_dim_set)) + return 0; + + pma = isl_pw_multi_aff_copy(pma); + pma = isl_pw_multi_aff_scale_multi_val(pma, + isl_multi_val_copy(data->mv)); + data->res = isl_union_pw_multi_aff_add_pw_multi_aff(data->res, pma); + if (!data->res) + return -1; + + return 0; +} + +/* Scale the elements of "upma" by the corresponding elements of "mv", + * for those entries that match the space of "mv". + */ +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_scale_multi_val( + __isl_take isl_union_pw_multi_aff *upma, __isl_take isl_multi_val *mv) +{ + struct isl_union_pw_multi_aff_scale_multi_val_data data; + + upma = isl_union_pw_multi_aff_align_params(upma, + isl_multi_val_get_space(mv)); + mv = isl_multi_val_align_params(mv, + isl_union_pw_multi_aff_get_space(upma)); + if (!upma || !mv) + goto error; + + data.mv = mv; + data.res = isl_union_pw_multi_aff_alloc(isl_space_copy(upma->dim), + upma->table.n); + if (isl_hash_table_foreach(upma->dim->ctx, &upma->table, + &union_pw_multi_aff_scale_multi_val_entry, &data) < 0) + goto error; + + isl_multi_val_free(mv); + isl_union_pw_multi_aff_free(upma); + return data.res; +error: + isl_multi_val_free(mv); + isl_union_pw_multi_aff_free(upma); + return NULL; +} diff -Nru isl-0.11.2/isl_aff_private.h isl-0.12.1/isl_aff_private.h --- isl-0.11.2/isl_aff_private.h 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/isl_aff_private.h 2013-07-24 11:04:50.000000000 +0000 @@ -16,6 +16,11 @@ isl_vec *v; }; +#undef EL +#define EL isl_aff + +#include + struct isl_pw_aff_piece { struct isl_set *set; struct isl_aff *aff; @@ -32,6 +37,11 @@ struct isl_pw_aff_piece p[1]; }; +#undef EL +#define EL isl_pw_aff + +#include + struct isl_pw_multi_aff_piece { isl_set *set; isl_multi_aff *maff; @@ -78,6 +88,9 @@ __isl_give isl_pw_aff_list *isl_pw_aff_list_set_rational( __isl_take isl_pw_aff_list *list); +int isl_aff_check_match_domain_space(__isl_keep isl_aff *aff, + __isl_keep isl_space *space); + #undef BASE #define BASE aff @@ -102,13 +115,17 @@ void isl_seq_substitute(isl_int *p, int pos, isl_int *subs, int p_len, int subs_len, isl_int v); void isl_seq_preimage(isl_int *dst, isl_int *src, - __isl_keep isl_multi_aff *ma, int n_div_ma, int n_div_bset, + __isl_keep isl_multi_aff *ma, int n_before, int n_after, + int n_div_ma, int n_div_bmap, isl_int f, isl_int c1, isl_int c2, isl_int g, int has_denom); __isl_give isl_pw_multi_aff *isl_pw_multi_aff_substitute( __isl_take isl_pw_multi_aff *pma, enum isl_dim_type type, unsigned pos, __isl_keep isl_pw_aff *subs); +int isl_pw_aff_check_match_domain_space(__isl_keep isl_pw_aff *pa, + __isl_keep isl_space *space); + #undef BASE #define BASE pw_aff diff -Nru isl-0.11.2/isl_affine_hull.c isl-0.12.1/isl_affine_hull.c --- isl-0.11.2/isl_affine_hull.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_affine_hull.c 2013-07-24 11:04:50.000000000 +0000 @@ -1,10 +1,15 @@ /* * Copyright 2008-2009 Katholieke Universiteit Leuven + * Copyright 2010 INRIA Saclay + * Copyright 2012 Ecole Normale Superieure * * Use of this software is governed by the MIT license * * Written by Sven Verdoolaege, K.U.Leuven, Departement * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium + * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, + * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France + * and Ecole Normale Superieure, 45 rue d'Ulm, 75230 Paris, France */ #include @@ -1126,30 +1131,6 @@ isl_basic_map_detect_equalities((isl_basic_map *)bset); } -__isl_give isl_map *isl_map_inline_foreach_basic_map(__isl_take isl_map *map, - __isl_give isl_basic_map *(*fn)(__isl_take isl_basic_map *bmap)) -{ - struct isl_basic_map *bmap; - int i; - - if (!map) - return NULL; - - for (i = 0; i < map->n; ++i) { - bmap = isl_basic_map_copy(map->p[i]); - bmap = fn(bmap); - if (!bmap) - goto error; - isl_basic_map_free(map->p[i]); - map->p[i] = bmap; - } - - return map; -error: - isl_map_free(map); - return NULL; -} - __isl_give isl_map *isl_map_detect_equalities(__isl_take isl_map *map) { return isl_map_inline_foreach_basic_map(map, @@ -1181,14 +1162,205 @@ isl_basic_map_affine_hull((struct isl_basic_map *)bset); } -struct isl_basic_map *isl_map_affine_hull(struct isl_map *map) +/* Given a rational affine matrix "M", add stride constraints to "bmap" + * that ensure that + * + * M(x) + * + * is an integer vector. The variables x include all the variables + * of "bmap" except the unknown divs. + * + * If d is the common denominator of M, then we need to impose that + * + * d M(x) = 0 mod d + * + * or + * + * exists alpha : d M(x) = d alpha + * + * This function is similar to add_strides in isl_morph.c + */ +static __isl_give isl_basic_map *add_strides(__isl_take isl_basic_map *bmap, + __isl_keep isl_mat *M, int n_known) +{ + int i, div, k; + isl_int gcd; + + if (isl_int_is_one(M->row[0][0])) + return bmap; + + bmap = isl_basic_map_extend_space(bmap, isl_space_copy(bmap->dim), + M->n_row - 1, M->n_row - 1, 0); + + isl_int_init(gcd); + for (i = 1; i < M->n_row; ++i) { + isl_seq_gcd(M->row[i], M->n_col, &gcd); + if (isl_int_is_divisible_by(gcd, M->row[0][0])) + continue; + div = isl_basic_map_alloc_div(bmap); + if (div < 0) + goto error; + isl_int_set_si(bmap->div[div][0], 0); + k = isl_basic_map_alloc_equality(bmap); + if (k < 0) + goto error; + isl_seq_cpy(bmap->eq[k], M->row[i], M->n_col); + isl_seq_clr(bmap->eq[k] + M->n_col, bmap->n_div - n_known); + isl_int_set(bmap->eq[k][M->n_col - n_known + div], + M->row[0][0]); + } + isl_int_clear(gcd); + + return bmap; +error: + isl_int_clear(gcd); + isl_basic_map_free(bmap); + return NULL; +} + +/* If there are any equalities that involve (multiple) unknown divs, + * then extract the stride information encoded by those equalities + * and make it explicitly available in "bmap". + * + * We first sort the divs so that the unknown divs appear last and + * then we count how many equalities involve these divs. + * + * Let these equalities be of the form + * + * A(x) + B y = 0 + * + * where y represents the unknown divs and x the remaining variables. + * Let [H 0] be the Hermite Normal Form of B, i.e., + * + * B = [H 0] Q + * + * Then x is a solution of the equalities iff + * + * H^-1 A(x) (= - [I 0] Q y) + * + * is an integer vector. Let d be the common denominator of H^-1. + * We impose + * + * d H^-1 A(x) = d alpha + * + * in add_strides, with alpha fresh existentially quantified variables. + */ +static __isl_give isl_basic_map *isl_basic_map_make_strides_explicit( + __isl_take isl_basic_map *bmap) +{ + int known; + int n_known; + int n, n_col; + int total; + isl_ctx *ctx; + isl_mat *A, *B, *M; + + known = isl_basic_map_divs_known(bmap); + if (known < 0) + return isl_basic_map_free(bmap); + if (known) + return bmap; + bmap = isl_basic_map_sort_divs(bmap); + bmap = isl_basic_map_gauss(bmap, NULL); + if (!bmap) + return NULL; + + for (n_known = 0; n_known < bmap->n_div; ++n_known) + if (isl_int_is_zero(bmap->div[n_known][0])) + break; + ctx = isl_basic_map_get_ctx(bmap); + total = isl_space_dim(bmap->dim, isl_dim_all); + for (n = 0; n < bmap->n_eq; ++n) + if (isl_seq_first_non_zero(bmap->eq[n] + 1 + total + n_known, + bmap->n_div - n_known) == -1) + break; + if (n == 0) + return bmap; + B = isl_mat_sub_alloc6(ctx, bmap->eq, 0, n, 0, 1 + total + n_known); + n_col = bmap->n_div - n_known; + A = isl_mat_sub_alloc6(ctx, bmap->eq, 0, n, 1 + total + n_known, n_col); + A = isl_mat_left_hermite(A, 0, NULL, NULL); + A = isl_mat_drop_cols(A, n, n_col - n); + A = isl_mat_lin_to_aff(A); + A = isl_mat_right_inverse(A); + B = isl_mat_insert_zero_rows(B, 0, 1); + B = isl_mat_set_element_si(B, 0, 0, 1); + M = isl_mat_product(A, B); + if (!M) + return isl_basic_map_free(bmap); + bmap = add_strides(bmap, M, n_known); + bmap = isl_basic_map_gauss(bmap, NULL); + isl_mat_free(M); + + return bmap; +} + +/* Compute the affine hull of each basic map in "map" separately + * and make all stride information explicit so that we can remove + * all unknown divs without losing this information. + * The result is also guaranteed to be gaussed. + * + * In simple cases where a div is determined by an equality, + * calling isl_basic_map_gauss is enough to make the stride information + * explicit, as it will derive an explicit representation for the div + * from the equality. If, however, the stride information + * is encoded through multiple unknown divs then we need to make + * some extra effort in isl_basic_map_make_strides_explicit. + */ +static __isl_give isl_map *isl_map_local_affine_hull(__isl_take isl_map *map) { int i; + + map = isl_map_cow(map); + if (!map) + return NULL; + + for (i = 0; i < map->n; ++i) { + map->p[i] = isl_basic_map_affine_hull(map->p[i]); + map->p[i] = isl_basic_map_gauss(map->p[i], NULL); + map->p[i] = isl_basic_map_make_strides_explicit(map->p[i]); + if (!map->p[i]) + return isl_map_free(map); + } + + return map; +} + +static __isl_give isl_set *isl_set_local_affine_hull(__isl_take isl_set *set) +{ + return isl_map_local_affine_hull(set); +} + +/* Compute the affine hull of "map". + * + * We first compute the affine hull of each basic map separately. + * Then we align the divs and recompute the affine hulls of the basic + * maps since some of them may now have extra divs. + * In order to avoid performing parametric integer programming to + * compute explicit expressions for the divs, possible leading to + * an explosion in the number of basic maps, we first drop all unknown + * divs before aligning the divs. Note that isl_map_local_affine_hull tries + * to make sure that all stride information is explicitly available + * in terms of known divs. This involves calling isl_basic_set_gauss, + * which is also needed because affine_hull assumes its input has been gaussed, + * while isl_map_affine_hull may be called on input that has not been gaussed, + * in particular from initial_facet_constraint. + * Similarly, align_divs may reorder some divs so that we need to + * gauss the result again. + * Finally, we combine the individual affine hulls into a single + * affine hull. + */ +__isl_give isl_basic_map *isl_map_affine_hull(__isl_take isl_map *map) +{ struct isl_basic_map *model = NULL; struct isl_basic_map *hull = NULL; struct isl_set *set; + isl_basic_set *bset; map = isl_map_detect_equalities(map); + map = isl_map_local_affine_hull(map); + map = isl_map_remove_empty_parts(map); + map = isl_map_remove_unknown_divs(map); map = isl_map_align_divs(map); if (!map) @@ -1203,30 +1375,15 @@ model = isl_basic_map_copy(map->p[0]); set = isl_map_underlying_set(map); set = isl_set_cow(set); + set = isl_set_local_affine_hull(set); if (!set) goto error; - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_cow(set->p[i]); - set->p[i] = isl_basic_set_affine_hull(set->p[i]); - set->p[i] = isl_basic_set_gauss(set->p[i], NULL); - if (!set->p[i]) - goto error; - } - set = isl_set_remove_empty_parts(set); - if (set->n == 0) { - hull = isl_basic_map_empty_like(model); - isl_basic_map_free(model); - } else { - struct isl_basic_set *bset; - while (set->n > 1) { - set->p[0] = affine_hull(set->p[0], set->p[--set->n]); - if (!set->p[0]) - goto error; - } - bset = isl_basic_set_copy(set->p[0]); - hull = isl_basic_map_overlying_set(bset, model); - } + while (set->n > 1) + set->p[0] = affine_hull(set->p[0], set->p[--set->n]); + + bset = isl_basic_set_copy(set->p[0]); + hull = isl_basic_map_overlying_set(bset, model); isl_set_free(set); hull = isl_basic_map_simplify(hull); return isl_basic_map_finalize(hull); diff -Nru isl-0.11.2/isl_arg.c isl-0.12.1/isl_arg.c --- isl-0.11.2/isl_arg.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_arg.c 2013-07-01 13:12:40.000000000 +0000 @@ -130,6 +130,17 @@ } } +static void free_args(struct isl_arg *arg, void *opt); + +static void free_child(struct isl_arg *arg, void *opt) +{ + if (arg->offset == (size_t) -1) + free_args(arg->u.child.child->args, opt); + else + isl_args_free(arg->u.child.child, + *(void **)(((char *)opt) + arg->offset)); +} + static void free_str_list(struct isl_arg *arg, void *opt) { int i; @@ -141,6 +152,12 @@ free(list); } +static void free_user(struct isl_arg *arg, void *opt) +{ + if (arg->u.user.clear) + arg->u.user.clear(((char *)opt) + arg->offset); +} + static void free_args(struct isl_arg *arg, void *opt) { int i; @@ -148,11 +165,7 @@ for (i = 0; arg[i].type != isl_arg_end; ++i) { switch (arg[i].type) { case isl_arg_child: - if (arg[i].offset == (size_t) -1) - free_args(arg[i].u.child.child->args, opt); - else - isl_args_free(arg[i].u.child.child, - *(void **)(((char *)opt) + arg[i].offset)); + free_child(&arg[i], opt); break; case isl_arg_arg: case isl_arg_str: @@ -162,8 +175,7 @@ free_str_list(&arg[i], opt); break; case isl_arg_user: - if (arg[i].u.user.clear) - arg[i].u.user.clear(((char *)opt) + arg[i].offset); + free_user(&arg[i], opt); break; case isl_arg_alias: case isl_arg_bool: @@ -714,10 +726,9 @@ if (!has_argument && (!arg[1] || arg[1][0] == '-')) { unsigned u = decl->u.choice.default_selected; + *(unsigned *)(((char *)opt) + decl->offset) = u; if (decl->u.choice.set) decl->u.choice.set(opt, u); - else - *(unsigned *)(((char *)opt) + decl->offset) = u; return 1; } @@ -732,10 +743,9 @@ continue; u = decl->u.choice.choice[i].value; + *(unsigned *)(((char *)opt) + decl->offset) = u; if (decl->u.choice.set) decl->u.choice.set(opt, u); - else - *(unsigned *)(((char *)opt) + decl->offset) = u; return has_argument ? 1 : 2; } @@ -805,17 +815,17 @@ char *endptr; int val = strtol(arg[1], &endptr, 0); if (*endptr == '\0' && (val == 0 || val == 1)) { + if (decl->offset != (size_t) -1) + *p = val; if (decl->u.b.set) decl->u.b.set(opt, val); - else if (decl->offset != (size_t) -1) - *p = val; return 2; } } + if (decl->offset != (size_t) -1) + *p = 1; if (decl->u.b.set) decl->u.b.set(opt, 1); - else if (decl->offset != (size_t) -1) - *p = 1; return 1; } @@ -848,10 +858,10 @@ } if (match_long_name(decl, name, name + strlen(name))) { + if (decl->offset != (size_t) -1) + *p = 0; if (decl->u.b.set) decl->u.b.set(opt, 0); - else if (decl->offset != (size_t) -1) - *p = 0; return 1; } @@ -965,29 +975,26 @@ if (has_argument) { long l = strtol(val, NULL, 0); + *p = l; if (decl->u.l.set) decl->u.l.set(opt, l); - else - *p = l; return 1; } if (arg[1]) { long l = strtol(arg[1], &endptr, 0); if (*endptr == '\0') { + *p = l; if (decl->u.l.set) decl->u.l.set(opt, l); - else - *p = l; return 2; } } if (decl->u.l.default_value != decl->u.l.default_selected) { + *p = decl->u.l.default_selected; if (decl->u.l.set) decl->u.l.set(opt, decl->u.l.default_selected); - else - *p = decl->u.l.default_selected; return 1; } @@ -1144,21 +1151,17 @@ return -1; } -/* Unless ISL_ARG_SKIP_HELP is set, check if any of the arguments is +/* Unless ISL_ARG_SKIP_HELP is set, check if "arg" is * equal to "--help" and if so call print_help_and_exit. */ -static void check_help(struct isl_args *args, int argc, char **argv, void *opt, +static void check_help(struct isl_args *args, char *arg, char *prog, void *opt, unsigned flags) { - int i; - if (ISL_FL_ISSET(flags, ISL_ARG_SKIP_HELP)) return; - for (i = 1; i < argc; ++i) { - if (strcmp(argv[i], "--help") == 0) - print_help_and_exit(args->args, argv[0], opt); - } + if (strcmp(arg, "--help") == 0) + print_help_and_exit(args->args, prog, opt); } int isl_args_parse(struct isl_args *args, int argc, char **argv, void *opt, @@ -1171,8 +1174,6 @@ n = n_arg(args->args); - check_help(args, argc, argv, opt, flags); - for (i = 1; i < argc; ++i) { if ((strcmp(argv[i], "--version") == 0 || strcmp(argv[i], "-V") == 0) && any_version(args->args)) @@ -1198,6 +1199,7 @@ ++skip; continue; } + check_help(args, argv[1 + skip], argv[0], opt, flags); parsed = parse_option(args->args, &argv[1 + skip], NULL, opt); if (parsed) argc = drop_argument(argc, argv, 1 + skip, parsed); diff -Nru isl-0.11.2/isl_ast.c isl-0.12.1/isl_ast.c --- isl-0.11.2/isl_ast.c 2013-04-09 10:40:03.000000000 +0000 +++ isl-0.12.1/isl_ast.c 2013-07-24 11:04:50.000000000 +0000 @@ -1,5 +1,5 @@ #include -#include +#include #undef BASE #define BASE ast_expr @@ -154,7 +154,7 @@ ctx = isl_ast_expr_get_ctx(expr); switch (expr->type) { case isl_ast_expr_int: - dup = isl_ast_expr_alloc_int(ctx, expr->u.i); + dup = isl_ast_expr_from_val(isl_val_copy(expr->u.v)); break; case isl_ast_expr_id: dup = isl_ast_expr_from_id(isl_id_copy(expr->u.id)); @@ -203,7 +203,7 @@ switch (expr->type) { case isl_ast_expr_int: - isl_int_clear(expr->u.i); + isl_val_free(expr->u.v); break; case isl_ast_expr_id: isl_id_free(expr->u.id); @@ -238,8 +238,19 @@ if (expr->type != isl_ast_expr_int) isl_die(isl_ast_expr_get_ctx(expr), isl_error_invalid, "expression not an int", return -1); - isl_int_set(*v, expr->u.i); - return 0; + return isl_val_get_num_isl_int(expr->u.v, v); +} + +/* Return the integer value represented by "expr". + */ +__isl_give isl_val *isl_ast_expr_get_val(__isl_keep isl_ast_expr *expr) +{ + if (!expr) + return NULL; + if (expr->type != isl_ast_expr_int) + isl_die(isl_ast_expr_get_ctx(expr), isl_error_invalid, + "expression not an int", return NULL); + return isl_val_copy(expr->u.v); } __isl_give isl_id *isl_ast_expr_get_id(__isl_keep isl_ast_expr *expr) @@ -332,7 +343,7 @@ expr->u.op.n_arg = n_arg; expr->u.op.args = isl_calloc_array(ctx, isl_ast_expr *, n_arg); - if (!expr->u.op.args) + if (n_arg && !expr->u.op.args) return isl_ast_expr_free(expr); return expr; @@ -376,30 +387,36 @@ isl_ctx_ref(ctx); expr->ref = 1; expr->type = isl_ast_expr_int; - - isl_int_init(expr->u.i); - isl_int_set_si(expr->u.i, i); + expr->u.v = isl_val_int_from_si(ctx, i); + if (!expr->u.v) + return isl_ast_expr_free(expr); return expr; } -/* Create a new integer expression representing "i". +/* Create a new integer expression representing "v". */ -__isl_give isl_ast_expr *isl_ast_expr_alloc_int(isl_ctx *ctx, isl_int i) +__isl_give isl_ast_expr *isl_ast_expr_from_val(__isl_take isl_val *v) { + isl_ctx *ctx; isl_ast_expr *expr; + if (!v) + return NULL; + if (!isl_val_is_int(v)) + isl_die(isl_val_get_ctx(v), isl_error_invalid, + "expecting integer value", return isl_val_free(v)); + + ctx = isl_val_get_ctx(v); expr = isl_calloc_type(ctx, isl_ast_expr); if (!expr) - return NULL; + return isl_val_free(v); expr->ctx = ctx; isl_ctx_ref(ctx); expr->ref = 1; expr->type = isl_ast_expr_int; - - isl_int_init(expr->u.i); - isl_int_set(expr->u.i, i); + expr->u.v = v; return expr; } @@ -1232,7 +1249,7 @@ p = isl_printer_print_str(p, isl_id_get_name(expr->u.id)); break; case isl_ast_expr_int: - p = isl_printer_print_isl_int(p, expr->u.i); + p = isl_printer_print_val(p, expr->u.v); break; case isl_ast_expr_error: break; diff -Nru isl-0.11.2/isl_ast_build.c isl-0.12.1/isl_ast_build.c --- isl-0.11.2/isl_ast_build.c 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/isl_ast_build.c 2013-07-24 10:34:06.000000000 +0000 @@ -733,9 +733,11 @@ set = isl_set_compute_divs(set); build->pending = isl_set_intersect(build->pending, isl_set_copy(set)); - if (isl_ast_build_has_stride(build, build->depth)) + if (isl_ast_build_has_stride(build, build->depth)) { build->domain = isl_set_eliminate(build->domain, isl_dim_set, build->depth, 1); + build->domain = isl_set_compute_divs(build->domain); + } } else { isl_basic_set *generated, *pending; @@ -1015,24 +1017,69 @@ /* Set the stride and offset of the current dimension to the given * value and expression. + * + * If we had already found a stride before, then the two strides + * are combined into a single stride. + * + * In particular, if the new stride information is of the form + * + * i = f + s (...) + * + * and the old stride information is of the form + * + * i = f2 + s2 (...) + * + * then we compute the extended gcd of s and s2 + * + * a s + b s2 = g, + * + * with g = gcd(s,s2), multiply the first equation with t1 = b s2/g + * and the second with t2 = a s1/g. + * This results in + * + * i = (b s2 + a s1)/g i = t1 f + t2 f2 + (s s2)/g (...) + * + * so that t1 f + t2 f2 is the combined offset and (s s2)/g = lcm(s,s2) + * is the combined stride. */ static __isl_give isl_ast_build *set_stride(__isl_take isl_ast_build *build, - isl_int stride, __isl_take isl_aff *offset) + __isl_take isl_val *stride, __isl_take isl_aff *offset) { int pos; build = isl_ast_build_cow(build); - if (!build || !offset) + if (!build || !stride || !offset) goto error; pos = build->depth; - build->strides = isl_vec_set_element(build->strides, pos, stride); + + if (isl_ast_build_has_stride(build, pos)) { + isl_val *stride2, *a, *b, *g; + isl_aff *offset2; + + stride2 = isl_vec_get_element_val(build->strides, pos); + g = isl_val_gcdext(isl_val_copy(stride), isl_val_copy(stride2), + &a, &b); + a = isl_val_mul(a, isl_val_copy(stride)); + a = isl_val_div(a, isl_val_copy(g)); + stride2 = isl_val_div(stride2, g); + b = isl_val_mul(b, isl_val_copy(stride2)); + stride = isl_val_mul(stride, stride2); + + offset2 = isl_multi_aff_get_aff(build->offsets, pos); + offset2 = isl_aff_scale_val(offset2, a); + offset = isl_aff_scale_val(offset, b); + offset = isl_aff_add(offset, offset2); + } + + build->strides = isl_vec_set_element_val(build->strides, pos, stride); build->offsets = isl_multi_aff_set_aff(build->offsets, pos, offset); if (!build->strides || !build->offsets) return isl_ast_build_free(build); return build; error: + isl_val_free(stride); isl_aff_free(offset); return isl_ast_build_free(build); } @@ -1053,7 +1100,7 @@ { isl_aff *aff; isl_set *set; - isl_int stride; + isl_val *stride; int pos; if (!build) @@ -1064,16 +1111,12 @@ if (!isl_ast_build_has_stride(build, pos)) return isl_set_universe(isl_ast_build_get_space(build, 1)); - isl_int_init(stride); - - isl_ast_build_get_stride(build, pos, &stride); + stride = isl_ast_build_get_stride(build, pos); aff = isl_ast_build_get_offset(build, pos); aff = isl_aff_add_coefficient_si(aff, isl_dim_in, pos, -1); - aff = isl_aff_mod(aff, stride); + aff = isl_aff_mod_val(aff, stride); set = isl_set_from_basic_set(isl_aff_zero_basic_set(aff)); - isl_int_clear(stride); - return set; } @@ -1095,7 +1138,7 @@ isl_multi_aff *ma; int pos; isl_aff *aff, *offset; - isl_int stride; + isl_val *stride; if (!build) return NULL; @@ -1108,14 +1151,12 @@ if (!isl_ast_build_has_stride(build, pos)) return ma; - isl_int_init(stride); offset = isl_ast_build_get_offset(build, pos); - isl_ast_build_get_stride(build, pos, &stride); + stride = isl_ast_build_get_stride(build, pos); aff = isl_multi_aff_get_aff(ma, pos); - aff = isl_aff_scale(aff, stride); + aff = isl_aff_scale_val(aff, stride); aff = isl_aff_add(aff, offset); ma = isl_multi_aff_set_aff(ma, pos, aff); - isl_int_clear(stride); return ma; } @@ -1146,51 +1187,6 @@ return build; } -/* Compute x, y and g such that g = gcd(a,b) and a*x+b*y = g */ -static void euclid(isl_int a, isl_int b, isl_int *x, isl_int *y, isl_int *g) -{ - isl_int c, d, e, f, tmp; - - isl_int_init(c); - isl_int_init(d); - isl_int_init(e); - isl_int_init(f); - isl_int_init(tmp); - isl_int_abs(c, a); - isl_int_abs(d, b); - isl_int_set_si(e, 1); - isl_int_set_si(f, 0); - while (isl_int_is_pos(d)) { - isl_int_tdiv_q(tmp, c, d); - isl_int_mul(tmp, tmp, f); - isl_int_sub(e, e, tmp); - isl_int_tdiv_q(tmp, c, d); - isl_int_mul(tmp, tmp, d); - isl_int_sub(c, c, tmp); - isl_int_swap(c, d); - isl_int_swap(e, f); - } - isl_int_set(*g, c); - if (isl_int_is_zero(a)) - isl_int_set_si(*x, 0); - else if (isl_int_is_pos(a)) - isl_int_set(*x, e); - else - isl_int_neg(*x, e); - if (isl_int_is_zero(b)) - isl_int_set_si(*y, 0); - else { - isl_int_mul(tmp, a, *x); - isl_int_sub(tmp, c, tmp); - isl_int_divexact(*y, tmp, b); - } - isl_int_clear(c); - isl_int_clear(d); - isl_int_clear(e); - isl_int_clear(f); - isl_int_clear(tmp); -} - /* Information used inside detect_stride. * * "build" may be updated by detect_stride to include stride information. @@ -1240,7 +1236,8 @@ { struct isl_detect_stride_data *data = user; int i, n_div; - isl_int v, gcd, stride, a, b, m; + isl_ctx *ctx; + isl_val *v, *stride, *m; if (!isl_constraint_is_equality(c) || !isl_constraint_involves_dims(c, isl_dim_set, data->pos, 1)) { @@ -1248,48 +1245,42 @@ return 0; } - isl_int_init(a); - isl_int_init(b); - isl_int_init(v); - isl_int_init(m); - isl_int_init(gcd); - isl_int_init(stride); - - isl_int_set_si(gcd, 0); + ctx = isl_constraint_get_ctx(c); + stride = isl_val_zero(ctx); n_div = isl_constraint_dim(c, isl_dim_div); for (i = 0; i < n_div; ++i) { - isl_constraint_get_coefficient(c, isl_dim_div, i, &v); - isl_int_gcd(gcd, gcd, v); + v = isl_constraint_get_coefficient_val(c, isl_dim_div, i); + v = isl_val_gcd(stride, v); } - isl_constraint_get_coefficient(c, isl_dim_set, data->pos, &v); - isl_int_gcd(m, v, gcd); - isl_int_divexact(stride, gcd, m); - isl_int_divexact(v, v, m); + v = isl_constraint_get_coefficient_val(c, isl_dim_set, data->pos); + m = isl_val_gcd(isl_val_copy(stride), isl_val_copy(v)); + stride = isl_val_div(stride, isl_val_copy(m)); + v = isl_val_div(v, isl_val_copy(m)); - if (!isl_int_is_zero(stride) && !isl_int_is_one(stride)) { + if (!isl_val_is_zero(stride) && !isl_val_is_one(stride)) { isl_aff *aff; + isl_val *gcd, *a, *b; - euclid(v, stride, &a, &b, &gcd); + gcd = isl_val_gcdext(v, isl_val_copy(stride), &a, &b); + isl_val_free(gcd); + isl_val_free(b); aff = isl_constraint_get_aff(c); for (i = 0; i < n_div; ++i) aff = isl_aff_set_coefficient_si(aff, isl_dim_div, i, 0); aff = isl_aff_set_coefficient_si(aff, isl_dim_in, data->pos, 0); - isl_int_neg(a, a); - aff = isl_aff_scale(aff, a); - aff = isl_aff_scale_down(aff, m); + a = isl_val_neg(a); + aff = isl_aff_scale_val(aff, a); + aff = isl_aff_scale_down_val(aff, m); data->build = set_stride(data->build, stride, aff); + } else { + isl_val_free(stride); + isl_val_free(m); + isl_val_free(v); } - isl_int_clear(stride); - isl_int_clear(gcd); - isl_int_clear(m); - isl_int_clear(v); - isl_int_clear(b); - isl_int_clear(a); - isl_constraint_free(c); return 0; } @@ -1529,28 +1520,25 @@ * We therefore only need to update stride, offset and the options. */ __isl_give isl_ast_build *isl_ast_build_scale_down( - __isl_take isl_ast_build *build, isl_int m, + __isl_take isl_ast_build *build, __isl_take isl_val *m, __isl_take isl_union_map *umap) { isl_aff *aff; - isl_int v; + isl_val *v; int depth; build = isl_ast_build_cow(build); - if (!build || !umap) + if (!build || !umap || !m) goto error; depth = build->depth; - isl_int_init(v); - if (isl_vec_get_element(build->strides, depth, &v) < 0) - build->strides = isl_vec_free(build->strides); - isl_int_divexact(v, v, m); - build->strides = isl_vec_set_element(build->strides, depth, v); - isl_int_clear(v); + v = isl_vec_get_element_val(build->strides, depth); + v = isl_val_div(v, isl_val_copy(m)); + build->strides = isl_vec_set_element_val(build->strides, depth, v); aff = isl_multi_aff_get_aff(build->offsets, depth); - aff = isl_aff_scale_down(aff, m); + aff = isl_aff_scale_down_val(aff, m); build->offsets = isl_multi_aff_set_aff(build->offsets, depth, aff); build->options = isl_union_map_apply_domain(build->options, umap); if (!build->strides || !build->offsets || !build->options) @@ -1558,6 +1546,7 @@ return build; error: + isl_val_free(m); isl_union_map_free(umap); return isl_ast_build_free(build); } @@ -1730,16 +1719,17 @@ */ int isl_ast_build_has_stride(__isl_keep isl_ast_build *build, int pos) { - isl_int v; + isl_val *v; int has_stride; if (!build) return -1; - isl_int_init(v); - isl_vec_get_element(build->strides, pos, &v); - has_stride = !isl_int_is_one(v); - isl_int_clear(v); + v = isl_vec_get_element_val(build->strides, pos); + if (!v) + return -1; + has_stride = !isl_val_is_one(v); + isl_val_free(v); return has_stride; } @@ -1750,15 +1740,13 @@ * * with a an integer, return s through *stride. */ -int isl_ast_build_get_stride(__isl_keep isl_ast_build *build, int pos, - isl_int *stride) +__isl_give isl_val *isl_ast_build_get_stride(__isl_keep isl_ast_build *build, + int pos) { if (!build) - return -1; - - isl_vec_get_element(build->strides, pos, stride); + return NULL; - return 0; + return isl_vec_get_element_val(build->strides, pos); } /* Given that the dimension at position "pos" takes on values @@ -1804,6 +1792,26 @@ return !involves; } +/* Plug in the known values (fixed affine expressions in terms of + * parameters and outer loop iterators) of all loop iterators + * in the domain of "umap". + * + * We simply precompose "umap" with build->values. + */ +__isl_give isl_union_map *isl_ast_build_substitute_values_union_map_domain( + __isl_keep isl_ast_build *build, __isl_take isl_union_map *umap) +{ + isl_multi_aff *values; + + if (!build) + return isl_union_map_free(umap); + + values = isl_multi_aff_copy(build->values); + umap = isl_union_map_preimage_domain_multi_aff(umap, values); + + return umap; +} + /* Is the current dimension known to attain only a single value? */ int isl_ast_build_has_value(__isl_keep isl_ast_build *build) @@ -1906,7 +1914,8 @@ if (!build) goto error; - pa = isl_pw_aff_pullback_multi_aff(pa, + if (!isl_set_is_params(build->domain)) + pa = isl_pw_aff_pullback_multi_aff(pa, isl_multi_aff_copy(build->values)); pa = isl_pw_aff_gist(pa, isl_set_copy(build->domain)); diff -Nru isl-0.11.2/isl_ast_build_expr.c isl-0.12.1/isl_ast_build_expr.c --- isl-0.11.2/isl_ast_build_expr.c 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/isl_ast_build_expr.c 2013-07-24 11:04:50.000000000 +0000 @@ -12,30 +12,6 @@ #include #include -/* Compute the minimum of the integer affine expression "obj" over the points - * in build->domain and put the result in *opt. - */ -enum isl_lp_result isl_ast_build_min(__isl_keep isl_ast_build *build, - __isl_keep isl_aff *obj, isl_int *opt) -{ - if (!build) - return isl_lp_error; - - return isl_set_min(build->domain, obj, opt); -} - -/* Compute the maximum of the integer affine expression "obj" over the points - * in build->domain and put the result in *opt. - */ -enum isl_lp_result isl_ast_build_max(__isl_keep isl_ast_build *build, - __isl_keep isl_aff *obj, isl_int *opt) -{ - if (!build) - return isl_lp_error; - - return isl_set_max(build->domain, obj, opt); -} - /* Compute the "opposite" of the (numerator of the) argument of a div * with denonimator "d". * @@ -43,10 +19,11 @@ * * -aff + (d - 1) */ -static __isl_give isl_aff *oppose_div_arg(__isl_take isl_aff *aff, isl_int d) +static __isl_give isl_aff *oppose_div_arg(__isl_take isl_aff *aff, + __isl_take isl_val *d) { aff = isl_aff_neg(aff); - aff = isl_aff_add_constant(aff, d); + aff = isl_aff_add_constant_val(aff, d); aff = isl_aff_add_constant_si(aff, -1); return aff; @@ -55,8 +32,8 @@ /* Create an isl_ast_expr evaluating the div at position "pos" in "ls". * The result is simplified in terms of build->domain. * - * "v" points to the coefficient of the div in the expression where it - * appears and may be updated by this function. + * *change_sign is set by this function if the sign of + * the expression has changed. * "ls" is known to be non-NULL. * * Let the div be of the form floor(e/d). @@ -77,30 +54,30 @@ * * and still use pdiv_q. */ -static __isl_give isl_ast_expr *var_div(isl_int *v, +static __isl_give isl_ast_expr *var_div(int *change_sign, __isl_keep isl_local_space *ls, int pos, __isl_keep isl_ast_build *build) { isl_ctx *ctx = isl_local_space_get_ctx(ls); isl_aff *aff; isl_ast_expr *num, *den; - isl_int d; + isl_val *d; enum isl_ast_op_type type; aff = isl_local_space_get_div(ls, pos); - isl_int_init(d); - isl_aff_get_denominator(aff, &d); - aff = isl_aff_scale(aff, d); - den = isl_ast_expr_alloc_int(ctx, d); + d = isl_aff_get_denominator_val(aff); + aff = isl_aff_scale_val(aff, isl_val_copy(d)); + den = isl_ast_expr_from_val(isl_val_copy(d)); type = isl_ast_op_fdiv_q; if (isl_options_get_ast_build_prefer_pdiv(ctx)) { int non_neg = isl_ast_build_aff_is_nonneg(build, aff); if (non_neg >= 0 && !non_neg) { - isl_aff *opp = oppose_div_arg(isl_aff_copy(aff), d); + isl_aff *opp = oppose_div_arg(isl_aff_copy(aff), + isl_val_copy(d)); non_neg = isl_ast_build_aff_is_nonneg(build, opp); if (non_neg >= 0 && non_neg) { - isl_int_neg(*v, *v); + *change_sign = 1; isl_aff_free(aff); aff = opp; } else @@ -112,7 +89,7 @@ type = isl_ast_op_pdiv_q; } - isl_int_clear(d); + isl_val_free(d); num = isl_ast_expr_from_aff(aff, build); return isl_ast_expr_alloc_binary(type, num, den); } @@ -120,22 +97,23 @@ /* Create an isl_ast_expr evaluating the specified dimension of "ls". * The result is simplified in terms of build->domain. * - * "v" points to the coefficient of the specified dimension - * in the expression where it appears and may be updated by this function. + * *change_sign is set by this function if the sign of + * the expression has changed. * * The isl_ast_expr is constructed based on the type of the dimension. * - divs are constructed by var_div * - set variables are constructed from the iterator isl_ids in "build" * - parameters are constructed from the isl_ids in "ls" */ -static __isl_give isl_ast_expr *var(isl_int *v, __isl_keep isl_local_space *ls, +static __isl_give isl_ast_expr *var(int *change_sign, + __isl_keep isl_local_space *ls, enum isl_dim_type type, int pos, __isl_keep isl_ast_build *build) { isl_ctx *ctx = isl_local_space_get_ctx(ls); isl_id *id; if (type == isl_dim_div) - return var_div(v, ls, pos, build); + return var_div(change_sign, ls, pos, build); if (type == isl_dim_set) { id = isl_ast_build_get_iterator_id(build, pos); @@ -157,7 +135,7 @@ return -1; if (expr->type != isl_ast_expr_int) return 0; - return isl_int_is_zero(expr->u.i); + return isl_val_is_zero(expr->u.v); } /* Create an expression representing the sum of "expr1" and "expr2", @@ -227,8 +205,9 @@ * v is assumed to be non-negative. * The result is simplified in terms of build->domain. */ -static __isl_give isl_ast_expr *isl_ast_expr_mod(isl_int v, - __isl_keep isl_aff *aff, isl_int d, __isl_keep isl_ast_build *build) +static __isl_give isl_ast_expr *isl_ast_expr_mod(__isl_keep isl_val *v, + __isl_keep isl_aff *aff, __isl_keep isl_val *d, + __isl_keep isl_ast_build *build) { isl_ctx *ctx; isl_ast_expr *expr; @@ -240,11 +219,11 @@ ctx = isl_aff_get_ctx(aff); expr = isl_ast_expr_from_aff(isl_aff_copy(aff), build); - c = isl_ast_expr_alloc_int(ctx, d); + c = isl_ast_expr_from_val(isl_val_copy(d)); expr = isl_ast_expr_alloc_binary(isl_ast_op_pdiv_r, expr, c); - if (!isl_int_is_one(v)) { - c = isl_ast_expr_alloc_int(ctx, v); + if (!isl_val_is_one(v)) { + c = isl_ast_expr_from_val(isl_val_copy(v)); expr = isl_ast_expr_mul(c, expr); } @@ -262,25 +241,31 @@ * * (isl_ast_op_mul, expr(v), expr) */ -static __isl_give isl_ast_expr *scale(__isl_take isl_ast_expr *expr, isl_int v) +static __isl_give isl_ast_expr *scale(__isl_take isl_ast_expr *expr, + __isl_take isl_val *v) { - isl_ctx *ctx; isl_ast_expr *c; - if (!expr) - return NULL; - if (isl_int_is_one(v)) + if (!expr || !v) + goto error; + if (isl_val_is_one(v)) { + isl_val_free(v); return expr; + } - if (isl_int_is_negone(v)) { + if (isl_val_is_negone(v)) { + isl_val_free(v); expr = isl_ast_expr_neg(expr); } else { - ctx = isl_ast_expr_get_ctx(expr); - c = isl_ast_expr_alloc_int(ctx, v); + c = isl_ast_expr_from_val(v); expr = isl_ast_expr_mul(c, expr); } return expr; +error: + isl_val_free(v); + isl_ast_expr_free(expr); + return NULL; } /* Add an expression for "*v" times the specified dimension of "ls" @@ -306,21 +291,25 @@ static __isl_give isl_ast_expr *isl_ast_expr_add_term( __isl_take isl_ast_expr *expr, __isl_keep isl_local_space *ls, enum isl_dim_type type, int pos, - isl_int *v, __isl_keep isl_ast_build *build) + __isl_take isl_val *v, __isl_keep isl_ast_build *build) { isl_ast_expr *term; + int change_sign; if (!expr) return NULL; - term = var(v, ls, type, pos, build); - - if (isl_int_is_neg(*v) && !ast_expr_is_zero(expr)) { - isl_int_neg(*v, *v); - term = scale(term, *v); + change_sign = 0; + term = var(&change_sign, ls, type, pos, build); + if (change_sign) + v = isl_val_neg(v); + + if (isl_val_is_neg(v) && !ast_expr_is_zero(expr)) { + v = isl_val_neg(v); + term = scale(term, v); return ast_expr_sub(expr, term); } else { - term = scale(term, *v); + term = scale(term, v); return ast_expr_add(expr, term); } } @@ -328,26 +317,32 @@ /* Add an expression for "v" to expr. */ static __isl_give isl_ast_expr *isl_ast_expr_add_int( - __isl_take isl_ast_expr *expr, isl_int v) + __isl_take isl_ast_expr *expr, __isl_take isl_val *v) { isl_ctx *ctx; isl_ast_expr *expr_int; - if (!expr) - return NULL; + if (!expr || !v) + goto error; - if (isl_int_is_zero(v)) + if (isl_val_is_zero(v)) { + isl_val_free(v); return expr; + } ctx = isl_ast_expr_get_ctx(expr); - if (isl_int_is_neg(v) && !ast_expr_is_zero(expr)) { - isl_int_neg(v, v); - expr_int = isl_ast_expr_alloc_int(ctx, v); + if (isl_val_is_neg(v) && !ast_expr_is_zero(expr)) { + v = isl_val_neg(v); + expr_int = isl_ast_expr_from_val(v); return ast_expr_sub(expr, expr_int); } else { - expr_int = isl_ast_expr_alloc_int(ctx, v); + expr_int = isl_ast_expr_from_val(v); return ast_expr_add(expr, expr_int); } +error: + isl_ast_expr_free(expr); + isl_val_free(v); + return NULL; } /* Check if "aff" involves any (implicit) modulo computations based @@ -384,57 +379,59 @@ */ static __isl_give isl_aff *extract_modulo(__isl_take isl_aff *aff, __isl_keep isl_ast_expr **pos, __isl_keep isl_ast_expr **neg, - __isl_keep isl_ast_build *build, int j, isl_int v) + __isl_keep isl_ast_build *build, int j, __isl_take isl_val *v) { isl_ast_expr *expr; isl_aff *div; int s; int mod; - isl_int d; + isl_val *d; - isl_int_init(d); div = isl_aff_get_div(aff, j); - isl_aff_get_denominator(div, &d); - mod = isl_int_is_divisible_by(v, d); + d = isl_aff_get_denominator_val(div); + mod = isl_val_is_divisible_by(v, d); if (mod) { - div = isl_aff_scale(div, d); + div = isl_aff_scale_val(div, isl_val_copy(d)); mod = isl_ast_build_aff_is_nonneg(build, div); if (mod >= 0 && !mod) { - isl_aff *opp = oppose_div_arg(isl_aff_copy(div), d); + isl_aff *opp = oppose_div_arg(isl_aff_copy(div), + isl_val_copy(d)); mod = isl_ast_build_aff_is_nonneg(build, opp); if (mod >= 0 && mod) { isl_aff_free(div); div = opp; - isl_int_neg(v, v); + v = isl_val_neg(v); } else isl_aff_free(opp); } } if (mod < 0) { isl_aff_free(div); - isl_int_clear(d); + isl_val_free(d); + isl_val_free(v); return isl_aff_free(aff); } else if (!mod) { isl_aff_free(div); - isl_int_clear(d); + isl_val_free(d); + isl_val_free(v); return aff; } - isl_int_divexact(v, v, d); - s = isl_int_sgn(v); - isl_int_abs(v, v); + v = isl_val_div(v, isl_val_copy(d)); + s = isl_val_sgn(v); + v = isl_val_abs(v); expr = isl_ast_expr_mod(v, div, d, build); + isl_val_free(d); if (s > 0) *neg = ast_expr_add(*neg, expr); else *pos = ast_expr_add(*pos, expr); aff = isl_aff_set_coefficient_si(aff, isl_dim_div, j, 0); if (s < 0) - isl_int_neg(v, v); - div = isl_aff_scale(div, v); - isl_aff_get_denominator(aff, &d); - div = isl_aff_scale_down(div, d); + v = isl_val_neg(v); + div = isl_aff_scale_val(div, v); + d = isl_aff_get_denominator_val(aff); + div = isl_aff_scale_down_val(div, d); aff = isl_aff_add(aff, div); - isl_int_clear(d); return aff; } @@ -444,23 +441,23 @@ * to those modulo computations to *pos and/or *neg. * We only do this if the option ast_build_prefer_pdiv is set. * + * "aff" is assumed to be an integer affine expression. + * * A modulo expression is of the form * * a mod m = a - m * floor(a / m) * * To detect them in aff, we look for terms of the form * - * (f * m * floor(a / m)) / d + * f * m * floor(a / m) * * rewrite them as * - * (f * (a - (a mod m))) / d = (f * a) / d - (f * (a mod m)) / d + * f * (a - (a mod m)) = f * a - f * (a mod m) * * and extract out -f * (a mod m). * In particular, if f > 0, we add (f * (a mod m)) to *neg. * If f < 0, we add ((-f) * (a mod m)) to *pos. - * - * The caller is responsible for dividing *neg and/or *pos by d. */ static __isl_give isl_aff *extract_modulos(__isl_take isl_aff *aff, __isl_keep isl_ast_expr **pos, __isl_keep isl_ast_expr **neg, @@ -468,7 +465,6 @@ { isl_ctx *ctx; int j, n; - isl_int v; if (!aff) return NULL; @@ -477,21 +473,23 @@ if (!isl_options_get_ast_build_prefer_pdiv(ctx)) return aff; - isl_int_init(v); - n = isl_aff_dim(aff, isl_dim_div); for (j = 0; j < n; ++j) { - isl_aff_get_coefficient(aff, isl_dim_div, j, &v); - if (isl_int_is_zero(v) || - isl_int_is_one(v) || isl_int_is_negone(v)) + isl_val *v; + + v = isl_aff_get_coefficient_val(aff, isl_dim_div, j); + if (!v) + return isl_aff_free(aff); + if (isl_val_is_zero(v) || + isl_val_is_one(v) || isl_val_is_negone(v)) { + isl_val_free(v); continue; + } aff = extract_modulo(aff, pos, neg, build, j, v); if (!aff) break; } - isl_int_clear(v); - return aff; } @@ -507,8 +505,8 @@ __isl_keep isl_ast_build *build) { int i, j; - isl_int v; int n; + isl_val *v, *d; isl_ctx *ctx = isl_aff_get_ctx(aff); isl_ast_expr *expr, *expr_neg; enum isl_dim_type t[] = { isl_dim_param, isl_dim_in, isl_dim_div }; @@ -521,35 +519,38 @@ expr = isl_ast_expr_alloc_int_si(ctx, 0); expr_neg = isl_ast_expr_alloc_int_si(ctx, 0); + d = isl_aff_get_denominator_val(aff); + aff = isl_aff_scale_val(aff, isl_val_copy(d)); + aff = extract_modulos(aff, &expr, &expr_neg, build); expr = ast_expr_sub(expr, expr_neg); - isl_int_init(v); ls = isl_aff_get_domain_local_space(aff); for (i = 0; i < 3; ++i) { n = isl_aff_dim(aff, t[i]); for (j = 0; j < n; ++j) { - isl_aff_get_coefficient(aff, t[i], j, &v); - if (isl_int_is_zero(v)) + v = isl_aff_get_coefficient_val(aff, t[i], j); + if (!v) + expr = isl_ast_expr_free(expr); + if (isl_val_is_zero(v)) { + isl_val_free(v); continue; + } expr = isl_ast_expr_add_term(expr, - ls, l[i], j, &v, build); + ls, l[i], j, v, build); } } - isl_aff_get_constant(aff, &v); + v = isl_aff_get_constant_val(aff); expr = isl_ast_expr_add_int(expr, v); - isl_aff_get_denominator(aff, &v); - if (!isl_int_is_one(v)) { - isl_ast_expr *d; - d = isl_ast_expr_alloc_int(ctx, v); - expr = isl_ast_expr_div(expr, d); - } + if (!isl_val_is_one(d)) + expr = isl_ast_expr_div(expr, isl_ast_expr_from_val(d)); + else + isl_val_free(d); isl_local_space_free(ls); - isl_int_clear(v); isl_aff_free(aff); return expr; } @@ -562,38 +563,51 @@ __isl_keep isl_aff *aff, int sign, __isl_keep isl_ast_build *build) { int i, j; - isl_int v; + isl_val *v; enum isl_dim_type t[] = { isl_dim_param, isl_dim_in, isl_dim_div }; enum isl_dim_type l[] = { isl_dim_param, isl_dim_set, isl_dim_div }; isl_local_space *ls; - isl_int_init(v); ls = isl_aff_get_domain_local_space(aff); for (i = 0; i < 3; ++i) { int n = isl_aff_dim(aff, t[i]); for (j = 0; j < n; ++j) { - isl_aff_get_coefficient(aff, t[i], j, &v); - if (sign * isl_int_sgn(v) <= 0) + v = isl_aff_get_coefficient_val(aff, t[i], j); + if (sign * isl_val_sgn(v) <= 0) { + isl_val_free(v); continue; - isl_int_abs(v, v); + } + v = isl_val_abs(v); expr = isl_ast_expr_add_term(expr, - ls, l[i], j, &v, build); + ls, l[i], j, v, build); } } - isl_aff_get_constant(aff, &v); - if (sign * isl_int_sgn(v) > 0) { - isl_int_abs(v, v); - expr = isl_ast_expr_add_int(expr, v); - } - isl_local_space_free(ls); - isl_int_clear(v); return expr; } +/* Should the constant term "v" be considered positive? + * + * A positive constant will be added to "pos" by the caller, + * while a negative constant will be added to "neg". + * If either "pos" or "neg" is exactly zero, then we prefer + * to add the constant "v" to that side, irrespective of the sign of "v". + * This results in slightly shorter expressions and may reduce the risk + * of overflows. + */ +static int constant_is_considered_positive(__isl_keep isl_val *v, + __isl_keep isl_ast_expr *pos, __isl_keep isl_ast_expr *neg) +{ + if (ast_expr_is_zero(pos)) + return 1; + if (ast_expr_is_zero(neg)) + return 0; + return isl_val_is_pos(v); +} + /* Construct an isl_ast_expr that evaluates the condition "constraint", * The result is simplified in terms of build->domain. * @@ -613,6 +627,10 @@ * However, if the first expression is an integer constant (and the second * is not), then we swap the two expressions. This ensures that we construct, * e.g., "i <= 5" rather than "5 >= i". + * + * Furthermore, is there are no terms with positive coefficients (or no terms + * with negative coefficients), then the constant term is added to "pos" + * (or "neg"), ignoring the sign of the constant term. */ static __isl_give isl_ast_expr *isl_ast_expr_from_constraint( __isl_take isl_constraint *constraint, __isl_keep isl_ast_build *build) @@ -622,6 +640,7 @@ isl_ast_expr *expr_neg; isl_ast_expr *expr; isl_aff *aff; + isl_val *v; int eq; enum isl_ast_op_type type; @@ -639,6 +658,14 @@ expr_pos = add_signed_terms(expr_pos, aff, 1, build); expr_neg = add_signed_terms(expr_neg, aff, -1, build); + v = isl_aff_get_constant_val(aff); + if (constant_is_considered_positive(v, expr_pos, expr_neg)) { + expr_pos = isl_ast_expr_add_int(expr_pos, v); + } else { + v = isl_val_neg(v); + expr_neg = isl_ast_expr_add_int(expr_neg, v); + } + eq = isl_constraint_is_equality(constraint); if (isl_ast_expr_get_type(expr_pos) == isl_ast_expr_int && diff -Nru isl-0.11.2/isl_ast_build_private.h isl-0.12.1/isl_ast_build_private.h --- isl-0.11.2/isl_ast_build_private.h 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/isl_ast_build_private.h 2013-07-01 13:12:40.000000000 +0000 @@ -174,7 +174,7 @@ __isl_give isl_ast_build *isl_ast_build_insert_dim( __isl_take isl_ast_build *build, int pos); __isl_give isl_ast_build *isl_ast_build_scale_down( - __isl_take isl_ast_build *build, isl_int m, + __isl_take isl_ast_build *build, __isl_take isl_val *m, __isl_take isl_union_map *umap); __isl_give isl_ast_build *isl_ast_build_product( __isl_take isl_ast_build *build, __isl_take isl_space *embedding); @@ -221,14 +221,17 @@ __isl_give isl_pw_multi_aff *isl_ast_build_compute_gist_pw_multi_aff( __isl_keep isl_ast_build *build, __isl_take isl_pw_multi_aff *pma); +__isl_give isl_union_map *isl_ast_build_substitute_values_union_map_domain( + __isl_keep isl_ast_build *build, __isl_take isl_union_map *umap); + int isl_ast_build_aff_is_nonneg(__isl_keep isl_ast_build *build, __isl_keep isl_aff *aff); int isl_ast_build_has_stride(__isl_keep isl_ast_build *build, int pos); __isl_give isl_aff *isl_ast_build_get_offset(__isl_keep isl_ast_build *build, int pos); -int isl_ast_build_get_stride(__isl_keep isl_ast_build *build, int pos, - isl_int *stride); +__isl_give isl_val *isl_ast_build_get_stride(__isl_keep isl_ast_build *build, + int pos); __isl_give isl_set *isl_ast_build_get_stride_constraint( __isl_keep isl_ast_build *build); __isl_give isl_multi_aff *isl_ast_build_get_stride_expansion( diff -Nru isl-0.11.2/isl_ast_codegen.c isl-0.12.1/isl_ast_codegen.c --- isl-0.11.2/isl_ast_codegen.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_ast_codegen.c 2013-07-24 11:02:36.000000000 +0000 @@ -7,6 +7,7 @@ * Ecole Normale Superieure, 45 rue d’Ulm, 75230 Paris, France */ +#include #include #include #include @@ -17,7 +18,6 @@ #include #include #include -#include /* Add the constraint to the list that "user" points to, if it is not * a div constraint. @@ -314,24 +314,17 @@ return graft; } -/* Eliminate the schedule dimension "pos" from "executed" and return - * the result. +/* Plug in all the know values of the current and outer dimensions + * in the domain of "executed". In principle, we only need to plug + * in the known value of the current dimension since the values of + * outer dimensions have been plugged in already. + * However, it turns out to be easier to just plug in all known values. */ -static __isl_give isl_union_map *eliminate(__isl_take isl_union_map *executed, - int pos, __isl_keep isl_ast_build *build) +static __isl_give isl_union_map *plug_in_values( + __isl_take isl_union_map *executed, __isl_keep isl_ast_build *build) { - isl_space *space; - isl_map *elim; - - space = isl_ast_build_get_space(build, 1); - space = isl_space_map_from_set(space); - elim = isl_map_identity(space); - elim = isl_map_eliminate(elim, isl_dim_in, pos, 1); - - executed = isl_union_map_apply_domain(executed, - isl_union_map_from_map(elim)); - - return executed; + return isl_ast_build_substitute_values_union_map_domain(build, + executed); } /* Check if the constraint "c" is a lower bound on dimension "pos", @@ -351,13 +344,12 @@ * to be sorted before the lower bounds on "depth", which in * turn are sorted before the upper bounds on "depth". */ -static int cmp_constraint(const void *a, const void *b, void *user) +static int cmp_constraint(__isl_keep isl_constraint *a, + __isl_keep isl_constraint *b, void *user) { int *depth = user; - isl_constraint * const *c1 = a; - isl_constraint * const *c2 = b; - int t1 = constraint_type(*c1, *depth); - int t2 = constraint_type(*c2, *depth); + int t1 = constraint_type(a, *depth); + int t2 = constraint_type(b, *depth); return t1 - t2; } @@ -392,20 +384,16 @@ if (isl_ast_build_has_stride(build, pos)) { isl_aff *offset; - isl_int stride; - - isl_int_init(stride); + isl_val *stride; offset = isl_ast_build_get_offset(build, pos); - isl_ast_build_get_stride(build, pos, &stride); + stride = isl_ast_build_get_stride(build, pos); aff = isl_aff_sub(aff, isl_aff_copy(offset)); - aff = isl_aff_scale_down(aff, stride); + aff = isl_aff_scale_down_val(aff, isl_val_copy(stride)); aff = isl_aff_ceil(aff); - aff = isl_aff_scale(aff, stride); + aff = isl_aff_scale_val(aff, stride); aff = isl_aff_add(aff, offset); - - isl_int_clear(stride); } aff = isl_ast_build_compute_gist_aff(build, aff); @@ -451,21 +439,23 @@ return pa; } -/* Return a list of "n" lower bounds on dimension "pos" - * extracted from the "n" constraints starting at "constraint". - * If "n" is zero, then we extract a lower bound from "domain" instead. +/* Extract a lower bound on dimension "pos" from each constraint + * in "constraints" and return the list of lower bounds. + * If "constraints" has zero elements, then we extract a lower bound + * from "domain" instead. */ static __isl_give isl_pw_aff_list *lower_bounds( - __isl_keep isl_constraint **constraint, int n, int pos, + __isl_keep isl_constraint_list *constraints, int pos, __isl_keep isl_set *domain, __isl_keep isl_ast_build *build) { isl_ctx *ctx; isl_pw_aff_list *list; - int i; + int i, n; if (!build) return NULL; + n = isl_constraint_list_n_constraint(constraints); if (n == 0) { isl_pw_aff *pa; pa = exact_bound(domain, build, 0); @@ -477,26 +467,31 @@ for (i = 0; i < n; ++i) { isl_aff *aff; + isl_constraint *c; - aff = lower_bound(constraint[i], pos, build); + c = isl_constraint_list_get_constraint(constraints, i); + aff = lower_bound(c, pos, build); + isl_constraint_free(c); list = isl_pw_aff_list_add(list, isl_pw_aff_from_aff(aff)); } return list; } -/* Return a list of "n" upper bounds on dimension "pos" - * extracted from the "n" constraints starting at "constraint". - * If "n" is zero, then we extract an upper bound from "domain" instead. +/* Extract an upper bound on dimension "pos" from each constraint + * in "constraints" and return the list of upper bounds. + * If "constraints" has zero elements, then we extract an upper bound + * from "domain" instead. */ static __isl_give isl_pw_aff_list *upper_bounds( - __isl_keep isl_constraint **constraint, int n, int pos, + __isl_keep isl_constraint_list *constraints, int pos, __isl_keep isl_set *domain, __isl_keep isl_ast_build *build) { isl_ctx *ctx; isl_pw_aff_list *list; - int i; + int i, n; + n = isl_constraint_list_n_constraint(constraints); if (n == 0) { isl_pw_aff *pa; pa = exact_bound(domain, build, 1); @@ -508,8 +503,11 @@ for (i = 0; i < n; ++i) { isl_aff *aff; + isl_constraint *c; - aff = isl_constraint_get_bound(constraint[i], isl_dim_set, pos); + c = isl_constraint_list_get_constraint(constraints, i); + aff = isl_constraint_get_bound(c, isl_dim_set, pos); + isl_constraint_free(c); aff = isl_aff_floor(aff); list = isl_pw_aff_list_add(list, isl_pw_aff_from_aff(aff)); } @@ -641,26 +639,26 @@ return graft; } -/* Return the intersection of the "n" constraints starting at "constraint" - * as a set. +/* Return the intersection of constraints in "list" as a set. */ -static __isl_give isl_set *intersect_constraints(isl_ctx *ctx, - __isl_keep isl_constraint **constraint, int n) +static __isl_give isl_set *intersect_constraints( + __isl_keep isl_constraint_list *list) { - int i; + int i, n; isl_basic_set *bset; + n = isl_constraint_list_n_constraint(list); if (n < 1) - isl_die(ctx, isl_error_internal, + isl_die(isl_constraint_list_get_ctx(list), isl_error_internal, "expecting at least one constraint", return NULL); bset = isl_basic_set_from_constraint( - isl_constraint_copy(constraint[0])); + isl_constraint_list_get_constraint(list, 0)); for (i = 1; i < n; ++i) { isl_basic_set *bset_i; bset_i = isl_basic_set_from_constraint( - isl_constraint_copy(constraint[i])); + isl_constraint_list_get_constraint(list, i)); bset = isl_basic_set_intersect(bset, bset_i); } @@ -767,12 +765,11 @@ __isl_take isl_aff *aff, void *user) { int *neg = user; - isl_int v; + isl_val *v; - isl_int_init(v); - isl_aff_get_constant(aff, &v); - *neg = isl_int_is_neg(v); - isl_int_clear(v); + v = isl_aff_get_constant_val(aff); + *neg = isl_val_is_neg(v); + isl_val_free(v); isl_set_free(set); isl_aff_free(aff); @@ -906,9 +903,8 @@ static __isl_give isl_ast_expr *for_inc(__isl_keep isl_ast_build *build) { int depth; - isl_int v; + isl_val *v; isl_ctx *ctx; - isl_ast_expr *inc; if (!build) return NULL; @@ -918,12 +914,8 @@ if (!isl_ast_build_has_stride(build, depth)) return isl_ast_expr_alloc_int_si(ctx, 1); - isl_int_init(v); - isl_ast_build_get_stride(build, depth, &v); - inc = isl_ast_expr_alloc_int(ctx, v); - isl_int_clear(v); - - return inc; + v = isl_ast_build_get_stride(build, depth); + return isl_ast_expr_from_val(v); } /* Should we express the loop condition as @@ -998,7 +990,7 @@ /* Update "graft" based on "bounds" and "domain" for the generic, * non-degenerate, case. * - * "constraints" contains the "n_lower" lower and "n_upper" upper bounds + * "c_lower" and "c_upper" contain the lower and upper bounds * that the loop node should express. * "domain" is the subset of the intersection of the constraints * for which some code is executed. @@ -1028,7 +1020,8 @@ */ static __isl_give isl_ast_graft *refine_generic_bounds( __isl_take isl_ast_graft *graft, - __isl_keep isl_constraint **constraint, int n_lower, int n_upper, + __isl_take isl_constraint_list *c_lower, + __isl_take isl_constraint_list *c_upper, __isl_keep isl_set *domain, __isl_keep isl_ast_build *build) { int depth; @@ -1037,23 +1030,25 @@ int use_list; isl_set *upper_set = NULL; isl_pw_aff_list *upper_list = NULL; + int n_lower, n_upper; - if (!graft || !build) - return isl_ast_graft_free(graft); + if (!graft || !c_lower || !c_upper || !build) + goto error; depth = isl_ast_build_get_depth(build); ctx = isl_ast_graft_get_ctx(graft); + n_lower = isl_constraint_list_n_constraint(c_lower); + n_upper = isl_constraint_list_n_constraint(c_upper); + use_list = use_upper_bound_list(ctx, n_upper, domain, depth); - lower = lower_bounds(constraint, n_lower, depth, domain, build); + lower = lower_bounds(c_lower, depth, domain, build); if (use_list) - upper_list = upper_bounds(constraint + n_lower, n_upper, depth, - domain, build); + upper_list = upper_bounds(c_upper, depth, domain, build); else if (n_upper > 0) - upper_set = intersect_constraints(ctx, constraint + n_lower, - n_upper); + upper_set = intersect_constraints(c_upper); else upper_set = isl_set_universe(isl_set_get_space(domain)); @@ -1070,26 +1065,46 @@ isl_pw_aff_list_free(lower); isl_pw_aff_list_free(upper_list); isl_set_free(upper_set); + isl_constraint_list_free(c_lower); + isl_constraint_list_free(c_upper); return graft; +error: + isl_constraint_list_free(c_lower); + isl_constraint_list_free(c_upper); + return isl_ast_graft_free(graft); } -/* How many constraints in the "constraint" array, starting at position "first" - * are of the give type? "n" represents the total number of elements - * in the array. +/* Internal data structure used inside count_constraints to keep + * track of the number of constraints that are independent of dimension "pos", + * the lower bounds in "pos" and the upper bounds in "pos". */ -static int count_constraints(isl_constraint **constraint, int n, int first, - int pos, int type) -{ - int i; +struct isl_ast_count_constraints_data { + int pos; + + int n_indep; + int n_lower; + int n_upper; +}; - constraint += first; +/* Increment data->n_indep, data->lower or data->upper depending + * on whether "c" is independenct of dimensions data->pos, + * a lower bound or an upper bound. + */ +static int count_constraints(__isl_take isl_constraint *c, void *user) +{ + struct isl_ast_count_constraints_data *data = user; + + if (isl_constraint_is_lower_bound(c, isl_dim_set, data->pos)) + data->n_lower++; + else if (isl_constraint_is_upper_bound(c, isl_dim_set, data->pos)) + data->n_upper++; + else + data->n_indep++; - for (i = 0; first + i < n; i++) - if (constraint_type(constraint[i], pos) != type) - break; + isl_constraint_free(c); - return i; + return 0; } /* Update "graft" based on "bounds" and "domain" for the generic, @@ -1111,42 +1126,51 @@ * where this guard is enforced. */ static __isl_give isl_ast_graft *refine_generic_split( - __isl_take isl_ast_graft *graft, __isl_keep isl_constraint_list *list, + __isl_take isl_ast_graft *graft, __isl_take isl_constraint_list *list, __isl_keep isl_set *domain, __isl_keep isl_ast_build *build) { - isl_ctx *ctx; isl_ast_build *for_build; isl_set *guard; - int n_indep, n_lower, n_upper; - int pos; - int n; + struct isl_ast_count_constraints_data data; + isl_constraint_list *lower; + isl_constraint_list *upper; if (!list) return isl_ast_graft_free(graft); - pos = isl_ast_build_get_depth(build); + data.pos = isl_ast_build_get_depth(build); - if (isl_sort(list->p, list->n, sizeof(isl_constraint *), - &cmp_constraint, &pos) < 0) + list = isl_constraint_list_sort(list, &cmp_constraint, &data.pos); + if (!list) return isl_ast_graft_free(graft); - n = list->n; - n_indep = count_constraints(list->p, n, 0, pos, 0); - n_lower = count_constraints(list->p, n, n_indep, pos, 1); - n_upper = count_constraints(list->p, n, n_indep + n_lower, pos, 2); - - if (n_indep == 0) - return refine_generic_bounds(graft, - list->p + n_indep, n_lower, n_upper, domain, build); + data.n_indep = data.n_lower = data.n_upper = 0; + if (isl_constraint_list_foreach(list, &count_constraints, &data) < 0) { + isl_constraint_list_free(list); + return isl_ast_graft_free(graft); + } - ctx = isl_ast_graft_get_ctx(graft); - guard = intersect_constraints(ctx, list->p, n_indep); + lower = isl_constraint_list_copy(list); + lower = isl_constraint_list_drop(lower, 0, data.n_indep); + upper = isl_constraint_list_copy(lower); + lower = isl_constraint_list_drop(lower, data.n_lower, data.n_upper); + upper = isl_constraint_list_drop(upper, 0, data.n_lower); + + if (data.n_indep == 0) { + isl_constraint_list_free(list); + return refine_generic_bounds(graft, lower, upper, + domain, build); + } + + list = isl_constraint_list_drop(list, data.n_indep, + data.n_lower + data.n_upper); + guard = intersect_constraints(list); + isl_constraint_list_free(list); for_build = isl_ast_build_copy(build); for_build = isl_ast_build_restrict_pending(for_build, isl_set_copy(guard)); - graft = refine_generic_bounds(graft, - list->p + n_indep, n_lower, n_upper, domain, for_build); + graft = refine_generic_bounds(graft, lower, upper, domain, for_build); isl_ast_build_free(for_build); graft = isl_ast_graft_add_guard(graft, guard, build); @@ -1154,6 +1178,28 @@ return graft; } +/* Add the guard implied by the current stride constraint (if any), + * but not (necessarily) enforced by the generated AST to "graft". + */ +static __isl_give isl_ast_graft *add_stride_guard( + __isl_take isl_ast_graft *graft, __isl_keep isl_ast_build *build) +{ + int depth; + isl_set *dom; + + depth = isl_ast_build_get_depth(build); + if (!isl_ast_build_has_stride(build, depth)) + return graft; + + dom = isl_ast_build_get_stride_constraint(build); + dom = isl_set_eliminate(dom, isl_dim_set, depth, 1); + dom = isl_ast_build_compute_gist(build, dom); + + graft = isl_ast_graft_add_guard(graft, dom, build); + + return graft; +} + /* Update "graft" based on "bounds" and "domain" for the generic, * non-degenerate, case. * @@ -1180,8 +1226,8 @@ list = isl_constraint_list_from_basic_set(bounds); graft = refine_generic_split(graft, list, domain, build); + graft = add_stride_guard(graft, build); - isl_constraint_list_free(list); return graft; } @@ -1248,8 +1294,13 @@ * it can be printed as an assignment of the single value to the loop * "iterator". * - * If the current level is eliminated, we eliminate the current dimension - * from the inverse schedule to make sure no inner dimensions depend + * If the current level is eliminated, we explicitly plug in the value + * for the current level found by isl_ast_build_set_loop_bounds in the + * inverse schedule. This ensures that if we are working on a slice + * of the domain based on information available in the inverse schedule + * and the build domain, that then this information is also reflected + * in the inverse schedule. This operation also eliminates the current + * dimension from the inverse schedule making sure no inner dimensions depend * on the current dimension. Otherwise, we create a for node, marking * it degenerate if appropriate. The initial for node is still incomplete * and will be completed in either refine_degenerate or refine_generic. @@ -1292,7 +1343,7 @@ if (degenerate < 0 || eliminated < 0) executed = isl_union_map_free(executed); if (eliminated) - executed = eliminate(executed, depth, build); + executed = plug_in_values(executed, sub_build); else node = create_for(build, degenerate); @@ -1329,11 +1380,10 @@ * are multiples of "m", reducing "m" if they are not. * If "m" is reduced all the way down to "1", then the check has failed * and we break out of the iteration. - * "d" is an initialized isl_int that can be used internally. */ struct isl_check_scaled_data { int depth; - isl_int m, d; + isl_val *m; }; /* If constraint "c" involves the input dimension data->depth, @@ -1356,13 +1406,15 @@ for (i = 0; i < 4; ++i) { n = isl_constraint_dim(c, t[i]); for (j = 0; j < n; ++j) { + isl_val *d; + if (t[i] == isl_dim_in && j == data->depth) continue; if (!isl_constraint_involves_dims(c, t[i], j, 1)) continue; - isl_constraint_get_coefficient(c, t[i], j, &data->d); - isl_int_gcd(data->m, data->m, data->d); - if (isl_int_is_one(data->m)) + d = isl_constraint_get_coefficient_val(c, t[i], j); + data->m = isl_val_gcd(data->m, d); + if (isl_val_is_one(data->m)) break; } if (j < n) @@ -1452,6 +1504,7 @@ struct isl_check_scaled_data data; isl_ctx *ctx; isl_aff *offset; + isl_val *d; ctx = isl_ast_build_get_ctx(build); if (!isl_options_get_ast_build_scale_strides(ctx)) @@ -1461,29 +1514,30 @@ if (!isl_ast_build_has_stride(build, data.depth)) return create_node_scaled(executed, bounds, domain, build); - isl_int_init(data.m); - isl_int_init(data.d); - offset = isl_ast_build_get_offset(build, data.depth); - if (isl_ast_build_get_stride(build, data.depth, &data.m) < 0) + data.m = isl_ast_build_get_stride(build, data.depth); + if (!data.m) offset = isl_aff_free(offset); - offset = isl_aff_scale_down(offset, data.m); - if (isl_aff_get_denominator(offset, &data.d) < 0) + offset = isl_aff_scale_down_val(offset, isl_val_copy(data.m)); + d = isl_aff_get_denominator_val(offset); + if (!d) executed = isl_union_map_free(executed); - if (executed && isl_int_is_divisible_by(data.m, data.d)) - isl_int_divexact(data.m, data.m, data.d); - else - isl_int_set_si(data.m, 1); + if (executed && isl_val_is_divisible_by(data.m, d)) + data.m = isl_val_div(data.m, d); + else { + data.m = isl_val_set_si(data.m, 1); + isl_val_free(d); + } - if (!isl_int_is_one(data.m)) { + if (!isl_val_is_one(data.m)) { if (isl_union_map_foreach_map(executed, &map_check_scaled, &data) < 0 && - !isl_int_is_one(data.m)) + !isl_val_is_one(data.m)) executed = isl_union_map_free(executed); } - if (!isl_int_is_one(data.m)) { + if (!isl_val_is_one(data.m)) { isl_space *space; isl_multi_aff *ma; isl_aff *aff; @@ -1494,7 +1548,7 @@ space = isl_space_map_from_set(space); ma = isl_multi_aff_identity(space); aff = isl_multi_aff_get_aff(ma, data.depth); - aff = isl_aff_scale(aff, data.m); + aff = isl_aff_scale_val(aff, isl_val_copy(data.m)); ma = isl_multi_aff_set_aff(ma, data.depth, aff); bounds = isl_basic_set_preimage_multi_aff(bounds, @@ -1505,12 +1559,11 @@ umap = isl_union_map_from_map(map); executed = isl_union_map_apply_domain(executed, isl_union_map_copy(umap)); - build = isl_ast_build_scale_down(build, data.m, umap); + build = isl_ast_build_scale_down(build, isl_val_copy(data.m), + umap); } isl_aff_free(offset); - - isl_int_clear(data.d); - isl_int_clear(data.m); + isl_val_free(data.m); return create_node_scaled(executed, bounds, domain, build); } @@ -1606,49 +1659,105 @@ return list; } -struct isl_domain_follows_at_depth_data { - int depth; - isl_basic_set **piece; -}; - /* Does any element of i follow or coincide with any element of j - * at the current depth (data->depth) for equal values of the outer - * dimensions? + * at the current depth for equal values of the outer dimensions? */ -static int domain_follows_at_depth(int i, int j, void *user) +static int domain_follows_at_depth(__isl_keep isl_basic_set *i, + __isl_keep isl_basic_set *j, void *user) { - struct isl_domain_follows_at_depth_data *data = user; + int depth = *(int *) user; isl_basic_map *test; int empty; int l; - test = isl_basic_map_from_domain_and_range( - isl_basic_set_copy(data->piece[i]), - isl_basic_set_copy(data->piece[j])); - for (l = 0; l < data->depth; ++l) + test = isl_basic_map_from_domain_and_range(isl_basic_set_copy(i), + isl_basic_set_copy(j)); + for (l = 0; l < depth; ++l) test = isl_basic_map_equate(test, isl_dim_in, l, isl_dim_out, l); - test = isl_basic_map_order_ge(test, isl_dim_in, data->depth, - isl_dim_out, data->depth); + test = isl_basic_map_order_ge(test, isl_dim_in, depth, + isl_dim_out, depth); empty = isl_basic_map_is_empty(test); isl_basic_map_free(test); return empty < 0 ? -1 : !empty; } +/* Split up each element of "list" into a part that is related to "bset" + * according to "gt" and a part that is not. + * Return a list that consist of "bset" and all the pieces. + */ +static __isl_give isl_basic_set_list *add_split_on( + __isl_take isl_basic_set_list *list, __isl_take isl_basic_set *bset, + __isl_keep isl_basic_map *gt) +{ + int i, n; + isl_basic_set_list *res; + + gt = isl_basic_map_copy(gt); + gt = isl_basic_map_intersect_domain(gt, isl_basic_set_copy(bset)); + n = isl_basic_set_list_n_basic_set(list); + res = isl_basic_set_list_from_basic_set(bset); + for (i = 0; res && i < n; ++i) { + isl_basic_set *bset; + isl_set *set1, *set2; + isl_basic_map *bmap; + int empty; + + bset = isl_basic_set_list_get_basic_set(list, i); + bmap = isl_basic_map_copy(gt); + bmap = isl_basic_map_intersect_range(bmap, bset); + bset = isl_basic_map_range(bmap); + empty = isl_basic_set_is_empty(bset); + if (empty < 0) + res = isl_basic_set_list_free(res); + if (empty) { + isl_basic_set_free(bset); + bset = isl_basic_set_list_get_basic_set(list, i); + res = isl_basic_set_list_add(res, bset); + continue; + } + + res = isl_basic_set_list_add(res, isl_basic_set_copy(bset)); + set1 = isl_set_from_basic_set(bset); + bset = isl_basic_set_list_get_basic_set(list, i); + set2 = isl_set_from_basic_set(bset); + set1 = isl_set_subtract(set2, set1); + set1 = isl_set_make_disjoint(set1); + + res = isl_basic_set_list_concat(res, + isl_basic_set_list_from_set(set1)); + } + isl_basic_map_free(gt); + isl_basic_set_list_free(list); + return res; +} + static __isl_give isl_ast_graft_list *generate_sorted_domains( __isl_keep isl_basic_set_list *domain_list, __isl_keep isl_union_map *executed, __isl_keep isl_ast_build *build); -/* Generate code for the "n" schedule domains in "domain_list" - * with positions specified by the entries of the "pos" array +/* Internal data structure for add_nodes. + * + * "executed" and "build" are extra arguments to be passed to add_node. + * "list" collects the results. + */ +struct isl_add_nodes_data { + isl_union_map *executed; + isl_ast_build *build; + + isl_ast_graft_list *list; +}; + +/* Generate code for the schedule domains in "scc" * and add the results to "list". * - * The "n" domains form a strongly connected component in the ordering. - * If n is larger than 1, then this means that we cannot determine a valid - * ordering for the n domains in the component. This should be fairly - * rare because the individual domains have been made disjoint first. + * The domains in "scc" form a strongly connected component in the ordering. + * If the number of domains in "scc" is larger than 1, then this means + * that we cannot determine a valid ordering for the domains in the component. + * This should be fairly rare because the individual domains + * have been made disjoint first. * The problem is that the domains may be integrally disjoint but not * rationally disjoint. For example, we may have domains * @@ -1663,52 +1772,51 @@ * This may happen in particular in case of unrolling since the domain * of each slice is replaced by its simple hull. * - * We collect the basic sets in the component, call isl_set_make_disjoint - * and try again. Note that we rely here on isl_set_make_disjoint also - * making the basic sets rationally disjoint. If the basic sets - * are rationally disjoint, then the ordering problem does not occur. - * To see this, there can only be a problem if there are points - * (i,a) and (j,b) in one set and (i,c) and (j,d) in the other with - * a < c and b > d. This means that either the interval spanned - * by a en b lies inside that spanned by c and or the other way around. - * In either case, there is a point inside both intervals with the - * convex combination in terms of a and b and in terms of c and d. - * Taking the same combination of i and j gives a point in the intersection. + * For each basic set i in "scc" and for each of the following basic sets j, + * we split off that part of the basic set i that shares the outer dimensions + * with j and lies before j in the current dimension. + * We collect all the pieces in a new list that replaces "scc". */ -static __isl_give isl_ast_graft_list *add_nodes( - __isl_take isl_ast_graft_list *list, int *pos, int n, - __isl_keep isl_basic_set_list *domain_list, - __isl_keep isl_union_map *executed, - __isl_keep isl_ast_build *build) +static int add_nodes(__isl_take isl_basic_set_list *scc, void *user) { - int i; + struct isl_add_nodes_data *data = user; + int i, n, depth; isl_basic_set *bset; - isl_set *set; + isl_basic_set_list *list; + isl_space *space; + isl_basic_map *gt; - bset = isl_basic_set_list_get_basic_set(domain_list, pos[0]); - if (n == 1) - return add_node(list, isl_union_map_copy(executed), bset, - isl_ast_build_copy(build)); + n = isl_basic_set_list_n_basic_set(scc); + bset = isl_basic_set_list_get_basic_set(scc, 0); + if (n == 1) { + isl_basic_set_list_free(scc); + data->list = add_node(data->list, + isl_union_map_copy(data->executed), bset, + isl_ast_build_copy(data->build)); + return data->list ? 0 : -1; + } - set = isl_set_from_basic_set(bset); + depth = isl_ast_build_get_depth(data->build); + space = isl_basic_set_get_space(bset); + space = isl_space_map_from_set(space); + gt = isl_basic_map_universe(space); + for (i = 0; i < depth; ++i) + gt = isl_basic_map_equate(gt, isl_dim_in, i, isl_dim_out, i); + gt = isl_basic_map_order_gt(gt, isl_dim_in, depth, isl_dim_out, depth); + + list = isl_basic_set_list_from_basic_set(bset); for (i = 1; i < n; ++i) { - bset = isl_basic_set_list_get_basic_set(domain_list, pos[i]); - set = isl_set_union(set, isl_set_from_basic_set(bset)); + bset = isl_basic_set_list_get_basic_set(scc, i); + list = add_split_on(list, bset, gt); } + isl_basic_map_free(gt); + isl_basic_set_list_free(scc); + scc = list; + data->list = isl_ast_graft_list_concat(data->list, + generate_sorted_domains(scc, data->executed, data->build)); + isl_basic_set_list_free(scc); - set = isl_set_make_disjoint(set); - if (isl_set_n_basic_set(set) == n) - isl_die(isl_ast_graft_list_get_ctx(list), isl_error_internal, - "unable to separate loop parts", goto error); - domain_list = isl_basic_set_list_from_set(set); - list = isl_ast_graft_list_concat(list, - generate_sorted_domains(domain_list, executed, build)); - isl_basic_set_list_free(domain_list); - - return list; -error: - isl_set_free(set); - return isl_ast_graft_list_free(list); + return data->list ? 0 : -1; } /* Sort the domains in "domain_list" according to the execution order @@ -1729,71 +1837,47 @@ __isl_keep isl_union_map *executed, __isl_keep isl_ast_build *build) { isl_ctx *ctx; - isl_ast_graft_list *list; - struct isl_domain_follows_at_depth_data data; - struct isl_tarjan_graph *g; - int i, n; + struct isl_add_nodes_data data; + int depth; + int n; if (!domain_list) return NULL; ctx = isl_basic_set_list_get_ctx(domain_list); n = isl_basic_set_list_n_basic_set(domain_list); - list = isl_ast_graft_list_alloc(ctx, n); + data.list = isl_ast_graft_list_alloc(ctx, n); if (n == 0) - return list; + return data.list; if (n == 1) - return add_node(list, isl_union_map_copy(executed), + return add_node(data.list, isl_union_map_copy(executed), isl_basic_set_list_get_basic_set(domain_list, 0), isl_ast_build_copy(build)); - data.depth = isl_ast_build_get_depth(build); - data.piece = domain_list->p; - g = isl_tarjan_graph_init(ctx, n, &domain_follows_at_depth, &data); - if (!g) - goto error; - - i = 0; - while (list && n) { - int first; - - if (g->order[i] == -1) - isl_die(ctx, isl_error_internal, "cannot happen", - goto error); - first = i; - while (g->order[i] != -1) { - ++i; --n; - } - list = add_nodes(list, g->order + first, i - first, - domain_list, executed, build); - ++i; - } - - if (0) -error: list = isl_ast_graft_list_free(list); - isl_tarjan_graph_free(g); + depth = isl_ast_build_get_depth(build); + data.executed = executed; + data.build = build; + if (isl_basic_set_list_foreach_scc(domain_list, + &domain_follows_at_depth, &depth, + &add_nodes, &data) < 0) + data.list = isl_ast_graft_list_free(data.list); - return list; + return data.list; } -struct isl_shared_outer_data { - int depth; - isl_basic_set **piece; -}; - -/* Do elements i and j share any values for the outer dimensions? +/* Do i and j share any values for the outer dimensions? */ -static int shared_outer(int i, int j, void *user) +static int shared_outer(__isl_keep isl_basic_set *i, + __isl_keep isl_basic_set *j, void *user) { - struct isl_shared_outer_data *data = user; + int depth = *(int *) user; isl_basic_map *test; int empty; int l; - test = isl_basic_map_from_domain_and_range( - isl_basic_set_copy(data->piece[i]), - isl_basic_set_copy(data->piece[j])); - for (l = 0; l < data->depth; ++l) + test = isl_basic_map_from_domain_and_range(isl_basic_set_copy(i), + isl_basic_set_copy(j)); + for (l = 0; l < depth; ++l) test = isl_basic_map_equate(test, isl_dim_in, l, isl_dim_out, l); empty = isl_basic_map_is_empty(test); @@ -1802,44 +1886,67 @@ return empty < 0 ? -1 : !empty; } -/* Call generate_sorted_domains on a list containing the elements - * of "domain_list indexed by the first "n" elements of "pos". +/* Internal data structure for generate_sorted_domains_wrap. + * + * "n" is the total number of basic sets + * "executed" and "build" are extra arguments to be passed + * to generate_sorted_domains. + * + * "single" is set to 1 by generate_sorted_domains_wrap if there + * is only a single component. + * "list" collects the results. */ -static __isl_give isl_ast_graft_list *generate_sorted_domains_part( - __isl_keep isl_basic_set_list *domain_list, int *pos, int n, - __isl_keep isl_union_map *executed, - __isl_keep isl_ast_build *build) -{ - int i; - isl_ctx *ctx; - isl_basic_set_list *slice; +struct isl_ast_generate_parallel_domains_data { + int n; + isl_union_map *executed; + isl_ast_build *build; + + int single; isl_ast_graft_list *list; +}; - ctx = isl_ast_build_get_ctx(build); - slice = isl_basic_set_list_alloc(ctx, n); - for (i = 0; i < n; ++i) { - isl_basic_set *bset; +/* Call generate_sorted_domains on "scc", fuse the result into a list + * with either zero or one graft and collect the these single element + * lists into data->list. + * + * If there is only one component, i.e., if the number of basic sets + * in the current component is equal to the total number of basic sets, + * then data->single is set to 1 and the result of generate_sorted_domains + * is not fused. + */ +static int generate_sorted_domains_wrap(__isl_take isl_basic_set_list *scc, + void *user) +{ + struct isl_ast_generate_parallel_domains_data *data = user; + isl_ast_graft_list *list; - bset = isl_basic_set_copy(domain_list->p[pos[i]]); - slice = isl_basic_set_list_add(slice, bset); - } + list = generate_sorted_domains(scc, data->executed, data->build); + data->single = isl_basic_set_list_n_basic_set(scc) == data->n; + if (!data->single) + list = isl_ast_graft_list_fuse(list, data->build); + if (!data->list) + data->list = list; + else + data->list = isl_ast_graft_list_concat(data->list, list); - list = generate_sorted_domains(slice, executed, build); - isl_basic_set_list_free(slice); + isl_basic_set_list_free(scc); + if (!data->list) + return -1; - return list; + return 0; } /* Look for any (weakly connected) components in the "domain_list" * of domains that share some values of the outer dimensions. * That is, domains in different components do not share any values * of the outer dimensions. This means that these components - * can be freely reorderd. + * can be freely reordered. * Within each of the components, we sort the domains according * to the execution order at the current depth. * - * We fuse the result of each call to generate_sorted_domains_part - * into a list with either zero or one graft and collect these (at most) + * If there is more than one component, then generate_sorted_domains_wrap + * fuses the result of each call to generate_sorted_domains + * into a list with either zero or one graft and collects these (at most) * single element lists into a bigger list. This means that the elements of the * final list can be freely reordered. In particular, we sort them * according to an arbitrary but fixed ordering to ease merging of @@ -1849,62 +1956,30 @@ __isl_keep isl_basic_set_list *domain_list, __isl_keep isl_union_map *executed, __isl_keep isl_ast_build *build) { - int i, n; - isl_ctx *ctx; - isl_ast_graft_list *list; - struct isl_shared_outer_data data; - struct isl_tarjan_graph *g; + int depth; + struct isl_ast_generate_parallel_domains_data data; if (!domain_list) return NULL; - n = isl_basic_set_list_n_basic_set(domain_list); - if (n <= 1) + data.n = isl_basic_set_list_n_basic_set(domain_list); + if (data.n <= 1) return generate_sorted_domains(domain_list, executed, build); - ctx = isl_basic_set_list_get_ctx(domain_list); - - data.depth = isl_ast_build_get_depth(build); - data.piece = domain_list->p; - g = isl_tarjan_graph_init(ctx, n, &shared_outer, &data); - if (!g) - return NULL; - - i = 0; - do { - int first; - isl_ast_graft_list *list_c; - - if (g->order[i] == -1) - isl_die(ctx, isl_error_internal, "cannot happen", - break); - first = i; - while (g->order[i] != -1) { - ++i; --n; - } - if (first == 0 && n == 0) { - isl_tarjan_graph_free(g); - return generate_sorted_domains(domain_list, - executed, build); - } - list_c = generate_sorted_domains_part(domain_list, - g->order + first, i - first, executed, build); - list_c = isl_ast_graft_list_fuse(list_c, build); - if (first == 0) - list = list_c; - else - list = isl_ast_graft_list_concat(list, list_c); - ++i; - } while (list && n); - - if (n > 0) - list = isl_ast_graft_list_free(list); - - list = isl_ast_graft_list_sort(list); + depth = isl_ast_build_get_depth(build); + data.list = NULL; + data.executed = executed; + data.build = build; + data.single = 0; + if (isl_basic_set_list_foreach_scc(domain_list, &shared_outer, &depth, + &generate_sorted_domains_wrap, + &data) < 0) + data.list = isl_ast_graft_list_free(data.list); - isl_tarjan_graph_free(g); + if (!data.single) + data.list = isl_ast_graft_list_sort_guard(data.list); - return list; + return data.list; } /* Internal data for separate_domain. @@ -2027,8 +2102,6 @@ * found any yet. * "n" is the corresponding size. If lower is NULL, then the value of n * is undefined. - * - * "tmp" is a temporary initialized isl_int. */ struct isl_find_unroll_data { isl_set *domain; @@ -2036,7 +2109,6 @@ isl_aff *lower; int *n; - isl_int tmp; }; /* Check if we can use "c" as a lower bound and if it is better than @@ -2069,7 +2141,7 @@ __isl_keep isl_constraint *c) { isl_aff *aff, *lower; - enum isl_lp_result res; + isl_val *max; if (!isl_constraint_is_lower_bound(c, isl_dim_set, data->depth)) return 0; @@ -2080,22 +2152,25 @@ aff = isl_aff_neg(aff); aff = isl_aff_add_coefficient_si(aff, isl_dim_in, data->depth, 1); aff = isl_aff_add_constant_si(aff, 1); - res = isl_set_max(data->domain, aff, &data->tmp); + max = isl_set_max_val(data->domain, aff); isl_aff_free(aff); - if (res == isl_lp_error) + if (!max) goto error; - if (res == isl_lp_unbounded) { + if (isl_val_is_infty(max)) { + isl_val_free(max); isl_aff_free(lower); return 0; } - if (!data->lower || isl_int_cmp_si(data->tmp, *data->n) < 0) { + if (isl_val_cmp_si(max, INT_MAX) <= 0 && + (!data->lower || isl_val_cmp_si(max, *data->n) < 0)) { isl_aff_free(data->lower); data->lower = lower; - *data->n = isl_int_get_si(data->tmp); + *data->n = isl_val_get_num_si(max); } else isl_aff_free(lower); + isl_val_free(max); return 1; error: @@ -2145,7 +2220,6 @@ struct isl_find_unroll_data data = { domain, depth, NULL, n }; isl_basic_set *hull; - isl_int_init(data.tmp); hull = isl_set_simple_hull(isl_set_copy(domain)); if (isl_basic_set_foreach_constraint(hull, @@ -2153,7 +2227,6 @@ goto error; isl_basic_set_free(hull); - isl_int_clear(data.tmp); if (!data.lower) isl_die(isl_set_get_ctx(domain), isl_error_invalid, @@ -2162,7 +2235,6 @@ return data.lower; error: isl_basic_set_free(hull); - isl_int_clear(data.tmp); return isl_aff_free(data.lower); } @@ -2284,8 +2356,11 @@ * * "sep_class" contains the user-specified split into separation classes * specialized to the current depth. - * "done" contains the union of th separation domains that have already + * "done" contains the union of the separation domains that have already * been handled. + * "atomic" contains the domain that has effectively been made atomic. + * This domain may be larger than the intersection of option[atomic] + * and the schedule domain. */ struct isl_codegen_domains { isl_basic_set_list *list; @@ -2298,6 +2373,7 @@ isl_map *sep_class; isl_set *done; + isl_set *atomic; }; /* Add domains to domains->list for each individual value of the current @@ -2360,41 +2436,50 @@ return 0; } -/* Construct a single basic set that includes the intersection of +/* Try and construct a single basic set that includes the intersection of * the schedule domain, the atomic option domain and the class domain. - * Add the resulting basic set to domains->list. + * Add the resulting basic set(s) to domains->list and save a copy + * in domains->atomic for use in compute_partial_domains. * * We construct a single domain rather than trying to combine * the schedule domains of individual domains because we are working * within a single component so that non-overlapping schedule domains * should already have been separated. - * Note, though, that this does not take into account the class domain. - * So, it is possible for a class domain to carve out a piece of the - * schedule domain with independent pieces and then we would only - * generate a single domain for them. If this proves to be problematic - * for some users, then this function will have to be adjusted. + * We do however need to make sure that this single domains is a subset + * of the class domain so that it would not intersect with any other + * class domains. This means that we may end up splitting up the atomic + * domain in case separation classes are being used. * * "domain" is the intersection of the schedule domain and the class domain, * with inner dimensions projected out. */ static int compute_atomic_domain(struct isl_codegen_domains *domains, - __isl_keep isl_set *domain) + __isl_keep isl_set *class_domain) { isl_basic_set *bset; - isl_set *atomic_domain; + isl_basic_set_list *list; + isl_set *domain; int empty; - atomic_domain = isl_set_copy(domains->option[atomic]); - atomic_domain = isl_set_intersect(atomic_domain, isl_set_copy(domain)); - empty = isl_set_is_empty(atomic_domain); + domain = isl_set_copy(domains->option[atomic]); + domain = isl_set_intersect(domain, isl_set_copy(class_domain)); + domain = isl_set_intersect(domain, + isl_set_copy(domains->schedule_domain)); + empty = isl_set_is_empty(domain); if (empty < 0 || empty) { - isl_set_free(atomic_domain); + domains->atomic = domain; return empty < 0 ? -1 : 0; } - atomic_domain = isl_set_coalesce(atomic_domain); - bset = isl_set_unshifted_simple_hull(atomic_domain); - domains->list = isl_basic_set_list_add(domains->list, bset); + domain = isl_ast_build_eliminate(domains->build, domain); + domain = isl_set_coalesce(domain); + bset = isl_set_unshifted_simple_hull(domain); + domain = isl_set_from_basic_set(bset); + domains->atomic = isl_set_copy(domain); + domain = isl_set_intersect(domain, isl_set_copy(class_domain)); + domain = isl_set_make_disjoint(domain); + list = isl_basic_set_list_from_set(domain); + domains->list = isl_basic_set_list_concat(domains->list, list); return 0; } @@ -2466,6 +2551,12 @@ * the result with the current "class_domain" to ensure that the domains * are disjoint from those generated from other class domains. * + * The domain that has been made atomic may be larger than specified + * by the user since it needs to be representable as a single basic set. + * This possibly larger domain is stored in domains->atomic by + * compute_atomic_domain. It is computed first so that the extended domain + * would not overlap with any domains computed before. + * * If anything is left after handling separate, unroll and atomic, * we split it up into basic sets and append the basic sets to domains->list. */ @@ -2482,6 +2573,10 @@ domain = isl_set_copy(class_domain); + if (compute_atomic_domain(domains, class_domain) < 0) + domain = isl_set_free(domain); + domain = isl_set_subtract(domain, domains->atomic); + if (compute_separate_domain(domains, domain) < 0) goto error; domain = isl_set_subtract(domain, @@ -2498,11 +2593,6 @@ domain = isl_ast_build_eliminate(domains->build, domain); domain = isl_set_intersect(domain, isl_set_copy(class_domain)); - if (compute_atomic_domain(domains, domain) < 0) - goto error; - domain = isl_set_subtract(domain, - isl_set_copy(domains->option[atomic])); - domain = isl_set_coalesce(domain); domain = isl_set_make_disjoint(domain); @@ -2719,6 +2809,22 @@ return generate_shifted_component(executed, build); } +/* Does set dimension "pos" of "set" have an obviously fixed value? + */ +static int dim_is_fixed(__isl_keep isl_set *set, int pos) +{ + int fixed; + isl_val *v; + + v = isl_set_plain_get_val_if_fixed(set, isl_dim_set, pos); + if (!v) + return -1; + fixed = !isl_val_is_nan(v); + isl_val_free(v); + + return fixed; +} + /* Given an array "domain" of isl_set_map_pairs and an array "order" * of indices into the "domain" array, * do all (except for at most one) of the "set" field of the elements @@ -2734,8 +2840,7 @@ for (i = 0; i < n; ++i) { int f; - f = isl_set_plain_is_fixed(domain[order[i]].set, - isl_dim_set, depth, NULL); + f = dim_is_fixed(domain[order[i]].set, depth); if (f < 0) return -1; if (f) @@ -2765,8 +2870,7 @@ for (i = n - 1; i >= 0; --i) { int f; - f = isl_set_plain_is_fixed(domain[order[i]].set, - isl_dim_set, depth, NULL); + f = dim_is_fixed(domain[order[i]].set, depth); if (f < 0) return -1; if (f) @@ -2916,11 +3020,11 @@ * in all cases. */ static __isl_give isl_union_map *contruct_shifted_executed( - struct isl_set_map_pair *domain, int *order, int n, isl_int stride, - __isl_keep isl_vec *offset, __isl_keep isl_ast_build *build) + struct isl_set_map_pair *domain, int *order, int n, + __isl_keep isl_val *stride, __isl_keep isl_multi_val *offset, + __isl_take isl_ast_build *build) { int i; - isl_int v; isl_union_map *executed; isl_space *space; isl_map *map; @@ -2940,17 +3044,18 @@ c = isl_constraint_set_coefficient_si(c, isl_dim_in, depth, 1); c = isl_constraint_set_coefficient_si(c, isl_dim_out, depth, -1); - isl_int_init(v); - for (i = 0; i < n; ++i) { isl_map *map_i; + isl_val *v; - if (isl_vec_get_element(offset, i, &v) < 0) + v = isl_multi_val_get_val(offset, i); + if (!v) break; map_i = isl_map_copy(map); - map_i = isl_map_fix(map_i, isl_dim_out, depth + 1, v); - isl_int_neg(v, v); - c = isl_constraint_set_constant(c, v); + map_i = isl_map_fix_val(map_i, isl_dim_out, depth + 1, + isl_val_copy(v)); + v = isl_val_neg(v); + c = isl_constraint_set_constant_val(c, v); map_i = isl_map_add_constraint(map_i, isl_constraint_copy(c)); map_i = isl_map_apply_domain(isl_map_copy(domain[order[i]].map), @@ -2961,8 +3066,6 @@ isl_constraint_free(c); isl_map_free(map); - isl_int_clear(v); - if (i < n) executed = isl_union_map_free(executed); @@ -2996,15 +3099,16 @@ * old schedule domain. */ static __isl_give isl_ast_graft_list *generate_shift_component( - struct isl_set_map_pair *domain, int *order, int n, isl_int stride, - __isl_keep isl_vec *offset, __isl_take isl_ast_build *build) + struct isl_set_map_pair *domain, int *order, int n, + __isl_keep isl_val *stride, __isl_keep isl_multi_val *offset, + __isl_take isl_ast_build *build) { isl_ast_graft_list *list; int first; int depth; isl_ctx *ctx; - isl_int val; - isl_vec *v; + isl_val *val; + isl_multi_val *mv; isl_space *space; isl_multi_aff *ma, *zero; isl_union_map *executed; @@ -3016,16 +3120,13 @@ if (first < 0) return isl_ast_build_free(build); - isl_int_init(val); - v = isl_vec_alloc(ctx, n); - if (isl_vec_get_element(offset, first, &val) < 0) - v = isl_vec_free(v); - isl_int_neg(val, val); - v = isl_vec_set(v, val); - v = isl_vec_add(v, isl_vec_copy(offset)); - v = isl_vec_fdiv_r(v, stride); + mv = isl_multi_val_copy(offset); + val = isl_multi_val_get_val(offset, first); + val = isl_val_neg(val); + mv = isl_multi_val_add_val(mv, val); + mv = isl_multi_val_mod_val(mv, isl_val_copy(stride)); - executed = contruct_shifted_executed(domain, order, n, stride, v, + executed = contruct_shifted_executed(domain, order, n, stride, mv, build); space = isl_ast_build_get_space(build, 1); space = isl_space_map_from_set(space); @@ -3039,8 +3140,7 @@ list = isl_ast_graft_list_preimage_multi_aff(list, ma); - isl_vec_free(v); - isl_int_clear(val); + isl_multi_val_free(mv); return list; } @@ -3099,6 +3199,8 @@ * obviously fixed value for the current dimension to itself and all * other domains and collect the offsets and the gcd of the strides. * If the gcd becomes one, then we failed to find shifted strides. + * If the gcd is zero, then the differences were all fixed, meaning + * that some domains had non-obviously fixed values for the current dimension. * If all the offsets are the same (for those domains that do not have * an obviously fixed value for the current dimension), then we do not * apply the transformation. @@ -3118,8 +3220,8 @@ isl_ctx *ctx; isl_map *map; isl_set *deltas; - isl_int m, r, gcd; - isl_vec *v; + isl_val *gcd = NULL; + isl_multi_val *mv; int fixed, skip; int base; isl_ast_graft_list *list; @@ -3144,13 +3246,12 @@ ctx = isl_ast_build_get_ctx(build); - isl_int_init(m); - isl_int_init(r); - isl_int_init(gcd); - v = isl_vec_alloc(ctx, n); + mv = isl_multi_val_zero(isl_space_set_alloc(ctx, 0, n)); fixed = 1; for (i = 0; i < n; ++i) { + isl_val *r, *m; + map = isl_map_from_domain_and_range( isl_set_copy(domain[order[base]].set), isl_set_copy(domain[order[i]].set)); @@ -3158,48 +3259,51 @@ map = isl_map_equate(map, isl_dim_in, d, isl_dim_out, d); deltas = isl_map_deltas(map); - res = isl_set_dim_residue_class(deltas, depth, &m, &r); + res = isl_set_dim_residue_class_val(deltas, depth, &m, &r); isl_set_free(deltas); if (res < 0) break; if (i == 0) - isl_int_set(gcd, m); + gcd = m; else - isl_int_gcd(gcd, gcd, m); - if (isl_int_is_one(gcd)) + gcd = isl_val_gcd(gcd, m); + if (isl_val_is_one(gcd)) { + isl_val_free(r); break; - v = isl_vec_set_element(v, i, r); + } + mv = isl_multi_val_set_val(mv, i, r); - res = isl_set_plain_is_fixed(domain[order[i]].set, - isl_dim_set, depth, NULL); + res = dim_is_fixed(domain[order[i]].set, depth); if (res < 0) break; if (res) continue; if (fixed && i > base) { - isl_vec_get_element(v, base, &m); - if (isl_int_ne(m, r)) + isl_val *a, *b; + a = isl_multi_val_get_val(mv, i); + b = isl_multi_val_get_val(mv, base); + if (isl_val_ne(a, b)) fixed = 0; + isl_val_free(a); + isl_val_free(b); } } - if (res < 0) { + if (res < 0 || !gcd) { isl_ast_build_free(build); list = NULL; - } else if (i < n || fixed) { + } else if (i < n || fixed || isl_val_is_zero(gcd)) { list = generate_shifted_component_from_list(domain, order, n, build); } else { - list = generate_shift_component(domain, order, n, gcd, v, + list = generate_shift_component(domain, order, n, gcd, mv, build); } - isl_vec_free(v); - isl_int_clear(gcd); - isl_int_clear(r); - isl_int_clear(m); + isl_val_free(gcd); + isl_multi_val_free(mv); return list; } diff -Nru isl-0.11.2/isl_ast_graft.c isl-0.12.1/isl_ast_graft.c --- isl-0.11.2/isl_ast_graft.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_ast_graft.c 2013-07-24 10:34:06.000000000 +0000 @@ -7,7 +7,6 @@ * Ecole Normale Superieure, 45 rue d’Ulm, 75230 Paris, France */ -#include #include #include #include @@ -178,6 +177,8 @@ depth = isl_ast_build_get_depth(build); if (depth < isl_set_dim(guard, isl_dim_set)) { + guard = isl_set_remove_divs_involving_dims(guard, + isl_dim_set, depth, 1); guard = isl_set_eliminate(guard, isl_dim_set, depth, 1); guard = isl_set_compute_divs(guard); } @@ -207,6 +208,78 @@ return guard; } +/* Internal data structure used inside insert_if. + * + * list is the list of guarded nodes created by each call to insert_if. + * node is the original node that is guarded by insert_if. + * build is the build in which the AST is constructed. + */ +struct isl_insert_if_data { + isl_ast_node_list *list; + isl_ast_node *node; + isl_ast_build *build; +}; + +static int insert_if(__isl_take isl_basic_set *bset, void *user); + +/* Insert an if node around "node" testing the condition encoded + * in guard "guard". + * + * If the user does not want any disjunctions in the if conditions + * and if "guard" does involve a disjunction, then we make the different + * disjuncts disjoint and insert an if node corresponding to each disjunct + * around a copy of "node". The result is then a block node containing + * this sequence of guarded copies of "node". + */ +static __isl_give isl_ast_node *ast_node_insert_if( + __isl_take isl_ast_node *node, __isl_take isl_set *guard, + __isl_keep isl_ast_build *build) +{ + struct isl_insert_if_data data; + isl_ctx *ctx; + + ctx = isl_ast_build_get_ctx(build); + if (isl_options_get_ast_build_allow_or(ctx) || + isl_set_n_basic_set(guard) <= 1) { + isl_ast_node *if_node; + isl_ast_expr *expr; + + expr = isl_ast_build_expr_from_set(build, guard); + + if_node = isl_ast_node_alloc_if(expr); + return isl_ast_node_if_set_then(if_node, node); + } + + guard = isl_set_make_disjoint(guard); + + data.list = isl_ast_node_list_alloc(ctx, 0); + data.node = node; + data.build = build; + if (isl_set_foreach_basic_set(guard, &insert_if, &data) < 0) + data.list = isl_ast_node_list_free(data.list); + + isl_set_free(guard); + isl_ast_node_free(data.node); + return isl_ast_node_alloc_block(data.list); +} + +/* Insert an if node around a copy of "data->node" testing the condition + * encoded in guard "bset" and add the result to data->list. + */ +static int insert_if(__isl_take isl_basic_set *bset, void *user) +{ + struct isl_insert_if_data *data = user; + isl_ast_node *node; + isl_set *set; + + set = isl_set_from_basic_set(bset); + node = isl_ast_node_copy(data->node); + node = ast_node_insert_if(node, set, data->build); + data->list = isl_ast_node_list_add(data->list, node); + + return 0; +} + /* Insert an if node around graft->node testing the condition encoded * in guard "guard", assuming guard involves any conditions. */ @@ -215,8 +288,6 @@ __isl_keep isl_ast_build *build) { int univ; - isl_ast_node *node; - isl_ast_expr *expr; if (!graft) goto error; @@ -232,12 +303,9 @@ build = isl_ast_build_copy(build); build = isl_ast_build_set_enforced(build, isl_ast_graft_get_enforced(graft)); - expr = isl_ast_build_expr_from_set(build, guard); + graft->node = ast_node_insert_if(graft->node, guard, build); isl_ast_build_free(build); - node = isl_ast_node_alloc_if(expr); - graft->node = isl_ast_node_if_set_then(node, graft->node); - if (!graft->node) return isl_ast_graft_free(graft); @@ -452,7 +520,7 @@ allow_else = isl_options_get_ast_build_allow_else(ctx); n_if = 0; - if (n > 0) { + if (n > 1) { if_node = isl_alloc_array(ctx, struct isl_if_node, n - 1); if (!if_node) return isl_ast_graft_list_free(list); @@ -617,7 +685,8 @@ /* Record "guard" in "graft" so that it will be enforced somewhere * up the tree. If the graft already has a guard, then it may be partially * redundant in combination with the new guard and in the context - * of build->domain. We therefore (re)compute the gist of the intersection. + * of build->domain. We therefore (re)compute the gist of the intersection + * and coalesce the result. */ static __isl_give isl_ast_graft *store_guard(__isl_take isl_ast_graft *graft, __isl_take isl_set *guard, __isl_keep isl_ast_build *build) @@ -637,6 +706,7 @@ graft->guard = isl_set_intersect(graft->guard, guard); graft->guard = isl_ast_build_compute_gist(build, graft->guard); + graft->guard = isl_set_coalesce(graft->guard); if (!graft->guard) return isl_ast_graft_free(graft); @@ -1004,27 +1074,18 @@ /* Compare two grafts based on their guards. */ -static int cmp_graft(const void *a, const void *b) +static int cmp_graft(__isl_keep isl_ast_graft *a, __isl_keep isl_ast_graft *b, + void *user) { - isl_ast_graft * const *g1 = a; - isl_ast_graft * const *g2 = b; - - return isl_set_plain_cmp((*g1)->guard, (*g2)->guard); + return isl_set_plain_cmp(a->guard, b->guard); } /* Order the elements in "list" based on their guards. */ -__isl_give isl_ast_graft_list *isl_ast_graft_list_sort( +__isl_give isl_ast_graft_list *isl_ast_graft_list_sort_guard( __isl_take isl_ast_graft_list *list) { - if (!list) - return NULL; - if (list->n <= 1) - return list; - - qsort(list->p, list->n, sizeof(list->p[0]), &cmp_graft); - - return list; + return isl_ast_graft_list_sort(list, &cmp_graft, NULL); } /* Merge the given two lists into a single list of grafts, diff -Nru isl-0.11.2/isl_ast_graft_private.h isl-0.12.1/isl_ast_graft_private.h --- isl-0.11.2/isl_ast_graft_private.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_ast_graft_private.h 2013-07-01 13:12:40.000000000 +0000 @@ -53,7 +53,7 @@ __isl_give isl_ast_graft *isl_ast_graft_alloc_domain( __isl_take isl_map *schedule, __isl_keep isl_ast_build *build); void *isl_ast_graft_free(__isl_take isl_ast_graft *graft); -__isl_give isl_ast_graft_list *isl_ast_graft_list_sort( +__isl_give isl_ast_graft_list *isl_ast_graft_list_sort_guard( __isl_take isl_ast_graft_list *list); __isl_give isl_ast_graft_list *isl_ast_graft_list_merge( diff -Nru isl-0.11.2/isl_ast_private.h isl-0.12.1/isl_ast_private.h --- isl-0.11.2/isl_ast_private.h 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/isl_ast_private.h 2013-07-01 13:12:40.000000000 +0000 @@ -19,7 +19,7 @@ enum isl_ast_expr_type type; union { - isl_int i; + isl_val *v; isl_id *id; struct { enum isl_ast_op_type op; @@ -34,7 +34,6 @@ #include -__isl_give isl_ast_expr *isl_ast_expr_alloc_int(isl_ctx *ctx, isl_int i); __isl_give isl_ast_expr *isl_ast_expr_alloc_int_si(isl_ctx *ctx, int i); __isl_give isl_ast_expr *isl_ast_expr_alloc_op(isl_ctx *ctx, enum isl_ast_op_type op, int n_arg); diff -Nru isl-0.11.2/isl_band.c isl-0.12.1/isl_band.c --- isl-0.11.2/isl_band.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_band.c 2013-07-24 10:34:06.000000000 +0000 @@ -1,16 +1,22 @@ /* * Copyright 2011 INRIA Saclay + * Copyright 2012-2013 Ecole Normale Superieure * * Use of this software is governed by the MIT license * * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, * 91893 Orsay, France + * and Ecole Normale Superieure, 45 rue d'Ulm, 75230 Paris, France */ #include #include -#include + +#undef BASE +#define BASE band + +#include isl_ctx *isl_band_get_ctx(__isl_keep isl_band *band) { @@ -50,7 +56,7 @@ dup->n = band->n; dup->zero = isl_alloc_array(ctx, int, band->n); - if (!dup->zero) + if (band->n && !dup->zero) goto error; for (i = 0; i < band->n; ++i) @@ -331,7 +337,7 @@ * res collects the result for all statements */ struct isl_band_tile_data { - isl_vec *sizes; + isl_multi_val *sizes; isl_union_pw_multi_aff *res; isl_pw_multi_aff *tiled; int scale; @@ -359,27 +365,24 @@ struct isl_band_tile_data *data = user; isl_pw_multi_aff *pma; int i, n; - isl_int v; + isl_val *v; n = isl_multi_aff_dim(ma, isl_dim_out); - if (isl_vec_size(data->sizes) < n) - n = isl_vec_size(data->sizes); - isl_int_init(v); for (i = 0; i < n; ++i) { isl_aff *aff; aff = isl_multi_aff_get_aff(ma, i); - isl_vec_get_element(data->sizes, i, &v); + v = isl_multi_val_get_val(data->sizes, i); - aff = isl_aff_scale_down(aff, v); + aff = isl_aff_scale_down_val(aff, isl_val_copy(v)); aff = isl_aff_floor(aff); if (data->scale) - aff = isl_aff_scale(aff, v); + aff = isl_aff_scale_val(aff, isl_val_copy(v)); + isl_val_free(v); ma = isl_multi_aff_set_aff(ma, i, aff); } - isl_int_clear(v); pma = isl_pw_multi_aff_alloc(set, ma); data->tiled = isl_pw_multi_aff_union_add(data->tiled, pma); @@ -416,13 +419,14 @@ * and return the result. */ static isl_union_pw_multi_aff *isl_union_pw_multi_aff_tile( - __isl_take isl_union_pw_multi_aff *sched, __isl_keep isl_vec *sizes) + __isl_take isl_union_pw_multi_aff *sched, + __isl_keep isl_multi_val *sizes) { isl_ctx *ctx; isl_space *space; struct isl_band_tile_data data = { sizes }; - ctx = isl_vec_get_ctx(sizes); + ctx = isl_multi_val_get_ctx(sizes); space = isl_union_pw_multi_aff_get_space(sched); data.res = isl_union_pw_multi_aff_empty(space); @@ -440,18 +444,101 @@ return NULL; } +/* Extract the range space from "pma" and store it in *user. + * All entries are expected to have the same range space, so we can + * stop after extracting the range space from the first entry. + */ +static int extract_range_space(__isl_take isl_pw_multi_aff *pma, void *user) +{ + isl_space **space = user; + + *space = isl_space_range(isl_pw_multi_aff_get_space(pma)); + isl_pw_multi_aff_free(pma); + + return -1; +} + +/* Extract the range space of "band". All entries in band->pma should + * have the same range space. Furthermore, band->pma should have at least + * one entry. + */ +static __isl_give isl_space *band_get_range_space(__isl_keep isl_band *band) +{ + isl_space *space; + + if (!band) + return NULL; + + space = NULL; + isl_union_pw_multi_aff_foreach_pw_multi_aff(band->pma, + &extract_range_space, &space); + + return space; +} + +/* Construct and return an isl_multi_val in the given space, with as entries + * the first elements of "v", padded with ones if the size of "v" is smaller + * than the dimension of "space". + */ +static __isl_give isl_multi_val *multi_val_from_vec(__isl_take isl_space *space, + __isl_take isl_vec *v) +{ + isl_ctx *ctx; + isl_multi_val *mv; + int i, n, size; + + if (!space || !v) + goto error; + + ctx = isl_space_get_ctx(space); + mv = isl_multi_val_zero(space); + n = isl_multi_val_dim(mv, isl_dim_set); + size = isl_vec_size(v); + if (n < size) + size = n; + + for (i = 0; i < size; ++i) { + isl_val *val = isl_vec_get_element_val(v, i); + mv = isl_multi_val_set_val(mv, i, val); + } + for (i = size; i < n; ++i) + mv = isl_multi_val_set_val(mv, i, isl_val_one(ctx)); + + isl_vec_free(v); + return mv; +error: + isl_space_free(space); + isl_vec_free(v); + return NULL; +} + /* Tile the given band using the specified tile sizes. * The given band is modified to refer to the tile loops and * a child band is created to refer to the point loops. * The children of this point loop band are the children * of the original band. + * + * If the scale tile loops option is set, then the tile loops + * are scaled by the tile sizes. If the shift point loops option is set, + * then the point loops are shifted to start at zero. + * In particular, these options affect the tile and point loop schedules + * as follows + * + * scale shift original tile point + * + * 0 0 i floor(i/s) i + * 1 0 i s * floor(i/s) i + * 0 1 i floor(i/s) i - s * floor(i/s) + * 1 1 i s * floor(i/s) i - s * floor(i/s) */ int isl_band_tile(__isl_keep isl_band *band, __isl_take isl_vec *sizes) { isl_ctx *ctx; isl_band *child; isl_band_list *list = NULL; - isl_union_pw_multi_aff *sched; + isl_union_pw_multi_aff *sched = NULL, *child_sched = NULL; + isl_space *space; + isl_multi_val *mv_sizes; if (!band || !sizes) goto error; @@ -463,9 +550,22 @@ if (!list) goto error; + space = band_get_range_space(band); + mv_sizes = multi_val_from_vec(space, isl_vec_copy(sizes)); sched = isl_union_pw_multi_aff_copy(band->pma); - sched = isl_union_pw_multi_aff_tile(sched, sizes); - if (!sched) + sched = isl_union_pw_multi_aff_tile(sched, mv_sizes); + + child_sched = isl_union_pw_multi_aff_copy(child->pma); + if (isl_options_get_tile_shift_point_loops(ctx)) { + isl_union_pw_multi_aff *scaled; + scaled = isl_union_pw_multi_aff_copy(sched); + if (!isl_options_get_tile_scale_tile_loops(ctx)) + scaled = isl_union_pw_multi_aff_scale_multi_val(scaled, + isl_multi_val_copy(mv_sizes)); + child_sched = isl_union_pw_multi_aff_sub(child_sched, scaled); + } + isl_multi_val_free(mv_sizes); + if (!sched || !child_sched) goto error; child->children = band->children; @@ -473,15 +573,132 @@ child->parent = band; isl_union_pw_multi_aff_free(band->pma); band->pma = sched; + isl_union_pw_multi_aff_free(child->pma); + child->pma = child_sched; isl_vec_free(sizes); return 0; error: + isl_union_pw_multi_aff_free(sched); + isl_union_pw_multi_aff_free(child_sched); isl_band_list_free(list); isl_vec_free(sizes); return -1; } +/* Internal data structure used inside isl_union_pw_multi_aff_drop. + * + * "pos" is the position of the first dimension to drop. + * "n" is the number of dimensions to drop. + * "res" accumulates the result. + */ +struct isl_union_pw_multi_aff_drop_data { + int pos; + int n; + isl_union_pw_multi_aff *res; +}; + +/* Drop the data->n output dimensions starting at data->pos from "pma" + * and add the result to data->res. + */ +static int pw_multi_aff_drop(__isl_take isl_pw_multi_aff *pma, void *user) +{ + struct isl_union_pw_multi_aff_drop_data *data = user; + + pma = isl_pw_multi_aff_drop_dims(pma, isl_dim_out, data->pos, data->n); + + data->res = isl_union_pw_multi_aff_add_pw_multi_aff(data->res, pma); + if (!data->res) + return -1; + + return 0; +} + +/* Drop the "n" output dimensions starting at "pos" from "sched". + */ +static isl_union_pw_multi_aff *isl_union_pw_multi_aff_drop( + __isl_take isl_union_pw_multi_aff *sched, int pos, int n) +{ + isl_space *space; + struct isl_union_pw_multi_aff_drop_data data = { pos, n }; + + space = isl_union_pw_multi_aff_get_space(sched); + data.res = isl_union_pw_multi_aff_empty(space); + + if (isl_union_pw_multi_aff_foreach_pw_multi_aff(sched, + &pw_multi_aff_drop, &data) < 0) + data.res = isl_union_pw_multi_aff_free(data.res); + + isl_union_pw_multi_aff_free(sched); + return data.res; +} + +/* Drop the "n" dimensions starting at "pos" from "band". + */ +static int isl_band_drop(__isl_keep isl_band *band, int pos, int n) +{ + int i; + isl_union_pw_multi_aff *sched; + + if (!band) + return -1; + if (n == 0) + return 0; + + sched = isl_union_pw_multi_aff_copy(band->pma); + sched = isl_union_pw_multi_aff_drop(sched, pos, n); + if (!sched) + return -1; + + isl_union_pw_multi_aff_free(band->pma); + band->pma = sched; + + for (i = pos + n; i < band->n; ++i) + band->zero[i - n] = band->zero[i]; + + band->n -= n; + + return 0; +} + +/* Split the given band into two nested bands, one with the first "pos" + * dimensions of "band" and one with the remaining band->n - pos dimensions. + */ +int isl_band_split(__isl_keep isl_band *band, int pos) +{ + isl_ctx *ctx; + isl_band *child; + isl_band_list *list; + + if (!band) + return -1; + + ctx = isl_band_get_ctx(band); + + if (pos < 0 || pos > band->n) + isl_die(ctx, isl_error_invalid, "position out of bounds", + return -1); + + child = isl_band_dup(band); + if (isl_band_drop(child, 0, pos) < 0) + child = isl_band_free(child); + list = isl_band_list_alloc(ctx, 1); + list = isl_band_list_add(list, child); + if (!list) + return -1; + + if (isl_band_drop(band, pos, band->n - pos) < 0) { + isl_band_list_free(list); + return -1; + } + + child->children = band->children; + band->children = list; + child->parent = band; + + return 0; +} + __isl_give isl_printer *isl_printer_print_band(__isl_take isl_printer *p, __isl_keep isl_band *band) { diff -Nru isl-0.11.2/isl_band_private.h isl-0.12.1/isl_band_private.h --- isl-0.11.2/isl_band_private.h 2013-01-08 11:20:44.000000000 +0000 +++ isl-0.12.1/isl_band_private.h 2013-07-02 09:10:02.000000000 +0000 @@ -33,6 +33,11 @@ isl_band_list *children; }; +#undef EL +#define EL isl_band + +#include + __isl_give isl_band *isl_band_alloc(isl_ctx *ctx); __isl_give isl_union_map *isl_band_list_get_suffix_schedule( diff -Nru isl-0.11.2/isl_bernstein.c isl-0.12.1/isl_bernstein.c --- isl-0.11.2/isl_bernstein.c 2013-04-07 15:38:34.000000000 +0000 +++ isl-0.12.1/isl_bernstein.c 2013-07-24 11:04:50.000000000 +0000 @@ -485,7 +485,7 @@ nvar = isl_basic_set_dim(bset, isl_dim_set); len = isl_alloc_array(bset->ctx, int, nvar); - if (!len) + if (nvar && !len) goto error; for (i = 0; i < nvar; ++i) diff -Nru isl-0.11.2/isl_coalesce.c isl-0.12.1/isl_coalesce.c --- isl-0.11.2/isl_coalesce.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_coalesce.c 2013-07-24 11:04:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Copyright 2008-2009 Katholieke Universiteit Leuven * Copyright 2010 INRIA Saclay - * Copyright 2012 Ecole Normale Superieure + * Copyright 2012-2013 Ecole Normale Superieure * * Use of this software is governed by the MIT license * @@ -298,6 +298,124 @@ return fuse(map, i, j, tabs, NULL, ineq_i, NULL, ineq_j, NULL); } +/* Check if basic map "i" contains the basic map represented + * by the tableau "tab". + */ +static int contains(struct isl_map *map, int i, int *ineq_i, + struct isl_tab *tab) +{ + int k, l; + unsigned dim; + + dim = isl_basic_map_total_dim(map->p[i]); + for (k = 0; k < map->p[i]->n_eq; ++k) { + for (l = 0; l < 2; ++l) { + int stat; + isl_seq_neg(map->p[i]->eq[k], map->p[i]->eq[k], 1+dim); + stat = status_in(map->p[i]->eq[k], tab); + if (stat != STATUS_VALID) + return 0; + } + } + + for (k = 0; k < map->p[i]->n_ineq; ++k) { + int stat; + if (ineq_i[k] == STATUS_REDUNDANT) + continue; + stat = status_in(map->p[i]->ineq[k], tab); + if (stat != STATUS_VALID) + return 0; + } + return 1; +} + +/* Basic map "i" has an inequality (say "k") that is adjacent + * to some inequality of basic map "j". All the other inequalities + * are valid for "j". + * Check if basic map "j" forms an extension of basic map "i". + * + * Note that this function is only called if some of the equalities or + * inequalities of basic map "j" do cut basic map "i". The function is + * correct even if there are no such cut constraints, but in that case + * the additional checks performed by this function are overkill. + * + * In particular, we replace constraint k, say f >= 0, by constraint + * f <= -1, add the inequalities of "j" that are valid for "i" + * and check if the result is a subset of basic map "j". + * If so, then we know that this result is exactly equal to basic map "j" + * since all its constraints are valid for basic map "j". + * By combining the valid constraints of "i" (all equalities and all + * inequalities except "k") and the valid constraints of "j" we therefore + * obtain a basic map that is equal to their union. + * In this case, there is no need to perform a rollback of the tableau + * since it is going to be destroyed in fuse(). + * + * + * |\__ |\__ + * | \__ | \__ + * | \_ => | \__ + * |_______| _ |_________\ + * + * + * |\ |\ + * | \ | \ + * | \ | \ + * | | | \ + * | ||\ => | \ + * | || \ | \ + * | || | | | + * |__||_/ |_____/ + */ +static int is_adj_ineq_extension(__isl_keep isl_map *map, int i, int j, + struct isl_tab **tabs, int *eq_i, int *ineq_i, int *eq_j, int *ineq_j) +{ + int k; + struct isl_tab_undo *snap; + unsigned n_eq = map->p[i]->n_eq; + unsigned total = isl_basic_map_total_dim(map->p[i]); + int r; + + if (isl_tab_extend_cons(tabs[i], 1 + map->p[j]->n_ineq) < 0) + return -1; + + for (k = 0; k < map->p[i]->n_ineq; ++k) + if (ineq_i[k] == STATUS_ADJ_INEQ) + break; + if (k >= map->p[i]->n_ineq) + isl_die(isl_map_get_ctx(map), isl_error_internal, + "ineq_i should have exactly one STATUS_ADJ_INEQ", + return -1); + + snap = isl_tab_snap(tabs[i]); + + if (isl_tab_unrestrict(tabs[i], n_eq + k) < 0) + return -1; + + isl_seq_neg(map->p[i]->ineq[k], map->p[i]->ineq[k], 1 + total); + isl_int_sub_ui(map->p[i]->ineq[k][0], map->p[i]->ineq[k][0], 1); + r = isl_tab_add_ineq(tabs[i], map->p[i]->ineq[k]); + isl_seq_neg(map->p[i]->ineq[k], map->p[i]->ineq[k], 1 + total); + isl_int_sub_ui(map->p[i]->ineq[k][0], map->p[i]->ineq[k][0], 1); + if (r < 0) + return -1; + + for (k = 0; k < map->p[j]->n_ineq; ++k) { + if (ineq_j[k] != STATUS_VALID) + continue; + if (isl_tab_add_ineq(tabs[i], map->p[j]->ineq[k]) < 0) + return -1; + } + + if (contains(map, j, ineq_j, tabs[i])) + return fuse(map, i, j, tabs, eq_i, ineq_i, eq_j, ineq_j, NULL); + + if (isl_tab_rollback(tabs[i], snap) < 0) + return -1; + + return 0; +} + + /* Both basic maps have at least one inequality with and adjacent * (but opposite) inequality in the other basic map. * Check that there are no cut constraints and that there is only @@ -324,53 +442,40 @@ * | | * | | * |___| + * + * If there are some cut constraints on one side, then we may + * still be able to fuse the two basic maps, but we need to perform + * some additional checks in is_adj_ineq_extension. */ static int check_adj_ineq(struct isl_map *map, int i, int j, - struct isl_tab **tabs, int *ineq_i, int *ineq_j) + struct isl_tab **tabs, int *eq_i, int *ineq_i, int *eq_j, int *ineq_j) { - int changed = 0; + int count_i, count_j; + int cut_i, cut_j; - if (any(ineq_i, map->p[i]->n_ineq, STATUS_CUT) || - any(ineq_j, map->p[j]->n_ineq, STATUS_CUT)) - /* ADJ INEQ CUT */ - ; - else if (count(ineq_i, map->p[i]->n_ineq, STATUS_ADJ_INEQ) == 1 && - count(ineq_j, map->p[j]->n_ineq, STATUS_ADJ_INEQ) == 1) - changed = fuse(map, i, j, tabs, NULL, ineq_i, NULL, ineq_j, NULL); - /* else ADJ INEQ TOO MANY */ + count_i = count(ineq_i, map->p[i]->n_ineq, STATUS_ADJ_INEQ); + count_j = count(ineq_j, map->p[j]->n_ineq, STATUS_ADJ_INEQ); - return changed; -} + if (count_i != 1 && count_j != 1) + return 0; -/* Check if basic map "i" contains the basic map represented - * by the tableau "tab". - */ -static int contains(struct isl_map *map, int i, int *ineq_i, - struct isl_tab *tab) -{ - int k, l; - unsigned dim; + cut_i = any(eq_i, 2 * map->p[i]->n_eq, STATUS_CUT) || + any(ineq_i, map->p[i]->n_ineq, STATUS_CUT); + cut_j = any(eq_j, 2 * map->p[j]->n_eq, STATUS_CUT) || + any(ineq_j, map->p[j]->n_ineq, STATUS_CUT); - dim = isl_basic_map_total_dim(map->p[i]); - for (k = 0; k < map->p[i]->n_eq; ++k) { - for (l = 0; l < 2; ++l) { - int stat; - isl_seq_neg(map->p[i]->eq[k], map->p[i]->eq[k], 1+dim); - stat = status_in(map->p[i]->eq[k], tab); - if (stat != STATUS_VALID) - return 0; - } - } + if (!cut_i && !cut_j && count_i == 1 && count_j == 1) + return fuse(map, i, j, tabs, NULL, ineq_i, NULL, ineq_j, NULL); - for (k = 0; k < map->p[i]->n_ineq; ++k) { - int stat; - if (ineq_i[k] == STATUS_REDUNDANT) - continue; - stat = status_in(map->p[i]->ineq[k], tab); - if (stat != STATUS_VALID) - return 0; - } - return 1; + if (count_i == 1 && !cut_i) + return is_adj_ineq_extension(map, i, j, tabs, + eq_i, ineq_i, eq_j, ineq_j); + + if (count_j == 1 && !cut_j) + return is_adj_ineq_extension(map, j, i, tabs, + eq_j, ineq_j, eq_i, ineq_i); + + return 0; } /* Basic map "i" has an inequality "k" that is adjacent to some equality @@ -383,7 +488,7 @@ * map with exactly the other basic map (we already know that this * other basic map is included in the extension, because there * were no "cut" inequalities in "i") and we can replace the - * two basic maps by thie extension. + * two basic maps by this extension. * ____ _____ * / || / | * / || / | @@ -391,7 +496,7 @@ * \ || \ | * \___|| \____| */ -static int is_extension(struct isl_map *map, int i, int j, int k, +static int is_adj_eq_extension(struct isl_map *map, int i, int j, int k, struct isl_tab **tabs, int *eq_i, int *ineq_i, int *eq_j, int *ineq_j) { int changed = 0; @@ -1048,11 +1153,12 @@ /* ADJ EQ TOO MANY */ return 0; - for (k = 0; k < map->p[i]->n_ineq ; ++k) + for (k = 0; k < map->p[i]->n_ineq; ++k) if (ineq_i[k] == STATUS_ADJ_EQ) break; - changed = is_extension(map, i, j, k, tabs, eq_i, ineq_i, eq_j, ineq_j); + changed = is_adj_eq_extension(map, i, j, k, tabs, + eq_i, ineq_i, eq_j, ineq_j); if (changed) return changed; @@ -1200,7 +1306,15 @@ * => the pair can be replaced by a basic map consisting * of the valid constraints in both basic maps * - * 4. there is a single adjacent pair of an inequality and an equality, + * 4. one basic map has a single adjacent inequality, while the other + * constraints are "valid". The other basic map has some + * "cut" constraints, but replacing the adjacent inequality by + * its opposite and adding the valid constraints of the other + * basic map results in a subset of the other basic map + * => the pair can be replaced by a basic map consisting + * of the valid constraints in both basic maps + * + * 5. there is a single adjacent pair of an inequality and an equality, * the other constraints of the basic map containing the inequality are * "valid". Moreover, if the inequality the basic map is relaxed * and then turned into an equality, then resulting facet lies @@ -1208,7 +1322,7 @@ * => the pair can be replaced by the basic map containing * the inequality, with the inequality relaxed. * - * 5. there is a single adjacent pair of an inequality and an equality, + * 6. there is a single adjacent pair of an inequality and an equality, * the other constraints of the basic map containing the inequality are * "valid". Moreover, the facets corresponding to both * the inequality and the equality can be wrapped around their @@ -1217,7 +1331,7 @@ * of the valid constraints in both basic maps together * with all wrapping constraints * - * 6. one of the basic maps extends beyond the other by at most one. + * 7. one of the basic maps extends beyond the other by at most one. * Moreover, the facets corresponding to the cut constraints and * the pieces of the other basic map at offset one from these cut * constraints can be wrapped around their ridges to include @@ -1226,7 +1340,7 @@ * of the valid constraints in both basic maps together * with all wrapping constraints * - * 7. the two basic maps live in adjacent hyperplanes. In principle + * 8. the two basic maps live in adjacent hyperplanes. In principle * such sets can always be combined through wrapping, but we impose * that there is only one such pair, to avoid overeager coalescing. * @@ -1244,7 +1358,7 @@ int *ineq_j = NULL; eq_i = eq_status_in(map->p[i], tabs[j]); - if (!eq_i) + if (map->p[i]->n_eq && !eq_i) goto error; if (any(eq_i, 2 * map->p[i]->n_eq, STATUS_ERROR)) goto error; @@ -1252,7 +1366,7 @@ goto done; eq_j = eq_status_in(map->p[j], tabs[i]); - if (!eq_j) + if (map->p[j]->n_eq && !eq_j) goto error; if (any(eq_j, 2 * map->p[j]->n_eq, STATUS_ERROR)) goto error; @@ -1260,7 +1374,7 @@ goto done; ineq_i = ineq_status_in(map->p[i], tabs[i], tabs[j]); - if (!ineq_i) + if (map->p[i]->n_ineq && !ineq_i) goto error; if (any(ineq_i, map->p[i]->n_ineq, STATUS_ERROR)) goto error; @@ -1268,7 +1382,7 @@ goto done; ineq_j = ineq_status_in(map->p[j], tabs[j], tabs[i]); - if (!ineq_j) + if (map->p[j]->n_ineq && !ineq_j) goto error; if (any(ineq_j, map->p[j]->n_ineq, STATUS_ERROR)) goto error; @@ -1299,10 +1413,8 @@ /* BAD ADJ INEQ */ } else if (any(ineq_i, map->p[i]->n_ineq, STATUS_ADJ_INEQ) || any(ineq_j, map->p[j]->n_ineq, STATUS_ADJ_INEQ)) { - if (!any(eq_i, 2 * map->p[i]->n_eq, STATUS_CUT) && - !any(eq_j, 2 * map->p[j]->n_eq, STATUS_CUT)) - changed = check_adj_ineq(map, i, j, tabs, - ineq_i, ineq_j); + changed = check_adj_ineq(map, i, j, tabs, + eq_i, ineq_i, eq_j, ineq_j); } else { if (!any(eq_i, 2 * map->p[i]->n_eq, STATUS_CUT) && !any(eq_j, 2 * map->p[j]->n_eq, STATUS_CUT)) @@ -1384,7 +1496,7 @@ goto error; eq_i = eq_status_in(bmap, tabs[j]); - if (!eq_i) + if (bmap->n_eq && !eq_i) goto error; if (any(eq_i, 2 * bmap->n_eq, STATUS_ERROR)) goto error; @@ -1392,7 +1504,7 @@ goto done; ineq_i = ineq_status_in(bmap, NULL, tabs[j]); - if (!ineq_i) + if (bmap->n_ineq && !ineq_i) goto error; if (any(ineq_i, bmap->n_ineq, STATUS_ERROR)) goto error; @@ -1423,7 +1535,7 @@ * * If the two basic maps have the same number of divs, then * they must necessarily be different. Otherwise, we would have - * called coalesce_local_pair. We therefore don't do try anyhing + * called coalesce_local_pair. We therefore don't try anything * in this case. * * We first check if the divs of "i" are all known and form a subset @@ -1458,7 +1570,7 @@ exp1 = isl_alloc_array(ctx, int, div_i->n_row); exp2 = isl_alloc_array(ctx, int, div_j->n_row); - if (!exp1 || !exp2) + if ((div_i->n_row && !exp1) || (div_j->n_row && !exp2)) goto error; div = isl_merge_divs(div_i, div_j, exp1, exp2); diff -Nru isl-0.11.2/isl_config.h.in isl-0.12.1/isl_config.h.in --- isl-0.11.2/isl_config.h.in 2013-04-09 16:45:50.000000000 +0000 +++ isl-0.12.1/isl_config.h.in 2013-07-24 11:05:12.000000000 +0000 @@ -19,6 +19,9 @@ */ #undef GCC_WARN_UNUSED_RESULT +/* result of mpz_gcdext needs to be normalized */ +#undef GMP_NORMALIZE_GCDEXT + /* Define if clang/Basic/DiagnosticOptions.h exists */ #undef HAVE_BASIC_DIAGNOSTICOPTIONS_H @@ -38,6 +41,9 @@ /* Define if Driver constructor takes IsProduction argument */ #undef HAVE_ISPRODUCTION +/* Define to 1 if you have the `gmp' library (-lgmp). */ +#undef HAVE_LIBGMP + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H diff -Nru isl-0.11.2/isl_constraint.c isl-0.12.1/isl_constraint.c --- isl-0.11.2/isl_constraint.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_constraint.c 2013-07-24 11:04:50.000000000 +0000 @@ -16,6 +16,12 @@ #include #include #include +#include + +#undef BASE +#define BASE constraint + +#include isl_ctx *isl_constraint_get_ctx(__isl_keep isl_constraint *c) { @@ -403,6 +409,20 @@ isl_int_set(*v, constraint->v->el[0]); } +/* Return the constant term of "constraint". + */ +__isl_give isl_val *isl_constraint_get_constant_val( + __isl_keep isl_constraint *constraint) +{ + isl_ctx *ctx; + + if (!constraint) + return NULL; + + ctx = isl_constraint_get_ctx(constraint); + return isl_val_int_from_isl_int(ctx, constraint->v->el[0]); +} + void isl_constraint_get_coefficient(struct isl_constraint *constraint, enum isl_dim_type type, int pos, isl_int *v) { @@ -417,6 +437,26 @@ isl_int_set(*v, constraint->v->el[pos]); } +/* Return the coefficient of the variable of type "type" at position "pos" + * of "constraint". + */ +__isl_give isl_val *isl_constraint_get_coefficient_val( + __isl_keep isl_constraint *constraint, enum isl_dim_type type, int pos) +{ + isl_ctx *ctx; + + if (!constraint) + return NULL; + + ctx = isl_constraint_get_ctx(constraint); + if (pos < 0 || pos >= isl_local_space_dim(constraint->ls, type)) + isl_die(ctx, isl_error_invalid, + "position out of bounds", return NULL); + + pos += isl_local_space_offset(constraint->ls, type); + return isl_val_int_from_isl_int(ctx, constraint->v->el[pos]); +} + __isl_give isl_aff *isl_constraint_get_div(__isl_keep isl_constraint *constraint, int pos) { @@ -441,6 +481,26 @@ return constraint; } +/* Replace the constant term of "constraint" by "v". + */ +__isl_give isl_constraint *isl_constraint_set_constant_val( + __isl_take isl_constraint *constraint, __isl_take isl_val *v) +{ + constraint = isl_constraint_cow(constraint); + if (!constraint || !v) + goto error; + if (!isl_val_is_int(v)) + isl_die(isl_constraint_get_ctx(constraint), isl_error_invalid, + "expecting integer value", goto error); + constraint->v = isl_vec_set_element_val(constraint->v, 0, v); + if (!constraint->v) + constraint = isl_constraint_free(constraint); + return constraint; +error: + isl_val_free(v); + return isl_constraint_free(constraint); +} + __isl_give isl_constraint *isl_constraint_set_constant_si( __isl_take isl_constraint *constraint, int v) { @@ -483,6 +543,34 @@ return constraint; } +/* Replace the coefficient of the variable of type "type" at position "pos" + * of "constraint" by "v". + */ +__isl_give isl_constraint *isl_constraint_set_coefficient_val( + __isl_take isl_constraint *constraint, + enum isl_dim_type type, int pos, isl_val *v) +{ + constraint = isl_constraint_cow(constraint); + if (!constraint || !v) + goto error; + if (!isl_val_is_int(v)) + isl_die(isl_constraint_get_ctx(constraint), isl_error_invalid, + "expecting integer value", goto error); + + if (pos >= isl_local_space_dim(constraint->ls, type)) + isl_die(isl_constraint_get_ctx(constraint), isl_error_invalid, + "position out of bounds", goto error); + + pos += isl_local_space_offset(constraint->ls, type); + constraint->v = isl_vec_set_element_val(constraint->v, pos, v); + if (!constraint->v) + constraint = isl_constraint_free(constraint); + return constraint; +error: + isl_val_free(v); + return isl_constraint_free(constraint); +} + __isl_give isl_constraint *isl_constraint_set_coefficient_si( __isl_take isl_constraint *constraint, enum isl_dim_type type, int pos, int v) @@ -1163,33 +1251,32 @@ return aff; } -/* Construct an equality constraint equating the given affine expression - * to zero. +/* Construct an inequality (eq = 0) or equality (eq = 1) constraint from "aff". + * In particular, construct aff >= 0 or aff = 0. + * + * The denominator of "aff" can be ignored. */ -__isl_give isl_constraint *isl_equality_from_aff(__isl_take isl_aff *aff) +static __isl_give isl_constraint *isl_constraint_alloc_aff(int eq, + __isl_take isl_aff *aff) { - int k; isl_local_space *ls; - isl_basic_set *bset; + isl_vec *v; if (!aff) return NULL; - ls = isl_aff_get_domain_local_space(aff); - bset = isl_basic_set_from_local_space(ls); - bset = isl_basic_set_extend_constraints(bset, 1, 0); - k = isl_basic_set_alloc_equality(bset); - if (k < 0) - goto error; - - isl_seq_cpy(bset->eq[k], aff->v->el + 1, aff->v->size - 1); + v = isl_vec_drop_els(isl_vec_copy(aff->v), 0, 1); isl_aff_free(aff); - return isl_basic_set_constraint(bset, &bset->eq[k]); -error: - isl_aff_free(aff); - isl_basic_set_free(bset); - return NULL; + return isl_constraint_alloc_vec(eq, ls, v); +} + +/* Construct an equality constraint equating the given affine expression + * to zero. + */ +__isl_give isl_constraint *isl_equality_from_aff(__isl_take isl_aff *aff) +{ + return isl_constraint_alloc_aff(1, aff); } /* Construct an inequality constraint enforcing the given affine expression @@ -1197,26 +1284,5 @@ */ __isl_give isl_constraint *isl_inequality_from_aff(__isl_take isl_aff *aff) { - int k; - isl_local_space *ls; - isl_basic_set *bset; - - if (!aff) - return NULL; - - ls = isl_aff_get_domain_local_space(aff); - bset = isl_basic_set_from_local_space(ls); - bset = isl_basic_set_extend_constraints(bset, 0, 1); - k = isl_basic_set_alloc_inequality(bset); - if (k < 0) - goto error; - - isl_seq_cpy(bset->ineq[k], aff->v->el + 1, aff->v->size - 1); - isl_aff_free(aff); - - return isl_basic_set_constraint(bset, &bset->ineq[k]); -error: - isl_aff_free(aff); - isl_basic_set_free(bset); - return NULL; + return isl_constraint_alloc_aff(0, aff); } diff -Nru isl-0.11.2/isl_constraint_private.h isl-0.12.1/isl_constraint_private.h --- isl-0.11.2/isl_constraint_private.h 2013-01-08 11:20:44.000000000 +0000 +++ isl-0.12.1/isl_constraint_private.h 2013-07-24 11:04:50.000000000 +0000 @@ -1,8 +1,9 @@ #ifndef ISL_CONSTRAINT_PRIVATE_H #define ISL_CONSTRAINT_PRIVATE_H -#include #include +#include +#include struct isl_constraint { int ref; @@ -12,6 +13,11 @@ isl_vec *v; }; +#undef EL +#define EL isl_constraint + +#include + struct isl_constraint *isl_basic_set_constraint(struct isl_basic_set *bset, isl_int **line); diff -Nru isl-0.11.2/isl_ctx.c isl-0.12.1/isl_ctx.c --- isl-0.11.2/isl_ctx.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_ctx.c 2013-07-24 11:04:50.000000000 +0000 @@ -11,6 +11,9 @@ #include #include +#define __isl_calloc(type,size) ((type *)calloc(1, size)) +#define __isl_calloc_type(type) __isl_calloc(type,sizeof(type)) + void isl_handle_error(isl_ctx *ctx, enum isl_error error, const char *msg, const char *file, int line) { @@ -86,7 +89,7 @@ opt_allocated = 1; } - ctx = isl_calloc_type(NULL, struct isl_ctx); + ctx = __isl_calloc_type(struct isl_ctx); if (!ctx) goto error; diff -Nru isl-0.11.2/isl_equalities.c isl-0.12.1/isl_equalities.c --- isl-0.11.2/isl_equalities.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_equalities.c 2013-07-24 11:04:50.000000000 +0000 @@ -1,16 +1,20 @@ /* * Copyright 2008-2009 Katholieke Universiteit Leuven + * Copyright 2010 INRIA Saclay * * Use of this software is governed by the MIT license * * Written by Sven Verdoolaege, K.U.Leuven, Departement * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium + * and INRIA Saclay - Ile-de-France, Parc Club Orsay Universite, + * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France */ #include #include #include "isl_map_private.h" #include "isl_equalities.h" +#include /* Given a set of modulo constraints * @@ -374,6 +378,59 @@ /* Given a set of equalities * + * B(y) + A x = 0 (*) + * + * compute and return an affine transformation T, + * + * y = T y' + * + * that bijectively maps the integer vectors y' to integer + * vectors y that satisfy the modulo constraints for some value of x. + * + * Let [H 0] be the Hermite Normal Form of A, i.e., + * + * A = [H 0] Q + * + * Then y is a solution of (*) iff + * + * H^-1 B(y) (= - [I 0] Q x) + * + * is an integer vector. Let d be the common denominator of H^-1. + * We impose + * + * d H^-1 B(y) = 0 mod d + * + * and compute the solution using isl_mat_parameter_compression. + */ +__isl_give isl_mat *isl_mat_parameter_compression_ext(__isl_take isl_mat *B, + __isl_take isl_mat *A) +{ + isl_ctx *ctx; + isl_vec *d; + int n_row, n_col; + + if (!A) + return isl_mat_free(B); + + ctx = isl_mat_get_ctx(A); + n_row = A->n_row; + n_col = A->n_col; + A = isl_mat_left_hermite(A, 0, NULL, NULL); + A = isl_mat_drop_cols(A, n_row, n_col - n_row); + A = isl_mat_lin_to_aff(A); + A = isl_mat_right_inverse(A); + d = isl_vec_alloc(ctx, n_row); + if (A) + d = isl_vec_set(d, A->row[0][0]); + A = isl_mat_drop_rows(A, 0, 1); + A = isl_mat_drop_cols(A, 0, 1); + B = isl_mat_product(A, B); + + return isl_mat_parameter_compression(B, d); +} + +/* Given a set of equalities + * * M x - c = 0 * * this function computes a unimodular transformation from a lower-dimensional @@ -413,8 +470,8 @@ * * x2' = Q2 x */ -struct isl_mat *isl_mat_variable_compression(struct isl_mat *B, - struct isl_mat **T2) +__isl_give isl_mat *isl_mat_variable_compression(__isl_take isl_mat *B, + __isl_give isl_mat **T2) { int i; struct isl_mat *H = NULL, *C = NULL, *H1, *U = NULL, *U1, *U2, *TC; @@ -690,3 +747,35 @@ isl_int_clear(r); return -1; } + +/* Check if dimension "dim" belongs to a residue class + * i_dim \equiv r mod m + * with m != 1 and if so return m in *modulo and r in *residue. + * As a special case, when i_dim has a fixed value v, then + * *modulo is set to 0 and *residue to v. + * + * If i_dim does not belong to such a residue class, then *modulo + * is set to 1 and *residue is set to 0. + */ +int isl_set_dim_residue_class_val(__isl_keep isl_set *set, + int pos, __isl_give isl_val **modulo, __isl_give isl_val **residue) +{ + *modulo = NULL; + *residue = NULL; + if (!set) + return -1; + *modulo = isl_val_alloc(isl_set_get_ctx(set)); + *residue = isl_val_alloc(isl_set_get_ctx(set)); + if (!*modulo || !*residue) + goto error; + if (isl_set_dim_residue_class(set, pos, + &(*modulo)->n, &(*residue)->n) < 0) + goto error; + isl_int_set_si((*modulo)->d, 1); + isl_int_set_si((*residue)->d, 1); + return 0; +error: + isl_val_free(*modulo); + isl_val_free(*residue); + return -1; +} diff -Nru isl-0.11.2/isl_equalities.h isl-0.12.1/isl_equalities.h --- isl-0.11.2/isl_equalities.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_equalities.h 2013-07-01 13:12:40.000000000 +0000 @@ -17,10 +17,12 @@ extern "C" { #endif -struct isl_mat *isl_mat_variable_compression( - struct isl_mat *B, struct isl_mat **T2); +__isl_give isl_mat *isl_mat_variable_compression(__isl_take isl_mat *B, + __isl_give isl_mat **T2); struct isl_mat *isl_mat_parameter_compression( struct isl_mat *B, struct isl_vec *d); +__isl_give isl_mat *isl_mat_parameter_compression_ext(__isl_take isl_mat *B, + __isl_take isl_mat *A); struct isl_basic_set *isl_basic_set_remove_equalities( struct isl_basic_set *bset, struct isl_mat **T, struct isl_mat **T2); diff -Nru isl-0.11.2/isl_flow.c isl-0.12.1/isl_flow.c --- isl-0.11.2/isl_flow.c 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/isl_flow.c 2013-07-24 10:34:06.000000000 +0000 @@ -373,7 +373,7 @@ */ static __isl_give isl_flow *isl_flow_alloc(__isl_keep isl_access_info *acc) { - int i; + int i, n; struct isl_ctx *ctx; struct isl_flow *dep; @@ -385,12 +385,12 @@ if (!dep) return NULL; - dep->dep = isl_calloc_array(ctx, struct isl_labeled_map, - 2 * acc->n_must + acc->n_may); - if (!dep->dep) + n = 2 * acc->n_must + acc->n_may; + dep->dep = isl_calloc_array(ctx, struct isl_labeled_map, n); + if (n && !dep->dep) goto error; - dep->n_source = 2 * acc->n_must + acc->n_may; + dep->n_source = n; for (i = 0; i < acc->n_must; ++i) { isl_space *dim; dim = space_align_and_join( @@ -1127,7 +1127,6 @@ isl_space *dim; struct isl_sched_info *info; int i, n; - isl_int v; if (!map) return NULL; @@ -1144,16 +1143,21 @@ return NULL; info->is_cst = isl_alloc_array(ctx, int, n); info->cst = isl_vec_alloc(ctx, n); - if (!info->is_cst || !info->cst) + if (n && (!info->is_cst || !info->cst)) goto error; - isl_int_init(v); for (i = 0; i < n; ++i) { - info->is_cst[i] = isl_map_plain_is_fixed(map, isl_dim_in, i, - &v); - info->cst = isl_vec_set_element(info->cst, i, v); + isl_val *v; + + v = isl_map_plain_get_val_if_fixed(map, isl_dim_in, i); + if (!v) + goto error; + info->is_cst[i] = !isl_val_is_nan(v); + if (info->is_cst[i]) + info->cst = isl_vec_set_element_val(info->cst, i, v); + else + isl_val_free(v); } - isl_int_clear(v); return info; error: @@ -1254,7 +1258,6 @@ struct isl_sched_info *info2 = second; int n1, n2; int i; - isl_int v1, v2; n1 = isl_vec_size(info1->cst); n2 = isl_vec_size(info2->cst); @@ -1262,28 +1265,22 @@ if (n2 < n1) n1 = n2; - isl_int_init(v1); - isl_int_init(v2); for (i = 0; i < n1; ++i) { int r; + int cmp; if (!info1->is_cst[i]) continue; if (!info2->is_cst[i]) continue; - isl_vec_get_element(info1->cst, i, &v1); - isl_vec_get_element(info2->cst, i, &v2); - if (isl_int_eq(v1, v2)) + cmp = isl_vec_cmp_element(info1->cst, info2->cst, i); + if (cmp == 0) continue; - r = 2 * i + isl_int_lt(v1, v2); + r = 2 * i + (cmp < 0); - isl_int_clear(v1); - isl_int_clear(v2); return r; } - isl_int_clear(v1); - isl_int_clear(v2); return 2 * n1; } @@ -1322,7 +1319,8 @@ data->accesses = isl_access_info_alloc(isl_map_copy(map), data->sink_info, &before, data->count); - if (!data->sink_info || !data->source_info || !data->accesses) + if (!data->sink_info || (data->count && !data->source_info) || + !data->accesses) goto error; data->count = 0; data->must = 1; diff -Nru isl-0.11.2/isl_fold.c isl-0.12.1/isl_fold.c --- isl-0.11.2/isl_fold.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_fold.c 2013-07-24 11:04:50.000000000 +0000 @@ -17,6 +17,7 @@ #include #include #include +#include #include enum isl_fold isl_fold_type_negate(enum isl_fold type) @@ -650,6 +651,8 @@ #define PARTS pw_qpolynomial_fold #define ALIGN_DOMAIN +#define NO_SUB + #include __isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_empty(enum isl_fold type, @@ -1628,3 +1631,50 @@ { return isl_qpolynomial_fold_mul_isl_int(fold, v); } + +/* Multiply "fold" by "v". + */ +__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_scale_val( + __isl_take isl_qpolynomial_fold *fold, __isl_take isl_val *v) +{ + int i; + + if (!fold || !v) + goto error; + + if (isl_val_is_one(v)) { + isl_val_free(v); + return fold; + } + if (isl_val_is_zero(v)) { + isl_qpolynomial_fold *zero; + isl_space *space = isl_qpolynomial_fold_get_domain_space(fold); + zero = isl_qpolynomial_fold_empty(fold->type, space); + isl_qpolynomial_fold_free(fold); + isl_val_free(v); + return zero; + } + if (!isl_val_is_rat(v)) + isl_die(isl_qpolynomial_fold_get_ctx(fold), isl_error_invalid, + "expecting rational factor", goto error); + + fold = isl_qpolynomial_fold_cow(fold); + if (!fold) + goto error; + + if (isl_val_is_neg(v)) + fold->type = isl_fold_type_negate(fold->type); + for (i = 0; i < fold->n; ++i) { + fold->qp[i] = isl_qpolynomial_scale_val(fold->qp[i], + isl_val_copy(v)); + if (!fold->qp[i]) + goto error; + } + + isl_val_free(v); + return fold; +error: + isl_val_free(v); + isl_qpolynomial_fold_free(fold); + return NULL; +} diff -Nru isl-0.11.2/isl_gmp.c isl-0.12.1/isl_gmp.c --- isl-0.11.2/isl_gmp.c 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/isl_gmp.c 2013-07-01 13:12:40.000000000 +0000 @@ -1,3 +1,4 @@ +#include /* * Copyright 2008-2009 Katholieke Universiteit Leuven * @@ -7,7 +8,7 @@ * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium */ -#include +#include uint32_t isl_gmp_hash(mpz_t v, uint32_t hash) { @@ -22,3 +23,36 @@ isl_hash_byte(hash, *data); return hash; } + +/* This function tries to produce outputs that do not depend on + * the version of GMP that is being used. + * + * In particular, when computing the extended gcd of -1 and 9, + * some versions will produce + * + * 1 = -1 * -1 + 0 * 9 + * + * while other versions will produce + * + * 1 = 8 * -1 + 1 * 9 + * + * If configure detects that we are in the former case, then + * mpz_gcdext will be called directly. Otherwise, this function + * is called and then we try to mimic the behavior of the other versions. + */ +void isl_gmp_gcdext(mpz_t G, mpz_t S, mpz_t T, mpz_t A, mpz_t B) +{ + if (mpz_divisible_p(B, A)) { + mpz_set_si(S, mpz_sgn(A)); + mpz_set_si(T, 0); + mpz_abs(G, A); + return; + } + if (mpz_divisible_p(A, B)) { + mpz_set_si(S, 0); + mpz_set_si(T, mpz_sgn(B)); + mpz_abs(G, B); + return; + } + mpz_gcdext(G, S, T, A, B); +} diff -Nru isl-0.11.2/isl_hmap_map_basic_set.c isl-0.12.1/isl_hmap_map_basic_set.c --- isl-0.11.2/isl_hmap_map_basic_set.c 2012-12-07 12:11:30.000000000 +0000 +++ isl-0.12.1/isl_hmap_map_basic_set.c 2013-07-24 11:02:32.000000000 +0000 @@ -78,7 +78,7 @@ entry = isl_hash_table_find(ctx, &hmap->table, hash, &has_key, key, 1); if (!entry) - return -1; + goto error; if (entry->data) { pair = entry->data; @@ -89,14 +89,15 @@ } pair = isl_alloc_type(ctx, struct isl_map_basic_set_pair); - if (!pair) { - isl_map_free(key); - isl_basic_set_free(val); - return -1; - } + if (!pair) + goto error; entry->data = pair; pair->key = key; pair->val = val; return 0; +error: + isl_map_free(key); + isl_basic_set_free(val); + return -1; } diff -Nru isl-0.11.2/isl_id.c isl-0.12.1/isl_id.c --- isl-0.11.2/isl_id.c 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/isl_id.c 2013-07-24 11:02:32.000000000 +0000 @@ -11,6 +11,11 @@ #include #include +#undef BASE +#define BASE id + +#include + /* A special, static isl_id to use as domains (and ranges) * of sets and parameters domains. * The user should never get a hold on this isl_id. diff -Nru isl-0.11.2/isl_id_private.h isl-0.12.1/isl_id_private.h --- isl-0.11.2/isl_id_private.h 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/isl_id_private.h 2013-07-01 13:12:40.000000000 +0000 @@ -28,6 +28,11 @@ __isl_give void (*free_user)(void *user); }; +#undef EL +#define EL isl_id + +#include + uint32_t isl_hash_id(uint32_t hash, __isl_keep isl_id *id); extern isl_id isl_id_none; diff -Nru isl-0.11.2/isl_ilp.c isl-0.12.1/isl_ilp.c --- isl-0.11.2/isl_ilp.c 2013-04-07 15:38:34.000000000 +0000 +++ isl-0.12.1/isl_ilp.c 2013-07-24 11:04:50.000000000 +0000 @@ -16,6 +16,7 @@ #include #include #include +#include /* Given a basic set "bset", construct a basic set U such that for * each element x in U, the whole unit box positioned at x is inside @@ -375,6 +376,7 @@ isl_mat *bset_div = NULL; isl_mat *div = NULL; enum isl_lp_result res; + int bset_n_div, obj_n_div; if (!bset || !obj) return isl_lp_error; @@ -388,16 +390,18 @@ "expecting integer affine expression", return isl_lp_error); - if (bset->n_div == 0 && obj->ls->div->n_row == 0) + bset_n_div = isl_basic_set_dim(bset, isl_dim_div); + obj_n_div = isl_aff_dim(obj, isl_dim_div); + if (bset_n_div == 0 && obj_n_div == 0) return basic_set_opt(bset, max, obj, opt); bset = isl_basic_set_copy(bset); obj = isl_aff_copy(obj); bset_div = extract_divs(bset); - exp1 = isl_alloc_array(ctx, int, bset_div->n_row); - exp2 = isl_alloc_array(ctx, int, obj->ls->div->n_row); - if (!bset_div || !exp1 || !exp2) + exp1 = isl_alloc_array(ctx, int, bset_n_div); + exp2 = isl_alloc_array(ctx, int, obj_n_div); + if (!bset_div || (bset_n_div && !exp1) || (obj_n_div && !exp2)) goto error; div = isl_merge_divs(bset_div, obj->ls->div, exp1, exp2); @@ -513,3 +517,122 @@ { return isl_set_opt(set, 0, obj, opt); } + +/* Convert the result of a function that returns an isl_lp_result + * to an isl_val. The numerator of "v" is set to the optimal value + * if lp_res is isl_lp_ok. "max" is set if a maximum was computed. + * + * Return "v" with denominator set to 1 if lp_res is isl_lp_ok. + * Return NULL on error. + * Return a NaN if lp_res is isl_lp_empty. + * Return infinity or negative infinity if lp_res is isl_lp_unbounded, + * depending on "max". + */ +static __isl_give isl_val *convert_lp_result(enum isl_lp_result lp_res, + __isl_take isl_val *v, int max) +{ + isl_ctx *ctx; + + if (lp_res == isl_lp_ok) { + isl_int_set_si(v->d, 1); + return isl_val_normalize(v); + } + ctx = isl_val_get_ctx(v); + isl_val_free(v); + if (lp_res == isl_lp_error) + return NULL; + if (lp_res == isl_lp_empty) + return isl_val_nan(ctx); + if (max) + return isl_val_infty(ctx); + else + return isl_val_neginfty(ctx); +} + +/* Return the minimum (maximum if max is set) of the integer affine + * expression "obj" over the points in "bset". + * + * Return infinity or negative infinity if the optimal value is unbounded and + * NaN if "bset" is empty. + * + * Call isl_basic_set_opt and translate the results. + */ +__isl_give isl_val *isl_basic_set_opt_val(__isl_keep isl_basic_set *bset, + int max, __isl_keep isl_aff *obj) +{ + isl_ctx *ctx; + isl_val *res; + enum isl_lp_result lp_res; + + if (!bset || !obj) + return NULL; + + ctx = isl_aff_get_ctx(obj); + res = isl_val_alloc(ctx); + if (!res) + return NULL; + lp_res = isl_basic_set_opt(bset, max, obj, &res->n); + return convert_lp_result(lp_res, res, max); +} + +/* Return the maximum of the integer affine + * expression "obj" over the points in "bset". + * + * Return infinity or negative infinity if the optimal value is unbounded and + * NaN if "bset" is empty. + */ +__isl_give isl_val *isl_basic_set_max_val(__isl_keep isl_basic_set *bset, + __isl_keep isl_aff *obj) +{ + return isl_basic_set_opt_val(bset, 1, obj); +} + +/* Return the minimum (maximum if max is set) of the integer affine + * expression "obj" over the points in "set". + * + * Return infinity or negative infinity if the optimal value is unbounded and + * NaN if "bset" is empty. + * + * Call isl_set_opt and translate the results. + */ +__isl_give isl_val *isl_set_opt_val(__isl_keep isl_set *set, int max, + __isl_keep isl_aff *obj) +{ + isl_ctx *ctx; + isl_val *res; + enum isl_lp_result lp_res; + + if (!set || !obj) + return NULL; + + ctx = isl_aff_get_ctx(obj); + res = isl_val_alloc(ctx); + if (!res) + return NULL; + lp_res = isl_set_opt(set, max, obj, &res->n); + return convert_lp_result(lp_res, res, max); +} + +/* Return the minimum of the integer affine + * expression "obj" over the points in "set". + * + * Return infinity or negative infinity if the optimal value is unbounded and + * NaN if "bset" is empty. + */ +__isl_give isl_val *isl_set_min_val(__isl_keep isl_set *set, + __isl_keep isl_aff *obj) +{ + return isl_set_opt_val(set, 0, obj); +} + +/* Return the maximum of the integer affine + * expression "obj" over the points in "set". + * + * Return infinity or negative infinity if the optimal value is unbounded and + * NaN if "bset" is empty. + */ +__isl_give isl_val *isl_set_max_val(__isl_keep isl_set *set, + __isl_keep isl_aff *obj) +{ + return isl_set_opt_val(set, 1, obj); +} diff -Nru isl-0.11.2/isl_input.c isl-0.12.1/isl_input.c --- isl-0.11.2/isl_input.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_input.c 2013-07-24 11:04:50.000000000 +0000 @@ -26,6 +26,7 @@ #include #include #include +#include struct variable { char *name; @@ -168,6 +169,86 @@ return NULL; } +/* Read an isl_val from "s". + * + * The following token sequences are recognized + * + * "infty" -> infty + * "-" "infty" -> -infty + * "NaN" -> NaN + * n "/" d -> n/d + * v -> v + * + * where n, d and v are integer constants. + */ +__isl_give isl_val *isl_stream_read_val(struct isl_stream *s) +{ + struct isl_token *tok = NULL; + struct isl_token *tok2 = NULL; + isl_val *val; + + tok = next_token(s); + if (!tok) { + isl_stream_error(s, NULL, "unexpected EOF"); + goto error; + } + if (tok->type == ISL_TOKEN_INFTY) { + isl_token_free(tok); + return isl_val_infty(s->ctx); + } + if (tok->type == '-' && + isl_stream_eat_if_available(s, ISL_TOKEN_INFTY)) { + isl_token_free(tok); + return isl_val_neginfty(s->ctx); + } + if (tok->type == ISL_TOKEN_NAN) { + isl_token_free(tok); + return isl_val_nan(s->ctx); + } + if (tok->type != ISL_TOKEN_VALUE) { + isl_stream_error(s, tok, "expecting value"); + goto error; + } + + if (isl_stream_eat_if_available(s, '/')) { + tok2 = next_token(s); + if (!tok2) { + isl_stream_error(s, NULL, "unexpected EOF"); + goto error; + } + if (tok2->type != ISL_TOKEN_VALUE) { + isl_stream_error(s, tok2, "expecting value"); + goto error; + } + val = isl_val_rat_from_isl_int(s->ctx, tok->u.v, tok2->u.v); + val = isl_val_normalize(val); + } else { + val = isl_val_int_from_isl_int(s->ctx, tok->u.v); + } + + isl_token_free(tok); + isl_token_free(tok2); + return val; +error: + isl_token_free(tok); + isl_token_free(tok2); + return NULL; +} + +/* Read an isl_val from "str". + */ +struct isl_val *isl_val_read_from_str(struct isl_ctx *ctx, + const char *str) +{ + isl_val *val; + struct isl_stream *s = isl_stream_new_str(ctx, str); + if (!s) + return NULL; + val = isl_stream_read_val(s); + isl_stream_free(s); + return val; +} + static int accept_cst_factor(struct isl_stream *s, isl_int *f) { struct isl_token *tok; @@ -261,17 +342,51 @@ return NULL; } +/* Is "tok" the start of an integer division? + */ +static int is_start_of_div(struct isl_token *tok) +{ + if (!tok) + return 0; + if (tok->type == '[') + return 1; + if (tok->type == ISL_TOKEN_FLOOR) + return 1; + if (tok->type == ISL_TOKEN_CEIL) + return 1; + if (tok->type == ISL_TOKEN_FLOORD) + return 1; + if (tok->type == ISL_TOKEN_CEILD) + return 1; + return 0; +} + +/* Read an integer division from "s" and return it as an isl_pw_aff. + * + * The integer division can be of the form + * + * [] + * floor() + * ceil() + * floord(,) + * ceild(,) + */ static __isl_give isl_pw_aff *accept_div(struct isl_stream *s, __isl_take isl_space *dim, struct vars *v) { struct isl_token *tok; int f = 0; int c = 0; + int extra = 0; isl_pw_aff *pwaff = NULL; if (isl_stream_eat_if_available(s, ISL_TOKEN_FLOORD)) - f = 1; + extra = f = 1; else if (isl_stream_eat_if_available(s, ISL_TOKEN_CEILD)) + extra = c = 1; + else if (isl_stream_eat_if_available(s, ISL_TOKEN_FLOOR)) + f = 1; + else if (isl_stream_eat_if_available(s, ISL_TOKEN_CEIL)) c = 1; if (f || c) { if (isl_stream_eat(s, '(')) @@ -283,7 +398,7 @@ pwaff = accept_affine(s, isl_space_copy(dim), v); - if (f || c) { + if (extra) { if (isl_stream_eat(s, ',')) goto error; @@ -375,9 +490,7 @@ goto error; if (isl_stream_eat(s, ')')) goto error; - } else if (tok->type == '[' || - tok->type == ISL_TOKEN_FLOORD || - tok->type == ISL_TOKEN_CEILD) { + } else if (is_start_of_div(tok)) { isl_stream_push_token(s, tok); tok = NULL; res = accept_div(s, isl_space_copy(dim), v); @@ -463,10 +576,8 @@ isl_token_free(tok); continue; } - if (tok->type == '(' || tok->type == '[' || + if (tok->type == '(' || is_start_of_div(tok) || tok->type == ISL_TOKEN_MIN || tok->type == ISL_TOKEN_MAX || - tok->type == ISL_TOKEN_FLOORD || - tok->type == ISL_TOKEN_CEILD || tok->type == ISL_TOKEN_IDENT || tok->type == ISL_TOKEN_AFF) { isl_pw_aff *term; @@ -549,7 +660,7 @@ } } -static struct isl_map *read_disjuncts(struct isl_stream *s, +static __isl_give isl_map *read_formula(struct isl_stream *s, struct vars *v, __isl_take isl_map *map, int rational); static __isl_give isl_pw_aff *accept_extended_affine(struct isl_stream *s, __isl_take isl_space *dim, struct vars *v, int rational); @@ -639,7 +750,7 @@ isl_stream_push_token(s, tok); - cond = read_disjuncts(s, v, cond, rational); + cond = read_formula(s, v, cond, rational); return accept_ternary(s, cond, v, rational); } @@ -942,7 +1053,11 @@ new_name = p >= n; } - if (new_name) { + if (tok->type == '*') { + if (vars_add_anon(v) < 0) + goto error; + isl_token_free(tok); + } else if (new_name) { res = tuple_set_dim_name(res, i, v->v->name); isl_token_free(tok); if (isl_stream_eat_if_available(s, '=')) @@ -1202,7 +1317,7 @@ if (isl_stream_eat(s, ':')) goto error; - map = read_disjuncts(s, v, map, rational); + map = read_formula(s, v, map, rational); map = isl_set_unwrap(isl_map_domain(map)); vars_drop(v, v->n - n); @@ -1250,7 +1365,7 @@ isl_stream_next_token_is(s, ISL_TOKEN_TRUE) || isl_stream_next_token_is(s, ISL_TOKEN_FALSE) || isl_stream_next_token_is(s, ISL_TOKEN_MAP)) { - map = read_disjuncts(s, v, map, rational); + map = read_formula(s, v, map, rational); if (isl_stream_eat(s, ')')) goto error; tok->type = ISL_TOKEN_MAP; @@ -1285,7 +1400,7 @@ isl_stream_push_token(s, tok2); - map = read_disjuncts(s, v, map, rational); + map = read_formula(s, v, map, rational); if (isl_stream_eat(s, ')')) goto error; @@ -1349,7 +1464,7 @@ if (negate) res = isl_map_subtract(isl_map_copy(map), res); - while (isl_stream_eat_if_available(s, ISL_TOKEN_AND)) { + while (res && isl_stream_eat_if_available(s, ISL_TOKEN_AND)) { isl_map *res_i; negate = isl_stream_eat_if_available(s, ISL_TOKEN_NOT); @@ -1387,6 +1502,46 @@ return res; } +/* Read a first order formula from "s", add the corresponding + * constraints to "map" and return the result. + * + * In particular, read a formula of the form + * + * a + * + * or + * + * a implies b + * + * where a and b are disjunctions. + * + * In the first case, map is replaced by + * + * map \cap { [..] : a } + * + * In the second case, it is replaced by + * + * (map \setminus { [..] : a}) \cup (map \cap { [..] : b }) + */ +static __isl_give isl_map *read_formula(struct isl_stream *s, + struct vars *v, __isl_take isl_map *map, int rational) +{ + isl_map *res; + + res = read_disjuncts(s, v, isl_map_copy(map), rational); + + if (isl_stream_eat_if_available(s, ISL_TOKEN_IMPLIES)) { + isl_map *res2; + + res = isl_map_subtract(isl_map_copy(map), res); + res2 = read_disjuncts(s, v, map, rational); + res = isl_map_union(res, res2); + } else + isl_map_free(map); + + return res; +} + static int polylib_pos_to_isl_pos(__isl_keep isl_basic_map *bmap, int pos) { if (pos < isl_basic_map_dim(bmap, isl_dim_out)) @@ -1686,8 +1841,9 @@ pwqp = isl_pw_qpolynomial_pow(pwqp, pow); } else if (tok->type == ISL_TOKEN_VALUE) { struct isl_token *tok2; - tok2 = isl_stream_next_token(s); isl_qpolynomial *qp; + + tok2 = isl_stream_next_token(s); if (tok2 && tok2->type == '/') { isl_token_free(tok2); tok2 = next_token(s); @@ -1736,7 +1892,7 @@ pow = optional_power(s); qp = isl_qpolynomial_var_pow_on_domain(isl_map_get_space(map), pos, pow); pwqp = isl_pw_qpolynomial_from_qpolynomial(qp); - } else if (tok->type == '[') { + } else if (is_start_of_div(tok)) { isl_pw_aff *pwaff; int pow; @@ -1810,7 +1966,7 @@ return pwqp; } -static __isl_give isl_map *read_optional_disjuncts(struct isl_stream *s, +static __isl_give isl_map *read_optional_formula(struct isl_stream *s, __isl_take isl_map *map, struct vars *v, int rational) { struct isl_token *tok; @@ -1823,7 +1979,7 @@ if (tok->type == ':' || (tok->type == ISL_TOKEN_OR && !strcmp(tok->u.s, "|"))) { isl_token_free(tok); - map = read_disjuncts(s, v, map, rational); + map = read_formula(s, v, map, rational); } else isl_stream_push_token(s, tok); @@ -1841,7 +1997,7 @@ struct isl_set *set; pwqp = read_term(s, map, v); - map = read_optional_disjuncts(s, map, v, 0); + map = read_optional_formula(s, map, v, 0); set = isl_map_range(map); pwqp = isl_pw_qpolynomial_intersect_domain(pwqp, set); @@ -1879,7 +2035,7 @@ if (isl_stream_eat(s, ')')) goto error; - set = read_optional_disjuncts(s, set, v, 0); + set = read_optional_formula(s, set, v, 0); pwf = isl_pw_qpolynomial_fold_intersect_domain(pwf, set); vars_drop(v, v->n - n); @@ -1925,7 +2081,7 @@ if (isl_stream_next_token_is(s, ':')) { obj.type = isl_obj_set; - obj.v = read_optional_disjuncts(s, map, v, rational); + obj.v = read_optional_formula(s, map, v, rational); return obj; } @@ -1953,7 +2109,7 @@ isl_stream_push_token(s, tok); } - map = read_optional_disjuncts(s, map, v, rational); + map = read_optional_formula(s, map, v, rational); vars_drop(v, v->n - n); @@ -2630,7 +2786,7 @@ if (isl_stream_eat(s, ']')) goto error; - dom = read_optional_disjuncts(s, dom, v, 0); + dom = read_optional_formula(s, dom, v, 0); pwaff = isl_pw_aff_intersect_domain(pwaff, dom); return pwaff; @@ -2748,6 +2904,47 @@ return pma; } +/* Read an isl_union_pw_multi_aff from "s". + * We currently read a generic object and if it turns out to be a set or + * a map, we convert that to an isl_union_pw_multi_aff. + * It would be more efficient if we were to construct + * the isl_union_pw_multi_aff directly. + */ +__isl_give isl_union_pw_multi_aff *isl_stream_read_union_pw_multi_aff( + struct isl_stream *s) +{ + struct isl_obj obj; + + obj = obj_read(s); + if (!obj.v) + return NULL; + + if (obj.type == isl_obj_map || obj.type == isl_obj_set) + obj = to_union(s->ctx, obj); + if (obj.type == isl_obj_union_map) + return isl_union_pw_multi_aff_from_union_map(obj.v); + if (obj.type == isl_obj_union_set) + return isl_union_pw_multi_aff_from_union_set(obj.v); + + obj.type->free(obj.v); + isl_die(s->ctx, isl_error_invalid, "unexpected object type", + return NULL); +} + +/* Read an isl_union_pw_multi_aff from "str". + */ +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_read_from_str( + isl_ctx *ctx, const char *str) +{ + isl_union_pw_multi_aff *upma; + struct isl_stream *s = isl_stream_new_str(ctx, str); + if (!s) + return NULL; + upma = isl_stream_read_union_pw_multi_aff(s); + isl_stream_free(s); + return upma; +} + /* Assuming "pa" represents a single affine expression defined on a universe * domain, extract this affine expression. */ diff -Nru isl-0.11.2/isl_int.h isl-0.12.1/isl_int.h --- isl-0.11.2/isl_int.h 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/isl_int.h 2013-07-24 11:04:50.000000000 +0000 @@ -0,0 +1,124 @@ +/* + * Copyright 2008-2009 Katholieke Universiteit Leuven + * + * Use of this software is governed by the MIT license + * + * Written by Sven Verdoolaege, K.U.Leuven, Departement + * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium + */ + +#ifndef ISL_INT_H +#define ISL_INT_H + +#include +#include +#include +#include + +#ifndef mp_get_memory_functions +void mp_get_memory_functions( + void *(**alloc_func_ptr) (size_t), + void *(**realloc_func_ptr) (void *, size_t, size_t), + void (**free_func_ptr) (void *, size_t)); +#endif + +/* isl_int is the basic integer type. It currently always corresponds + * to a gmp mpz_t, but in the future, different types such as long long + * or cln::cl_I will be supported. + */ +typedef mpz_t isl_int; + +#define isl_int_init(i) mpz_init(i) +#define isl_int_clear(i) mpz_clear(i) + +#define isl_int_set(r,i) mpz_set(r,i) +#define isl_int_set_gmp(r,i) mpz_set(r,i) +#define isl_int_set_si(r,i) mpz_set_si(r,i) +#define isl_int_set_ui(r,i) mpz_set_ui(r,i) +#define isl_int_get_gmp(i,g) mpz_set(g,i) +#define isl_int_fits_slong(r) mpz_fits_slong_p(r) +#define isl_int_get_si(r) mpz_get_si(r) +#define isl_int_fits_ulong(r) mpz_fits_ulong_p(r) +#define isl_int_get_ui(r) mpz_get_ui(r) +#define isl_int_get_d(r) mpz_get_d(r) +#define isl_int_get_str(r) mpz_get_str(0, 10, r) +typedef void (*isl_int_print_gmp_free_t)(void *, size_t); +#define isl_int_free_str(s) \ + do { \ + isl_int_print_gmp_free_t gmp_free; \ + mp_get_memory_functions(NULL, NULL, &gmp_free); \ + (*gmp_free)(s, strlen(s) + 1); \ + } while (0) +#define isl_int_abs(r,i) mpz_abs(r,i) +#define isl_int_neg(r,i) mpz_neg(r,i) +#define isl_int_swap(i,j) mpz_swap(i,j) +#define isl_int_swap_or_set(i,j) mpz_swap(i,j) +#define isl_int_add_ui(r,i,j) mpz_add_ui(r,i,j) +#define isl_int_sub_ui(r,i,j) mpz_sub_ui(r,i,j) + +#define isl_int_add(r,i,j) mpz_add(r,i,j) +#define isl_int_sub(r,i,j) mpz_sub(r,i,j) +#define isl_int_mul(r,i,j) mpz_mul(r,i,j) +#define isl_int_mul_2exp(r,i,j) mpz_mul_2exp(r,i,j) +#define isl_int_mul_si(r,i,j) mpz_mul_si(r,i,j) +#define isl_int_mul_ui(r,i,j) mpz_mul_ui(r,i,j) +#define isl_int_pow_ui(r,i,j) mpz_pow_ui(r,i,j) +#define isl_int_addmul(r,i,j) mpz_addmul(r,i,j) +#define isl_int_addmul_ui(r,i,j) mpz_addmul_ui(r,i,j) +#define isl_int_submul(r,i,j) mpz_submul(r,i,j) +#define isl_int_submul_ui(r,i,j) mpz_submul_ui(r,i,j) + +#define isl_int_gcd(r,i,j) mpz_gcd(r,i,j) +#ifdef GMP_NORMALIZE_GCDEXT +void isl_gmp_gcdext(mpz_t G, mpz_t S, mpz_t T, mpz_t A, mpz_t B); +#define isl_int_gcdext(g,x,y,i,j) isl_gmp_gcdext(g,x,y,i,j) +#else +#define isl_int_gcdext(g,x,y,i,j) mpz_gcdext(g,x,y,i,j) +#endif +#define isl_int_lcm(r,i,j) mpz_lcm(r,i,j) +#define isl_int_divexact(r,i,j) mpz_divexact(r,i,j) +#define isl_int_divexact_ui(r,i,j) mpz_divexact_ui(r,i,j) +#define isl_int_tdiv_q(r,i,j) mpz_tdiv_q(r,i,j) +#define isl_int_cdiv_q(r,i,j) mpz_cdiv_q(r,i,j) +#define isl_int_fdiv_q(r,i,j) mpz_fdiv_q(r,i,j) +#define isl_int_fdiv_r(r,i,j) mpz_fdiv_r(r,i,j) +#define isl_int_fdiv_q_ui(r,i,j) mpz_fdiv_q_ui(r,i,j) + +#define isl_int_read(r,s) mpz_set_str(r,s,10) +#define isl_int_print(out,i,width) \ + do { \ + char *s; \ + s = mpz_get_str(0, 10, i); \ + fprintf(out, "%*s", width, s); \ + isl_int_free_str(s); \ + } while (0) + +#define isl_int_sgn(i) mpz_sgn(i) +#define isl_int_cmp(i,j) mpz_cmp(i,j) +#define isl_int_cmp_si(i,si) mpz_cmp_si(i,si) +#define isl_int_eq(i,j) (mpz_cmp(i,j) == 0) +#define isl_int_ne(i,j) (mpz_cmp(i,j) != 0) +#define isl_int_lt(i,j) (mpz_cmp(i,j) < 0) +#define isl_int_le(i,j) (mpz_cmp(i,j) <= 0) +#define isl_int_gt(i,j) (mpz_cmp(i,j) > 0) +#define isl_int_ge(i,j) (mpz_cmp(i,j) >= 0) +#define isl_int_abs_eq(i,j) (mpz_cmpabs(i,j) == 0) +#define isl_int_abs_ne(i,j) (mpz_cmpabs(i,j) != 0) +#define isl_int_abs_lt(i,j) (mpz_cmpabs(i,j) < 0) +#define isl_int_abs_gt(i,j) (mpz_cmpabs(i,j) > 0) +#define isl_int_abs_ge(i,j) (mpz_cmpabs(i,j) >= 0) + + +#define isl_int_is_zero(i) (isl_int_sgn(i) == 0) +#define isl_int_is_one(i) (isl_int_cmp_si(i,1) == 0) +#define isl_int_is_negone(i) (isl_int_cmp_si(i,-1) == 0) +#define isl_int_is_pos(i) (isl_int_sgn(i) > 0) +#define isl_int_is_neg(i) (isl_int_sgn(i) < 0) +#define isl_int_is_nonpos(i) (isl_int_sgn(i) <= 0) +#define isl_int_is_nonneg(i) (isl_int_sgn(i) >= 0) +#define isl_int_is_divisible_by(i,j) mpz_divisible_p(i,j) + +uint32_t isl_gmp_hash(mpz_t v, uint32_t hash); +#define isl_int_hash(v,h) isl_gmp_hash(v,h) + +#endif diff -Nru isl-0.11.2/isl_list.c isl-0.12.1/isl_list.c --- isl-0.11.2/isl_list.c 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/isl_list.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -/* - * Copyright 2008-2009 Katholieke Universiteit Leuven - * - * Use of this software is governed by the MIT license - * - * Written by Sven Verdoolaege, K.U.Leuven, Departement - * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium - */ - -#include -#include -#include -#include -#include - -#undef BASE -#define BASE constraint - -#include - -#undef BASE -#define BASE basic_set - -#include - -#undef BASE -#define BASE set - -#include - -#undef BASE -#define BASE aff - -#include - -#undef BASE -#define BASE pw_aff - -#include - -#undef BASE -#define BASE band - -#include - -#undef BASE -#define BASE id - -#include diff -Nru isl-0.11.2/isl_list_private.h isl-0.12.1/isl_list_private.h --- isl-0.11.2/isl_list_private.h 2013-03-27 11:09:33.000000000 +0000 +++ isl-0.12.1/isl_list_private.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ifndef ISL_LIST_PRIVATE_H -#define ISL_LIST_PRIVATE_H - -#include - -#undef EL -#define EL isl_constraint - -#include - -#undef EL -#define EL isl_basic_set - -#include - -#undef EL -#define EL isl_set - -#include - -#undef EL -#define EL isl_aff - -#include - -#undef EL -#define EL isl_pw_aff - -#include - -#undef EL -#define EL isl_band - -#include - -#undef EL -#define EL isl_id - -#include - -#endif diff -Nru isl-0.11.2/isl_list_templ.c isl-0.12.1/isl_list_templ.c --- isl-0.11.2/isl_list_templ.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_list_templ.c 2013-07-01 13:12:40.000000000 +0000 @@ -1,7 +1,7 @@ /* * Copyright 2008-2009 Katholieke Universiteit Leuven * Copyright 2011 INRIA Saclay - * Copyright 2012 Ecole Normale Superieure + * Copyright 2012-2013 Ecole Normale Superieure * * Use of this software is governed by the MIT license * @@ -12,6 +12,9 @@ * and Ecole Normale Superieure, 45 rue d’Ulm, 75230 Paris, France */ +#include +#include + #define xCAT(A,B) A ## B #define CAT(A,B) xCAT(A,B) #undef EL @@ -20,6 +23,8 @@ #define FN(TYPE,NAME) xFN(TYPE,NAME) #define xLIST(EL) EL ## _list #define LIST(EL) xLIST(EL) +#define xS(TYPE,NAME) struct TYPE ## _ ## NAME +#define S(TYPE,NAME) xS(TYPE,NAME) isl_ctx *FN(LIST(EL),get_ctx)(__isl_keep LIST(EL) *list) { @@ -283,6 +288,157 @@ return 0; } +/* Internal data structure for isl_*_list_sort. + * + * "cmp" is the original comparison function. + * "user" is a user provided pointer that should be passed to "cmp". + */ +S(LIST(EL),sort_data) { + int (*cmp)(__isl_keep EL *a, __isl_keep EL *b, void *user); + void *user; +}; + +/* Compare two entries of an isl_*_list based on the user provided + * comparison function on pairs of isl_* objects. + */ +static int FN(LIST(EL),cmp)(const void *a, const void *b, void *user) +{ + S(LIST(EL),sort_data) *data = user; + EL * const *el1 = a; + EL * const *el2 = b; + + return data->cmp(*el1, *el2, data->user); +} + +/* Sort the elements of "list" in ascending order according to + * comparison function "cmp". + */ +__isl_give LIST(EL) *FN(LIST(EL),sort)(__isl_take LIST(EL) *list, + int (*cmp)(__isl_keep EL *a, __isl_keep EL *b, void *user), void *user) +{ + S(LIST(EL),sort_data) data = { cmp, user }; + + if (!list) + return NULL; + if (list->n <= 1) + return list; + list = FN(LIST(EL),cow)(list); + if (!list) + return NULL; + + if (isl_sort(list->p, list->n, sizeof(list->p[0]), + &FN(LIST(EL),cmp), &data) < 0) + return FN(LIST(EL),free)(list); + + return list; +} + +/* Internal data structure for isl_*_list_foreach_scc. + * + * "list" is the original list. + * "follows" is the user provided callback that defines the edges of the graph. + */ +S(LIST(EL),foreach_scc_data) { + LIST(EL) *list; + int (*follows)(__isl_keep EL *a, __isl_keep EL *b, void *user); + void *follows_user; +}; + +/* Does element i of data->list follow element j? + * + * Use the user provided callback to find out. + */ +static int FN(LIST(EL),follows)(int i, int j, void *user) +{ + S(LIST(EL),foreach_scc_data) *data = user; + + return data->follows(data->list->p[i], data->list->p[j], + data->follows_user); +} + +/* Call "fn" on the sublist of "list" that consists of the elements + * with indices specified by the "n" elements of "pos". + */ +static int FN(LIST(EL),call_on_scc)(__isl_keep LIST(EL) *list, int *pos, int n, + int (*fn)(__isl_take LIST(EL) *scc, void *user), void *user) +{ + int i; + isl_ctx *ctx; + LIST(EL) *slice; + + ctx = FN(LIST(EL),get_ctx)(list); + slice = FN(LIST(EL),alloc)(ctx, n); + for (i = 0; i < n; ++i) { + EL *el; + + el = FN(EL,copy)(list->p[pos[i]]); + slice = FN(LIST(EL),add)(slice, el); + } + + return fn(slice, user); +} + +/* Call "fn" on each of the strongly connected components (SCCs) of + * the graph with as vertices the elements of "list" and + * a directed edge from node b to node a iff follows(a, b) + * returns 1. follows should return -1 on error. + * + * If SCC a contains a node i that follows a node j in another SCC b + * (i.e., follows(i, j, user) returns 1), then fn will be called on SCC a + * after being called on SCC b. + * + * We simply call isl_tarjan_graph_init, extract the SCCs from the result and + * call fn on each of them. + */ +int FN(LIST(EL),foreach_scc)(__isl_keep LIST(EL) *list, + int (*follows)(__isl_keep EL *a, __isl_keep EL *b, void *user), + void *follows_user, + int (*fn)(__isl_take LIST(EL) *scc, void *user), void *fn_user) +{ + S(LIST(EL),foreach_scc_data) data = { list, follows, follows_user }; + int i, n; + isl_ctx *ctx; + struct isl_tarjan_graph *g; + + if (!list) + return -1; + if (list->n == 0) + return 0; + if (list->n == 1) + return fn(FN(LIST(EL),copy)(list), fn_user); + + ctx = FN(LIST(EL),get_ctx)(list); + n = list->n; + g = isl_tarjan_graph_init(ctx, n, &FN(LIST(EL),follows), &data); + if (!g) + return -1; + + i = 0; + do { + int first; + + if (g->order[i] == -1) + isl_die(ctx, isl_error_internal, "cannot happen", + break); + first = i; + while (g->order[i] != -1) { + ++i; --n; + } + if (first == 0 && n == 0) { + isl_tarjan_graph_free(g); + return fn(FN(LIST(EL),copy)(list), fn_user); + } + if (FN(LIST(EL),call_on_scc)(list, g->order + first, i - first, + fn, fn_user) < 0) + break; + ++i; + } while (n); + + isl_tarjan_graph_free(g); + + return n > 0 ? -1 : 0; +} + __isl_give LIST(EL) *FN(FN(LIST(EL),from),BASE)(__isl_take EL *el) { isl_ctx *ctx; diff -Nru isl-0.11.2/isl_list_templ.h isl-0.12.1/isl_list_templ.h --- isl-0.11.2/isl_list_templ.h 2013-01-08 11:20:44.000000000 +0000 +++ isl-0.12.1/isl_list_templ.h 2013-07-01 13:12:40.000000000 +0000 @@ -13,12 +13,4 @@ struct EL *p[1]; }; -#define ISL_DECLARE_LIST_PRIVATE(EL) \ -__isl_give isl_##EL##_list *isl_##EL##_list_dup( \ - __isl_keep isl_##EL##_list *list); - -ISL_DECLARE_LIST_PRIVATE(basic_set) -ISL_DECLARE_LIST_PRIVATE(set) -ISL_DECLARE_LIST_PRIVATE(aff) -ISL_DECLARE_LIST_PRIVATE(pw_aff) -ISL_DECLARE_LIST_PRIVATE(band) +__isl_give LIST(EL) *FN(LIST(EL),dup)(__isl_keep LIST(EL) *list); diff -Nru isl-0.11.2/isl_local_space.c isl-0.12.1/isl_local_space.c --- isl-0.11.2/isl_local_space.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_local_space.c 2013-07-24 11:04:50.000000000 +0000 @@ -219,6 +219,9 @@ if (isl_int_is_zero(ls->div->row[pos][0])) isl_die(isl_local_space_get_ctx(ls), isl_error_invalid, "expression of div unknown", return NULL); + if (!isl_local_space_is_set(ls)) + isl_die(isl_local_space_get_ctx(ls), isl_error_invalid, + "cannot represent divs of map spaces", return NULL); aff = isl_aff_alloc(isl_local_space_copy(ls)); if (!aff) @@ -718,14 +721,13 @@ unsigned total; unsigned n_div; - ls = isl_local_space_cow(ls); if (!ls || !eq) goto error; total = isl_space_dim(eq->dim, isl_dim_all); if (isl_local_space_dim(ls, isl_dim_all) != total) isl_die(isl_local_space_get_ctx(ls), isl_error_invalid, - "dimensions don't match", goto error); + "spaces don't match", goto error); total++; n_div = eq->n_div; for (i = 0; i < eq->n_eq; ++i) { @@ -736,6 +738,12 @@ for (k = 0; k < ls->div->n_row; ++k) { if (isl_int_is_zero(ls->div->row[k][1 + j])) continue; + ls = isl_local_space_cow(ls); + if (!ls) + goto error; + ls->div = isl_mat_cow(ls->div); + if (!ls->div) + goto error; isl_seq_elim(ls->div->row[k] + 1, eq->eq[i], j, total, &ls->div->row[k][0]); normalize_div(ls, k); @@ -980,7 +988,7 @@ ctx = isl_local_space_get_ctx(ls); total = isl_local_space_dim(ls, isl_dim_all); active = isl_calloc_array(ctx, int, total); - if (!active) + if (total && !active) return NULL; for (i = 0; i < total; ++i) @@ -1104,7 +1112,7 @@ continue; } isl_seq_preimage(res->div->row[n_div_ma + i], ls->div->row[i], - ma, n_div_ma, n_div_ls, f, c1, c2, g, 1); + ma, 0, 0, n_div_ma, n_div_ls, f, c1, c2, g, 1); normalize_div(res, n_div_ma + i); } diff -Nru isl-0.11.2/isl_lp.c isl-0.12.1/isl_lp.c --- isl-0.11.2/isl_lp.c 2013-04-07 15:45:14.000000000 +0000 +++ isl-0.12.1/isl_lp.c 2013-07-24 11:04:50.000000000 +0000 @@ -14,6 +14,10 @@ #include #include "isl_tab.h" #include +#include +#include +#include +#include enum isl_lp_result isl_tab_solve_lp(struct isl_basic_map *bmap, int maximize, isl_int *f, isl_int denom, isl_int *opt, @@ -202,3 +206,164 @@ return isl_map_solve_lp((struct isl_map *)set, max, f, d, opt, opt_denom, sol); } + +/* Return the optimal (rational) value of "obj" over "bset", assuming + * that "obj" and "bset" have aligned parameters and divs. + * If "max" is set, then the maximal value is computed. + * Otherwise, the minimal value is computed. + * + * Return infinity or negative infinity if the optimal value is unbounded and + * NaN if "bset" is empty. + * + * Call isl_basic_set_solve_lp and translate the results. + */ +static __isl_give isl_val *basic_set_opt_lp( + __isl_keep isl_basic_set *bset, int max, __isl_keep isl_aff *obj) +{ + isl_ctx *ctx; + isl_val *res; + enum isl_lp_result lp_res; + + if (!bset || !obj) + return NULL; + + ctx = isl_aff_get_ctx(obj); + res = isl_val_alloc(ctx); + if (!res) + return NULL; + lp_res = isl_basic_set_solve_lp(bset, max, obj->v->el + 1, + obj->v->el[0], &res->n, &res->d, NULL); + if (lp_res == isl_lp_ok) + return isl_val_normalize(res); + isl_val_free(res); + if (lp_res == isl_lp_error) + return NULL; + if (lp_res == isl_lp_empty) + return isl_val_nan(ctx); + if (max) + return isl_val_infty(ctx); + else + return isl_val_neginfty(ctx); +} + +/* Return the optimal (rational) value of "obj" over "bset", assuming + * that "obj" and "bset" have aligned parameters. + * If "max" is set, then the maximal value is computed. + * Otherwise, the minimal value is computed. + * + * Return infinity or negative infinity if the optimal value is unbounded and + * NaN if "bset" is empty. + * + * Align the divs of "bset" and "obj" and call basic_set_opt_lp. + */ +static __isl_give isl_val *isl_basic_set_opt_lp_val_aligned( + __isl_keep isl_basic_set *bset, int max, __isl_keep isl_aff *obj) +{ + int *exp1 = NULL; + int *exp2 = NULL; + isl_ctx *ctx; + isl_mat *bset_div = NULL; + isl_mat *div = NULL; + isl_val *res; + int bset_n_div, obj_n_div; + + if (!bset || !obj) + return NULL; + + ctx = isl_aff_get_ctx(obj); + if (!isl_space_is_equal(bset->dim, obj->ls->dim)) + isl_die(ctx, isl_error_invalid, + "spaces don't match", return NULL); + + bset_n_div = isl_basic_set_dim(bset, isl_dim_div); + obj_n_div = isl_aff_dim(obj, isl_dim_div); + if (bset_n_div == 0 && obj_n_div == 0) + return basic_set_opt_lp(bset, max, obj); + + bset = isl_basic_set_copy(bset); + obj = isl_aff_copy(obj); + + bset_div = isl_basic_set_get_divs(bset); + exp1 = isl_alloc_array(ctx, int, bset_n_div); + exp2 = isl_alloc_array(ctx, int, obj_n_div); + if (!bset_div || (bset_n_div && !exp1) || (obj_n_div && !exp2)) + goto error; + + div = isl_merge_divs(bset_div, obj->ls->div, exp1, exp2); + + bset = isl_basic_set_expand_divs(bset, isl_mat_copy(div), exp1); + obj = isl_aff_expand_divs(obj, isl_mat_copy(div), exp2); + + res = basic_set_opt_lp(bset, max, obj); + + isl_mat_free(bset_div); + isl_mat_free(div); + free(exp1); + free(exp2); + isl_basic_set_free(bset); + isl_aff_free(obj); + + return res; +error: + isl_mat_free(div); + isl_mat_free(bset_div); + free(exp1); + free(exp2); + isl_basic_set_free(bset); + isl_aff_free(obj); + return NULL; +} + +/* Return the optimal (rational) value of "obj" over "bset". + * If "max" is set, then the maximal value is computed. + * Otherwise, the minimal value is computed. + * + * Return infinity or negative infinity if the optimal value is unbounded and + * NaN if "bset" is empty. + */ +static __isl_give isl_val *isl_basic_set_opt_lp_val( + __isl_keep isl_basic_set *bset, int max, __isl_keep isl_aff *obj) +{ + isl_val *res; + + if (!bset || !obj) + return NULL; + + if (isl_space_match(bset->dim, isl_dim_param, + obj->ls->dim, isl_dim_param)) + return isl_basic_set_opt_lp_val_aligned(bset, max, obj); + + bset = isl_basic_set_copy(bset); + obj = isl_aff_copy(obj); + bset = isl_basic_set_align_params(bset, isl_aff_get_domain_space(obj)); + obj = isl_aff_align_params(obj, isl_basic_set_get_space(bset)); + + res = isl_basic_set_opt_lp_val_aligned(bset, max, obj); + + isl_basic_set_free(bset); + isl_aff_free(obj); + + return res; +} + +/* Return the minimal (rational) value of "obj" over "bset". + * + * Return negative infinity if the minimal value is unbounded and + * NaN if "bset" is empty. + */ +__isl_give isl_val *isl_basic_set_min_lp_val(__isl_keep isl_basic_set *bset, + __isl_keep isl_aff *obj) +{ + return isl_basic_set_opt_lp_val(bset, 0, obj); +} + +/* Return the maximal (rational) value of "obj" over "bset". + * + * Return infinity if the maximal value is unbounded and + * NaN if "bset" is empty. + */ +__isl_give isl_val *isl_basic_set_max_lp_val(__isl_keep isl_basic_set *bset, + __isl_keep isl_aff *obj) +{ + return isl_basic_set_opt_lp_val(bset, 1, obj); +} diff -Nru isl-0.11.2/isl_map.c isl-0.12.1/isl_map.c --- isl-0.11.2/isl_map.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_map.c 2013-07-24 11:04:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * Copyright 2008-2009 Katholieke Universiteit Leuven * Copyright 2010 INRIA Saclay - * Copyright 2012 Ecole Normale Superieure + * Copyright 2012-2013 Ecole Normale Superieure * * Use of this software is governed by the MIT license * @@ -18,7 +18,6 @@ #include #include "isl_space_private.h" #include "isl_equalities.h" -#include #include #include #include @@ -33,6 +32,8 @@ #include #include #include +#include +#include static unsigned n(__isl_keep isl_space *dim, enum isl_dim_type type) { @@ -285,6 +286,13 @@ return div; } +/* Extract the divs in "bset" as a matrix. + */ +__isl_give isl_mat *isl_basic_set_get_divs(__isl_keep isl_basic_set *bset) +{ + return isl_basic_map_get_divs(bset); +} + __isl_give isl_local_space *isl_basic_map_get_local_space( __isl_keep isl_basic_map *bmap) { @@ -804,7 +812,7 @@ goto error; bmap->ineq = isl_alloc_array(ctx, isl_int *, n_ineq + n_eq); - if (!bmap->ineq) + if ((n_ineq + n_eq) && !bmap->ineq) goto error; if (extra == 0) { @@ -1673,13 +1681,25 @@ isl_basic_map_set_to_empty((struct isl_basic_map *)bset); } -void isl_basic_map_swap_div(struct isl_basic_map *bmap, int a, int b) +/* Swap divs "a" and "b" in "bmap" (without modifying any of the constraints + * of "bmap"). + */ +static void swap_div(__isl_keep isl_basic_map *bmap, int a, int b) { - int i; - unsigned off = isl_space_dim(bmap->dim, isl_dim_all); isl_int *t = bmap->div[a]; bmap->div[a] = bmap->div[b]; bmap->div[b] = t; +} + +/* Swap divs "a" and "b" in "bmap" and adjust the constraints and + * div definitions accordingly. + */ +void isl_basic_map_swap_div(struct isl_basic_map *bmap, int a, int b) +{ + int i; + unsigned off = isl_space_dim(bmap->dim, isl_dim_all); + + swap_div(bmap, a, b); for (i = 0; i < bmap->n_eq; ++i) isl_int_swap(bmap->eq[i][1+off+a], bmap->eq[i][1+off+b]); @@ -2708,6 +2728,9 @@ unsigned total; isl_int s; + if (!bmap || !vec) + return -1; + total = 1 + isl_basic_map_total_dim(bmap); if (total != vec->size) return -1; @@ -3052,6 +3075,7 @@ res = isl_basic_map_set_rational(res); if (isl_basic_map_plain_is_empty(bmap)) { isl_basic_map_free(bmap); + free(dim_map); return isl_basic_map_set_to_empty(res); } res = isl_basic_map_add_constraints_dim_map(res, bmap, dim_map); @@ -3354,31 +3378,22 @@ return res; } -/* Turn the n dimensions of type type, starting at first - * into existentially quantified variables. +/* Insert "n" rows in the divs of "bmap". + * + * The number of columns is not changed, which means that the last + * dimensions of "bmap" are being reintepreted as the new divs. + * The space of "bmap" is not adjusted, however, which means + * that "bmap" is left in an inconsistent state. Removing "n" dimensions + * from the space of "bmap" is the responsibility of the caller. */ -__isl_give isl_basic_map *isl_basic_map_project_out( - __isl_take isl_basic_map *bmap, - enum isl_dim_type type, unsigned first, unsigned n) +static __isl_give isl_basic_map *insert_div_rows(__isl_take isl_basic_map *bmap, + int n) { int i; size_t row_size; isl_int **new_div; isl_int *old; - if (n == 0) - return basic_map_space_reset(bmap, type); - - if (!bmap) - return NULL; - - if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL)) - return isl_basic_map_remove_dims(bmap, type, first, n); - - isl_assert(bmap->ctx, first + n <= isl_basic_map_dim(bmap, type), - goto error); - - bmap = move_last(bmap, type, first, n); bmap = isl_basic_map_cow(bmap); if (!bmap) return NULL; @@ -3388,10 +3403,10 @@ bmap->block2 = isl_blk_extend(bmap->ctx, bmap->block2, (bmap->extra + n) * (1 + row_size)); if (!bmap->block2.data) - goto error; + return isl_basic_map_free(bmap); new_div = isl_alloc_array(bmap->ctx, isl_int *, bmap->extra + n); if (!new_div) - goto error; + return isl_basic_map_free(bmap); for (i = 0; i < n; ++i) { new_div[i] = bmap->block2.data + (bmap->extra + i) * (1 + row_size); @@ -3404,6 +3419,34 @@ bmap->n_div += n; bmap->extra += n; + return bmap; +} + +/* Turn the n dimensions of type type, starting at first + * into existentially quantified variables. + */ +__isl_give isl_basic_map *isl_basic_map_project_out( + __isl_take isl_basic_map *bmap, + enum isl_dim_type type, unsigned first, unsigned n) +{ + if (n == 0) + return basic_map_space_reset(bmap, type); + + if (!bmap) + return NULL; + + if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL)) + return isl_basic_map_remove_dims(bmap, type, first, n); + + isl_assert(bmap->ctx, first + n <= isl_basic_map_dim(bmap, type), + goto error); + + bmap = move_last(bmap, type, first, n); + bmap = isl_basic_map_cow(bmap); + bmap = insert_div_rows(bmap, n); + if (!bmap) + return NULL; + bmap->dim = isl_space_drop_dims(bmap->dim, type, first, n); if (!bmap->dim) goto error; @@ -3496,6 +3539,14 @@ if (!bmap1 || !bmap2) goto error; + if (!isl_space_match(bmap1->dim, isl_dim_param, + bmap2->dim, isl_dim_param)) + isl_die(isl_basic_map_get_ctx(bmap1), isl_error_invalid, + "parameters don't match", goto error); + if (!isl_space_tuple_match(bmap1->dim, isl_dim_out, + bmap2->dim, isl_dim_in)) + isl_die(isl_basic_map_get_ctx(bmap1), isl_error_invalid, + "spaces don't match", goto error); dim_result = isl_space_join(isl_space_copy(bmap1->dim), isl_space_copy(bmap2->dim)); @@ -3812,6 +3863,26 @@ return NULL; } +/* Given a map A -> f(A) and an integer d, construct a map + * A -> floor(f(A)/d). + */ +__isl_give isl_map *isl_map_floordiv_val(__isl_take isl_map *map, + __isl_take isl_val *d) +{ + if (!map || !d) + goto error; + if (!isl_val_is_int(d)) + isl_die(isl_val_get_ctx(d), isl_error_invalid, + "expecting integer denominator", goto error); + map = isl_map_floordiv(map, d->n); + isl_val_free(d); + return map; +error: + isl_map_free(map); + isl_val_free(d); + return NULL; +} + static struct isl_basic_map *var_equal(struct isl_basic_map *bmap, unsigned pos) { int i; @@ -5289,6 +5360,39 @@ return NULL; } +/* Fix the value of the variable at position "pos" of type "type" of "bmap" + * to be equal to "v". + */ +__isl_give isl_basic_map *isl_basic_map_fix_val(__isl_take isl_basic_map *bmap, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *v) +{ + if (!bmap || !v) + goto error; + if (!isl_val_is_int(v)) + isl_die(isl_basic_map_get_ctx(bmap), isl_error_invalid, + "expecting integer value", goto error); + if (pos >= isl_basic_map_dim(bmap, type)) + isl_die(isl_basic_map_get_ctx(bmap), isl_error_invalid, + "index out of bounds", goto error); + pos += isl_basic_map_offset(bmap, type); + bmap = isl_basic_map_fix_pos(bmap, pos, v->n); + isl_val_free(v); + return bmap; +error: + isl_basic_map_free(bmap); + isl_val_free(v); + return NULL; +} + +/* Fix the value of the variable at position "pos" of type "type" of "bset" + * to be equal to "v". + */ +__isl_give isl_basic_set *isl_basic_set_fix_val(__isl_take isl_basic_set *bset, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *v) +{ + return isl_basic_map_fix_val(bset, type, pos, v); +} + struct isl_basic_set *isl_basic_set_fix_si(struct isl_basic_set *bset, enum isl_dim_type type, unsigned pos, int value) { @@ -5338,6 +5442,39 @@ return 0; } +/* Perform "fn" on each basic map of "map", where we may not be holding + * the only reference to "map". + * In particular, "fn" should be a semantics preserving operation + * that we want to apply to all copies of "map". We therefore need + * to be careful not to modify "map" in a way that breaks "map" + * in case anything goes wrong. + */ +__isl_give isl_map *isl_map_inline_foreach_basic_map(__isl_take isl_map *map, + __isl_give isl_basic_map *(*fn)(__isl_take isl_basic_map *bmap)) +{ + struct isl_basic_map *bmap; + int i; + + if (!map) + return NULL; + + for (i = map->n - 1; i >= 0; --i) { + bmap = isl_basic_map_copy(map->p[i]); + bmap = fn(bmap); + if (!bmap) + goto error; + isl_basic_map_free(map->p[i]); + map->p[i] = bmap; + if (remove_if_empty(map, i) < 0) + goto error; + } + + return map; +error: + isl_map_free(map); + return NULL; +} + struct isl_map *isl_map_fix_si(struct isl_map *map, enum isl_dim_type type, unsigned pos, int value) { @@ -5395,6 +5532,48 @@ return (struct isl_set *)isl_map_fix((isl_map *)set, type, pos, value); } +/* Fix the value of the variable at position "pos" of type "type" of "map" + * to be equal to "v". + */ +__isl_give isl_map *isl_map_fix_val(__isl_take isl_map *map, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *v) +{ + int i; + + map = isl_map_cow(map); + if (!map || !v) + goto error; + + if (!isl_val_is_int(v)) + isl_die(isl_map_get_ctx(map), isl_error_invalid, + "expecting integer value", goto error); + if (pos >= isl_map_dim(map, type)) + isl_die(isl_map_get_ctx(map), isl_error_invalid, + "index out of bounds", goto error); + for (i = map->n - 1; i >= 0; --i) { + map->p[i] = isl_basic_map_fix_val(map->p[i], type, pos, + isl_val_copy(v)); + if (remove_if_empty(map, i) < 0) + goto error; + } + ISL_F_CLR(map, ISL_MAP_NORMALIZED); + isl_val_free(v); + return map; +error: + isl_map_free(map); + isl_val_free(v); + return NULL; +} + +/* Fix the value of the variable at position "pos" of type "type" of "set" + * to be equal to "v". + */ +__isl_give isl_set *isl_set_fix_val(__isl_take isl_set *set, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *v) +{ + return isl_map_fix_val(set, type, pos, v); +} + struct isl_map *isl_map_fix_input_si(struct isl_map *map, unsigned input, int value) { @@ -5607,6 +5786,46 @@ return isl_map_upper_bound(set, type, pos, value); } +/* Force the values of the variable at position "pos" of type "type" of "set" + * to be no smaller than "value". + */ +__isl_give isl_set *isl_set_lower_bound_val(__isl_take isl_set *set, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *value) +{ + if (!value) + goto error; + if (!isl_val_is_int(value)) + isl_die(isl_set_get_ctx(set), isl_error_invalid, + "expecting integer value", goto error); + set = isl_set_lower_bound(set, type, pos, value->n); + isl_val_free(value); + return set; +error: + isl_val_free(value); + isl_set_free(set); + return NULL; +} + +/* Force the values of the variable at position "pos" of type "type" of "set" + * to be no greater than "value". + */ +__isl_give isl_set *isl_set_upper_bound_val(__isl_take isl_set *set, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *value) +{ + if (!value) + goto error; + if (!isl_val_is_int(value)) + isl_die(isl_set_get_ctx(set), isl_error_invalid, + "expecting integer value", goto error); + set = isl_set_upper_bound(set, type, pos, value->n); + isl_val_free(value); + return set; +error: + isl_val_free(value); + isl_set_free(set); + return NULL; +} + struct isl_set *isl_set_lower_bound_dim(struct isl_set *set, unsigned dim, isl_int value) { @@ -5997,19 +6216,33 @@ dom, empty); } +/* Compute the lexicographic minimum (or maximum if "max" is set) + * of "bmap" over its domain. + * + * Since we are not interested in the part of the domain space where + * there is no solution, we initialize the domain to those constraints + * of "bmap" that only involve the parameters and the input dimensions. + * This relieves the parametric programming engine from detecting those + * inequalities and transferring them to the context. More importantly, + * it ensures that those inequalities are transferred first and not + * intermixed with inequalities that actually split the domain. + */ __isl_give isl_map *isl_basic_map_lexopt(__isl_take isl_basic_map *bmap, int max) { - struct isl_basic_set *dom = NULL; - isl_space *dom_dim; + int n_div; + int n_out; + isl_basic_map *copy; + isl_basic_set *dom; - if (!bmap) - goto error; - dom_dim = isl_space_domain(isl_space_copy(bmap->dim)); - dom = isl_basic_set_universe(dom_dim); + n_div = isl_basic_map_dim(bmap, isl_dim_div); + n_out = isl_basic_map_dim(bmap, isl_dim_out); + copy = isl_basic_map_copy(bmap); + copy = isl_basic_map_drop_constraints_involving_dims(copy, + isl_dim_div, 0, n_div); + copy = isl_basic_map_drop_constraints_involving_dims(copy, + isl_dim_out, 0, n_out); + dom = isl_basic_map_domain(copy); return isl_basic_map_partial_lexopt(bmap, dom, NULL, max); -error: - isl_basic_map_free(bmap); - return NULL; } __isl_give isl_map *isl_basic_map_lexmin(__isl_take isl_basic_map *bmap) @@ -6032,16 +6265,6 @@ return (isl_set *)isl_basic_map_lexmax((isl_basic_map *)bset); } -__isl_give isl_set *isl_set_lexmin(__isl_take isl_set *set) -{ - return (isl_set *)isl_map_lexmin((isl_map *)set); -} - -__isl_give isl_set *isl_set_lexmax(__isl_take isl_set *set) -{ - return (isl_set *)isl_map_lexmax((isl_map *)set); -} - /* Extract the first and only affine expression from list * and then add it to *pwaff with the given dom. * This domain is known to be disjoint from other domains @@ -6313,6 +6536,72 @@ return NULL; } +/* Given a basic set "bset" that only involves parameters and existentially + * quantified variables, return the index of the first equality + * that only involves parameters. If there is no such equality then + * return bset->n_eq. + * + * This function assumes that isl_basic_set_gauss has been called on "bset". + */ +static int first_parameter_equality(__isl_keep isl_basic_set *bset) +{ + int i, j; + unsigned nparam, n_div; + + if (!bset) + return -1; + + nparam = isl_basic_set_dim(bset, isl_dim_param); + n_div = isl_basic_set_dim(bset, isl_dim_div); + + for (i = 0, j = n_div - 1; i < bset->n_eq && j >= 0; --j) { + if (!isl_int_is_zero(bset->eq[i][1 + nparam + j])) + ++i; + } + + return i; +} + +/* Compute an explicit representation for the existentially quantified + * variables in "bset" by computing the "minimal value" of the set + * variables. Since there are no set variables, the computation of + * the minimal value essentially computes an explicit representation + * of the non-empty part(s) of "bset". + * + * The input only involves parameters and existentially quantified variables. + * All equalities among parameters have been removed. + * + * Since the existentially quantified variables in the result are in general + * going to be different from those in the input, we first replace + * them by the minimal number of variables based on their equalities. + * This should simplify the parametric integer programming. + */ +static __isl_give isl_set *base_compute_divs(__isl_take isl_basic_set *bset) +{ + isl_morph *morph1, *morph2; + isl_set *set; + unsigned n; + + if (!bset) + return NULL; + if (bset->n_eq == 0) + return isl_basic_set_lexmin(bset); + + morph1 = isl_basic_set_parameter_compression(bset); + bset = isl_morph_basic_set(isl_morph_copy(morph1), bset); + bset = isl_basic_set_lift(bset); + morph2 = isl_basic_set_variable_compression(bset, isl_dim_set); + bset = isl_morph_basic_set(morph2, bset); + n = isl_basic_set_dim(bset, isl_dim_set); + bset = isl_basic_set_project_out(bset, isl_dim_set, 0, n); + + set = isl_basic_set_lexmin(bset); + + set = isl_morph_set(isl_morph_inverse(morph1), set); + + return set; +} + /* Project the given basic set onto its parameter domain, possibly introducing * new, explicit, existential variables in the constraints. * The input has parameters and (possibly implicit) existential variables. @@ -6324,21 +6613,27 @@ * among the parameters by performing a variable compression on * the parameters. Afterward, an inverse transformation is performed * and the equalities among the parameters are inserted back in. + * + * The variable compression on the parameters may uncover additional + * equalities that were only implicit before. We therefore check + * if there are any new parameter equalities in the result and + * if so recurse. The removal of parameter equalities is required + * for the parameter compression performed by base_compute_divs. */ static struct isl_set *parameter_compute_divs(struct isl_basic_set *bset) { - int i, j; + int i; struct isl_mat *eq; struct isl_mat *T, *T2; struct isl_set *set; - unsigned nparam, n_div; + unsigned nparam; bset = isl_basic_set_cow(bset); if (!bset) return NULL; if (bset->n_eq == 0) - return isl_basic_set_lexmin(bset); + return base_compute_divs(bset); bset = isl_basic_set_gauss(bset, NULL); if (!bset) @@ -6346,16 +6641,11 @@ if (isl_basic_set_plain_is_empty(bset)) return isl_set_from_basic_set(bset); - nparam = isl_basic_set_dim(bset, isl_dim_param); - n_div = isl_basic_set_dim(bset, isl_dim_div); - - for (i = 0, j = n_div - 1; i < bset->n_eq && j >= 0; --j) { - if (!isl_int_is_zero(bset->eq[i][1 + nparam + j])) - ++i; - } + i = first_parameter_equality(bset); if (i == bset->n_eq) - return isl_basic_set_lexmin(bset); + return base_compute_divs(bset); + nparam = isl_basic_set_dim(bset, isl_dim_param); eq = isl_mat_sub_alloc6(bset->ctx, bset->eq, i, bset->n_eq - i, 0, 1 + nparam); eq = isl_mat_cow(eq); @@ -6369,47 +6659,174 @@ } bset = basic_set_parameter_preimage(bset, T); - set = isl_basic_set_lexmin(bset); + i = first_parameter_equality(bset); + if (!bset) + set = NULL; + else if (i == bset->n_eq) + set = base_compute_divs(bset); + else + set = parameter_compute_divs(bset); set = set_parameter_preimage(set, T2); set = set_append_equalities(set, eq); return set; } -/* Compute an explicit representation for all the existentially - * quantified variables. - * The input and output dimensions are first turned into parameters. - * compute_divs then returns a map with the same parameters and +/* Insert the divs from "ls" before those of "bmap". + * + * The number of columns is not changed, which means that the last + * dimensions of "bmap" are being reintepreted as the divs from "ls". + * The caller is responsible for removing the same number of dimensions + * from the space of "bmap". + */ +static __isl_give isl_basic_map *insert_divs_from_local_space( + __isl_take isl_basic_map *bmap, __isl_keep isl_local_space *ls) +{ + int i; + int n_div; + int old_n_div; + + n_div = isl_local_space_dim(ls, isl_dim_div); + if (n_div == 0) + return bmap; + + old_n_div = bmap->n_div; + bmap = insert_div_rows(bmap, n_div); + if (!bmap) + return NULL; + + for (i = 0; i < n_div; ++i) { + isl_seq_cpy(bmap->div[i], ls->div->row[i], ls->div->n_col); + isl_seq_clr(bmap->div[i] + ls->div->n_col, old_n_div); + } + + return bmap; +} + +/* Replace the space of "bmap" by the space and divs of "ls". + * + * If "ls" has any divs, then we simplify the result since we may + * have discovered some additional equalities that could simplify + * the div expressions. + */ +static __isl_give isl_basic_map *basic_replace_space_by_local_space( + __isl_take isl_basic_map *bmap, __isl_take isl_local_space *ls) +{ + int n_div; + + bmap = isl_basic_map_cow(bmap); + if (!bmap || !ls) + goto error; + + n_div = isl_local_space_dim(ls, isl_dim_div); + bmap = insert_divs_from_local_space(bmap, ls); + if (!bmap) + goto error; + + isl_space_free(bmap->dim); + bmap->dim = isl_local_space_get_space(ls); + if (!bmap->dim) + goto error; + + isl_local_space_free(ls); + if (n_div > 0) + bmap = isl_basic_map_simplify(bmap); + bmap = isl_basic_map_finalize(bmap); + return bmap; +error: + isl_basic_map_free(bmap); + isl_local_space_free(ls); + return NULL; +} + +/* Replace the space of "map" by the space and divs of "ls". + */ +static __isl_give isl_map *replace_space_by_local_space(__isl_take isl_map *map, + __isl_take isl_local_space *ls) +{ + int i; + + map = isl_map_cow(map); + if (!map || !ls) + goto error; + + for (i = 0; i < map->n; ++i) { + map->p[i] = basic_replace_space_by_local_space(map->p[i], + isl_local_space_copy(ls)); + if (!map->p[i]) + goto error; + } + isl_space_free(map->dim); + map->dim = isl_local_space_get_space(ls); + if (!map->dim) + goto error; + + isl_local_space_free(ls); + return map; +error: + isl_local_space_free(ls); + isl_map_free(map); + return NULL; +} + +/* Compute an explicit representation for the existentially + * quantified variables for which do not know any explicit representation yet. + * + * We first sort the existentially quantified variables so that the + * existentially quantified variables for which we already have an explicit + * representation are placed before those for which we do not. + * The input dimensions, the output dimensions and the existentially + * quantified variables for which we already have an explicit + * representation are then turned into parameters. + * compute_divs returns a map with the same parameters and * no input or output dimensions and the dimension specification - * is reset to that of the input. + * is reset to that of the input, including the existentially quantified + * variables for which we already had an explicit representation. */ static struct isl_map *compute_divs(struct isl_basic_map *bmap) { struct isl_basic_set *bset; struct isl_set *set; struct isl_map *map; - isl_space *dim, *orig_dim = NULL; + isl_space *dim; + isl_local_space *ls; unsigned nparam; unsigned n_in; unsigned n_out; + unsigned n_known; + int i; + bmap = isl_basic_map_sort_divs(bmap); bmap = isl_basic_map_cow(bmap); if (!bmap) return NULL; + for (n_known = 0; n_known < bmap->n_div; ++n_known) + if (isl_int_is_zero(bmap->div[n_known][0])) + break; + nparam = isl_basic_map_dim(bmap, isl_dim_param); n_in = isl_basic_map_dim(bmap, isl_dim_in); n_out = isl_basic_map_dim(bmap, isl_dim_out); - dim = isl_space_set_alloc(bmap->ctx, nparam + n_in + n_out, 0); + dim = isl_space_set_alloc(bmap->ctx, + nparam + n_in + n_out + n_known, 0); if (!dim) goto error; - orig_dim = bmap->dim; - bmap->dim = dim; + ls = isl_basic_map_get_local_space(bmap); + ls = isl_local_space_drop_dims(ls, isl_dim_div, + n_known, bmap->n_div - n_known); + if (n_known > 0) { + for (i = n_known; i < bmap->n_div; ++i) + swap_div(bmap, i - n_known, i); + bmap->n_div -= n_known; + bmap->extra -= n_known; + } + bmap = isl_basic_map_reset_space(bmap, dim); bset = (struct isl_basic_set *)bmap; set = parameter_compute_divs(bset); map = (struct isl_map *)set; - map = isl_map_reset_space(map, orig_dim); + map = replace_space_by_local_space(map, ls); return map; error: @@ -7661,6 +8078,8 @@ src = isl_basic_map_order_divs(src); dst = isl_basic_map_cow(dst); + if (!dst) + return NULL; dst = isl_basic_map_extend_space(dst, isl_space_copy(dst->dim), src->n_div, 0, 2 * src->n_div); if (!dst) @@ -7708,8 +8127,11 @@ for (i = 1; i < map->n; ++i) map->p[0] = isl_basic_map_align_divs(map->p[0], map->p[i]); - for (i = 1; i < map->n; ++i) + for (i = 1; i < map->n; ++i) { map->p[i] = isl_basic_map_align_divs(map->p[i], map->p[0]); + if (!map->p[i]) + return isl_map_free(map); + } ISL_F_CLR(map, ISL_MAP_NORMALIZED); return map; @@ -8057,6 +8479,35 @@ isl_basic_map_offset(bmap, type) - 1 + pos, val); } +/* If "bmap" obviously lies on a hyperplane where the given dimension + * has a fixed value, then return that value. + * Otherwise return NaN. + */ +__isl_give isl_val *isl_basic_map_plain_get_val_if_fixed( + __isl_keep isl_basic_map *bmap, + enum isl_dim_type type, unsigned pos) +{ + isl_ctx *ctx; + isl_val *v; + int fixed; + + if (!bmap) + return NULL; + ctx = isl_basic_map_get_ctx(bmap); + v = isl_val_alloc(ctx); + if (!v) + return NULL; + fixed = isl_basic_map_plain_is_fixed(bmap, type, pos, &v->n); + if (fixed < 0) + return isl_val_free(v); + if (fixed) { + isl_int_set_si(v->d, 1); + return v; + } + isl_val_free(v); + return isl_val_nan(ctx); +} + int isl_map_plain_is_fixed(__isl_keep isl_map *map, enum isl_dim_type type, unsigned pos, isl_int *val) { @@ -8066,6 +8517,44 @@ map_offset(map, type) - 1 + pos, val); } +/* If "map" obviously lies on a hyperplane where the given dimension + * has a fixed value, then return that value. + * Otherwise return NaN. + */ +__isl_give isl_val *isl_map_plain_get_val_if_fixed(__isl_keep isl_map *map, + enum isl_dim_type type, unsigned pos) +{ + isl_ctx *ctx; + isl_val *v; + int fixed; + + if (!map) + return NULL; + ctx = isl_map_get_ctx(map); + v = isl_val_alloc(ctx); + if (!v) + return NULL; + fixed = isl_map_plain_is_fixed(map, type, pos, &v->n); + if (fixed < 0) + return isl_val_free(v); + if (fixed) { + isl_int_set_si(v->d, 1); + return v; + } + isl_val_free(v); + return isl_val_nan(ctx); +} + +/* If "set" obviously lies on a hyperplane where the given dimension + * has a fixed value, then return that value. + * Otherwise return NaN. + */ +__isl_give isl_val *isl_set_plain_get_val_if_fixed(__isl_keep isl_set *set, + enum isl_dim_type type, unsigned pos) +{ + return isl_map_plain_get_val_if_fixed(set, type, pos); +} + int isl_set_plain_is_fixed(__isl_keep isl_set *set, enum isl_dim_type type, unsigned pos, isl_int *val) { @@ -8222,6 +8711,8 @@ if (!bmap) return NULL; + if (bmap->n_ineq == 0) + return bmap; total = isl_basic_map_total_dim(bmap); c = isl_alloc_array(bmap->ctx, struct constraint, bmap->n_ineq); if (!c) @@ -10250,7 +10741,8 @@ isl_mat_free(eq); isl_mat_free(ineq); - return bmap; + bmap = isl_basic_map_simplify(bmap); + return isl_basic_map_finalize(bmap); error: isl_space_free(dim); isl_mat_free(eq); @@ -10792,32 +11284,29 @@ return bmap; } -/* Add a constraint imposing that the value of the first dimension is +/* Construct a basic map where the value of the first dimension is * greater than that of the second. */ -__isl_give isl_map *isl_map_order_gt(__isl_take isl_map *map, +static __isl_give isl_basic_map *greator(__isl_take isl_space *space, enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2) { isl_basic_map *bmap = NULL; int i; - if (!map) + if (!space) return NULL; - if (pos1 >= isl_map_dim(map, type1)) - isl_die(map->ctx, isl_error_invalid, + if (pos1 >= isl_space_dim(space, type1)) + isl_die(isl_space_get_ctx(space), isl_error_invalid, "index out of bounds", goto error); - if (pos2 >= isl_map_dim(map, type2)) - isl_die(map->ctx, isl_error_invalid, + if (pos2 >= isl_space_dim(space, type2)) + isl_die(isl_space_get_ctx(space), isl_error_invalid, "index out of bounds", goto error); - if (type1 == type2 && pos1 == pos2) { - isl_space *space = isl_map_get_space(map); - isl_map_free(map); - return isl_map_empty(space); - } + if (type1 == type2 && pos1 == pos2) + return isl_basic_map_empty(space); - bmap = isl_basic_map_alloc_space(isl_map_get_space(map), 0, 0, 1); + bmap = isl_basic_map_alloc_space(space, 0, 0, 1); i = isl_basic_map_alloc_inequality(bmap); if (i < 0) goto error; @@ -10829,16 +11318,44 @@ isl_int_set_si(bmap->ineq[i][0], -1); bmap = isl_basic_map_finalize(bmap); - map = isl_map_intersect(map, isl_map_from_basic_map(bmap)); - - return map; + return bmap; error: + isl_space_free(space); isl_basic_map_free(bmap); - isl_map_free(map); return NULL; } /* Add a constraint imposing that the value of the first dimension is + * greater than that of the second. + */ +__isl_give isl_basic_map *isl_basic_map_order_gt(__isl_take isl_basic_map *bmap, + enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2) +{ + isl_basic_map *gt; + + gt = greator(isl_basic_map_get_space(bmap), type1, pos1, type2, pos2); + + bmap = isl_basic_map_intersect(bmap, gt); + + return bmap; +} + +/* Add a constraint imposing that the value of the first dimension is + * greater than that of the second. + */ +__isl_give isl_map *isl_map_order_gt(__isl_take isl_map *map, + enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2) +{ + isl_basic_map *bmap; + + bmap = greator(isl_map_get_space(map), type1, pos1, type2, pos2); + + map = isl_map_intersect(map, isl_map_from_basic_map(bmap)); + + return map; +} + +/* Add a constraint imposing that the value of the first dimension is * smaller than that of the second. */ __isl_give isl_map *isl_map_order_lt(__isl_take isl_map *map, @@ -10993,40 +11510,37 @@ return NULL; } -/* Check if the range of "ma" is compatible with "space". +/* Check if the range of "ma" is compatible with the domain or range + * (depending on "type") of "bmap". * Return -1 if anything is wrong. */ -static int check_space_compatible_range_multi_aff( - __isl_keep isl_space *space, __isl_keep isl_multi_aff *ma) +static int check_basic_map_compatible_range_multi_aff( + __isl_keep isl_basic_map *bmap, enum isl_dim_type type, + __isl_keep isl_multi_aff *ma) { int m; isl_space *ma_space; ma_space = isl_multi_aff_get_space(ma); - m = isl_space_is_range_internal(space, ma_space); + m = isl_space_tuple_match(bmap->dim, type, ma_space, isl_dim_out); isl_space_free(ma_space); if (m >= 0 && !m) - isl_die(isl_space_get_ctx(space), isl_error_invalid, + isl_die(isl_basic_map_get_ctx(bmap), isl_error_invalid, "spaces don't match", return -1); return m; } -/* Check if the range of "ma" is compatible with "bset". - * Return -1 if anything is wrong. - */ -static int check_basic_set_compatible_range_multi_aff( - __isl_keep isl_basic_set *bset, __isl_keep isl_multi_aff *ma) -{ - return check_space_compatible_range_multi_aff(bset->dim, ma); -} - -/* Copy the divs from "ma" to "bset", adding zeros for the coefficients - * of the other divs in "bset". +/* Copy the divs from "ma" to "bmap", adding zeros for the "n_before" + * coefficients before the transformed range of dimensions, + * the "n_after" coefficients after the transformed range of dimensions + * and the coefficients of the other divs in "bmap". */ -static int set_ma_divs(__isl_keep isl_basic_set *bset, - __isl_keep isl_multi_aff *ma, int n_div) +static int set_ma_divs(__isl_keep isl_basic_map *bmap, + __isl_keep isl_multi_aff *ma, int n_before, int n_after, int n_div) { int i; + int n_param; + int n_set; isl_local_space *ls; if (n_div == 0) @@ -11036,10 +11550,28 @@ if (!ls) return -1; + n_param = isl_local_space_dim(ls, isl_dim_param); + n_set = isl_local_space_dim(ls, isl_dim_set); for (i = 0; i < n_div; ++i) { - isl_seq_cpy(bset->div[i], ls->div->row[i], ls->div->n_col); - isl_seq_clr(bset->div[i] + ls->div->n_col, bset->n_div - n_div); - if (isl_basic_set_add_div_constraints(bset, i) < 0) + int o_bmap = 0, o_ls = 0; + + isl_seq_cpy(bmap->div[i], ls->div->row[i], 1 + 1 + n_param); + o_bmap += 1 + 1 + n_param; + o_ls += 1 + 1 + n_param; + isl_seq_clr(bmap->div[i] + o_bmap, n_before); + o_bmap += n_before; + isl_seq_cpy(bmap->div[i] + o_bmap, + ls->div->row[i] + o_ls, n_set); + o_bmap += n_set; + o_ls += n_set; + isl_seq_clr(bmap->div[i] + o_bmap, n_after); + o_bmap += n_after; + isl_seq_cpy(bmap->div[i] + o_bmap, + ls->div->row[i] + o_ls, n_div); + o_bmap += n_div; + o_ls += n_div; + isl_seq_clr(bmap->div[i] + o_bmap, bmap->n_div - n_div); + if (isl_basic_set_add_div_constraints(bmap, i) < 0) goto error; } @@ -11070,74 +11602,117 @@ * * x_i = (f_i y + h_i)/m_i * - * with m_i different from one, add a constraint to "bset" + * with m_i different from one, add a constraint to "bmap" * of the form * * f_i y + h_i = m_i alpha_i * * with alpha_i an additional existentially quantified variable. */ -static __isl_give isl_basic_set *add_ma_strides( - __isl_take isl_basic_set *bset, __isl_keep isl_multi_aff *ma) +static __isl_give isl_basic_map *add_ma_strides( + __isl_take isl_basic_map *bmap, __isl_keep isl_multi_aff *ma, + int n_before, int n_after) { int i, k; int div; int total; + int n_param; + int n_in; + int n_div; - total = isl_basic_set_total_dim(bset); + total = isl_basic_map_total_dim(bmap); + n_param = isl_multi_aff_dim(ma, isl_dim_param); + n_in = isl_multi_aff_dim(ma, isl_dim_in); + n_div = isl_multi_aff_dim(ma, isl_dim_div); for (i = 0; i < ma->n; ++i) { - int len; + int o_bmap = 0, o_ma = 1; if (isl_int_is_one(ma->p[i]->v->el[0])) continue; - div = isl_basic_set_alloc_div(bset); - k = isl_basic_set_alloc_equality(bset); + div = isl_basic_map_alloc_div(bmap); + k = isl_basic_map_alloc_equality(bmap); if (div < 0 || k < 0) goto error; - isl_int_set_si(bset->div[div][0], 0); - len = ma->p[i]->v->size; - isl_seq_cpy(bset->eq[k], ma->p[i]->v->el + 1, len - 1); - isl_seq_clr(bset->eq[k] + len - 1, 1 + total - (len - 1)); - isl_int_neg(bset->eq[k][1 + total], ma->p[i]->v->el[0]); + isl_int_set_si(bmap->div[div][0], 0); + isl_seq_cpy(bmap->eq[k] + o_bmap, + ma->p[i]->v->el + o_ma, 1 + n_param); + o_bmap += 1 + n_param; + o_ma += 1 + n_param; + isl_seq_clr(bmap->eq[k] + o_bmap, n_before); + o_bmap += n_before; + isl_seq_cpy(bmap->eq[k] + o_bmap, + ma->p[i]->v->el + o_ma, n_in); + o_bmap += n_in; + o_ma += n_in; + isl_seq_clr(bmap->eq[k] + o_bmap, n_after); + o_bmap += n_after; + isl_seq_cpy(bmap->eq[k] + o_bmap, + ma->p[i]->v->el + o_ma, n_div); + o_bmap += n_div; + o_ma += n_div; + isl_seq_clr(bmap->eq[k] + o_bmap, 1 + total - o_bmap); + isl_int_neg(bmap->eq[k][1 + total], ma->p[i]->v->el[0]); total++; } - return bset; + return bmap; error: - isl_basic_set_free(bset); + isl_basic_map_free(bmap); return NULL; } -/* Compute the preimage of "bset" under the function represented by "ma". - * In other words, plug in "ma" in "bset". The result is a basic set - * that lives in the domain space of "ma". +/* Replace the domain or range space (depending on "type) of "space" by "set". + */ +static __isl_give isl_space *isl_space_set(__isl_take isl_space *space, + enum isl_dim_type type, __isl_take isl_space *set) +{ + if (type == isl_dim_in) { + space = isl_space_range(space); + space = isl_space_map_from_domain_and_range(set, space); + } else { + space = isl_space_domain(space); + space = isl_space_map_from_domain_and_range(space, set); + } + + return space; +} + +/* Compute the preimage of the domain or range (depending on "type") + * of "bmap" under the function represented by "ma". + * In other words, plug in "ma" in the domain or range of "bmap". + * The result is a basic map that lives in the same space as "bmap" + * except that the domain or range has been replaced by + * the domain space of "ma". * - * If bset is represented by + * If bmap is represented by * - * A(p) + B x + C(divs) >= 0 + * A(p) + S u + B x + T v + C(divs) >= 0, * + * where u and x are input and output dimensions if type == isl_dim_out + * while x and v are input and output dimensions if type == isl_dim_in, * and ma is represented by * * x = D(p) + F(y) + G(divs') * * then the result is * - * A(p) + B D(p) + B F(y) + B G(divs') + C(divs) >= 0 + * A(p) + B D(p) + S u + B F(y) + T v + B G(divs') + C(divs) >= 0 * * The divs in the input set are similarly adjusted. * In particular * - * floor((a_i(p) + b_i x + c_i(divs))/n_i) + * floor((a_i(p) + s u + b_i x + t v + c_i(divs))/n_i) * * becomes * - * floor((a_i(p) + b_i D(p) + b_i F(y) + B_i G(divs') + c_i(divs))/n_i) + * floor((a_i(p) + b_i D(p) + s u + b_i F(y) + t v + + * B_i G(divs') + c_i(divs))/n_i) * - * If bset is not a rational set and if F(y) involves any denominators + * If bmap is not a rational map and if F(y) involves any denominators * * x_i = (f_i y + h_i)/m_i * - * the additional constraints are added to ensure that we only + * then additional constraints are added to ensure that we only * map back integer points. That is we enforce * * f_i y + h_i = m_i alpha_i @@ -11145,16 +11720,17 @@ * with alpha_i an additional existentially quantified variable. * * We first copy over the divs from "ma". - * Then we add the modified constraints and divs from "bset". + * Then we add the modified constraints and divs from "bmap". * Finally, we add the stride constraints, if needed. */ -__isl_give isl_basic_set *isl_basic_set_preimage_multi_aff( - __isl_take isl_basic_set *bset, __isl_take isl_multi_aff *ma) +__isl_give isl_basic_map *isl_basic_map_preimage_multi_aff( + __isl_take isl_basic_map *bmap, enum isl_dim_type type, + __isl_take isl_multi_aff *ma) { int i, k; isl_space *space; - isl_basic_set *res = NULL; - int n_div_bset, n_div_ma; + isl_basic_map *res = NULL; + int n_before, n_after, n_div_bmap, n_div_ma; isl_int f, c1, c2, g; int rational, strides; @@ -11164,144 +11740,212 @@ isl_int_init(g); ma = isl_multi_aff_align_divs(ma); - if (!bset || !ma) + if (!bmap || !ma) goto error; - if (check_basic_set_compatible_range_multi_aff(bset, ma) < 0) + if (check_basic_map_compatible_range_multi_aff(bmap, type, ma) < 0) goto error; - n_div_bset = isl_basic_set_dim(bset, isl_dim_div); + if (type == isl_dim_in) { + n_before = 0; + n_after = isl_basic_map_dim(bmap, isl_dim_out); + } else { + n_before = isl_basic_map_dim(bmap, isl_dim_in); + n_after = 0; + } + n_div_bmap = isl_basic_map_dim(bmap, isl_dim_div); n_div_ma = ma->n ? isl_aff_dim(ma->p[0], isl_dim_div) : 0; - space = isl_space_domain(isl_multi_aff_get_space(ma)); - rational = isl_basic_set_is_rational(bset); + space = isl_multi_aff_get_domain_space(ma); + space = isl_space_set(isl_basic_map_get_space(bmap), type, space); + rational = isl_basic_map_is_rational(bmap); strides = rational ? 0 : multi_aff_strides(ma); - res = isl_basic_set_alloc_space(space, n_div_ma + n_div_bset + strides, - bset->n_eq + strides, bset->n_ineq + 2 * n_div_ma); + res = isl_basic_map_alloc_space(space, n_div_ma + n_div_bmap + strides, + bmap->n_eq + strides, bmap->n_ineq + 2 * n_div_ma); if (rational) - res = isl_basic_set_set_rational(res); + res = isl_basic_map_set_rational(res); - for (i = 0; i < n_div_ma + n_div_bset; ++i) - if (isl_basic_set_alloc_div(res) < 0) + for (i = 0; i < n_div_ma + n_div_bmap; ++i) + if (isl_basic_map_alloc_div(res) < 0) goto error; - if (set_ma_divs(res, ma, n_div_ma) < 0) + if (set_ma_divs(res, ma, n_before, n_after, n_div_ma) < 0) goto error; - for (i = 0; i < bset->n_eq; ++i) { - k = isl_basic_set_alloc_equality(res); + for (i = 0; i < bmap->n_eq; ++i) { + k = isl_basic_map_alloc_equality(res); if (k < 0) goto error; - isl_seq_preimage(res->eq[k], bset->eq[i], ma, n_div_ma, - n_div_bset, f, c1, c2, g, 0); + isl_seq_preimage(res->eq[k], bmap->eq[i], ma, n_before, + n_after, n_div_ma, n_div_bmap, f, c1, c2, g, 0); } - for (i = 0; i < bset->n_ineq; ++i) { - k = isl_basic_set_alloc_inequality(res); + for (i = 0; i < bmap->n_ineq; ++i) { + k = isl_basic_map_alloc_inequality(res); if (k < 0) goto error; - isl_seq_preimage(res->ineq[k], bset->ineq[i], ma, n_div_ma, - n_div_bset, f, c1, c2, g, 0); + isl_seq_preimage(res->ineq[k], bmap->ineq[i], ma, n_before, + n_after, n_div_ma, n_div_bmap, f, c1, c2, g, 0); } - for (i = 0; i < bset->n_div; ++i) { - if (isl_int_is_zero(bset->div[i][0])) { + for (i = 0; i < bmap->n_div; ++i) { + if (isl_int_is_zero(bmap->div[i][0])) { isl_int_set_si(res->div[n_div_ma + i][0], 0); continue; } - isl_seq_preimage(res->div[n_div_ma + i], bset->div[i], - ma, n_div_ma, n_div_bset, f, c1, c2, g, 1); + isl_seq_preimage(res->div[n_div_ma + i], bmap->div[i], ma, + n_before, n_after, n_div_ma, n_div_bmap, + f, c1, c2, g, 1); } if (strides) - res = add_ma_strides(res, ma); + res = add_ma_strides(res, ma, n_before, n_after); isl_int_clear(f); isl_int_clear(c1); isl_int_clear(c2); isl_int_clear(g); - isl_basic_set_free(bset); + isl_basic_map_free(bmap); isl_multi_aff_free(ma); res = isl_basic_set_simplify(res); - return isl_basic_set_finalize(res); + return isl_basic_map_finalize(res); error: isl_int_clear(f); isl_int_clear(c1); isl_int_clear(c2); isl_int_clear(g); - isl_basic_set_free(bset); + isl_basic_map_free(bmap); isl_multi_aff_free(ma); - isl_basic_set_free(res); + isl_basic_map_free(res); return NULL; } -/* Check if the range of "ma" is compatible with "set". +/* Compute the preimage of "bset" under the function represented by "ma". + * In other words, plug in "ma" in "bset". The result is a basic set + * that lives in the domain space of "ma". + */ +__isl_give isl_basic_set *isl_basic_set_preimage_multi_aff( + __isl_take isl_basic_set *bset, __isl_take isl_multi_aff *ma) +{ + return isl_basic_map_preimage_multi_aff(bset, isl_dim_set, ma); +} + +/* Check if the range of "ma" is compatible with the domain or range + * (depending on "type") of "map". * Return -1 if anything is wrong. */ -static int check_set_compatible_range_multi_aff( - __isl_keep isl_set *set, __isl_keep isl_multi_aff *ma) +static int check_map_compatible_range_multi_aff( + __isl_keep isl_map *map, enum isl_dim_type type, + __isl_keep isl_multi_aff *ma) { - return check_space_compatible_range_multi_aff(set->dim, ma); + int m; + isl_space *ma_space; + + ma_space = isl_multi_aff_get_space(ma); + m = isl_space_tuple_match(map->dim, type, ma_space, isl_dim_out); + isl_space_free(ma_space); + if (m >= 0 && !m) + isl_die(isl_map_get_ctx(map), isl_error_invalid, + "spaces don't match", return -1); + return m; } -/* Compute the preimage of "set" under the function represented by "ma". - * In other words, plug in "ma" in "set. The result is a set - * that lives in the domain space of "ma". +/* Compute the preimage of the domain or range (depending on "type") + * of "map" under the function represented by "ma". + * In other words, plug in "ma" in the domain or range of "map". + * The result is a map that lives in the same space as "map" + * except that the domain or range has been replaced by + * the domain space of "ma". + * + * The parameters are assumed to have been aligned. */ -static __isl_give isl_set *set_preimage_multi_aff(__isl_take isl_set *set, - __isl_take isl_multi_aff *ma) +static __isl_give isl_map *map_preimage_multi_aff(__isl_take isl_map *map, + enum isl_dim_type type, __isl_take isl_multi_aff *ma) { int i; + isl_space *space; - set = isl_set_cow(set); + map = isl_map_cow(map); ma = isl_multi_aff_align_divs(ma); - if (!set || !ma) + if (!map || !ma) goto error; - if (check_set_compatible_range_multi_aff(set, ma) < 0) + if (check_map_compatible_range_multi_aff(map, type, ma) < 0) goto error; - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_preimage_multi_aff(set->p[i], + for (i = 0; i < map->n; ++i) { + map->p[i] = isl_basic_map_preimage_multi_aff(map->p[i], type, isl_multi_aff_copy(ma)); - if (!set->p[i]) + if (!map->p[i]) goto error; } - isl_space_free(set->dim); - set->dim = isl_multi_aff_get_domain_space(ma); - if (!set->dim) + space = isl_multi_aff_get_domain_space(ma); + space = isl_space_set(isl_map_get_space(map), type, space); + + isl_space_free(map->dim); + map->dim = space; + if (!map->dim) goto error; isl_multi_aff_free(ma); - if (set->n > 1) - ISL_F_CLR(set, ISL_MAP_DISJOINT); - ISL_F_CLR(set, ISL_SET_NORMALIZED); - return set; + if (map->n > 1) + ISL_F_CLR(map, ISL_MAP_DISJOINT); + ISL_F_CLR(map, ISL_SET_NORMALIZED); + return map; error: isl_multi_aff_free(ma); - isl_set_free(set); + isl_map_free(map); return NULL; } -__isl_give isl_set *isl_set_preimage_multi_aff(__isl_take isl_set *set, - __isl_take isl_multi_aff *ma) +/* Compute the preimage of the domain or range (depending on "type") + * of "map" under the function represented by "ma". + * In other words, plug in "ma" in the domain or range of "map". + * The result is a map that lives in the same space as "map" + * except that the domain or range has been replaced by + * the domain space of "ma". + */ +__isl_give isl_map *isl_map_preimage_multi_aff(__isl_take isl_map *map, + enum isl_dim_type type, __isl_take isl_multi_aff *ma) { - if (!set || !ma) + if (!map || !ma) goto error; - if (isl_space_match(set->dim, isl_dim_param, ma->space, isl_dim_param)) - return set_preimage_multi_aff(set, ma); + if (isl_space_match(map->dim, isl_dim_param, ma->space, isl_dim_param)) + return map_preimage_multi_aff(map, type, ma); - if (!isl_space_has_named_params(set->dim) || + if (!isl_space_has_named_params(map->dim) || !isl_space_has_named_params(ma->space)) - isl_die(set->ctx, isl_error_invalid, + isl_die(map->ctx, isl_error_invalid, "unaligned unnamed parameters", goto error); - set = isl_set_align_params(set, isl_multi_aff_get_space(ma)); - ma = isl_multi_aff_align_params(ma, isl_set_get_space(set)); + map = isl_map_align_params(map, isl_multi_aff_get_space(ma)); + ma = isl_multi_aff_align_params(ma, isl_map_get_space(map)); - return set_preimage_multi_aff(set, ma); + return map_preimage_multi_aff(map, type, ma); error: isl_multi_aff_free(ma); - return isl_set_free(set); + return isl_map_free(map); +} + +/* Compute the preimage of "set" under the function represented by "ma". + * In other words, plug in "ma" "set". The result is a set + * that lives in the domain space of "ma". + */ +__isl_give isl_set *isl_set_preimage_multi_aff(__isl_take isl_set *set, + __isl_take isl_multi_aff *ma) +{ + return isl_map_preimage_multi_aff(set, isl_dim_set, ma); +} + +/* Compute the preimage of the domain of "map" under the function + * represented by "ma". + * In other words, plug in "ma" in the domain of "map". + * The result is a map that lives in the same space as "map" + * except that the domain has been replaced by the domain space of "ma". + */ +__isl_give isl_map *isl_map_preimage_domain_multi_aff(__isl_take isl_map *map, + __isl_take isl_multi_aff *ma) +{ + return isl_map_preimage_multi_aff(map, isl_dim_in, ma); } /* Compute the preimage of "set" under the function represented by "pma". diff -Nru isl-0.11.2/isl_map_lexopt_templ.c isl-0.12.1/isl_map_lexopt_templ.c --- isl-0.11.2/isl_map_lexopt_templ.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_map_lexopt_templ.c 2013-07-01 13:12:40.000000000 +0000 @@ -130,3 +130,13 @@ { return SF(isl_map_lexopt,SUFFIX)(map, 1); } + +__isl_give TYPE *SF(isl_set_lexmin,SUFFIX)(__isl_take isl_set *set) +{ + return SF(isl_map_lexmin,SUFFIX)(set); +} + +__isl_give TYPE *SF(isl_set_lexmax,SUFFIX)(__isl_take isl_set *set) +{ + return SF(isl_map_lexmax,SUFFIX)(set); +} diff -Nru isl-0.11.2/isl_map_private.h isl-0.12.1/isl_map_private.h --- isl-0.11.2/isl_map_private.h 2013-03-27 11:09:33.000000000 +0000 +++ isl-0.12.1/isl_map_private.h 2013-07-24 11:04:50.000000000 +0000 @@ -13,6 +13,10 @@ #define isl_basic_set isl_basic_map #define isl_set isl_map #define isl_basic_set_list isl_basic_map_list +#define isl_set_list isl_map_list +#include +ISL_DECLARE_LIST(basic_map) +ISL_DECLARE_LIST(map) #include #include #include @@ -70,6 +74,11 @@ struct isl_blk block2; }; +#undef EL +#define EL isl_basic_set + +#include + /* A "map" is a (possibly disjoint) union of basic maps. * A "set" is a (possibly disjoint) union of basic sets. * @@ -95,6 +104,11 @@ struct isl_basic_map *p[1]; }; +#undef EL +#define EL isl_set + +#include + __isl_give isl_map *isl_map_realign(__isl_take isl_map *map, __isl_take isl_reordering *r); __isl_give isl_set *isl_set_realign(__isl_take isl_set *set, @@ -316,6 +330,7 @@ __isl_take isl_basic_set *bset, __isl_take isl_mat *div, int *exp); int isl_basic_map_divs_known(__isl_keep isl_basic_map *bmap); +__isl_give isl_mat *isl_basic_set_get_divs(__isl_keep isl_basic_set *bset); __isl_give isl_mat *isl_basic_map_get_divs(__isl_keep isl_basic_map *bmap); __isl_give isl_map *isl_map_inline_foreach_basic_map(__isl_take isl_map *map, diff -Nru isl-0.11.2/isl_map_simplify.c isl-0.12.1/isl_map_simplify.c --- isl-0.11.2/isl_map_simplify.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_map_simplify.c 2013-07-24 11:04:50.000000000 +0000 @@ -1042,9 +1042,39 @@ return 1; } +/* Would an expression for div "div" based on inequality "ineq" of "bmap" + * be a better expression than the current one? + * + * If we do not have any expression yet, then any expression would be better. + * Otherwise we check if the last variable involved in the inequality + * (disregarding the div that it would define) is in an earlier position + * than the last variable involved in the current div expression. + */ +static int better_div_constraint(__isl_keep isl_basic_map *bmap, + int div, int ineq) +{ + unsigned total = 1 + isl_space_dim(bmap->dim, isl_dim_all); + int last_div; + int last_ineq; + + if (isl_int_is_zero(bmap->div[div][0])) + return 1; + + if (isl_seq_last_non_zero(bmap->ineq[ineq] + total + div + 1, + bmap->n_div - (div + 1)) >= 0) + return 0; + + last_ineq = isl_seq_last_non_zero(bmap->ineq[ineq], total + div); + last_div = isl_seq_last_non_zero(bmap->div[div] + 1, + total + bmap->n_div); + + return last_ineq < last_div; +} + /* Given two constraints "k" and "l" that are opposite to each other, * except for the constant term, check if we can use them - * to obtain an expression for one of the hitherto unknown divs. + * to obtain an expression for one of the hitherto unknown divs or + * a "better" expression for a div for which we already have an expression. * "sum" is the sum of the constant terms of the constraints. * If this sum is strictly smaller than the coefficient of one * of the divs, then this pair can be used define the div. @@ -1060,12 +1090,12 @@ unsigned total = 1 + isl_space_dim(bmap->dim, isl_dim_all); for (i = 0; i < bmap->n_div; ++i) { - if (!isl_int_is_zero(bmap->div[i][0])) - continue; if (isl_int_is_zero(bmap->ineq[k][total + i])) continue; if (isl_int_abs_ge(sum, bmap->ineq[k][total + i])) continue; + if (!better_div_constraint(bmap, i, k)) + continue; if (!ok_to_set_div_from_bound(bmap, i, k)) break; if (isl_int_is_pos(bmap->ineq[k][total + i])) @@ -1333,9 +1363,12 @@ return 0; } - for (i = 0; i < bmap->n_div; ++i) + for (i = 0; i < bmap->n_div; ++i) { + if (isl_int_is_zero(bmap->div[i][0])) + continue; if (!isl_int_is_zero(bmap->div[i][1+pos])) return 0; + } return 1; } @@ -2114,6 +2147,8 @@ for (i = 0; i < context->n_eq; ++i) { int k; k = isl_basic_map_alloc_equality(bmap); + if (k < 0) + return isl_basic_map_free(bmap); isl_seq_cpy(bmap->eq[k], context->eq[i], 1 + total_context); isl_seq_clr(bmap->eq[k] + 1 + total_context, isl_basic_map_total_dim(bmap) - total_context); @@ -2147,6 +2182,8 @@ bmap = isl_basic_map_remove_redundancies(bmap); context = isl_basic_map_remove_redundancies(context); + if (!context) + goto error; if (context->n_eq) bmap = normalize_divs_in_context(bmap, context); @@ -2188,8 +2225,6 @@ map = isl_map_compute_divs(map); if (!map) goto error; - for (i = 0; i < map->n; ++i) - context = isl_basic_map_align_divs(context, map->p[i]); for (i = map->n - 1; i >= 0; --i) { map->p[i] = isl_basic_map_gist(map->p[i], isl_basic_map_copy(context)); @@ -2946,6 +2981,8 @@ if (!bmap) goto error; + if (bmap->n_div == 0) + return bmap; off = isl_space_dim(bmap->dim, isl_dim_all); pairs = isl_calloc_array(bmap->ctx, int, bmap->n_div); diff -Nru isl-0.11.2/isl_map_subtract.c isl-0.12.1/isl_map_subtract.c --- isl-0.11.2/isl_map_subtract.c 2013-04-07 15:45:14.000000000 +0000 +++ isl-0.12.1/isl_map_subtract.c 2013-07-24 11:04:50.000000000 +0000 @@ -228,6 +228,8 @@ if (isl_tab_detect_redundant(tab) < 0) return -1; + if (n_test == 0) + return 0; if (!*index) *index = isl_alloc_array(ctx, int, n_test); if (!*index) diff -Nru isl-0.11.2/isl_mat.c isl-0.12.1/isl_mat.c --- isl-0.11.2/isl_mat.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_mat.c 2013-07-24 11:04:50.000000000 +0000 @@ -8,11 +8,12 @@ */ #include +#include #include #include #include -#include "isl_map_private.h" #include +#include isl_ctx *isl_mat_get_ctx(__isl_keep isl_mat *mat) { @@ -34,7 +35,7 @@ if (isl_blk_is_error(mat->block)) goto error; mat->row = isl_alloc_array(ctx, isl_int *, n_row); - if (!mat->row) + if (n_row && !mat->row) goto error; for (i = 0; i < n_row; ++i) @@ -94,7 +95,7 @@ if (isl_blk_is_error(mat->block)) goto error; row = isl_realloc_array(mat->ctx, mat->row, isl_int *, n_row); - if (!row) + if (n_row && !row) goto error; mat->row = row; @@ -122,7 +123,7 @@ if (!mat) return NULL; mat->row = isl_alloc_array(ctx, isl_int *, n_row); - if (!mat->row) + if (n_row && !mat->row) goto error; for (i = 0; i < n_row; ++i) mat->row[i] = row[first_row+i] + first_col; @@ -204,19 +205,21 @@ return mat2; } -void isl_mat_free(struct isl_mat *mat) +void *isl_mat_free(struct isl_mat *mat) { if (!mat) - return; + return NULL; if (--mat->ref > 0) - return; + return NULL; if (!ISL_F_ISSET(mat, ISL_MAT_BORROWED)) isl_blk_free(mat->ctx, mat->block); isl_ctx_deref(mat->ctx); free(mat->row); free(mat); + + return NULL; } int isl_mat_rows(__isl_keep isl_mat *mat) @@ -243,6 +246,25 @@ return 0; } +/* Extract the element at row "row", oolumn "col" of "mat". + */ +__isl_give isl_val *isl_mat_get_element_val(__isl_keep isl_mat *mat, + int row, int col) +{ + isl_ctx *ctx; + + if (!mat) + return NULL; + ctx = isl_mat_get_ctx(mat); + if (row < 0 || row >= mat->n_row) + isl_die(ctx, isl_error_invalid, "row out of range", + return NULL); + if (col < 0 || col >= mat->n_col) + isl_die(ctx, isl_error_invalid, "column out of range", + return NULL); + return isl_val_int_from_isl_int(ctx, mat->row[row][col]); +} + __isl_give isl_mat *isl_mat_set_element(__isl_take isl_mat *mat, int row, int col, isl_int v) { @@ -281,6 +303,24 @@ return NULL; } +/* Replace the element at row "row", column "col" of "mat" by "v". + */ +__isl_give isl_mat *isl_mat_set_element_val(__isl_take isl_mat *mat, + int row, int col, __isl_take isl_val *v) +{ + if (!v) + return isl_mat_free(mat); + if (!isl_val_is_int(v)) + isl_die(isl_val_get_ctx(v), isl_error_invalid, + "expecting integer value", goto error); + mat = isl_mat_set_element(mat, row, col, v->n); + isl_val_free(v); + return mat; +error: + isl_val_free(v); + return isl_mat_free(mat); +} + __isl_give isl_mat *isl_mat_diag(isl_ctx *ctx, unsigned n_row, isl_int d) { int i; @@ -967,7 +1007,8 @@ return mat; } -struct isl_mat *isl_mat_product(struct isl_mat *left, struct isl_mat *right) +__isl_give isl_mat *isl_mat_product(__isl_take isl_mat *left, + __isl_take isl_mat *right) { int i, j, k; struct isl_mat *prod; @@ -1245,6 +1286,9 @@ { int r; + if (n == 0) + return mat; + mat = isl_mat_cow(mat); if (!mat) return NULL; diff -Nru isl-0.11.2/isl_morph.c isl-0.12.1/isl_morph.c --- isl-0.11.2/isl_morph.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_morph.c 2013-07-24 11:04:50.000000000 +0000 @@ -479,23 +479,20 @@ * * Let the equalities be given as * - * B(p) + A x = 0 + * B(p) + A x = 0. * - * and let [H 0] be the Hermite Normal Form of A, then + * We use isl_mat_parameter_compression_ext to compute the compression * - * H^-1 B(p) - * - * needs to be integer, so we impose that each row is divisible by - * the denominator. + * p = T p'. */ __isl_give isl_morph *isl_basic_set_parameter_compression( __isl_keep isl_basic_set *bset) { unsigned nparam; unsigned nvar; + unsigned n_div; int n_eq; isl_mat *H, *B; - isl_vec *d; isl_mat *map, *inv; isl_basic_set *dom, *ran; @@ -507,35 +504,24 @@ if (bset->n_eq == 0) return isl_morph_identity(bset); - isl_assert(bset->ctx, bset->n_div == 0, return NULL); - n_eq = bset->n_eq; nparam = isl_basic_set_dim(bset, isl_dim_param); nvar = isl_basic_set_dim(bset, isl_dim_set); + n_div = isl_basic_set_dim(bset, isl_dim_div); if (isl_seq_first_non_zero(bset->eq[bset->n_eq - 1] + 1 + nparam, - nvar) == -1) + nvar + n_div) == -1) isl_die(isl_basic_set_get_ctx(bset), isl_error_invalid, "input not allowed to have parameter equalities", return NULL); - if (n_eq > nvar) + if (n_eq > nvar + n_div) isl_die(isl_basic_set_get_ctx(bset), isl_error_invalid, "input not gaussed", return NULL); - d = isl_vec_alloc(bset->ctx, n_eq); B = isl_mat_sub_alloc6(bset->ctx, bset->eq, 0, n_eq, 0, 1 + nparam); - H = isl_mat_sub_alloc6(bset->ctx, bset->eq, 0, n_eq, 1 + nparam, nvar); - H = isl_mat_left_hermite(H, 0, NULL, NULL); - H = isl_mat_drop_cols(H, n_eq, nvar - n_eq); - H = isl_mat_lin_to_aff(H); - H = isl_mat_right_inverse(H); - if (!H || !d) - goto error; - d = isl_vec_set(d, H->row[0][0]); - H = isl_mat_drop_rows(H, 0, 1); - H = isl_mat_drop_cols(H, 0, 1); - B = isl_mat_product(H, B); - inv = isl_mat_parameter_compression(B, d); + H = isl_mat_sub_alloc6(bset->ctx, bset->eq, + 0, n_eq, 1 + nparam, nvar + n_div); + inv = isl_mat_parameter_compression_ext(B, H); inv = isl_mat_diagonal(inv, isl_mat_identity(bset->ctx, nvar)); map = isl_mat_right_inverse(isl_mat_copy(inv)); @@ -543,11 +529,6 @@ ran = isl_basic_set_universe(isl_space_copy(bset->dim)); return isl_morph_alloc(dom, ran, map, inv); -error: - isl_mat_free(H); - isl_mat_free(B); - isl_vec_free(d); - return NULL; } /* Add stride constraints to "bset" based on the inverse mapping @@ -573,6 +554,7 @@ * * exists alpha in Z^m: B x = d alpha * + * This function is similar to add_strides in isl_affine_hull.c */ static __isl_give isl_basic_set *add_strides(__isl_take isl_basic_set *bset, __isl_keep isl_morph *morph) diff -Nru isl-0.11.2/isl_multi_templ.c isl-0.12.1/isl_multi_templ.c --- isl-0.11.2/isl_multi_templ.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_multi_templ.c 2013-07-24 11:02:32.000000000 +0000 @@ -8,6 +8,10 @@ * Ecole Normale Superieure, 45 rue d’Ulm, 75230 Paris, France */ +#include +#include +#include + #define xCAT(A,B) A ## B #define CAT(A,B) xCAT(A,B) #undef EL @@ -223,16 +227,8 @@ goto error; multi_space = FN(MULTI(BASE),get_space)(multi); - el_space = FN(EL,get_space)(el); - - if (!isl_space_match(multi_space, isl_dim_param, - el_space, isl_dim_param)) - isl_die(FN(MULTI(BASE),get_ctx)(multi), isl_error_invalid, - "parameters don't match", goto error); - if (!isl_space_tuple_match(multi_space, isl_dim_in, - el_space, isl_dim_in)) - isl_die(FN(MULTI(BASE),get_ctx)(multi), isl_error_invalid, - "domains don't match", goto error); + if (FN(EL,check_match_domain_space)(el, multi_space) < 0) + goto error; if (pos < 0 || pos >= multi->n) isl_die(FN(MULTI(BASE),get_ctx)(multi), isl_error_invalid, @@ -401,6 +397,7 @@ return NULL; } +#ifndef NO_GIST static __isl_give MULTI(BASE) *FN(MULTI(BASE),align_params_multi_set_and)( __isl_take MULTI(BASE) *multi, __isl_take isl_set *set, __isl_give MULTI(BASE) *(*fn)(__isl_take MULTI(BASE) *multi, @@ -432,6 +429,7 @@ { int i; + multi = FN(MULTI(BASE),cow)(multi); if (!multi || !context) goto error; @@ -464,6 +462,7 @@ dom_context = isl_set_intersect_params(dom_context, context); return FN(MULTI(BASE),gist)(multi, dom_context); } +#endif __isl_give MULTI(BASE) *FN(FN(MULTI(BASE),from),LIST(BASE))( __isl_take isl_space *space, __isl_take LIST(EL) *list) @@ -497,6 +496,7 @@ return NULL; } +#ifndef NO_IDENTITY /* Create a multi expression in the given space that maps each * input dimension to the corresponding output dimension. */ @@ -543,6 +543,7 @@ isl_space_free(space); return NULL; } +#endif /* Construct a multi expression in the given space with value zero in * each of the output dimensions. @@ -579,6 +580,7 @@ return multi; } +#ifndef NO_FROM_BASE __isl_give MULTI(BASE) *FN(FN(MULTI(BASE),from),BASE)(__isl_take EL *el) { MULTI(BASE) *multi; @@ -588,6 +590,7 @@ return multi; } +#endif __isl_give MULTI(BASE) *FN(MULTI(BASE),drop_dims)( __isl_take MULTI(BASE) *multi, @@ -794,3 +797,115 @@ FN(MULTI(BASE),free)(multi2); return NULL; } + +/* This function is currently only used from isl_aff.c + */ +static __isl_give MULTI(BASE) *FN(MULTI(BASE),bin_op)( + __isl_take MULTI(BASE) *multi1, __isl_take MULTI(BASE) *multi2, + __isl_give EL *(*fn)(__isl_take EL *, __isl_take EL *)) + __attribute__ ((unused)); + +/* Pairwise perform "fn" to the elements of "multi1" and "multi2" and + * return the result. + */ +static __isl_give MULTI(BASE) *FN(MULTI(BASE),bin_op)( + __isl_take MULTI(BASE) *multi1, __isl_take MULTI(BASE) *multi2, + __isl_give EL *(*fn)(__isl_take EL *, __isl_take EL *)) +{ + int i; + isl_ctx *ctx; + + multi1 = FN(MULTI(BASE),cow)(multi1); + if (!multi1 || !multi2) + goto error; + + ctx = FN(MULTI(BASE),get_ctx)(multi1); + if (!isl_space_is_equal(multi1->space, multi2->space)) + isl_die(ctx, isl_error_invalid, + "spaces don't match", goto error); + + for (i = 0; i < multi1->n; ++i) { + multi1->p[i] = fn(multi1->p[i], FN(EL,copy)(multi2->p[i])); + if (!multi1->p[i]) + goto error; + } + + FN(MULTI(BASE),free)(multi2); + return multi1; +error: + FN(MULTI(BASE),free)(multi1); + FN(MULTI(BASE),free)(multi2); + return NULL; +} + +/* Multiply the elements of "multi" by "v" and return the result. + */ +__isl_give MULTI(BASE) *FN(MULTI(BASE),scale_val)(__isl_take MULTI(BASE) *multi, + __isl_take isl_val *v) +{ + int i; + + if (!multi || !v) + goto error; + + if (isl_val_is_one(v)) { + isl_val_free(v); + return multi; + } + + if (!isl_val_is_rat(v)) + isl_die(isl_val_get_ctx(v), isl_error_invalid, + "expecting rational factor", goto error); + + multi = FN(MULTI(BASE),cow)(multi); + if (!multi) + return NULL; + + for (i = 0; i < multi->n; ++i) { + multi->p[i] = FN(EL,scale_val)(multi->p[i], isl_val_copy(v)); + if (!multi->p[i]) + goto error; + } + + isl_val_free(v); + return multi; +error: + isl_val_free(v); + return FN(MULTI(BASE),free)(multi); +} + +/* Multiply the elements of "multi" by the corresponding element of "mv" + * and return the result. + */ +__isl_give MULTI(BASE) *FN(MULTI(BASE),scale_multi_val)( + __isl_take MULTI(BASE) *multi, __isl_take isl_multi_val *mv) +{ + int i; + + if (!multi || !mv) + goto error; + + if (!isl_space_tuple_match(multi->space, isl_dim_out, + mv->space, isl_dim_set)) + isl_die(isl_multi_val_get_ctx(mv), isl_error_invalid, + "spaces don't match", goto error); + + multi = FN(MULTI(BASE),cow)(multi); + if (!multi) + return NULL; + + for (i = 0; i < multi->n; ++i) { + isl_val *v; + + v = isl_multi_val_get_val(mv, i); + multi->p[i] = FN(EL,scale_val)(multi->p[i], v); + if (!multi->p[i]) + goto error; + } + + isl_multi_val_free(mv); + return multi; +error: + isl_multi_val_free(mv); + return FN(MULTI(BASE),free)(multi); +} diff -Nru isl-0.11.2/isl_multi_templ.h isl-0.12.1/isl_multi_templ.h --- isl-0.11.2/isl_multi_templ.h 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/isl_multi_templ.h 2013-07-01 13:12:40.000000000 +0000 @@ -1,3 +1,5 @@ +#include + #define xCAT(A,B) A ## B #define CAT(A,B) xCAT(A,B) #undef EL diff -Nru isl-0.11.2/isl_obj.c isl-0.12.1/isl_obj.c --- isl-0.11.2/isl_obj.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_obj.c 2013-07-24 11:04:50.000000000 +0000 @@ -164,6 +164,34 @@ isl_obj_int_free }; +static void *isl_obj_val_copy(void *v) +{ + return isl_val_copy((isl_val *)v); +} + +static void isl_obj_val_free(void *v) +{ + isl_val_free((isl_val *)v); +} + +static __isl_give isl_printer *isl_obj_val_print(__isl_take isl_printer *p, + void *v) +{ + return isl_printer_print_val(p, (isl_val *)v); +} + +static void *isl_obj_val_add(void *v1, void *v2) +{ + return isl_val_add((isl_val *) v1, (isl_val *) v2); +} + +struct isl_obj_vtable isl_obj_val_vtable = { + isl_obj_val_copy, + isl_obj_val_add, + isl_obj_val_print, + isl_obj_val_free +}; + static void *isl_obj_map_copy(void *v) { return isl_map_copy((struct isl_map *)v); diff -Nru isl-0.11.2/isl_options.c isl-0.12.1/isl_options.c --- isl-0.11.2/isl_options.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_options.c 2013-07-24 11:04:50.000000000 +0000 @@ -176,6 +176,8 @@ ISL_SCHEDULE_FUSE_MAX, "level of fusion during scheduling") ISL_ARG_BOOL(struct isl_options, tile_scale_tile_loops, 0, "tile-scale-tile-loops", 1, "scale tile loops") +ISL_ARG_BOOL(struct isl_options, tile_shift_point_loops, 0, + "tile-shift-point-loops", 1, "shift point loops to start at zero") ISL_ARG_STR(struct isl_options, ast_iterator_type, 0, "ast-iterator-type", "type", "int", "type used for iterators during printing of AST") @@ -198,6 +200,8 @@ "allow iterators of strided loops to be scaled down") ISL_ARG_BOOL(struct isl_options, ast_build_allow_else, 0, "ast-build-allow-else", 1, "generate if statements with else branches") +ISL_ARG_BOOL(struct isl_options, ast_build_allow_or, 0, + "ast-build-allow-or", 1, "generate if conditions with disjunctions") ISL_ARG_VERSION(print_version) ISL_ARGS_END @@ -269,6 +273,11 @@ tile_scale_tile_loops) ISL_CTX_SET_BOOL_DEF(isl_options, struct isl_options, isl_options_args, + tile_shift_point_loops) +ISL_CTX_GET_BOOL_DEF(isl_options, struct isl_options, isl_options_args, + tile_shift_point_loops) + +ISL_CTX_SET_BOOL_DEF(isl_options, struct isl_options, isl_options_args, ast_build_atomic_upper_bound) ISL_CTX_GET_BOOL_DEF(isl_options, struct isl_options, isl_options_args, ast_build_atomic_upper_bound) @@ -307,3 +316,8 @@ ast_build_allow_else) ISL_CTX_GET_BOOL_DEF(isl_options, struct isl_options, isl_options_args, ast_build_allow_else) + +ISL_CTX_SET_BOOL_DEF(isl_options, struct isl_options, isl_options_args, + ast_build_allow_or) +ISL_CTX_GET_BOOL_DEF(isl_options, struct isl_options, isl_options_args, + ast_build_allow_or) diff -Nru isl-0.11.2/isl_options_private.h isl-0.12.1/isl_options_private.h --- isl-0.11.2/isl_options_private.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_options_private.h 2013-07-24 11:04:50.000000000 +0000 @@ -58,6 +58,7 @@ int schedule_fuse; int tile_scale_tile_loops; + int tile_shift_point_loops; char *ast_iterator_type; @@ -68,6 +69,7 @@ int ast_build_separation_bounds; int ast_build_scale_strides; int ast_build_allow_else; + int ast_build_allow_or; }; #endif diff -Nru isl-0.11.2/isl_output.c isl-0.12.1/isl_output.c --- isl-0.11.2/isl_output.c 2013-04-07 15:38:34.000000000 +0000 +++ isl-0.12.1/isl_output.c 2013-07-24 11:04:50.000000000 +0000 @@ -25,6 +25,7 @@ #include #include #include +#include static const char *s_to[2] = { " -> ", " \\to " }; static const char *s_and[2] = { " and ", " \\wedge " }; @@ -738,7 +739,7 @@ return NULL; } -static int aff_split_cmp(const void *p1, const void *p2) +static int aff_split_cmp(const void *p1, const void *p2, void *user) { const struct isl_aff_split *s1, *s2; s1 = (const struct isl_aff_split *) p1; @@ -800,7 +801,9 @@ goto error; } - qsort(split, map->n, sizeof(struct isl_aff_split), &aff_split_cmp); + if (isl_sort(split, map->n, sizeof(struct isl_aff_split), + &aff_split_cmp, NULL) < 0) + goto error; n = map->n; for (i = n - 1; i >= 1; --i) { @@ -1361,6 +1364,8 @@ } if (qp) p = upoly_print(qp->upoly, dim, qp->div, p, 0); + else + p = isl_printer_free(p); if (!isl_int_is_one(den)) { p = isl_printer_print_str(p, ")/"); p = isl_printer_print_isl_int(p, den); diff -Nru isl-0.11.2/isl_piplib.h isl-0.12.1/isl_piplib.h --- isl-0.11.2/isl_piplib.h 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/isl_piplib.h 2013-07-24 11:04:50.000000000 +0000 @@ -11,7 +11,7 @@ #define ISL_PIPLIB_H #include -#include +#include #include #ifndef ISL_PIPLIB #error "no piplib" diff -Nru isl-0.11.2/isl_point.c isl-0.12.1/isl_point.c --- isl-0.11.2/isl_point.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_point.c 2013-07-24 11:04:50.000000000 +0000 @@ -5,6 +5,7 @@ #include #include #include +#include isl_ctx *isl_point_get_ctx(__isl_keep isl_point *pnt) { @@ -142,6 +143,33 @@ return 0; } +/* Return the value of coordinate "pos" of type "type" of "pnt". + */ +__isl_give isl_val *isl_point_get_coordinate_val(__isl_keep isl_point *pnt, + enum isl_dim_type type, int pos) +{ + isl_ctx *ctx; + isl_val *v; + + if (!pnt) + return NULL; + + ctx = isl_point_get_ctx(pnt); + if (isl_point_is_void(pnt)) + isl_die(ctx, isl_error_invalid, + "void point does not have coordinates", return NULL); + if (pos < 0 || pos >= isl_space_dim(pnt->dim, type)) + isl_die(ctx, isl_error_invalid, + "position out of bounds", return NULL); + + if (type == isl_dim_set) + pos += isl_space_dim(pnt->dim, isl_dim_param); + + v = isl_val_rat_from_isl_int(ctx, pnt->vec->el[1 + pos], + pnt->vec->el[0]); + return isl_val_normalize(v); +} + __isl_give isl_point *isl_point_set_coordinate(__isl_take isl_point *pnt, enum isl_dim_type type, int pos, isl_int v) { @@ -166,6 +194,58 @@ return NULL; } +/* Replace coordinate "pos" of type "type" of "pnt" by "v". + */ +__isl_give isl_point *isl_point_set_coordinate_val(__isl_take isl_point *pnt, + enum isl_dim_type type, int pos, __isl_take isl_val *v) +{ + if (!pnt || !v) + goto error; + if (isl_point_is_void(pnt)) + isl_die(isl_point_get_ctx(pnt), isl_error_invalid, + "void point does not have coordinates", goto error); + if (pos < 0 || pos >= isl_space_dim(pnt->dim, type)) + isl_die(isl_point_get_ctx(pnt), isl_error_invalid, + "position out of bounds", goto error); + if (!isl_val_is_rat(v)) + isl_die(isl_point_get_ctx(pnt), isl_error_invalid, + "expecting rational value", goto error); + + if (isl_int_eq(pnt->vec->el[1 + pos], v->n) && + isl_int_eq(pnt->vec->el[0], v->d)) { + isl_val_free(v); + return pnt; + } + + pnt = isl_point_cow(pnt); + if (!pnt) + goto error; + pnt->vec = isl_vec_cow(pnt->vec); + if (!pnt->vec) + goto error; + + if (isl_int_eq(pnt->vec->el[0], v->d)) { + isl_int_set(pnt->vec->el[1 + pos], v->n); + } else if (isl_int_is_one(v->d)) { + isl_int_mul(pnt->vec->el[1 + pos], pnt->vec->el[0], v->n); + } else { + isl_seq_scale(pnt->vec->el + 1, + pnt->vec->el + 1, v->d, pnt->vec->size - 1); + isl_int_mul(pnt->vec->el[1 + pos], pnt->vec->el[0], v->n); + isl_int_mul(pnt->vec->el[0], pnt->vec->el[0], v->d); + pnt->vec = isl_vec_normalize(pnt->vec); + if (!pnt->vec) + goto error; + } + + isl_val_free(v); + return pnt; +error: + isl_val_free(v); + isl_point_free(pnt); + return NULL; +} + __isl_give isl_point *isl_point_add_ui(__isl_take isl_point *pnt, enum isl_dim_type type, int pos, unsigned val) { diff -Nru isl-0.11.2/isl_polynomial.c isl-0.12.1/isl_polynomial.c --- isl-0.11.2/isl_polynomial.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_polynomial.c 2013-07-24 11:04:50.000000000 +0000 @@ -24,6 +24,7 @@ #include #include #include +#include #include static unsigned pos(__isl_keep isl_space *dim, enum isl_dim_type type) @@ -801,6 +802,60 @@ return NULL; } +/* Multiply the constant polynomial "up" by "v". + */ +static __isl_give struct isl_upoly *isl_upoly_cst_scale_val( + __isl_take struct isl_upoly *up, __isl_keep isl_val *v) +{ + struct isl_upoly_cst *cst; + + if (isl_upoly_is_zero(up)) + return up; + + up = isl_upoly_cow(up); + if (!up) + return NULL; + + cst = isl_upoly_as_cst(up); + + isl_int_mul(cst->n, cst->n, v->n); + isl_int_mul(cst->d, cst->d, v->d); + isl_upoly_cst_reduce(cst); + + return up; +} + +/* Multiply the polynomial "up" by "v". + */ +static __isl_give struct isl_upoly *isl_upoly_scale_val( + __isl_take struct isl_upoly *up, __isl_keep isl_val *v) +{ + int i; + struct isl_upoly_rec *rec; + + if (!up) + return NULL; + + if (isl_upoly_is_cst(up)) + return isl_upoly_cst_scale_val(up, v); + + up = isl_upoly_cow(up); + rec = isl_upoly_as_rec(up); + if (!rec) + goto error; + + for (i = 0; i < rec->n; ++i) { + rec->p[i] = isl_upoly_scale_val(rec->p[i], v); + if (!rec->p[i]) + goto error; + } + + return up; +error: + isl_upoly_free(up); + return NULL; +} + __isl_give struct isl_upoly *isl_upoly_mul_cst(__isl_take struct isl_upoly *up1, __isl_take struct isl_upoly *up2) { @@ -1313,6 +1368,7 @@ int *exp1 = NULL; int *exp2 = NULL; isl_mat *div = NULL; + int n_div1, n_div2; qp1 = isl_qpolynomial_cow(qp1); qp2 = isl_qpolynomial_cow(qp2); @@ -1323,9 +1379,11 @@ isl_assert(qp1->div->ctx, qp1->div->n_row >= qp2->div->n_row && qp1->div->n_col >= qp2->div->n_col, goto error); - exp1 = isl_alloc_array(qp1->div->ctx, int, qp1->div->n_row); - exp2 = isl_alloc_array(qp2->div->ctx, int, qp2->div->n_row); - if (!exp1 || !exp2) + n_div1 = qp1->div->n_row; + n_div2 = qp2->div->n_row; + exp1 = isl_alloc_array(qp1->div->ctx, int, n_div1); + exp2 = isl_alloc_array(qp2->div->ctx, int, n_div2); + if ((n_div1 && !exp1) || (n_div2 && !exp2)) goto error; div = isl_merge_divs(qp1->div, qp2->div, exp1, exp2); @@ -1463,6 +1521,48 @@ return isl_qpolynomial_mul_isl_int(qp, v); } +/* Multiply "qp" by "v". + */ +__isl_give isl_qpolynomial *isl_qpolynomial_scale_val( + __isl_take isl_qpolynomial *qp, __isl_take isl_val *v) +{ + if (!qp || !v) + goto error; + + if (!isl_val_is_rat(v)) + isl_die(isl_qpolynomial_get_ctx(qp), isl_error_invalid, + "expecting rational factor", goto error); + + if (isl_val_is_one(v)) { + isl_val_free(v); + return qp; + } + + if (isl_val_is_zero(v)) { + isl_space *space; + + space = isl_qpolynomial_get_domain_space(qp); + isl_qpolynomial_free(qp); + isl_val_free(v); + return isl_qpolynomial_zero_on_domain(space); + } + + qp = isl_qpolynomial_cow(qp); + if (!qp) + goto error; + + qp->upoly = isl_upoly_scale_val(qp->upoly, v); + if (!qp->upoly) + qp = isl_qpolynomial_free(qp); + + isl_val_free(v); + return qp; +error: + isl_val_free(v); + isl_qpolynomial_free(qp); + return NULL; +} + __isl_give isl_qpolynomial *isl_qpolynomial_mul(__isl_take isl_qpolynomial *qp1, __isl_take isl_qpolynomial *qp2) { @@ -1613,6 +1713,42 @@ return 1; } +/* Return the constant term of "up". + */ +static __isl_give isl_val *isl_upoly_get_constant_val( + __isl_keep struct isl_upoly *up) +{ + struct isl_upoly_cst *cst; + + if (!up) + return NULL; + + while (!isl_upoly_is_cst(up)) { + struct isl_upoly_rec *rec; + + rec = isl_upoly_as_rec(up); + if (!rec) + return NULL; + up = rec->p[0]; + } + + cst = isl_upoly_as_cst(up); + if (!cst) + return NULL; + return isl_val_rat_from_isl_int(cst->up.ctx, cst->n, cst->d); +} + +/* Return the constant term of "qp". + */ +__isl_give isl_val *isl_qpolynomial_get_constant_val( + __isl_keep isl_qpolynomial *qp) +{ + if (!qp) + return NULL; + + return isl_upoly_get_constant_val(qp->upoly); +} + int isl_upoly_is_affine(__isl_keep struct isl_upoly *up) { int is_cst; @@ -2146,6 +2282,35 @@ return qp; } +/* Return an isl_qpolynomial that is equal to "val" on domain space "domain". + */ +__isl_give isl_qpolynomial *isl_qpolynomial_val_on_domain( + __isl_take isl_space *domain, __isl_take isl_val *val) +{ + isl_qpolynomial *qp; + struct isl_upoly_cst *cst; + + if (!domain || !val) + goto error; + + qp = isl_qpolynomial_alloc(isl_space_copy(domain), 0, + isl_upoly_zero(domain->ctx)); + if (!qp) + goto error; + + cst = isl_upoly_as_cst(qp->upoly); + isl_int_set(cst->n, val->n); + isl_int_set(cst->d, val->d); + + isl_space_free(domain); + isl_val_free(val); + return qp; +error: + isl_space_free(domain); + isl_val_free(val); + return NULL; +} + static int up_set_active(__isl_keep struct isl_upoly *up, int *active, int d) { struct isl_upoly_rec *rec; @@ -2998,6 +3163,9 @@ unsigned g_src_pos; int *reordering; + if (n == 0) + return qp; + qp = isl_qpolynomial_cow(qp); if (!qp) return NULL; @@ -3563,6 +3731,17 @@ isl_int_set(*d, term->d); } +/* Return the coefficient of the term "term". + */ +__isl_give isl_val *isl_term_get_coefficient_val(__isl_keep isl_term *term) +{ + if (!term) + return NULL; + + return isl_val_rat_from_isl_int(isl_term_get_ctx(term), + term->n, term->d); +} + int isl_term_get_exp(__isl_keep isl_term *term, enum isl_dim_type type, unsigned pos) { @@ -3893,7 +4072,7 @@ if (morph->inv->n_row != morph->inv->n_col) n_sub += qp->div->n_row; subs = isl_calloc_array(ctx, struct isl_upoly *, n_sub); - if (!subs) + if (n_sub && !subs) goto error; for (i = 0; 1 + i < morph->inv->n_row; ++i) @@ -3956,14 +4135,6 @@ return NULL; } -__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_sub( - __isl_take isl_union_pw_qpolynomial *upwqp1, - __isl_take isl_union_pw_qpolynomial *upwqp2) -{ - return isl_union_pw_qpolynomial_add(upwqp1, - isl_union_pw_qpolynomial_neg(upwqp2)); -} - __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_mul( __isl_take isl_union_pw_qpolynomial *upwqp1, __isl_take isl_union_pw_qpolynomial *upwqp2) @@ -4429,7 +4600,7 @@ /* Drop all floors in "qp", turning each integer division [a/m] into * a rational division a/m. If "down" is set, then the integer division - * is replaces by (a-(m-1))/m instead. + * is replaced by (a-(m-1))/m instead. */ static __isl_give isl_qpolynomial *qp_drop_floors( __isl_take isl_qpolynomial *qp, int down) diff -Nru isl-0.11.2/isl_power_templ.c isl-0.12.1/isl_power_templ.c --- isl-0.11.2/isl_power_templ.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_power_templ.c 2013-07-01 13:12:40.000000000 +0000 @@ -1,3 +1,5 @@ +#include + #define xFN(TYPE,NAME) TYPE ## _ ## NAME #define FN(TYPE,NAME) xFN(TYPE,NAME) @@ -56,3 +58,24 @@ FN(TYPE,free)(map); return NULL; } + +/* Compute the given non-zero power of "map" and return the result. + * If the exponent "exp" is negative, then the -exp th power of the inverse + * relation is computed. + */ +__isl_give TYPE *FN(TYPE,fixed_power_val)(__isl_take TYPE *map, + __isl_take isl_val *exp) +{ + if (!map || !exp) + goto error; + if (!isl_val_is_int(exp)) + isl_die(FN(TYPE,get_ctx)(map), isl_error_invalid, + "expecting integer exponent", goto error); + map = FN(TYPE,fixed_power)(map, exp->n); + isl_val_free(exp); + return map; +error: + FN(TYPE,free)(map); + isl_val_free(exp); + return NULL; +} diff -Nru isl-0.11.2/isl_pw_templ.c isl-0.12.1/isl_pw_templ.c --- isl-0.11.2/isl_pw_templ.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_pw_templ.c 2013-07-24 11:04:50.000000000 +0000 @@ -1,4 +1,5 @@ #include +#include #define xFN(TYPE,NAME) TYPE ## _ ## NAME #define FN(TYPE,NAME) xFN(TYPE,NAME) @@ -695,6 +696,37 @@ return dom; } +/* Exploit the equalities in the domain of piece "i" of "pw" + * to simplify the associated function. + * If the domain of piece "i" is empty, then remove it entirely, + * replacing it with the final piece. + */ +static int FN(PW,exploit_equalities_and_remove_if_empty)(__isl_keep PW *pw, + int i) +{ + isl_basic_set *aff; + int empty = isl_set_plain_is_empty(pw->p[i].set); + + if (empty < 0) + return -1; + if (empty) { + isl_set_free(pw->p[i].set); + FN(EL,free)(pw->p[i].FIELD); + if (i != pw->n - 1) + pw->p[i] = pw->p[pw->n - 1]; + pw->n--; + + return 0; + } + + aff = isl_set_affine_hull(isl_set_copy(pw->p[i].set)); + pw->p[i].FIELD = FN(EL,substitute_equalities)(pw->p[i].FIELD, aff); + if (!pw->p[i].FIELD) + return -1; + + return 0; +} + /* Restrict the domain of "pw" by combining each cell * with "set" through a call to "fn", where "fn" may be * isl_set_intersect or isl_set_intersect_params. @@ -719,22 +751,9 @@ goto error; for (i = pw->n - 1; i >= 0; --i) { - isl_basic_set *aff; pw->p[i].set = fn(pw->p[i].set, isl_set_copy(set)); - if (!pw->p[i].set) - goto error; - aff = isl_set_affine_hull(isl_set_copy(pw->p[i].set)); - pw->p[i].FIELD = FN(EL,substitute_equalities)(pw->p[i].FIELD, - aff); - if (!pw->p[i].FIELD) + if (FN(PW,exploit_equalities_and_remove_if_empty)(pw, i) < 0) goto error; - if (isl_set_plain_is_empty(pw->p[i].set)) { - isl_set_free(pw->p[i].set); - FN(EL,free)(pw->p[i].FIELD); - if (i != pw->n - 1) - pw->p[i] = pw->p[pw->n - 1]; - pw->n--; - } } isl_set_free(set); @@ -1111,14 +1130,32 @@ return NULL; for (i = 0; i < pw->n; ++i) { pw->p[i].set = isl_set_fix(pw->p[i].set, type, pos, v); - if (!pw->p[i].set) - goto error; + if (FN(PW,exploit_equalities_and_remove_if_empty)(pw, i) < 0) + return FN(PW,free)(pw); } return pw; +} + +/* Fix the value of the variable at position "pos" of type "type" of "pw" + * to be equal to "v". + */ +__isl_give PW *FN(PW,fix_val)(__isl_take PW *pw, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *v) +{ + if (!v) + return FN(PW,free)(pw); + if (!isl_val_is_int(v)) + isl_die(FN(PW,get_ctx)(pw), isl_error_invalid, + "expecting integer value", goto error); + + pw = FN(PW,fix_dim)(pw, type, pos, v->n); + isl_val_free(v); + + return pw; error: - FN(PW,free)(pw); - return NULL; + isl_val_free(v); + return FN(PW,free)(pw); } unsigned FN(PW,dim)(__isl_keep PW *pw, enum isl_dim_type type) @@ -1524,6 +1561,58 @@ return NULL; } +/* Multiply the pieces of "pw" by "v" and return the result. + */ +__isl_give PW *FN(PW,scale_val)(__isl_take PW *pw, __isl_take isl_val *v) +{ + int i; + + if (!pw || !v) + goto error; + + if (isl_val_is_one(v)) { + isl_val_free(v); + return pw; + } + if (pw && DEFAULT_IS_ZERO && isl_val_is_zero(v)) { + PW *zero; + isl_space *space = FN(PW,get_space)(pw); +#ifdef HAS_TYPE + zero = FN(PW,ZERO)(space, pw->type); +#else + zero = FN(PW,ZERO)(space); +#endif + FN(PW,free)(pw); + isl_val_free(v); + return zero; + } + if (pw->n == 0) { + isl_val_free(v); + return pw; + } + pw = FN(PW,cow)(pw); + if (!pw) + goto error; + +#ifdef HAS_TYPE + if (isl_val_is_neg(v)) + pw->type = isl_fold_type_negate(pw->type); +#endif + for (i = 0; i < pw->n; ++i) { + pw->p[i].FIELD = FN(EL,scale_val)(pw->p[i].FIELD, + isl_val_copy(v)); + if (!pw->p[i].FIELD) + goto error; + } + + isl_val_free(v); + return pw; +error: + isl_val_free(v); + FN(PW,free)(pw); + return NULL; +} + __isl_give PW *FN(PW,scale)(__isl_take PW *pw, isl_int v) { return FN(PW,mul_isl_int)(pw, v); diff -Nru isl-0.11.2/isl_scan.c isl-0.12.1/isl_scan.c --- isl-0.11.2/isl_scan.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_scan.c 2013-07-24 11:04:50.000000000 +0000 @@ -13,6 +13,7 @@ #include "isl_scan.h" #include #include "isl_tab.h" +#include struct isl_counter { struct isl_scan_callback callback; @@ -302,3 +303,21 @@ return -1; return isl_set_count_upto(set, set->ctx->zero, count); } + +/* Count the total number of elements in "set" (in an inefficient way) and + * return the result. + */ +__isl_give isl_val *isl_set_count_val(__isl_keep isl_set *set) +{ + isl_val *v; + + if (!set) + return NULL; + v = isl_val_zero(isl_set_get_ctx(set)); + v = isl_val_cow(v); + if (!v) + return NULL; + if (isl_set_count(set, &v->n) < 0) + v = isl_val_free(v); + return v; +} diff -Nru isl-0.11.2/isl_schedule.c isl-0.12.1/isl_schedule.c --- isl-0.11.2/isl_schedule.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_schedule.c 2013-07-24 11:04:50.000000000 +0000 @@ -1,11 +1,13 @@ /* * Copyright 2011 INRIA Saclay + * Copyright 2012-2013 Ecole Normale Superieure * * Use of this software is governed by the MIT license * * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, * 91893 Orsay, France + * and Ecole Normale Superieure, 45 rue d'Ulm, 75230 Paris, France */ #include @@ -24,7 +26,6 @@ #include #include #include -#include #include #include @@ -326,7 +327,7 @@ return entry->data; } -/* Check whether the dependence graph has an edge of the give type +/* Check whether the dependence graph has an edge of the given type * between the given two nodes. */ static int graph_has_edge(struct isl_sched_graph *graph, @@ -429,7 +430,8 @@ graph->intra_hmap = isl_hmap_map_basic_set_alloc(ctx, 2 * n_edge); graph->inter_hmap = isl_hmap_map_basic_set_alloc(ctx, 2 * n_edge); - if (!graph->node || !graph->region || !graph->edge || !graph->sorted) + if (!graph->node || !graph->region || (graph->n_edge && !graph->edge) || + !graph->sorted) return -1; for(i = 0; i < graph->n; ++i) @@ -537,7 +539,7 @@ graph->node[graph->n].zero = zero; graph->n++; - if (!sched || !band || !band_id || !zero) + if (!sched || (graph->max_row && (!band || !band_id || !zero))) return -1; return 0; @@ -2609,6 +2611,7 @@ "error in schedule construction", return -1); } + isl_int_divexact(sol->el[1], sol->el[1], sol->el[0]); if (isl_int_cmp_si(sol->el[1], n_edge) >= 0) { isl_vec_free(sol); isl_die(ctx, isl_error_unknown, @@ -3083,6 +3086,10 @@ * Because of the way the schedule is constructed, we know that * the position of the band inside the schedule of a node is the same * for all active nodes. + * + * The partial schedule for the band is created before the children + * are created to that construct_band_list can refer to the partial + * schedule of the parent. */ static __isl_give isl_band *construct_band(__isl_keep isl_schedule *schedule, __isl_keep isl_band *parent, @@ -3101,17 +3108,6 @@ band->parent = parent; for (i = 0; i < schedule->n; ++i) - if (active[i] && schedule->node[i].n_band > band_nr + 1) - break; - - if (i < schedule->n) { - band->children = construct_band_list(schedule, band, - band_nr + 1, active, n_active); - if (!band->children) - goto error; - } - - for (i = 0; i < schedule->n; ++i) if (active[i]) break; @@ -3125,7 +3121,7 @@ band->n = end - start; band->zero = isl_alloc_array(ctx, int, band->n); - if (!band->zero) + if (band->n && !band->zero) goto error; for (j = 0; j < band->n; ++j) @@ -3151,12 +3147,245 @@ if (!band->pma) goto error; + for (i = 0; i < schedule->n; ++i) + if (active[i] && schedule->node[i].n_band > band_nr + 1) + break; + + if (i < schedule->n) { + band->children = construct_band_list(schedule, band, + band_nr + 1, active, n_active); + if (!band->children) + goto error; + } + return band; error: isl_band_free(band); return NULL; } +/* Internal data structure used inside cmp_band and pw_multi_aff_extract_int. + * + * r is set to a negative value if anything goes wrong. + * + * c1 stores the result of extract_int. + * c2 is a temporary value used inside cmp_band_in_ancestor. + * t is a temporary value used inside extract_int. + * + * first and equal are used inside extract_int. + * first is set if we are looking at the first isl_multi_aff inside + * the isl_union_pw_multi_aff. + * equal is set if all the isl_multi_affs have been equal so far. + */ +struct isl_cmp_band_data { + int r; + + int first; + int equal; + + isl_int t; + isl_int c1; + isl_int c2; +}; + +/* Check if "ma" assigns a constant value. + * Note that this function is only called on isl_multi_affs + * with a single output dimension. + * + * If "ma" assigns a constant value then we compare it to data->c1 + * or assign it to data->c1 if this is the first isl_multi_aff we consider. + * If "ma" does not assign a constant value or if it assigns a value + * that is different from data->c1, then we set data->equal to zero + * and terminate the check. + */ +static int multi_aff_extract_int(__isl_take isl_set *set, + __isl_take isl_multi_aff *ma, void *user) +{ + isl_aff *aff; + struct isl_cmp_band_data *data = user; + + aff = isl_multi_aff_get_aff(ma, 0); + data->r = isl_aff_is_cst(aff); + if (data->r >= 0 && data->r) { + isl_aff_get_constant(aff, &data->t); + if (data->first) { + isl_int_set(data->c1, data->t); + data->first = 0; + } else if (!isl_int_eq(data->c1, data->t)) + data->equal = 0; + } else if (data->r >= 0 && !data->r) + data->equal = 0; + + isl_aff_free(aff); + isl_set_free(set); + isl_multi_aff_free(ma); + + if (data->r < 0) + return -1; + if (!data->equal) + return -1; + return 0; +} + +/* This function is called for each isl_pw_multi_aff in + * the isl_union_pw_multi_aff checked by extract_int. + * Check all the isl_multi_affs inside "pma". + */ +static int pw_multi_aff_extract_int(__isl_take isl_pw_multi_aff *pma, + void *user) +{ + int r; + + r = isl_pw_multi_aff_foreach_piece(pma, &multi_aff_extract_int, user); + isl_pw_multi_aff_free(pma); + + return r; +} + +/* Check if "upma" assigns a single constant value to its domain. + * If so, return 1 and store the result in data->c1. + * If not, return 0. + * + * A negative return value from isl_union_pw_multi_aff_foreach_pw_multi_aff + * means that either an error occurred or that we have broken off the check + * because we already know the result is going to be negative. + * In the latter case, data->equal is set to zero. + */ +static int extract_int(__isl_keep isl_union_pw_multi_aff *upma, + struct isl_cmp_band_data *data) +{ + data->first = 1; + data->equal = 1; + + if (isl_union_pw_multi_aff_foreach_pw_multi_aff(upma, + &pw_multi_aff_extract_int, data) < 0) { + if (!data->equal) + return 0; + return -1; + } + + return !data->first && data->equal; +} + +/* Compare "b1" and "b2" based on the parent schedule of their ancestor + * "ancestor". + * + * If the parent of "ancestor" also has a single member, then we + * first try to compare the two band based on the partial schedule + * of this parent. + * + * Otherwise, or if the result is inconclusive, we look at the partial schedule + * of "ancestor" itself. + * In particular, we specialize the parent schedule based + * on the domains of the child schedules, check if both assign + * a single constant value and, if so, compare the two constant values. + * If the specialized parent schedules do not assign a constant value, + * then they cannot be used to order the two bands and so in this case + * we return 0. + */ +static int cmp_band_in_ancestor(__isl_keep isl_band *b1, + __isl_keep isl_band *b2, struct isl_cmp_band_data *data, + __isl_keep isl_band *ancestor) +{ + isl_union_pw_multi_aff *upma; + isl_union_set *domain; + int r; + + if (data->r < 0) + return 0; + + if (ancestor->parent && ancestor->parent->n == 1) { + r = cmp_band_in_ancestor(b1, b2, data, ancestor->parent); + if (data->r < 0) + return 0; + if (r) + return r; + } + + upma = isl_union_pw_multi_aff_copy(b1->pma); + domain = isl_union_pw_multi_aff_domain(upma); + upma = isl_union_pw_multi_aff_copy(ancestor->pma); + upma = isl_union_pw_multi_aff_intersect_domain(upma, domain); + r = extract_int(upma, data); + isl_union_pw_multi_aff_free(upma); + + if (r < 0) + data->r = -1; + if (r < 0 || !r) + return 0; + + isl_int_set(data->c2, data->c1); + + upma = isl_union_pw_multi_aff_copy(b2->pma); + domain = isl_union_pw_multi_aff_domain(upma); + upma = isl_union_pw_multi_aff_copy(ancestor->pma); + upma = isl_union_pw_multi_aff_intersect_domain(upma, domain); + r = extract_int(upma, data); + isl_union_pw_multi_aff_free(upma); + + if (r < 0) + data->r = -1; + if (r < 0 || !r) + return 0; + + return isl_int_cmp(data->c2, data->c1); +} + +/* Compare "a" and "b" based on the parent schedule of their parent. + */ +static int cmp_band(const void *a, const void *b, void *user) +{ + isl_band *b1 = *(isl_band * const *) a; + isl_band *b2 = *(isl_band * const *) b; + struct isl_cmp_band_data *data = user; + + return cmp_band_in_ancestor(b1, b2, data, b1->parent); +} + +/* Sort the elements in "list" based on the partial schedules of its parent + * (and ancestors). In particular if the parent assigns constant values + * to the domains of the bands in "list", then the elements are sorted + * according to that order. + * This order should be a more "natural" order for the user, but otherwise + * shouldn't have any effect. + * If we would be constructing an isl_band forest directly in + * isl_union_set_compute_schedule then there wouldn't be any need + * for a reordering, since the children would be added to the list + * in their natural order automatically. + * + * If there is only one element in the list, then there is no need to sort + * anything. + * If the partial schedule of the parent has more than one member + * (or if there is no parent), then it's + * defnitely not assigning constant values to the different children in + * the list and so we wouldn't be able to use it to sort the list. + */ +static __isl_give isl_band_list *sort_band_list(__isl_take isl_band_list *list, + __isl_keep isl_band *parent) +{ + struct isl_cmp_band_data data; + + if (!list) + return NULL; + if (list->n <= 1) + return list; + if (!parent || parent->n != 1) + return list; + + data.r = 0; + isl_int_init(data.c1); + isl_int_init(data.c2); + isl_int_init(data.t); + isl_sort(list->p, list->n, sizeof(list->p[0]), &cmp_band, &data); + if (data.r < 0) + list = isl_band_list_free(list); + isl_int_clear(data.c1); + isl_int_clear(data.c2); + isl_int_clear(data.t); + + return list; +} + /* Construct a list of bands that start at the same position (with * sequence number band_nr) in the schedules of the nodes that * were active in the parent band. @@ -3204,7 +3433,7 @@ } active = isl_alloc_array(ctx, int, schedule->n); - if (!active) + if (schedule->n && !active) return NULL; list = isl_band_list_alloc(ctx, n_band); @@ -3241,6 +3470,8 @@ free(active); + list = sort_band_list(list, parent); + return list; } @@ -3256,7 +3487,7 @@ int *active; active = isl_alloc_array(ctx, int, schedule->n); - if (!active) + if (schedule->n && !active) return NULL; for (i = 0; i < schedule->n; ++i) diff -Nru isl-0.11.2/isl_set_list.c isl-0.12.1/isl_set_list.c --- isl-0.11.2/isl_set_list.c 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/isl_set_list.c 2013-07-01 13:12:40.000000000 +0000 @@ -0,0 +1,21 @@ +#include + +#undef EL +#define EL isl_basic_set + +#include + +#undef EL +#define EL isl_set + +#include + +#undef BASE +#define BASE basic_set + +#include + +#undef BASE +#define BASE set + +#include diff -Nru isl-0.11.2/isl_space.c isl-0.12.1/isl_space.c --- isl-0.11.2/isl_space.c 2013-03-28 18:18:47.000000000 +0000 +++ isl-0.12.1/isl_space.c 2013-07-24 11:02:32.000000000 +0000 @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -1250,9 +1251,9 @@ dim->nested[1] = nested; if (dim->ids) { - ids = isl_alloc_array(dim->ctx, isl_id *, - dim->n_in + dim->n_out); - if (!ids) + int n_id = dim->n_in + dim->n_out; + ids = isl_alloc_array(dim->ctx, isl_id *, n_id); + if (n_id && !ids) goto error; get_ids(dim, isl_dim_in, 0, dim->n_in, ids); get_ids(dim, isl_dim_out, 0, dim->n_out, ids + dim->n_in); diff -Nru isl-0.11.2/isl_space_private.h isl-0.12.1/isl_space_private.h --- isl-0.11.2/isl_space_private.h 2013-03-28 18:18:47.000000000 +0000 +++ isl-0.12.1/isl_space_private.h 2013-07-01 13:12:40.000000000 +0000 @@ -1,3 +1,6 @@ +#ifndef ISL_SPACE_PRIVATE +#define ISL_SPACE_PRIVATE + #include #include #include @@ -51,3 +54,5 @@ __isl_give isl_space *isl_space_extend_domain_with_range( __isl_take isl_space *domain, __isl_take isl_space *model); + +#endif diff -Nru isl-0.11.2/isl_stream.c isl-0.12.1/isl_stream.c --- isl-0.11.2/isl_stream.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_stream.c 2013-07-01 13:12:40.000000000 +0000 @@ -14,6 +14,7 @@ #include #include #include +#include struct isl_keyword { char *name; @@ -80,6 +81,39 @@ return tok; } +/* Return the type of "tok". + */ +int isl_token_get_type(struct isl_token *tok) +{ + return tok ? tok->type : ISL_TOKEN_ERROR; +} + +/* Given a token of type ISL_TOKEN_VALUE, return the value it represents. + */ +__isl_give isl_val *isl_token_get_val(isl_ctx *ctx, struct isl_token *tok) +{ + if (!tok) + return NULL; + if (tok->type != ISL_TOKEN_VALUE) + isl_die(ctx, isl_error_invalid, "not a value token", + return NULL); + + return isl_val_int_from_isl_int(ctx, tok->u.v); +} + +/* Given a token of type ISL_TOKEN_STRING, return the string it represents. + */ +__isl_give char *isl_token_get_str(isl_ctx *ctx, struct isl_token *tok) +{ + if (!tok) + return NULL; + if (tok->type != ISL_TOKEN_STRING) + isl_die(ctx, isl_error_invalid, "not a string token", + return NULL); + + return strdup(tok->u.s); +} + void isl_token_free(struct isl_token *tok) { if (!tok) @@ -265,6 +299,8 @@ return ISL_TOKEN_AND; if (!strcasecmp(s->buffer, "or")) return ISL_TOKEN_OR; + if (!strcasecmp(s->buffer, "implies")) + return ISL_TOKEN_IMPLIES; if (!strcasecmp(s->buffer, "not")) return ISL_TOKEN_NOT; if (!strcasecmp(s->buffer, "infty")) @@ -289,6 +325,10 @@ return ISL_TOKEN_FLOORD; if (!strcasecmp(s->buffer, "mod")) return ISL_TOKEN_MOD; + if (!strcasecmp(s->buffer, "ceil")) + return ISL_TOKEN_CEIL; + if (!strcasecmp(s->buffer, "floor")) + return ISL_TOKEN_FLOOR; if (!s->keywords) return ISL_TOKEN_IDENT; diff -Nru isl-0.11.2/isl_tab.c isl-0.12.1/isl_tab.c --- isl-0.11.2/isl_tab.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_tab.c 2013-07-24 11:04:50.000000000 +0000 @@ -36,16 +36,16 @@ if (!tab->mat) goto error; tab->var = isl_alloc_array(ctx, struct isl_tab_var, n_var); - if (!tab->var) + if (n_var && !tab->var) goto error; tab->con = isl_alloc_array(ctx, struct isl_tab_var, n_row); - if (!tab->con) + if (n_row && !tab->con) goto error; tab->col_var = isl_alloc_array(ctx, int, n_var); - if (!tab->col_var) + if (n_var && !tab->col_var) goto error; tab->row_var = isl_alloc_array(ctx, int, n_row); - if (!tab->row_var) + if (n_row && !tab->row_var) goto error; for (i = 0; i < n_var; ++i) { tab->var[i].index = i; @@ -89,6 +89,11 @@ return NULL; } +isl_ctx *isl_tab_get_ctx(struct isl_tab *tab) +{ + return tab ? isl_mat_get_ctx(tab->mat) : NULL; +} + int isl_tab_extend_cons(struct isl_tab *tab, unsigned n_new) { unsigned off; @@ -233,29 +238,29 @@ if (!dup->mat) goto error; dup->var = isl_alloc_array(tab->mat->ctx, struct isl_tab_var, tab->max_var); - if (!dup->var) + if (tab->max_var && !dup->var) goto error; for (i = 0; i < tab->n_var; ++i) dup->var[i] = tab->var[i]; dup->con = isl_alloc_array(tab->mat->ctx, struct isl_tab_var, tab->max_con); - if (!dup->con) + if (tab->max_con && !dup->con) goto error; for (i = 0; i < tab->n_con; ++i) dup->con[i] = tab->con[i]; dup->col_var = isl_alloc_array(tab->mat->ctx, int, tab->mat->n_col - off); - if (!dup->col_var) + if ((tab->mat->n_col - off) && !dup->col_var) goto error; for (i = 0; i < tab->n_col; ++i) dup->col_var[i] = tab->col_var[i]; dup->row_var = isl_alloc_array(tab->mat->ctx, int, tab->mat->n_row); - if (!dup->row_var) + if (tab->mat->n_row && !dup->row_var) goto error; for (i = 0; i < tab->n_row; ++i) dup->row_var[i] = tab->row_var[i]; if (tab->row_sign) { dup->row_sign = isl_alloc_array(tab->mat->ctx, enum isl_tab_row_sign, tab->mat->n_row); - if (!dup->row_sign) + if (tab->mat->n_row && !dup->row_sign) goto error; for (i = 0; i < tab->n_row; ++i) dup->row_sign[i] = tab->row_sign[i]; @@ -266,7 +271,7 @@ goto error; dup->sample_index = isl_alloc_array(tab->mat->ctx, int, tab->samples->n_row); - if (!dup->sample_index) + if (tab->samples->n_row && !dup->sample_index) goto error; dup->n_sample = tab->n_sample; dup->n_outside = tab->n_outside; @@ -462,7 +467,7 @@ goto error; prod->var = isl_alloc_array(tab1->mat->ctx, struct isl_tab_var, tab1->max_var + tab2->max_var); - if (!prod->var) + if ((tab1->max_var + tab2->max_var) && !prod->var) goto error; for (i = 0; i < tab1->n_var; ++i) { prod->var[i] = tab1->var[i]; @@ -476,7 +481,7 @@ } prod->con = isl_alloc_array(tab1->mat->ctx, struct isl_tab_var, tab1->max_con + tab2->max_con); - if (!prod->con) + if ((tab1->max_con + tab2->max_con) && !prod->con) goto error; for (i = 0; i < tab1->n_con; ++i) { prod->con[i] = tab1->con[i]; @@ -490,7 +495,7 @@ } prod->col_var = isl_alloc_array(tab1->mat->ctx, int, tab1->n_col + tab2->n_col); - if (!prod->col_var) + if ((tab1->n_col + tab2->n_col) && !prod->col_var) goto error; for (i = 0; i < tab1->n_col; ++i) { int pos = i < d1 ? i : i + d2; @@ -507,7 +512,7 @@ } prod->row_var = isl_alloc_array(tab1->mat->ctx, int, tab1->mat->n_row + tab2->mat->n_row); - if (!prod->row_var) + if ((tab1->mat->n_row + tab2->mat->n_row) && !prod->row_var) goto error; for (i = 0; i < tab1->n_row; ++i) { int pos = i < r1 ? i : i + r2; @@ -831,7 +836,7 @@ union isl_tab_undo_val u; u.col_var = isl_alloc_array(tab->mat->ctx, int, tab->n_col); - if (!u.col_var) + if (tab->n_col && !u.col_var) return -1; for (i = 0; i < tab->n_col; ++i) u.col_var[i] = tab->col_var[i]; @@ -2600,6 +2605,29 @@ return NULL; } +/* Remove the sign constraint from constraint "con". + * + * If the constraint variable was originally marked non-negative, + * then we make sure we mark it non-negative again during rollback. + */ +int isl_tab_unrestrict(struct isl_tab *tab, int con) +{ + struct isl_tab_var *var; + + if (!tab) + return -1; + + var = &tab->con[con]; + if (!var->is_nonneg) + return 0; + + var->is_nonneg = 0; + if (isl_tab_push_var(tab, isl_tab_undo_unrestrict, var) < 0) + return -1; + + return 0; +} + int isl_tab_select_facet(struct isl_tab *tab, int con) { if (!tab) @@ -3051,6 +3079,21 @@ return 0; } +/* Undo the operation performed by isl_tab_unrestrict. + * + * In particular, mark the variable as being non-negative and make + * sure the sample value respects this constraint. + */ +static int ununrestrict(struct isl_tab *tab, struct isl_tab_var *var) +{ + var->is_nonneg = 1; + + if (var->is_row && restore_row(tab, var) < -1) + return -1; + + return 0; +} + static int perform_undo_var(struct isl_tab *tab, struct isl_tab_undo *undo) WARN_UNUSED; static int perform_undo_var(struct isl_tab *tab, struct isl_tab_undo *undo) { @@ -3093,6 +3136,8 @@ break; case isl_tab_undo_relax: return unrelax(tab, var); + case isl_tab_undo_unrestrict: + return ununrestrict(tab, var); default: isl_die(tab->mat->ctx, isl_error_internal, "perform_undo_var called on invalid undo record", @@ -3121,7 +3166,7 @@ unsigned off = 2 + tab->M; extra = isl_alloc_array(tab->mat->ctx, int, tab->n_col); - if (!extra) + if (tab->n_col && !extra) goto error; for (i = 0; i < tab->n_col; ++i) { for (j = 0; j < tab->n_col; ++j) @@ -3193,6 +3238,7 @@ case isl_tab_undo_zero: case isl_tab_undo_allocate: case isl_tab_undo_relax: + case isl_tab_undo_unrestrict: return perform_undo_var(tab, undo); case isl_tab_undo_bmap_eq: return isl_basic_map_free_equality(tab->bmap, 1); diff -Nru isl-0.11.2/isl_tab.h isl-0.12.1/isl_tab.h --- isl-0.11.2/isl_tab.h 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_tab.h 2013-07-01 13:12:40.000000000 +0000 @@ -35,6 +35,7 @@ isl_tab_undo_zero, isl_tab_undo_allocate, isl_tab_undo_relax, + isl_tab_undo_unrestrict, isl_tab_undo_bmap_ineq, isl_tab_undo_bmap_eq, isl_tab_undo_bmap_div, @@ -181,6 +182,8 @@ unsigned n_row, unsigned n_var, unsigned M); void isl_tab_free(struct isl_tab *tab); +isl_ctx *isl_tab_get_ctx(struct isl_tab *tab); + __isl_give struct isl_tab *isl_tab_from_basic_map( __isl_keep isl_basic_map *bmap, int track); __isl_give struct isl_tab *isl_tab_from_basic_set( @@ -234,6 +237,7 @@ struct isl_tab *isl_tab_relax(struct isl_tab *tab, int con) WARN_UNUSED; int isl_tab_select_facet(struct isl_tab *tab, int con) WARN_UNUSED; +int isl_tab_unrestrict(struct isl_tab *tab, int con) WARN_UNUSED; void isl_tab_dump(__isl_keep struct isl_tab *tab); diff -Nru isl-0.11.2/isl_tab_pip.c isl-0.12.1/isl_tab_pip.c --- isl-0.11.2/isl_tab_pip.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_tab_pip.c 2013-07-24 11:04:50.000000000 +0000 @@ -124,6 +124,8 @@ * "M" describes the solution in terms of the dimensions of "dom". * The number of columns of "M" is one more than the total number * of dimensions of "dom". + * + * If "M" is NULL, then there is no solution on "dom". */ struct isl_partial_sol { int level; @@ -322,11 +324,15 @@ isl_basic_set_free(partial->next->dom); partial->next->dom = bset; M = partial->next->M; - M = isl_mat_drop_cols(M, M->n_col - n, n); - partial->next->M = M; + if (M) { + M = isl_mat_drop_cols(M, M->n_col - n, n); + partial->next->M = M; + if (!M) + goto error; + } partial->next->level = sol->level; - if (!bset || !M) + if (!bset) goto error; sol->partial = partial->next; @@ -2081,7 +2087,7 @@ tab->n_div = dom->n_div; tab->row_sign = isl_calloc_array(bmap->ctx, enum isl_tab_row_sign, tab->mat->n_row); - if (!tab->row_sign) + if (tab->mat->n_row && !tab->row_sign) goto error; } if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) { @@ -2723,6 +2729,8 @@ static int use_shifted(struct isl_context_gbr *cgbr) { + if (!cgbr->tab) + return 0; return cgbr->tab->bmap->n_eq == 0 && cgbr->tab->bmap->n_div == 0; } @@ -3214,6 +3222,9 @@ struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context; struct isl_gbr_tab_undo *snap; + if (!cgbr->tab) + return NULL; + snap = isl_alloc_type(cgbr->tab->mat->ctx, struct isl_gbr_tab_undo); if (!snap) return NULL; @@ -3870,6 +3881,24 @@ sol->error = 1; } +/* Does "sol" contain a pair of partial solutions that could potentially + * be merged? + * + * We currently only check that "sol" is not in an error state + * and that there are at least two partial solutions of which the final two + * are defined at the same level. + */ +static int sol_has_mergeable_solutions(struct isl_sol *sol) +{ + if (sol->error) + return 0; + if (!sol->partial) + return 0; + if (!sol->partial->next) + return 0; + return sol->partial->level == sol->partial->next->level; +} + /* Compute the lexicographic minimum of the set represented by the main * tableau "tab" within the context "sol->context_tab". * @@ -3880,10 +3909,20 @@ * corresponding rows may not be marked as being non-negative. * In parts of the context where the added equality does not hold, * the main tableau is marked as being empty. + * + * Before we embark on the actual computation, we save a copy + * of the context. When we return, we check if there are any + * partial solutions that can potentially be merged. If so, + * we perform a rollback to the initial state of the context. + * The merging of partial solutions happens inside calls to + * sol_dec_level that are pushed onto the undo stack of the context. + * If there are no partial solutions that can potentially be merged + * then the rollback is skipped as it would just be wasted effort. */ static void find_solutions_main(struct isl_sol *sol, struct isl_tab *tab) { int row; + void *saved; if (!tab) goto error; @@ -3933,8 +3972,15 @@ row = tab->n_redundant - 1; } + saved = sol->context->op->save(sol->context); + find_solutions(sol, tab); + if (sol_has_mergeable_solutions(sol)) + sol->context->op->restore(sol->context, saved); + else + sol->context->op->discard(saved); + sol->level = 0; sol_pop(sol); @@ -4543,7 +4589,7 @@ ctx = isl_basic_map_get_ctx(bmap); list = isl_alloc_array(ctx, int, bmap->n_ineq); var = isl_vec_alloc(ctx, n_out); - if (!list || !var) + if ((bmap->n_ineq && !list) || (n_out && !var)) goto error; list[0] = first; @@ -5047,7 +5093,7 @@ v = isl_vec_alloc(ctx, 1 + tab->n_var); triv = isl_calloc_array(ctx, struct isl_trivial, n_region); - if (!v || !triv) + if (!v || (n_region && !triv)) goto error; level = 0; diff -Nru isl-0.11.2/isl_tarjan.c isl-0.12.1/isl_tarjan.c --- isl-0.11.2/isl_tarjan.c 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/isl_tarjan.c 2013-07-24 10:34:06.000000000 +0000 @@ -34,15 +34,15 @@ return NULL; g->len = len; g->node = isl_alloc_array(ctx, struct isl_tarjan_node, len); - if (!g->node) + if (len && !g->node) goto error; for (i = 0; i < len; ++i) g->node[i].index = -1; g->stack = isl_alloc_array(ctx, int, len); - if (!g->stack) + if (len && !g->stack) goto error; g->order = isl_alloc_array(ctx, int, 2 * len); - if (!g->order) + if (len && !g->order) goto error; g->sp = 0; diff -Nru isl-0.11.2/isl_test.c isl-0.12.1/isl_test.c --- isl-0.11.2/isl_test.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_test.c 2013-07-24 11:04:50.000000000 +0000 @@ -23,6 +23,7 @@ #include #include #include +#include #define ARRAY_SIZE(array) (sizeof(array)/sizeof(*array)) @@ -205,6 +206,17 @@ "[n] -> { [i] : i <= n }") < 0) return -1; + if (test_parse_map_equal(ctx, "{ [*] }", "{ [a] }") < 0) + return -1; + + if (test_parse_map_equal(ctx, "{ [i] : 2*floor(i/2) = i }", + "{ [i] : exists a : i = 2 a }") < 0) + return -1; + + if (test_parse_map_equal(ctx, "{ [a] -> [b] : a = 5 implies b = 5 }", + "{ [a] -> [b] : a != 5 or b = 5 }") < 0) + return -1; + return 0; } @@ -319,6 +331,221 @@ isl_map_free(map2); } +struct { + __isl_give isl_val *(*op)(__isl_take isl_val *v); + const char *arg; + const char *res; +} val_un_tests[] = { + { &isl_val_neg, "0", "0" }, + { &isl_val_abs, "0", "0" }, + { &isl_val_2exp, "0", "1" }, + { &isl_val_floor, "0", "0" }, + { &isl_val_ceil, "0", "0" }, + { &isl_val_neg, "1", "-1" }, + { &isl_val_neg, "-1", "1" }, + { &isl_val_neg, "1/2", "-1/2" }, + { &isl_val_neg, "-1/2", "1/2" }, + { &isl_val_neg, "infty", "-infty" }, + { &isl_val_neg, "-infty", "infty" }, + { &isl_val_neg, "NaN", "NaN" }, + { &isl_val_abs, "1", "1" }, + { &isl_val_abs, "-1", "1" }, + { &isl_val_abs, "1/2", "1/2" }, + { &isl_val_abs, "-1/2", "1/2" }, + { &isl_val_abs, "infty", "infty" }, + { &isl_val_abs, "-infty", "infty" }, + { &isl_val_abs, "NaN", "NaN" }, + { &isl_val_floor, "1", "1" }, + { &isl_val_floor, "-1", "-1" }, + { &isl_val_floor, "1/2", "0" }, + { &isl_val_floor, "-1/2", "-1" }, + { &isl_val_floor, "infty", "infty" }, + { &isl_val_floor, "-infty", "-infty" }, + { &isl_val_floor, "NaN", "NaN" }, + { &isl_val_ceil, "1", "1" }, + { &isl_val_ceil, "-1", "-1" }, + { &isl_val_ceil, "1/2", "1" }, + { &isl_val_ceil, "-1/2", "0" }, + { &isl_val_ceil, "infty", "infty" }, + { &isl_val_ceil, "-infty", "-infty" }, + { &isl_val_ceil, "NaN", "NaN" }, + { &isl_val_2exp, "-3", "1/8" }, + { &isl_val_2exp, "-1", "1/2" }, + { &isl_val_2exp, "1", "2" }, + { &isl_val_2exp, "2", "4" }, + { &isl_val_2exp, "3", "8" }, +}; + +/* Perform some basic tests of unary operations on isl_val objects. + */ +static int test_un_val(isl_ctx *ctx) +{ + int i; + isl_val *v, *res; + __isl_give isl_val *(*fn)(__isl_take isl_val *v); + int ok; + + for (i = 0; i < ARRAY_SIZE(val_un_tests); ++i) { + v = isl_val_read_from_str(ctx, val_un_tests[i].arg); + res = isl_val_read_from_str(ctx, val_un_tests[i].res); + fn = val_un_tests[i].op; + v = fn(v); + if (isl_val_is_nan(res)) + ok = isl_val_is_nan(v); + else + ok = isl_val_eq(v, res); + isl_val_free(v); + isl_val_free(res); + if (ok < 0) + return -1; + if (!ok) + isl_die(ctx, isl_error_unknown, + "unexpected result", return -1); + } + + return 0; +} + +struct { + __isl_give isl_val *(*fn)(__isl_take isl_val *v1, + __isl_take isl_val *v2); +} val_bin_op[] = { + ['+'] = { &isl_val_add }, + ['-'] = { &isl_val_sub }, + ['*'] = { &isl_val_mul }, + ['/'] = { &isl_val_div }, + ['g'] = { &isl_val_gcd }, + ['m'] = { &isl_val_min }, + ['M'] = { &isl_val_max }, +}; + +struct { + const char *arg1; + unsigned char op; + const char *arg2; + const char *res; +} val_bin_tests[] = { + { "0", '+', "0", "0" }, + { "1", '+', "0", "1" }, + { "1", '+', "1", "2" }, + { "1", '-', "1", "0" }, + { "1", '*', "1", "1" }, + { "1", '/', "1", "1" }, + { "2", '*', "3", "6" }, + { "2", '*', "1/2", "1" }, + { "2", '*', "1/3", "2/3" }, + { "2/3", '*', "3/5", "2/5" }, + { "2/3", '*', "7/5", "14/15" }, + { "2", '/', "1/2", "4" }, + { "-2", '/', "-1/2", "4" }, + { "-2", '/', "1/2", "-4" }, + { "2", '/', "-1/2", "-4" }, + { "2", '/', "2", "1" }, + { "2", '/', "3", "2/3" }, + { "2/3", '/', "5/3", "2/5" }, + { "2/3", '/', "5/7", "14/15" }, + { "0", '/', "0", "NaN" }, + { "42", '/', "0", "NaN" }, + { "-42", '/', "0", "NaN" }, + { "infty", '/', "0", "NaN" }, + { "-infty", '/', "0", "NaN" }, + { "NaN", '/', "0", "NaN" }, + { "0", '/', "NaN", "NaN" }, + { "42", '/', "NaN", "NaN" }, + { "-42", '/', "NaN", "NaN" }, + { "infty", '/', "NaN", "NaN" }, + { "-infty", '/', "NaN", "NaN" }, + { "NaN", '/', "NaN", "NaN" }, + { "0", '/', "infty", "0" }, + { "42", '/', "infty", "0" }, + { "-42", '/', "infty", "0" }, + { "infty", '/', "infty", "NaN" }, + { "-infty", '/', "infty", "NaN" }, + { "NaN", '/', "infty", "NaN" }, + { "0", '/', "-infty", "0" }, + { "42", '/', "-infty", "0" }, + { "-42", '/', "-infty", "0" }, + { "infty", '/', "-infty", "NaN" }, + { "-infty", '/', "-infty", "NaN" }, + { "NaN", '/', "-infty", "NaN" }, + { "1", '-', "1/3", "2/3" }, + { "1/3", '+', "1/2", "5/6" }, + { "1/2", '+', "1/2", "1" }, + { "3/4", '-', "1/4", "1/2" }, + { "1/2", '-', "1/3", "1/6" }, + { "infty", '+', "42", "infty" }, + { "infty", '+', "infty", "infty" }, + { "42", '+', "infty", "infty" }, + { "infty", '-', "infty", "NaN" }, + { "infty", '*', "infty", "infty" }, + { "infty", '*', "-infty", "-infty" }, + { "-infty", '*', "infty", "-infty" }, + { "-infty", '*', "-infty", "infty" }, + { "0", '*', "infty", "NaN" }, + { "1", '*', "infty", "infty" }, + { "infty", '*', "0", "NaN" }, + { "infty", '*', "42", "infty" }, + { "42", '-', "infty", "-infty" }, + { "infty", '+', "-infty", "NaN" }, + { "4", 'g', "6", "2" }, + { "5", 'g', "6", "1" }, + { "42", 'm', "3", "3" }, + { "42", 'M', "3", "42" }, + { "3", 'm', "42", "3" }, + { "3", 'M', "42", "42" }, + { "42", 'm', "infty", "42" }, + { "42", 'M', "infty", "infty" }, + { "42", 'm', "-infty", "-infty" }, + { "42", 'M', "-infty", "42" }, + { "42", 'm', "NaN", "NaN" }, + { "42", 'M', "NaN", "NaN" }, + { "infty", 'm', "-infty", "-infty" }, + { "infty", 'M', "-infty", "infty" }, +}; + +/* Perform some basic tests of binary operations on isl_val objects. + */ +static int test_bin_val(isl_ctx *ctx) +{ + int i; + isl_val *v1, *v2, *res; + __isl_give isl_val *(*fn)(__isl_take isl_val *v1, + __isl_take isl_val *v2); + int ok; + + for (i = 0; i < ARRAY_SIZE(val_bin_tests); ++i) { + v1 = isl_val_read_from_str(ctx, val_bin_tests[i].arg1); + v2 = isl_val_read_from_str(ctx, val_bin_tests[i].arg2); + res = isl_val_read_from_str(ctx, val_bin_tests[i].res); + fn = val_bin_op[val_bin_tests[i].op].fn; + v1 = fn(v1, v2); + if (isl_val_is_nan(res)) + ok = isl_val_is_nan(v1); + else + ok = isl_val_eq(v1, res); + isl_val_free(v1); + isl_val_free(res); + if (ok < 0) + return -1; + if (!ok) + isl_die(ctx, isl_error_unknown, + "unexpected result", return -1); + } + + return 0; +} + +/* Perform some basic tests on isl_val objects. + */ +static int test_val(isl_ctx *ctx) +{ + if (test_un_val(ctx) < 0) + return -1; + if (test_bin_val(ctx) < 0) + return -1; + return 0; +} + static int test_div(isl_ctx *ctx) { unsigned n; @@ -716,8 +943,9 @@ { const char *str; isl_set *set; - isl_basic_set *bset; + isl_basic_set *bset, *bset2; int n; + int subset; test_affine_hull_case(ctx, "affine2"); test_affine_hull_case(ctx, "affine"); @@ -735,6 +963,33 @@ isl_die(ctx, isl_error_unknown, "not expecting any divs", return -1); + /* Check that isl_map_affine_hull is not confused by + * the reordering of divs in isl_map_align_divs. + */ + str = "{ [a, b, c, 0] : exists (e0 = [(b)/32], e1 = [(c)/32]: " + "32e0 = b and 32e1 = c); " + "[a, 0, c, 0] : exists (e0 = [(c)/32]: 32e0 = c) }"; + set = isl_set_read_from_str(ctx, str); + bset = isl_set_affine_hull(set); + isl_basic_set_free(bset); + if (!bset) + return -1; + + str = "{ [a] : exists e0, e1, e2: 32e1 = 31 + 31a + 31e0 and " + "32e2 = 31 + 31e0 }"; + set = isl_set_read_from_str(ctx, str); + bset = isl_set_affine_hull(set); + str = "{ [a] : exists e : a = 32 e }"; + bset2 = isl_basic_set_read_from_str(ctx, str); + subset = isl_basic_set_is_subset(bset, bset2); + isl_basic_set_free(bset); + isl_basic_set_free(bset2); + if (subset < 0) + return -1; + if (!subset) + isl_die(ctx, isl_error_unknown, "not as accurate as expected", + return -1); + return 0; } @@ -838,10 +1093,11 @@ fclose(input); } -void test_gist(struct isl_ctx *ctx) +static int test_gist(struct isl_ctx *ctx) { const char *str; isl_basic_set *bset1, *bset2; + isl_map *map1, *map2; test_gist_case(ctx, "gist1"); @@ -867,6 +1123,32 @@ bset1 = isl_basic_set_gist(bset1, bset2); assert(bset1 && bset1->n_div == 0); isl_basic_set_free(bset1); + + /* Check that the integer divisions of the second disjunct + * do not spread to the first disjunct. + */ + str = "[t1] -> { S_0[] -> A[o0] : (exists (e0 = [(-t1 + o0)/16]: " + "16e0 = -t1 + o0 and o0 >= 0 and o0 <= 15 and t1 >= 0)) or " + "(exists (e0 = [(-1 + t1)/16], " + "e1 = [(-16 + t1 - 16e0)/4294967296]: " + "4294967296e1 = -16 + t1 - o0 - 16e0 and " + "16e0 <= -1 + t1 and 16e0 >= -16 + t1 and o0 >= 0 and " + "o0 <= 4294967295 and t1 <= -1)) }"; + map1 = isl_map_read_from_str(ctx, str); + str = "[t1] -> { S_0[] -> A[o0] : t1 >= 0 and t1 <= 4294967295 }"; + map2 = isl_map_read_from_str(ctx, str); + map1 = isl_map_gist(map1, map2); + if (!map1) + return -1; + if (map1->n != 1) + isl_die(ctx, isl_error_unknown, "expecting single disjunct", + isl_map_free(map1); return -1); + if (isl_basic_map_dim(map1->p[0], isl_dim_div) != 1) + isl_die(ctx, isl_error_unknown, "expecting single div", + isl_map_free(map1); return -1); + isl_map_free(map1); + + return 0; } int test_coalesce_set(isl_ctx *ctx, const char *str, int check_one) @@ -927,120 +1209,35 @@ return r; } -int test_coalesce(struct isl_ctx *ctx) -{ +/* Inputs for coalescing tests. + * "str" is a string representation of the input set. + * "single_disjunct" is set if we expect the result to consist of + * a single disjunct. + */ +struct { + int single_disjunct; const char *str; - struct isl_set *set, *set2; - struct isl_map *map, *map2; - - set = isl_set_read_from_str(ctx, - "{[x,y]: x >= 0 & x <= 10 & y >= 0 & y <= 10 or " - "y >= x & x >= 2 & 5 >= y }"); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & 2x + y <= 30 & y <= 10 & x >= 0 or " - "x + y >= 10 & y <= x & x + y <= 20 & y >= 0}"); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & 2x + y <= 30 & y <= 10 & x >= 0 or " - "x + y >= 10 & y <= x & x + y <= 19 & y >= 0}"); - set = isl_set_coalesce(set); - assert(set && set->n == 2); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x >= 6 & x <= 10 & y <= x}"); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x >= 7 & x <= 10 & y <= x}"); - set = isl_set_coalesce(set); - assert(set && set->n == 2); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x >= 6 & x <= 10 & y + 1 <= x}"); - set = isl_set_coalesce(set); - assert(set && set->n == 2); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x = 6 & y <= 6}"); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x = 7 & y <= 6}"); - set = isl_set_coalesce(set); - assert(set && set->n == 2); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x = 6 & y <= 5}"); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - set2 = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x = 6 & y <= 5}"); - assert(isl_set_is_equal(set, set2)); - isl_set_free(set); - isl_set_free(set2); - - set = isl_set_read_from_str(ctx, - "{[x,y]: y >= 0 & x <= 5 & y <= x or " - "y >= 0 & x = 6 & y <= 7}"); - set = isl_set_coalesce(set); - assert(set && set->n == 2); - isl_set_free(set); - - set = isl_set_read_from_str(ctx, - "[n] -> { [i] : i = 1 and n >= 2 or 2 <= i and i <= n }"); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - set2 = isl_set_read_from_str(ctx, - "[n] -> { [i] : i = 1 and n >= 2 or 2 <= i and i <= n }"); - assert(isl_set_is_equal(set, set2)); - isl_set_free(set); - isl_set_free(set2); - - set = isl_set_read_from_str(ctx, - "{[x,y] : x >= 0 and y >= 0 or 0 <= y and y <= 5 and x = -1}"); - set = isl_set_coalesce(set); - set2 = isl_set_read_from_str(ctx, - "{[x,y] : x >= 0 and y >= 0 or 0 <= y and y <= 5 and x = -1}"); - assert(isl_set_is_equal(set, set2)); - isl_set_free(set); - isl_set_free(set2); - - set = isl_set_read_from_str(ctx, - "[n] -> { [i] : 1 <= i and i <= n - 1 or " - "2 <= i and i <= n }"); - set = isl_set_coalesce(set); - assert(set && set->n == 1); - set2 = isl_set_read_from_str(ctx, - "[n] -> { [i] : 1 <= i and i <= n - 1 or " - "2 <= i and i <= n }"); - assert(isl_set_is_equal(set, set2)); - isl_set_free(set); - isl_set_free(set2); - - map = isl_map_read_from_str(ctx, - "[n] -> { [i0] -> [o0] : exists (e0 = [(i0)/4], e1 = [(o0)/4], " +} coalesce_tests[] = { + { 1, "{[x,y]: x >= 0 & x <= 10 & y >= 0 & y <= 10 or " + "y >= x & x >= 2 & 5 >= y }" }, + { 1, "{[x,y]: y >= 0 & 2x + y <= 30 & y <= 10 & x >= 0 or " + "x + y >= 10 & y <= x & x + y <= 20 & y >= 0}" }, + { 0, "{[x,y]: y >= 0 & 2x + y <= 30 & y <= 10 & x >= 0 or " + "x + y >= 10 & y <= x & x + y <= 19 & y >= 0}" }, + { 1, "{[x,y]: y >= 0 & x <= 5 & y <= x or " + "y >= 0 & x >= 6 & x <= 10 & y <= x}" }, + { 0, "{[x,y]: y >= 0 & x <= 5 & y <= x or " + "y >= 0 & x >= 7 & x <= 10 & y <= x}" }, + { 0, "{[x,y]: y >= 0 & x <= 5 & y <= x or " + "y >= 0 & x >= 6 & x <= 10 & y + 1 <= x}" }, + { 1, "{[x,y]: y >= 0 & x <= 5 & y <= x or y >= 0 & x = 6 & y <= 6}" }, + { 0, "{[x,y]: y >= 0 & x <= 5 & y <= x or y >= 0 & x = 7 & y <= 6}" }, + { 1, "{[x,y]: y >= 0 & x <= 5 & y <= x or y >= 0 & x = 6 & y <= 5}" }, + { 0, "{[x,y]: y >= 0 & x <= 5 & y <= x or y >= 0 & x = 6 & y <= 7}" }, + { 1, "[n] -> { [i] : i = 1 and n >= 2 or 2 <= i and i <= n }" }, + { 0, "{[x,y] : x >= 0 and y >= 0 or 0 <= y and y <= 5 and x = -1}" }, + { 1, "[n] -> { [i] : 1 <= i and i <= n - 1 or 2 <= i and i <= n }" }, + { 0, "[n] -> { [[i0] -> [o0]] : exists (e0 = [(i0)/4], e1 = [(o0)/4], " "e2 = [(n)/2], e3 = [(-2 + i0)/4], e4 = [(-2 + o0)/4], " "e5 = [(-2n + i0)/4]: 2e2 = n and 4e3 = -2 + i0 and " "4e4 = -2 + o0 and i0 >= 8 + 2n and o0 >= 2 + i0 and " @@ -1048,7 +1245,7 @@ "i0 <= -11 + 4n and o0 >= 6 + 2n and 4e0 <= i0 and " "4e0 >= -3 + i0 and 4e1 <= o0 and 4e1 >= -3 + o0 and " "4e5 <= -2n + i0 and 4e5 >= -3 - 2n + i0);" - "[i0] -> [o0] : exists (e0 = [(i0)/4], e1 = [(o0)/4], " + "[[i0] -> [o0]] : exists (e0 = [(i0)/4], e1 = [(o0)/4], " "e2 = [(n)/2], e3 = [(-2 + i0)/4], e4 = [(-2 + o0)/4], " "e5 = [(-2n + i0)/4]: 2e2 = n and 4e3 = -2 + i0 and " "4e4 = -2 + o0 and 2e0 >= 3 + n and e0 <= -4 + n and " @@ -1057,44 +1254,13 @@ "i0 <= -11 + 4n and i0 <= 57 + 2n and 4e0 <= -2 + i0 and " "4e0 >= -3 + i0 and o0 >= 6 + 2n and o0 <= -11 + 4n and " "o0 <= 57 + 2n and 4e1 <= -2 + o0 and 4e1 >= -3 + o0 and " - "4e5 <= -2n + i0 and 4e5 >= -3 - 2n + i0 ) }"); - map = isl_map_coalesce(map); - map2 = isl_map_read_from_str(ctx, - "[n] -> { [i0] -> [o0] : exists (e0 = [(i0)/4], e1 = [(o0)/4], " - "e2 = [(n)/2], e3 = [(-2 + i0)/4], e4 = [(-2 + o0)/4], " - "e5 = [(-2n + i0)/4]: 2e2 = n and 4e3 = -2 + i0 and " - "4e4 = -2 + o0 and i0 >= 8 + 2n and o0 >= 2 + i0 and " - "o0 <= 56 + 2n and o0 <= -12 + 4n and i0 <= 57 + 2n and " - "i0 <= -11 + 4n and o0 >= 6 + 2n and 4e0 <= i0 and " - "4e0 >= -3 + i0 and 4e1 <= o0 and 4e1 >= -3 + o0 and " - "4e5 <= -2n + i0 and 4e5 >= -3 - 2n + i0);" - "[i0] -> [o0] : exists (e0 = [(i0)/4], e1 = [(o0)/4], " - "e2 = [(n)/2], e3 = [(-2 + i0)/4], e4 = [(-2 + o0)/4], " - "e5 = [(-2n + i0)/4]: 2e2 = n and 4e3 = -2 + i0 and " - "4e4 = -2 + o0 and 2e0 >= 3 + n and e0 <= -4 + n and " - "2e0 <= 27 + n and e1 <= -4 + n and 2e1 <= 27 + n and " - "2e1 >= 2 + n and e1 >= 1 + e0 and i0 >= 7 + 2n and " - "i0 <= -11 + 4n and i0 <= 57 + 2n and 4e0 <= -2 + i0 and " - "4e0 >= -3 + i0 and o0 >= 6 + 2n and o0 <= -11 + 4n and " - "o0 <= 57 + 2n and 4e1 <= -2 + o0 and 4e1 >= -3 + o0 and " - "4e5 <= -2n + i0 and 4e5 >= -3 - 2n + i0 ) }"); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "[n, m] -> { [] -> [o0, o2, o3] : (o3 = 1 and o0 >= 1 + m and " + "4e5 <= -2n + i0 and 4e5 >= -3 - 2n + i0 ) }" }, + { 0, "[n, m] -> { [o0, o2, o3] : (o3 = 1 and o0 >= 1 + m and " "o0 <= n + m and o2 <= m and o0 >= 2 + n and o2 >= 3) or " "(o0 >= 2 + n and o0 >= 1 + m and o0 <= n + m and n >= 1 and " - "o3 <= -1 + o2 and o3 >= 1 - m + o2 and o3 >= 2 and o3 <= n) }"; - map = isl_map_read_from_str(ctx, str); - map = isl_map_coalesce(map); - map2 = isl_map_read_from_str(ctx, str); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "[M, N] -> { [i0, i1, i2, i3, i4, i5, i6] -> " - "[o0, o1, o2, o3, o4, o5, o6] : " + "o3 <= -1 + o2 and o3 >= 1 - m + o2 and o3 >= 2 and o3 <= n) }" }, + { 0, "[M, N] -> { [[i0, i1, i2, i3, i4, i5, i6] -> " + "[o0, o1, o2, o3, o4, o5, o6]] : " "(o6 <= -4 + 2M - 2N + i0 + i1 - i2 + i6 - o0 - o1 + o2 and " "o3 <= -2 + i3 and o6 >= 2 + i0 + i3 + i6 - o0 - o3 and " "o6 >= 2 - M + N + i3 + i4 + i6 - o3 - o4 and o0 <= -1 + i0 and " @@ -1107,97 +1273,83 @@ "(N >= 2 and o3 <= -1 + i3 and o0 <= -1 + i0 and " "o6 >= i3 + i6 - o3 and M >= 0 and " "2o6 >= 1 + i0 + i3 + 2i6 - o0 - o3 and " - "o6 >= 1 - M + i0 + i6 - o0 and N >= 2M and o6 >= i0 + i6 - o0) }"; - map = isl_map_read_from_str(ctx, str); - map = isl_map_coalesce(map); - map2 = isl_map_read_from_str(ctx, str); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "[M, N] -> { [] -> [o0] : (o0 = 0 and M >= 1 and N >= 2) or " + "o6 >= 1 - M + i0 + i6 - o0 and N >= 2M and o6 >= i0 + i6 - o0) }" }, + { 0, "[M, N] -> { [o0] : (o0 = 0 and M >= 1 and N >= 2) or " "(o0 = 0 and M >= 1 and N >= 2M and N >= 2 + M) or " "(o0 = 0 and M >= 2 and N >= 3) or " - "(M = 0 and o0 = 0 and N >= 3) }"; - map = isl_map_read_from_str(ctx, str); - map = isl_map_coalesce(map); - map2 = isl_map_read_from_str(ctx, str); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - str = "{ [i0, i1, i2, i3] : (i1 = 10i0 and i0 >= 1 and 10i0 <= 100 and " - "i3 <= 9 + 10 i2 and i3 >= 1 + 10i2 and i3 >= 0) or " - "(i1 <= 9 + 10i0 and i1 >= 1 + 10i0 and i2 >= 0 and " - "i0 >= 0 and i1 <= 100 and i3 <= 9 + 10i2 and i3 >= 1 + 10i2) }"; - map = isl_map_read_from_str(ctx, str); - map = isl_map_coalesce(map); - map2 = isl_map_read_from_str(ctx, str); - assert(isl_map_is_equal(map, map2)); - isl_map_free(map); - isl_map_free(map2); - - test_coalesce_set(ctx, - "[M] -> { [i1] : (i1 >= 2 and i1 <= M) or " - "(i1 = M and M >= 1) }", 0); - test_coalesce_set(ctx, - "{[x,y] : x,y >= 0; [x,y] : 10 <= x <= 20 and y >= -1 }", 0); - test_coalesce_set(ctx, - "{ [x, y] : (x >= 1 and y >= 1 and x <= 2 and y <= 2) or " - "(y = 3 and x = 1) }", 1); - test_coalesce_set(ctx, - "[M] -> { [i0, i1, i2, i3, i4] : (i1 >= 3 and i4 >= 2 + i2 and " + "(M = 0 and o0 = 0 and N >= 3) }" }, + { 0, "{ [i0, i1, i2, i3] : (i1 = 10i0 and i0 >= 1 and 10i0 <= 100 and " + "i3 <= 9 + 10 i2 and i3 >= 1 + 10i2 and i3 >= 0) or " + "(i1 <= 9 + 10i0 and i1 >= 1 + 10i0 and i2 >= 0 and " + "i0 >= 0 and i1 <= 100 and i3 <= 9 + 10i2 and i3 >= 1 + 10i2) }" }, + { 0, "[M] -> { [i1] : (i1 >= 2 and i1 <= M) or (i1 = M and M >= 1) }" }, + { 0, "{[x,y] : x,y >= 0; [x,y] : 10 <= x <= 20 and y >= -1 }" }, + { 1, "{ [x, y] : (x >= 1 and y >= 1 and x <= 2 and y <= 2) or " + "(y = 3 and x = 1) }" }, + { 1, "[M] -> { [i0, i1, i2, i3, i4] : (i1 >= 3 and i4 >= 2 + i2 and " "i2 >= 2 and i0 >= 2 and i3 >= 1 + i2 and i0 <= M and " "i1 <= M and i3 <= M and i4 <= M) or " "(i1 >= 2 and i4 >= 1 + i2 and i2 >= 2 and i0 >= 2 and " "i3 >= 1 + i2 and i0 <= M and i1 <= -1 + M and i3 <= M and " - "i4 <= -1 + M) }", 1); - test_coalesce_set(ctx, - "{ [x, y] : (x >= 0 and y >= 0 and x <= 10 and y <= 10) or " - "(x >= 1 and y >= 1 and x <= 11 and y <= 11) }", 1); - if (test_coalesce_unbounded_wrapping(ctx) < 0) - return -1; - if (test_coalesce_set(ctx, "{[x,0] : x >= 0; [x,1] : x <= 20}", 0) < 0) - return -1; - if (test_coalesce_set(ctx, "{ [x, 1 - x] : 0 <= x <= 1; [0,0] }", 1) < 0) - return -1; - if (test_coalesce_set(ctx, "{ [0,0]; [i,i] : 1 <= i <= 10 }", 1) < 0) - return -1; - if (test_coalesce_set(ctx, "{ [0,0]; [i,j] : 1 <= i,j <= 10 }", 0) < 0) - return -1; - if (test_coalesce_set(ctx, "{ [0,0]; [i,2i] : 1 <= i <= 10 }", 1) < 0) - return -1; - if (test_coalesce_set(ctx, "{ [0,0]; [i,2i] : 2 <= i <= 10 }", 0) < 0) - return -1; - if (test_coalesce_set(ctx, "{ [1,0]; [i,2i] : 1 <= i <= 10 }", 0) < 0) - return -1; - if (test_coalesce_set(ctx, "{ [0,1]; [i,2i] : 1 <= i <= 10 }", 0) < 0) - return -1; - if (test_coalesce_set(ctx, "{ [a, b] : exists e : 2e = a and " - "a >= 0 and (a <= 3 or (b <= 0 and b >= -4 + a)) }", 0) < 0) - return -1; - if (test_coalesce_set(ctx, - "{ [i, j, i', j'] : i <= 2 and j <= 2 and " + "i4 <= -1 + M) }" }, + { 1, "{ [x, y] : (x >= 0 and y >= 0 and x <= 10 and y <= 10) or " + "(x >= 1 and y >= 1 and x <= 11 and y <= 11) }" }, + { 0, "{[x,0] : x >= 0; [x,1] : x <= 20}" }, + { 1, "{ [x, 1 - x] : 0 <= x <= 1; [0,0] }" }, + { 1, "{ [0,0]; [i,i] : 1 <= i <= 10 }" }, + { 0, "{ [0,0]; [i,j] : 1 <= i,j <= 10 }" }, + { 1, "{ [0,0]; [i,2i] : 1 <= i <= 10 }" }, + { 0, "{ [0,0]; [i,2i] : 2 <= i <= 10 }" }, + { 0, "{ [1,0]; [i,2i] : 1 <= i <= 10 }" }, + { 0, "{ [0,1]; [i,2i] : 1 <= i <= 10 }" }, + { 0, "{ [a, b] : exists e : 2e = a and " + "a >= 0 and (a <= 3 or (b <= 0 and b >= -4 + a)) }" }, + { 0, "{ [i, j, i', j'] : i <= 2 and j <= 2 and " "j' >= -1 + 2i + j - 2i' and i' <= -1 + i and " "j >= 1 and j' <= i + j - i' and i >= 1; " - "[1, 1, 1, 1] }", 0) < 0) - return -1; - if (test_coalesce_set(ctx, "{ [i,j] : exists a,b : i = 2a and j = 3b; " - "[i,j] : exists a : j = 3a }", 1) < 0) - return -1; - if (test_coalesce_set(ctx, - "{ [a, b, c] : (c <= 7 - b and b <= 1 and b >= 0 and " + "[1, 1, 1, 1] }" }, + { 1, "{ [i,j] : exists a,b : i = 2a and j = 3b; " + "[i,j] : exists a : j = 3a }" }, + { 1, "{ [a, b, c] : (c <= 7 - b and b <= 1 and b >= 0 and " "c >= 3 + b and b <= 3 + 8a and b >= -26 + 8a and " "a >= 3) or " "(b <= 1 and c <= 7 and b >= 0 and c >= 4 + b and " - "b <= 3 + 8a and b >= -26 + 8a and a >= 3) }", 1) < 0) - return -1; - if (test_coalesce_set(ctx, - "{ [a, 0, c] : c >= 1 and c <= 29 and c >= -1 + 8a and " + "b <= 3 + 8a and b >= -26 + 8a and a >= 3) }" }, + { 1, "{ [a, 0, c] : c >= 1 and c <= 29 and c >= -1 + 8a and " "c <= 6 + 8a and a >= 3; " - "[a, -1, c] : c >= 1 and c <= 30 and c >= 8a and " - "c <= 7 + 8a and a >= 3 and a <= 4 }", 1) < 0) + "[a, -1, c] : c >= 1 and c <= 30 and c >= 8a and " + "c <= 7 + 8a and a >= 3 and a <= 4 }" }, + { 1, "{ [x,y] : 0 <= x <= 2 and y >= 0 and x + 2y <= 4; " + "[x,0] : 3 <= x <= 4 }" }, + { 1, "{ [x,y] : 0 <= x <= 3 and y >= 0 and x + 3y <= 6; " + "[x,0] : 4 <= x <= 5 }" }, + { 0, "{ [x,y] : 0 <= x <= 2 and y >= 0 and x + 2y <= 4; " + "[x,0] : 3 <= x <= 5 }" }, + { 0, "{ [x,y] : 0 <= x <= 2 and y >= 0 and x + y <= 4; " + "[x,0] : 3 <= x <= 4 }" }, + { 1 , "{ [i0, i1] : i0 <= 122 and i0 >= 1 and 128i1 >= -249 + i0 and " + "i1 <= 0; " + "[i0, 0] : i0 >= 123 and i0 <= 124 }" }, +}; + +/* Test the functionality of isl_set_coalesce. + * That is, check that the output is always equal to the input + * and in some cases that the result consists of a single disjunct. + */ +static int test_coalesce(struct isl_ctx *ctx) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(coalesce_tests); ++i) { + const char *str = coalesce_tests[i].str; + int check_one = coalesce_tests[i].single_disjunct; + if (test_coalesce_set(ctx, str, check_one) < 0) + return -1; + } + + if (test_coalesce_unbounded_wrapping(ctx) < 0) return -1; + return 0; } @@ -1451,8 +1603,9 @@ isl_map_free(map); } -void test_lexmin(struct isl_ctx *ctx) +static int test_lexmin(struct isl_ctx *ctx) { + int equal; const char *str; isl_basic_map *bmap; isl_map *map, *map2; @@ -1534,6 +1687,37 @@ assert(isl_map_is_equal(map, map2)); isl_map_free(map); isl_map_free(map2); + + /* Check that empty pieces are properly combined. */ + str = "[K, N] -> { [x, y] -> [a, b] : K+2<=N<=K+4 and x>=4 and " + "2N-6<=x=N and a>=x+1 }"; + map = isl_map_read_from_str(ctx, str); + map = isl_map_lexmin(map); + str = "[K, N] -> { [x, y] -> [1 + x, N] : x >= -6 + 2N and " + "x <= -5 + 2N and x >= -1 + 3K - N and x <= -2 + K + N and " + "x >= 4 }"; + map2 = isl_map_read_from_str(ctx, str); + assert(isl_map_is_equal(map, map2)); + isl_map_free(map); + isl_map_free(map2); + + str = "[i] -> { [i', j] : j = i - 8i' and i' >= 0 and i' <= 7 and " + " 8i' <= i and 8i' >= -7 + i }"; + set = isl_set_read_from_str(ctx, str); + pma = isl_set_lexmin_pw_multi_aff(isl_set_copy(set)); + set2 = isl_set_from_pw_multi_aff(pma); + equal = isl_set_is_equal(set, set2); + isl_set_free(set); + isl_set_free(set2); + if (equal < 0) + return -1; + if (!equal) + isl_die(ctx, isl_error_unknown, + "unexpected difference between set and " + "piecewise affine expression", return -1); + + return 0; } struct must_may { @@ -1855,11 +2039,12 @@ test_bijective_case(ctx, "[N,M]->{[i,j] -> [x,y] : 2x=i & y =j}", 1); } -void test_pwqp(struct isl_ctx *ctx) +static int test_pwqp(struct isl_ctx *ctx) { const char *str; isl_set *set; isl_pw_qpolynomial *pwqp1, *pwqp2; + int equal; str = "{ [i,j,k] -> 1 + 9 * [i/5] + 7 * [j/11] + 4 * [k/13] }"; pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str); @@ -1947,6 +2132,36 @@ pwqp1 = isl_pw_qpolynomial_sub(pwqp1, pwqp2); assert(isl_pw_qpolynomial_is_zero(pwqp1)); isl_pw_qpolynomial_free(pwqp1); + + str = "{ [a,b,a] -> (([(2*[a/3]+b)/5]) * ([(2*[a/3]+b)/5])) }"; + pwqp2 = isl_pw_qpolynomial_read_from_str(ctx, str); + str = "{ [a,b,c] -> (([(2*[a/3]+b)/5]) * ([(2*[c/3]+b)/5])) }"; + pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str); + set = isl_set_read_from_str(ctx, "{ [a,b,a] }"); + pwqp1 = isl_pw_qpolynomial_intersect_domain(pwqp1, set); + equal = isl_pw_qpolynomial_plain_is_equal(pwqp1, pwqp2); + isl_pw_qpolynomial_free(pwqp1); + isl_pw_qpolynomial_free(pwqp2); + if (equal < 0) + return -1; + if (!equal) + isl_die(ctx, isl_error_unknown, "unexpected result", return -1); + + str = "{ [a,b,c] -> (([(2*[a/3]+1)/5]) * ([(2*[c/3]+1)/5])) : b = 1 }"; + pwqp2 = isl_pw_qpolynomial_read_from_str(ctx, str); + str = "{ [a,b,c] -> (([(2*[a/3]+b)/5]) * ([(2*[c/3]+b)/5])) }"; + pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str); + pwqp1 = isl_pw_qpolynomial_fix_val(pwqp1, isl_dim_set, 1, + isl_val_one(ctx)); + equal = isl_pw_qpolynomial_plain_is_equal(pwqp1, pwqp2); + isl_pw_qpolynomial_free(pwqp1); + isl_pw_qpolynomial_free(pwqp2); + if (equal < 0) + return -1; + if (!equal) + isl_die(ctx, isl_error_unknown, "unexpected result", return -1); + + return 0; } void test_split_periods(isl_ctx *ctx) @@ -2648,6 +2863,20 @@ if (test_padded_schedule(ctx) < 0) return -1; + /* Check that check for progress is not confused by rational + * solution. + */ + D = "[N] -> { S0[i, j] : i >= 0 and i <= N and j >= 0 and j <= N }"; + V = "[N] -> { S0[i0, -1 + N] -> S0[2 + i0, 0] : i0 >= 0 and " + "i0 <= -2 + N; " + "S0[i0, i1] -> S0[i0, 1 + i1] : i0 >= 0 and " + "i0 <= N and i1 >= 0 and i1 <= -1 + N }"; + P = "{}"; + ctx->opt->schedule_algorithm = ISL_SCHEDULE_ALGORITHM_FEAUTRIER; + if (test_has_schedule(ctx, D, V, P) < 0) + return -1; + ctx->opt->schedule_algorithm = ISL_SCHEDULE_ALGORITHM_ISL; + return 0; } @@ -2876,6 +3105,68 @@ return 0; } +/* Is "pma" obviously equal to the isl_pw_multi_aff represented by "str"? + */ +static int pw_multi_aff_plain_is_equal(__isl_keep isl_pw_multi_aff *pma, + const char *str) +{ + isl_ctx *ctx; + isl_pw_multi_aff *pma2; + int equal; + + if (!pma) + return -1; + + ctx = isl_pw_multi_aff_get_ctx(pma); + pma2 = isl_pw_multi_aff_read_from_str(ctx, str); + equal = isl_pw_multi_aff_plain_is_equal(pma, pma2); + isl_pw_multi_aff_free(pma2); + + return equal; +} + +/* Check that "pma" is obviously equal to the isl_pw_multi_aff + * represented by "str". + */ +static int pw_multi_aff_check_plain_equal(__isl_keep isl_pw_multi_aff *pma, + const char *str) +{ + int equal; + + equal = pw_multi_aff_plain_is_equal(pma, str); + if (equal < 0) + return -1; + if (!equal) + isl_die(isl_pw_multi_aff_get_ctx(pma), isl_error_unknown, + "result not as expected", return -1); + return 0; +} + +/* Basic test for isl_pw_multi_aff_product. + * + * Check that multiple pieces are properly handled. + */ +static int test_product_pma(isl_ctx *ctx) +{ + int equal; + const char *str; + isl_pw_multi_aff *pma1, *pma2; + + str = "{ A[i] -> B[1] : i < 0; A[i] -> B[2] : i >= 0 }"; + pma1 = isl_pw_multi_aff_read_from_str(ctx, str); + str = "{ C[] -> D[] }"; + pma2 = isl_pw_multi_aff_read_from_str(ctx, str); + pma1 = isl_pw_multi_aff_product(pma1, pma2); + str = "{ [A[i] -> C[]] -> [B[(1)] -> D[]] : i < 0;" + "[A[i] -> C[]] -> [B[(2)] -> D[]] : i >= 0 }"; + equal = pw_multi_aff_check_plain_equal(pma1, str); + isl_pw_multi_aff_free(pma1); + if (equal < 0) + return -1; + + return 0; +} + int test_product(isl_ctx *ctx) { const char *str; @@ -2906,6 +3197,9 @@ if (!ok) isl_die(ctx, isl_error_unknown, "unexpected result", return -1); + if (test_product_pma(ctx) < 0) + return -1; + return 0; } @@ -3429,7 +3723,7 @@ "{ A[i,j] : j = [(i)/6] and exists a : i = 3 a }" }, }; -int test_preimage(isl_ctx *ctx) +static int test_preimage_basic_set(isl_ctx *ctx) { int i; isl_basic_set *bset1, *bset2; @@ -3455,6 +3749,76 @@ } struct { + const char *map; + const char *ma; + const char *res; +} preimage_domain_tests[] = { + { "{ B[i,j] -> C[2i + 3j] : 0 <= i < 10 and 0 <= j < 100 }", + "{ A[j,i] -> B[i,j] }", + "{ A[j,i] -> C[2i + 3j] : 0 <= i < 10 and 0 <= j < 100 }" }, + { "{ B[i] -> C[i]; D[i] -> E[i] }", + "{ A[i] -> B[i + 1] }", + "{ A[i] -> C[i + 1] }" }, + { "{ B[i] -> C[i]; B[i] -> E[i] }", + "{ A[i] -> B[i + 1] }", + "{ A[i] -> C[i + 1]; A[i] -> E[i + 1] }" }, + { "{ B[i] -> C[([i/2])] }", + "{ A[i] -> B[2i] }", + "{ A[i] -> C[i] }" }, + { "{ B[i,j] -> C[([i/2]), ([(i+j)/3])] }", + "{ A[i] -> B[([i/5]), ([i/7])] }", + "{ A[i] -> C[([([i/5])/2]), ([(([i/5])+([i/7]))/3])] }" }, + { "[N] -> { B[i] -> C[([N/2]), i, ([N/3])] }", + "[N] -> { A[] -> B[([N/5])] }", + "[N] -> { A[] -> C[([N/2]), ([N/5]), ([N/3])] }" }, + { "{ B[i] -> C[i] : exists a : i = 5 a }", + "{ A[i] -> B[2i] }", + "{ A[i] -> C[2i] : exists a : 2i = 5 a }" }, + { "{ B[i] -> C[i] : exists a : i = 2 a; " + "B[i] -> D[i] : exists a : i = 2 a + 1 }", + "{ A[i] -> B[2i] }", + "{ A[i] -> C[2i] }" }, +}; + +static int test_preimage_union_map(isl_ctx *ctx) +{ + int i; + isl_union_map *umap1, *umap2; + isl_multi_aff *ma; + int equal; + + for (i = 0; i < ARRAY_SIZE(preimage_domain_tests); ++i) { + umap1 = isl_union_map_read_from_str(ctx, + preimage_domain_tests[i].map); + ma = isl_multi_aff_read_from_str(ctx, + preimage_domain_tests[i].ma); + umap2 = isl_union_map_read_from_str(ctx, + preimage_domain_tests[i].res); + umap1 = isl_union_map_preimage_domain_multi_aff(umap1, ma); + equal = isl_union_map_is_equal(umap1, umap2); + isl_union_map_free(umap1); + isl_union_map_free(umap2); + if (equal < 0) + return -1; + if (!equal) + isl_die(ctx, isl_error_unknown, "bad preimage", + return -1); + } + + return 0; +} + +static int test_preimage(isl_ctx *ctx) +{ + if (test_preimage_basic_set(ctx) < 0) + return -1; + if (test_preimage_union_map(ctx) < 0) + return -1; + + return 0; +} + +struct { const char *ma1; const char *ma; const char *res; @@ -3833,6 +4197,76 @@ return 0; } +/* This function is called for each leaf in the AST generated + * from test_ast_gen5. + * + * We finalize the AST generation by extending the outer schedule + * with a zero-dimensional schedule. If this results in any for loops, + * then this means that we did not pass along enough information + * about the outer schedule to the inner AST generation. + */ +static __isl_give isl_ast_node *create_leaf(__isl_take isl_ast_build *build, + void *user) +{ + isl_union_map *schedule, *extra; + isl_ast_node *tree; + + schedule = isl_ast_build_get_schedule(build); + extra = isl_union_map_copy(schedule); + extra = isl_union_map_from_domain(isl_union_map_domain(extra)); + schedule = isl_union_map_range_product(schedule, extra); + tree = isl_ast_build_ast_from_schedule(build, schedule); + isl_ast_build_free(build); + + if (!tree) + return NULL; + + if (isl_ast_node_get_type(tree) == isl_ast_node_for) + isl_die(isl_ast_node_get_ctx(tree), isl_error_unknown, + "code should not contain any for loop", + return isl_ast_node_free(tree)); + + return tree; +} + +/* Check that we do not lose any information when going back and + * forth between internal and external schedule. + * + * In particular, we create an AST where we unroll the only + * non-constant dimension in the schedule. We therefore do + * not expect any for loops in the AST. However, older versions + * of isl would not pass along enough information about the outer + * schedule when performing an inner code generation from a create_leaf + * callback, resulting in the inner code generation producing a for loop. + */ +static int test_ast_gen5(isl_ctx *ctx) +{ + const char *str; + isl_set *set; + isl_union_map *schedule, *options; + isl_ast_build *build; + isl_ast_node *tree; + + str = "{ A[] -> [1, 1, 2]; B[i] -> [1, i, 0] : i >= 1 and i <= 2 }"; + schedule = isl_union_map_read_from_str(ctx, str); + + str = "{ [a, b, c] -> unroll[1] : exists (e0 = [(a)/4]: " + "4e0 >= -1 + a - b and 4e0 <= -2 + a + b) }"; + options = isl_union_map_read_from_str(ctx, str); + + set = isl_set_universe(isl_space_params_alloc(ctx, 0)); + build = isl_ast_build_from_context(set); + build = isl_ast_build_set_options(build, options); + build = isl_ast_build_set_create_leaf(build, &create_leaf, NULL); + tree = isl_ast_build_ast_from_schedule(build, schedule); + isl_ast_build_free(build); + isl_ast_node_free(tree); + if (!tree) + return -1; + + return 0; +} + static int test_ast_gen(isl_ctx *ctx) { if (test_ast_gen1(ctx) < 0) @@ -3843,6 +4277,8 @@ return -1; if (test_ast_gen4(ctx) < 0) return -1; + if (test_ast_gen5(ctx) < 0) + return -1; return 0; } @@ -3932,10 +4368,35 @@ return 0; } +/* Check that the variable compression performed on the existentially + * quantified variables inside isl_basic_set_compute_divs is not confused + * by the implicit equalities among the parameters. + */ +static int test_compute_divs(isl_ctx *ctx) +{ + const char *str; + isl_basic_set *bset; + isl_set *set; + + str = "[a, b, c, d, e] -> { [] : exists (e0: 2d = b and a <= 124 and " + "b <= 2046 and b >= 0 and b <= 60 + 64a and 2e >= b + 2c and " + "2e >= b and 2e <= 1 + b and 2e <= 1 + b + 2c and " + "32768e0 >= -124 + a and 2097152e0 <= 60 + 64a - b) }"; + bset = isl_basic_set_read_from_str(ctx, str); + set = isl_basic_set_compute_divs(bset); + isl_set_free(set); + if (!set) + return -1; + + return 0; +} + struct { const char *name; int (*fn)(isl_ctx *ctx); } tests [] = { + { "val", &test_val }, + { "compute divs", &test_compute_divs }, { "partial lexmin", &test_partial_lexmin }, { "simplify", &test_simplify }, { "curry", &test_curry }, @@ -3970,6 +4431,9 @@ { "factorize", &test_factorize }, { "subset", &test_subset }, { "subtract", &test_subtract }, + { "lexmin", &test_lexmin }, + { "gist", &test_gist }, + { "piecewise quasi-polynomials", &test_pwqp }, }; int main() @@ -3990,7 +4454,6 @@ test_bound(ctx); test_union(ctx); test_split_periods(ctx); - test_pwqp(ctx); test_lex(ctx); test_bijective(ctx); test_dep(ctx); @@ -4000,9 +4463,7 @@ test_dim(ctx); test_application(ctx); test_convex_hull(ctx); - test_gist(ctx); test_closure(ctx); - test_lexmin(ctx); isl_ctx_free(ctx); return 0; error: diff -Nru isl-0.11.2/isl_transitive_closure.c isl-0.12.1/isl_transitive_closure.c --- isl-0.11.2/isl_transitive_closure.c 2013-04-07 15:38:34.000000000 +0000 +++ isl-0.12.1/isl_transitive_closure.c 2013-07-24 11:04:50.000000000 +0000 @@ -325,9 +325,6 @@ * variables are non-zero and if moreover the parametric constant * can never attain positive values. * Return IMPURE otherwise. - * - * If div_purity is NULL then we are dealing with a non-parametric set - * and so the constraint is obviously PURE_VAR. */ static int purity(__isl_keep isl_basic_set *bset, isl_int *c, int *div_purity, int eq) @@ -339,9 +336,6 @@ int i; int p = 0, v = 0; - if (!div_purity) - return PURE_VAR; - n_div = isl_basic_set_dim(bset, isl_dim_div); d = isl_basic_set_dim(bset, isl_dim_set); nparam = isl_basic_set_dim(bset, isl_dim_param); @@ -392,7 +386,7 @@ nparam = isl_basic_set_dim(bset, isl_dim_param); div_purity = isl_alloc_array(bset->ctx, int, n_div); - if (!div_purity) + if (n_div && !div_purity) return NULL; for (i = 0; i < bset->n_div; ++i) { @@ -450,6 +444,9 @@ /* If any of the constraints is found to be impure then this function * sets *impurity to 1. + * + * If impurity is NULL then we are dealing with a non-parametric set + * and so the constraints are obviously PURE_VAR. */ static __isl_give isl_basic_map *add_delta_constraints( __isl_take isl_basic_map *path, @@ -465,7 +462,9 @@ for (i = 0; i < n; ++i) { isl_int *path_c; - int p = purity(delta, delta_c[i], div_purity, eq); + int p = PURE_VAR; + if (impurity) + p = purity(delta, delta_c[i], div_purity, eq); if (p < 0) goto error; if (p != PURE_VAR && p != PURE_PARAM && !*impurity) @@ -598,7 +597,7 @@ } div_purity = get_div_purity(delta); - if (!div_purity) + if (n_div && !div_purity) goto error; path = add_delta_constraints(path, delta, off, nparam, d, @@ -616,9 +615,9 @@ path = isl_basic_map_extend_constraints(path, delta->n_eq, delta->n_ineq + 1); path = add_delta_constraints(path, delta, off, nparam, d, - NULL, 1, &impurity); + NULL, 1, NULL); path = add_delta_constraints(path, delta, off, nparam, d, - NULL, 0, &impurity); + NULL, 0, NULL); path = isl_basic_map_gauss(path, NULL); } @@ -2780,6 +2779,8 @@ if (isl_union_map_foreach_map(umap, inc_count, &n) < 0) goto error; + if (n == 0) + return umap; if (n <= 1) return union_floyd_warshall(umap, exact); diff -Nru isl-0.11.2/isl_union_map.c isl-0.12.1/isl_union_map.c --- isl-0.11.2/isl_union_map.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_union_map.c 2013-07-24 11:04:50.000000000 +0000 @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -41,6 +42,7 @@ { isl_union_map *umap; + dim = isl_space_params(dim); if (!dim) return NULL; @@ -51,13 +53,9 @@ umap->ref = 1; umap->dim = dim; if (isl_hash_table_init(dim->ctx, &umap->table, size) < 0) - goto error; + return isl_union_map_free(umap); return umap; -error: - isl_space_free(dim); - isl_union_map_free(umap); - return NULL; } __isl_give isl_union_map *isl_union_map_empty(__isl_take isl_space *dim) @@ -2531,3 +2529,84 @@ isl_union_set_free(res); return NULL; } + +/* Internal data structure for isl_union_map_preimage_domain_multi_aff. + * + * "ma" is the function under which the preimage should be taken. + * "space" is the space of "ma". + * "res" collects the results. + */ +struct isl_union_map_preimage_domain_data { + isl_space *space; + isl_multi_aff *ma; + isl_union_map *res; +}; + +/* Compute the preimage of the domain of *entry under the function + * represented by data->ma, provided the domain space of *entry + * match the target space of data->ma, and add the result to data->res. + */ +static int preimage_domain_entry(void **entry, void *user) +{ + int m; + isl_map *map = *entry; + struct isl_union_map_preimage_domain_data *data = user; + int empty; + + m = isl_space_tuple_match(map->dim, isl_dim_in, + data->space, isl_dim_out); + if (m < 0) + return -1; + if (!m) + return 0; + + map = isl_map_copy(map); + map = isl_map_preimage_domain_multi_aff(map, + isl_multi_aff_copy(data->ma)); + + empty = isl_map_is_empty(map); + if (empty < 0 || empty) { + isl_map_free(map); + return empty < 0 ? -1 : 0; + } + + data->res = isl_union_map_add_map(data->res, map); + + return 0; +} + +/* Compute the preimage of the domain of "umap" under the function + * represented by "ma". + * In other words, plug in "ma" in the domain of "umap". + * The result contains maps that live in the same spaces as the maps of "umap" + * with domain space equal to the target space of "ma", + * except that the domain has been replaced by the domain space of "ma". + */ +__isl_give isl_union_map *isl_union_map_preimage_domain_multi_aff( + __isl_take isl_union_map *umap, __isl_take isl_multi_aff *ma) +{ + isl_ctx *ctx; + isl_space *space; + struct isl_union_map_preimage_domain_data data; + + if (!umap || !ma) + goto error; + + ctx = isl_union_map_get_ctx(umap); + space = isl_union_map_get_space(umap); + data.space = isl_multi_aff_get_space(ma); + data.ma = ma; + data.res = isl_union_map_alloc(space, umap->table.n); + if (isl_hash_table_foreach(ctx, &umap->table, &preimage_domain_entry, + &data) < 0) + data.res = isl_union_map_free(data.res); + + isl_space_free(data.space); + isl_union_map_free(umap); + isl_multi_aff_free(ma); + return data.res; +error: + isl_union_map_free(umap); + isl_multi_aff_free(ma); + return NULL; +} diff -Nru isl-0.11.2/isl_union_templ.c isl-0.12.1/isl_union_templ.c --- isl-0.11.2/isl_union_templ.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_union_templ.c 2013-07-24 11:04:50.000000000 +0000 @@ -465,6 +465,15 @@ return NULL; } +#ifndef NO_SUB +/* Subtract "u2" from "u1" and return the result. + */ +__isl_give UNION *FN(UNION,sub)(__isl_take UNION *u1, __isl_take UNION *u2) +{ + return match_bin_op(u1, u2, &FN(PART,sub)); +} +#endif + S(UNION,any_set_data) { isl_set *set; UNION *res; @@ -796,6 +805,70 @@ return NULL; } +/* Multiply *entry by the isl_val "user". + * + * Return 0 on success and -1 on error. + */ +static int scale_val(void **entry, void *user) +{ + PW **pw = (PW **)entry; + isl_val *v = user; + + *pw = FN(PW,scale_val)(*pw, isl_val_copy(v)); + if (!*pw) + return -1; + + return 0; +} + +/* Multiply "u" by "v" and return the result. + */ +__isl_give UNION *FN(UNION,scale_val)(__isl_take UNION *u, + __isl_take isl_val *v) +{ + if (!u || !v) + goto error; + if (isl_val_is_one(v)) { + isl_val_free(v); + return u; + } + + if (DEFAULT_IS_ZERO && u && isl_val_is_zero(v)) { + UNION *zero; + isl_space *space = FN(UNION,get_space)(u); +#ifdef HAS_TYPE + zero = FN(UNION,ZERO)(space, u->type); +#else + zero = FN(UNION,ZERO)(space); +#endif + FN(UNION,free)(u); + isl_val_free(v); + return zero; + } + + if (!isl_val_is_rat(v)) + isl_die(isl_val_get_ctx(v), isl_error_invalid, + "expecting rational factor", goto error); + + u = FN(UNION,cow)(u); + if (!u) + return NULL; + +#ifdef HAS_TYPE + if (isl_val_is_neg(v)) + u->type = isl_fold_type_negate(u->type); +#endif + if (isl_hash_table_foreach(u->dim->ctx, &u->table, &scale_val, v) < 0) + goto error; + + isl_val_free(v); + return u; +error: + isl_val_free(v); + FN(UNION,free)(u); + return NULL; +} + S(UNION,plain_is_equal_data) { UNION *u2; diff -Nru isl-0.11.2/isl_val.c isl-0.12.1/isl_val.c --- isl-0.11.2/isl_val.c 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/isl_val.c 2013-07-24 11:02:32.000000000 +0000 @@ -0,0 +1,1447 @@ +/* + * Copyright 2013 Ecole Normale Superieure + * + * Use of this software is governed by the MIT license + * + * Written by Sven Verdoolaege, + * Ecole Normale Superieure, 45 rue d'Ulm, 75230 Paris, France + */ + +#include +#include +#include + +#undef BASE +#define BASE val + +#include + +/* Allocate an isl_val object with indeterminate value. + */ +__isl_give isl_val *isl_val_alloc(isl_ctx *ctx) +{ + isl_val *v; + + v = isl_alloc_type(ctx, struct isl_val); + if (!v) + return NULL; + + v->ctx = ctx; + isl_ctx_ref(ctx); + v->ref = 1; + isl_int_init(v->n); + isl_int_init(v->d); + + return v; +} + +/* Return a reference to an isl_val representing zero. + */ +__isl_give isl_val *isl_val_zero(isl_ctx *ctx) +{ + return isl_val_int_from_si(ctx, 0); +} + +/* Return a reference to an isl_val representing one. + */ +__isl_give isl_val *isl_val_one(isl_ctx *ctx) +{ + return isl_val_int_from_si(ctx, 1); +} + +/* Return a reference to an isl_val representing NaN. + */ +__isl_give isl_val *isl_val_nan(isl_ctx *ctx) +{ + isl_val *v; + + v = isl_val_alloc(ctx); + if (!v) + return NULL; + + isl_int_set_si(v->n, 0); + isl_int_set_si(v->d, 0); + + return v; +} + +/* Change "v" into a NaN. + */ +__isl_give isl_val *isl_val_set_nan(__isl_take isl_val *v) +{ + if (!v) + return NULL; + if (isl_val_is_nan(v)) + return v; + v = isl_val_cow(v); + if (!v) + return NULL; + + isl_int_set_si(v->n, 0); + isl_int_set_si(v->d, 0); + + return v; +} + +/* Return a reference to an isl_val representing +infinity. + */ +__isl_give isl_val *isl_val_infty(isl_ctx *ctx) +{ + isl_val *v; + + v = isl_val_alloc(ctx); + if (!v) + return NULL; + + isl_int_set_si(v->n, 1); + isl_int_set_si(v->d, 0); + + return v; +} + +/* Return a reference to an isl_val representing -infinity. + */ +__isl_give isl_val *isl_val_neginfty(isl_ctx *ctx) +{ + isl_val *v; + + v = isl_val_alloc(ctx); + if (!v) + return NULL; + + isl_int_set_si(v->n, -1); + isl_int_set_si(v->d, 0); + + return v; +} + +/* Return a reference to an isl_val representing the integer "i". + */ +__isl_give isl_val *isl_val_int_from_si(isl_ctx *ctx, long i) +{ + isl_val *v; + + v = isl_val_alloc(ctx); + if (!v) + return NULL; + + isl_int_set_si(v->n, i); + isl_int_set_si(v->d, 1); + + return v; +} + +/* Change the value of "v" to be equal to the integer "i". + */ +__isl_give isl_val *isl_val_set_si(__isl_take isl_val *v, long i) +{ + if (!v) + return NULL; + if (isl_val_is_int(v) && isl_int_cmp_si(v->n, i) == 0) + return v; + v = isl_val_cow(v); + if (!v) + return NULL; + + isl_int_set_si(v->n, i); + isl_int_set_si(v->d, 1); + + return v; +} + +/* Change the value of "v" to be equal to zero. + */ +__isl_give isl_val *isl_val_set_zero(__isl_take isl_val *v) +{ + return isl_val_set_si(v, 0); +} + +/* Return a reference to an isl_val representing the unsigned integer "u". + */ +__isl_give isl_val *isl_val_int_from_ui(isl_ctx *ctx, unsigned long u) +{ + isl_val *v; + + v = isl_val_alloc(ctx); + if (!v) + return NULL; + + isl_int_set_ui(v->n, u); + isl_int_set_si(v->d, 1); + + return v; +} + +/* Return a reference to an isl_val representing the integer "n". + */ +__isl_give isl_val *isl_val_int_from_isl_int(isl_ctx *ctx, isl_int n) +{ + isl_val *v; + + v = isl_val_alloc(ctx); + if (!v) + return NULL; + + isl_int_set(v->n, n); + isl_int_set_si(v->d, 1); + + return v; +} + +/* Return a reference to an isl_val representing the rational value "n"/"d". + * Normalizing the isl_val (if needed) is left to the caller. + */ +__isl_give isl_val *isl_val_rat_from_isl_int(isl_ctx *ctx, + isl_int n, isl_int d) +{ + isl_val *v; + + v = isl_val_alloc(ctx); + if (!v) + return NULL; + + isl_int_set(v->n, n); + isl_int_set(v->d, d); + + return v; +} + +/* Return a new reference to "v". + */ +__isl_give isl_val *isl_val_copy(__isl_keep isl_val *v) +{ + if (!v) + return NULL; + + v->ref++; + return v; +} + +/* Return a fresh copy of "val". + */ +__isl_give isl_val *isl_val_dup(__isl_keep isl_val *val) +{ + isl_val *dup; + + if (!val) + return NULL; + + dup = isl_val_alloc(isl_val_get_ctx(val)); + if (!dup) + return NULL; + + isl_int_set(dup->n, val->n); + isl_int_set(dup->d, val->d); + + return dup; +} + +/* Return an isl_val that is equal to "val" and that has only + * a single reference. + */ +__isl_give isl_val *isl_val_cow(__isl_take isl_val *val) +{ + if (!val) + return NULL; + + if (val->ref == 1) + return val; + val->ref--; + return isl_val_dup(val); +} + +/* Free "v" and return NULL. + */ +void *isl_val_free(__isl_take isl_val *v) +{ + if (!v) + return NULL; + + if (--v->ref > 0) + return NULL; + + isl_ctx_deref(v->ctx); + isl_int_clear(v->n); + isl_int_clear(v->d); + free(v); + return NULL; +} + +/* Extract the numerator of a rational value "v" as an integer. + * + * If "v" is not a rational value, then the result is undefined. + */ +long isl_val_get_num_si(__isl_keep isl_val *v) +{ + if (!v) + return 0; + if (!isl_val_is_rat(v)) + isl_die(isl_val_get_ctx(v), isl_error_invalid, + "expecting rational value", return 0); + if (!isl_int_fits_slong(v->n)) + isl_die(isl_val_get_ctx(v), isl_error_invalid, + "numerator too large", return 0); + return isl_int_get_si(v->n); +} + +/* Extract the numerator of a rational value "v" as an isl_int. + * + * If "v" is not a rational value, then the result is undefined. + */ +int isl_val_get_num_isl_int(__isl_keep isl_val *v, isl_int *n) +{ + if (!v) + return -1; + if (!isl_val_is_rat(v)) + isl_die(isl_val_get_ctx(v), isl_error_invalid, + "expecting rational value", return -1); + isl_int_set(*n, v->n); + return 0; +} + +/* Extract the denominator of a rational value "v" as an integer. + * + * If "v" is not a rational value, then the result is undefined. + */ +long isl_val_get_den_si(__isl_keep isl_val *v) +{ + if (!v) + return 0; + if (!isl_val_is_rat(v)) + isl_die(isl_val_get_ctx(v), isl_error_invalid, + "expecting rational value", return 0); + if (!isl_int_fits_slong(v->d)) + isl_die(isl_val_get_ctx(v), isl_error_invalid, + "denominator too large", return 0); + return isl_int_get_si(v->d); +} + +/* Return an approximation of "v" as a double. + */ +double isl_val_get_d(__isl_keep isl_val *v) +{ + if (!v) + return 0; + if (!isl_val_is_rat(v)) + isl_die(isl_val_get_ctx(v), isl_error_invalid, + "expecting rational value", return 0); + return isl_int_get_d(v->n) / isl_int_get_d(v->d); +} + +/* Return the isl_ctx to which "val" belongs. + */ +isl_ctx *isl_val_get_ctx(__isl_keep isl_val *val) +{ + return val ? val->ctx : NULL; +} + +/* Normalize "v". + * + * In particular, make sure that the denominator of a rational value + * is positive and the numerator and denominator do not have any + * common divisors. + * + * This function should not be called by an external user + * since it will only be given normalized values. + */ +__isl_give isl_val *isl_val_normalize(__isl_take isl_val *v) +{ + isl_ctx *ctx; + + if (!v) + return NULL; + if (isl_val_is_int(v)) + return v; + if (!isl_val_is_rat(v)) + return v; + if (isl_int_is_neg(v->d)) { + isl_int_neg(v->d, v->d); + isl_int_neg(v->n, v->n); + } + ctx = isl_val_get_ctx(v); + isl_int_gcd(ctx->normalize_gcd, v->n, v->d); + if (isl_int_is_one(ctx->normalize_gcd)) + return v; + isl_int_divexact(v->n, v->n, ctx->normalize_gcd); + isl_int_divexact(v->d, v->d, ctx->normalize_gcd); + return v; +} + +/* Return the opposite of "v". + */ +__isl_give isl_val *isl_val_neg(__isl_take isl_val *v) +{ + if (!v) + return NULL; + if (isl_val_is_nan(v)) + return v; + if (isl_val_is_zero(v)) + return v; + + v = isl_val_cow(v); + if (!v) + return NULL; + isl_int_neg(v->n, v->n); + + return v; +} + +/* Return the absolute value of "v". + */ +__isl_give isl_val *isl_val_abs(__isl_take isl_val *v) +{ + if (!v) + return NULL; + if (isl_val_is_nan(v)) + return v; + if (isl_val_is_nonneg(v)) + return v; + return isl_val_neg(v); +} + +/* Return the "floor" (greatest integer part) of "v". + * That is, return the result of rounding towards -infinity. + */ +__isl_give isl_val *isl_val_floor(__isl_take isl_val *v) +{ + if (!v) + return NULL; + if (isl_val_is_int(v)) + return v; + if (!isl_val_is_rat(v)) + return v; + + v = isl_val_cow(v); + if (!v) + return NULL; + isl_int_fdiv_q(v->n, v->n, v->d); + isl_int_set_si(v->d, 1); + + return v; +} + +/* Return the "ceiling" of "v". + * That is, return the result of rounding towards +infinity. + */ +__isl_give isl_val *isl_val_ceil(__isl_take isl_val *v) +{ + if (!v) + return NULL; + if (isl_val_is_int(v)) + return v; + if (!isl_val_is_rat(v)) + return v; + + v = isl_val_cow(v); + if (!v) + return NULL; + isl_int_cdiv_q(v->n, v->n, v->d); + isl_int_set_si(v->d, 1); + + return v; +} + +/* Truncate "v". + * That is, return the result of rounding towards zero. + */ +__isl_give isl_val *isl_val_trunc(__isl_take isl_val *v) +{ + if (!v) + return NULL; + if (isl_val_is_int(v)) + return v; + if (!isl_val_is_rat(v)) + return v; + + v = isl_val_cow(v); + if (!v) + return NULL; + isl_int_tdiv_q(v->n, v->n, v->d); + isl_int_set_si(v->d, 1); + + return v; +} + +/* Return 2^v, where v is an integer (that is not too large). + */ +__isl_give isl_val *isl_val_2exp(__isl_take isl_val *v) +{ + unsigned long exp; + int neg; + + v = isl_val_cow(v); + if (!v) + return NULL; + if (!isl_val_is_int(v)) + isl_die(isl_val_get_ctx(v), isl_error_invalid, + "can only compute integer powers", + return isl_val_free(v)); + neg = isl_val_is_neg(v); + if (neg) + isl_int_neg(v->n, v->n); + if (!isl_int_fits_ulong(v->n)) + isl_die(isl_val_get_ctx(v), isl_error_invalid, + "exponent too large", return isl_val_free(v)); + exp = isl_int_get_ui(v->n); + if (neg) { + isl_int_mul_2exp(v->d, v->d, exp); + isl_int_set_si(v->n, 1); + } else { + isl_int_mul_2exp(v->n, v->d, exp); + } + + return v; +} + +/* Return the minimum of "v1" and "v2". + */ +__isl_give isl_val *isl_val_min(__isl_take isl_val *v1, __isl_take isl_val *v2) +{ + if (!v1 || !v2) + goto error; + + if (isl_val_is_nan(v1)) { + isl_val_free(v2); + return v1; + } + if (isl_val_is_nan(v2)) { + isl_val_free(v1); + return v2; + } + if (isl_val_le(v1, v2)) { + isl_val_free(v2); + return v1; + } else { + isl_val_free(v1); + return v2; + } +error: + isl_val_free(v1); + isl_val_free(v2); + return NULL; +} + +/* Return the maximum of "v1" and "v2". + */ +__isl_give isl_val *isl_val_max(__isl_take isl_val *v1, __isl_take isl_val *v2) +{ + if (!v1 || !v2) + goto error; + + if (isl_val_is_nan(v1)) { + isl_val_free(v2); + return v1; + } + if (isl_val_is_nan(v2)) { + isl_val_free(v1); + return v2; + } + if (isl_val_ge(v1, v2)) { + isl_val_free(v2); + return v1; + } else { + isl_val_free(v1); + return v2; + } +error: + isl_val_free(v1); + isl_val_free(v2); + return NULL; +} + +/* Return the sum of "v1" and "v2". + */ +__isl_give isl_val *isl_val_add(__isl_take isl_val *v1, __isl_take isl_val *v2) +{ + if (!v1 || !v2) + goto error; + if (isl_val_is_nan(v1)) { + isl_val_free(v2); + return v1; + } + if (isl_val_is_nan(v2)) { + isl_val_free(v1); + return v2; + } + if ((isl_val_is_infty(v1) && isl_val_is_neginfty(v2)) || + (isl_val_is_neginfty(v1) && isl_val_is_infty(v2))) { + isl_val_free(v2); + return isl_val_set_nan(v1); + } + if (isl_val_is_infty(v1) || isl_val_is_neginfty(v1)) { + isl_val_free(v2); + return v1; + } + if (isl_val_is_infty(v2) || isl_val_is_neginfty(v2)) { + isl_val_free(v1); + return v2; + } + if (isl_val_is_zero(v1)) { + isl_val_free(v1); + return v2; + } + if (isl_val_is_zero(v2)) { + isl_val_free(v2); + return v1; + } + + v1 = isl_val_cow(v1); + if (!v1) + goto error; + if (isl_val_is_int(v1) && isl_val_is_int(v2)) + isl_int_add(v1->n, v1->n, v2->n); + else { + if (isl_int_eq(v1->d, v2->d)) + isl_int_add(v1->n, v1->n, v2->n); + else { + isl_int_mul(v1->n, v1->n, v2->d); + isl_int_addmul(v1->n, v2->n, v1->d); + isl_int_mul(v1->d, v1->d, v2->d); + } + v1 = isl_val_normalize(v1); + } + isl_val_free(v2); + return v1; +error: + isl_val_free(v1); + isl_val_free(v2); + return NULL; +} + +/* Return the sum of "v1" and "v2". + */ +__isl_give isl_val *isl_val_add_ui(__isl_take isl_val *v1, unsigned long v2) +{ + if (!v1) + return NULL; + if (!isl_val_is_rat(v1)) + return v1; + if (v2 == 0) + return v1; + v1 = isl_val_cow(v1); + if (!v1) + return NULL; + + isl_int_addmul_ui(v1->n, v1->d, v2); + + return v1; +} + +/* Subtract "v2" from "v1". + */ +__isl_give isl_val *isl_val_sub(__isl_take isl_val *v1, __isl_take isl_val *v2) +{ + if (!v1 || !v2) + goto error; + if (isl_val_is_nan(v1)) { + isl_val_free(v2); + return v1; + } + if (isl_val_is_nan(v2)) { + isl_val_free(v1); + return v2; + } + if ((isl_val_is_infty(v1) && isl_val_is_infty(v2)) || + (isl_val_is_neginfty(v1) && isl_val_is_neginfty(v2))) { + isl_val_free(v2); + return isl_val_set_nan(v1); + } + if (isl_val_is_infty(v1) || isl_val_is_neginfty(v1)) { + isl_val_free(v2); + return v1; + } + if (isl_val_is_infty(v2) || isl_val_is_neginfty(v2)) { + isl_val_free(v1); + return isl_val_neg(v2); + } + if (isl_val_is_zero(v2)) { + isl_val_free(v2); + return v1; + } + if (isl_val_is_zero(v1)) { + isl_val_free(v1); + return isl_val_neg(v2); + } + + v1 = isl_val_cow(v1); + if (!v1) + goto error; + if (isl_val_is_int(v1) && isl_val_is_int(v2)) + isl_int_sub(v1->n, v1->n, v2->n); + else { + if (isl_int_eq(v1->d, v2->d)) + isl_int_sub(v1->n, v1->n, v2->n); + else { + isl_int_mul(v1->n, v1->n, v2->d); + isl_int_submul(v1->n, v2->n, v1->d); + isl_int_mul(v1->d, v1->d, v2->d); + } + v1 = isl_val_normalize(v1); + } + isl_val_free(v2); + return v1; +error: + isl_val_free(v1); + isl_val_free(v2); + return NULL; +} + +/* Subtract "v2" from "v1". + */ +__isl_give isl_val *isl_val_sub_ui(__isl_take isl_val *v1, unsigned long v2) +{ + if (!v1) + return NULL; + if (!isl_val_is_rat(v1)) + return v1; + if (v2 == 0) + return v1; + v1 = isl_val_cow(v1); + if (!v1) + return NULL; + + isl_int_submul_ui(v1->n, v1->d, v2); + + return v1; +} + +/* Return the product of "v1" and "v2". + */ +__isl_give isl_val *isl_val_mul(__isl_take isl_val *v1, __isl_take isl_val *v2) +{ + if (!v1 || !v2) + goto error; + if (isl_val_is_nan(v1)) { + isl_val_free(v2); + return v1; + } + if (isl_val_is_nan(v2)) { + isl_val_free(v1); + return v2; + } + if ((!isl_val_is_rat(v1) && isl_val_is_zero(v2)) || + (isl_val_is_zero(v1) && !isl_val_is_rat(v2))) { + isl_val_free(v2); + return isl_val_set_nan(v1); + } + if (isl_val_is_zero(v1)) { + isl_val_free(v2); + return v1; + } + if (isl_val_is_zero(v2)) { + isl_val_free(v1); + return v2; + } + if (isl_val_is_infty(v1) || isl_val_is_neginfty(v1)) { + if (isl_val_is_neg(v2)) + v1 = isl_val_neg(v1); + isl_val_free(v2); + return v1; + } + if (isl_val_is_infty(v2) || isl_val_is_neginfty(v2)) { + if (isl_val_is_neg(v1)) + v2 = isl_val_neg(v2); + isl_val_free(v1); + return v2; + } + + v1 = isl_val_cow(v1); + if (!v1) + goto error; + if (isl_val_is_int(v1) && isl_val_is_int(v2)) + isl_int_mul(v1->n, v1->n, v2->n); + else { + isl_int_mul(v1->n, v1->n, v2->n); + isl_int_mul(v1->d, v1->d, v2->d); + v1 = isl_val_normalize(v1); + } + isl_val_free(v2); + return v1; +error: + isl_val_free(v1); + isl_val_free(v2); + return NULL; +} + +/* Return the product of "v1" and "v2". + * + * This is a private copy of isl_val_mul for use in the generic + * isl_multi_*_scale_val instantiated for isl_val. + */ +__isl_give isl_val *isl_val_scale_val(__isl_take isl_val *v1, + __isl_take isl_val *v2) +{ + return isl_val_mul(v1, v2); +} + +/* Return the product of "v1" and "v2". + */ +__isl_give isl_val *isl_val_mul_ui(__isl_take isl_val *v1, unsigned long v2) +{ + if (!v1) + return NULL; + if (isl_val_is_nan(v1)) + return v1; + if (!isl_val_is_rat(v1)) { + if (v2 == 0) + v1 = isl_val_set_nan(v1); + return v1; + } + if (v2 == 1) + return v1; + v1 = isl_val_cow(v1); + if (!v1) + return NULL; + + isl_int_mul_ui(v1->n, v1->n, v2); + + return isl_val_normalize(v1); +} + +/* Divide "v1" by "v2". + */ +__isl_give isl_val *isl_val_div(__isl_take isl_val *v1, __isl_take isl_val *v2) +{ + if (!v1 || !v2) + goto error; + if (isl_val_is_nan(v1)) { + isl_val_free(v2); + return v1; + } + if (isl_val_is_nan(v2)) { + isl_val_free(v1); + return v2; + } + if (isl_val_is_zero(v2) || + (!isl_val_is_rat(v1) && !isl_val_is_rat(v2))) { + isl_val_free(v2); + return isl_val_set_nan(v1); + } + if (isl_val_is_zero(v1)) { + isl_val_free(v2); + return v1; + } + if (isl_val_is_infty(v1) || isl_val_is_neginfty(v1)) { + if (isl_val_is_neg(v2)) + v1 = isl_val_neg(v1); + isl_val_free(v2); + return v1; + } + if (isl_val_is_infty(v2) || isl_val_is_neginfty(v2)) { + isl_val_free(v2); + return isl_val_set_zero(v1); + } + + v1 = isl_val_cow(v1); + if (!v1) + goto error; + if (isl_val_is_int(v2)) { + isl_int_mul(v1->d, v1->d, v2->n); + v1 = isl_val_normalize(v1); + } else { + isl_int_mul(v1->d, v1->d, v2->n); + isl_int_mul(v1->n, v1->n, v2->d); + v1 = isl_val_normalize(v1); + } + isl_val_free(v2); + return v1; +error: + isl_val_free(v1); + isl_val_free(v2); + return NULL; +} + +/* Given two integer values "v1" and "v2", check if "v1" is divisible by "v2". + */ +int isl_val_is_divisible_by(__isl_keep isl_val *v1, __isl_keep isl_val *v2) +{ + if (!v1 || !v2) + return -1; + + if (!isl_val_is_int(v1) || !isl_val_is_int(v2)) + isl_die(isl_val_get_ctx(v1), isl_error_invalid, + "expecting two integers", return -1); + + return isl_int_is_divisible_by(v1->n, v2->n); +} + +/* Given two integer values "v1" and "v2", return the residue of "v1" + * modulo "v2". + */ +__isl_give isl_val *isl_val_mod(__isl_take isl_val *v1, __isl_take isl_val *v2) +{ + if (!v1 || !v2) + goto error; + if (!isl_val_is_int(v1) || !isl_val_is_int(v2)) + isl_die(isl_val_get_ctx(v1), isl_error_invalid, + "expecting two integers", goto error); + if (isl_val_is_nonneg(v1) && isl_val_lt(v1, v2)) { + isl_val_free(v2); + return v1; + } + v1 = isl_val_cow(v1); + if (!v1) + goto error; + isl_int_fdiv_r(v1->n, v1->n, v2->n); + isl_val_free(v2); + return v1; +error: + isl_val_free(v1); + isl_val_free(v2); + return NULL; +} + +/* Given two integer values, return their greatest common divisor. + */ +__isl_give isl_val *isl_val_gcd(__isl_take isl_val *v1, __isl_take isl_val *v2) +{ + if (!v1 || !v2) + goto error; + if (!isl_val_is_int(v1) || !isl_val_is_int(v2)) + isl_die(isl_val_get_ctx(v1), isl_error_invalid, + "expecting two integers", goto error); + if (isl_val_eq(v1, v2)) { + isl_val_free(v2); + return v1; + } + if (isl_val_is_one(v1)) { + isl_val_free(v2); + return v1; + } + if (isl_val_is_one(v2)) { + isl_val_free(v1); + return v2; + } + v1 = isl_val_cow(v1); + if (!v1) + goto error; + isl_int_gcd(v1->n, v1->n, v2->n); + isl_val_free(v2); + return v1; +error: + isl_val_free(v1); + isl_val_free(v2); + return NULL; +} + +/* Given two integer values v1 and v2, return their greatest common divisor g, + * as well as two integers x and y such that x * v1 + y * v2 = g. + */ +__isl_give isl_val *isl_val_gcdext(__isl_take isl_val *v1, + __isl_take isl_val *v2, __isl_give isl_val **x, __isl_give isl_val **y) +{ + isl_ctx *ctx; + isl_val *a = NULL, *b = NULL; + + if (!x && !y) + return isl_val_gcd(v1, v2); + + if (!v1 || !v2) + goto error; + + ctx = isl_val_get_ctx(v1); + if (!isl_val_is_int(v1) || !isl_val_is_int(v2)) + isl_die(ctx, isl_error_invalid, + "expecting two integers", goto error); + + v1 = isl_val_cow(v1); + a = isl_val_alloc(ctx); + b = isl_val_alloc(ctx); + if (!v1 || !a || !b) + goto error; + isl_int_gcdext(v1->n, a->n, b->n, v1->n, v2->n); + if (x) { + isl_int_set_si(a->d, 1); + *x = a; + } else + isl_val_free(a); + if (y) { + isl_int_set_si(b->d, 1); + *y = b; + } else + isl_val_free(b); + isl_val_free(v2); + return v1; +error: + isl_val_free(v1); + isl_val_free(v2); + isl_val_free(a); + isl_val_free(b); + if (x) + *x = NULL; + if (y) + *y = NULL; + return NULL; +} + +/* Does "v" represent an integer value? + */ +int isl_val_is_int(__isl_keep isl_val *v) +{ + if (!v) + return -1; + + return isl_int_is_one(v->d); +} + +/* Does "v" represent a rational value? + */ +int isl_val_is_rat(__isl_keep isl_val *v) +{ + if (!v) + return -1; + + return !isl_int_is_zero(v->d); +} + +/* Does "v" represent NaN? + */ +int isl_val_is_nan(__isl_keep isl_val *v) +{ + if (!v) + return -1; + + return isl_int_is_zero(v->n) && isl_int_is_zero(v->d); +} + +/* Does "v" represent +infinity? + */ +int isl_val_is_infty(__isl_keep isl_val *v) +{ + if (!v) + return -1; + + return isl_int_is_pos(v->n) && isl_int_is_zero(v->d); +} + +/* Does "v" represent -infinity? + */ +int isl_val_is_neginfty(__isl_keep isl_val *v) +{ + if (!v) + return -1; + + return isl_int_is_neg(v->n) && isl_int_is_zero(v->d); +} + +/* Does "v" represent the integer zero? + */ +int isl_val_is_zero(__isl_keep isl_val *v) +{ + if (!v) + return -1; + + return isl_int_is_zero(v->n) && !isl_int_is_zero(v->d); +} + +/* Does "v" represent the integer one? + */ +int isl_val_is_one(__isl_keep isl_val *v) +{ + if (!v) + return -1; + + return isl_int_eq(v->n, v->d); +} + +/* Does "v" represent the integer negative one? + */ +int isl_val_is_negone(__isl_keep isl_val *v) +{ + if (!v) + return -1; + + return isl_int_is_neg(v->n) && isl_int_abs_eq(v->n, v->d); +} + +/* Is "v" (strictly) positive? + */ +int isl_val_is_pos(__isl_keep isl_val *v) +{ + if (!v) + return -1; + + return isl_int_is_pos(v->n); +} + +/* Is "v" (strictly) negative? + */ +int isl_val_is_neg(__isl_keep isl_val *v) +{ + if (!v) + return -1; + + return isl_int_is_neg(v->n); +} + +/* Is "v" non-negative? + */ +int isl_val_is_nonneg(__isl_keep isl_val *v) +{ + if (!v) + return -1; + + if (isl_val_is_nan(v)) + return 0; + + return isl_int_is_nonneg(v->n); +} + +/* Is "v" non-positive? + */ +int isl_val_is_nonpos(__isl_keep isl_val *v) +{ + if (!v) + return -1; + + if (isl_val_is_nan(v)) + return 0; + + return isl_int_is_nonpos(v->n); +} + +/* Return the sign of "v". + * + * The sign of NaN is undefined. + */ +int isl_val_sgn(__isl_keep isl_val *v) +{ + if (!v) + return 0; + if (isl_val_is_zero(v)) + return 0; + if (isl_val_is_pos(v)) + return 1; + return -1; +} + +/* Is "v1" (strictly) less than "v2"? + */ +int isl_val_lt(__isl_keep isl_val *v1, __isl_keep isl_val *v2) +{ + isl_int t; + int lt; + + if (!v1 || !v2) + return -1; + if (isl_val_is_int(v1) && isl_val_is_int(v2)) + return isl_int_lt(v1->n, v2->n); + if (isl_val_is_nan(v1) || isl_val_is_nan(v2)) + return 0; + if (isl_val_eq(v1, v2)) + return 0; + if (isl_val_is_infty(v2)) + return 1; + if (isl_val_is_infty(v1)) + return 0; + if (isl_val_is_neginfty(v1)) + return 1; + if (isl_val_is_neginfty(v2)) + return 0; + + isl_int_init(t); + isl_int_mul(t, v1->n, v2->d); + isl_int_submul(t, v2->n, v1->d); + lt = isl_int_is_neg(t); + isl_int_clear(t); + + return lt; +} + +/* Is "v1" (strictly) greater than "v2"? + */ +int isl_val_gt(__isl_keep isl_val *v1, __isl_keep isl_val *v2) +{ + return isl_val_lt(v2, v1); +} + +/* Is "v1" less than or equal to "v2"? + */ +int isl_val_le(__isl_keep isl_val *v1, __isl_keep isl_val *v2) +{ + isl_int t; + int le; + + if (!v1 || !v2) + return -1; + if (isl_val_is_int(v1) && isl_val_is_int(v2)) + return isl_int_le(v1->n, v2->n); + if (isl_val_is_nan(v1) || isl_val_is_nan(v2)) + return 0; + if (isl_val_eq(v1, v2)) + return 1; + if (isl_val_is_infty(v2)) + return 1; + if (isl_val_is_infty(v1)) + return 0; + if (isl_val_is_neginfty(v1)) + return 1; + if (isl_val_is_neginfty(v2)) + return 0; + + isl_int_init(t); + isl_int_mul(t, v1->n, v2->d); + isl_int_submul(t, v2->n, v1->d); + le = isl_int_is_nonpos(t); + isl_int_clear(t); + + return le; +} + +/* Is "v1" greater than or equal to "v2"? + */ +int isl_val_ge(__isl_keep isl_val *v1, __isl_keep isl_val *v2) +{ + return isl_val_le(v2, v1); +} + +/* How does "v" compare to "i"? + * + * Return 1 if v is greater, -1 if v is smaller and 0 if v is equal to i. + * + * If v is NaN (or NULL), then the result is undefined. + */ +int isl_val_cmp_si(__isl_keep isl_val *v, long i) +{ + isl_int t; + int cmp; + + if (!v) + return 0; + if (isl_val_is_int(v)) + return isl_int_cmp_si(v->n, i); + if (isl_val_is_nan(v)) + return 0; + if (isl_val_is_infty(v)) + return 1; + if (isl_val_is_neginfty(v)) + return -1; + + isl_int_init(t); + isl_int_mul_si(t, v->d, i); + isl_int_sub(t, v->n, t); + cmp = isl_int_sgn(t); + isl_int_clear(t); + + return cmp; +} + +/* Is "v1" equal to "v2"? + */ +int isl_val_eq(__isl_keep isl_val *v1, __isl_keep isl_val *v2) +{ + if (!v1 || !v2) + return -1; + if (isl_val_is_nan(v1) || isl_val_is_nan(v2)) + return 0; + + return isl_int_eq(v1->n, v2->n) && isl_int_eq(v1->d, v2->d); +} + +/* Is "v1" different from "v2"? + */ +int isl_val_ne(__isl_keep isl_val *v1, __isl_keep isl_val *v2) +{ + if (!v1 || !v2) + return -1; + if (isl_val_is_nan(v1) || isl_val_is_nan(v2)) + return 0; + + return isl_int_ne(v1->n, v2->n) || isl_int_ne(v1->d, v2->d); +} + +/* Print a textual representation of "v" onto "p". + */ +__isl_give isl_printer *isl_printer_print_val(__isl_take isl_printer *p, + __isl_keep isl_val *v) +{ + int neg; + + if (!p || !v) + return isl_printer_free(p); + + neg = isl_int_is_neg(v->n); + if (neg) { + p = isl_printer_print_str(p, "-"); + isl_int_neg(v->n, v->n); + } + if (isl_int_is_zero(v->d)) { + int sgn = isl_int_sgn(v->n); + p = isl_printer_print_str(p, sgn < 0 ? "-infty" : + sgn == 0 ? "NaN" : "infty"); + } else + p = isl_printer_print_isl_int(p, v->n); + if (neg) + isl_int_neg(v->n, v->n); + if (!isl_int_is_zero(v->d) && !isl_int_is_one(v->d)) { + p = isl_printer_print_str(p, "/"); + p = isl_printer_print_isl_int(p, v->d); + } + + return p; +} + +/* Insert "n" dimensions of type "type" at position "first". + * + * This function is only meant to be used in the generic isl_multi_* + * functions which have to deal with base objects that have an associated + * space. Since an isl_val does not have an associated space, this function + * does not do anything. + */ +__isl_give isl_val *isl_val_insert_dims(__isl_take isl_val *v, + enum isl_dim_type type, unsigned first, unsigned n) +{ + return v; +} + +/* Drop the the "n" first dimensions of type "type" at position "first". + * + * This function is only meant to be used in the generic isl_multi_* + * functions which have to deal with base objects that have an associated + * space. Since an isl_val does not have an associated space, this function + * does not do anything. + */ +__isl_give isl_val *isl_val_drop_dims(__isl_take isl_val *v, + enum isl_dim_type type, unsigned first, unsigned n) +{ + return v; +} + +/* Change the name of the dimension of type "type" at position "pos" to "s". + * + * This function is only meant to be used in the generic isl_multi_* + * functions which have to deal with base objects that have an associated + * space. Since an isl_val does not have an associated space, this function + * does not do anything. + */ +__isl_give isl_val *isl_val_set_dim_name(__isl_take isl_val *v, + enum isl_dim_type type, unsigned pos, const char *s) +{ + return v; +} + +/* Reset the domain space of "v" to "space". + * + * This function is only meant to be used in the generic isl_multi_* + * functions which have to deal with base objects that have an associated + * space. Since an isl_val does not have an associated space, this function + * does not do anything, apart from error handling and cleaning up memory. + */ +__isl_give isl_val *isl_val_reset_domain_space(__isl_take isl_val *v, + __isl_take isl_space *space) +{ + if (!space) + return isl_val_free(v); + isl_space_free(space); + return v; +} + +/* Reorder the dimensions of the domain of "v" according + * to the given reordering. + * + * This function is only meant to be used in the generic isl_multi_* + * functions which have to deal with base objects that have an associated + * space. Since an isl_val does not have an associated space, this function + * does not do anything, apart from error handling and cleaning up memory. + */ +__isl_give isl_val *isl_val_realign_domain(__isl_take isl_val *v, + __isl_take isl_reordering *r) +{ + if (!r) + return isl_val_free(v); + isl_reordering_free(r); + return v; +} + +/* Return an isl_val that is zero on "ls". + * + * This function is only meant to be used in the generic isl_multi_* + * functions which have to deal with base objects that have an associated + * space. Since an isl_val does not have an associated space, this function + * simply returns a zero isl_val in the same context as "ls". + */ +__isl_give isl_val *isl_val_zero_on_domain(__isl_take isl_local_space *ls) +{ + isl_ctx *ctx; + + if (!ls) + return NULL; + ctx = isl_local_space_get_ctx(ls); + isl_local_space_free(ls); + return isl_val_zero(ctx); +} + +/* Check that the domain space of "v" matches "space". + * + * Return 0 on success and -1 on error. + * + * This function is only meant to be used in the generic isl_multi_* + * functions which have to deal with base objects that have an associated + * space. Since an isl_val does not have an associated space, this function + * simply returns 0, except if "v" or "space" are NULL. + */ +int isl_val_check_match_domain_space(__isl_keep isl_val *v, + __isl_keep isl_space *space) +{ + if (!v || !space) + return -1; + return 0; +} + +#undef BASE +#define BASE val + +#define NO_GIST +#define NO_IDENTITY +#define NO_FROM_BASE +#include + +/* Apply "fn" to each of the elements of "mv" with as second argument "v". + */ +static __isl_give isl_multi_val *isl_multi_val_fn_val( + __isl_take isl_multi_val *mv, + __isl_give isl_val *(*fn)(__isl_take isl_val *v1, + __isl_take isl_val *v2), + __isl_take isl_val *v) +{ + int i; + + mv = isl_multi_val_cow(mv); + if (!mv || !v) + goto error; + + for (i = 0; i < mv->n; ++i) { + mv->p[i] = fn(mv->p[i], isl_val_copy(v)); + if (!mv->p[i]) + goto error; + } + + isl_val_free(v); + return mv; +error: + isl_val_free(v); + isl_multi_val_free(mv); + return NULL; +} + +/* Add "v" to each of the elements of "mv". + */ +__isl_give isl_multi_val *isl_multi_val_add_val(__isl_take isl_multi_val *mv, + __isl_take isl_val *v) +{ + if (!v) + return isl_multi_val_free(mv); + if (isl_val_is_zero(v)) { + isl_val_free(v); + return mv; + } + return isl_multi_val_fn_val(mv, &isl_val_add, v); +} + +/* Reduce the elements of "mv" modulo "v". + */ +__isl_give isl_multi_val *isl_multi_val_mod_val(__isl_take isl_multi_val *mv, + __isl_take isl_val *v) +{ + return isl_multi_val_fn_val(mv, &isl_val_mod, v); +} diff -Nru isl-0.11.2/isl_val_gmp.c isl-0.12.1/isl_val_gmp.c --- isl-0.11.2/isl_val_gmp.c 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/isl_val_gmp.c 2013-07-01 13:12:40.000000000 +0000 @@ -0,0 +1,128 @@ +#include +#include +#include + +/* Return a reference to an isl_val representing the integer "z". + */ +__isl_give isl_val *isl_val_int_from_gmp(isl_ctx *ctx, mpz_t z) +{ + isl_val *v; + + v = isl_val_alloc(ctx); + if (!v) + return NULL; + + isl_int_set(v->n, z); + isl_int_set_si(v->d, 1); + + return v; +} + +/* Return a reference to an isl_val representing the rational value "n"/"d". + */ +__isl_give isl_val *isl_val_from_gmp(isl_ctx *ctx, const mpz_t n, const mpz_t d) +{ + isl_val *v; + + v = isl_val_alloc(ctx); + if (!v) + return NULL; + + isl_int_set(v->n, n); + isl_int_set(v->d, d); + + return isl_val_normalize(v); +} + +/* Extract the numerator of a rational value "v" in "z". + * + * If "v" is not a rational value, then the result is undefined. + */ +int isl_val_get_num_gmp(__isl_keep isl_val *v, mpz_t z) +{ + if (!v) + return -1; + if (!isl_val_is_rat(v)) + isl_die(isl_val_get_ctx(v), isl_error_invalid, + "expecting rational value", return -1); + mpz_set(z, v->n); + return 0; +} + +/* Extract the denominator of a rational value "v" in "z". + * + * If "v" is not a rational value, then the result is undefined. + */ +int isl_val_get_den_gmp(__isl_keep isl_val *v, mpz_t z) +{ + if (!v) + return -1; + if (!isl_val_is_rat(v)) + isl_die(isl_val_get_ctx(v), isl_error_invalid, + "expecting rational value", return -1); + mpz_set(z, v->d); + return 0; +} + +/* Return a reference to an isl_val representing the unsigned + * integer value stored in the "n" chunks of size "size" at "chunks". + * The least significant chunk is assumed to be stored first. + */ +__isl_give isl_val *isl_val_int_from_chunks(isl_ctx *ctx, size_t n, + size_t size, const void *chunks) +{ + isl_val *v; + + v = isl_val_alloc(ctx); + if (!v) + return NULL; + + mpz_import(v->n, n, -1, size, 0, 0, chunks); + isl_int_set_si(v->d, 1); + + return v; +} + +/* Return the number of chunks of size "size" required to + * store the absolute value of the numerator of "v". + */ +size_t isl_val_n_abs_num_chunks(__isl_keep isl_val *v, size_t size) +{ + if (!v) + return 0; + + if (!isl_val_is_rat(v)) + isl_die(isl_val_get_ctx(v), isl_error_invalid, + "expecting rational value", return 0); + + size *= 8; + return (mpz_sizeinbase(v->n, 2) + size - 1) / size; +} + +/* Store a representation of the absolute value of the numerator of "v" + * in terms of chunks of size "size" at "chunks". + * The least significant chunk is stored first. + * The number of chunks in the result can be obtained by calling + * isl_val_n_abs_num_chunks. The user is responsible for allocating + * enough memory to store the results. + * + * In the special case of a zero value, isl_val_n_abs_num_chunks will + * return one, while mpz_export will not fill in any chunks. We therefore + * do it ourselves. + */ +int isl_val_get_abs_num_chunks(__isl_keep isl_val *v, size_t size, + void *chunks) +{ + if (!v || !chunks) + return -1; + + if (!isl_val_is_rat(v)) + isl_die(isl_val_get_ctx(v), isl_error_invalid, + "expecting rational value", return -1); + + mpz_export(chunks, NULL, -1, size, 0, 0, v->n); + if (isl_val_is_zero(v)) + memset(chunks, 0, size); + + return 0; +} diff -Nru isl-0.11.2/isl_val_private.h isl-0.12.1/isl_val_private.h --- isl-0.11.2/isl_val_private.h 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/isl_val_private.h 2013-07-24 11:04:50.000000000 +0000 @@ -0,0 +1,60 @@ +#ifndef ISL_VAL_PRIVATE_H +#define ISL_VAL_PRIVATE_H + +#include +#include +#include +#include + +/* Represents a "value", which may be an integer value, a rational value, + * plus or minus infinity or "not a number". + * + * Internally, +infinity is represented as 1/0, + * -infinity as -1/0 and NaN as 0/0. + * + * A rational value is always normalized before it is passed to the user. + */ +struct isl_val { + int ref; + isl_ctx *ctx; + + isl_int n; + isl_int d; +}; + +#undef EL +#define EL isl_val + +#include + +__isl_give isl_val *isl_val_alloc(isl_ctx *ctx); +__isl_give isl_val *isl_val_normalize(__isl_take isl_val *v); +__isl_give isl_val *isl_val_int_from_isl_int(isl_ctx *ctx, isl_int n); +__isl_give isl_val *isl_val_rat_from_isl_int(isl_ctx *ctx, + isl_int n, isl_int d); +__isl_give isl_val *isl_val_cow(__isl_take isl_val *val); + +__isl_give isl_val *isl_val_insert_dims(__isl_take isl_val *v, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_val *isl_val_drop_dims(__isl_take isl_val *v, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_val *isl_val_set_dim_name(__isl_take isl_val *v, + enum isl_dim_type type, unsigned pos, const char *s); +__isl_give isl_val *isl_val_reset_domain_space(__isl_take isl_val *v, + __isl_take isl_space *space); +__isl_give isl_val *isl_val_realign_domain(__isl_take isl_val *v, + __isl_take isl_reordering *r); +__isl_give isl_val *isl_val_zero_on_domain(__isl_take isl_local_space *ls); + +__isl_give isl_val *isl_val_scale_val(__isl_take isl_val *v1, + __isl_take isl_val *v2); + +int isl_val_check_match_domain_space(__isl_keep isl_val *v, + __isl_keep isl_space *space); + +#undef BASE +#define BASE val + +#include + +#endif diff -Nru isl-0.11.2/isl_vec.c isl-0.12.1/isl_vec.c --- isl-0.11.2/isl_vec.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/isl_vec.c 2013-07-24 11:04:50.000000000 +0000 @@ -10,6 +10,7 @@ #include #include #include +#include isl_ctx *isl_vec_get_ctx(__isl_keep isl_vec *vec) { @@ -188,6 +189,21 @@ return 0; } +/* Extract the element at position "pos" of "vec". + */ +__isl_give isl_val *isl_vec_get_element_val(__isl_keep isl_vec *vec, int pos) +{ + isl_ctx *ctx; + + if (!vec) + return NULL; + ctx = isl_vec_get_ctx(vec); + if (pos < 0 || pos >= vec->size) + isl_die(ctx, isl_error_invalid, "position out of range", + return NULL); + return isl_val_int_from_isl_int(ctx, vec->el[pos]); +} + __isl_give isl_vec *isl_vec_set_element(__isl_take isl_vec *vec, int pos, isl_int v) { @@ -220,6 +236,37 @@ return NULL; } +/* Replace the element at position "pos" of "vec" by "v". + */ +__isl_give isl_vec *isl_vec_set_element_val(__isl_take isl_vec *vec, + int pos, __isl_take isl_val *v) +{ + if (!v) + return isl_vec_free(vec); + if (!isl_val_is_int(v)) + isl_die(isl_val_get_ctx(v), isl_error_invalid, + "expecting integer value", goto error); + vec = isl_vec_set_element(vec, pos, v->n); + isl_val_free(v); + return vec; +error: + isl_val_free(v); + return isl_vec_free(vec); +} + +/* Compare the elements of "vec1" and "vec2" at position "pos". + */ +int isl_vec_cmp_element(__isl_keep isl_vec *vec1, __isl_keep isl_vec *vec2, + int pos) +{ + if (!vec1 || !vec2) + return 0; + if (pos < 0 || pos >= vec1->size || pos >= vec2->size) + isl_die(isl_vec_get_ctx(vec1), isl_error_invalid, + "position out of range", return 0); + return isl_int_cmp(vec1->el[pos], vec2->el[pos]); +} + int isl_vec_is_equal(__isl_keep isl_vec *vec1, __isl_keep isl_vec *vec2) { if (!vec1 || !vec2) @@ -285,6 +332,26 @@ return vec; } +/* Replace all elements of "vec" by "v". + */ +__isl_give isl_vec *isl_vec_set_val(__isl_take isl_vec *vec, + __isl_take isl_val *v) +{ + vec = isl_vec_cow(vec); + if (!vec || !v) + goto error; + if (!isl_val_is_int(v)) + isl_die(isl_val_get_ctx(v), isl_error_invalid, + "expecting integer value", goto error); + isl_seq_set(vec->el, v->n, vec->size); + isl_val_free(v); + return vec; +error: + isl_vec_free(vec); + isl_val_free(v); + return NULL; +} + __isl_give isl_vec *isl_vec_clr(__isl_take isl_vec *vec) { vec = isl_vec_cow(vec); diff -Nru isl-0.11.2/isl_vertices.c isl-0.12.1/isl_vertices.c --- isl-0.11.2/isl_vertices.c 2013-04-07 15:45:14.000000000 +0000 +++ isl-0.12.1/isl_vertices.c 2013-07-24 11:04:50.000000000 +0000 @@ -89,7 +89,7 @@ vertices->ref = 1; vertices->bset = isl_basic_set_copy(bset); vertices->v = isl_alloc_array(bset->ctx, struct isl_vertex, n_vertices); - if (!vertices->v) + if (n_vertices && !vertices->v) goto error; vertices->n_vertices = n_vertices; @@ -134,7 +134,7 @@ goto error; isl_assert(bset->ctx, v->v.vertex->n_eq >= nvar, goto error); v->v.dom = isl_basic_set_copy(v->v.vertex); - v->v.dom = isl_basic_set_project_out(v->v.dom, isl_dim_set, 0, nvar); + v->v.dom = isl_basic_set_params(v->v.dom); if (!v->v.dom) goto error; @@ -438,7 +438,7 @@ selection = isl_alloc_array(bset->ctx, int, bset->n_ineq); snap = isl_alloc_array(bset->ctx, struct isl_tab_undo *, bset->n_ineq); facets = isl_mat_alloc(bset->ctx, nvar, nvar); - if (!selection || !snap || !facets) + if ((bset->n_ineq && (!selection || !snap)) || !facets) goto error; level = 0; @@ -627,7 +627,7 @@ if (!c) goto error; c->c.vertices = isl_alloc_array(tab->mat->ctx, int, n_vertices); - if (!c->c.vertices) + if (n_vertices && !c->c.vertices) goto error; c->c.dom = isl_basic_set_from_basic_map(isl_basic_map_copy(tab->bmap)); c->c.dom = isl_basic_set_set_rational(c->c.dom); @@ -873,12 +873,14 @@ ctx = isl_vertices_get_ctx(vertices); selection = isl_alloc_array(ctx, int, vertices->n_vertices); - if (!selection) + if (vertices->n_vertices && !selection) goto error; bset = isl_basic_set_params(bset); tab = isl_tab_from_basic_set(bset, 1); + if (!tab) + goto error; for (i = 0; i < bset->n_ineq; ++i) if (isl_tab_freeze_constraint(tab, i) < 0) goto error; @@ -992,10 +994,8 @@ v = &vertex->vertices->v[vertex->id]; if (!v->dom) { - unsigned nvar; - nvar = isl_basic_set_dim(v->vertex, isl_dim_set); v->dom = isl_basic_set_copy(v->vertex); - v->dom = isl_basic_set_project_out(v->dom, isl_dim_set, 0, nvar); + v->dom = isl_basic_set_params(v->dom); } return isl_basic_set_copy(v->dom); @@ -1086,7 +1086,7 @@ cell->n_vertices = vertices->c[id].n_vertices; cell->ids = isl_alloc_array(dom->ctx, int, cell->n_vertices); - if (!cell->ids) + if (cell->n_vertices && !cell->ids) goto error; for (i = 0; i < cell->n_vertices; ++i) cell->ids[i] = vertices->c[id].vertices[i]; diff -Nru isl-0.11.2/ltmain.sh isl-0.12.1/ltmain.sh --- isl-0.11.2/ltmain.sh 2011-11-24 12:37:42.000000000 +0000 +++ isl-0.12.1/ltmain.sh 2013-07-16 10:46:31.000000000 +0000 @@ -1,9 +1,9 @@ -# libtool (GNU libtool) 2.4 +# libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -41,6 +41,7 @@ # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) +# --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages @@ -69,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4 Debian-2.4-2ubuntu1 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -79,9 +80,9 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4 Debian-2.4-2ubuntu1" +VERSION="2.4.2 Debian-2.4.2-1ubuntu1" TIMESTAMP="" -package_revision=1.3293 +package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -136,15 +137,10 @@ : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} @@ -387,7 +383,7 @@ ;; *) save_IFS="$IFS" - IFS=: + IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break @@ -771,8 +767,8 @@ s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } @@ -1052,6 +1048,7 @@ opt_help=false opt_help_all=false opt_silent=: +opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false @@ -1120,6 +1117,10 @@ opt_silent=false func_append preserve_args " $opt" ;; + --no-warning|--no-warn) + opt_warning=false +func_append preserve_args " $opt" + ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" @@ -2059,7 +2060,7 @@ *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -3201,11 +3202,13 @@ # Set up the ranlib parameters. oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. @@ -3470,7 +3473,7 @@ # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; @@ -3982,14 +3985,17 @@ # launches target application with the remaining arguments. func_exec_program () { - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac func_exec_program_core \${1+\"\$@\"} } @@ -5057,9 +5063,15 @@ { EOF func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' - + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' cat <<"EOF" } EOF @@ -5643,7 +5655,8 @@ continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -6150,7 +6163,8 @@ lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -6834,7 +6848,7 @@ test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" + add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -7319,6 +7333,7 @@ # which has an extra 1 added just for fun # case $version_type in + # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result @@ -7438,7 +7453,7 @@ versuffix="$major.$revision" ;; - linux) + linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" @@ -8026,6 +8041,11 @@ # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= @@ -8056,7 +8076,7 @@ elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) func_apped perm_rpath " $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi done @@ -8064,11 +8084,7 @@ if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. @@ -9158,6 +9174,8 @@ esac done fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" @@ -9267,7 +9285,8 @@ *.la) func_basename "$deplib" name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" diff -Nru isl-0.11.2/m4/ax_create_pkgconfig_info.m4 isl-0.12.1/m4/ax_create_pkgconfig_info.m4 --- isl-0.11.2/m4/ax_create_pkgconfig_info.m4 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/m4/ax_create_pkgconfig_info.m4 2013-07-01 13:12:40.000000000 +0000 @@ -1,6 +1,6 @@ -# =========================================================================== -# http://www.nongnu.org/autoconf-archive/ax_create_pkgconfig_info.html -# =========================================================================== +# ============================================================================ +# http://www.gnu.org/software/autoconf-archive/ax_create_pkgconfig_info.html +# ============================================================================ # # SYNOPSIS # @@ -14,8 +14,8 @@ # $2 = (empty) # $3 = $PACKAGE_LIBS $LIBS (as set at that point in configure.ac) # $4 = $PACKAGE_SUMMARY (or $1 Library) -# $5 = $CPPFLAGS $PACKAGE_CFLAGS (as set at the point in configure.ac) -# $6 = $LDFLAGS $PACKAGE_LDFLAGS (as set at the point in configure.ac) +# $5 = $PACKAGE_CFLAGS (as set at the point in configure.ac) +# $6 = $PACKAGE_LDFLAGS (as set at the point in configure.ac) # # PACKAGE_NAME defaults to $PACKAGE if not set. # PACKAGE_LIBS defaults to -l$PACKAGE_NAME if not set. @@ -34,7 +34,7 @@ # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your +# Free Software Foundation; either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -58,6 +58,8 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. +#serial 12 + AC_DEFUN([AX_CREATE_PKGCONFIG_INFO],[dnl AS_VAR_PUSHDEF([PKGCONFIG_suffix],[ax_create_pkgconfig_suffix])dnl AS_VAR_PUSHDEF([PKGCONFIG_libdir],[ax_create_pkgconfig_libdir])dnl @@ -145,13 +147,13 @@ AC_MSG_RESULT($PKGCONFIG_libs) AC_MSG_CHECKING(our pkgconfig cppflags) -PKGCONFIG_cppflags="ifelse($5,,$CPPFLAGS $PACKAGE_CFLAGS,$5)" +PKGCONFIG_cppflags="ifelse($5,,$PACKAGE_CFLAGS,$5)" PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"` PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"` AC_MSG_RESULT($PKGCONFIG_cppflags) AC_MSG_CHECKING(our pkgconfig ldflags) -PKGCONFIG_ldflags="ifelse($6,,$LDFLAGS $PACKAGE_LDFLAGS,$5)" +PKGCONFIG_ldflags="ifelse($6,,$PACKAGE_LDFLAGS,$5)" PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"` PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"` AC_MSG_RESULT($PKGCONFIG_ldflags) diff -Nru isl-0.11.2/m4/ltversion.m4 isl-0.12.1/m4/ltversion.m4 --- isl-0.11.2/m4/ltversion.m4 2011-11-24 12:37:42.000000000 +0000 +++ isl-0.12.1/m4/ltversion.m4 2013-07-16 10:46:31.000000000 +0000 @@ -9,15 +9,15 @@ # @configure_input@ -# serial 3293 ltversion.m4 +# serial 3337 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4]) -m4_define([LT_PACKAGE_REVISION], [1.3293]) +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4' -macro_revision='1.3293' +[macro_version='2.4.2' +macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff -Nru isl-0.11.2/print.c isl-0.12.1/print.c --- isl-0.11.2/print.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/print.c 2013-07-24 11:02:32.000000000 +0000 @@ -12,11 +12,15 @@ #include #include #include +#include #undef BASE #define BASE id #include #undef BASE +#define BASE val +#include +#undef BASE #define BASE space #include #undef BASE diff -Nru isl-0.11.2/test_inputs/codegen/atomic2.c isl-0.12.1/test_inputs/codegen/atomic2.c --- isl-0.11.2/test_inputs/codegen/atomic2.c 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/atomic2.c 2013-06-28 09:31:42.000000000 +0000 @@ -0,0 +1,2 @@ +for (int c0 = ((b0 + 32767) % 32768) + 1; c0 <= 65534; c0 += 32768) + A(c0); diff -Nru isl-0.11.2/test_inputs/codegen/atomic2.in isl-0.12.1/test_inputs/codegen/atomic2.in --- isl-0.11.2/test_inputs/codegen/atomic2.in 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/atomic2.in 2013-06-28 09:31:42.000000000 +0000 @@ -0,0 +1,4 @@ +# Check that isl properly handles atomic domains that are unions. +[nn, b0] -> { A[a] -> [a, 0, b0] : exists (e0 = [(b0 - a)/32768]: 32768e0 = b0 - a and a >= 1 and b0 >= 0 and b0 <= 32767 and a <= 65534) } +[nn, b0] -> { : b0 >= 0 and b0 <= 32767 } +[nn, b0] -> { [a, b, c] -> atomic[2] : c >= 1; [a, 0, c] -> atomic[2] } diff -Nru isl-0.11.2/test_inputs/codegen/atomic3.c isl-0.12.1/test_inputs/codegen/atomic3.c --- isl-0.11.2/test_inputs/codegen/atomic3.c 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/atomic3.c 2013-07-24 11:02:36.000000000 +0000 @@ -0,0 +1,7 @@ +for (int c0 = 0; c0 <= 64; c0 += 1) + if (c0 >= 63) { + sync(); + } else if (c0 >= 1) { + sync(); + } else + sync(); diff -Nru isl-0.11.2/test_inputs/codegen/atomic3.in isl-0.12.1/test_inputs/codegen/atomic3.in --- isl-0.11.2/test_inputs/codegen/atomic3.in 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/atomic3.in 2013-07-24 11:02:36.000000000 +0000 @@ -0,0 +1,5 @@ +# Check that isl is not confused by inconsistent +# separation_class and atomic options. +{ sync[] -> [i, 0] : 0 <= i <= 64 } +{ : } +{ [i, 0] -> separation_class[[1] -> [0]] : 1 <= i <= 62; [i, 0] -> atomic[1]} diff -Nru isl-0.11.2/test_inputs/codegen/atomic4.c isl-0.12.1/test_inputs/codegen/atomic4.c --- isl-0.11.2/test_inputs/codegen/atomic4.c 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/atomic4.c 2013-07-24 11:02:36.000000000 +0000 @@ -0,0 +1,2 @@ +for (int c0 = 0; c0 <= 64; c0 += 1) + sync(); diff -Nru isl-0.11.2/test_inputs/codegen/atomic4.in isl-0.12.1/test_inputs/codegen/atomic4.in --- isl-0.11.2/test_inputs/codegen/atomic4.in 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/atomic4.in 2013-07-24 11:02:36.000000000 +0000 @@ -0,0 +1,4 @@ +# Check that isl is not confused by inconsistent separate and atomic options. +{ sync[] -> [i, 0] : 0 <= i <= 64 } +{ : } +{ [i, 0] -> separate[1] : 1 <= i <= 62; [i, 0] -> atomic[1] : i <= 10 or i >= 20 } diff -Nru isl-0.11.2/test_inputs/codegen/cloog/reservoir-liu-zhuge1.c isl-0.12.1/test_inputs/codegen/cloog/reservoir-liu-zhuge1.c --- isl-0.11.2/test_inputs/codegen/cloog/reservoir-liu-zhuge1.c 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/cloog/reservoir-liu-zhuge1.c 2013-07-24 11:04:50.000000000 +0000 @@ -2,7 +2,7 @@ for (int c1 = -4; c1 <= 3 * M + N; c1 += 1) { if (c1 >= 3 * M) { S2(M, -3 * M + c1); - } else if (3 * floord(c1 - 2, 3) + 2 == c1 && c1 + 1 >= 0 && 3 * M >= c1 + 4) + } else if (3 * floord(c1 - 2, 3) + 2 == c1 && c1 >= -1 && 3 * M >= c1 + 4) S1((c1 + 4) / 3, 0); for (int c3 = max(-3 * M + c1 + 3, c1 + 3 * floord(-c1 - 1, 3) + 3); c3 <= min(N - 1, c1); c3 += 3) { S2((c1 - c3) / 3, c3); diff -Nru isl-0.11.2/test_inputs/codegen/cloog/thomasset.c isl-0.12.1/test_inputs/codegen/cloog/thomasset.c --- isl-0.11.2/test_inputs/codegen/cloog/thomasset.c 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/cloog/thomasset.c 2013-07-01 13:12:40.000000000 +0000 @@ -5,5 +5,5 @@ for (int c0 = floord(n, 3); c0 <= 2 * floord(n, 3); c0 += 1) for (int c1 = 0; c1 < n; c1 += 1) for (int c3 = max(1, (n % 3) - n + 3 * c0); c3 <= min(n, (n % 3) - n + 3 * c0 + 2); c3 += 1) - S2(c1 + 1, c3, 0, (n + 3) / 3 - 1, c0 - (n + 3) / 3 + 1); + S2(c1 + 1, c3, 0, n / 3, c0 - n / 3); } diff -Nru isl-0.11.2/test_inputs/codegen/cloog/unroll2.c isl-0.12.1/test_inputs/codegen/cloog/unroll2.c --- isl-0.11.2/test_inputs/codegen/cloog/unroll2.c 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/cloog/unroll2.c 2013-07-01 13:12:40.000000000 +0000 @@ -1,6 +1,6 @@ { if (n <= 9 && n >= 0) S1(n); - if (n <= 9 && n + 1 >= 0) + if (n <= 9 && n >= -1) S1(n + 1); } diff -Nru isl-0.11.2/test_inputs/codegen/hoist2.c isl-0.12.1/test_inputs/codegen/hoist2.c --- isl-0.11.2/test_inputs/codegen/hoist2.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/hoist2.c 2013-07-01 13:12:40.000000000 +0000 @@ -1,5 +1,3 @@ for (int c0 = 1; c0 <= 5; c0 += 1) - if (c0 <= 2 || (t1 + c0 >= 8 && c0 >= 2 && c0 <= 3) || (b == 1 && t1 + c0 >= 10 && c0 >= 3) || (b == 1 && t1 <= 6 && t1 + c0 <= 9)) - for (int c1 = max(t1, t1 - 64 * b + 64); c1 <= min(70, -((c0 + 1) % 2) - c0 + 73); c1 += 64) - if ((c0 <= 2 && c0 >= 1 && c0 + c1 <= 71 && c1 >= 7) || (c1 == t1 + 64 && c0 <= 3 && c0 >= 2 && t1 + c0 >= 8) || (c1 == t1 && b == 1 && c0 >= 3 && t1 + c0 >= 10) || (c1 == t1 && b == 1 && t1 <= 6 && t1 + c0 <= 9)) - A(c0, 64 * b + c1 - 8); + for (int c1 = max(t1, t1 - 64 * b + 64); c1 <= min(70, -((c0 + 1) % 2) - c0 + 73); c1 += 64) + A(c0, 64 * b + c1 - 8); diff -Nru isl-0.11.2/test_inputs/codegen/omega/floor_bound-6.c isl-0.12.1/test_inputs/codegen/omega/floor_bound-6.c --- isl-0.11.2/test_inputs/codegen/omega/floor_bound-6.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/omega/floor_bound-6.c 2013-07-01 13:12:40.000000000 +0000 @@ -1,3 +1,3 @@ if (m >= 8 * floord(m + 1, 8)) - for (int c0 = 4 * floord(floord(m + 1, 8), 4); c0 <= n; c0 += 1) + for (int c0 = 4 * floord(m + 1, 32); c0 <= n; c0 += 1) s0(c0); diff -Nru isl-0.11.2/test_inputs/codegen/omega/lefur04-0.c isl-0.12.1/test_inputs/codegen/omega/lefur04-0.c --- isl-0.11.2/test_inputs/codegen/omega/lefur04-0.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/omega/lefur04-0.c 2013-07-01 13:12:40.000000000 +0000 @@ -3,6 +3,6 @@ for (int c2 = c0; c2 <= min(min(3, 2 * c0 - c1 + 1), 3 * c1 + 2); c2 += 1) for (int c3 = max(max(max(c2 - (c2 + 2) / 3, c2 + floord(3 * c1 - c2 - 1, 6)), c1 - (-c1 + 3) / 3), c0 - (-c2 + 3) / 3); c3 <= min(c0 + c0 / 2 + 1, 3); c3 += 1) for (int c5 = max(max(max(max(c1 - (c1 - 2 * c3 + 5) / 5, 0), c3 - (c3 + 3) / 3), 2 * c3 - 4), c2 - (c2 + 3) / 3); c5 <= min(min(c1 + 1, c3), -c2 + 2 * c3 - (c2 + 3) / 3 + 2); c5 += 1) - for (int c6 = max(max(max(max(max(333 * c2 + (c2 + 1) / 3, -200 * c1 + 400 * c3 - 199), 1000 * c0 - 500 * c5 - 501), 333 * c1 + c1 / 3), 250 * c3 + 1), 667 * c0 - 333 * c1 - (c0 + c1 + 3) / 3 - 332); c6 <= min(min(min(min(min(min(500 * c0 + 499, 333 * c2 - (-c2 + 3) / 3 + 333), 333 * c3 - (-c3 + 3) / 3 + 334), -200 * c1 + 400 * c3 + 400), 500 * c5 + 501), 1000), 1000 * c0 - 500 * c5 + 997); c6 += 1) + for (int c6 = max(max(max(max(max(1000 * c0 - 500 * c5 - 501, -200 * c1 + 400 * c3 - 199), 333 * c1 + c1 / 3), 250 * c3 + 1), 667 * c0 - 333 * c1 - (c0 + c1 + 3) / 3 - 332), 333 * c2 + (c2 + 1) / 3); c6 <= min(min(min(min(min(min(-200 * c1 + 400 * c3 + 400, 500 * c0 + 499), 333 * c2 - (-c2 + 3) / 3 + 333), 333 * c3 - (-c3 + 3) / 3 + 334), 500 * c5 + 501), 1000), 1000 * c0 - 500 * c5 + 997); c6 += 1) for (int c7 = max(max(max(max(c6, 500 * c5 + 2), 1000 * c3 - 2 * c6 + 2), 500 * c1 + (c6 + 1) / 2), 1000 * c0 - c6); c7 <= min(min(min(min(500 * c5 + 501, 2 * c6 + 1), 1000 * c0 - c6 + 999), 500 * c1 + (c6 + 1) / 2 + 499), 1000 * c3 - 2 * c6 + 1001); c7 += 1) s0(c0, c1, c2, c3, c2 / 3, c5, c6, c7); diff -Nru isl-0.11.2/test_inputs/codegen/omega/p.delft2-0.c isl-0.12.1/test_inputs/codegen/omega/p.delft2-0.c --- isl-0.11.2/test_inputs/codegen/omega/p.delft2-0.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/omega/p.delft2-0.c 2013-07-24 11:04:50.000000000 +0000 @@ -1,10 +1,10 @@ -if ((2 * floord(P2, 2) == P2 && 2 * floord(P1, 2) == P1 && P2 <= 3 && P2 >= 0 && P1 <= 3 && P1 >= 0) || (2 * floord(P2, 2) == P2 && 2 * floord(P1 - 1, 2) + 1 == P1 && P2 <= 3 && P2 >= 0 && P1 <= 3 && P1 >= 0) || (2 * floord(P2 - 1, 2) + 1 == P2 && 2 * floord(P1, 2) == P1 && P2 <= 3 && P2 >= 0 && P1 <= 3 && P1 >= 0) || (2 * floord(P2 - 1, 2) + 1 == P2 && 2 * floord(P1 - 1, 2) + 1 == P1 && P2 <= 3 && P2 >= 0 && P1 <= 3 && P1 >= 0)) +if (P2 <= 3 && P2 >= 0 && P1 <= 3 && P1 >= 0) for (int c0 = P1 - 1; c0 <= 3; c0 += 1) - if ((2 * floord(c0, 2) == c0 && P2 % 2 == 0 && 2 * floord(P1 - 1, 2) + 1 == P1) || (2 * floord(c0, 2) == c0 && 2 * floord(P2 - 1, 2) + 1 == P2 && 2 * floord(P1 - 1, 2) + 1 == P1) || (2 * floord(c0 - 1, 2) + 1 == c0 && P2 % 2 == 0 && P1 % 2 == 0) || (2 * floord(c0 - 1, 2) + 1 == c0 && 2 * floord(P2 - 1, 2) + 1 == P2 && P1 % 2 == 0)) + if (P1 + 2 * floord(-P1 + c0 - 1, 2) + 1 == c0) for (int c2 = 0; c2 <= -((P1 + 4) / 4) + 8; c2 += 1) - if ((-2 * ((-P2 + 4) / 4) + 2 * (P2 / 4) + 2 == P2 && 2 * floord(P2 - 1, 2) + 2 == P2 && P2 <= 6 && 18 * floord(9 * P1 + 17 * c0 + 14 * c2 + 3, 18) + 1 >= 9 * P1 + 17 * c0 + 14 * c2) || (2 * floord(P2 - 1, 2) + 1 == P2 && 18 * floord(9 * P1 + 17 * c0 + 14 * c2 + 3, 18) + 1 >= 9 * P1 + 17 * c0 + 14 * c2 && P2 + 1 >= 0 && (-P2 + 4) % 4 >= 1)) + if ((5 * c0 + 2 * c2 + 5) % 9 <= 2) for (int c3 = 0; c3 <= -((P2 + 4) / 4) + 8; c3 += 1) - if ((5 * P2 + 2 * c3) % 9 <= 3 && 9 * ((4 * P2 + 3) / 9 / 2) + 7 >= 2 * P2 && 2 * P2 + 1 >= 9 * ((4 * P2 + 3) / 9 / 2)) + if ((5 * P2 + 2 * c3) % 9 <= 3) if (c0 + 1 == P1 && (5 * P1 + 2 * c2) % 9 <= 2 && P1 >= 1) { s0(P1 - 1, P2, c2, c3, ((5 * P1 + 2 * c2) % 9) + 1, (-4 * P2 + 2 * c3 + 9) % 9); } else if (c2 % 4 == 0 && c0 == 3 && P1 == 0) diff -Nru isl-0.11.2/test_inputs/codegen/omega/ts1d-mp-i_ts-m_b-0.c isl-0.12.1/test_inputs/codegen/omega/ts1d-mp-i_ts-m_b-0.c --- isl-0.11.2/test_inputs/codegen/omega/ts1d-mp-i_ts-m_b-0.c 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/omega/ts1d-mp-i_ts-m_b-0.c 2013-07-01 13:12:40.000000000 +0000 @@ -5,7 +5,7 @@ s0(1, c1, 0, 0, 0); } else if (c2 + 1 == N && T >= c1 + 1 && c1 >= 0) { s0(1, c1, N - 1, 0, 0); - } else if (c1 + 1 == 0 && c2 >= 0 && N >= c2 + 1) + } else if (c1 == -1 && c2 >= 0 && N >= c2 + 1) s0(1, -1, c2, 0, 0); for (int c1 = 0; c1 <= floord(T - 1, 500); c1 += 1) { for (int c3 = -((c1 + 9) / 8) + 2; c3 <= floord(N - 500 * c1 - 3, 4000) + 1; c3 += 1) diff -Nru isl-0.11.2/test_inputs/codegen/separate2.c isl-0.12.1/test_inputs/codegen/separate2.c --- isl-0.11.2/test_inputs/codegen/separate2.c 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/separate2.c 2013-07-24 11:04:50.000000000 +0000 @@ -0,0 +1,9 @@ +if ((length - 1) % 16 <= 14) + for (int c0 = 0; c0 <= 1; c0 += 1) + for (int c5 = 0; c5 <= 31; c5 += 1) + for (int c6 = 0; c6 <= 30; c6 += 1) { + if ((2 * c5 - c6 + 31) % 32 == 31 && 2 * ((length - 1) % 16) + 2 * c5 == 2 * ((length - 1) % 32) + c6 && c6 + 62 >= 2 * ((length - 1) % 16) + 2 * c5 && 2 * length + c6 >= 2 * ((length - 1) % 16) + 4 && 2 * ((length - 1) % 16) >= c6 && 2 * ((length - 1) % 16) + 2 * c5 >= c6) + S_3(c0, 0, (-(2 * ((length - 1) % 16)) + 2 * length + c6 - 2) / 2); + if (length <= 16 && length >= c5 + 1 && c6 >= 1 && length >= c6) + S_0(c0, c5, c6 - 1); + } diff -Nru isl-0.11.2/test_inputs/codegen/separate2.in isl-0.12.1/test_inputs/codegen/separate2.in --- isl-0.11.2/test_inputs/codegen/separate2.in 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/separate2.in 2013-07-24 10:34:06.000000000 +0000 @@ -0,0 +1,4 @@ +# Check that rational affine expressions are printer properly. +[tsteps, length] -> { S_0[iter, i, j] -> [iter, 0, o2, o3, 0, o5, o6, 4] : exists (e0 = [(o2)/32], e1 = [(o3)/32], e2 = [(-i + o5)/32], e3 = [(-31 + j - o6)/32]: tsteps = 2 and 32e0 = o2 and 32e1 = o3 and 32e2 = -i + o5 and 32e3 = -31 + j - o6 and o2 <= i and o2 >= -31 + i and o3 <= 1 + j and o3 >= -30 + j and o5 >= 0 and o5 <= 31 and o6 >= 0 and o6 <= 31 and i <= -1 + length and i >= 0 and iter >= 0 and iter <= 1 and j <= -1 + length and j >= 0 and o2 >= -31 + length and o3 >= -30 + 2length); S_3[iter, 0, j] -> [iter, 0, o2, o3, o4, o5, o6, 2] : exists (e0 = [(o2)/32], e1 = [(o3)/32], e2 = [(o4)/32], e3 = [(-2o5 + o6)/32], e4 = [(j - o5)/32]: tsteps = 2 and 32e0 = o2 and 32e1 = o3 and 32e2 = o4 and 32e3 = -2o5 + o6 and 32e4 = j - o5 and iter <= 1 and j <= -1 + length and o2 <= j and o2 >= -31 + j and o3 <= 2j and o3 >= -30 + 2j and o4 >= 0 and o4 <= 31 and o5 >= 0 and o5 <= 31 and o6 >= 0 and o6 <= 30 and j >= 1 and iter >= 0 and o2 >= -31 + length and o3 >= -30 + 2length) } +[tsteps, length] -> { : length >= 1 and length <= 1024 and tsteps = 2 } +{ [o0,o1,o2,o3,o4,o5,o6,o7] -> separate[x] } diff -Nru isl-0.11.2/test_inputs/codegen/separation_class2.c isl-0.12.1/test_inputs/codegen/separation_class2.c --- isl-0.11.2/test_inputs/codegen/separation_class2.c 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/separation_class2.c 2013-07-01 13:12:40.000000000 +0000 @@ -10,6 +10,6 @@ } for (int c1 = 0; c1 < n; c1 += 8) for (int c2 = 0; c2 < n % 8; c2 += 1) - for (int c3 = 0; c3 <= min(7, n - c1 - 1); c3 += 1) + for (int c3 = 0; c3 <= min(n - c1 - 1, 7); c3 += 1) A(-((n - 1) % 8) + n + c2 - 1, c1 + c3); } diff -Nru isl-0.11.2/test_inputs/codegen/shift2.c isl-0.12.1/test_inputs/codegen/shift2.c --- isl-0.11.2/test_inputs/codegen/shift2.c 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/shift2.c 2013-07-24 11:04:50.000000000 +0000 @@ -0,0 +1,53 @@ +for (int c0 = 0; c0 <= 1; c0 += 1) { + for (int c1 = 0; c1 < length - 1; c1 += 32) { + for (int c2 = c1; c2 < length; c2 += 32) { + if (c1 == 0) + for (int c3 = 0; c3 <= min(length, 2 * c2 - 32); c3 += 32) + for (int c5 = 0; c5 <= min(31, length - c2 - 1); c5 += 1) + for (int c6 = max(-c3 + 1, 0); c6 <= min(31, length - c3); c6 += 1) + S_0(c0, c2 + c5, c3 + c6 - 1); + for (int c3 = max(2 * c1, 2 * c2); c3 <= min(2 * c2 + 62, 2 * length - 2); c3 += 32) + for (int c4 = 0; c4 <= min(min(length - c1 - 2, -c1 + c3 / 2 + 14), 31); c4 += 1) { + if (c4 == 0 && c3 == 0 && c2 == 0 && c1 == 0) { + for (int c6 = 1; c6 <= min(31, length); c6 += 1) + S_0(c0, 0, c6 - 1); + } else if (c4 == 0 && c3 == 2 * c2 + 32 && c1 == 0) + for (int c5 = 0; c5 <= 15; c5 += 1) + for (int c6 = 0; c6 <= min(31, length - 2 * c2 - 32); c6 += 1) + S_0(c0, c2 + c5, 2 * c2 + c6 + 31); + for (int c5 = max((-2 * c2 + c3) / 2, c1 - c2 + c4 + 1); c5 <= min(-c2 + c3 / 2 + 15, length - c2 - 1); c5 += 1) { + if (c4 == 0 && c1 == 0) + for (int c6 = max(-c3 + 1, 0); c6 <= min(2 * c2 - c3 + 2 * c5 - 1, length - c3); c6 += 1) + S_0(c0, c2 + c5, c3 + c6 - 1); + S_3(c0, c1 + c4, c2 + c5); + if (c4 == 0 && c1 == 0 && length >= 2 * c2 + 2 * c5) + S_0(c0, c2 + c5, 2 * c2 + 2 * c5 - 1); + if (c4 == 0 && c1 == 0) + for (int c6 = 2 * c2 - c3 + 2 * c5 + 1; c6 <= min(length - c3, 31); c6 += 1) + S_0(c0, c2 + c5, c3 + c6 - 1); + } + if (c4 == 0 && c1 == 0 && c3 + 30 >= 2 * length) + S_4(c0); + if (c4 == 0 && c3 == 2 * c2 && c1 == 0) + for (int c5 = 16; c5 <= min(length - c2 - 1, 31); c5 += 1) + for (int c6 = max(0, -2 * c2 + 1); c6 <= min(31, length - 2 * c2); c6 += 1) + S_0(c0, c2 + c5, 2 * c2 + c6 - 1); + } + if (32 * floord(length - 16, 32) + 16 == length && c2 + 16 == length && c1 == 0) + S_4(c0); + if (c1 == 0) + for (int c3 = 2 * c2 + 64; c3 <= length; c3 += 32) + for (int c5 = 0; c5 <= 31; c5 += 1) + for (int c6 = 0; c6 <= min(31, length - c3); c6 += 1) + S_0(c0, c2 + c5, c3 + c6 - 1); + } + if (length % 32 == 0 && c1 == 0) + S_4(c0); + } + if (length <= 1) + for (int c5 = 0; c5 <= length; c5 += 1) + if (c5 == length) { + S_4(c0); + } else + S_0(c0, 0, 0); +} diff -Nru isl-0.11.2/test_inputs/codegen/shift2.in isl-0.12.1/test_inputs/codegen/shift2.in --- isl-0.11.2/test_inputs/codegen/shift2.in 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/shift2.in 2013-07-24 10:34:06.000000000 +0000 @@ -0,0 +1,5 @@ +# Check that the shifting code is not confused by domains that +# have a non-obviously fixed value. +[tsteps, length] -> { S_4[iter] -> [iter, 0, o2, o3, 0, o5, o6, 3] : exists (e0 = [(o2)/32], e1 = [(o3)/32], e2 = [(-length + o5)/32], e3 = [(-2length + o6)/32]: tsteps = 2 and 32e0 = o2 and 32e1 = o3 and 32e2 = -length + o5 and 32e3 = -2length + o6 and o2 <= length and o2 >= -31 + length and o3 <= 2length and o3 >= -30 + 2length and o5 >= 0 and o5 <= 31 and o6 >= 0 and o6 <= 30 and iter <= 1 and iter >= 0); S_3[iter, i, j] -> [iter, o1, o2, o3, o4, o5, o6, 2] : exists (e0 = [(o1)/32], e1 = [(o2)/32], e2 = [(o3)/32], e3 = [(-i + o4)/32], e4 = [(-j + o5)/32], e5 = [(-2j + o6)/32]: tsteps = 2 and 32e0 = o1 and 32e1 = o2 and 32e2 = o3 and 32e3 = -i + o4 and 32e4 = -j + o5 and 32e5 = -2j + o6 and o1 <= i and o1 >= -31 + i and o2 <= j and o2 >= -31 + j and o3 <= 2j and o3 >= -30 + 2j and o4 >= 0 and o4 <= 31 and o5 >= 0 and o5 <= 31 and o6 >= 0 and o6 <= 30 and j >= 1 + i and i >= 0 and iter <= 1 and iter >= 0 and j <= -1 + length); S_0[iter, i, j] -> [iter, 0, o2, o3, 0, o5, o6, 4] : exists (e0 = [(o2)/32], e1 = [(o3)/32], e2 = [(-i + o5)/32], e3 = [(-31 + j - o6)/32]: tsteps = 2 and 32e0 = o2 and 32e1 = o3 and 32e2 = -i + o5 and 32e3 = -31 + j - o6 and o2 <= i and o2 >= -31 + i and o3 <= 1 + j and o3 >= -30 + j and o5 >= 0 and o5 <= 31 and o6 >= 0 and o6 <= 31 and i <= -1 + length and i >= 0 and iter >= 0 and iter <= 1 and j <= -1 + length and j >= 0) } +[tsteps, length] -> { : length >= 0 and length <= 1024 and tsteps = 2 } +{ } diff -Nru isl-0.11.2/test_inputs/codegen/single_valued.c isl-0.12.1/test_inputs/codegen/single_valued.c --- isl-0.11.2/test_inputs/codegen/single_valued.c 2013-03-23 17:52:06.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/single_valued.c 2013-07-01 13:12:40.000000000 +0000 @@ -1,2 +1,2 @@ if (2 * (63 * t1 % 64) + t1 <= 134) - S(2 * (63 * t1 % 64) + t1); + S(-(2 * ((t1 - 1) % 64)) + t1 + 126); diff -Nru isl-0.11.2/test_inputs/codegen/stride6.c isl-0.12.1/test_inputs/codegen/stride6.c --- isl-0.11.2/test_inputs/codegen/stride6.c 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/stride6.c 2013-07-01 13:12:40.000000000 +0000 @@ -0,0 +1,4 @@ +for (int c1 = -1024; c1 <= 0; c1 += 32) + for (int c2 = max(-((niter - c1) % 32) + niter - c1 - 32, -((niter - 1) % 32) + niter - 1); c2 <= min(niter + 1022, niter - c1 - 1); c2 += 32) + for (int c5 = max(max(niter - c1 - c2 - 32, -c1 - 1023), 0); c5 <= min(min(-c1, niter - c1 - c2 - 1), 31); c5 += 1) + S_4(niter - 1, -c1 - c5); diff -Nru isl-0.11.2/test_inputs/codegen/stride6.in isl-0.12.1/test_inputs/codegen/stride6.in --- isl-0.11.2/test_inputs/codegen/stride6.in 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/stride6.in 2013-07-01 13:12:40.000000000 +0000 @@ -0,0 +1,3 @@ +[niter] -> { S_4[-1 + niter, i] -> [o0, o1, o2, o3, o4, o5, o6, o7, 4] : exists (e0 = [(o0)/32], e1 = [(o1)/32], e2 = [(o2)/32], e3 = [(o3)/32], e4 = [(-31i + o5)/32], e5 = [(-i - o4 + o6)/32], e6 = [(-o4 + o7)/32], e7 = [(-1 + niter - o4)/32]: 32e0 = o0 and 32e1 = o1 and 32e2 = o2 and 32e3 = o3 and 32e4 = -31i + o5 and 32e5 = -i - o4 + o6 and 32e6 = -o4 + o7 and 32e7 = -1 + niter - o4 and o0 <= -1 + niter and o0 >= -32 + niter and o1 <= -i and o1 >= -31 - i and o2 <= -1 + niter + i and o2 >= -32 + niter + i and o3 <= 1023 + niter and o3 >= 992 + niter and o4 >= 0 and o4 <= 31 and o5 >= 0 and o5 <= 31 and o6 >= 0 and o6 <= 31 and o7 >= 0 and o7 <= 31 and i <= 1023 and i >= 0 and niter >= 1) } +[niter] -> { : niter <= 8192 and niter >= 1 } +[niter] -> { } diff -Nru isl-0.11.2/test_inputs/codegen/unroll4.c isl-0.12.1/test_inputs/codegen/unroll4.c --- isl-0.11.2/test_inputs/codegen/unroll4.c 2013-04-09 16:34:27.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/unroll4.c 2013-07-24 11:04:50.000000000 +0000 @@ -3,8 +3,8 @@ if (t1 % 3 == 0 && t2 >= 1 && t2 <= 2) write_shared_A(3, (-t1 + 12) / 3, t2 + 32); { - int c3 = t2 <= 1 || (t2 >= 2 && ((3 * t1 + t2 + 3) % 4) + 1 >= t2) ? t2 + 32 : t2; - if (c3 == t2 + 32 || (c3 == t2 && t1 + 4 * floord(-((t2 + 1) % 2) - t1 + t2 + 3, 4) >= 5 && t1 + 4 * floord(-((t2 + 1) % 2) - t1 + t2 + 3, 4) <= 8)) + int c3 = ((t1 + 3) % 4) + 1 >= t2 && t2 >= 2 && t2 <= 33 ? t2 + 32 : ((t2 + 30) % 32) + 2; + if (c3 == t2 + 32 || (c3 == t2 && ((-t1 + 8) % 4) + t2 >= ((t2 + 1) % 2) + 5)) write_shared_A(3, ((t1 + 3) % 4) + 5, c3); } if (t2 >= t1 + 1 && t2 <= 4 && t1 >= 1) @@ -13,8 +13,8 @@ if (t1 % 3 == 0 && t2 >= 1 && t2 <= 2) write_shared_A(4, (-t1 + 12) / 3, t2 + 32); { - int c3 = t2 <= 1 || (t2 >= 2 && ((3 * t1 + t2 + 3) % 4) + 1 >= t2) ? t2 + 32 : t2; - if (c3 == t2 + 32 || (c3 == t2 && t1 + 4 * floord(-((t2 + 1) % 2) - t1 + t2 + 3, 4) >= 5 && t1 + 4 * floord(-((t2 + 1) % 2) - t1 + t2 + 3, 4) <= 8)) + int c3 = ((t1 + 3) % 4) + 1 >= t2 && t2 >= 2 && t2 <= 33 ? t2 + 32 : ((t2 + 30) % 32) + 2; + if (c3 == t2 + 32 || (c3 == t2 && ((-t1 + 8) % 4) + t2 >= ((t2 + 1) % 2) + 5)) write_shared_A(4, ((t1 + 3) % 4) + 5, c3); } if (t2 >= t1 + 1 && t2 <= 4 && t1 >= 1) diff -Nru isl-0.11.2/test_inputs/codegen/unroll6.c isl-0.12.1/test_inputs/codegen/unroll6.c --- isl-0.11.2/test_inputs/codegen/unroll6.c 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/unroll6.c 2013-07-01 13:12:40.000000000 +0000 @@ -0,0 +1,8 @@ +{ + if (((-t1 + 128) % 128) + nn >= 128 * g + 130 && 128 * g + 127 >= (-t1 + 128) % 128 && nn >= 128 * g + 6) + for (int c1 = 393214; c1 < nn - 1; c1 += 393216) + A(c1, ((t1 + 127) % 128) + 128 * g + 1, ((t1 + 127) % 128) + 1); + if (nn >= t1 + 128 * g + 130 && t1 + 128 * g >= -127 && t1 <= 2 && t1 >= 1) + for (int c1 = 393214; c1 < nn - 1; c1 += 393216) + A(c1, t1 + 128 * g + 128, t1 + 128); +} diff -Nru isl-0.11.2/test_inputs/codegen/unroll6.in isl-0.12.1/test_inputs/codegen/unroll6.in --- isl-0.11.2/test_inputs/codegen/unroll6.in 1970-01-01 00:00:00.000000000 +0000 +++ isl-0.12.1/test_inputs/codegen/unroll6.in 2013-06-28 09:31:42.000000000 +0000 @@ -0,0 +1,7 @@ +# Check that the right lower bound is chosen for unrolling. +# Older versions of isl would pick a lower bound that resulted +# in a number of slices that exceeds the maximal value of an integer +# and then only generated code for a truncated number (zero) of slices. +[nn, t1, g] -> { A[a, b, c] -> [c] : exists (e0 = [(2 + a)/393216], e1 = [(t1 - c)/128]: 128g = b - c and 393216e0 = 2 + a and 128e1 = t1 - c and c <= 130 and c >= 6 - nn + b and c <= 128 + b and nn >= 137 and t1 >= 0 and c >= 1 and a <= -2 + nn and a >= 1 and nn <= 9223372036854775807 and b >= 1 and b <= -2 + nn and t1 <= 127) } +[nn, t1, g] -> { : nn <= 9223372036854775807 and nn >= 137 and t1 >= 0 and t1 <= 127 } +{ [c] -> unroll[x] }