First commit : 0.14.0 version (with roadmap in doc instead of
[cloog.git] / include / cloog / options.h
blobde89f0c676038be6d9f7c3cf4b95fd9f9feb7d48
2 /**-------------------------------------------------------------------**
3 ** CLooG **
4 **-------------------------------------------------------------------**
5 ** options.h **
6 **-------------------------------------------------------------------**
7 ** First version: april 19th 2003 **
8 **-------------------------------------------------------------------**/
11 /******************************************************************************
12 * CLooG : the Chunky Loop Generator (experimental) *
13 ******************************************************************************
14 * *
15 * Copyright (C) 2001-2005 Cedric Bastoul *
16 * *
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 *
20 * version. *
21 * *
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 *
25 * for more details. *
26 * *
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 *
30 * *
31 * CLooG, the Chunky Loop Generator *
32 * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
33 * *
34 ******************************************************************************/
37 #ifndef CLOOG_OPTIONS_H
38 #define CLOOG_OPTIONS_H
39 #if defined(__cplusplus)
40 extern "C"
42 #endif
45 /* Uncomment the following line if you want some information about
46 * maximum total allocated memory for code generation.
48 #define CLOOG_MEMORY
49 #define CLOOG_SCALARS
52 struct cloogoptions
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.
61 /* OPTIONS FOR PRETTY PRINTING */
62 int esp ; /* 1 if user wants to spread all equalities, i.e. when there
63 * is something like "i = 3*j + 1 ; A[i] = 0 ;" the generator
64 * will write "A[3*j + 1] = 0 ;", 0 otherwise.
66 int csp ; /* 1 if user wants to spread the constant equalities,
67 * i.e. the simple equalities like "i = M ;", "i = j ;"...
68 * It is for performance saving with a spreading, 0 otherwise.
70 int fsp ; /* The iteration level where equalities spreading can begin
71 * (it might happen that the user wants not to spread values
72 * of scattering iterators).
74 int otl ; /* 1 for eliminate loops running just one time and write them
75 * as an affectation of the iterator, 0 otherwise.
77 int block ; /* 1 to make one new block {...} per new dimension,
78 * 0 otherwise.
80 int cpp ; /* 1 to generate a pseudo-code easily compilable by using
81 * preprocessing, 0 otherwise.
83 int compilable; /* 1 to generate a compilable code by using
84 * preprocessing, 0 otherwise.
87 /* MISC OPTIONS */
88 char * name ; /* Name of the input file. */
89 float time ; /* Time spent for code generation in seconds. */
90 #ifdef CLOOG_MEMORY
91 int memory ; /* Memory spent for code generation in kilobytes. */
92 #endif
93 /* UNDOCUMENTED OPTIONS FOR THE AUTHOR ONLY */
94 int leaks ; /* 1 if I want to print the allocation statistics,
95 * 0 otherwise.
97 int nobacktrack;/* 1 if I don't want to achieve backtracking in
98 * Quillere's algorithm, 0 otherwise.
100 int override ; /* 1 if I want to bypass CLooG decisions on option correctness
101 * (generated code may be incorrect), 0 otherwise.
103 int structure ; /* 1 if I want to print the CloogProgram structure before the
104 * pretty printed code, 0 otherwise.
106 int noblocks ; /* 1 if I don't want to make statement blocks, 0 otherwise. */
107 int noscalars ; /* 1 if I don't want to use scalar dimensions, 0 otherwise. */
108 int nosimplify; /* 1 if I don't want to simplify polyhedra, 0 otherwise. */
110 typedef struct cloogoptions CloogOptions ;
113 /******************************************************************************
114 * Structure display function *
115 ******************************************************************************/
116 void cloog_options_print(FILE *, CloogOptions *) ;
119 /******************************************************************************
120 * Memory deallocation function *
121 ******************************************************************************/
122 void cloog_options_free(CloogOptions *) ;
125 /******************************************************************************
126 * Reading function *
127 ******************************************************************************/
128 void cloog_options_read(int, char **, FILE **, FILE **, CloogOptions **) ;
131 /******************************************************************************
132 * Processing functions *
133 ******************************************************************************/
134 CloogOptions * cloog_options_malloc(void) ;
137 #if defined(__cplusplus)
139 #endif
140 #endif /* define _H */