remove cpp option (defaulting to true)
[cloog/uuh.git] / include / cloog / options.h.in
blob92c5f676baf36fefb4731206dfdf5cf3218caf7f
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 ******************************************************************************/
36 #include <stdio.h>
38 #ifndef CLOOG_OPTIONS_H
39 #define CLOOG_OPTIONS_H
40 #if defined(__cplusplus)
41 extern "C"
43 #endif
46 /* Uncomment the following line if you want some information about
47 * maximum total allocated memory for code generation.
48 #define CLOOG_MEMORY
50 #define CLOOG_SCALARS
51 #undef CLOOG_RUSAGE
53 struct cloogoptions;
54 typedef struct cloogoptions CloogOptions;
56 #if defined(CLOOG_POLYLIB)
57 #include <cloog/polylib/options.h>
58 #elif defined(CLOOG_ISL)
59 #include <cloog/isl/options.h>
60 #else
61 struct cloogbackendoptions;
62 #endif
63 typedef struct cloogbackendoptions CloogBackendOptions;
65 struct cloogoptions
67 CloogBackendOptions *backend;
68 /* OPTIONS FOR LOOP GENERATION */
69 int l ; /* Last level to optimize. */
70 int f ; /* First level to optimize. */
71 int stop ; /* Level to stop code generation. */
72 int strides ; /* 1 if user wants to handle non-unit strides (then loop
73 * increment can be something else than one), 0 otherwise.
75 int sh; /* 1 for computing simple hulls */
77 /* OPTIONS FOR PRETTY PRINTING */
78 int esp ; /* 1 if user wants to spread all equalities, i.e. when there
79 * is something like "i = 3*j + 1 ; A[i] = 0 ;" the generator
80 * will write "A[3*j + 1] = 0 ;", 0 otherwise.
82 int fsp ; /* The iteration level where equalities spreading can begin
83 * (it might happen that the user wants not to spread values
84 * of scattering iterators).
86 int otl ; /* 1 for eliminate loops running just one time and write them
87 * as an affectation of the iterator, 0 otherwise.
89 int block ; /* 1 to make one new block {...} per new dimension,
90 * 0 otherwise.
92 int compilable; /* 1 to generate a compilable code by using
93 * preprocessing, 0 otherwise.
95 int callable; /* 1 to generate callable code by using
96 * preprocessing, 0 otherwise.
98 int language; /* 1 to generate FORTRAN, 0 for C otherwise. */
100 /* MISC OPTIONS */
101 char * name ; /* Name of the input file. */
102 #ifdef CLOOG_RUSAGE
103 float time ; /* Time spent for code generation in seconds. */
104 #endif
105 #ifdef CLOOG_MEMORY
106 int memory ; /* Memory spent for code generation in kilobytes. */
107 #endif
108 int quiet; /* Don't print any informational messages. */
109 /* UNDOCUMENTED OPTIONS FOR THE AUTHOR ONLY */
110 int leaks ; /* 1 if I want to print the allocation statistics,
111 * 0 otherwise.
113 int nobacktrack;/* 1 if I don't want to achieve backtracking in
114 * Quillere's algorithm, 0 otherwise.
116 int override ; /* 1 if I want to bypass CLooG decisions on option correctness
117 * (generated code may be incorrect), 0 otherwise.
119 int structure ; /* 1 if I want to print the CloogProgram structure before the
120 * pretty printed code, 0 otherwise.
122 int noblocks ; /* 1 if I don't want to make statement blocks, 0 otherwise. */
123 int noscalars ; /* 1 if I don't want to use scalar dimensions, 0 otherwise. */
124 int nosimplify; /* 1 if I don't want to simplify polyhedra, 0 otherwise. */
128 /******************************************************************************
129 * Error reporting functions *
130 ******************************************************************************/
132 enum cloog_msg_type { CLOOG_ERROR, CLOOG_WARNING, CLOOG_INFO };
134 void cloog_msg(CloogOptions *options, enum cloog_msg_type type,
135 const char *msg, ...);
136 void cloog_die(const char *msg, ...);
139 /******************************************************************************
140 * Structure display function *
141 ******************************************************************************/
142 void cloog_options_print(FILE *, CloogOptions *) ;
145 /******************************************************************************
146 * Memory deallocation function *
147 ******************************************************************************/
148 void cloog_core_options_free(CloogOptions *backend);
149 void cloog_options_free(CloogOptions *) ;
152 /******************************************************************************
153 * Reading function *
154 ******************************************************************************/
155 void cloog_options_read(int, char **, FILE **, FILE **, CloogOptions **) ;
158 /******************************************************************************
159 * Processing functions *
160 ******************************************************************************/
161 CloogOptions *cloog_core_options_malloc(void);
162 CloogOptions * cloog_options_malloc(void) ;
165 #if defined(__cplusplus)
167 #endif
168 #endif /* define _H */