2 /**-------------------------------------------------------------------**
4 **-------------------------------------------------------------------**
6 **-------------------------------------------------------------------**
7 ** First version: april 19th 2003 **
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 ******************************************************************************/
37 #ifndef CLOOG_OPTIONS_H
38 #define CLOOG_OPTIONS_H
39 #if defined(__cplusplus)
45 /* Uncomment the following line if you want some information about
46 * maximum total allocated memory for code generation.
53 { /* OPTIONS FOR LOOP GENERATION */
54 int l
; /* Last level to optimize. */
55 int f
; /* First level to optimize. */
56 int stop
; /* Level to stop code generation. */
57 int strides
; /* 1 if user wants to handle non-unit strides (then loop
58 * increment can be something else than one), 0 otherwise.
60 int sh
; /* 1 for computing simple hulls */
62 /* OPTIONS FOR PRETTY PRINTING */
63 int esp
; /* 1 if user wants to spread all equalities, i.e. when there
64 * is something like "i = 3*j + 1 ; A[i] = 0 ;" the generator
65 * will write "A[3*j + 1] = 0 ;", 0 otherwise.
67 int csp
; /* 1 if user wants to spread the constant equalities,
68 * i.e. the simple equalities like "i = M ;", "i = j ;"...
69 * It is for performance saving with a spreading, 0 otherwise.
71 int fsp
; /* The iteration level where equalities spreading can begin
72 * (it might happen that the user wants not to spread values
73 * of scattering iterators).
75 int otl
; /* 1 for eliminate loops running just one time and write them
76 * as an affectation of the iterator, 0 otherwise.
78 int block
; /* 1 to make one new block {...} per new dimension,
81 int cpp
; /* 1 to generate a pseudo-code easily compilable by using
82 * preprocessing, 0 otherwise.
84 int compilable
; /* 1 to generate a compilable code by using
85 * preprocessing, 0 otherwise.
89 char * name
; /* Name of the input file. */
90 float time
; /* Time spent for code generation in seconds. */
92 int memory
; /* Memory spent for code generation in kilobytes. */
94 /* UNDOCUMENTED OPTIONS FOR THE AUTHOR ONLY */
95 int leaks
; /* 1 if I want to print the allocation statistics,
98 int nobacktrack
;/* 1 if I don't want to achieve backtracking in
99 * Quillere's algorithm, 0 otherwise.
101 int override
; /* 1 if I want to bypass CLooG decisions on option correctness
102 * (generated code may be incorrect), 0 otherwise.
104 int structure
; /* 1 if I want to print the CloogProgram structure before the
105 * pretty printed code, 0 otherwise.
107 int noblocks
; /* 1 if I don't want to make statement blocks, 0 otherwise. */
108 int noscalars
; /* 1 if I don't want to use scalar dimensions, 0 otherwise. */
109 int nosimplify
; /* 1 if I don't want to simplify polyhedra, 0 otherwise. */
111 typedef struct cloogoptions CloogOptions
;
114 /******************************************************************************
115 * Structure display function *
116 ******************************************************************************/
117 void cloog_options_print(FILE *, CloogOptions
*) ;
120 /******************************************************************************
121 * Memory deallocation function *
122 ******************************************************************************/
123 void cloog_options_free(CloogOptions
*) ;
126 /******************************************************************************
128 ******************************************************************************/
129 void cloog_options_read(int, char **, FILE **, FILE **, CloogOptions
**) ;
132 /******************************************************************************
133 * Processing functions *
134 ******************************************************************************/
135 CloogOptions
* cloog_options_malloc(void) ;
138 #if defined(__cplusplus)
141 #endif /* define _H */