2 /**-------------------------------------------------------------------**
4 **-------------------------------------------------------------------**
6 **-------------------------------------------------------------------**
7 ** First version: october 26th 2001 **
8 **-------------------------------------------------------------------**/
11 /******************************************************************************
12 * CLooG : the Chunky Loop Generator (experimental) *
13 ******************************************************************************
15 * Copyright (C) 2001-2005 Cedric Bastoul *
17 * This is free software; you can redistribute it and/or modify it under the *
18 * terms of the GNU General Public License as published by the Free Software *
19 * Foundation; either version 2 of the License, or (at your option) any later *
22 * This software is distributed in the hope that it will be useful, but *
23 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
24 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
27 * You should have received a copy of the GNU General Public License along *
28 * with software; if not, write to the Free Software Foundation, Inc., *
29 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
31 * CLooG, the Chunky Loop Generator *
32 * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
34 ******************************************************************************/
39 #if defined(__cplusplus)
45 * CloogLoop structure:
46 * this structure contains all the informations of a loop generated or to be
48 * - if the loop has not been processed yet (it is not a result of a call to
49 * cloog_loop_generate), the domain is the whole iteration domain of a given
50 * block, the stride is 1 (i.e. there is no stride), block is necessarily not
51 * NULL and inner is NULL.
52 * - if the loop comes as a result of a cloog_loop_generate call, the domain
53 * describes the constraints (guards and loop bounds) for only one dimension
54 * (the last one: outer dimensions being considered as parameters), the stride
55 * may differ from one (this means that on the considered dimension, a step of
56 * 'stride' must be considered between integral point, the first integral
57 * point to be considered being the lower bound of the loop), inner may differ
58 * from NULL, meaning that there are further dimensions and nesting levels in
62 { CloogDomain
* domain
; /**< The iteration domain. */
63 Value stride
; /**< The stride for the corresponding iterator
64 * (filled only after loop generation).
66 CloogBlock
* block
; /**< The included statement block, NULL if none.*/
67 struct cloogloop
* inner
; /**< Loops at the next level. */
68 struct cloogloop
* next
; /**< Next loop at the same level. */
70 typedef struct cloogloop CloogLoop
;
73 /******************************************************************************
74 * Structure display function *
75 ******************************************************************************/
76 void cloog_loop_print_structure(FILE *, CloogLoop
*, int) ;
77 void cloog_loop_print(FILE *, CloogLoop
*) ;
80 /******************************************************************************
81 * Memory deallocation function *
82 ******************************************************************************/
83 void cloog_loop_free(CloogLoop
*) ;
86 /******************************************************************************
88 ******************************************************************************/
89 CloogLoop
* cloog_loop_read(FILE *, int, int) ;
92 /******************************************************************************
93 * Processing functions *
94 ******************************************************************************/
95 CloogLoop
* cloog_loop_malloc() ;
96 CloogLoop
* cloog_loop_generate(CloogLoop
*, CloogDomain
*, int, int,
97 int *, int, int, CloogOptions
*) ;
98 CloogLoop
* cloog_loop_simplify(CloogLoop
*, CloogDomain
*, int, int) ;
99 CloogLoop
* cloog_loop_fast_simplify(CloogLoop
*, CloogDomain
*, int, int) ;
100 CloogLoop
* cloog_loop_clean(CloogLoop
*) ;
101 void cloog_loop_scatter(CloogLoop
*, CloogDomain
*) ;
102 void cloog_loop_strides(CloogLoop
*, int) ;
103 void cloog_loop_normalize(CloogLoop
* loop
, int) ;
106 #if defined(__cplusplus)
109 #endif /* define _H */