2 /*+------- <| --------------------------------------------------------**
4 **--- /.\ -----------------------------------------------------**
5 ** <| [""M# statement.c **
6 **- A | # -----------------------------------------------------**
7 ** /.\ [""M# First version: 30/04/2008 **
8 **- [""M# | # U"U#U -----------------------------------------------**
11 ****** | "--' .-" ******************************************************
12 * |"-"-"-"-"-#-#-## Clan : the Chunky Loop Analyzer (experimental) *
13 **** | # ## ###### *****************************************************
15 * \ ::::'/ Copyright (C) 2008 Cedric Bastoul *
17 * ::88a ### This is free software; you can redistribute it *
18 * ::::888a 8a ##::. and/or modify it under the terms of the GNU Lesser *
19 * ::::::::888a88a[]::: General Public License as published by the Free *
20 *::8:::::::::SUNDOGa8a::. Software Foundation, either version 3 of the *
21 *::::::::8::::888:Y8888:: License, or (at your option) any later version. *
22 *::::':::88::::888::Y88a::::::::::::... *
23 *::'::.. . ..... .. ... . *
24 * This software is distributed in the hope that it will be useful, but *
25 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
26 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
29 * You should have received a copy of the GNU Lesser General Public License *
30 * along with software; if not, write to the Free Software Foundation, Inc., *
31 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
33 * Clan, the Chunky Loop Analyzer *
34 * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
36 ******************************************************************************/
43 # include <clan/statement.h>
46 /*+****************************************************************************
47 * Processing functions *
48 ******************************************************************************/
51 * clan_statement_compact function:
52 * This function scans the statement list to put the right number of columns
53 * to every matrix (during construction we used CLAN_MAX_DEPTH and
54 * CLAN_MAX_PARAMETERS to define matrix and vector sizes).
55 * \param statement The first statement to scan to compact matrices.
56 * \param nb_parameters The true number of parameters in the SCoP.
58 * - 02/05/2008: first version.
61 clan_statement_compact(scoplib_statement_p statement
, int nb_parameters
)
64 scoplib_matrix_list_p tmp
;
66 while (statement
!= NULL
)
68 nb_iterators
= statement
->nb_iterators
;
69 tmp
= statement
->domain
;
72 clan_matrix_compact(tmp
->elt
,nb_iterators
,nb_parameters
);
75 clan_matrix_compact(statement
->schedule
,nb_iterators
,nb_parameters
);
76 clan_matrix_compact(statement
->read
,nb_iterators
,nb_parameters
);
77 clan_matrix_compact(statement
->write
,nb_iterators
,nb_parameters
);
78 statement
= statement
->next
;