From: spop Date: Wed, 31 Mar 2010 18:36:54 +0000 (+0000) Subject: Make print_scop output the scoplib format. X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=842f5bde1d88601024eb77da10af6c62cbc2e71b Make print_scop output the scoplib format. 2010-03-16 Sebastian Pop * graphite-poly.c (print_scattering_function): Pretty print following the scoplib format. (print_pdr): Same. (print_pbb_domain): Same. (dump_gbb_cases): Same. (dump_gbb_conditions): Same. (print_pdrs): Same. (print_pbb): Same. (print_scop_params): Same. (print_scop_context): Same. (print_scop): Same. (print_pbb_body): New. (lst_indent_to): New. (print_lst): Start new lines with a #. * graphite-poly.h (pbb_bb): New. (pbb_index): Use pbb_bb. * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of disjuncts. * tree-data-ref.c (dump_data_reference): Start new lines with a #. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157883 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite index 1475ef6979b..fc7e16f36be 100644 --- a/gcc/ChangeLog.graphite +++ b/gcc/ChangeLog.graphite @@ -1,3 +1,25 @@ +2010-03-16 Sebastian Pop + + * graphite-poly.c (print_scattering_function): Pretty print following + the scoplib format. + (print_pdr): Same. + (print_pbb_domain): Same. + (dump_gbb_cases): Same. + (dump_gbb_conditions): Same. + (print_pdrs): Same. + (print_pbb): Same. + (print_scop_params): Same. + (print_scop_context): Same. + (print_scop): Same. + (print_pbb_body): New. + (lst_indent_to): New. + (print_lst): Start new lines with a #. + * graphite-poly.h (pbb_bb): New. + (pbb_index): Use pbb_bb. + * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of + disjuncts. + * tree-data-ref.c (dump_data_reference): Start new lines with a #. + 2010-03-13 Sebastian Pop PR middle-end/43351 diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c index 64222809ca2..e8ab3218c39 100644 --- a/gcc/graphite-poly.c +++ b/gcc/graphite-poly.c @@ -1,5 +1,5 @@ /* Graphite polyhedral representation. - Copyright (C) 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2009 Free Software Foundation, Inc. Contributed by Sebastian Pop and Tobias Grosser . @@ -28,8 +28,6 @@ along with GCC; see the file COPYING3. If not see #include "output.h" #include "basic-block.h" #include "diagnostic.h" -#include "tree-pretty-print.h" -#include "gimple-pretty-print.h" #include "tree-flow.h" #include "toplev.h" #include "tree-dump.h" @@ -82,11 +80,11 @@ extend_scattering (poly_bb_p pbb, int max_scattering) ppl_dimension_type nb_old_dims, nb_new_dims; int nb_added_dims, i; ppl_Coefficient_t coef; - mpz_t one; + Value one; nb_added_dims = max_scattering - pbb_nb_scattering_transform (pbb); - mpz_init (one); - mpz_set_si (one, 1); + value_init (one); + value_set_si (one, 1); ppl_new_Coefficient (&coef); ppl_assign_Coefficient_from_mpz_t (coef, one); @@ -115,7 +113,7 @@ extend_scattering (poly_bb_p pbb, int max_scattering) } ppl_delete_Coefficient (coef); - mpz_clear (one); + value_clear (one); } /* All scattering matrices in SCOP will have the same number of scattering @@ -137,33 +135,41 @@ unify_scattering_dimensions (scop_p scop) return max_scattering; } -/* Prints to FILE the scattering function of PBB, at some VERBOSITY - level. */ +/* Prints to FILE the scattering function of PBB. */ -static void -print_scattering_function_1 (FILE *file, poly_bb_p pbb, int verbosity) +void +print_scattering_function (FILE *file, poly_bb_p pbb) { graphite_dim_t i; - if (verbosity > 0) + if (!PBB_TRANSFORMED (pbb)) + return; + + if (PBB_TRANSFORMED_SCATTERING (pbb) + || PBB_ORIGINAL_SCATTERING (pbb)) + fprintf (file, "# Scattering function is provided\n1\n"); + else { - fprintf (file, "# scattering bb_%d (\n", pbb_index (pbb)); - fprintf (file, "# eq"); + fprintf (file, "# Scattering function is not provided\n0\n"); + return; + } - for (i = 0; i < pbb_nb_scattering_transform (pbb); i++) - fprintf (file, " s%d", (int) i); + fprintf (file, "# scattering bb_%d (\n", pbb_index (pbb)); + fprintf (file, "# eq"); - for (i = 0; i < pbb_nb_local_vars (pbb); i++) - fprintf (file, " lv%d", (int) i); + for (i = 0; i < pbb_nb_scattering_transform (pbb); i++) + fprintf (file, " s%d", (int) i); - for (i = 0; i < pbb_dim_iter_domain (pbb); i++) - fprintf (file, " i%d", (int) i); + for (i = 0; i < pbb_nb_local_vars (pbb); i++) + fprintf (file, " lv%d", (int) i); - for (i = 0; i < pbb_nb_params (pbb); i++) - fprintf (file, " p%d", (int) i); + for (i = 0; i < pbb_dim_iter_domain (pbb); i++) + fprintf (file, " i%d", (int) i); - fprintf (file, " cst\n"); - } + for (i = 0; i < pbb_nb_params (pbb); i++) + fprintf (file, " p%d", (int) i); + + fprintf (file, " cst\n"); /* Number of disjunct components. Remove this when PBB_TRANSFORMED_SCATTERING will be a pointset_powerset. */ @@ -172,110 +178,73 @@ print_scattering_function_1 (FILE *file, poly_bb_p pbb, int verbosity) ? PBB_TRANSFORMED_SCATTERING (pbb) : PBB_ORIGINAL_SCATTERING (pbb)); - if (verbosity > 0) - fprintf (file, "#)\n"); -} - -/* Prints to FILE the scattering function of PBB, at some VERBOSITY - level. */ - -void -print_scattering_function (FILE *file, poly_bb_p pbb, int verbosity) -{ - if (!PBB_TRANSFORMED (pbb)) - return; - - if (PBB_TRANSFORMED_SCATTERING (pbb) - || PBB_ORIGINAL_SCATTERING (pbb)) - { - if (verbosity > 0) - fprintf (file, "# Scattering function is provided\n"); - - fprintf (file, "1\n"); - } - else - { - if (verbosity > 0) - fprintf (file, "# Scattering function is not provided\n"); - - fprintf (file, "0\n"); - return; - } - - print_scattering_function_1 (file, pbb, verbosity); + fprintf (file, "#)\n"); } -/* Prints to FILE the iteration domain of PBB, at some VERBOSITY - level. */ +/* Prints to FILE the iteration domain of PBB. */ void -print_iteration_domain (FILE *file, poly_bb_p pbb, int verbosity) +print_iteration_domain (FILE *file, poly_bb_p pbb) { - print_pbb_domain (file, pbb, verbosity); + print_pbb_domain (file, pbb); } /* Prints to FILE the scattering functions of every PBB of SCOP. */ void -print_scattering_functions (FILE *file, scop_p scop, int verbosity) +print_scattering_functions (FILE *file, scop_p scop) { int i; poly_bb_p pbb; for (i = 0; VEC_iterate (poly_bb_p, SCOP_BBS (scop), i, pbb); i++) - print_scattering_function (file, pbb, verbosity); + print_scattering_function (file, pbb); } -/* Prints to FILE the iteration domains of every PBB of SCOP, at some - VERBOSITY level. */ +/* Prints to FILE the iteration domains of every PBB of SCOP. */ void -print_iteration_domains (FILE *file, scop_p scop, int verbosity) +print_iteration_domains (FILE *file, scop_p scop) { int i; poly_bb_p pbb; for (i = 0; VEC_iterate (poly_bb_p, SCOP_BBS (scop), i, pbb); i++) - print_iteration_domain (file, pbb, verbosity); + print_iteration_domain (file, pbb); } -/* Prints to STDERR the scattering function of PBB, at some VERBOSITY - level. */ +/* Prints to STDERR the scattering function of PBB. */ void -debug_scattering_function (poly_bb_p pbb, int verbosity) +debug_scattering_function (poly_bb_p pbb) { - print_scattering_function (stderr, pbb, verbosity); + print_scattering_function (stderr, pbb); } -/* Prints to STDERR the iteration domain of PBB, at some VERBOSITY - level. */ +/* Prints to STDERR the iteration domain of PBB. */ void -debug_iteration_domain (poly_bb_p pbb, int verbosity) +debug_iteration_domain (poly_bb_p pbb) { - print_iteration_domain (stderr, pbb, verbosity); + print_iteration_domain (stderr, pbb); } -/* Prints to STDERR the scattering functions of every PBB of SCOP, at - some VERBOSITY level. */ +/* Prints to STDERR the scattering functions of every PBB of SCOP. */ void -debug_scattering_functions (scop_p scop, int verbosity) +debug_scattering_functions (scop_p scop) { - print_scattering_functions (stderr, scop, verbosity); + print_scattering_functions (stderr, scop); } -/* Prints to STDERR the iteration domains of every PBB of SCOP, at - some VERBOSITY level. */ +/* Prints to STDERR the iteration domains of every PBB of SCOP. */ void -debug_iteration_domains (scop_p scop, int verbosity) +debug_iteration_domains (scop_p scop) { - print_iteration_domains (stderr, scop, verbosity); + print_iteration_domains (stderr, scop); } - /* Apply graphite transformations to all the basic blocks of SCOP. */ bool @@ -451,59 +420,47 @@ print_pdr_access_layout (FILE *file, poly_dr_p pdr) fprintf (file, " cst\n"); } -/* Prints to FILE the polyhedral data reference PDR, at some VERBOSITY - level. */ +/* Prints to FILE the polyhedral data reference PDR. */ void -print_pdr (FILE *file, poly_dr_p pdr, int verbosity) +print_pdr (FILE *file, poly_dr_p pdr) { - if (verbosity > 1) - { - fprintf (file, "# pdr_%d (", PDR_ID (pdr)); + fprintf (file, "# pdr_%d (", PDR_ID (pdr)); - switch (PDR_TYPE (pdr)) - { - case PDR_READ: - fprintf (file, "read \n"); - break; - - case PDR_WRITE: - fprintf (file, "write \n"); - break; + switch (PDR_TYPE (pdr)) + { + case PDR_READ: + fprintf (file, "read \n"); + break; - case PDR_MAY_WRITE: - fprintf (file, "may_write \n"); - break; + case PDR_WRITE: + fprintf (file, "write \n"); + break; - default: - gcc_unreachable (); - } + case PDR_MAY_WRITE: + fprintf (file, "may_write \n"); + break; - dump_data_reference (file, (data_reference_p) PDR_CDR (pdr)); + default: + gcc_unreachable (); } - if (verbosity > 0) - { - fprintf (file, "# data accesses (\n"); - print_pdr_access_layout (file, pdr); - } + dump_data_reference (file, (data_reference_p) PDR_CDR (pdr)); + fprintf (file, "# data accesses (\n"); + print_pdr_access_layout (file, pdr); ppl_print_powerset_matrix (file, PDR_ACCESSES (pdr)); + fprintf (file, "#)\n"); - if (verbosity > 0) - fprintf (file, "#)\n"); - - if (verbosity > 1) - fprintf (file, "#)\n"); + fprintf (file, "#)\n"); } -/* Prints to STDERR the polyhedral data reference PDR, at some - VERBOSITY level. */ +/* Prints to STDERR the polyhedral data reference PDR. */ void -debug_pdr (poly_dr_p pdr, int verbosity) +debug_pdr (poly_dr_p pdr) { - print_pdr (stderr, pdr, verbosity); + print_pdr (stderr, pdr); } /* Creates a new SCOP containing REGION. */ @@ -549,10 +506,10 @@ free_scop (scop_p scop) XDELETE (scop); } -/* Print to FILE the domain of PBB, at some VERBOSITY level. */ +/* Print to FILE the domain of PBB. */ void -print_pbb_domain (FILE *file, poly_bb_p pbb, int verbosity) +print_pbb_domain (FILE *file, poly_bb_p pbb) { graphite_dim_t i; gimple_bb_p gbb = PBB_BLACK_BOX (pbb); @@ -560,27 +517,23 @@ print_pbb_domain (FILE *file, poly_bb_p pbb, int verbosity) if (!PBB_DOMAIN (pbb)) return; - if (verbosity > 0) - { - fprintf (file, "# Iteration domain of bb_%d (\n", GBB_BB (gbb)->index); - fprintf (file, "# eq"); + fprintf (file, "# Iteration domain of bb_%d (\n", GBB_BB (gbb)->index); + fprintf (file, "# eq"); - for (i = 0; i < pbb_dim_iter_domain (pbb); i++) - fprintf (file, " i%d", (int) i); + for (i = 0; i < pbb_dim_iter_domain (pbb); i++) + fprintf (file, " i%d", (int) i); - for (i = 0; i < pbb_nb_params (pbb); i++) - fprintf (file, " p%d", (int) i); + for (i = 0; i < pbb_nb_params (pbb); i++) + fprintf (file, " p%d", (int) i); - fprintf (file, " cst\n"); - } + fprintf (file, " cst\n"); if (PBB_DOMAIN (pbb)) ppl_print_powerset_matrix (file, PBB_DOMAIN (pbb)); else fprintf (file, "0\n"); - if (verbosity > 0) - fprintf (file, "#)\n"); + fprintf (file, "#)\n"); } /* Dump the cases of a graphite basic block GBB on FILE. */ @@ -637,11 +590,10 @@ dump_gbb_conditions (FILE *file, gimple_bb_p gbb) fprintf (file, "#)\n"); } -/* Print to FILE all the data references of PBB, at some VERBOSITY - level. */ +/* Print to FILE all the data references of PBB. */ void -print_pdrs (FILE *file, poly_bb_p pbb, int verbosity) +print_pdrs (FILE *file, poly_bb_p pbb) { int i; poly_dr_p pdr; @@ -650,18 +602,12 @@ print_pdrs (FILE *file, poly_bb_p pbb, int verbosity) if (VEC_length (poly_dr_p, PBB_DRS (pbb)) == 0) { - if (verbosity > 0) - fprintf (file, "# Access informations are not provided\n");\ - fprintf (file, "0\n"); + fprintf (file, "# Access informations are not provided\n0\n"); return; } - if (verbosity > 1) - fprintf (file, "# Data references (\n"); - - if (verbosity > 0) - fprintf (file, "# Access informations are provided\n"); - fprintf (file, "1\n"); + fprintf (file, "# Data references (\n"); + fprintf (file, "# Access informations are provided\n1\n"); for (i = 0; VEC_iterate (poly_dr_p, PBB_DRS (pbb), i, pdr); i++) if (PDR_TYPE (pdr) == PDR_READ) @@ -669,321 +615,172 @@ print_pdrs (FILE *file, poly_bb_p pbb, int verbosity) else nb_writes++; - if (verbosity > 1) - fprintf (file, "# Read data references (\n"); - - if (verbosity > 0) - fprintf (file, "# Read access informations\n"); - fprintf (file, "%d\n", nb_reads); - + fprintf (file, "# Read data references (\n"); + fprintf (file, "# Read access informations\n%d\n", nb_reads); for (i = 0; VEC_iterate (poly_dr_p, PBB_DRS (pbb), i, pdr); i++) if (PDR_TYPE (pdr) == PDR_READ) - print_pdr (file, pdr, verbosity); - - if (verbosity > 1) - fprintf (file, "#)\n"); - - if (verbosity > 1) - fprintf (file, "# Write data references (\n"); - - if (verbosity > 0) - fprintf (file, "# Write access informations\n"); - fprintf (file, "%d\n", nb_writes); + print_pdr (file, pdr); + fprintf (file, "#)\n"); + fprintf (file, "# Write data references (\n"); + fprintf (file, "# Write access informations\n%d\n", nb_writes); for (i = 0; VEC_iterate (poly_dr_p, PBB_DRS (pbb), i, pdr); i++) if (PDR_TYPE (pdr) != PDR_READ) - print_pdr (file, pdr, verbosity); - - if (verbosity > 1) - fprintf (file, "#)\n"); - - if (verbosity > 1) - fprintf (file, "#)\n"); + print_pdr (file, pdr); + fprintf (file, "#)\n"); + fprintf (file, "#)\n"); } /* Print to STDERR all the data references of PBB. */ void -debug_pdrs (poly_bb_p pbb, int verbosity) +debug_pdrs (poly_bb_p pbb) { - print_pdrs (stderr, pbb, verbosity); + print_pdrs (stderr, pbb); } -/* Print to FILE the body of PBB, at some VERBOSITY level. */ +/* Print to FILE the body of PBB. */ static void -print_pbb_body (FILE *file, poly_bb_p pbb, int verbosity) +print_pbb_body (FILE *file, poly_bb_p pbb) { - if (verbosity > 1) - fprintf (file, "# Body (\n"); - - if (verbosity > 0) - fprintf (file, "# Statement body is provided\n"); - fprintf (file, "1\n"); - - if (verbosity > 0) - fprintf (file, "# Original iterator names\n# Iterator names are not provided yet.\n"); - - if (verbosity > 0) - fprintf (file, "# Statement body\n"); - + fprintf (file, "# Body (\n"); + fprintf (file, "# Statement body is provided\n1\n"); + fprintf (file, "# Original iterator names\n# Iterator names are not provided yet.\n"); + fprintf (file, "# Statement body\n"); fprintf (file, "{\n"); dump_bb (pbb_bb (pbb), file, 0); fprintf (file, "}\n"); - - if (verbosity > 1) - fprintf (file, "#)\n"); + fprintf (file, "#)\n"); } -/* Print to FILE the domain and scattering function of PBB, at some - VERBOSITY level. */ +/* Print to FILE the domain and scattering function of PBB. */ void -print_pbb (FILE *file, poly_bb_p pbb, int verbosity) +print_pbb (FILE *file, poly_bb_p pbb) { - if (verbosity > 1) - { - fprintf (file, "# pbb_%d (\n", pbb_index (pbb)); - dump_gbb_conditions (file, PBB_BLACK_BOX (pbb)); - dump_gbb_cases (file, PBB_BLACK_BOX (pbb)); - } - - print_pbb_domain (file, pbb, verbosity); - print_scattering_function (file, pbb, verbosity); - print_pdrs (file, pbb, verbosity); - print_pbb_body (file, pbb, verbosity); - - if (verbosity > 1) - fprintf (file, "#)\n"); + fprintf (file, "# pbb_%d (\n", pbb_index (pbb)); + dump_gbb_conditions (file, PBB_BLACK_BOX (pbb)); + dump_gbb_cases (file, PBB_BLACK_BOX (pbb)); + print_pbb_domain (file, pbb); + print_scattering_function (file, pbb); + print_pdrs (file, pbb); + print_pbb_body (file, pbb); + fprintf (file, "#)\n"); } -/* Print to FILE the parameters of SCOP, at some VERBOSITY level. */ +/* Print to FILE the parameters of SCOP. */ void -print_scop_params (FILE *file, scop_p scop, int verbosity) +print_scop_params (FILE *file, scop_p scop) { int i; tree t; - if (verbosity > 1) - fprintf (file, "# parameters (\n"); + fprintf (file, "# parameters (\n"); if (VEC_length (tree, SESE_PARAMS (SCOP_REGION (scop)))) - { - if (verbosity > 0) - fprintf (file, "# Parameter names are provided\n"); - - fprintf (file, "1\n"); - - if (verbosity > 0) - fprintf (file, "# Parameter names\n"); - } + fprintf (file, "# Parameter names are provided\n1\n# Parameter names \n"); else - { - if (verbosity > 0) - fprintf (file, "# Parameter names are not provided\n"); - fprintf (file, "0\n"); - } + fprintf (file, "# Parameter names are not provided\n0\n"); for (i = 0; VEC_iterate (tree, SESE_PARAMS (SCOP_REGION (scop)), i, t); i++) { print_generic_expr (file, t, 0); - fprintf (file, " "); + fprintf (file, " # p_%d \n", i); } - - fprintf (file, "\n"); - - if (verbosity > 1) - fprintf (file, "#)\n"); + fprintf (file, "#)\n"); } -/* Print to FILE the context of SCoP, at some VERBOSITY level. */ - +/* Print to FILE the context of SCoP. */ void -print_scop_context (FILE *file, scop_p scop, int verbosity) +print_scop_context (FILE *file, scop_p scop) { graphite_dim_t i; - if (verbosity > 0) - { - fprintf (file, "# Context (\n"); - fprintf (file, "# eq"); + fprintf (file, "# Context (\n"); + fprintf (file, "# eq"); - for (i = 0; i < scop_nb_params (scop); i++) - fprintf (file, " p%d", (int) i); + for (i = 0; i < scop_nb_params (scop); i++) + fprintf (file, " p%d", (int) i); - fprintf (file, " cst\n"); - } + fprintf (file, " cst\n"); if (SCOP_CONTEXT (scop)) ppl_print_powerset_matrix (file, SCOP_CONTEXT (scop)); else fprintf (file, "0 %d\n", (int) scop_nb_params (scop) + 2); - if (verbosity > 0) - fprintf (file, "# )\n"); + fprintf (file, "# )\n"); } -/* Print to FILE the SCOP, at some VERBOSITY level. */ +/* Print to FILE the SCOP. */ void -print_scop (FILE *file, scop_p scop, int verbosity) +print_scop (FILE *file, scop_p scop) { int i; poly_bb_p pbb; fprintf (file, "SCoP #(\n"); fprintf (file, "# Language\nGimple\n"); - print_scop_context (file, scop, verbosity); - print_scop_params (file, scop, verbosity); - - if (verbosity > 0) - fprintf (file, "# Number of statements\n"); - - fprintf (file, "%d\n",VEC_length (poly_bb_p, SCOP_BBS (scop))); - - for (i = 0; VEC_iterate (poly_bb_p, SCOP_BBS (scop), i, pbb); i++) - print_pbb (file, pbb, verbosity); - - if (verbosity > 1) - { - fprintf (file, "# original_lst (\n"); - print_lst (file, SCOP_ORIGINAL_SCHEDULE (scop), 0); - fprintf (file, "\n#)\n"); - - fprintf (file, "# transformed_lst (\n"); - print_lst (file, SCOP_TRANSFORMED_SCHEDULE (scop), 0); - fprintf (file, "\n#)\n"); - } - - fprintf (file, "#)\n"); -} - -/* Print to FILE the input file that CLooG would expect as input, at - some VERBOSITY level. */ - -void -print_cloog (FILE *file, scop_p scop, int verbosity) -{ - int i; - poly_bb_p pbb; - - fprintf (file, "# SCoP (generated by GCC/Graphite\n"); - if (verbosity > 0) - fprintf (file, "# CLooG output language\n"); - fprintf (file, "c\n"); - - print_scop_context (file, scop, verbosity); - print_scop_params (file, scop, verbosity); - - if (verbosity > 0) - fprintf (file, "# Number of statements\n"); - - fprintf (file, "%d\n", VEC_length (poly_bb_p, SCOP_BBS (scop))); - - for (i = 0; VEC_iterate (poly_bb_p, SCOP_BBS (scop), i, pbb); i++) - { - if (verbosity > 1) - fprintf (file, "# pbb_%d (\n", pbb_index (pbb)); - - print_pbb_domain (file, pbb, verbosity); - fprintf (file, "0 0 0"); - - if (verbosity > 0) - fprintf (file, "# For future CLooG options.\n"); - else - fprintf (file, "\n"); - - if (verbosity > 1) - fprintf (file, "#)\n"); - } - - fprintf (file, "0"); - if (verbosity > 0) - fprintf (file, "# Don't set the iterator names.\n"); - else - fprintf (file, "\n"); - - if (verbosity > 0) - fprintf (file, "# Number of scattering functions\n"); - - fprintf (file, "%d\n", VEC_length (poly_bb_p, SCOP_BBS (scop))); - unify_scattering_dimensions (scop); + print_scop_context (file, scop); + print_scop_params (file, scop); + fprintf (file, "# Number of statements\n%d\n", + VEC_length (poly_bb_p, SCOP_BBS (scop))); for (i = 0; VEC_iterate (poly_bb_p, SCOP_BBS (scop), i, pbb); i++) - { - if (!PBB_TRANSFORMED (pbb) - || !(PBB_TRANSFORMED_SCATTERING (pbb) - || PBB_ORIGINAL_SCATTERING (pbb))) - continue; + print_pbb (file, pbb); - if (verbosity > 1) - fprintf (file, "# pbb_%d (\n", pbb_index (pbb)); + fprintf (file, "# original_lst (\n"); + print_lst (file, SCOP_ORIGINAL_SCHEDULE (scop), 0); + fprintf (file, "\n#)\n"); - print_scattering_function_1 (file, pbb, verbosity); - - if (verbosity > 1) - fprintf (file, "#)\n"); - } - - fprintf (file, "0"); - if (verbosity > 0) - fprintf (file, "# Don't set the scattering dimension names.\n"); - else - fprintf (file, "\n"); + fprintf (file, "# transformed_lst (\n"); + print_lst (file, SCOP_TRANSFORMED_SCHEDULE (scop), 0); + fprintf (file, "\n#)\n"); fprintf (file, "#)\n"); } -/* Print to STDERR the domain of PBB, at some VERBOSITY level. */ - -void -debug_pbb_domain (poly_bb_p pbb, int verbosity) -{ - print_pbb_domain (stderr, pbb, verbosity); -} - -/* Print to FILE the domain and scattering function of PBB, at some - VERBOSITY level. */ +/* Print to STDERR the domain of PBB. */ void -debug_pbb (poly_bb_p pbb, int verbosity) +debug_pbb_domain (poly_bb_p pbb) { - print_pbb (stderr, pbb, verbosity); + print_pbb_domain (stderr, pbb); } -/* Print to STDERR the context of SCOP, at some VERBOSITY level. */ +/* Print to FILE the domain and scattering function of PBB. */ void -debug_scop_context (scop_p scop, int verbosity) +debug_pbb (poly_bb_p pbb) { - print_scop_context (stderr, scop, verbosity); + print_pbb (stderr, pbb); } -/* Print to STDERR the SCOP, at some VERBOSITY level. */ +/* Print to STDERR the context of SCOP. */ void -debug_scop (scop_p scop, int verbosity) +debug_scop_context (scop_p scop) { - print_scop (stderr, scop, verbosity); + print_scop_context (stderr, scop); } -/* Print to STDERR the SCOP under CLooG format, at some VERBOSITY - level. */ +/* Print to STDERR the SCOP. */ void -debug_cloog (scop_p scop, int verbosity) +debug_scop (scop_p scop) { - print_cloog (stderr, scop, verbosity); + print_scop (stderr, scop); } -/* Print to STDERR the parameters of SCOP, at some VERBOSITY - level. */ +/* Print to STDERR the parameters of SCOP. */ void -debug_scop_params (scop_p scop, int verbosity) +debug_scop_params (scop_p scop) { - print_scop_params (stderr, scop, verbosity); + print_scop_params (stderr, scop); } @@ -1000,10 +797,10 @@ psct_scattering_dim_for_loop_depth (poly_bb_p pbb, graphite_dim_t loop_depth) ppl_dimension_type iter = psct_iterator_dim (pbb, loop_depth); ppl_Linear_Expression_t expr; ppl_Coefficient_t coef; - mpz_t val; + Value val; graphite_dim_t i; - mpz_init (val); + value_init (val); ppl_new_Coefficient (&coef); ppl_Polyhedron_get_constraints (ph, &pcs); ppl_new_Constraint_System_const_iterator (&cit); @@ -1019,7 +816,7 @@ psct_scattering_dim_for_loop_depth (poly_bb_p pbb, graphite_dim_t loop_depth) ppl_Linear_Expression_coefficient (expr, iter, coef); ppl_Coefficient_to_mpz_t (coef, val); - if (mpz_sgn (val)) + if (value_zero_p (val)) { ppl_delete_Linear_Expression (expr); continue; @@ -1034,7 +831,7 @@ psct_scattering_dim_for_loop_depth (poly_bb_p pbb, graphite_dim_t loop_depth) if (value_notzero_p (val)) { - mpz_clear (val); + value_clear (val); ppl_delete_Linear_Expression (expr); ppl_delete_Coefficient (coef); ppl_delete_Constraint_System_const_iterator (cit); @@ -1054,7 +851,7 @@ psct_scattering_dim_for_loop_depth (poly_bb_p pbb, graphite_dim_t loop_depth) void pbb_number_of_iterations (poly_bb_p pbb, graphite_dim_t loop_depth, - mpz_t niter) + Value niter) { ppl_Linear_Expression_t le; ppl_dimension_type dim; @@ -1062,7 +859,7 @@ pbb_number_of_iterations (poly_bb_p pbb, ppl_Pointset_Powerset_C_Polyhedron_space_dimension (PBB_DOMAIN (pbb), &dim); ppl_new_Linear_Expression_with_dimension (&le, dim); ppl_set_coef (le, pbb_iterator_dim (pbb, loop_depth), 1); - mpz_set_si (niter, -1); + value_set_si (niter, -1); ppl_max_for_le_pointset (PBB_DOMAIN (pbb), le, niter); ppl_delete_Linear_Expression (le); } @@ -1073,7 +870,7 @@ pbb_number_of_iterations (poly_bb_p pbb, void pbb_number_of_iterations_at_time (poly_bb_p pbb, graphite_dim_t time_depth, - mpz_t niter) + Value niter) { ppl_Pointset_Powerset_C_Polyhedron_t ext_domain, sctr; ppl_Linear_Expression_t le; @@ -1108,7 +905,7 @@ pbb_number_of_iterations_at_time (poly_bb_p pbb, ppl_Pointset_Powerset_C_Polyhedron_space_dimension (sctr, &dim); ppl_new_Linear_Expression_with_dimension (&le, dim); ppl_set_coef (le, time_depth, 1); - mpz_set_si (niter, -1); + value_set_si (niter, -1); ppl_max_for_le_pointset (sctr, le, niter); ppl_delete_Linear_Expression (le);