From ae403f5abdb2691cfa6da23297486ce9a051e0b9 Mon Sep 17 00:00:00 2001 From: Riyadh Baghdadi Date: Thu, 30 Sep 2010 21:16:10 +0000 Subject: Write OpenScop format. 2010-07-29 Riyadh Baghdadi * graphite-cloog-util.c (openscop_print_cloog_matrix): New. (openscop_print_polyhedron_matrix): New. * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared. * graphite-poly.c (openscop_print_pdr_polyhedron): Same. (openscop_print_pdr_powerset): New. (openscop_print_powerset_matrix): New. (openscop_print_scattering_function_1): New. (print_scattering_function): Add support for scattering names and OpenScop format. (graphite_write_transforms): Remove. (apply_poly_transforms): Updated to call print_scop. (print_pdr_access_layout): Updated to support OpenScop format. (print_pdr): Same. (openscop_print_pbb_domain): New. (print_pbb_body): Added a parameter to allow indicating that pbb_body is not provided. (print_pbb): Updated to call the new print_pbb_body. (openscop_print_scop_context): New. (print_scop_header): New. (print_scop): Updated to call print_scop_header. * graphite-poly.h: Document OpenScop format. From-SVN: r164770 --- gcc/graphite-poly.h | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) (limited to 'gcc/graphite-poly.h') diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h index 5f858eb..0e1aa1f 100644 --- a/gcc/graphite-poly.h +++ b/gcc/graphite-poly.h @@ -132,7 +132,54 @@ struct poly_dr dimensions. | i j k a 1 - | 0 0 0 -1 15 = 0 */ + | 0 0 0 -1 15 = 0 + + The difference between the graphite internal format for access data and + the OpenSop format is in the order of columns. + Instead of having: + + | i j k a s0 s1 1 + | 0 0 0 1 0 0 -5 = 0 + |-1 0 0 0 1 0 0 = 0 + | 0 -1 -1 0 0 1 0 = 0 + | 0 0 0 0 1 0 0 >= 0 # The last four lines describe the + | 0 0 0 0 0 1 0 >= 0 # array size. + | 0 0 0 0 -1 0 1335 >= 0 + | 0 0 0 0 0 -1 123 >= 0 + + In OpenScop we have: + + | a s0 s1 i j k 1 + | 1 0 0 0 0 0 -5 = 0 + | 0 1 0 -1 0 0 0 = 0 + | 0 0 1 0 -1 -1 0 = 0 + | 0 1 0 0 0 0 0 >= 0 # The last four lines describe the + | 0 0 1 0 0 0 0 >= 0 # array size. + | 0 -1 0 0 0 0 1335 >= 0 + | 0 0 -1 0 0 0 123 >= 0 + + The OpenScop access function is printed as follows: + + | 1 # The number of disjunct components in a union of access functions. + | R C O I L P # Described bellow. + | a s0 s1 i j k 1 + | 1 0 0 0 0 0 -5 = 0 + | 0 1 0 -1 0 0 0 = 0 + | 0 0 1 0 -1 -1 0 = 0 + | 0 1 0 0 0 0 0 >= 0 # The last four lines describe the + | 0 0 1 0 0 0 0 >= 0 # array size. + | 0 -1 0 0 0 0 1335 >= 0 + | 0 0 -1 0 0 0 123 >= 0 + + Where: + - R: Number of rows. + - C: Number of columns. + - O: Number of output dimensions = alias set + number of subscripts. + - I: Number of input dimensions (iterators). + - L: Number of local (existentially quantified) dimensions. + - P: Number of parameters. + + In the example, the vector "R C O I L P" is "7 7 3 2 0 1". */ ppl_Pointset_Powerset_C_Polyhedron_t accesses; /* Data reference's base object set number, we must assure 2 pdrs are in the -- cgit v1.1