Blame SOURCES/gcc5-isl-dl.patch

f9e83b
--- gcc/Makefile.in.jj	2012-12-13 17:09:20.000000000 +0100
f9e83b
+++ gcc/Makefile.in	2012-12-14 11:45:22.585670055 +0100
f9e83b
@@ -1006,7 +1006,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
f9e83b
 # and the system's installed libraries.
f9e83b
 LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \
f9e83b
 	$(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS)
f9e83b
-BACKENDLIBS = $(ISLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
f9e83b
+BACKENDLIBS = $(if $(ISLLIBS),-ldl) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
f9e83b
 	$(ZLIB)
f9e83b
 # Any system libraries needed just for GNAT.
f9e83b
 SYSLIBS = @GNAT_LIBEXC@
f9e83b
@@ -2050,6 +2050,15 @@ $(out_object_file): $(out_file)
f9e83b
 $(common_out_object_file): $(common_out_file)
f9e83b
 	$(COMPILE) $<
f9e83b
 	$(POSTCOMPILE)
f9e83b
+
f9e83b
+graphite%.o : \
f9e83b
+  ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
f9e83b
+graphite.o : \
f9e83b
+  ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
f9e83b
+graphite%.o : \
f9e83b
+  ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS))
f9e83b
+graphite.o : \
f9e83b
+  ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS))
f9e83b
 #
f9e83b
 # Generate header and source files from the machine description,
f9e83b
 # and compile them.
f9e83b
--- gcc/graphite-poly.h.jj	2012-12-13 11:31:27.000000000 +0100
f9e83b
+++ gcc/graphite-poly.h	2012-12-14 13:41:41.970800726 +0100
f9e83b
@@ -22,6 +22,478 @@ along with GCC; see the file COPYING3.
f9e83b
 #ifndef GCC_GRAPHITE_POLY_H
f9e83b
 #define GCC_GRAPHITE_POLY_H
f9e83b
 
f9e83b
+#include <isl/aff.h>
f9e83b
+#include <isl/schedule.h>
f9e83b
+#include <isl/ilp.h>
f9e83b
+#include <isl/flow.h>
f9e83b
+#include <isl/options.h>
f9e83b
+#include <isl/ast.h>
f9e83b
+#include <isl/ast_build.h>
f9e83b
+#include <isl/val_gmp.h>
f9e83b
+#include <dlfcn.h>
f9e83b
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
f9e83b
+#define DYNSYM_ZERO_DISTANCE DYNSYM (isl_band_member_is_coincident)
f9e83b
+#else
f9e83b
+#define DYNSYM_ZERO_DISTANCE DYNSYM (isl_band_member_is_zero_distance)
f9e83b
+#endif
f9e83b
+#define DYNSYMS \
f9e83b
+  DYNSYM (isl_aff_add_coefficient_si); \
f9e83b
+  DYNSYM (isl_aff_free); \
f9e83b
+  DYNSYM (isl_aff_get_space); \
f9e83b
+  DYNSYM (isl_aff_set_coefficient_si); \
f9e83b
+  DYNSYM (isl_aff_set_constant_si); \
f9e83b
+  DYNSYM (isl_aff_zero_on_domain); \
f9e83b
+  DYNSYM (isl_band_free); \
f9e83b
+  DYNSYM (isl_band_get_children); \
f9e83b
+  DYNSYM (isl_band_get_partial_schedule); \
f9e83b
+  DYNSYM (isl_band_has_children); \
f9e83b
+  DYNSYM (isl_band_list_free); \
f9e83b
+  DYNSYM (isl_band_list_get_band); \
f9e83b
+  DYNSYM (isl_band_list_get_ctx); \
f9e83b
+  DYNSYM (isl_band_list_n_band); \
f9e83b
+  DYNSYM_ZERO_DISTANCE; \
f9e83b
+  DYNSYM (isl_band_n_member); \
f9e83b
+  DYNSYM (isl_basic_map_add_constraint); \
f9e83b
+  DYNSYM (isl_basic_map_project_out); \
f9e83b
+  DYNSYM (isl_basic_map_universe); \
f9e83b
+  DYNSYM (isl_constraint_set_coefficient_si); \
f9e83b
+  DYNSYM (isl_constraint_set_constant_si); \
f9e83b
+  DYNSYM (isl_ctx_alloc); \
f9e83b
+  DYNSYM (isl_ctx_free); \
f9e83b
+  DYNSYM (isl_equality_alloc); \
f9e83b
+  DYNSYM (isl_id_alloc); \
f9e83b
+  DYNSYM (isl_id_copy); \
f9e83b
+  DYNSYM (isl_id_free); \
f9e83b
+  DYNSYM (isl_inequality_alloc); \
f9e83b
+  DYNSYM (isl_local_space_copy); \
f9e83b
+  DYNSYM (isl_local_space_free); \
f9e83b
+  DYNSYM (isl_local_space_from_space); \
f9e83b
+  DYNSYM (isl_local_space_range); \
f9e83b
+  DYNSYM (isl_map_add_constraint); \
f9e83b
+  DYNSYM (isl_map_add_dims); \
f9e83b
+  DYNSYM (isl_map_align_params); \
f9e83b
+  DYNSYM (isl_map_apply_range); \
f9e83b
+  DYNSYM (isl_map_copy); \
f9e83b
+  DYNSYM (isl_map_dim); \
f9e83b
+  DYNSYM (isl_map_dump); \
f9e83b
+  DYNSYM (isl_map_equate); \
f9e83b
+  DYNSYM (isl_map_fix_si); \
f9e83b
+  DYNSYM (isl_map_flat_product); \
f9e83b
+  DYNSYM (isl_map_flat_range_product); \
f9e83b
+  DYNSYM (isl_map_free); \
f9e83b
+  DYNSYM (isl_map_from_basic_map); \
f9e83b
+  DYNSYM (isl_map_from_pw_aff); \
f9e83b
+  DYNSYM (isl_map_from_union_map); \
f9e83b
+  DYNSYM (isl_map_get_ctx); \
f9e83b
+  DYNSYM (isl_map_get_space); \
f9e83b
+  DYNSYM (isl_map_get_tuple_id); \
f9e83b
+  DYNSYM (isl_map_insert_dims); \
f9e83b
+  DYNSYM (isl_map_intersect); \
f9e83b
+  DYNSYM (isl_map_intersect_domain); \
f9e83b
+  DYNSYM (isl_map_intersect_range); \
f9e83b
+  DYNSYM (isl_map_is_empty); \
f9e83b
+  DYNSYM (isl_map_lex_ge); \
f9e83b
+  DYNSYM (isl_map_lex_le); \
f9e83b
+  DYNSYM (isl_map_n_out); \
f9e83b
+  DYNSYM (isl_map_range); \
f9e83b
+  DYNSYM (isl_map_set_tuple_id); \
f9e83b
+  DYNSYM (isl_map_universe); \
f9e83b
+  DYNSYM (isl_options_set_on_error); \
f9e83b
+  DYNSYM (isl_options_set_schedule_fuse); \
f9e83b
+  DYNSYM (isl_options_set_schedule_max_constant_term); \
f9e83b
+  DYNSYM (isl_options_set_schedule_maximize_band_depth); \
f9e83b
+  DYNSYM (isl_printer_free); \
f9e83b
+  DYNSYM (isl_printer_print_aff); \
f9e83b
+  DYNSYM (isl_printer_print_constraint); \
f9e83b
+  DYNSYM (isl_printer_print_map); \
f9e83b
+  DYNSYM (isl_printer_print_set); \
f9e83b
+  DYNSYM (isl_printer_to_file); \
f9e83b
+  DYNSYM (isl_pw_aff_add); \
f9e83b
+  DYNSYM (isl_pw_aff_alloc); \
f9e83b
+  DYNSYM (isl_pw_aff_copy); \
f9e83b
+  DYNSYM (isl_pw_aff_eq_set); \
f9e83b
+  DYNSYM (isl_pw_aff_free); \
f9e83b
+  DYNSYM (isl_pw_aff_from_aff); \
f9e83b
+  DYNSYM (isl_pw_aff_ge_set); \
f9e83b
+  DYNSYM (isl_pw_aff_gt_set); \
f9e83b
+  DYNSYM (isl_pw_aff_is_cst); \
f9e83b
+  DYNSYM (isl_pw_aff_le_set); \
f9e83b
+  DYNSYM (isl_pw_aff_lt_set); \
f9e83b
+  DYNSYM (isl_pw_aff_mul); \
f9e83b
+  DYNSYM (isl_pw_aff_ne_set); \
f9e83b
+  DYNSYM (isl_pw_aff_nonneg_set); \
f9e83b
+  DYNSYM (isl_pw_aff_set_tuple_id); \
f9e83b
+  DYNSYM (isl_pw_aff_sub); \
f9e83b
+  DYNSYM (isl_pw_aff_zero_set); \
f9e83b
+  DYNSYM (isl_schedule_free); \
f9e83b
+  DYNSYM (isl_schedule_get_band_forest); \
f9e83b
+  DYNSYM (isl_set_add_constraint); \
f9e83b
+  DYNSYM (isl_set_add_dims); \
f9e83b
+  DYNSYM (isl_set_apply); \
f9e83b
+  DYNSYM (isl_set_coalesce); \
f9e83b
+  DYNSYM (isl_set_copy); \
f9e83b
+  DYNSYM (isl_set_dim); \
f9e83b
+  DYNSYM (isl_set_fix_si); \
f9e83b
+  DYNSYM (isl_set_free); \
f9e83b
+  DYNSYM (isl_set_get_space); \
f9e83b
+  DYNSYM (isl_set_get_tuple_id); \
f9e83b
+  DYNSYM (isl_set_intersect); \
f9e83b
+  DYNSYM (isl_set_is_empty); \
f9e83b
+  DYNSYM (isl_set_n_dim); \
f9e83b
+  DYNSYM (isl_set_nat_universe); \
f9e83b
+  DYNSYM (isl_set_project_out); \
f9e83b
+  DYNSYM (isl_set_set_tuple_id); \
f9e83b
+  DYNSYM (isl_set_universe); \
f9e83b
+  DYNSYM (isl_space_add_dims); \
f9e83b
+  DYNSYM (isl_space_alloc); \
f9e83b
+  DYNSYM (isl_space_copy); \
f9e83b
+  DYNSYM (isl_space_dim); \
f9e83b
+  DYNSYM (isl_space_domain); \
f9e83b
+  DYNSYM (isl_space_find_dim_by_id); \
f9e83b
+  DYNSYM (isl_space_free); \
f9e83b
+  DYNSYM (isl_space_from_domain); \
f9e83b
+  DYNSYM (isl_space_get_tuple_id); \
f9e83b
+  DYNSYM (isl_space_params_alloc); \
f9e83b
+  DYNSYM (isl_space_range); \
f9e83b
+  DYNSYM (isl_space_set_alloc); \
f9e83b
+  DYNSYM (isl_space_set_dim_id); \
f9e83b
+  DYNSYM (isl_space_set_tuple_id); \
f9e83b
+  DYNSYM (isl_union_map_add_map); \
f9e83b
+  DYNSYM (isl_union_map_align_params); \
f9e83b
+  DYNSYM (isl_union_map_apply_domain); \
f9e83b
+  DYNSYM (isl_union_map_apply_range); \
f9e83b
+  DYNSYM (isl_union_map_compute_flow); \
f9e83b
+  DYNSYM (isl_union_map_copy); \
f9e83b
+  DYNSYM (isl_union_map_empty); \
f9e83b
+  DYNSYM (isl_union_map_flat_range_product); \
f9e83b
+  DYNSYM (isl_union_map_foreach_map); \
f9e83b
+  DYNSYM (isl_union_map_free); \
f9e83b
+  DYNSYM (isl_union_map_from_map); \
f9e83b
+  DYNSYM (isl_union_map_get_ctx); \
f9e83b
+  DYNSYM (isl_union_map_get_space); \
f9e83b
+  DYNSYM (isl_union_map_gist_domain); \
f9e83b
+  DYNSYM (isl_union_map_gist_range); \
f9e83b
+  DYNSYM (isl_union_map_intersect_domain); \
f9e83b
+  DYNSYM (isl_union_map_is_empty); \
f9e83b
+  DYNSYM (isl_union_map_subtract); \
f9e83b
+  DYNSYM (isl_union_map_union); \
f9e83b
+  DYNSYM (isl_union_set_add_set); \
f9e83b
+  DYNSYM (isl_union_set_compute_schedule); \
f9e83b
+  DYNSYM (isl_union_set_copy); \
f9e83b
+  DYNSYM (isl_union_set_empty); \
f9e83b
+  DYNSYM (isl_union_set_from_set); \
f9e83b
+  DYNSYM (isl_aff_add_constant_val); \
f9e83b
+  DYNSYM (isl_aff_get_coefficient_val); \
f9e83b
+  DYNSYM (isl_aff_get_ctx); \
f9e83b
+  DYNSYM (isl_aff_mod_val); \
f9e83b
+  DYNSYM (isl_ast_build_ast_from_schedule); \
f9e83b
+  DYNSYM (isl_ast_build_free); \
f9e83b
+  DYNSYM (isl_ast_build_from_context); \
f9e83b
+  DYNSYM (isl_ast_build_get_ctx); \
f9e83b
+  DYNSYM (isl_ast_build_get_schedule); \
f9e83b
+  DYNSYM (isl_ast_build_get_schedule_space); \
f9e83b
+  DYNSYM (isl_ast_build_set_before_each_for); \
f9e83b
+  DYNSYM (isl_ast_build_set_options); \
f9e83b
+  DYNSYM (isl_ast_expr_free); \
f9e83b
+  DYNSYM (isl_ast_expr_from_val); \
f9e83b
+  DYNSYM (isl_ast_expr_get_ctx); \
f9e83b
+  DYNSYM (isl_ast_expr_get_id); \
f9e83b
+  DYNSYM (isl_ast_expr_get_op_arg); \
f9e83b
+  DYNSYM (isl_ast_expr_get_op_n_arg); \
f9e83b
+  DYNSYM (isl_ast_expr_get_op_type); \
f9e83b
+  DYNSYM (isl_ast_expr_get_type); \
f9e83b
+  DYNSYM (isl_ast_expr_get_val); \
f9e83b
+  DYNSYM (isl_ast_expr_sub); \
f9e83b
+  DYNSYM (isl_ast_node_block_get_children); \
f9e83b
+  DYNSYM (isl_ast_node_for_get_body); \
f9e83b
+  DYNSYM (isl_ast_node_for_get_cond); \
f9e83b
+  DYNSYM (isl_ast_node_for_get_inc); \
f9e83b
+  DYNSYM (isl_ast_node_for_get_init); \
f9e83b
+  DYNSYM (isl_ast_node_for_get_iterator); \
f9e83b
+  DYNSYM (isl_ast_node_free); \
f9e83b
+  DYNSYM (isl_ast_node_get_annotation); \
f9e83b
+  DYNSYM (isl_ast_node_get_type); \
f9e83b
+  DYNSYM (isl_ast_node_if_get_cond); \
f9e83b
+  DYNSYM (isl_ast_node_if_get_else); \
f9e83b
+  DYNSYM (isl_ast_node_if_get_then); \
f9e83b
+  DYNSYM (isl_ast_node_list_free); \
f9e83b
+  DYNSYM (isl_ast_node_list_get_ast_node); \
f9e83b
+  DYNSYM (isl_ast_node_list_n_ast_node); \
f9e83b
+  DYNSYM (isl_ast_node_user_get_expr); \
f9e83b
+  DYNSYM (isl_constraint_set_coefficient_val); \
f9e83b
+  DYNSYM (isl_constraint_set_constant_val); \
f9e83b
+  DYNSYM (isl_id_get_user); \
f9e83b
+  DYNSYM (isl_local_space_get_ctx); \
f9e83b
+  DYNSYM (isl_map_fix_val); \
f9e83b
+  DYNSYM (isl_options_set_ast_build_atomic_upper_bound); \
f9e83b
+  DYNSYM (isl_printer_print_ast_node); \
f9e83b
+  DYNSYM (isl_printer_print_str); \
f9e83b
+  DYNSYM (isl_printer_set_output_format); \
f9e83b
+  DYNSYM (isl_pw_aff_mod_val); \
f9e83b
+  DYNSYM (isl_schedule_constraints_compute_schedule); \
f9e83b
+  DYNSYM (isl_schedule_constraints_on_domain); \
f9e83b
+  DYNSYM (isl_schedule_constraints_set_coincidence); \
f9e83b
+  DYNSYM (isl_schedule_constraints_set_proximity); \
f9e83b
+  DYNSYM (isl_schedule_constraints_set_validity); \
f9e83b
+  DYNSYM (isl_set_get_dim_id); \
f9e83b
+  DYNSYM (isl_set_max_val); \
f9e83b
+  DYNSYM (isl_set_min_val); \
f9e83b
+  DYNSYM (isl_set_params); \
f9e83b
+  DYNSYM (isl_space_align_params); \
f9e83b
+  DYNSYM (isl_space_map_from_domain_and_range); \
f9e83b
+  DYNSYM (isl_space_set_tuple_name); \
f9e83b
+  DYNSYM (isl_space_wrap); \
f9e83b
+  DYNSYM (isl_union_map_from_domain_and_range); \
f9e83b
+  DYNSYM (isl_union_map_range); \
f9e83b
+  DYNSYM (isl_union_set_union); \
f9e83b
+  DYNSYM (isl_union_set_universe); \
f9e83b
+  DYNSYM (isl_val_2exp); \
f9e83b
+  DYNSYM (isl_val_add_ui); \
f9e83b
+  DYNSYM (isl_val_copy); \
f9e83b
+  DYNSYM (isl_val_free); \
f9e83b
+  DYNSYM (isl_val_get_num_gmp); \
f9e83b
+  DYNSYM (isl_val_int_from_gmp); \
f9e83b
+  DYNSYM (isl_val_int_from_si); \
f9e83b
+  DYNSYM (isl_val_int_from_ui); \
f9e83b
+  DYNSYM (isl_val_mul); \
f9e83b
+  DYNSYM (isl_val_neg); \
f9e83b
+  DYNSYM (isl_val_sub);
f9e83b
+
f9e83b
+extern struct isl_pointers_s__
f9e83b
+{
f9e83b
+  bool inited;
f9e83b
+  void *h;
f9e83b
+#define DYNSYM(x) __typeof (x) *p_##x
f9e83b
+  DYNSYMS
f9e83b
+#undef DYNSYM
f9e83b
+} isl_pointers__;
f9e83b
+
f9e83b
+#define isl_aff_add_coefficient_si (*isl_pointers__.p_isl_aff_add_coefficient_si)
f9e83b
+#define isl_aff_free (*isl_pointers__.p_isl_aff_free)
f9e83b
+#define isl_aff_get_space (*isl_pointers__.p_isl_aff_get_space)
f9e83b
+#define isl_aff_set_coefficient_si (*isl_pointers__.p_isl_aff_set_coefficient_si)
f9e83b
+#define isl_aff_set_constant_si (*isl_pointers__.p_isl_aff_set_constant_si)
f9e83b
+#define isl_aff_zero_on_domain (*isl_pointers__.p_isl_aff_zero_on_domain)
f9e83b
+#define isl_band_free (*isl_pointers__.p_isl_band_free)
f9e83b
+#define isl_band_get_children (*isl_pointers__.p_isl_band_get_children)
f9e83b
+#define isl_band_get_partial_schedule (*isl_pointers__.p_isl_band_get_partial_schedule)
f9e83b
+#define isl_band_has_children (*isl_pointers__.p_isl_band_has_children)
f9e83b
+#define isl_band_list_free (*isl_pointers__.p_isl_band_list_free)
f9e83b
+#define isl_band_list_get_band (*isl_pointers__.p_isl_band_list_get_band)
f9e83b
+#define isl_band_list_get_ctx (*isl_pointers__.p_isl_band_list_get_ctx)
f9e83b
+#define isl_band_list_n_band (*isl_pointers__.p_isl_band_list_n_band)
f9e83b
+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE
f9e83b
+#define isl_band_member_is_coincident (*isl_pointers__.p_isl_band_member_is_coincident)
f9e83b
+#else
f9e83b
+#define isl_band_member_is_zero_distance (*isl_pointers__.p_isl_band_member_is_zero_distance)
f9e83b
+#endif
f9e83b
+#define isl_band_n_member (*isl_pointers__.p_isl_band_n_member)
f9e83b
+#define isl_basic_map_add_constraint (*isl_pointers__.p_isl_basic_map_add_constraint)
f9e83b
+#define isl_basic_map_project_out (*isl_pointers__.p_isl_basic_map_project_out)
f9e83b
+#define isl_basic_map_universe (*isl_pointers__.p_isl_basic_map_universe)
f9e83b
+#define isl_constraint_set_coefficient_si (*isl_pointers__.p_isl_constraint_set_coefficient_si)
f9e83b
+#define isl_constraint_set_constant_si (*isl_pointers__.p_isl_constraint_set_constant_si)
f9e83b
+#define isl_ctx_alloc (*isl_pointers__.p_isl_ctx_alloc)
f9e83b
+#define isl_ctx_free (*isl_pointers__.p_isl_ctx_free)
f9e83b
+#define isl_equality_alloc (*isl_pointers__.p_isl_equality_alloc)
f9e83b
+#define isl_id_alloc (*isl_pointers__.p_isl_id_alloc)
f9e83b
+#define isl_id_copy (*isl_pointers__.p_isl_id_copy)
f9e83b
+#define isl_id_free (*isl_pointers__.p_isl_id_free)
f9e83b
+#define isl_inequality_alloc (*isl_pointers__.p_isl_inequality_alloc)
f9e83b
+#define isl_local_space_copy (*isl_pointers__.p_isl_local_space_copy)
f9e83b
+#define isl_local_space_free (*isl_pointers__.p_isl_local_space_free)
f9e83b
+#define isl_local_space_from_space (*isl_pointers__.p_isl_local_space_from_space)
f9e83b
+#define isl_local_space_range (*isl_pointers__.p_isl_local_space_range)
f9e83b
+#define isl_map_add_constraint (*isl_pointers__.p_isl_map_add_constraint)
f9e83b
+#define isl_map_add_dims (*isl_pointers__.p_isl_map_add_dims)
f9e83b
+#define isl_map_align_params (*isl_pointers__.p_isl_map_align_params)
f9e83b
+#define isl_map_apply_range (*isl_pointers__.p_isl_map_apply_range)
f9e83b
+#define isl_map_copy (*isl_pointers__.p_isl_map_copy)
f9e83b
+#define isl_map_dim (*isl_pointers__.p_isl_map_dim)
f9e83b
+#define isl_map_dump (*isl_pointers__.p_isl_map_dump)
f9e83b
+#define isl_map_equate (*isl_pointers__.p_isl_map_equate)
f9e83b
+#define isl_map_fix_si (*isl_pointers__.p_isl_map_fix_si)
f9e83b
+#define isl_map_flat_product (*isl_pointers__.p_isl_map_flat_product)
f9e83b
+#define isl_map_flat_range_product (*isl_pointers__.p_isl_map_flat_range_product)
f9e83b
+#define isl_map_free (*isl_pointers__.p_isl_map_free)
f9e83b
+#define isl_map_from_basic_map (*isl_pointers__.p_isl_map_from_basic_map)
f9e83b
+#define isl_map_from_pw_aff (*isl_pointers__.p_isl_map_from_pw_aff)
f9e83b
+#define isl_map_from_union_map (*isl_pointers__.p_isl_map_from_union_map)
f9e83b
+#define isl_map_get_ctx (*isl_pointers__.p_isl_map_get_ctx)
f9e83b
+#define isl_map_get_space (*isl_pointers__.p_isl_map_get_space)
f9e83b
+#define isl_map_get_tuple_id (*isl_pointers__.p_isl_map_get_tuple_id)
f9e83b
+#define isl_map_insert_dims (*isl_pointers__.p_isl_map_insert_dims)
f9e83b
+#define isl_map_intersect (*isl_pointers__.p_isl_map_intersect)
f9e83b
+#define isl_map_intersect_domain (*isl_pointers__.p_isl_map_intersect_domain)
f9e83b
+#define isl_map_intersect_range (*isl_pointers__.p_isl_map_intersect_range)
f9e83b
+#define isl_map_is_empty (*isl_pointers__.p_isl_map_is_empty)
f9e83b
+#define isl_map_lex_ge (*isl_pointers__.p_isl_map_lex_ge)
f9e83b
+#define isl_map_lex_le (*isl_pointers__.p_isl_map_lex_le)
f9e83b
+#define isl_map_n_out (*isl_pointers__.p_isl_map_n_out)
f9e83b
+#define isl_map_range (*isl_pointers__.p_isl_map_range)
f9e83b
+#define isl_map_set_tuple_id (*isl_pointers__.p_isl_map_set_tuple_id)
f9e83b
+#define isl_map_universe (*isl_pointers__.p_isl_map_universe)
f9e83b
+#define isl_options_set_on_error (*isl_pointers__.p_isl_options_set_on_error)
f9e83b
+#define isl_options_set_schedule_fuse (*isl_pointers__.p_isl_options_set_schedule_fuse)
f9e83b
+#define isl_options_set_schedule_max_constant_term (*isl_pointers__.p_isl_options_set_schedule_max_constant_term)
f9e83b
+#define isl_options_set_schedule_maximize_band_depth (*isl_pointers__.p_isl_options_set_schedule_maximize_band_depth)
f9e83b
+#define isl_printer_free (*isl_pointers__.p_isl_printer_free)
f9e83b
+#define isl_printer_print_aff (*isl_pointers__.p_isl_printer_print_aff)
f9e83b
+#define isl_printer_print_constraint (*isl_pointers__.p_isl_printer_print_constraint)
f9e83b
+#define isl_printer_print_map (*isl_pointers__.p_isl_printer_print_map)
f9e83b
+#define isl_printer_print_set (*isl_pointers__.p_isl_printer_print_set)
f9e83b
+#define isl_printer_to_file (*isl_pointers__.p_isl_printer_to_file)
f9e83b
+#define isl_pw_aff_add (*isl_pointers__.p_isl_pw_aff_add)
f9e83b
+#define isl_pw_aff_alloc (*isl_pointers__.p_isl_pw_aff_alloc)
f9e83b
+#define isl_pw_aff_copy (*isl_pointers__.p_isl_pw_aff_copy)
f9e83b
+#define isl_pw_aff_eq_set (*isl_pointers__.p_isl_pw_aff_eq_set)
f9e83b
+#define isl_pw_aff_free (*isl_pointers__.p_isl_pw_aff_free)
f9e83b
+#define isl_pw_aff_from_aff (*isl_pointers__.p_isl_pw_aff_from_aff)
f9e83b
+#define isl_pw_aff_ge_set (*isl_pointers__.p_isl_pw_aff_ge_set)
f9e83b
+#define isl_pw_aff_gt_set (*isl_pointers__.p_isl_pw_aff_gt_set)
f9e83b
+#define isl_pw_aff_is_cst (*isl_pointers__.p_isl_pw_aff_is_cst)
f9e83b
+#define isl_pw_aff_le_set (*isl_pointers__.p_isl_pw_aff_le_set)
f9e83b
+#define isl_pw_aff_lt_set (*isl_pointers__.p_isl_pw_aff_lt_set)
f9e83b
+#define isl_pw_aff_mul (*isl_pointers__.p_isl_pw_aff_mul)
f9e83b
+#define isl_pw_aff_ne_set (*isl_pointers__.p_isl_pw_aff_ne_set)
f9e83b
+#define isl_pw_aff_nonneg_set (*isl_pointers__.p_isl_pw_aff_nonneg_set)
f9e83b
+#define isl_pw_aff_set_tuple_id (*isl_pointers__.p_isl_pw_aff_set_tuple_id)
f9e83b
+#define isl_pw_aff_sub (*isl_pointers__.p_isl_pw_aff_sub)
f9e83b
+#define isl_pw_aff_zero_set (*isl_pointers__.p_isl_pw_aff_zero_set)
f9e83b
+#define isl_schedule_free (*isl_pointers__.p_isl_schedule_free)
f9e83b
+#define isl_schedule_get_band_forest (*isl_pointers__.p_isl_schedule_get_band_forest)
f9e83b
+#define isl_set_add_constraint (*isl_pointers__.p_isl_set_add_constraint)
f9e83b
+#define isl_set_add_dims (*isl_pointers__.p_isl_set_add_dims)
f9e83b
+#define isl_set_apply (*isl_pointers__.p_isl_set_apply)
f9e83b
+#define isl_set_coalesce (*isl_pointers__.p_isl_set_coalesce)
f9e83b
+#define isl_set_copy (*isl_pointers__.p_isl_set_copy)
f9e83b
+#define isl_set_dim (*isl_pointers__.p_isl_set_dim)
f9e83b
+#define isl_set_fix_si (*isl_pointers__.p_isl_set_fix_si)
f9e83b
+#define isl_set_free (*isl_pointers__.p_isl_set_free)
f9e83b
+#define isl_set_get_space (*isl_pointers__.p_isl_set_get_space)
f9e83b
+#define isl_set_get_tuple_id (*isl_pointers__.p_isl_set_get_tuple_id)
f9e83b
+#define isl_set_intersect (*isl_pointers__.p_isl_set_intersect)
f9e83b
+#define isl_set_is_empty (*isl_pointers__.p_isl_set_is_empty)
f9e83b
+#define isl_set_n_dim (*isl_pointers__.p_isl_set_n_dim)
f9e83b
+#define isl_set_nat_universe (*isl_pointers__.p_isl_set_nat_universe)
f9e83b
+#define isl_set_project_out (*isl_pointers__.p_isl_set_project_out)
f9e83b
+#define isl_set_set_tuple_id (*isl_pointers__.p_isl_set_set_tuple_id)
f9e83b
+#define isl_set_universe (*isl_pointers__.p_isl_set_universe)
f9e83b
+#define isl_space_add_dims (*isl_pointers__.p_isl_space_add_dims)
f9e83b
+#define isl_space_alloc (*isl_pointers__.p_isl_space_alloc)
f9e83b
+#define isl_space_copy (*isl_pointers__.p_isl_space_copy)
f9e83b
+#define isl_space_dim (*isl_pointers__.p_isl_space_dim)
f9e83b
+#define isl_space_domain (*isl_pointers__.p_isl_space_domain)
f9e83b
+#define isl_space_find_dim_by_id (*isl_pointers__.p_isl_space_find_dim_by_id)
f9e83b
+#define isl_space_free (*isl_pointers__.p_isl_space_free)
f9e83b
+#define isl_space_from_domain (*isl_pointers__.p_isl_space_from_domain)
f9e83b
+#define isl_space_get_tuple_id (*isl_pointers__.p_isl_space_get_tuple_id)
f9e83b
+#define isl_space_params_alloc (*isl_pointers__.p_isl_space_params_alloc)
f9e83b
+#define isl_space_range (*isl_pointers__.p_isl_space_range)
f9e83b
+#define isl_space_set_alloc (*isl_pointers__.p_isl_space_set_alloc)
f9e83b
+#define isl_space_set_dim_id (*isl_pointers__.p_isl_space_set_dim_id)
f9e83b
+#define isl_space_set_tuple_id (*isl_pointers__.p_isl_space_set_tuple_id)
f9e83b
+#define isl_union_map_add_map (*isl_pointers__.p_isl_union_map_add_map)
f9e83b
+#define isl_union_map_align_params (*isl_pointers__.p_isl_union_map_align_params)
f9e83b
+#define isl_union_map_apply_domain (*isl_pointers__.p_isl_union_map_apply_domain)
f9e83b
+#define isl_union_map_apply_range (*isl_pointers__.p_isl_union_map_apply_range)
f9e83b
+#define isl_union_map_compute_flow (*isl_pointers__.p_isl_union_map_compute_flow)
f9e83b
+#define isl_union_map_copy (*isl_pointers__.p_isl_union_map_copy)
f9e83b
+#define isl_union_map_empty (*isl_pointers__.p_isl_union_map_empty)
f9e83b
+#define isl_union_map_flat_range_product (*isl_pointers__.p_isl_union_map_flat_range_product)
f9e83b
+#define isl_union_map_foreach_map (*isl_pointers__.p_isl_union_map_foreach_map)
f9e83b
+#define isl_union_map_free (*isl_pointers__.p_isl_union_map_free)
f9e83b
+#define isl_union_map_from_map (*isl_pointers__.p_isl_union_map_from_map)
f9e83b
+#define isl_union_map_get_ctx (*isl_pointers__.p_isl_union_map_get_ctx)
f9e83b
+#define isl_union_map_get_space (*isl_pointers__.p_isl_union_map_get_space)
f9e83b
+#define isl_union_map_gist_domain (*isl_pointers__.p_isl_union_map_gist_domain)
f9e83b
+#define isl_union_map_gist_range (*isl_pointers__.p_isl_union_map_gist_range)
f9e83b
+#define isl_union_map_intersect_domain (*isl_pointers__.p_isl_union_map_intersect_domain)
f9e83b
+#define isl_union_map_is_empty (*isl_pointers__.p_isl_union_map_is_empty)
f9e83b
+#define isl_union_map_subtract (*isl_pointers__.p_isl_union_map_subtract)
f9e83b
+#define isl_union_map_union (*isl_pointers__.p_isl_union_map_union)
f9e83b
+#define isl_union_set_add_set (*isl_pointers__.p_isl_union_set_add_set)
f9e83b
+#define isl_union_set_compute_schedule (*isl_pointers__.p_isl_union_set_compute_schedule)
f9e83b
+#define isl_union_set_copy (*isl_pointers__.p_isl_union_set_copy)
f9e83b
+#define isl_union_set_empty (*isl_pointers__.p_isl_union_set_empty)
f9e83b
+#define isl_union_set_from_set (*isl_pointers__.p_isl_union_set_from_set)
f9e83b
+#define isl_aff_add_constant_val (*isl_pointers__.p_isl_aff_add_constant_val)
f9e83b
+#define isl_aff_get_coefficient_val (*isl_pointers__.p_isl_aff_get_coefficient_val)
f9e83b
+#define isl_aff_get_ctx (*isl_pointers__.p_isl_aff_get_ctx)
f9e83b
+#define isl_aff_mod_val (*isl_pointers__.p_isl_aff_mod_val)
f9e83b
+#define isl_ast_build_ast_from_schedule (*isl_pointers__.p_isl_ast_build_ast_from_schedule)
f9e83b
+#define isl_ast_build_free (*isl_pointers__.p_isl_ast_build_free)
f9e83b
+#define isl_ast_build_from_context (*isl_pointers__.p_isl_ast_build_from_context)
f9e83b
+#define isl_ast_build_get_ctx (*isl_pointers__.p_isl_ast_build_get_ctx)
f9e83b
+#define isl_ast_build_get_schedule (*isl_pointers__.p_isl_ast_build_get_schedule)
f9e83b
+#define isl_ast_build_get_schedule_space (*isl_pointers__.p_isl_ast_build_get_schedule_space)
f9e83b
+#define isl_ast_build_set_before_each_for (*isl_pointers__.p_isl_ast_build_set_before_each_for)
f9e83b
+#define isl_ast_build_set_options (*isl_pointers__.p_isl_ast_build_set_options)
f9e83b
+#define isl_ast_expr_free (*isl_pointers__.p_isl_ast_expr_free)
f9e83b
+#define isl_ast_expr_from_val (*isl_pointers__.p_isl_ast_expr_from_val)
f9e83b
+#define isl_ast_expr_get_ctx (*isl_pointers__.p_isl_ast_expr_get_ctx)
f9e83b
+#define isl_ast_expr_get_id (*isl_pointers__.p_isl_ast_expr_get_id)
f9e83b
+#define isl_ast_expr_get_op_arg (*isl_pointers__.p_isl_ast_expr_get_op_arg)
f9e83b
+#define isl_ast_expr_get_op_n_arg (*isl_pointers__.p_isl_ast_expr_get_op_n_arg)
f9e83b
+#define isl_ast_expr_get_op_type (*isl_pointers__.p_isl_ast_expr_get_op_type)
f9e83b
+#define isl_ast_expr_get_type (*isl_pointers__.p_isl_ast_expr_get_type)
f9e83b
+#define isl_ast_expr_get_val (*isl_pointers__.p_isl_ast_expr_get_val)
f9e83b
+#define isl_ast_expr_sub (*isl_pointers__.p_isl_ast_expr_sub)
f9e83b
+#define isl_ast_node_block_get_children (*isl_pointers__.p_isl_ast_node_block_get_children)
f9e83b
+#define isl_ast_node_for_get_body (*isl_pointers__.p_isl_ast_node_for_get_body)
f9e83b
+#define isl_ast_node_for_get_cond (*isl_pointers__.p_isl_ast_node_for_get_cond)
f9e83b
+#define isl_ast_node_for_get_inc (*isl_pointers__.p_isl_ast_node_for_get_inc)
f9e83b
+#define isl_ast_node_for_get_init (*isl_pointers__.p_isl_ast_node_for_get_init)
f9e83b
+#define isl_ast_node_for_get_iterator (*isl_pointers__.p_isl_ast_node_for_get_iterator)
f9e83b
+#define isl_ast_node_free (*isl_pointers__.p_isl_ast_node_free)
f9e83b
+#define isl_ast_node_get_annotation (*isl_pointers__.p_isl_ast_node_get_annotation)
f9e83b
+#define isl_ast_node_get_type (*isl_pointers__.p_isl_ast_node_get_type)
f9e83b
+#define isl_ast_node_if_get_cond (*isl_pointers__.p_isl_ast_node_if_get_cond)
f9e83b
+#define isl_ast_node_if_get_else (*isl_pointers__.p_isl_ast_node_if_get_else)
f9e83b
+#define isl_ast_node_if_get_then (*isl_pointers__.p_isl_ast_node_if_get_then)
f9e83b
+#define isl_ast_node_list_free (*isl_pointers__.p_isl_ast_node_list_free)
f9e83b
+#define isl_ast_node_list_get_ast_node (*isl_pointers__.p_isl_ast_node_list_get_ast_node)
f9e83b
+#define isl_ast_node_list_n_ast_node (*isl_pointers__.p_isl_ast_node_list_n_ast_node)
f9e83b
+#define isl_ast_node_user_get_expr (*isl_pointers__.p_isl_ast_node_user_get_expr)
f9e83b
+#define isl_constraint_set_coefficient_val (*isl_pointers__.p_isl_constraint_set_coefficient_val)
f9e83b
+#define isl_constraint_set_constant_val (*isl_pointers__.p_isl_constraint_set_constant_val)
f9e83b
+#define isl_id_get_user (*isl_pointers__.p_isl_id_get_user)
f9e83b
+#define isl_local_space_get_ctx (*isl_pointers__.p_isl_local_space_get_ctx)
f9e83b
+#define isl_map_fix_val (*isl_pointers__.p_isl_map_fix_val)
f9e83b
+#define isl_options_set_ast_build_atomic_upper_bound (*isl_pointers__.p_isl_options_set_ast_build_atomic_upper_bound)
f9e83b
+#define isl_printer_print_ast_node (*isl_pointers__.p_isl_printer_print_ast_node)
f9e83b
+#define isl_printer_print_str (*isl_pointers__.p_isl_printer_print_str)
f9e83b
+#define isl_printer_set_output_format (*isl_pointers__.p_isl_printer_set_output_format)
f9e83b
+#define isl_pw_aff_mod_val (*isl_pointers__.p_isl_pw_aff_mod_val)
f9e83b
+#define isl_schedule_constraints_compute_schedule (*isl_pointers__.p_isl_schedule_constraints_compute_schedule)
f9e83b
+#define isl_schedule_constraints_on_domain (*isl_pointers__.p_isl_schedule_constraints_on_domain)
f9e83b
+#define isl_schedule_constraints_set_coincidence (*isl_pointers__.p_isl_schedule_constraints_set_coincidence)
f9e83b
+#define isl_schedule_constraints_set_proximity (*isl_pointers__.p_isl_schedule_constraints_set_proximity)
f9e83b
+#define isl_schedule_constraints_set_validity (*isl_pointers__.p_isl_schedule_constraints_set_validity)
f9e83b
+#define isl_set_get_dim_id (*isl_pointers__.p_isl_set_get_dim_id)
f9e83b
+#define isl_set_max_val (*isl_pointers__.p_isl_set_max_val)
f9e83b
+#define isl_set_min_val (*isl_pointers__.p_isl_set_min_val)
f9e83b
+#define isl_set_params (*isl_pointers__.p_isl_set_params)
f9e83b
+#define isl_space_align_params (*isl_pointers__.p_isl_space_align_params)
f9e83b
+#define isl_space_map_from_domain_and_range (*isl_pointers__.p_isl_space_map_from_domain_and_range)
f9e83b
+#define isl_space_set_tuple_name (*isl_pointers__.p_isl_space_set_tuple_name)
f9e83b
+#define isl_space_wrap (*isl_pointers__.p_isl_space_wrap)
f9e83b
+#define isl_union_map_from_domain_and_range (*isl_pointers__.p_isl_union_map_from_domain_and_range)
f9e83b
+#define isl_union_map_range (*isl_pointers__.p_isl_union_map_range)
f9e83b
+#define isl_union_set_union (*isl_pointers__.p_isl_union_set_union)
f9e83b
+#define isl_union_set_universe (*isl_pointers__.p_isl_union_set_universe)
f9e83b
+#define isl_val_2exp (*isl_pointers__.p_isl_val_2exp)
f9e83b
+#define isl_val_add_ui (*isl_pointers__.p_isl_val_add_ui)
f9e83b
+#define isl_val_copy (*isl_pointers__.p_isl_val_copy)
f9e83b
+#define isl_val_free (*isl_pointers__.p_isl_val_free)
f9e83b
+#define isl_val_get_num_gmp (*isl_pointers__.p_isl_val_get_num_gmp)
f9e83b
+#define isl_val_int_from_gmp (*isl_pointers__.p_isl_val_int_from_gmp)
f9e83b
+#define isl_val_int_from_si (*isl_pointers__.p_isl_val_int_from_si)
f9e83b
+#define isl_val_int_from_ui (*isl_pointers__.p_isl_val_int_from_ui)
f9e83b
+#define isl_val_mul (*isl_pointers__.p_isl_val_mul)
f9e83b
+#define isl_val_neg (*isl_pointers__.p_isl_val_neg)
f9e83b
+#define isl_val_sub (*isl_pointers__.p_isl_val_sub)
f9e83b
+
f9e83b
 typedef struct poly_dr *poly_dr_p;
f9e83b
 
f9e83b
 typedef struct poly_bb *poly_bb_p;
f9e83b
--- gcc/graphite.c.jj	2012-12-13 11:31:00.000000000 +0100
f9e83b
+++ gcc/graphite.c	2012-12-14 13:40:44.155136961 +0100
f9e83b
@@ -90,6 +90,34 @@ along with GCC; see the file COPYING3.
f9e83b
 #include "graphite-isl-ast-to-gimple.h"
f9e83b
 #include "graphite-sese-to-poly.h"
f9e83b
 
f9e83b
+__typeof (isl_pointers__) isl_pointers__;
f9e83b
+
f9e83b
+static bool
f9e83b
+init_isl_pointers (void)
f9e83b
+{
f9e83b
+  void *h;
f9e83b
+
f9e83b
+  if (isl_pointers__.inited)
f9e83b
+    return isl_pointers__.h != NULL;
f9e83b
+  h = dlopen ("libisl.so.13", RTLD_LAZY);
f9e83b
+  isl_pointers__.h = h;
f9e83b
+  if (h == NULL)
f9e83b
+    return false;
f9e83b
+#define DYNSYM(x) \
f9e83b
+  do \
f9e83b
+    { \
f9e83b
+      union { __typeof (isl_pointers__.p_##x) p; void *q; } u; \
f9e83b
+      u.q = dlsym (h, #x); \
f9e83b
+      if (u.q == NULL) \
f9e83b
+	return false; \
f9e83b
+      isl_pointers__.p_##x = u.p; \
f9e83b
+    } \
f9e83b
+  while (0)
f9e83b
+  DYNSYMS
f9e83b
+#undef DYNSYM
f9e83b
+  return true;
f9e83b
+}
f9e83b
+
f9e83b
 /* Print global statistics to FILE.  */
f9e83b
 
f9e83b
 static void
f9e83b
@@ -285,6 +313,15 @@ graphite_transform_loops (void)
f9e83b
   if (parallelized_function_p (cfun->decl))
f9e83b
     return;
f9e83b
 
f9e83b
+  if (number_of_loops (cfun) <= 1)
f9e83b
+    return;
f9e83b
+
f9e83b
+  if (!init_isl_pointers ())
f9e83b
+    {
f9e83b
+      sorry ("Graphite loop optimizations cannot be used");
f9e83b
+      return;
f9e83b
+    }
f9e83b
+
f9e83b
   ctx = isl_ctx_alloc ();
f9e83b
   isl_options_set_on_error (ctx, ISL_ON_ERROR_ABORT);
f9e83b
   if (!graphite_initialize (ctx))