PIPS
ri-util.h
Go to the documentation of this file.
1 /* Warning! Do not modify this file that is automatically generated! */
2 /* Modify src/Libs/ri-util/ri-util-local.h instead, to add your own modifications. */
3 
4 /* header file built by cproto */
5 
6 #ifndef ri_util_header_included
7 #define ri_util_header_included
8 /* ri_util-local.h */
9 /*
10 
11  $Id: ri-util-local.h 23466 2018-03-12 03:08:18Z ancourt $
12 
13  Copyright 1989-2016 MINES ParisTech
14 
15  This file is part of PIPS.
16 
17  PIPS is free software: you can redistribute it and/or modify it
18  under the terms of the GNU General Public License as published by
19  the Free Software Foundation, either version 3 of the License, or
20  any later version.
21 
22  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
23  WARRANTY; without even the implied warranty of MERCHANTABILITY or
24  FITNESS FOR A PARTICULAR PURPOSE.
25 
26  See the GNU General Public License for more details.
27 
28  You should have received a copy of the GNU General Public License
29  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
30 
31 */
32 /* RI-UTIL Library: Functions dealing with and constants related to
33  * PIPS intermediate representation ri.newgen,
34  * that are NOT generated by NewGen
35  */
36 
37  /* Pvecteur is an external type for NewGen and the ri data structure
38  * and is not included in ri.h
39  *
40  * It is included here to avoid changes in many PIPS modules which
41  * use ri-util
42  *
43  * Idem for type Ppolynome (PB 25/07/90); FI: polynomials are not
44  * used in ri.newgen; they should not be mentionned here
45  *
46  * Idem for type Psysteme (FI 3 November 1990)
47  *
48  * New function call need to be defined to handle omp pragma as a
49  * standard PIPS expression. To be easily recognized, all the defined
50  * values are prefixed by "OMP_".
51  */
52 
53 /*
54  * Modifications:
55  * --------------
56  * Molka Becher (MB), June 2010
57  * - Add and Check of definition of C Intrinsics (#define)
58  * - Add of definition of QuadPrecision type and LongDoubleComplex type
59  * - Add of package & variable names for memmove intrinsic (string.h)
60  */
61 
62 
63 #include "linear.h"
64 #include "genC.h"
65 
66 #include "ri.h"
67 #include "text.h"
68 #include "cloning.h"
69 
70 #include "newgen.h"
71 #include "naming.h"
72 
73 /* FC 2015-07-20
74  * yuk, temporary fix to avoid an include cycle ri-util <-> prettyprint
75  # #include "prettyprint.h"
76  */
77 extern string basic_to_string(basic);
78 extern string string_of_type(type);
79 extern void print_type(type);
80 extern bool same_type_name_p(type, type);
81 
82 #define UNBOUNDED_DIMENSION_NAME "UNBOUNDED-DIMENSION"
83 #define IMPLIED_DO_NAME "IMPLIED-DO"
84 #define IMPLIED_DO_FUNCTION_NAME "IMPLIED-DO"
85 #define REPEAT_VALUE_NAME "REPEAT-VALUE"
86 #define REPEAT_VALUE_FUNCTION_NAME "REPEAT-VALUE"
87 #define STATIC_INITIALIZATION_NAME "STATIC-INITIALIZATION"
88 #define STATIC_INITIALIZATION_FUNCTION_NAME "STATIC-INITIALIZATION"
89 #define DATA_LIST_FUNCTION_NAME "DATA-LIST="
90 #define IO_LIST_STRING_NAME "IOLIST="
91 
92 
93 #define BRACE_INTRINSIC "BRACE_INTRINSIC"
94 #define NULL_STATEMENT_INTRINSIC "NULL_STATEMENT_INTRINSIC"
95 
96 #define IMPLIED_COMPLEX_NAME "CMPLX_"
97 #define IMPLIED_DCOMPLEX_NAME "DCMPLX_"
98 
99 #define FIELD_OPERATOR_NAME "."
100 #define POINT_TO_OPERATOR_NAME "->"
101 #define DEREFERENCING_OPERATOR_NAME "*indirection"
102 
103 #define ASSIGN_OPERATOR_NAME "="
104 #define ASSIGN_OPERATOR_PRECEDENCE (2)
105 #define POST_INCREMENT_OPERATOR_NAME "post++"
106 #define POST_DECREMENT_OPERATOR_NAME "post--"
107 #define PRE_INCREMENT_OPERATOR_NAME "++pre"
108 #define PRE_DECREMENT_OPERATOR_NAME "--pre"
109 #define MULTIPLY_UPDATE_OPERATOR_NAME "*="
110 #define DIVIDE_UPDATE_OPERATOR_NAME "/="
111 #define PLUS_UPDATE_OPERATOR_NAME "+="
112 #define MINUS_UPDATE_OPERATOR_NAME "-="
113 #define LEFT_SHIFT_UPDATE_OPERATOR_NAME "<<="
114 #define RIGHT_SHIFT_UPDATE_OPERATOR_NAME ">>="
115 #define BITWISE_OR_UPDATE_OPERATOR_NAME "|="
116 
117 #define COMMA_OPERATOR_NAME ","
118 
119 #define PLUS_OPERATOR_NAME "+"
120 #define PLUS_C_OPERATOR_NAME "+C" /* includes pointer arithmetic */
121 #define MINUS_OPERATOR_NAME "-"
122 #define MINUS_C_OPERATOR_NAME "-C" /* includes pointer arithmetic */
123 #define UNARY_MINUS_OPERATOR_NAME "--"
124 #define UNARY_PLUS_OPERATOR_NAME "+unary"
125 #define MULTIPLY_OPERATOR_NAME "*"
126 #define DIVIDE_OPERATOR_NAME "/"
127 #define INVERSE_OPERATOR_NAME "_INV_" /* internal stuff */
128 #define POWER_OPERATOR_NAME "**"
129 #define MODULO_OPERATOR_NAME "MOD"
130 #define REAL_MODULO_OPERATOR_NAME "AMOD"
131 #define DOUBLE_MODULO_OPERATOR_NAME "DMOD"
132 #define SIGN_OPERATOR_NAME "SIGN"
133 #define ISIGN_OPERATOR_NAME "ISIGN"
134 #define DSIGN_OPERATOR_NAME "DSIGN"
135 #define DIM_OPERATOR_NAME "DIM"
136 #define IDIM_OPERATOR_NAME "IDIM"
137 #define DDIM_OPERATOR_NAME "DDIM"
138 #define DPROD_OPERATOR_NAME "DPROD"
139 #define CONJG_OPERATOR_NAME "CONJG"
140 #define DCONJG_OPERATOR_NAME "DCONJG"
141 #define SQRT_OPERATOR_NAME "SQRT"
142 #define DSQRT_OPERATOR_NAME "DSQRT"
143 #define CSQRT_OPERATOR_NAME "CSQRT"
144 #define CDSQRT_OPERATOR_NAME "CDSQRT"
145 #define EXP_OPERATOR_NAME "EXP"
146 #define DEXP_OPERATOR_NAME "DEXP"
147 #define CEXP_OPERATOR_NAME "CEXP"
148 #define CDEXP_OPERATOR_NAME "CDEXP"
149 #define LOG_OPERATOR_NAME "LOG"
150 #define ALOG_OPERATOR_NAME "ALOG"
151 #define DLOG_OPERATOR_NAME "DLOG"
152 #define CLOG_OPERATOR_NAME "CLOG"
153 #define CDLOG_OPERATOR_NAME "CDLOG"
154 #define LOG10_OPERATOR_NAME "LOG10"
155 #define ALOG10_OPERATOR_NAME "ALOG10"
156 #define DLOG10_OPERATOR_NAME "DLOG10"
157 #define SIN_OPERATOR_NAME "SIN"
158 #define DSIN_OPERATOR_NAME "DSIN"
159 #define CSIN_OPERATOR_NAME "CSIN"
160 #define CDSIN_OPERATOR_NAME "CDSIN"
161 #define COS_OPERATOR_NAME "COS"
162 #define DCOS_OPERATOR_NAME "DCOS"
163 #define CCOS_OPERATOR_NAME "CCOS"
164 #define CDCOS_OPERATOR_NAME "CDCOS"
165 #define TAN_OPERATOR_NAME "TAN"
166 #define DTAN_OPERATOR_NAME "DTAN"
167 #define ASIN_OPERATOR_NAME "ASIN"
168 #define DASIN_OPERATOR_NAME "DASIN"
169 #define ACOS_OPERATOR_NAME "ACOS"
170 #define DACOS_OPERATOR_NAME "DACOS"
171 #define ATAN_OPERATOR_NAME "ATAN"
172 #define DATAN_OPERATOR_NAME "DATAN"
173 #define ATAN2_OPERATOR_NAME "ATAN2"
174 #define DATAN2_OPERATOR_NAME "DATAN2"
175 #define SINH_OPERATOR_NAME "SINH"
176 #define DSINH_OPERATOR_NAME "DSINH"
177 #define COSH_OPERATOR_NAME "COSH"
178 #define DCOSH_OPERATOR_NAME "DCOSH"
179 #define TANH_OPERATOR_NAME "TANH"
180 #define DTANH_OPERATOR_NAME "DTANH"
181 #define LEFT_SHIFT_OPERATOR_NAME "<<"
182 #define RIGHT_SHIFT_OPERATOR_NAME ">>"
183 
184 // Conflicts with reserved prefixes for BLOCKDATA (&), COMMON (~),
185 // MAIN (%), FILESEP (!), MEMBER_SEP_STRING (^), ENUM (?) & al.
186 // Use "-" to avoid conflict with user defined symbols
187 #define ADDRESS_OF_OPERATOR_NAME "__address-of__" // &
188 #define BITWISE_AND_OPERATOR_NAME "__bit-and__" // &
189 #define BITWISE_NOT_OPERATOR_NAME "__bit-not__" // ~
190 #define BITWISE_XOR_OPERATOR_NAME "__C-xor__" // ^
191 #define C_AND_OPERATOR_NAME "__C-and__" // &&
192 #define MODULO_UPDATE_OPERATOR_NAME "__C-modulo-update__" // %=
193 #define BITWISE_AND_UPDATE_OPERATOR_NAME "__C-bit-and-update__" // &=
194 #define BITWISE_XOR_UPDATE_OPERATOR_NAME "__C-bit-xor-update__" // ^=
195 #define CONDITIONAL_OPERATOR_NAME "__C-conditional__" // ?
196 #define C_NOT_OPERATOR_NAME "__C-logical-not__" // !
197 #define C_NON_EQUAL_OPERATOR_NAME "__C-non-equal__" // !=
198 #define C_MODULO_OPERATOR_NAME "__C-modulo__" // %
199 
200 #define BITWISE_OR_OPERATOR_NAME "|"
201 #define MIN_OPERATOR_NAME "MIN"
202 #define MIN0_OPERATOR_NAME "MIN0"
203 #define MIN1_OPERATOR_NAME "MIN1"
204 #define AMIN0_OPERATOR_NAME "AMIN0"
205 #define AMIN1_OPERATOR_NAME "AMIN1"
206 #define DMIN1_OPERATOR_NAME "DMIN1"
207 #define MAX_OPERATOR_NAME "MAX"
208 #define MAX0_OPERATOR_NAME "MAX0"
209 #define AMAX0_OPERATOR_NAME "AMAX0"
210 #define MAX1_OPERATOR_NAME "MAX1"
211 #define AMAX1_OPERATOR_NAME "AMAX1"
212 #define DMAX1_OPERATOR_NAME "DMAX1"
213 #define ABS_OPERATOR_NAME "ABS"
214 #define IABS_OPERATOR_NAME "IABS"
215 #define DABS_OPERATOR_NAME "DABS"
216 #define CABS_OPERATOR_NAME "CABS"
217 #define CDABS_OPERATOR_NAME "CDABS"
218 
219 #define LENGTH_OPERATOR_NAME "LEN"
220 #define INDEX_OPERATOR_NAME "INDEX"
221 #define LGE_OPERATOR_NAME "LGE"
222 #define LGT_OPERATOR_NAME "LGT"
223 #define LLE_OPERATOR_NAME "LLE"
224 #define LLT_OPERATOR_NAME "LLT"
225 
226 /* generic conversion names.
227  */
228 #define INT_GENERIC_CONVERSION_NAME "INT"
229 #define IFIX_GENERIC_CONVERSION_NAME "IFIX"
230 #define IDINT_GENERIC_CONVERSION_NAME "IDINT"
231 #define REAL_GENERIC_CONVERSION_NAME "REAL"
232 #define FLOAT_GENERIC_CONVERSION_NAME "FLOAT"
233 #define DFLOAT_GENERIC_CONVERSION_NAME "DFLOAT"
234 #define SNGL_GENERIC_CONVERSION_NAME "SNGL"
235 #define DBLE_GENERIC_CONVERSION_NAME "DBLE"
236 #define DREAL_GENERIC_CONVERSION_NAME "DREAL"
237 #define CMPLX_GENERIC_CONVERSION_NAME "CMPLX"
238 #define DCMPLX_GENERIC_CONVERSION_NAME "DCMPLX"
239 
240 #define INT_TO_CHAR_CONVERSION_NAME "CHAR"
241 #define CHAR_TO_INT_CONVERSION_NAME "ICHAR"
242 
243 #define AINT_CONVERSION_NAME "AINT"
244 #define DINT_CONVERSION_NAME "DINT"
245 #define ANINT_CONVERSION_NAME "ANINT"
246 #define DNINT_CONVERSION_NAME "DNINT"
247 #define NINT_CONVERSION_NAME "NINT"
248 #define IDNINT_CONVERSION_NAME "IDNINT"
249 #define AIMAG_CONVERSION_NAME "AIMAG"
250 #define DIMAG_CONVERSION_NAME "DIMAG"
251 
252 /* FI: intrinsics are defined at a third place after bootstrap and effects!
253  * I guess the name should be defined here and used in table(s) there
254  */
255 
256 #define AND_OPERATOR_NAME ".AND."
257 #define OR_OPERATOR_NAME ".OR."
258 #define C_OR_OPERATOR_NAME "||"
259 #define NOT_OPERATOR_NAME ".NOT."
260 #define NON_EQUAL_OPERATOR_NAME ".NE."
261 #define EQUIV_OPERATOR_NAME ".EQV."
262 #define NON_EQUIV_OPERATOR_NAME ".NEQV."
263 
264 #define TRUE_OPERATOR_NAME ".TRUE."
265 #define FALSE_OPERATOR_NAME ".FALSE."
266 #define ONE_OPERATOR_NAME "1"
267 #define ZERO_OPERATOR_NAME "0"
268 
269 #define GREATER_OR_EQUAL_OPERATOR_NAME ".GE."
270 #define C_GREATER_OR_EQUAL_OPERATOR_NAME ">="
271 #define GREATER_THAN_OPERATOR_NAME ".GT."
272 #define C_GREATER_THAN_OPERATOR_NAME ">"
273 #define LESS_OR_EQUAL_OPERATOR_NAME ".LE."
274 #define C_LESS_OR_EQUAL_OPERATOR_NAME "<="
275 #define LESS_THAN_OPERATOR_NAME ".LT."
276 #define C_LESS_THAN_OPERATOR_NAME "<"
277 #define EQUAL_OPERATOR_NAME ".EQ."
278 #define C_EQUAL_OPERATOR_NAME "=="
279 
280 #define CONTINUE_FUNCTION_NAME "CONTINUE"
281 #define C_CONTINUE_FUNCTION_NAME ";"
282 #define C_STATEMENT_END_STRING ";"
283 #define RETURN_FUNCTION_NAME "RETURN"
284 #define STOP_FUNCTION_NAME "STOP"
285 #define PAUSE_FUNCTION_NAME "PAUSE"
286 #define END_FUNCTION_NAME "END"
287 #define ENDDO_FUNCTION_NAME "ENDDO"
288 
289 #define BREAK_FUNCTION_NAME "break"
290 #define CASE_FUNCTION_NAME "case"
291 #define DEFAULT_FUNCTION_NAME "default"
292 #define C_RETURN_FUNCTION_NAME "return"
293 
294 #define SUBSTRING_FUNCTION_NAME "_SUBSTR"
295 #define CONCATENATION_FUNCTION_NAME "//"
296 #define ASSIGN_SUBSTRING_FUNCTION_NAME "_ASSIGN_SUBSTR"
297 
298 #define WRITE_FUNCTION_NAME "WRITE"
299 #define PRINT_FUNCTION_NAME "PRINT"
300 #define REWIND_FUNCTION_NAME "REWIND"
301 #define OPEN_FUNCTION_NAME "OPEN"
302 #define CLOSE_FUNCTION_NAME "CLOSE"
303 #define INQUIRE_FUNCTION_NAME "INQUIRE"
304 #define BACKSPACE_FUNCTION_NAME "BACKSPACE"
305 #define READ_FUNCTION_NAME "READ"
306 #define BUFFERIN_FUNCTION_NAME "BUFFERIN"
307 #define BUFFEROUT_FUNCTION_NAME "BUFFEROUT"
308 #define ENDFILE_FUNCTION_NAME "ENDFILE"
309 #define FORMAT_FUNCTION_NAME "FORMAT"
310 
311 
312 /* Bit manipulation functions */
313 #define ISHFT_OPERATOR_NAME "ISHFT"
314 #define ISHFTC_OPERATOR_NAME "ISHFTC"
315 #define IBITS_OPERATOR_NAME "IBITS"
316 #define MVBITS_OPERATOR_NAME "MVBITS"
317 #define BTEST_OPERATOR_NAME "BTEST"
318 #define IBSET_OPERATOR_NAME "IBSET"
319 #define IBCLR_OPERATOR_NAME "IBCLR"
320 #define BIT_SIZE_OPERATOR_NAME "BIT_SIZE"
321 #define IAND_OPERATOR_NAME "IAND"
322 #define IEOR_OPERATOR_NAME "IEOR"
323 #define IOR_OPERATOR_NAME "IOR"
324 
325 /* OMP related function and opertor names */
326 
327 #define OMP_IF_FUNCTION_NAME "if"
328 #define OMP_OMP_FUNCTION_NAME "omp"
329 #define OMP_FOR_FUNCTION_NAME "for"
330 #define OMP_PRIVATE_FUNCTION_NAME "private"
331 #define OMP_PARALLEL_FUNCTION_NAME "parallel"
332 #define OMP_REDUCTION_FUNCTION_NAME "reduction"
333 
334 /* F95 */
335 #define ALLOCATE_FUNCTION_NAME "ALLOCATE"
336 #define DEALLOCATE_FUNCTION_NAME "DEALLOCATE"
337 #define ETIME_FUNCTION_NAME "ETIME"
338 #define DTIME_FUNCTION_NAME "DTIME"
339 #define CPU_TIME_FUNCTION_NAME "CPU_TIME"
340 
341 /* F2003 */
342 #define C_LOC_FUNCTION_NAME "C_LOC"
343 
344 /* F2008 */
345 
346 /* BSD <err.h> */
347 #define ERR_FUNCTION_NAME "err"
348 #define ERRX_FUNCTION_NAME "errx"
349 #define WARN_FUNCTION_NAME "warn"
350 #define WARNX_FUNCTION_NAME "warnx"
351 #define VERR_FUNCTION_NAME "verr"
352 #define VERRX_FUNCTION_NAME "verrx"
353 #define VWARN_FUNCTION_NAME "vwarn"
354 #define VWARNX_FUNCTION_NAME "vwarnx"
355 
356 /* time.h */
357 #define CLOCK_FUNCTION_NAME "clock"
358 #define TIME_FUNCTION_NAME "time"
359 #define DIFFTIME_FUNCTION_NAME "difftime"
360 #define MKTIME_FUNCTION_NAME "mktime"
361 #define STRFTIME_FUNCTION_NAME "strftime"
362 #define STRPTIME_FUNCTION_NAME "strptime"
363 #define STRFTIME_L_FUNCTION_NAME "strftime_l"
364 #define STRPTIME_L_FUNCTION_NAME "strptime_l"
365 #define GMTIME_FUNCTION_NAME "gmtime"
366 #define LOCALTIME_FUNCTION_NAME "localtime"
367 #define GMTIME_R_FUNCTION_NAME "gmtime_r"
368 #define LOCALTIME_R_FUNCTION_NAME "localtime_r"
369 #define ASCTIME_FUNCTION_NAME "asctime"
370 #define CTIME_FUNCTION_NAME "ctime"
371 #define ASCTIME_R_FUNCTION_NAME "asctime_r"
372 #define CTIME_R_FUNCTION_NAME "ctime_r"
373 #define TZSET_FUNCTION_NAME "tzset"
374 #define STIME_FUNCTION_NAME "stime"
375 #define TIMEGM_FUNCTION_NAME "timegm"
376 #define TIMELOCAL_FUNCTION_NAME "timelocal"
377 #define DYSIZE_FUNCTION_NAME "dysize"
378 #define NANOSLEEP_FUNCTION_NAME "nanosleep"
379 #define CLOCK_GETRES_FUNCTION_NAME "clock_getres"
380 #define CLOCK_GETTIME_FUNCTION_NAME "clock_gettime"
381 #define CLOCK_SETTIME_FUNCTION_NAME "clock_settime"
382 #define CLOCK_NANOSLEEP_FUNCTION_NAME "clock_nanosleep"
383 #define CLOCK_GETCPULOCKID_FUNCTION_NAME "clock_getcpulockid"
384 #define TIMER_CREATE_FUNCTION_NAME "timer_create"
385 #define TIMER_DELETE_FUNCTION_NAME "timer_delete"
386 #define TIMER_SETTIME_FUNCTION_NAME "timer_settime"
387 #define TIMER_GETTIME_FUNCTION_NAME "timer_gettime"
388 #define TIMER_GETOVERRUN_FUNCTION_NAME "timer_getoverrun"
389 #define GETDATE_FUNCTION_NAME "getdate"
390 #define GETDATE_R_FUNCTION_NAME "getdate_r"
391 
392 //to check
393 #define DRAND48_FUNCTION_NAME "drand48"
394 #define ERAND48_FUNCTION_NAME "erand48"
395 #define JRAND48_FUNCTION_NAME "jrand48"
396 #define LCONG48_FUNCTION_NAME "lcong48"
397 #define LRAND48_FUNCTION_NAME "lrand48"
398 #define MRAND48_FUNCTION_NAME "mrand48"
399 #define NRAND48_FUNCTION_NAME "nrand48"
400 #define SEED48_FUNCTION_NAME "seed48"
401 #define SRAND48_FUNCTION_NAME "srand48"
402 
403 #define PUTENV_FUNCTION_NAME "putenv"
404 #define SETKEY_FUNCTION_NAME "setkey"
405 #define SWAB_FUNCTION_NAME "swab"
406 #define MKSTEMP_FUNCTION_NAME "mkstemp"
407 #define MKSTEMP64_FUNCTION_NAME "mkstemp64"
408 #define A614_FUNCTION_NAME "a64l"
409 #define ECVT_FUNCTION_NAME "ecvt"
410 #define FCVT_FUNCTION_NAME "fcvt"
411 #define GCVT_FUNCTION_NAME "gcvt"
412 #define GETSUBOPT_FUNCTION_NAME "getsubopt"
413 #define GRANTPT_FUNCTION_NAME "grantpt"
414 #define INITSTATE_FUNCTION_NAME "initstate"
415 #define C_164A_FUNCTION_NAME "l64a"
416 #define MKTEMP_FUNCTION_NAME "mktemp"
417 #define PTSNAME_FUNCTION_NAME "ptsname"
418 #define REALPATH_FUNCTION_NAME "realpath"
419 #define SETSTATE_FUNCTION_NAME "setstate"
420 #define TTYSLOT_FUNCTION_NAME "ttyslot"
421 #define UNLOCKPT_FUNCTION_NAME "unlockpt"
422 #define VALLOC_FUNCTION_NAME "valloc"
423 #define DUP2_FUNCTION_NAME "dup2"
424 #define QECVT_FUNCTION_NAME "qecvt"
425 #define QFCVT_FUNCTION_NAME "qfcvt"
426 #define QGCVT_FUNCTION_NAME "qgcvt"
427 #define GETCWD_FUNCTION_NAME "getcwd"
428 #define GETEXECNAME_FUNCTION_NAME "getexecname"
429 #define GETLOGIN_FUNCTION_NAME "getlogin"
430 #define GETOPT_FUNCTION_NAME "getopt" // unistd.h
431 #define GETOPT_LONG_FUNCTION_NAME "getopt_long"
432 #define GETOPT_LONG_ONLY_FUNCTION_NAME "getopt_long_only"
433 #define GETPASS_FUNCTION_NAME "getpass"
434 #define GETPASSPHRASE_FUNCTION_NAME "getpassphrase"
435 #define GETPW_FUNCTION_NAME "getpw"
436 #define ISATTY_FUNCTION_NAME "isatty"
437 #define MEMALIGN_FUNCTION_NAME "memalign"
438 #define TTYNAME_FUNCTION_NAME "ttyname"
439 #define LLTOSTR_FUNCTION_NAME "lltostr"
440 #define ULLTOSTR_FUNCTION_NAME "ulltostr"
441 
442 #define POSIX_MEMALIGN_FUNCTION_NAME "posix_memalign"
443 #define ATOQ_FUNCTION_NAME "atoq"
444 #define RANDOM_FUNCTION_NAME "random"
445 #define SRANDOM_FUNCTION_NAME "srandom"
446 #define MOD_INTRINSIC_NAME "MOD"
447 
448 /* PIPS run-time support for C code generation
449  *
450  * The first argument is the number of effective arguments, the second
451  * argument is the first effective argument and other arguments are
452  * passed as varargs. For instance:
453  *
454  * pips_min(5, 1, 2, 3, 4, 5);
455  *
456  * Initially, the source code for these two operators is available in
457  * validation/Hyperplane/run_time.src/pips_run_time.c
458  */
459 #define PIPS_C_MIN_OPERATOR_NAME "pips_min"
460 #define PIPS_C_MAX_OPERATOR_NAME "pips_max"
461 #define PIPS_C_DIV_OPERATOR_NAME "pips_div"
462 
463 
464  /* Here are C intrinsics arranged in the order of the standard
465  ISO/IEC 9899:TC2. MB */
466 /* include <assert.h> */
467 
468 #define ASSERT_FUNCTION_NAME "__assert"
469 #define ASSERT_FAIL_FUNCTION_NAME "__assert_fail"
470 
471 /* include <complex.h> */
472 
473 #define CACOS_OPERATOR_NAME "cacos"
474 #define CACOSF_OPERATOR_NAME "cacosf"
475 #define CACOSL_OPERATOR_NAME "cacosl"
476 #define CASIN_OPERATOR_NAME "casin"
477 #define CASINF_OPERATOR_NAME "casinf"
478 #define CASINL_OPERATOR_NAME "casinl"
479 #define CATAN_OPERATOR_NAME "catan"
480 #define CATANF_OPERATOR_NAME "catanf"
481 #define CATANL_OPERATOR_NAME "catanl"
482 #define C_CCOS_OPERATOR_NAME "ccos"
483 #define CCOSF_OPERATOR_NAME "ccosf"
484 #define CCOSL_OPERATOR_NAME "ccosl"
485 #define C_CSIN_OPERATOR_NAME "csin"
486 #define CSINF_OPERATOR_NAME "csinf"
487 #define CSINL_OPERATOR_NAME "csinl"
488 #define CTAN_OPERATOR_NAME "ctan"
489 #define CTANF_OPERATOR_NAME "ctanf"
490 #define CTANL_OPERATOR_NAME "ctanl"
491 #define CACOSH_OPERATOR_NAME "cacosh"
492 #define CACOSHF_OPERATOR_NAME "cacoshf"
493 #define CACOSHL_OPERATOR_NAME "cacoshl"
494 #define CASINH_OPERATOR_NAME "casinh"
495 #define CASINHF_OPERATOR_NAME "casinhf"
496 #define CASINHL_OPERATOR_NAME "casinhl"
497 #define CATANH_OPERATOR_NAME "catanh"
498 #define CATANHF_OPERATOR_NAME "catanhf"
499 #define CATANHL_OPERATOR_NAME "catanhl"
500 #define CCOSH_OPERATOR_NAME "ccosh"
501 #define CCOSHF_OPERATOR_NAME "ccoshf"
502 #define CCOSHL_OPERATOR_NAME "ccoshl"
503 #define CSINH_OPERATOR_NAME "csinh"
504 #define CSINHF_OPERATOR_NAME "csinhf"
505 #define CSINHL_OPERATOR_NAME "csinhl"
506 #define CTANH_OPERATOR_NAME "ctanh"
507 #define CTANHF_OPERATOR_NAME "ctanhf"
508 #define CTANHL_OPERATOR_NAME "ctanhl"
509 #define C_CEXP_OPERATOR_NAME "cexp"
510 #define CEXPF_OPERATOR_NAME "cexpf"
511 #define CEXPL_OPERATOR_NAME "cexpl"
512 #define C_CLOG_OPERATOR_NAME "clog"
513 #define CLOGF_OPERATOR_NAME "clogf"
514 #define CLOGL_OPERATOR_NAME "clogl"
515 #define C_CABS_OPERATOR_NAME "cabs"
516 #define CABSF_OPERATOR_NAME "cabsf"
517 #define CABSL_OPERATOR_NAME "cabsl"
518 #define CPOW_OPERATOR_NAME "cpow"
519 #define CPOWF_OPERATOR_NAME "cpowf"
520 #define CPOWL_OPERATOR_NAME "cpowl"
521 #define C_CSQRT_OPERATOR_NAME "csqrt"
522 #define CSQRTF_OPERATOR_NAME "csqrtf"
523 #define CSQRTL_OPERATOR_NAME "csqrtl"
524 #define CARG_OPERATOR_NAME "carg"
525 #define CARGF_OPERATOR_NAME "cargf"
526 #define CARGL_OPERATOR_NAME "cargl"
527 #define CIMAG_OPERATOR_NAME "cimag"
528 #define GCC_CIMAG_OPERATOR_NAME "__imag__"
529 #define CIMAGF_OPERATOR_NAME "cimagf"
530 #define CIMAGL_OPERATOR_NAME "cimagl"
531 #define CONJ_OPERATOR_NAME "conj"
532 #define CONJF_OPERATOR_NAME "conjf"
533 #define CONJL_OPERATOR_NAME "conjl"
534 #define CPROJ_OPERATOR_NAME "cproj"
535 #define CPROJF_OPERATOR_NAME "cprojf"
536 #define CPROJL_OPERATOR_NAME "cprojl"
537 #define CREAL_OPERATOR_NAME "creal"
538 #define GCC_CREAL_OPERATOR_NAME "__real__"
539 #define CREALF_OPERATOR_NAME "crealf"
540 #define CREALL_OPERATOR_NAME "creall"
541 
542 
543 /* #include <ctype.h> */
544 
545 #define ISALNUM_OPERATOR_NAME "isalnum"
546 #define ISALPHA_OPERATOR_NAME "isalpha"
547 #define ISBLANK_OPERATOR_NAME "isblank"
548 #define ISCNTRL_OPERATOR_NAME "iscntrl"
549 #define ISDIGIT_OPERATOR_NAME "isdigit"
550 #define ISGRAPH_OPERATOR_NAME "isgraph"
551 #define ISLOWER_OPERATOR_NAME "islower"
552 #define ISPRINT_OPERATOR_NAME "isprint"
553 #define ISPUNCT_OPERATOR_NAME "ispunct"
554 #define ISSPACE_OPERATOR_NAME "isspace"
555 #define ISUPPER_OPERATOR_NAME "isupper"
556 #define ISXDIGIT_OPERATOR_NAME "isxdigit"
557 #define TOLOWER_OPERATOR_NAME "tolower"
558 #define TOUPPER_OPERATOR_NAME "toupper"
559 
560 //not found in standard C99 (in GNU C Library)
561 #define ISASCII_OPERATOR_NAME "isascii"
562 #define TOASCII_OPERATOR_NAME "toascii"
563 #define _TOLOWER_OPERATOR_NAME "_tolower"
564 #define _TOUPPER_OPERATOR_NAME "_toupper"
565 
566 /* Part of the binary standard */
567 #define CTYPE_B_LOC_OPERATOR_NAME "__ctype_b_loc"
568 
569 
570 /* bits/errno.h */
571 #define __ERRNO_LOCATION_OPERATOR_NAME "__errno_location"
572 
573 
574 /* #include <fenv.h> */
575 #define FECLEAREXCEPT_FUNCTION_NAME "feclearexcept"
576 #define FERAISEEXCEPT_FUNCTION_NAME "feraiseexcept"
577 #define FESETEXCEPTFLAG_FUNCTION_NAME "fesetexceptflag"
578 #define FETESTEXCEPT_FUNCTION_NAME "fetestexcept"
579 #define FEGETROUND_FUNCTION_NAME "fegetround"
580 #define FESETROUND_FUNCTION_NAME "fesetround"
581 
582 /* #include <inttypes.h> */
583 #define IMAXABS_FUNCTION_NAME "imaxabs"
584 #define IMAXDIV_FUNCTION_NAME "imaxdiv"
585 
586 /* #include <locale.h> */
587 #define SETLOCALE_FUNCTION_NAME "setlocale"
588 
589 /* #include <math.h> */
590 
591 #define FPCLASSIFY_OPERATOR_NAME "fpclassify"
592 #define ISFINITE_OPERATOR_NAME "isfinite"
593 #define ISINF_OPERATOR_NAME "isinf"
594 #define ISNAN_OPERATOR_NAME "isnan"
595 #define ISNANL_OPERATOR_NAME "isnanl"
596 #define ISNANF_OPERATOR_NAME "isnanf"
597 #define ISNORMAL_OPERATOR_NAME "isnormal"
598 #define SIGNBIT_OPERATOR_NAME "signbit"
599 #define C_ACOS_OPERATOR_NAME "acos"
600 #define ACOSF_OPERATOR_NAME "acosf"
601 #define ACOSL_OPERATOR_NAME "acosl"
602 #define C_ASIN_OPERATOR_NAME "asin"
603 #define ASINF_OPERATOR_NAME "asinf"
604 #define ASINL_OPERATOR_NAME "asinl"
605 #define C_ATAN_OPERATOR_NAME "atan"
606 #define ATANF_OPERATOR_NAME "atanf"
607 #define ATANL_OPERATOR_NAME "atanl"
608 #define C_ATAN2_OPERATOR_NAME "atan2"
609 #define ATAN2F_OPERATOR_NAME "atan2f"
610 #define ATAN2L_OPERATOR_NAME "atan2l"
611 #define C_COS_OPERATOR_NAME "cos"
612 #define COSF_OPERATOR_NAME "cosf"
613 #define COSL_OPERATOR_NAME "cosl"
614 #define C_SIN_OPERATOR_NAME "sin"
615 #define SINF_OPERATOR_NAME "sinf"
616 #define SINL_OPERATOR_NAME "sinl"
617 #define C_TAN_OPERATOR_NAME "tan"
618 #define TANF_OPERATOR_NAME "tanf"
619 #define TANL_OPERATOR_NAME "tanl"
620 #define C_ACOSH_OPERATOR_NAME "acosh"
621 #define ACOSHF_OPERATOR_NAME "acoshf"
622 #define ACOSHL_OPERATOR_NAME "acoshl"
623 #define C_ASINH_OPERATOR_NAME "asinh"
624 #define ASINHF_OPERATOR_NAME "asinhf"
625 #define ASINHL_OPERATOR_NAME "asinhl"
626 #define C_ATANH_OPERATOR_NAME "atanh"
627 #define ATANHF_OPERATOR_NAME "atanhf"
628 #define ATANHL_OPERATOR_NAME "atanhl"
629 #define C_COSH_OPERATOR_NAME "cosh"
630 #define COSHF_OPERATOR_NAME "coshf"
631 #define COSHL_OPERATOR_NAME "coshl"
632 #define C_SINH_OPERATOR_NAME "sinh"
633 #define SINHF_OPERATOR_NAME "sinhf"
634 #define SINHL_OPERATOR_NAME "sinhl"
635 #define C_TANH_OPERATOR_NAME "tanh"
636 #define TANHF_OPERATOR_NAME "tanhf"
637 #define TANHL_OPERATOR_NAME "tanhl"
638 #define C_EXP_OPERATOR_NAME "exp"
639 #define EXPF_OPERATOR_NAME "expf"
640 #define EXPL_OPERATOR_NAME "expl"
641 #define EXP2_OPERATOR_NAME "exp2"
642 #define EXP2F_OPERATOR_NAME "exp2f"
643 #define EXP2L_OPERATOR_NAME "exp2l"
644 #define EXPM1_OPERATOR_NAME "expm1"
645 #define EXPM1F_OPERATOR_NAME "expm1f"
646 #define EXPM1L_OPERATOR_NAME "expm1l"
647 #define FREXP_OPERATOR_NAME "frexp"
648 #define ILOGB_OPERATOR_NAME "ilogb"
649 #define ILOGBF_OPERATOR_NAME "ilogbf"
650 #define ILOGBL_OPERATOR_NAME "ilogbl"
651 #define LDEXP_OPERATOR_NAME "ldexp"
652 #define LDEXPF_OPERATOR_NAME "ldexpf"
653 #define LDEXPL_OPERATOR_NAME "ldexpl"
654 #define C_LOG_OPERATOR_NAME "log"
655 #define LOGF_OPERATOR_NAME "logf"
656 #define LOGL_OPERATOR_NAME "logl"
657 #define C_LOG10_OPERATOR_NAME "log10"
658 #define LOG10F_OPERATOR_NAME "log10f"
659 #define LOG10L_OPERATOR_NAME "log10l"
660 #define LOG1P_OPERATOR_NAME "log1p"
661 #define LOG1PF_OPERATOR_NAME "log1pf"
662 #define LOG1PL_OPERATOR_NAME "log1pl"
663 #define LOG2_OPERATOR_NAME "log2"
664 #define LOG2F_OPERATOR_NAME "log2f"
665 #define LOG2L_OPERATOR_NAME "log2l"
666 #define LOGB_OPERATOR_NAME "logb"
667 #define LOGBF_OPERATOR_NAME "logbf"
668 #define LOGBL_OPERATOR_NAME "logbl"
669 #define MODF_OPERATOR_NAME "modf"
670 #define SCALBN_OPERATOR_NAME "scalbn"
671 #define SCALBNF_OPERATOR_NAME "scalbnf"
672 #define SCALBNL_OPERATOR_NAME "scalbnl"
673 #define SCALB_OPERATOR_NAME "scalb"
674 #define SCALBLN_OPERATOR_NAME "scalbln"
675 #define SCALBLNF_OPERATOR_NAME "scalblnf"
676 #define SCALBLNL_OPERATOR_NAME "scalblnl"
677 #define CBRT_OPERATOR_NAME "cbrt"
678 #define CBRTF_OPERATOR_NAME "cbrtf"
679 #define CBRTL_OPERATOR_NAME "cbrtl"
680 #define FABS_OPERATOR_NAME "fabs"
681 #define FABSF_OPERATOR_NAME "fabsf"
682 #define FABSL_OPERATOR_NAME "fabsl"
683 #define HYPOT_OPERATOR_NAME "hypot"
684 #define HYPOTF_OPERATOR_NAME "hypotf"
685 #define HYPOTL_OPERATOR_NAME "hypotl"
686 #define POW_OPERATOR_NAME "pow"
687 #define POWF_OPERATOR_NAME "powf"
688 #define POWL_OPERATOR_NAME "powl"
689 #define C_SQRT_OPERATOR_NAME "sqrt"
690 #define SQRTF_OPERATOR_NAME "sqrtf"
691 #define SQRTL_OPERATOR_NAME "sqrtl"
692 #define ERF_OPERATOR_NAME "erf"
693 #define ERFF_OPERATOR_NAME "erff"
694 #define ERFL_OPERATOR_NAME "erfl"
695 #define ERFC_OPERATOR_NAME "erfc"
696 #define ERFCF_OPERATOR_NAME "erfcf"
697 #define ERFCL_OPERATOR_NAME "erfcl"
698 #define GAMMA_OPERATOR_NAME "gamma"
699 #define LGAMMA_OPERATOR_NAME "lgamma"
700 #define LGAMMAF_OPERATOR_NAME "lgammaf"
701 #define LGAMMAL_OPERATOR_NAME "lgammal"
702 #define TGAMMA_OPERATOR_NAME "tgamma"
703 #define TGAMMAF_OPERATOR_NAME "tgammaf"
704 #define TGAMMAL_OPERATOR_NAME "tgammal"
705 #define CEIL_OPERATOR_NAME "ceil"
706 #define CEILF_OPERATOR_NAME "ceilf"
707 #define CEILL_OPERATOR_NAME "ceill"
708 #define FLOOR_OPERATOR_NAME "floor"
709 #define FLOORF_OPERATOR_NAME "floorf"
710 #define FLOORL_OPERATOR_NAME "floorl"
711 #define NEARBYINT_OPERATOR_NAME "nearbyint"
712 #define NEARBYINTF_OPERATOR_NAME "nearbyintf"
713 #define NEARBYINTL_OPERATOR_NAME "nearbyintl"
714 #define RINT_OPERATOR_NAME "rint"
715 #define RINTF_OPERATOR_NAME "rintf"
716 #define RINTL_OPERATOR_NAME "rintl"
717 #define LRINT_OPERATOR_NAME "lrint"
718 #define LRINTF_OPERATOR_NAME "lrintf"
719 #define LRINTL_OPERATOR_NAME "lrintl"
720 #define LLRINT_OPERATOR_NAME "llrint"
721 #define LLRINTF_OPERATOR_NAME "llrintf"
722 #define LLRINTL_OPERATOR_NAME "llrintl"
723 #define ROUND_OPERATOR_NAME "round"
724 #define ROUNDF_OPERATOR_NAME "roundf"
725 #define ROUNDL_OPERATOR_NAME "roundl"
726 #define LROUND_OPERATOR_NAME "lround"
727 #define LROUNDF_OPERATOR_NAME "lroundf"
728 #define LROUNDL_OPERATOR_NAME "lroundl"
729 #define LLROUND_OPERATOR_NAME "llround"
730 #define LLROUNDF_OPERATOR_NAME "llroundf"
731 #define LLROUNDL_OPERATOR_NAME "llroundl"
732 #define TRUNC_OPERATOR_NAME "trunc"
733 #define TRUNCF_OPERATOR_NAME "truncf"
734 #define TRUNCL_OPERATOR_NAME "truncl"
735 #define FMOD_OPERATOR_NAME "fmod"
736 #define FMODF_OPERATOR_NAME "fmodf"
737 #define FMODL_OPERATOR_NAME "fmodl"
738 #define REMAINDER_OPERATOR_NAME "remainder"
739 #define REMAINDERF_OPERATOR_NAME "remainderf"
740 #define REMAINDERL_OPERATOR_NAME "remainderl"
741 #define COPYSIGN_OPERATOR_NAME "copysign"
742 #define COPYSIGNF_OPERATOR_NAME "copysignf"
743 #define COPYSIGNL_OPERATOR_NAME "copysignl"
744 #define NAN_OPERATOR_NAME "nan"
745 #define NANF_OPERATOR_NAME "nanf"
746 #define NANL_OPERATOR_NAME "nanl"
747 #define NEXTAFTER_OPERATOR_NAME "nextafter"
748 #define NEXTAFTERF_OPERATOR_NAME "nextafterf"
749 #define NEXTAFTERL_OPERATOR_NAME "nextafterl"
750 #define NEXTTOWARD_OPERATOR_NAME "nexttoward"
751 #define NEXTTOWARDF_OPERATOR_NAME "nexttowardf"
752 #define NEXTTOWARDL_OPERATOR_NAME "nexttowardl"
753 #define FDIM_OPERATOR_NAME "fdim"
754 #define FDIMF_OPERATOR_NAME "fdimf"
755 #define FDIML_OPERATOR_NAME "fdiml"
756 #define FMAX_OPERATOR_NAME "fmax"
757 #define FMAXF_OPERATOR_NAME "fmaxf"
758 #define FMAXL_OPERATOR_NAME "fmaxl"
759 #define FMIN_OPERATOR_NAME "fmin"
760 #define FMINF_OPERATOR_NAME "fminf"
761 #define FMINL_OPERATOR_NAME "fminl"
762 #define FMA_OPERATOR_NAME "fma"
763 #define FMAF_OPERATOR_NAME "fmaf"
764 #define FMAL_OPERATOR_NAME "fmal"
765 #define ISGREATER_OPERATOR_NAME "isgreater"
766 #define ISGREATEREQUAL_OPERATOR_NAME "isgreaterequal"
767 #define ISLESS_OPERATOR_NAME "isless"
768 #define ISLESSEQUAL_OPERATOR_NAME "islessequal"
769 #define ISLESSGREATER_OPERATOR_NAME "islessgreater"
770 #define ISUNORDERED_OPERATOR_NAME "isunordered"
771 
772 
773 /* signal.h */
774 #define SIGNAL_OPERATOR_NAME "signal"
775 #define RAISE_FUNCTION_NAME "raise"
776 
777 
778 /* vararg stuff. va_args is a special construct because its second
779  parameter is a type, not an expression. */
780 #define BUILTIN_VA_END "__builtin_va_end"
781 #define BUILTIN_VA_START "__builtin_va_start"
782 #define BUILTIN_VA_COPY "__builtin_va_copy"
783 
784 
785 /*io functions: C library and system IO. Amira Mensi*/
786 
787 /* unistd.h */
788 
789 #define LSEEK_FUNCTION_NAME "lseek"
790 #define LSEEK64_FUNCTION_NAME "lseekg4"
791 #define C_CLOSE_FUNCTION_NAME "close"
792 #define C_READ_FUNCTION_NAME "read"
793 #define C_WRITE_FUNCTION_NAME "write"
794 #define PREAD_FUNCTION_NAME "pread"
795 #define PWRITE_FUNCTION_NAME "pwrite"
796 #define PREAD64_FUNCTION_NAME "pread64"
797 #define PIPE_FUNCTION_NAME "pipe"
798 #define PIPE2_FUNCTION_NAME "pipe2"
799 #define SLEEP_FUNCTION_NAME "sleep"
800 #define UALARM_FUNCTION_NAME "ualarm"
801 #define USLEEP_FUNCTION_NAME "usleep"
802 #define C_PAUSE_FUNCTION_NAME "pause"
803 #define CHOWN_FUNCTION_NAME "chown"
804 #define FCHOWN_FUNCTION_NAME "fchown"
805 #define LCHOWN_FUNCTION_NAME "lchown"
806 #define FCHOWNAT_FUNCTION_NAME "fchownat"
807 #define CHDIR_FUNCTION_NAME "chdir"
808 #define FCHDIR_FUNCTION_NAME "fchdir"
809 #define GETCWD_FUNCTION_NAME "getcwd"
810 #define GET_CURRENT_DIR_NAME_FUNCTION_NAME "get_current_dir_name"
811 #define GETWD_FUNCTION_NAME "getwd"
812 #define DUP_FUNCTION_NAME "dup"
813 #define DUP2_FUNCTION_NAME "dup2"
814 #define DUP3_FUNCTION_NAME "dup3"
815 #define EXECVE_FUNCTION_NAME "execve"
816 #define FEXECVE_FUNCTION_NAME "fexecve"
817 #define EXECV_FUNCTION_NAME "execv"
818 #define EXECLE_FUNCTION_NAME "execle"
819 #define EXECL_FUNCTION_NAME "execl"
820 #define EXECVP_FUNCTION_NAME "execvp"
821 #define EXECLP_FUNCTION_NAME "execlp"
822 #define EXECVPE_FUNCTION_NAME "execvpe"
823 #define NICE_FUNCTION_NAME "nice"
824 #define _EXIT_FUNCTION_NAME "_exit"
825 #define PATHCONF_FUNCTION_NAME "pathconf"
826 #define FPATHCONF_FUNCTION_NAME "fpathconf"
827 #define SYSCONF_FUNCTION_NAME "sysconf"
828 #define CONFSTR_FUNCTION_NAME "constrf"
829 #define GETPID_FUNCTION_NAME "getpid"
830 #define GETPPID_FUNCTION_NAME "getppid"
831 #define GETPGRP_FUNCTION_NAME "getpgrp"
832 #define __GETPGID_FUNCTION_NAME "__getpgid"
833 #define GETPGID_FUNCTION_NAME "getpgid"
834 #define SETPGID_FUNCTION_NAME "setpgid"
835 #define SETPGRP_FUNCTION_NAME "setpgrp"
836 #define SETSID_FUNCTION_NAME "setsid"
837 #define GETSID_FUNCTION_NAME "getsid"
838 #define GETUID_FUNCTION_NAME "getuid"
839 #define GETEUID_FUNCTION_NAME "geteuid"
840 #define GETGID_FUNCTION_NAME "getgid"
841 #define GETEGID_FUNCTION_NAME "getegid"
842 #define GETPGROUPS_FUNCTION_NAME "getgroups"
843 #define GROUP_MEMBER_FUNCTION_NAME "group_member"
844 #define SETUID_FUNCTION_NAME "setuid"
845 #define SETREUID_FUNCTION_NAME "setreuid"
846 #define SETEUID_FUNCTION_NAME "seteuid"
847 #define SETGID_FUNCTION_NAME "setgid"
848 #define SETREGID_FUNCTION_NAME "setregid"
849 #define SETEGID_FUNCTION_NAME "setegid"
850 #define GETRESUID_FUNCTION_NAME "getresuid"
851 #define GETRESGID_FUNCTION_NAME "getresgid"
852 #define SETRESUID_FUNCTION_NAME "setresuid"
853 #define SETRESGID_FUNCTION_NAME "setresgid"
854 #define FORK_FUNCTION_NAME "fork"
855 #define VFORK_FUNCTION_NAME "vfork"
856 #define TTYNAME_FUNCTION_NAME "ttyname"
857 #define TTYNAME_R_FUNCTION_NAME "ttyname_r"
858 #define ISATTY_FUNCTION_NAME "isatty"
859 #define TTYSLOT_FUNCTION_NAME "ttyslot"
860 #define LINK_FUNCTION_NAME "link"
861 #define LINKAT_FUNCTION_NAME "linkat"
862 #define SYMLINK_FUNCTION_NAME "symlink"
863 #define READLINK_FUNCTION_NAME "readlink"
864 #define SYMLINKAT_FUNCTION_NAME "symlinkar"
865 #define READLINKAT_FUNCTION_NAME "readlinkat"
866 #define UNLINK_FUNCTION_NAME "unlink"
867 #define UNLINKAT_FUNCTION_NAME "unlinkat"
868 #define RMDIR_FUNCTION_NAME "rmdir"
869 #define TCGETPGRP_FUNCTION_NAME "tcgetpgrp"
870 #define TCSETPGRP_FUNCTION_NAME "tcsetpgrp"
871 #define GETLOGIN_FUNCTION_NAME "getlogin"
872 #define GETLOGIN_R_FUNCTION_NAME "getlogin_r"
873 #define SETLOGIN_FUNCTION_NAME "setlogin"
874 #define GETHOSTNAME_FUNCTION_NAME "gethostname"
875 #define SETHOSTNAME_FUNCTION_NAME "sethostname"
876 #define SETHOSTID_FUNCTION_NAME "sethostid"
877 #define GETDOMAINNAME_FUNCTION_NAME "getdomainname"
878 #define SETDOMAINNAME_FUNCTION_NAME "setdomainname"
879 #define VHANGUP_FUNCTION_NAME "vhangup"
880 #define REVOKE_FUNCTION_NAME "revoke"
881 #define PROFIL_FUNCTION_NAME "profil"
882 #define ACCT_FUNCTION_NAME "acct"
883 #define GETUSERSHELL_FUNCTION_NAME "getusershell"
884 #define ENDUSERSHELL_FUNCTION_NAME "endusershell"
885 #define SETUSERSHELL_FUNCTION_NAME "setusershell"
886 #define DAEMON_FUNCTION_NAME "daemon"
887 #define CHROOT_FUNCTION_NAME "chroot"
888 #define GETPASS_FUNCTION_NAME "getpass"
889 #define FSYNC_FUNCTION_NAME "fsync"
890 #define SYNCFS_FUNCTION_NAME "syncfs"
891 #define GETHOSTID_FUNCTION_NAME "gethostid"
892 #define GETPAGESIZE_FUNCTION_NAME "getpagesize"
893 #define GETDTABLESIZE_FUNCTION_NAME "getdtablesize"
894 #define TRUNCATE_FUNCTION_NAME "truncate"
895 #define TRUNCATE64_FUNCTION_NAME "truncate64"
896 #define FTRUNCATE_FUNCTION_NAME "ftruncate"
897 #define FTRUNCATE64_FUNCTION_NAME "ftruncate64"
898 #define BRK_FUNCTION_NAME "brk"
899 #define SBRK_FUNCTION_NAME "sbrk"
900 #define SYSCALL_FUNCTION_NAME "syscall"
901 #define LOCKF_FUNCTION_NAME "lockf"
902 #define LOCKF64_FUNCTION_NAME "lockf64"
903 #define FDATASYNC_FUNCTION_NAME "fdatasync"
904 #define CRYPT_FUNCTION_NAME "crypt"
905 #define ENCRYPT_FUNCTION_NAME "encrypt"
906 #define SWAB_FUNCTION_NAME "swab"
907 #define CTERMID_FUNCTION_NAME "ctermid"
908 /* Not found in unistd.h. Requires sys/types.h sys/stat.h and fcntl.h.
909  * The man -S 2 page indicates it is overloaded with two or three
910  * arguments.
911  */
912 #define C_OPEN_FUNCTION_NAME "open"
913 
914 /*#include<stdio.h> */
915 
916 #define PRINTF_FUNCTION_NAME "printf"
917 #define FPRINTF_FUNCTION_NAME "fprintf"
918 #define SCANF_FUNCTION_NAME "scanf"
919 #define ISOC99_SCANF_FUNCTION_NAME "__isoc99_scanf"
920 #define ISOC99_SCANF_USER_FUNCTION_NAME "scanf"
921 #define FSCANF_FUNCTION_NAME "fscanf"
922 #define ISOC99_FSCANF_FUNCTION_NAME "__isoc99_fscanf"
923 #define ISOC99_FSCANF_USER_FUNCTION_NAME "fscanf"
924 #define PUTS_FUNCTION_NAME "puts"
925 #define GETS_FUNCTION_NAME "gets"
926 #define FPUTS_FUNCTION_NAME "fputs"
927 #define FGETS_FUNCTION_NAME "fgets"
928 #define FPUTC_FUNCTION_NAME "fputc"
929 #define FGETC_FUNCTION_NAME "fgetc"
930 #define FOPEN_FUNCTION_NAME "fopen"
931 #define FDOPEN_FUNCTION_NAME "fdopen"
932 #define FREOPEN_FUNCTION_NAME "freopen"
933 #define FCLOSE_FUNCTION_NAME "fclose"
934 #define SNPRINTF_FUNCTION_NAME "snprintf"
935 #define SSCANF_FUNCTION_NAME "sscanf"
936 #define ISOC99_SSCANF_FUNCTION_NAME "__isoc99_sscanf"
937 #define ISOC99_SSCANF_USER_FUNCTION_NAME "sscanf"
938 #define VFPRINTF_FUNCTION_NAME "vfprintf"
939 #define VFSCANF_FUNCTION_NAME "vfscanf"
940 #define ISOC99_VFSCANF_FUNCTION_NAME "__isoc99_vfscanf"
941 #define ISOC99_VFSCANF_USER_FUNCTION_NAME "vfscanf"
942 #define VPRINTF_FUNCTION_NAME "vprintf"
943 #define VSCANF_FUNCTION_NAME "vscanf"
944 #define ISOC99_VSCANF_FUNCTION_NAME "__isoc99_vscanf"
945 #define ISOC99_VSCANF_USER_FUNCTION_NAME "vscanf"
946 #define VSSCANF_FUNCTION_NAME "vsscanf"
947 #define ISOC99_VSSCANF_FUNCTION_NAME "__isoc99_vsscanf"
948 #define ISOC99_VSSCANF_USER_FUNCTION_NAME "vsscanf"
949 #define VSNPRINTF_FUNCTION_NAME "vsnprintf"
950 #define VSPRINTF_FUNCTION_NAME "vsprintf"
951 #define SPRINTF_FUNCTION_NAME "sprintf"
952 #define GETC_FUNCTION_NAME "getc"
953 #define _IO_GETC_FUNCTION_NAME "_IO_getc" /* libio.h */
954 #define GETCHAR_FUNCTION_NAME "getchar"
955 #define PUTC_FUNCTION_NAME "putc"
956 #define _IO_PUTC_FUNCTION_NAME "_IO_putc" /* libio.h */
957 #define PUTCHAR_FUNCTION_NAME "putchar"
958 #define UNGETC_FUNCTION_NAME "ungetc"
959 #define FREAD_FUNCTION_NAME "fread"
960 #define FWRITE_FUNCTION_NAME "fwrite"
961 #define FGETPOS_FUNCTION_NAME "fgetpos"
962 #define FSEEK_FUNCTION_NAME "fseek"
963 #define FSETPOS_FUNCTION_NAME "fsetpos"
964 #define FTELL_FUNCTION_NAME "ftell"
965 #define C_REWIND_FUNCTION_NAME "rewind"
966 #define CLEARERR_FUNCTION_NAME "clearerr"
967 #define FEOF_FUNCTION_NAME "feof"
968 #define FERROR_FUNCTION_NAME "ferror"
969 #define FILENO_FUNCTION_NAME "fileno"
970 #define PERROR_FUNCTION_NAME "perror"
971 // #define WRITE_SYSTEM_FUNCTION_NAME "write"
972 // #define READ_SYSTEM_FUNCTION_NAME "read"
973 #define REMOVE_FUNCTION_NAME "remove"
974 #define RENAME_FUNCTION_NAME "rename"
975 #define TMPFILE_FUNCTION_NAME "tmpfile"
976 #define TMPNAM_FUNCTION_NAME "tmpnam"
977 #define FFLUSH_FUNCTION_NAME "fflush"
978 #define FREOPEN_FUNCTION_NAME "freopen"
979 #define SETBUF_FUNCTION_NAME "setbuf"
980 #define SETVBUF_FUNCTION_NAME "setvbuf"
981 #define __FILBUF_FUNCTION_NAME "__filbuf"
982 #define __FILSBUF_FUNCTION_NAME "__flsbuf"
983 #define SETBUFFER_FUNCTION_NAME "setbuffer"
984 #define SETLINEBUF_FUNCTION_NAME "setlinebuf"
985 #define FDOPEN_FUNCTION_NAME "fdopen"
986 #define CTERMID_FUNCTION_NAME "ctermid"
987 #define FILENO_FUNCTION_NAME "fileno"
988 #define POPEN_FUNCTION_NAME "popen"
989 #define CUSERID_FUNCTION_NAME "cuserid"
990 #define TEMPNAM_FUNCTION_NAME "tempnam"
991 #define GETW_FUNCTION_NAME "getw"
992 #define PUTW_FUNCTION_NAME "putw"
993 #define PCLOSE_FUNCTION_NAME "pclose"
994 #define FSEEKO_FUNCTION_NAME "fseeko"
995 #define FTELLO_FUNCTION_NAME "ftello"
996 #define FOPEN64_FUNCTION_NAME "fopen64"
997 #define FREOPEN64_FUNCTION_NAME "freopen64"
998 #define TMPFILE64_FUNCTION_NAME "tmpfile64"
999 #define FGETPOS64_FUNCTION_NAME "fgetpos64"
1000 #define FSETPOS64_FUNCTION_NAME "fsetpos64"
1001 #define FSEEKO64_FUNCTION_NAME "fseeko64"
1002 #define FTELLO64_FUNCTION_NAME "ftello64"
1003 #define EXITHANDLE_FUNCTION_NAME "exithandle"
1004 
1005 
1006 /* random functions of <stdlib.h> */
1007 
1008 
1009 #define ATOF_FUNCTION_NAME "atof"
1010 #define ATOI_FUNCTION_NAME "atoi"
1011 #define ATOL_FUNCTION_NAME "atol"
1012 #define ATOLL_FUNCTION_NAME "atoll"
1013 #define STRTOD_FUNCTION_NAME "strtod"
1014 #define STRTOF_FUNCTION_NAME "strtof"
1015 #define STRTOLD_FUNCTION_NAME "strtold"
1016 #define STRTOL_FUNCTION_NAME "strtol"
1017 #define STRTOLL_FUNCTION_NAME "strtoll"
1018 #define STRTOUL_FUNCTION_NAME "strtoul"
1019 #define STRTOULL_FUNCTION_NAME "strtoull"
1020 #define RAND_FUNCTION_NAME "rand"
1021 #define SRAND_FUNCTION_NAME "srand"
1022 #define CALLOC_FUNCTION_NAME "calloc"
1023 #define FREE_FUNCTION_NAME "free"
1024 #define MALLOC_FUNCTION_NAME "malloc"
1025 #define REALLOC_FUNCTION_NAME "realloc"
1026 #define ALLOCA_FUNCTION_NAME "alloca"
1027 #define ABORT_FUNCTION_NAME "abort"
1028 #define ATEXIT_FUNCTION_NAME "atexit"
1029 #define EXIT_FUNCTION_NAME "exit"
1030 #define _EXIT_FUNCTION_NAME "_exit"
1031 #define GETENV_FUNCTION_NAME "getenv"
1032 #define SYSTEM_FUNCTION_NAME "system"
1033 #define BSEARCH_FUNCTION_NAME "bsearch"
1034 #define QSORT_FUNCTION_NAME "qsort"
1035 #define C_ABS_FUNCTION_NAME "abs"
1036 #define LABS_FUNCTION_NAME "labs"
1037 #define LLABS_FUNCTION_NAME "llabs"
1038 #define DIV_FUNCTION_NAME "div"
1039 #define LDIV_FUNCTION_NAME "ldiv"
1040 #define LLDIV_FUNCTION_NAME "lldiv"
1041 #define MBLEN_FUNCTION_NAME "mblen"
1042 #define MBTOWC_FUNCTION_NAME "mbtowc"
1043 #define WCTOMB_FUNCTION_NAME "wctomb"
1044 #define MBSTOWCS_FUNCTION_NAME "mbstowcs"
1045 #define WCSTOMBS_FUNCTION_NAME "wcstombs"
1046 
1047 
1048 
1049 /* include <string.h> */
1050 
1051 #define MEMCPY_FUNCTION_NAME "memcpy"
1052 #define MEMMOVE_FUNCTION_NAME "memmove"
1053 #define STRCPY_FUNCTION_NAME "strcpy"
1054 #define STRDUP_FUNCTION_NAME "strdup"
1055 #define STRNCPY_FUNCTION_NAME "strncpy"
1056 #define STRCAT_FUNCTION_NAME "strcat"
1057 #define STRNCAT_FUNCTION_NAME "strncat"
1058 #define MEMCMP_FUNCTION_NAME "memcmp"
1059 #define STRCMP_FUNCTION_NAME "strcmp"
1060 #define STRCOLL_FUNCTION_NAME "strcoll"
1061 #define STRNCMP_FUNCTION_NAME "strncmp"
1062 #define STRXFRM_FUNCTION_NAME "strxfrm"
1063 #define MEMCHR_FUNCTION_NAME "memchr"
1064 #define STRCHR_FUNCTION_NAME "strchr"
1065 #define STRCSPN_FUNCTION_NAME "strcspn"
1066 #define STRPBRK_FUNCTION_NAME "strbprk"
1067 #define STRRCHR_FUNCTION_NAME "strrchr"
1068 #define STRSPN_FUNCTION_NAME "strspn"
1069 #define STRSTR_FUNCTION_NAME "strstr"
1070 #define STRTOK_FUNCTION_NAME "strtok"
1071 #define MEMSET_FUNCTION_NAME "memset"
1072 //#define FOPEN_FUNCTION_NAME "fopen"
1073 #define STRERROR_FUNCTION_NAME "strerror"
1074 #define STRERROR_R_FUNCTION_NAME "strerror_r"
1075 #define STRLEN_FUNCTION_NAME "strlen"
1076 
1077 
1078 /*#include<time.h> */
1079 #define TIME_FUNCTION_NAME "time"
1080 #define LOCALTIME_FUNCTION_NAME "localtime"
1081 #define DIFFTIME_FUNCTION_NAME "difftime"
1082 #define NANOSLEEP_FUNCTION_NAME "nanosleep"
1083 
1084 
1085 /* #include <wchar.h> */
1086 #define FWPRINTF_FUNCTION_NAME "fwprintf"
1087 #define FWSCANF_FUNCTION_NAME "fwscanf"
1088 #define SWPRINTF_FUNCTION_NAME "swprintf"
1089 #define SWSCANF_FUNCTION_NAME "swscanf"
1090 #define VFWPRINTF_FUNCTION_NAME "vfwprintf"
1091 #define VFWSCANF_FUNCTION_NAME "vfwscanf"
1092 #define VSWPRINTF_FUNCTION_NAME "vswprintf"
1093 #define VSWSCANF_FUNCTION_NAME "vswscanf"
1094 #define VWPRINTF_FUNCTION_NAME "vwprintf"
1095 #define VWSCANF_FUNCTION_NAME "vwscanf"
1096 #define WPRINTF_FUNCTION_NAME "wprintf"
1097 #define WSCANF_FUNCTION_NAME "wscanf"
1098 #define FGETWC_FUNCTION_NAME "fgetwc"
1099 #define FGETWS_FUNCTION_NAME "fgetws"
1100 #define FPUTWC_FUNCTION_NAME "fputwc"
1101 #define FPUTWS_FUNCTION_NAME "fputws"
1102 #define FWIDE_FUNCTION_NAME "fwide"
1103 #define GETWC_FUNCTION_NAME "getwc"
1104 #define GETWCHAR_FUNCTION_NAME "getwchar"
1105 #define PUTWC_FUNCTION_NAME "putwc"
1106 #define PUTWCHAR_FUNCTION_NAME "putwchar"
1107 #define UNGETWC_FUNCTION_NAME "ungetwc"
1108 #define WCSTOD_FUNCTION_NAME "wcstod"
1109 #define WCSTOF_FUNCTION_NAME "wcstof"
1110 #define WCSTOLD_FUNCTION_NAME "wcstold"
1111 #define WCSTOL_FUNCTION_NAME "wcstol"
1112 #define WCSTOLL_FUNCTION_NAME "wcstoll"
1113 #define WCSTOUL_FUNCTION_NAME "wcstoul"
1114 #define WCSTOULL_FUNCTION_NAME "wcstoull"
1115 #define WCSCPY_FUNCTION_NAME "wcscpy"
1116 #define WCSNCPY_FUNCTION_NAME "wcsncpy"
1117 #define WMEMCPY_FUNCTION_NAME "wmemcpy"
1118 #define WMEMMOVE_FUNCTION_NAME "wmemmove"
1119 #define WCSCAT_FUNCTION_NAME "wcscat"
1120 #define WCSNCAT_FUNCTION_NAME "wcsncat"
1121 #define WCSCMP_FUNCTION_NAME "wcscmp"
1122 #define WCSCOLL_FUNCTION_NAME "wcscoll"
1123 #define WCSNCMP_FUNCTION_NAME "wcsncmp"
1124 #define WCSXFRM_FUNCTION_NAME "wcsxfrm"
1125 #define WMEMCMP_FUNCTION_NAME "wmemcmp"
1126 #define WCSCHR_FUNCTION_NAME "wcschr"
1127 #define WCSCSPN_FUNCTION_NAME "wcscspn"
1128 #define WCSPBRK_FUNCTION_NAME "wcspbrk"
1129 #define WCSRCHR_FUNCTION_NAME "wcsrchr"
1130 #define WCSSPN_FUNCTION_NAME "wcsspn"
1131 #define WCSSTR_FUNCTION_NAME "wcsstr"
1132 #define WCSTOK_FUNCTION_NAME "wcstok"
1133 #define WMEMCHR_FUNCTION_NAME "wmemchr"
1134 #define WCSLEN_FUNCTION_NAME "wcslen"
1135 #define WMEMSET_FUNCTION_NAME "wmemset"
1136 #define WCSFTIME_FUNCTION_NAME "wcsftime"
1137 #define BTOWC_FUNCTION_NAME "btowc"
1138 #define WCTOB_FUNCTION_NAME "wctob"
1139 #define MBSINIT_FUNCTION_NAME "mbsinit"
1140 #define MBRLEN_FUNCTION_NAME "mbrlen"
1141 #define MBRTOWC_FUNCTION_NAME "mbrtowc"
1142 #define WCRTOMB_FUNCTION_NAME "wcrtomb"
1143 #define MBSRTOWCS_FUNCTION_NAME "mbsrtowcs"
1144 #define WCSRTOMBS_FUNCTION_NAME "wcsrtombs"
1145 
1146 
1147 /* #include <wctype.h> */
1148 
1149 #define ISWALNUM_OPERATOR_NAME "iswalnum"
1150 #define ISWALPHA_OPERATOR_NAME "iswalpha"
1151 #define ISWBLANK_OPERATOR_NAME "iswblank"
1152 #define ISWCNTRL_OPERATOR_NAME "iswcntrl"
1153 #define ISWDIGIT_OPERATOR_NAME "iswdigit"
1154 #define ISWGRAPH_OPERATOR_NAME "iswgraph"
1155 #define ISWLOWER_OPERATOR_NAME "iswlower"
1156 #define ISWPRINT_OPERATOR_NAME "iswprint"
1157 #define ISWPUNCT_OPERATOR_NAME "iswpunct"
1158 #define ISWSPACE_OPERATOR_NAME "iswspace"
1159 #define ISWUPPER_OPERATOR_NAME "iswupper"
1160 #define ISWXDIGIT_OPERATOR_NAME "iswxdigit"
1161 #define ISWCTYPE_OPERATOR_NAME "iswctype"
1162 #define WCTYPE_OPERATOR_NAME "wctype"
1163 #define TOWLOWER_OPERATOR_NAME "towlower"
1164 #define TOWUPPER_OPERATOR_NAME "towupper"
1165 #define TOWCTRANS_OPERATOR_NAME "towctrans"
1166 #define WCTRANS_OPERATOR_NAME "wctrans"
1167 
1168 
1169 /* #include <fcntl.h>*/
1170 
1171 #define FCNTL_FUNCTION_NAME "fcntl"
1172 #define CREAT_FUNCTION_NAME "creat"
1173 #define DIRECTIO_FUNCTION_NAME "directio"
1174 #define OPEN64_FUNCTION_NAME "open64"
1175 #define CREAT64_FUNCTION_NAME "creat64"
1176 
1177 /* fcntl is declared with fcntl.h */
1178 #define FSYNC_FUNCTION_NAME "fsync"
1179 #define FDATASYNC_FUNCTION_NAME "fdatasync"
1180 #define IOCTL_FUNCTION_NAME "ioctl" // sys/ioctl.h
1181 #define SELECT_FUNCTION_NAME "select" // sys/select.h
1182 #define PSELECT_FUNCTION_NAME "pselect" // sys/select.h
1183 #define STAT_FUNCTION_NAME "stat" // sys/stat.h
1184 #define FSTAT_FUNCTION_NAME "fstat" // sys/stat.h
1185 #define LSTAT_FUNCTION_NAME "lstat" // sys/stat.h
1186 
1187 
1188 
1189 
1190 
1191 #define J0_OPERATOR_NAME "j0"
1192 #define J1_OPERATOR_NAME "j1"
1193 #define JN_OPERATOR_NAME "jn"
1194 #define Y0_OPERATOR_NAME "y0"
1195 #define Y1_OPERATOR_NAME "y1"
1196 #define YN_OPERATOR_NAME "yn"
1197 
1198 #define NEXTAFTER_OPERATOR_NAME "nextafter"
1199 #define REMAINDER_OPERATOR_NAME "remainder"
1200 
1201 
1202 #define MATHERR_OPERATOR_NAME "matherr"
1203 #define SIGNIFICAND_OPERATOR_NAME "significand"
1204 
1205 
1206 #define MODFF_OPERATOR_NAME "modff"
1207 #define SIGFPE_OPERATOR_NAME "sigfpe"
1208 #define SINGLE_TO_DECIMAL_OPERATOR_NAME "single_to_decimal"
1209 #define DOUBLE_TO_DECIMAL_OPERATOR_NAME "double_to_decimal"
1210 #define EXTENDED_TO_DECIMAL_OPERATOR_NAME "extended_to_decimal"
1211 #define QUADRUPLE_TO_DECIMAL_OPERATOR_NAME "quadruple_to_decimal"
1212 #define DECIMAL_TO_SINGLE_OPERATOR_NAME "decimal_to_single"
1213 #define DECIMAL_TO_DOUBLE_OPERATOR_NAME "decimal_to_double"
1214 #define DECIMAL_TO_EXTENDED_OPERATOR_NAME "decimal_to_extended"
1215 #define DECIMAL_TO_QUADRUPLE_OPERATOR_NAME "decimal_to_quadruple"
1216 #define STRING_TO_DECIMAL_OPERATOR_NAME "string_to_decimal"
1217 #define FUNC_TO_DECIMAL_OPERATOR_NAME "func_to_decimal"
1218 #define FILE_TO_DECIMAL_OPERATOR_NAME "file_to_decimal"
1219 #define SECONVERT_OPERATOR_NAME "seconvert"
1220 #define SFCONVERT_OPERATOR_NAME "sfconvert"
1221 #define SGCONVERT_OPERATOR_NAME "sgconvert"
1222 #define ECONVERT_OPERATOR_NAME "econvert"
1223 #define FCONVERT_OPERATOR_NAME "fconvert"
1224 #define GCONVERT_OPERATOR_NAME "gconvert"
1225 #define QECONVERT_OPERATOR_NAME "qeconvert"
1226 #define QFCONVERT_OPERATOR_NAME "qfconvert"
1227 #define QGCONVERT_OPERATOR_NAME "qgconvert"
1228 
1229 #define CLOCK_FUNCTION_NAME "clock"
1230 #define SECOND_FUNCTION_NAME "SECOND" //gfortran extension
1231 #define CLOCK_GETTIME_FUNCTION_NAME "clock_gettime"
1232 #define GETTIMEOFDAY_FUNCTION_NAME "gettimeofday"
1233 
1234 /* netdb.h */
1235 #define __H_ERRNO_LOCATION_OPERATOR_NAME "__h_erno_location"
1236 
1237 
1238 /* These operators are used within the optimize transformation in
1239  order to manipulate operators such as n-ary add and multiply or
1240  multiply-add operators ( JZ - sept 98)
1241  */
1242 #define EOLE_FMA_OPERATOR_NAME "EOLE-FMA-OP"
1243 #define EOLE_FMS_OPERATOR_NAME "EOLE-FMS-OP"
1244 #define EOLE_PROD_OPERATOR_NAME "EOLE-PROD-OP"
1245 #define EOLE_SUM_OPERATOR_NAME "EOLE-SUM-OP"
1246 
1247 /* Integer Multiply Add and Sub, FC 27/10/2005 for FI
1248  */
1249 #define IMA_OPERATOR_NAME "IMA-OP"
1250 #define IMS_OPERATOR_NAME "IMS-OP"
1251 
1252 /*****************************************************************************************/
1253 
1254 /* moved from ricedg-local.h */
1255 #define LOOP_COUNTER_MODULE_NAME "LOOP-COUNTER"
1256 #define DI_VAR_MODULE_NAME "DI-VAR"
1257 
1258 /* special pips intrinsics with global effects */
1259 #define PIPS_MEMORY_BARRIER_OPERATOR_NAME "__pips_memory_barrier"
1260 #define PIPS_IO_BARRIER_OPERATOR_NAME "__pips_io_barrier"
1261 
1262 /* macros */
1263 
1264 /* FI: entity_local_name() should be sufficient for these comparisons */
1265 #define entity_an_operator_p(e,name) \
1266  (same_string_p(global_name_to_user_name(entity_name(e)), name##_OPERATOR_NAME))
1267 #define entity_a_function_p(e,name) \
1268  (same_string_p(global_name_to_user_name(entity_name(e)), name##_FUNCTION_NAME))
1269 #define entity_a_special_entity_p(e,name) \
1270  (same_string_p(global_name_to_user_name(entity_name(e)), name))
1271 
1272 #define ENTITY_CONVERSION_P(e,name) \
1273  (strcmp(entity_local_name(e), name##_GENERIC_CONVERSION_NAME)==0)
1274 #define ENTITY_CONVERSION_CMPLX_P(e) ENTITY_CONVERSION_P(e, CMPLX)
1275 #define ENTITY_CONVERSION_DCMPLX_P(e) ENTITY_CONVERSION_P(e, DCMPLX)
1276 
1277 #define ENTITY_CONTINUE_P(e) entity_a_function_p(e, CONTINUE)
1278 #define ENTITY_STOP_P(e) entity_a_function_p(e, STOP)
1279 #define ENTITY_RETURN_P(e) entity_a_function_p(e, RETURN)
1280 #define ENTITY_C_RETURN_P(e) entity_a_function_p(e, C_RETURN)
1281 
1282 #define ENTITY_ASSIGN_P(e) entity_an_operator_p(e, ASSIGN)
1283 #define ENTITY_POST_INCREMENT_P(e) entity_an_operator_p(e, POST_INCREMENT)
1284 #define ENTITY_POST_DECREMENT_P(e) entity_an_operator_p(e, POST_DECREMENT)
1285 #define ENTITY_PRE_INCREMENT_P(e) entity_an_operator_p(e, PRE_INCREMENT)
1286 #define ENTITY_PRE_DECREMENT_P(e) entity_an_operator_p(e, PRE_DECREMENT)
1287 #define ENTITY_MULTIPLY_UPDATE_P(e) entity_an_operator_p(e, MULTIPLY_UPDATE)
1288 #define ENTITY_DIVIDE_UPDATE_P(e) entity_an_operator_p(e, DIVIDE_UPDATE)
1289 #define ENTITY_MODULO_UPDATE_P(e) entity_an_operator_p(e, MODULO_UPDATE)
1290 #define ENTITY_PLUS_UPDATE_P(e) entity_an_operator_p(e, PLUS_UPDATE)
1291 #define ENTITY_MINUS_UPDATE_P(e) entity_an_operator_p(e, MINUS_UPDATE)
1292 #define ENTITY_LEFT_SHIFT_UPDATE_P(e) entity_an_operator_p(e, LEFT_SHIFT_UPDATE)
1293 #define ENTITY_RIGHT_SHIFT_UPDATE_P(e) entity_an_operator_p(e, RIGHT_SHIFT_UPDATE)
1294 #define ENTITY_BITWISE_AND_UPDATE_P(e) entity_an_operator_p(e, BITWISE_AND_UPDATE)
1295 #define ENTITY_BITWISE_XOR_UPDATE_P(e) entity_an_operator_p(e, BITWISE_XOR_UPDATE)
1296 #define ENTITY_BITWISE_OR_UPDATE_P(e) entity_an_operator_p(e, BITWISE_OR_UPDATE)
1297 #define ENTITY_COMMA_P(e) entity_an_operator_p(e, COMMA)
1298 #define ENTITY_ADDRESS_OF_P(e) entity_an_operator_p(e, ADDRESS_OF)
1299 #define ENTITY_CONDITIONAL_P(e) entity_an_operator_p(e, CONDITIONAL)
1300 
1301 #define ENTITY_PLUS_P(e) entity_an_operator_p(e, PLUS)
1302 #define ENTITY_PLUS_C_P(e) entity_an_operator_p(e, PLUS_C)
1303 #define ENTITY_MINUS_P(e) entity_an_operator_p(e, MINUS)
1304 #define ENTITY_MINUS_C_P(e) entity_an_operator_p(e, MINUS_C)
1305 #define ENTITY_UNARY_MINUS_P(e) entity_an_operator_p(e, UNARY_MINUS)
1306 #define ENTITY_UNARY_PLUS_P(e) entity_an_operator_p(e, UNARY_PLUS)
1307 #define ENTITY_MULTIPLY_P(e) entity_an_operator_p(e, MULTIPLY)
1308 #define ENTITY_MODULO_P(e) entity_an_operator_p(e, MODULO)
1309 #define ENTITY_C_MODULO_P(e) entity_an_operator_p(e, C_MODULO)
1310 #define ENTITY_POWER_P(e) entity_an_operator_p(e, POWER)
1311 #define ENTITY_DIVIDE_P(e) entity_an_operator_p(e, DIVIDE)
1312 
1313 #define ENTITY_MIN_P(e) entity_an_operator_p(e, MIN)
1314 #define ENTITY_C_MIN_P(e) entity_an_operator_p(e,PIPS_C_MIN)
1315 #define ENTITY_MAX_P(e) entity_an_operator_p(e, MAX)
1316 #define ENTITY_C_MAX_P(e) entity_an_operator_p(e,PIPS_C_MAX)
1317 #define ENTITY_MIN0_P(e) entity_an_operator_p(e, MIN0)
1318 #define ENTITY_MAX0_P(e) entity_an_operator_p(e, MAX0)
1319 #define ENTITY_AMIN1_P(e) entity_an_operator_p(e, AMIN1)
1320 #define ENTITY_AMAX1_P(e) entity_an_operator_p(e, AMAX1)
1321 #define ENTITY_DMIN1_P(e) entity_an_operator_p(e, DMIN1)
1322 #define ENTITY_DMAX1_P(e) entity_an_operator_p(e, DMAX1)
1323 #define ENTITY_MIN_OR_MAX_P(e) (ENTITY_MIN_P(e) || ENTITY_MAX_P(e) )
1324 
1325 #define ENTITY_ABS_P(e) entity_an_operator_p(e, ABS)
1326 #define ENTITY_IABS_P(e) entity_an_operator_p(e, IABS)
1327 #define ENTITY_DABS_P(e) entity_an_operator_p(e, DABS)
1328 #define ENTITY_CABS_P(e) entity_an_operator_p(e, CABS)
1329 //abs in stdlib.h C89
1330 #define ENTITY_C_ABS_P(e) entity_a_function_p(e, C_ABS)
1331 #define ENTITY_LABS_P(e) entity_a_function_p(e, LABS)
1332 #define ENTITY_LLABS_P(e) entity_a_function_p(e, LLABS) //C99
1333 //abs in inttypes.h C99
1334 #define ENTITY_IMAXABS_P(e) entity_a_function_p(e, IMAXABS)
1335 //abs in math.h C99
1336 #define ENTITY_FABS_P(e) entity_an_operator_p(e, FABS)
1337 #define ENTITY_FABSF_P(e) entity_an_operator_p(e, FABSF)
1338 #define ENTITY_FABSL_P(e) entity_an_operator_p(e, FABSL)
1339 //abs in complex.h C99
1340 #define ENTITY_C_CABS_P(e) entity_an_operator_p(e, C_CABS)
1341 #define ENTITY_CABSF_P(e) entity_an_operator_p(e, CABSF)
1342 #define ENTITY_CABSL_P(e) entity_an_operator_p(e, CABSL)
1343 
1344 #define ENTITY_AND_P(e) (entity_an_operator_p(e, AND) || entity_an_operator_p(e, C_AND))
1345 #define ENTITY_OR_P(e) (entity_an_operator_p(e, OR) || entity_an_operator_p(e, C_OR))
1346 #define ENTITY_BITWISE_AND_P(e) (entity_an_operator_p(e, BITWISE_AND))
1347 #define ENTITY_BITWISE_OR_P(e) (entity_an_operator_p(e, BITWISE_OR))
1348 #define ENTITY_BITWISE_XOR_P(e) (entity_an_operator_p(e, BITWISE_XOR))
1349 #define ENTITY_NOT_P(e) (entity_an_operator_p(e, NOT) || entity_an_operator_p(e, C_NOT))
1350 // NON_EQUIV is in fact a logical operator - to simplify semantics
1351 #define ENTITY_NON_EQUAL_P(e) (entity_an_operator_p(e, NON_EQUAL) || entity_an_operator_p(e, NON_EQUIV) || entity_an_operator_p(e, C_NON_EQUAL))
1352 #define ENTITY_EQUIV_P(e) entity_an_operator_p(e, EQUIV)
1353 #define ENTITY_NON_EQUIV_P(e) entity_an_operator_p(e, NON_EQUIV)
1354 #define ENTITY_LEFT_SHIFT_P(e) entity_an_operator_p(e, LEFT_SHIFT)
1355 #define ENTITY_RIGHT_SHIFT_P(e) entity_an_operator_p(e, RIGHT_SHIFT)
1356 
1357 #define ENTITY_ADDRESS_OF_P(e) entity_an_operator_p(e, ADDRESS_OF)
1358 
1359 /* Attention :
1360  This definition is different with the Fortran Standard where the logical
1361  operators are the following only: AND, OR, NOT, EQUIV, NEQUIV (NN-Mars 2000)*/
1362 
1363 #define ENTITY_LOGICAL_OPERATOR_P(e) ( ENTITY_RELATIONAL_OPERATOR_P(e) || \
1364  ENTITY_AND_P(e) || \
1365  ENTITY_OR_P(e) || \
1366  ENTITY_NOT_P(e))
1367 
1368 #define ENTITY_TRUE_P(e) entity_an_operator_p(e, TRUE)
1369 #define ENTITY_FALSE_P(e) entity_an_operator_p(e, FALSE)
1370 #define ENTITY_ONE_P(e) entity_an_operator_p(e, ONE)
1371 #define ENTITY_ZERO_P(e) entity_an_operator_p(e, ZERO)
1372 
1373 #define ENTITY_GREATER_OR_EQUAL_P(e) (entity_an_operator_p(e, GREATER_OR_EQUAL) || entity_an_operator_p(e, C_GREATER_OR_EQUAL))
1374 #define ENTITY_GREATER_THAN_P(e) (entity_an_operator_p(e, GREATER_THAN) || entity_an_operator_p(e, C_GREATER_THAN))
1375 #define ENTITY_LESS_OR_EQUAL_P(e) (entity_an_operator_p(e, LESS_OR_EQUAL) || entity_an_operator_p(e, C_LESS_OR_EQUAL))
1376 #define ENTITY_LESS_THAN_P(e) (entity_an_operator_p(e, LESS_THAN) || entity_an_operator_p(e, C_LESS_THAN))
1377 
1378 // EQUIV is in fact a logical operator - to simplify semantics
1379 #define ENTITY_EQUAL_P(e) (entity_an_operator_p(e, EQUAL) || entity_an_operator_p(e, EQUIV) || entity_an_operator_p(e, C_EQUAL))
1380 
1381 #define ENTITY_RELATIONAL_OPERATOR_P(e) ( \
1382  ENTITY_GREATER_OR_EQUAL_P(e) || \
1383  ENTITY_GREATER_THAN_P(e) || \
1384  ENTITY_LESS_OR_EQUAL_P(e) || \
1385  ENTITY_LESS_THAN_P(e) || \
1386  ENTITY_NON_EQUAL_P(e) || \
1387  ENTITY_EQUAL_P(e) )
1388 
1389 #define ENTITY_NAME_P(e, name)(same_string_p(entity_user_name(e),name))
1390 
1391 /* Fortran IO Management */
1392 
1393 #define ENTITY_WRITE_P(e) ENTITY_NAME_P(e, "WRITE")
1394 #define ENTITY_REWIND_P(e) ENTITY_NAME_P(e, "REWIND")
1395 #define ENTITY_OPEN_P(e) ENTITY_NAME_P(e, "OPEN")
1396 #define ENTITY_CLOSE_P(e) ENTITY_NAME_P(e, "CLOSE")
1397 #define ENTITY_READ_P(e) ENTITY_NAME_P(e, READ_FUNCTION_NAME)
1398 #define ENTITY_BUFFERIN_P(e) ENTITY_NAME_P(e, "BUFFERIN")
1399 #define ENTITY_BUFFEROUT_P(e) ENTITY_NAME_P(e, "BUFFEROUT")
1400 #define ENTITY_ENDFILE_P(e) ENTITY_NAME_P(e, "ENDFILE")
1401 #define ENTITY_IMPLIEDDO_P(e) ENTITY_NAME_P(e, IMPLIED_DO_NAME)
1402 #define ENTITY_IO_LIST_P(e) ENTITY_NAME_P(e, IO_LIST_STRING_NAME)
1403 #define ENTITY_FORMAT_P(e) ENTITY_NAME_P(e, "FORMAT")
1404 
1405 /* Bit manipulation functions. Amira Mensi */
1406 #define ENTITY_ISHFT_P(e) ENTITY_NAME_P(e, "ISHFT")
1407 #define ENTITY_ISHFTC_P(e) ENTITY_NAME_P(e, "ISHFTC")
1408 #define ENTITY_IBITS_P(e) ENTITY_NAME_P(e, "IBITS")
1409 #define ENTITY_MVBITS_P(e) ENTITY_NAME_P(e, "MVBITS")
1410 #define ENTITY_BTEST_P(e) ENTITY_NAME_P(e, "BTEST")
1411 #define ENTITY_IBSET_P(e) ENTITY_NAME_P(e, "IBSET")
1412 #define ENTITY_IBCLR_P(e) ENTITY_NAME_P(e, "IBCLR")
1413 #define ENTITY_BIT_SIZE_P(e) ENTITY_NAME_P(e, "BIT_SIZE")
1414 #define ENTITY_IOR_P(e) ENTITY_NAME_P(e, "IOR")
1415 #define ENTITY_IEOR_P(e) ENTITY_NAME_P(e, "IEOR")
1416 #define ENTITY_IAND_P(e) ENTITY_NAME_P(e, "IAND")
1417 
1418 /* OMP entity test */
1419 #define ENTITY_OMP_IF_P(e) ENTITY_NAME_P(e,OMP_IF_FUNCTION_NAME)
1420 #define ENTITY_OMP_OMP_P(e) ENTITY_NAME_P(e,OMP_OMP_FUNCTION_NAME)
1421 #define ENTITY_OMP_FOR_P(e) ENTITY_NAME_P(e,OMP_FOR_FUNCTION_NAME)
1422 #define ENTITY_OMP_PRIVATE_P(e) ENTITY_NAME_P(e,OMP_PRIVATE_FUNCTION_NAME)
1423 #define ENTITY_OMP_PARALLEL_P(e) ENTITY_NAME_P(e,OMP_PARALLEL_FUNCTION_NAME)
1424 #define ENTITY_OMP_REDUCTION_P(e) ENTITY_NAME_P(e,OMP_REDUCTION_FUNCTION_NAME)
1425 
1426 
1427 /*io functions: C library and system io.Amira Mensi*/
1428 
1429 /*#include<stdio.h> */
1430 
1431 #define ENTITY_PRINTF_P(e) ENTITY_NAME_P(e, "printf")
1432 #define ENTITY_FPRINTF_P(e) ENTITY_NAME_P(e, "fprintf")
1433 #define ENTITY_SCANF_P(e) ENTITY_NAME_P(e, "scanf")
1434 #define ENTITY_ISOC99_SCANF_P(e) ENTITY_NAME_P(e, ISOC99_SCANF_FUNCTION_NAME)
1435 #define ENTITY_FSCANF_P(e) ENTITY_NAME_P(e, "fscanf")
1436 #define ENTITY_ISOC99_FSCANF_P(e) ENTITY_NAME_P(e, ISOC99_FSCANF_FUNCTION_NAME)
1437 #define ENTITY_PUTS_P(e) ENTITY_NAME_P(e, "puts")
1438 #define ENTITY_GETS_P(e) ENTITY_NAME_P(e, "gets")
1439 #define ENTITY_FPUTS_P(e) ENTITY_NAME_P(e, "fputs")
1440 #define ENTITY_FGETS_P(e) ENTITY_NAME_P(e, "fgets")
1441 #define ENTITY_FPUTC_P(e) ENTITY_NAME_P(e, "fputc")
1442 #define ENTITY_FGETC_P(e) ENTITY_NAME_P(e, "fgetc")
1443 #define ENTITY_FOPEN_P(e) ENTITY_NAME_P(e, "fopen")
1444 #define ENTITY_FDOPEN_P(e) ENTITY_NAME_P(e, "fdopen")
1445 #define ENTITY_FREOPEN_P(e) ENTITY_NAME_P(e, "freopen")
1446 #define ENTITY_FCLOSE_P(e) ENTITY_NAME_P(e, "fclose")
1447 #define ENTITY_SNPRINTF_P(e) ENTITY_NAME_P(e, "snprintf")
1448 #define ENTITY_SSCANF_P(e) ENTITY_NAME_P(e, "sscanf")
1449 #define ENTITY_ISOC99_SSCANF_P(e) ENTITY_NAME_P(e, ISOC99_SSCANF_FUNCTION_NAME)
1450 #define ENTITY_VFPRINTF_P(e) ENTITY_NAME_P(e, "vfprintf")
1451 #define ENTITY_VFSCANF_P(e) ENTITY_NAME_P(e, "vfscanf")
1452 #define ENTITY_ISOC99_VFSCANF_P(e) ENTITY_NAME_P(e, ISOC99_VFSCANF_FUNCTION_NAME)
1453 #define ENTITY_VPRINTF_P(e) ENTITY_NAME_P(e, "vprintf")
1454 #define ENTITY_VSCANF_P(e) ENTITY_NAME_P(e, "vscanf")
1455 #define ENTITY_ISOC99_VSCANF_P(e) ENTITY_NAME_P(e, ISOC99_VSCANF_FUNCTION_NAME)
1456 #define ENTITY_VSNPRINTF_P(e) ENTITY_NAME_P(e, "vsnprintf")
1457 #define ENTITY_VSPRINTF_P(e) ENTITY_NAME_P(e, "vsprintf")
1458 #define ENTITY_SPRINTF_P(e) ENTITY_NAME_P(e, "sprintf")
1459 #define ENTITY_VSSCANF_P(e) ENTITY_NAME_P(e, "vsscanf")
1460 #define ENTITY_ISOC99_VSSCANF_P(e) ENTITY_NAME_P(e, ISOC99_VSSCANF_FUNCTION_NAME)
1461 #define ENTITY_GETC_P(e) ENTITY_NAME_P(e, "getc")
1462 #define ENTITY__IO_GETC_P(e) ENTITY_NAME_P(e, "_IO_getc")
1463 #define ENTITY_GETCHAR_P(e) ENTITY_NAME_P(e, "getchar")
1464 #define ENTITY_PUTC_P(e) ENTITY_NAME_P(e, "putc")
1465 #define ENTITY__IO_PUTC_P(e) ENTITY_NAME_P(e, "_IO_putc")
1466 #define ENTITY_PUTCHAR_P(e) ENTITY_NAME_P(e, "putchar")
1467 #define ENTITY_UNGETC_P(e) ENTITY_NAME_P(e, "ungetc")
1468 #define ENTITY_FREAD_P(e) ENTITY_NAME_P(e, "fread")
1469 #define ENTITY_FWRITE_P(e) ENTITY_NAME_P(e, "fwrite")
1470 #define ENTITY_FGETPOS_P(e) ENTITY_NAME_P(e, "fgetpos")
1471 #define ENTITY_FSEEK_P(e) ENTITY_NAME_P(e, "fseek")
1472 #define ENTITY_FSETPOS_P(e) ENTITY_NAME_P(e, "fsetpos")
1473 #define ENTITY_FTELL_P(e) ENTITY_NAME_P(e, "ftell")
1474 #define ENTITY_C_REWIND_P(e) ENTITY_NAME_P(e, "rewind")
1475 #define ENTITY_CLEARERR_P(e) ENTITY_NAME_P(e, "clearer")
1476 #define ENTITY_FEOF_P(e) ENTITY_NAME_P(e, "feof")
1477 #define ENTITY_FERROR_P(e) ENTITY_NAME_P(e, "ferror")
1478 #define ENTITY_FILENO_P(e) ENTITY_NAME_P(e, "fileno")
1479 #define ENTITY_PERROR_P(e) ENTITY_NAME_P(e, "perror")
1480 
1481 /*io functions: C library and system io.Amira Mensi*/
1482 
1483 #define ENTITY_C_OPEN_SYSTEM_P(e) ENTITY_NAME_P(e, C_OPEN_FUNCTION_NAME)
1484 #define ENTITY_C_CLOSE_SYSTEM_P(e) ENTITY_NAME_P(e, C_CLOSE_FUNCTION_NAME)
1485 #define ENTITY_C_READ_SYSTEM_P(e) ENTITY_NAME_P(e, C_READ_FUNCTION_NAME)
1486 #define ENTITY_C_WRITE_SYSTEM_P(e) ENTITY_NAME_P(e, C_WRITE_FUNCTION_NAME)
1487 #define ENTITY_LINK_SYSTEM_P(e) ENTITY_NAME_P(e, LINK_FUNCTION_NAME)
1488 #define ENTITY_SYMLINK_SYSTEM_P(e) ENTITY_NAME_P(e, SYMLINK_FUNCTION_NAME)
1489 #define ENTITY_UNLINK_SYSTEM_P(e) ENTITY_NAME_P(e, UNLINK_FUNCTION_NAME)
1490 
1491 /* fcntl() */
1492 #define ENTITY_FSYNC_SYSTEM_P(e) ENTITY_NAME_P(e, FSYNC_FUNCTION_NAME)
1493 #define ENTITY_FDATASYNC_SYSTEM_P(e) ENTITY_NAME_P(e, FDATASYNC_FUNCTION_NAME)
1494 #define ENTITY_IOCTL_SYSTEM_P(e) ENTITY_NAME_P(e, IOCTL_FUNCTION_NAME)
1495 #define ENTITY_SELECT_SYSTEM_P(e) ENTITY_NAME_P(e, SELECT_FUNCTION_NAME)
1496 #define ENTITY_PSELECT_SYSTEM_P(e) ENTITY_NAME_P(e, PSELECT_FUNCTION_NAME)
1497 #define ENTITY_STAT_SYSTEM_P(e) ENTITY_NAME_P(e, STAT_FUNCTION_NAME)
1498 #define ENTITY_FSTAT_SYSTEM_P(e) ENTITY_NAME_P(e, FSTAT_FUNCTION_NAME)
1499 #define ENTITY_LSTAT_SYSTEM_P(e) ENTITY_NAME_P(e, LSTAT_FUNCTION_NAME)
1500 
1501 #define ENTITY_REMOVE_SYSTEM_P(e) ENTITY_NAME_P(e, "remove")
1502 #define ENTITY_RENAME_SYSTEM_P(e) ENTITY_NAME_P(e, "rename")
1503 #define ENTITY_TMPFILE_SYSTEM_P(e) ENTITY_NAME_P(e, "tmpfile")
1504 #define ENTITY_TMPNAM_SYSTEM_P(e) ENTITY_NAME_P(e, "tmpnam")
1505 #define ENTITY_FFLUSH_SYSTEM_P(e) ENTITY_NAME_P(e, "fflush")
1506 #define ENTITY_FREOPEN_SYSTEM_P(e) ENTITY_NAME_P(e, "freopen")
1507 #define ENTITY_SETBUF_SYSTEM_P(e) ENTITY_NAME_P(e, "setbuf")
1508 #define ENTITY_SETVBUF_SYSTEM_P(e) ENTITY_NAME_P(e, "setvbuf")
1509 #define ENTITY__FILBUF_SYSTEM_P(e) ENTITY_NAME_P(e, "__filbuf")
1510 #define ENTITY__FILSBUF_SYSTEM_P(e) ENTITY_NAME_P(e, "__flsbuf")
1511 #define ENTITY_SETBUFFER_SYSTEM_P(e) ENTITY_NAME_P(e, "setbuffer")
1512 #define ENTITY_SETLINEBUF_SYSTEM_P(e) ENTITY_NAME_P(e, "setlinebuf")
1513 #define ENTITY_FDOPEN_SYSTEM_P(e) ENTITY_NAME_P(e, "fdopen")
1514 #define ENTITY_CTERMID_SYSTEM_P(e) ENTITY_NAME_P(e, "ctermid")
1515 #define ENTITY_FILENO_SYSTEM_P(e) ENTITY_NAME_P(e, "fileno")
1516 #define ENTITY_POPEN_SYSTEM_P(e) ENTITY_NAME_P(e, "popen")
1517 #define ENTITY_CUSERID_SYSTEM_P(e) ENTITY_NAME_P(e, "cuserid")
1518 #define ENTITY_TEMPNAM_SYSTEM_P(e) ENTITY_NAME_P(e, "tempnam")
1519 #define ENTITY_GETW_SYSTEM_P(e) ENTITY_NAME_P(e, "getw")
1520 #define ENTITY_PUTW_SYSTEM_P(e) ENTITY_NAME_P(e, "putw")
1521 #define ENTITY_PCLOSE_SYSTEM_P(e) ENTITY_NAME_P(e, "pclose")
1522 #define ENTITY_FSEEKO_SYSTEM_P(e) ENTITY_NAME_P(e, "fseeko")
1523 #define ENTITY_FTELLO_SYSTEM_P(e) ENTITY_NAME_P(e, "ftello")
1524 #define ENTITY_FOPEN64_SYSTEM_P(e) ENTITY_NAME_P(e, "fopen64")
1525 #define ENTITY_FREOPEN64_SYSTEM_P(e) ENTITY_NAME_P(e, "freopen64")
1526 #define ENTITY_TMPFILE64_SYSTEM_P(e) ENTITY_NAME_P(e, "tmpfile64")
1527 #define ENTITY_FGETPOS64_SYSTEM_P(e) ENTITY_NAME_P(e, "fgetpos64")
1528 #define ENTITY_FSETPOS64_SYSTEM_P(e) ENTITY_NAME_P(e, "fsetpos64")
1529 #define ENTITY_FSEEKO64_SYSTEM_P(e) ENTITY_NAME_P(e, "fseeko64")
1530 #define ENTITY_FTELLO64_SYSTEM_P(e) ENTITY_NAME_P(e, "ftello64")
1531 
1532 #define ENTITY_ABORT_SYSTEM_P(e) ENTITY_NAME_P(e, "abort")
1533 #define ENTITY_C_ABS_SYSTEM_P(e) ENTITY_NAME_P(e, "abs")
1534 #define ENTITY_ATEXIT_SYSTEM_P(e) ENTITY_NAME_P(e, "atexit")
1535 #define ENTITY_ATOF_SYSTEM_P(e) ENTITY_NAME_P(e, "atof")
1536 #define ENTITY_ATOI_SYSTEM_P(e) ENTITY_NAME_P(e, "atoi")
1537 #define ENTITY_BSEARCH_SYSTEM_P(e) ENTITY_NAME_P(e, "bsearch")
1538 #define ENTITY_CALLOC_SYSTEM_P(e) ENTITY_NAME_P(e, "calloc")
1539 #define ENTITY_DIV_SYSTEM_P(e) ENTITY_NAME_P(e, "div")
1540 #define ENTITY_EXIT_SYSTEM_P(e) ENTITY_NAME_P(e, "exit")
1541 #define ENTITY_FREE_SYSTEM_P(e) ENTITY_NAME_P(e, "free")
1542 #define ENTITY_GETENV_SYSTEM_P(e) ENTITY_NAME_P(e, "getenv")
1543 #define ENTITY_LABS_SYSTEM_P(e) ENTITY_NAME_P(e, "labs")
1544 #define ENTITY_LDIV_SYSTEM_P(e) ENTITY_NAME_P(e, "ldiv")
1545 #define ENTITY_MALLOC_SYSTEM_P(e) ENTITY_NAME_P(e, "malloc")
1546 #define ENTITY_MBLEN_SYSTEM_P(e) ENTITY_NAME_P(e, "mblen")
1547 #define ENTITY_MBSTOWCS_SYSTEM_P(e) ENTITY_NAME_P(e, "mbstowcs")
1548 #define ENTITY_MBTOWC_SYSTEM_P(e) ENTITY_NAME_P(e, "mbtowc")
1549 #define ENTITY_QSORT_SYSTEM_P(e) ENTITY_NAME_P(e, "qsort")
1550 #define ENTITY_REALLOC_SYSTEM_P(e) ENTITY_NAME_P(e, "realloc")
1551 #define ENTITY_STRTOD_SYSTEM_P(e) ENTITY_NAME_P(e, "strtod")
1552 #define ENTITY_STRTOL_SYSTEM_P(e) ENTITY_NAME_P(e, "strtol")
1553 #define ENTITY_STRTOUL_SYSTEM_P(e) ENTITY_NAME_P(e, "strtoul")
1554 #define ENTITY_SYSTEM_SYSTEM_P(e) ENTITY_NAME_P(e, "system")
1555 #define ENTITY_WCTOMB_SYSTEM_P(e) ENTITY_NAME_P(e, "wctomb")
1556 #define ENTITY_WCSTOMBS_SYSTEM_P(e) ENTITY_NAME_P(e, "wcstombs")
1557 #define ENTITY_EXITHANDLESYSTEM_P(e) ENTITY_NAME_P(e, "exithandle")
1558 #define ENTITY_DRAND48_SYSTEM_P(e) ENTITY_NAME_P(e, "drand48")
1559 #define ENTITY_ERAND48_SYSTEM_P(e) ENTITY_NAME_P(e, "erand48")
1560 #define ENTITY_JRAND48_SYSTEM_P(e) ENTITY_NAME_P(e, "jrand48")
1561 #define ENTITY_LCONG48_SYSTEM_P(e) ENTITY_NAME_P(e, "lcong48")
1562 #define ENTITY_LRAND48_SYSTEM_P(e) ENTITY_NAME_P(e, "lrand48")
1563 #define ENTITY_MRAND48_SYSTEM_P(e) ENTITY_NAME_P(e, "mrand48")
1564 #define ENTITY_NRAND48_SYSTEM_P(e) ENTITY_NAME_P(e, "nrand48")
1565 #define ENTITY_SEED48_SYSTEM_P(e) ENTITY_NAME_P(e, "seed48")
1566 #define ENTITY_SRAND48_SYSTEM_P(e) ENTITY_NAME_P(e, "srand48")
1567 #define ENTITY_PUTENV_SYSTEM_P(e) ENTITY_NAME_P(e, "putenv")
1568 #define ENTITY_SETKEY_SYSTEM_P(e) ENTITY_NAME_P(e, "setkey")
1569 #define ENTITY_SWAB_SYSTEM_P(e) ENTITY_NAME_P(e, "swab")
1570 #define ENTITY_MKSTEMP_SYSTEM_P(e) ENTITY_NAME_P(e, "mkstemp")
1571 #define ENTITY_MKSTEMP64_SYSTEM_P(e) ENTITY_NAME_P(e, "mkstemp64")
1572 #define ENTITY_A614_SYSTEM_P(e) ENTITY_NAME_P(e, "a64l")
1573 #define ENTITY_ECVT_SYSTEM_P(e) ENTITY_NAME_P(e, "ecvt")
1574 #define ENTITY_FCVT_SYSTEM_P(e) ENTITY_NAME_P(e, "fcvt")
1575 #define ENTITY_GCVT_SYSTEM_P(e) ENTITY_NAME_P(e, "gcvt")
1576 #define ENTITY_GETSUBOPT_SYSTEM_P(e) ENTITY_NAME_P(e, "getsubopt")
1577 #define ENTITY_GRANTPT_SYSTEM_P(e) ENTITY_NAME_P(e, "grantpt")
1578 #define ENTITY_INITSTATE_SYSTEM_P(e) ENTITY_NAME_P(e, "initstate")
1579 #define ENTITY_C_164A_SYSTEM_P(e) ENTITY_NAME_P(e, "l64a")
1580 #define ENTITY_MKTEMP_SYSTEM_P(e) ENTITY_NAME_P(e, "mktemp")
1581 #define ENTITY_PTSNAME_SYSTEM_P(e) ENTITY_NAME_P(e, "ptsname")
1582 #define ENTITY_REALPATH_SYSTEM_P(e) ENTITY_NAME_P(e, "realpath")
1583 #define ENTITY_SETSTATE_SYSTEM_P(e) ENTITY_NAME_P(e, "setstate")
1584 #define ENTITY_TTYSLOT_SYSTEM_P(e) ENTITY_NAME_P(e, "ttyslot")
1585 #define ENTITY_UNLOCKPT_SYSTEM_P(e) ENTITY_NAME_P(e, "unlockpt")
1586 #define ENTITY_VALLOC_SYSTEM_P(e) ENTITY_NAME_P(e, "valloc")
1587 #define ENTITY_DUP2_SYSTEM_P(e) ENTITY_NAME_P(e, "dup2")
1588 #define ENTITY_QECVT_SYSTEM_P(e) ENTITY_NAME_P(e, "qecvt")
1589 #define ENTITY_QFCVT_SYSTEM_P(e) ENTITY_NAME_P(e, "qfcvt")
1590 #define ENTITY_QGCVT_SYSTEM_P(e) ENTITY_NAME_P(e, "qgcvt")
1591 #define ENTITY_GETCWD_SYSTEM_P(e) ENTITY_NAME_P(e, "getcwd")
1592 #define ENTITY_GETEXECNAME_SYSTEM_P(e) ENTITY_NAME_P(e, "getexecname")
1593 #define ENTITY_GETLOGIN_SYSTEM_P(e) ENTITY_NAME_P(e, "getlogin")
1594 #define ENTITY_GETOPT_SYSTEM_P(e) ENTITY_NAME_P(e, "getopt")
1595 #define ENTITY_GETPASS_SYSTEM_P(e) ENTITY_NAME_P(e, "getpass")
1596 #define ENTITY_GETPASSPHRASE_SYSTEM_P(e) ENTITY_NAME_P(e, "getpassphrase")
1597 #define ENTITY_GETPW_SYSTEM_P(e) ENTITY_NAME_P(e, "getpw")
1598 #define ENTITY_ISATTY_SYSTEM_P(e) ENTITY_NAME_P(e, "isatty")
1599 #define ENTITY_MEMALIGN_SYSTEM_P(e) ENTITY_NAME_P(e, "memalign")
1600 #define ENTITY_TTYNAME_SYSTEM_P(e) ENTITY_NAME_P(e, "ttyname")
1601 #define ENTITY_ATOLL_SYSTEM_P(e) ENTITY_NAME_P(e, "atoll")
1602 #define ENTITY_LLABS_SYSTEM_P(e) ENTITY_NAME_P(e, "llabs")
1603 #define ENTITY_LLDIV_SYSTEM_P(e) ENTITY_NAME_P(e, "lldiv")
1604 #define ENTITY_LLTOSTR_SYSTEM_P(e) ENTITY_NAME_P(e, "lltostr")
1605 #define ENTITY_STROLL_SYSTEM_P(e) ENTITY_NAME_P(e, "strtoll")
1606 #define ENTITY_STROULL_SYSTEM_P(e) ENTITY_NAME_P(e, "strtoull")
1607 #define ENTITY_ULLOSTR_SYSTEM_P(e) ENTITY_NAME_P(e, "ulltostr")
1608 
1609 /* include <assert.h> */
1610 
1611 #define ENTITY_ASSERT_SYSTEM_P(e) ENTITY_NAME_P(e, ASSERT_FUNCTION_NAME)
1612 #define ENTITY_ASSERT_FAIL_SYSTEM_P(e) ENTITY_NAME_P(e, ASSERT_FAIL_FUNCTION_NAME)
1613 
1614 /* include <string.h> */
1615 
1616 #define ENTITY_STRCMP_SYSTEM_P(e) ENTITY_NAME_P(e, "strcmp")
1617 #define ENTITY_STRNCMP_SYSTEM_P(e) ENTITY_NAME_P(e, "strncmp")
1618 #define ENTITY_STRCPY_SYSTEM_P(e) ENTITY_NAME_P(e, "strcpy")
1619 #define ENTITY_STRCAT_SYSTEM_P(e) ENTITY_NAME_P(e, "strcat")
1620 #define ENTITY_STRNCAT_SYSTEM_P(e) ENTITY_NAME_P(e, "strncat")
1621 #define ENTITY_STRLEN_SYSTEM_P(e) ENTITY_NAME_P(e, "strlen")
1622 #define ENTITY_STRERROR_SYSTEM_P(e) ENTITY_NAME_P(e, "strerror")
1623 #define ENTITY_STRERROR_R_SYSTEM_P(e) ENTITY_NAME_P(e, "strerror_r")
1624 
1625 /* FI: Why is it declared "system"? Why is it in the middle of string functions? */
1626 #define ENTITY_FOPEN_SYSTEM_P(e) ENTITY_NAME_P(e, "fopen")
1627 
1628 /* #include <fcntl.h>*/
1629 
1630 #define ENTITY_FCNTL_SYSTEM_P(e) ENTITY_NAME_P(e,"fcntl")
1631 #define ENTITY_OPEN_SYSTEM_P(e) ENTITY_NAME_P(e,"open")
1632 #define ENTITY_CREAT_SYSTEM_P(e) ENTITY_NAME_P(e,"creat")
1633 #define ENTITY_DIRECTIO_SYSTEM_P(e) ENTITY_NAME_P(e,"directio")
1634 #define ENTITY_OPEN64_SYSTEM_P(e) ENTITY_NAME_P(e,"open64")
1635 #define ENTITY_CREAT64_SYSTEM_P(e) ENTITY_NAME_P(e,"creat64")
1636 
1637 /* some random functions of stdlib.h */
1638 
1639 #define ENTITY_RANDOM_P(e) ENTITY_NAME_P(e,"random")
1640 #define ENTITY_SRANDOM_P(e) ENTITY_NAME_P(e,"srandom")
1641 #define ENTITY_RAND_P(e) ENTITY_NAME_P(e,"rand")
1642 #define ENTITY_SRAND_P(e) ENTITY_NAME_P(e,"srand")
1643 
1644 /* signal.h */
1645 #define ENTITY_SIGNAL_P(e) ENTITY_NAME_P(e,"signal")
1646 
1647 /* Fortran DATA management */
1648 
1649 #define ENTITY_STATIC_INITIALIZATION_P(e) ENTITY_NAME_P(e, STATIC_INITIALIZATION_FUNCTION_NAME)
1650 #define ENTITY_REPEAT_VALUE_P(e) ENTITY_NAME_P(e, REPEAT_VALUE_FUNCTION_NAME)
1651 #define ENTITY_DATA_LIST_P(e) ENTITY_NAME_P(e, DATA_LIST_FUNCTION_NAME)
1652 
1653 /* C initialization expression */
1654 
1655 #define ENTITY_BRACE_INTRINSIC_P(e) ENTITY_NAME_P(e, BRACE_INTRINSIC)
1656 
1657 #define ENTITY_IMPLIED_CMPLX_P(e) ENTITY_NAME_P(e, IMPLIED_COMPLEX_NAME)
1658 #define ENTITY_IMPLIED_DCMPLX_P(e) ENTITY_NAME_P(e, IMPLIED_DCOMPLEX_NAME)
1659 
1660 /* C data structure and pointer management */
1661 
1662 #define ENTITY_FIELD_P(e) entity_an_operator_p(e, FIELD)
1663 #define ENTITY_POINT_TO_P(e) entity_an_operator_p(e, POINT_TO)
1664 #define ENTITY_DEREFERENCING_P(e) entity_an_operator_p(e, DEREFERENCING)
1665 /* Defined elsewhere: #define ENTITY_ADDRESS_OF_P(e) entity_an_operator_p(e, ADDRESS_OF) */
1666 
1667 /* C varargs stuff */
1668 #define ENTITY_VA_END_P(e) ENTITY_NAME_P(e, BUILTIN_VA_END)
1669 #define ENTITY_VA_START_P(e) ENTITY_NAME_P(e, BUILTIN_VA_START)
1670 #define ENTITY_VA_COPY_P(e) ENTITY_NAME_P(e, BUILTIN_VA_COPY)
1671 
1672 
1673 #define ENTITY_FIVE_OPERATION_P(e) ( ENTITY_PLUS_P(e) || \
1674  ENTITY_PLUS_C_P(e) || \
1675  ENTITY_MINUS_P(e) || \
1676  ENTITY_MINUS_C_P(e) || \
1677  ENTITY_UNARY_MINUS_P(e) || \
1678  ENTITY_MULTIPLY_P(e) || \
1679  ENTITY_MODULO_P(e) ||\
1680  ENTITY_DIVIDE_P(e) )
1681 
1682 #define IO_CALL_P(call) io_intrinsic_p(call_function(call))
1683 
1684 /*
1685  * Fortran 95 Allocatable
1686  */
1687 #define ALLOCATABLE_PREFIX "__pips_allocatable__"
1688 #define ALLOCATABLE_LBOUND_PREFIX "__pips__allocatable__lbound__"
1689 #define ALLOCATABLE_UBOUND_PREFIX "__pips__allocatable__ubound__"
1690 #define ENTITY_ALLOCATABLE_BOUND_P(e) \
1691  (strncmp(entity_user_name(e), ALLOCATABLE_LBOUND_PREFIX, strlen(ALLOCATABLE_LBOUND_PREFIX)) == 0 \
1692  || strncmp(entity_user_name(e), ALLOCATABLE_UBOUND_PREFIX, strlen(ALLOCATABLE_UBOUND_PREFIX)) == 0 )
1693 
1694 
1695 /* classification of basics */
1696 
1697 #define basic_numeric_simple_p(b) (basic_int_p(b) || basic_float_p(b))
1698 #define basic_numeric_p(b) (basic_numeric_simple_p(b) || basic_complex_p(b))
1699 #define basic_compatible_simple_p(b1, b2) (\
1700  (basic_numeric_simple_p(b1) && basic_numeric_simple_p(b2)) ||\
1701  (basic_string_p(b1) && basic_string_p(b2)) ||\
1702  (basic_logical_p(b1) && basic_logical_p(b2)) ||\
1703  (basic_overloaded_p(b1) && basic_overloaded_p(b2)) ||\
1704  (basic_undefined_p(b1) && basic_undefined_p(b2)))
1705 #define basic_compatible_p(b1, b2) (\
1706  (basic_numeric_p(b1) && basic_numeric_p(b2)) ||\
1707  (basic_string_p(b1) && basic_string_p(b2)) ||\
1708  (basic_logical_p(b1) && basic_logical_p(b2)) ||\
1709  (basic_overloaded_p(b1) && basic_overloaded_p(b2)) ||\
1710  (basic_undefined_p(b1) && basic_undefined_p(b2)))
1711 
1712 /* constant sizes */
1713 
1714 #define LABEL_SIZE 5
1715 #define INDENTATION (get_int_property("PRETTYPRINT_INDENTATION"))
1716 #define INDENT_A_LIST_OF_WORDS(list_of_words) { \
1717  if(list_of_words) { \
1718  list blanks = NIL; \
1719  for(int i=0; i<INDENTATION; i++) { \
1720  blanks = CHAIN_SWORD(blanks, " "); \
1721  } \
1722  list_of_words = gen_nconc(blanks,list_of_words); \
1723  } \
1724 }
1725 
1726 /* default values */
1727 
1728 #define STATEMENT_NUMBER_UNDEFINED (-1)
1729 #define UNKNOWN_RAM_OFFSET (-1)
1730 // It is for extern variables whose ram offset is not known
1731 #define UNDEFINED_RAM_OFFSET (-2)
1732 // It is for dynamic allocation of arrays whose ram offset is not known either.
1733 /* FI: I would have assumed that it is used for the stack area, but I
1734  must be wrong... */
1735 #define DYNAMIC_RAM_OFFSET (-3)
1736 
1737 
1738 /* On devrait utiliser Newgen pour cela, mais comme on ne doit pas
1739  les utiliser directement (mais via statement_less_p), cela devrait
1740  decourager les temeraires */
1741 
1742 #define MAKE_ORDERING(u,s) (u<<16|s)
1743 #define ORDERING_NUMBER(o) (o>>16)
1744 #define ORDERING_STATEMENT(o) (o & 0xffff)
1745 
1746 #define NORMALIZE_EXPRESSION(e) \
1747  ((expression_normalized(e) == normalized_undefined) ? \
1748  (expression_normalized(e) = NormalizeExpression(e)) : \
1749  (expression_normalized(e)))
1750 
1751 /* MISC: newgen shorthands */
1752 
1753 #define entity_declarations(e) (code_declarations(entity_code(e)))
1754 
1755 
1756 /* An entity_variable_p(e) may hide a typedef and hence a functional
1757  type. In C, use type_variable_p(ultimate_type(entity_type(e))) to
1758  make sure e is a variable.
1759 
1760  It may also be a dummy C parameter.
1761 
1762  It may also be a hidden entity such as an abstract location.
1763 
1764  To sum up, this predicate does not imply that entity e represents a
1765  variable declared in the source code by the programmer.
1766 
1767  See also the function variable_entity_p() which checks the storage
1768  of the entity.
1769  */
1770 #define entity_variable_p(e) (type_variable_p(entity_type(e)))
1771 
1772 #define entity_symbolic_p(e) (type_functional_p(entity_type(e)) && \
1773  storage_rom_p(entity_storage(e)) && value_symbolic_p(entity_initial(e)))
1774 
1775 /* implemented as a macro to allow lhs */
1776 #define module_language(e)\
1777  code_language(value_code(entity_initial((e))))
1778 
1779 #define module_functional_parameters(func) \
1780  functional_parameters(type_functional(entity_type(func)))
1781 
1782 #define call_intrinsic_p(C) \
1783  value_intrinsic_p(entity_initial(call_function(C)))
1784 
1785 
1786 #define statement_block_p(stat) \
1787  (instruction_block_p(statement_instruction(stat)))
1788 
1789 #define entity_constant_p(e) (type_functional_p(entity_type(e)) && \
1790  storage_rom_p(entity_storage(e)) && value_constant_p(entity_initial(e)))
1791 
1792 #define loop_to_instruction make_instruction_loop
1793 #define test_to_instruction make_instruction_test
1794 #define call_to_instruction make_instruction_call
1795 
1796 #define loop_to_statement(l) instruction_to_statement(loop_to_instruction(l))
1797 #define test_to_statement(t) instruction_to_statement(test_to_instruction(t))
1798 #define call_to_statement(c) instruction_to_statement(call_to_instruction(c))
1799 
1800 
1801 /***************************************************** BOOLEAN EXPRESSIONS */
1802 
1803 /* Building quickly bool expressions, FC. */
1804 
1805 #define unary_intrinsic_expression(name, e)\
1806  call_to_expression(make_call(entity_intrinsic(name),CONS(EXPRESSION,e,NIL)))
1807 
1808 #define binary_intrinsic_expression(name, e1, e2)\
1809  call_to_expression(make_call(entity_intrinsic(name),\
1810  CONS(EXPRESSION, e1, CONS(EXPRESSION, e2, NIL))))
1811 
1812 #define not_expression(e) \
1813  unary_intrinsic_expression(NOT_OPERATOR_NAME, e)
1814 #define or_expression(e1, e2) \
1815  binary_intrinsic_expression(OR_OPERATOR_NAME, e1, e2)
1816 #define and_expression(e1, e2) \
1817  binary_intrinsic_expression(AND_OPERATOR_NAME, e1, e2)
1818 #define ne_expression(e1, e2) \
1819  binary_intrinsic_expression(NON_EQUAL_OPERATOR_NAME, e1, e2)
1820 #define eq_expression(e1, e2) \
1821  binary_intrinsic_expression(EQUAL_OPERATOR_NAME, e1, e2)
1822 #define gt_expression(e1, e2) \
1823  binary_intrinsic_expression(GREATER_THAN_OPERATOR_NAME, e1, e2)
1824 #define ge_expression(e1, e2) \
1825  binary_intrinsic_expression(GREATER_OR_EQUAL_OPERATOR_NAME, e1, e2)
1826 #define lt_expression(e1, e2) \
1827  binary_intrinsic_expression(LESS_THAN_OPERATOR_NAME, e1, e2)
1828 #define le_expression(e1, e2) \
1829  binary_intrinsic_expression(LESS_OR_EQUAL_OPERATOR_NAME, e1, e2)
1830 
1831 
1832 /******************************************************** CONTROL GRAPH... */
1833 
1834 /* For the control graph modifiers: */
1835 
1836 /* To specify the way that remove_a_control_from_a_list_and_relink
1837  acts: */
1839 {
1840  /* Put some strange number to avoid random clash as much as
1841  possible... */
1844  };
1847 
1848 /* Constants for some ex-atomizer variable generation */
1849 
1850 #define TMP_ENT 1
1851 #define AUX_ENT 2
1852 #define DOUBLE_PRECISION_SIZE 8
1853 
1854 
1855 /***************************************************** HPF/HPFC DIRECTIVES */
1856 
1857 /* moved here because needed by syntax:-(
1858  */
1859 /* Directive names encoding: HPF_PREFIX + one character.
1860  * This encoding is achieved thru a sed script that transforms directives
1861  * into calls that can be parsed by the PIPS F77 parser. It's a hack but
1862  * it greatly reduced the number of lines for directive analysis, and
1863  * it allowed quite simply to figure out where the executable directives
1864  * are in the code.
1865  * However the syntax allowed in mapping directives is restricted to F77.
1866  */
1867 
1868 /* prefix for spacial directive calls
1869  */
1870 #define HPF_PREFIX "HPFC"
1871 
1872 /* suffixies for encoded hpf keywords
1873  */
1874 #define BLOCK_SUFFIX "K"
1875 #define CYCLIC_SUFFIX "C"
1876 #define STAR_SUFFIX "S"
1877 
1878 /* suffixes for HPF directives managed by HPFC
1879  */
1880 #define ALIGN_SUFFIX "A"
1881 #define REALIGN_SUFFIX "B"
1882 #define DISTRIBUTE_SUFFIX "D"
1883 #define REDISTRIBUTE_SUFFIX "E"
1884 #define INDEPENDENT_SUFFIX "I"
1885 #define NEW_SUFFIX "N"
1886 #define REDUCTION_SUFFIX "R"
1887 #define PROCESSORS_SUFFIX "P"
1888 #define TEMPLATE_SUFFIX "T"
1889 #define PURE_SUFFIX "U"
1890 #define DYNAMIC_SUFFIX "Y"
1891 
1892 /* suffixes for my own (FCD:-) directives.
1893  * these directives are used to instrument the code.
1894  * must be used carefully. may be ignore with some properties.
1895  */
1896 #define TELL_SUFFIX "0"
1897 #define SYNCHRO_SUFFIX "1"
1898 #define TIMEON_SUFFIX "2"
1899 #define TIMEOFF_SUFFIX "3"
1900 #define SETBOOL_SUFFIX "4"
1901 #define SETINT_SUFFIX "5"
1902 #define HPFCIO_SUFFIX "6"
1903 #define HOSTSECTION_SUFFIX "7"
1904 #define DEAD_SUFFIX "8"
1905 #define FAKE_SUFFIX "9"
1906 
1907 /* property prefix for ignoring FCD directives
1908  * TIME, SYNCHRO and SET exists.
1909  */
1910 #define FCD_IGNORE_PREFIX "HPFC_IGNORE_FCD_"
1911 
1912 /* __asm function
1913  */
1914 #define ASM_FUNCTION_NAME "__asm"
1915 
1916 /* soft block->sequence transition
1917  */
1918 #define is_instruction_block is_instruction_sequence
1919 #define instruction_block_p(i) instruction_sequence_p(i)
1920 #define instruction_block(i) sequence_statements(instruction_sequence(i))
1921 
1922 /* easy list constructor
1923  */
1924 #define make_statement_list( stats... ) \
1925  (gen_make_list(statement_domain, ##stats, 0))
1926 #define make_expression_list( stats... ) \
1927  (gen_make_list(expression_domain, ##stats, 0))
1928 
1929 /* After the modification in Newgen: unstructured = entry:control x exit:control
1930  we have create a macro to transform automatically unstructured_control to unstructured_entry */
1931 #define unstructured_control unstructured_entry
1932 
1933 /* Default type sizes */
1934 
1935 #define DEFAULT_CHARACTER_TYPE_SIZE (1)
1936 #define DEFAULT_SHORT_INTEGER_TYPE_SIZE (2)
1937 #define DEFAULT_INTEGER_TYPE_SIZE (4)
1938 #define DEFAULT_LONG_INTEGER_TYPE_SIZE (6)
1939 #define DEFAULT_LONG_LONG_INTEGER_TYPE_SIZE (8)
1940 #define DEFAULT_LONG_LONG_LONG_INTEGER_TYPE_SIZE (9)
1941 
1942 // To avoid issues with the PIPS validation suite on a 32-bit pointer machine
1943 //#define DEFAULT_POINTER_TYPE_SIZE (sizeof(void *)) // could be 4 or 8 or sizeof(pointer)
1944 #define DEFAULT_POINTER_TYPE_SIZE (8)
1945 #define DEFAULT_UNSIGNED_TYPE_SIZE (1) // type_size/10==1
1946 #define DEFAULT_SIGNED_TYPE_SIZE (2) // type_size/10=2
1947 
1948 /* The standard C integer types are represented as follow
1949 char = 1
1950 short_int = 2
1951 int = 4
1952 long_int = 6
1953 long_long_int = 8
1954 __int128_t = 9 (gcc extension)
1955 
1956 unsigned_char = 11
1957 unsigned_short_int = 12
1958 unsigned_int = 14
1959 unsigned_long_int = 16
1960 unsigned_long_long_int = 18
1961 __uint128_t = 19 (gcc extension)
1962 
1963 signed_char = 21
1964 signed_short_int = 22
1965 signed_int = 24
1966 signed_long_int = 26
1967 signed_long_long_int = 28
1968 
1969 mod(i,10) refers to the basic size and div(i,10) refers that
1970 the variable is unsigned, signed or not */
1971 
1972 #define DEFAULT_REAL_TYPE_SIZE (4)
1973 #define DEFAULT_DOUBLEPRECISION_TYPE_SIZE (8)
1974 #define DEFAULT_QUADPRECISION_TYPE_SIZE (16)
1975 #define DEFAULT_COMPLEX_TYPE_SIZE (8)
1976 #define DEFAULT_DOUBLECOMPLEX_TYPE_SIZE (16)
1977 #define DEFAULT_LONGDOUBLECOMPLEX_TYPE_SIZE (32)
1978 #define DEFAULT_LOGICAL_TYPE_SIZE (4)
1979 
1980 /* Already defined */
1981 //#define DEFAULT_POINTER_TYPE_SIZE (4)
1982 
1983 /* package name for region variables */
1984 #define REGIONS_MODULE_NAME "REGIONS-PACKAGE"
1985 
1986 /* Implicit variables to handle IO effetcs */
1987 /* package name for io routines */
1988 #define IO_EFFECTS_PACKAGE_NAME "__IO_EFFECTS"
1989 /* package name for time routines */
1990 #define TIME_EFFECTS_PACKAGE_NAME "__TIME_EFFECTS"
1991 /* package name for random routines */
1992 #define RAND_EFFECTS_PACKAGE_NAME "_RANDOM_EFFECTS"
1993 /* variable name for random unit */
1994 #define RAND_GEN_EFFECTS_NAME "GEN_SEED"
1995 /* package name for malloc routines (could be libc package) */
1996 #define MALLOC_EFFECTS_PACKAGE_NAME "_MALLOC_EFFECTS"
1997 /* variable name for heap effects */
1998 #define MALLOC_EFFECTS_NAME "_MALLOC_"
1999 /* package name for memmove routines */
2000 #define MEMMOVE_EFFECTS_PACKAGE_NAME "_MEMMOVE_EFFECTS"
2001 /* variable name for memmove unit */
2002 #define MEMMOVE_EFFECTS_NAME "_MEMMOVE_"
2003 /* array of Logical UNits; it is more or less handled as the current file pointer; in C, used for open, close, read, write... */
2004 #define IO_EFFECTS_ARRAY_NAME "LUNS"
2005 /* Array of struct io_files pointed to by pointers returned by fopen
2006  and used by fclose, fscanf, fprintf... */
2007 #define IO_EFFECTS_IO_FILE_NAME "IO_FILES"
2008 /* To express C IO intrinsics effects */
2009 #define IO_EFFECTS_PTR_NAME "_C_IO_ptr"
2010 /* array of end of file codes */
2011 #define IO_EOF_ARRAY_NAME "END_LUNS"
2012 /* array of error codes for LUNs */
2013 #define IO_ERROR_ARRAY_NAME "ERR_LUNS"
2014 /* variable holding time effects */
2015 #define TIME_EFFECTS_VARIABLE_NAME "KALI" /* Kali is the goddess of time in the Hindu mythology */
2016 #define TIME_EFFECTS_BUFFER_NAME "KALI-BUFFER" /* Kali is the goddess of time in the Hindu mythology */
2017 /* size of the unit specifier */
2018 #define IO_EFFECTS_UNIT_SPECIFIER_LENGTH 4
2019 /* Standard unit numbers depend on the operating system. Here are UNIX definitions. */
2020 #define STDERR_LUN (0)
2021 #define STDERR_NAME "stderr"
2022 #define ENTITY_STDERR_P(e) entity_a_special_entity_p(e, STDERR_NAME)
2023 #define STDIN_LUN (5)
2024 #define STDIN_NAME "stdin"
2025 #define ENTITY_STDIN_P(e) entity_a_special_entity_p(e, STDIN_NAME)
2026 #define STDOUT_LUN (6)
2027 #define STDOUT_NAME "stdout"
2028 #define ENTITY_STDOUT_P(e) entity_a_special_entity_p(e, STDOUT_NAME)
2029 
2030 /*Symbolic constants for the file descriptors belonging to the standard streams: unistd.h */
2031 #if !defined(HAVE_UNISTD_H) && !defined(_UNISTD_H)
2032 #define STDIN_FILENO (0)
2033 #define STDOUT_FILENO (1)
2034 #define STDERR_FILENO (2)
2035 #endif
2036 
2037 /* Implicit variable names for C */
2038 
2039 #define IMPLICIT_VARIABLE_NAME_1 "__FUNCTION__"
2040 #define IMPLICIT_VARIABLE_NAME_2 "__func__"
2041 
2042 /* Empty comments (i.e. default comments) */
2043 /* FI: this is a poor choice as the statements won't be gen_defined_p
2044  and as strdup() won't be usable without an extra test. Would it be
2045  so bad to use strdup(""); as empty_comments? */
2046 #define empty_comments string_undefined
2047 
2048 /** An alias for make_empty_block_statement */
2049 #define make_empty_statement make_empty_block_statement
2050 
2051 /** An alias for make_empty_block_statement */
2052 #define make_nop_statement make_empty_block_statement
2053 
2054 
2055 /* \addtogroup control_visitors */
2056 
2057 /* @{ */
2058 /* Macro to walk through all the controls reachable from a given control
2059  node of an unstructured
2060 
2061  Reachability is defined by successors and predecessors (i.e. the control
2062  flow graph is seen as non-directed)
2063 
2064  @param ctl is a name of a control node variable that is declared inside
2065  this macro and is used by the following code to access the visited
2066  control node
2067 
2068  @param code is the actions to execute on the visited control node
2069 
2070  @param c is a control node to start visiting with
2071 
2072  @param list is a list that will store the visited control nodes. It is
2073  used mainly for this macro to avoid visiting twice a node. The simple
2074  usage is to give a list variable initialized to NIL. A nice side effect
2075  is that it will contain the list of all the reachable control nodes. Do
2076  not forget to free this list afterwards. Another classical usage is to
2077  give to the macro a list with a list of nodes to avoid visiting.
2078 */
2079 #define CONTROL_MAP( ctl, code, c, list ) \
2080  do { \
2081  GENERIC_CONTROL_MAP( control_map_get_blocs, ctl, code, c, list ) \
2082  } while(0)
2083 
2084 
2085 /* Walk through all the controls of un unstructured
2086 
2087  This macro do not work indeed because often the...
2088 
2089  The nodes are those reachable from the entry node and also from the exit
2090  node (that may be unreachable from the entry node of th unstructured).
2091 
2092  Reachability is defined by successors and predecessors (i.e. the control
2093  flow graph is seen as non-directed)
2094 
2095  @param c is a name of a control node variable that is declared inside
2096  this macro and is used by the following code to access the visited
2097  control node
2098 
2099  @param code is the actions to execute on the visited control node
2100 
2101  @param u is the unstructured to visit
2102 
2103  @param l is a list that will store the visited control nodes. It is used
2104  mainly for this macro to avoid visiting twice a node. The simple usage
2105  is to give a list variable initialized to NIL. A nice side effect is
2106  that it will contain the list of all the reachable control nodes. Do not
2107  forget to free this list afterwards. Another classical usage is to give
2108  to the macro a list with a list of nodes to avoid visiting.
2109 */
2110 #define UNSTRUCTURED_CONTROL_MAP(c, u, l, code) \
2111  /* The implementation is sub-optimal because it duplicates the \
2112  code... */ \
2113  do { \
2114  /* First get the control nodes reachable from the entry node: */ \
2115  control_map_get_blocs(unstructured_entry(u), &l); \
2116  /* Add then the control nodes reachable from the exit nodes if not \
2117  already in: */ \
2118  control_map_get_blocs(unstructured_exit(u), &l); \
2119  /* Reverse the list because previous construction was done in the \
2120  reverse way: */ \
2121  l = gen_nreverse(l); \
2122  /* Iterate on all the selected control nodes: */ \
2123  FOREACH(CONTROL, c, l) \
2124  code \
2125  } while(0)
2126 
2127 
2128 /* Walk through all the controls forward-reachable from a given control
2129  node of an unstructured
2130 
2131  Reachability is defined by successor-only relation (i.e. the control
2132  flow graph is seen as directed)
2133 
2134  @param ctl is a name of a control node variable that is declared inside
2135  this macro and is used by the following code to access the visited
2136  control node
2137 
2138  @param code is the actions to execute on the visited control node
2139 
2140  @param c is a control node to start visiting with
2141 
2142  @param list is a list that will store the visited control nodes. It is
2143  used mainly for this macro to avoid visiting twice a node. The simple
2144  usage is to give a list variable initialized to NIL. A nice side effect
2145  is that it will contain the list of all the forward-reachable control
2146  nodes. Do not forget to free this list afterwards. Another classical
2147  usage is to give to the macro a list with a list of nodes to avoid
2148  visiting.
2149 */
2150 #define FORWARD_CONTROL_MAP( ctl, code, c, list ) \
2151  do { \
2152  GENERIC_CONTROL_MAP( forward_control_map_get_blocs, ctl, code, c, list ) \
2153  } while(0)
2154 
2155 
2156 /* Walk through all the controls backward-reachable from a given control
2157  node of an unstructured
2158 
2159  Reachability is defined by predecessor-only relation (i.e. the control
2160  flow graph is seen as directed)
2161 
2162  @param ctl is a name of a control node variable that is declared inside
2163  this macro and is used by the following code to access the visited
2164  control node
2165 
2166  @param code is the actions to execute on the visited control node
2167 
2168  @param c is a control node to start visiting with
2169 
2170  @param list is a list that will store the visited control nodes. It is
2171  used mainly for this macro to avoid visiting twice a node. The simple
2172  usage is to give a list variable initialized to NIL. A nice side effect
2173  is that it will contain the list of all the backward-reachable control
2174  nodes. Do not forget to free this list afterwards. Another classical
2175  usage is to give to the macro a list with a list of nodes to avoid
2176  visiting.
2177 */
2178 #define BACKWARD_CONTROL_MAP( ctl, code, c, list ) \
2179  do { \
2180  GENERIC_CONTROL_MAP( backward_control_map_get_blocs, ctl, code, c, list ) \
2181  } while(0)
2182 
2183 
2184 /* Walk through all the controls backward-reachable from a given control
2185  node of an unstructured
2186 
2187  Reachability is defined by successor-only relation (i.e. the control
2188  flow graph is seen as directed)
2189 
2190  @param ctl is a name of a control node variable that is declared inside
2191  this macro and is used by the following code to access the visited
2192  control node
2193 
2194  @param code is the actions to execute on the visited control node
2195 
2196  @param c is a control node to start visiting with
2197 
2198  @param list is a list that will store the visited control nodes. It is
2199  used mainly for this macro to avoid visiting twice a node. The simple
2200  usage is to give a list variable initialized to NIL. A nice side effect
2201  is that it will contain the list of all the reachable control nodes. Do
2202  not forget to free this list afterwards. Another classical usage is to
2203  give to the macro a list with a list of nodes to avoid visiting.
2204 */
2205 #define WIDE_FORWARD_CONTROL_MAP( ctl, code, c, list ) \
2206  do { \
2207  GENERIC_CONTROL_MAP(wide_forward_control_map_get_blocs, \
2208  ctl, code, c, list ) \
2209  } while(0)
2211 
2212 /* The control node visiting engine. */
2213 #define GENERIC_CONTROL_MAP( get_controls, ctl, code, c, list ) \
2214 { \
2215  cons *_cm_list_init = (list) ; \
2216  cons *_cm_list = _cm_list_init ; \
2217  if( _cm_list == NIL ) {\
2218  get_controls( c, &_cm_list ) ; \
2219  _cm_list = gen_nreverse( _cm_list ) ; \
2220  }\
2221  MAPL( _cm_ctls, {control ctl = CONTROL( CAR( _cm_ctls )) ; \
2222  \
2223  code ;}, \
2224  _cm_list ) ; \
2225  if( _cm_list_init == NIL ) \
2226  list = _cm_list ; \
2227 }
2228 
2229 
2230 
2231 /** @} */
2232 
2233 
2234 /** @defgroup phase_definition Functions used to define phases
2235 
2236  It defines macros for simple transformation phases that use (at least)
2237  the CODE of a module and write back a (possibly) new version of the
2238  CODE.
2239 
2240  @{
2241 */
2242 
2243 
2244 /** Start a phase that use a module CODE
2245 
2246  @param module_name is a string with the name of the module the phase is
2247  applied to
2248 
2249  @param debug_env_var is a string with the name of the environment variable used to get the debug level to use inside the phase
2251  @return the statement of the module
2252 */
2253 #define PIPS_PHASE_PRELUDE(module_name, debug_env_var) \
2254  /* Get and return the CODE resource of the module and define this \
2255  module as the current one at the same time to avoid introducing \
2256  a new variable: */ \
2257  set_current_module_statement((statement) \
2258  db_get_memory_resource(DBR_CODE, \
2259  module_name, \
2260  true)); \
2261  \
2262  /* Set the current module entity required to have many things \
2263  working in PIPS: */ \
2264  set_current_module_entity(module_name_to_entity(module_name)); \
2265  \
2266  /* The debug is now controled by this environment variable name: */ \
2267  debug_on(debug_env_var); \
2268  pips_debug(1, "Entering...\n"); \
2269  pips_assert("Statement should be OK at entry...", \
2270  statement_consistent_p(get_current_module_statement()))
2271 
2272 
2273 /** End a transformation phase by putting back into PIPS the (possibly)
2274  modified statement
2275 
2276  @param new_module_statement point to the (potentially) new module
2277  statement of the module
2278  */
2279 #define PIPS_PHASE_POSTLUDE(new_module_statement) \
2280  pips_assert("Statement should be OK at exit...", \
2281  statement_consistent_p(new_module_statement)); \
2282  pips_debug(1, "done\n"); \
2283  /* Exit current debug context */ \
2284  debug_off(); \
2285  \
2286  /* Reorder the module, because some statements have been replaced. */ \
2287  module_reorder(new_module_statement); \
2288  \
2289  /* Put the new CODE ressource into PIPS: */ \
2290  DB_PUT_MEMORY_RESOURCE(DBR_CODE, \
2291  get_current_module_name(), \
2292  new_module_statement); \
2293  \
2294  /* There is no longer a current module: */ \
2295  reset_current_module_statement(); \
2296  reset_current_module_entity(); \
2297  \
2298  /* Assume it should have worked by returning true... */ \
2299  return true
2300 
2301 /** @} */
2304 /* polymorhism thanks to newgen ! */
2305 #define INSTANCE_OF(type,value) ( (_int)((value)->u) == (_int)(type##_domain) )
2307 #define binary_call_lhs(c) (EXPRESSION(CAR(call_arguments((c)))))
2308 #define binary_call_rhs(c) (EXPRESSION(CAR(CDR(call_arguments((c))))))
2309 #define expression_scalar_p(e) (expression_reference_p((e)) && reference_scalar_p(expression_reference((e))))
2310 #define hash_contains_p(htp, key) (hash_get(htp, key) != HASH_UNDEFINED_VALUE)
2315 } ;
2316 #define range_to_distance_p(e) ((e) == range_to_distance)
2317 #define range_to_nbiter_p(e) ((e) == range_to_nbiter)
2318 
2320 #define GENERATED_LABEL_MODULE_NAME "__GENSYM"
2322 /* that is all for ri-util-local.h
2323  */
2324 
2325 typedef enum {
2327  AND_IF_POLICY,
2328  OR_IF_POLICY
2330 
2331 /* for intrinsic registration */
2332 typedef struct {
2334  int prec;
2337 enum {
2341  ENTITY_STACK_AREA = 4,
2342  ENTITY_HEAP_AREA = 8,
2344  ENTITY_STATIC_AREA = 32,
2347 };
2349 #define make_entity(n,t,s,i) make_entity(n,t,s,i,DEFAULT_ENTITY_KIND)
2350 
2351 /* SPIRE API */
2352 #define SEND_FUNCTION_NAME "send"
2353 #define RECV_FUNCTION_NAME "recv"
2354 #define SIGNAL_FUNCTION_NAME "signal"
2355 #define WAIT_FUNCTION_NAME "wait"
2356 
2358 /*MPI calls*/
2359 #define MPI_INIT_FUNCTION_NAME "MPI_Init"
2360 #define MPI_FINALIZE_FUNCTION_NAME "MPI_Finalize"
2361 #define MPI_ISEND_FUNCTION_NAME "MPI_Isend"
2362 #define MPI_RECV_FUNCTION_NAME "MPI_Recv"
2363 #define MPI_BARRIER_FUNCTION_NAME "MPI_Barrier"
2364 //not use yet
2365 #define MPI_COMM_SIZE_FUNCTION_NAME "MPI_Comm_size"
2366 #define MPI_COMM_RANK_FUNCTION_NAME "MPI_Comm_rank"
2367 #define MPI_SEND_FUNCTION_NAME "MPI_Send" //implementation dependent
2368 #define MPI_SSEND_FUNCTION_NAME "MPI_Ssend" //Synchronous send
2369 #define MPI_RSEND_FUNCTION_NAME "MPI_Rsend" //Ready send
2370 #define MPI_BSEND_FUNCTION_NAME "MPI_Bsend" //Buffer send
2371 #define MPI_ISEND_FUNCTION_NAME "MPI_Isend" //non blocking version
2372 #define MPI_ISSEND_FUNCTION_NAME "MPI_Issend"
2373 #define MPI_IRSEND_FUNCTION_NAME "MPI_Irsend"
2374 #define MPI_IBSEND_FUNCTION_NAME "MPI_Ibsend"
2375 #define MPI_RECV_FUNCTION_NAME "MPI_Recv"
2376 #define MPI_IRECV_FUNCTION_NAME "MPI_Irecv"
2377 //#define MPI_MRECV_FUNCTION_NAME "MPI_Mrecv" //match Receive - MPI3.0
2378 //#define MPI_IMRECV_FUNCTION_NAME "MPI_Imrecv"
2379 #define MPI_SENDRECV_FUNCTION_NAME "MPI_Sendrecv"
2381 
2382 /*MPI types*/
2383 #define MPI_STATUS "MPI_Status"
2384 #define MPI_REQUEST "MPI_Request"
2385 #define MPI_COMM "MPI_Comm"
2386 #define MPI_DATATYPE "MPI_Datatype"
2388 /* intrinsic entity declarations */
2389 #define ENTITY_SEND_P(e) ENTITY_NAME_P(e, "send")
2390 
2391 // for new entities
2394 /* cproto-generated files */
2395 /* eval.c */
2396 extern value EvalExpression(expression /*e*/);
2397 extern value EvalSyntax(syntax /*s*/);
2398 extern value EvalCall(call /*c*/);
2400 extern value EvalConstant(constant /*c*/);
2401 extern value EvalIntrinsic(entity /*e*/, list /*la*/);
2402 extern value EvalConditionalOp(list /*la*/);
2403 extern value EvalUnaryOp(int /*t*/, list /*la*/);
2404 extern value EvalBinaryOp(int /*t*/, list /*la*/);
2405 extern value EvalNaryOp(int /*t*/, list /*la*/);
2406 extern int IsUnaryOperator(entity /*e*/);
2407 extern int IsBinaryOperator(entity /*e*/);
2408 extern int IsNaryOperator(entity /*e*/);
2409 extern int ipow(int /*vg*/, int /*vd*/);
2410 extern bool expression_integer_value(expression /*e*/, intptr_t */*pval*/);
2412 extern bool positive_expression_p(expression /*e*/);
2413 extern bool negative_expression_p(expression /*e*/);
2414 extern bool expression_linear_p(expression /*e*/);
2416 extern bool range_count(range /*r*/, intptr_t */*pcount*/);
2417 extern Pvecteur vect_product(Pvecteur */*pv1*/, Pvecteur */*pv2*/);
2420 /* size.c */
2421 extern int number_of_initial_values(list /*args*/);
2422 extern bool SizeOfArray(entity /*e*/, int */*s*/);
2423 extern int array_size(entity /*a*/);
2424 extern Value ValueSizeOfArray(entity /*e*/);
2425 extern int CSafeSizeOfArray(entity /*a*/);
2426 extern int entity_memory_size(entity /*dt*/);
2427 extern int type_memory_size(type /*t*/);
2428 extern _int SizeOfElements(basic /*b*/);
2429 extern int element_number(basic /*b*/, list /*ld*/);
2430 extern bool NumberOfElements(basic /*b*/, list /*ld*/, int */*n*/);
2431 extern Value ValueNumberOfElements(list /*ld*/);
2432 extern int SizeOfIthDimension(entity /*e*/, int /*i*/);
2433 extern int dimension_size(dimension /*d*/);
2434 extern expression SizeOfDimension(dimension /*d*/);
2435 extern expression SizeOfDimensions(list /*dims*/);
2436 extern Value ValueSizeOfDimension(dimension /*d*/);
2437 extern int ExpressionToInt(expression /*e*/);
2438 extern int NumberOfDimension(entity /*e*/);
2439 extern void set_entity_to_size(void);
2440 extern void reset_entity_to_size(void);
2441 extern void safe_reset_entity_to_size(void);
2442 extern int storage_space_of_variable(entity /*v*/);
2443 extern bool variable_entities_may_conflict_p(entity /*e1*/, entity /*e2*/);
2444 /* pragma.c */
2445 extern const string FORTRAN_PRAGMA_HEADER;
2446 extern const string FORTRAN_OMP_CONTINUATION;
2448 extern expression pragma_if_as_expr(expression /*arg*/);
2449 extern expression pragma_private_as_expr_with_args(list /*args_expr*/);
2450 extern expression pragma_private_as_expr(list /*args_ent*/);
2451 extern list pragma_omp_parallel_as_exprs(void);
2453 extern list filter_variables_in_pragma_expr(list /*l_expr*/, list /*to_filter*/);
2454 extern list pragma_omp_merge_expr(list /*outer_extensions*/, list /*l_pragma*/, language /*l*/);
2455 extern void add_pragma_str_to_statement(statement /*st*/, const char */*s*/, bool /*copy_flag*/);
2456 extern void add_pragma_strings_to_statement(statement /*st*/, list /*l*/, bool /*copy_flag*/);
2457 extern void add_pragma_expr_to_statement(statement /*st*/, list /*l*/);
2458 /* extension.c */
2459 extern extensions empty_extensions(void);
2460 extern bool empty_extensions_p(extensions /*es*/);
2461 /* area.c */
2462 extern entity DynamicArea;
2463 extern entity StaticArea;
2464 extern entity HeapArea;
2465 extern entity StackArea;
2466 extern entity AllocatableArea;
2467 extern bool allocatable_area_p(entity /*aire*/);
2468 extern bool dynamic_area_p(entity /*aire*/);
2469 extern bool static_area_p(entity /*aire*/);
2470 extern bool heap_area_p(entity /*aire*/);
2471 extern bool formal_area_p(entity /*aire*/);
2472 extern bool stack_area_p(entity /*aire*/);
2473 extern bool pointer_dummy_targets_area_p(entity /*aire*/);
2474 extern entity module_to_heap_area(entity /*f*/);
2475 extern entity module_to_dynamic_area(entity /*f*/);
2476 extern bool entity_area_p(entity /*e*/);
2477 extern bool entity_special_area_p(entity /*e*/);
2478 extern int current_offset_of_area(entity /*a*/, entity /*v*/);
2479 extern bool empty_static_area_p(entity /*e*/);
2480 extern void print_common_layout(FILE */*fd*/, entity /*c*/, bool /*debug_p*/);
2481 /* util.c */
2482 extern entity find_label_entity(const char */*module_name*/, const char */*label_local_name*/);
2483 extern string module_codefilename(entity /*e*/);
2484 extern string module_par_codefilename(entity /*e*/);
2485 extern string module_fortranfilename(entity /*e*/);
2486 extern string module_par_fortranfilename(entity /*e*/);
2487 extern string module_pp_fortranfilename(entity /*e*/);
2488 extern string module_predicat_fortranfilename(entity /*e*/);
2489 extern string module_entitiesfilename(entity /*e*/);
2490 extern entity find_ith_parameter(entity /*e*/, int /*i*/);
2491 extern bool ith_parameter_p(entity /*f*/, entity /*v*/, int /*i*/);
2492 extern expression reference_ith_index(reference /*ref*/, int /*i*/);
2493 extern bool comment_string_p(const string /*comment*/);
2494 extern string string_remove_trailing_line_feed(string /*s*/);
2495 extern string string_remove_trailing_line_feeds(string /*s*/);
2496 extern string string_strip_final_linefeeds(string /*s*/);
2497 extern string string_fuse_final_linefeeds(string /*s*/);
2498 /* ordering.c */
2499 extern bool ordering_to_statement_initialized_p(void);
2500 extern void print_ordering_to_statement(void);
2501 extern statement ordering_to_statement(int /*o*/);
2505 extern void reset_ordering_to_statement(void);
2506 /* declarations.c */
2507 extern void check_fortran_declaration_dependencies(list /*ldecl*/);
2508 extern list get_common_members(entity /*common*/, entity /*module*/, bool /*only_primary*/);
2509 extern void print_C_common_layout(FILE */*fd*/, entity /*c*/, bool /*debug_p*/);
2510 extern void fprint_functional(FILE */*fd*/, functional /*f*/);
2511 extern void fprint_environment(FILE */*fd*/, entity /*m*/);
2512 extern void fprint_C_environment(FILE */*fd*/, entity /*m*/);
2513 extern void fprint_any_environment(FILE */*fd*/, entity /*m*/, bool /*is_fortran*/);
2515 extern void dump_functional(functional /*f*/, string_buffer /*result*/);
2516 /* loop.c */
2517 extern int Nbrdo;
2521 extern void reset_enclosing_loops_map(void);
2522 extern void free_enclosing_loops_map(void);
2523 extern void make_enclosing_loops_map(void);
2525 extern void delete_statement_enclosing_loops(statement /*s*/);
2527 extern void store_statement_enclosing_loops(statement /*s*/, list /*t*/);
2528 extern void update_statement_enclosing_loops(statement /*s*/, list /*t*/);
2529 extern void clean_enclosing_loops(void);
2531 extern set distributable_loop(statement /*l*/);
2532 extern bool index_private_p(loop /*lo*/);
2533 extern set region_of_loop(statement /*l*/);
2534 extern void region_of_statement(statement /*stat*/, set /*region*/);
2535 extern list loop_private_variables_as_entites(loop /*obj*/, bool /*local*/, bool /*index*/);
2536 extern void sort_all_loop_locals(statement /*s*/);
2537 extern bool loop_parallel_p(loop /*l*/);
2538 extern bool loop_sequential_p(loop /*l*/);
2539 extern bool parallel_loop_statement_p(statement /*s*/);
2541 extern int depth_of_perfect_loop_nest(statement /*s*/);
2543 extern bool perfectly_nested_loop_p(statement /*stat*/);
2544 extern statement perfectly_nested_loop_to_body(statement /*loop_nest*/);
2545 extern statement perfectly_nested_loop_to_body_at_depth(statement /*s*/, int /*depth*/);
2546 extern entity perfectly_nested_loop_index_at_depth(statement /*s*/, int /*depth*/);
2547 extern int loop_increment_value(loop /*l*/);
2548 extern bool constant_step_loop_p(loop /*l*/);
2549 extern bool normal_loop_p(loop /*l*/);
2550 extern void number_of_sequential_and_parallel_loops(statement /*stat*/, int */*pseq*/, int */*ppar*/);
2551 extern void print_number_of_loop_statistics(FILE */*out*/, string /*msg*/, statement /*s*/);
2552 extern void print_parallelization_statistics(const char */*module*/, const char */*msg*/, statement /*s*/);
2553 extern list copy_loops(list /*ll*/);
2554 extern statement make_new_loop_statement(entity /*i*/, expression /*low*/, expression /*up*/, expression /*inc*/, statement /*b*/, execution /*e*/);
2557 extern bool loop_executed_at_least_once_p(loop /*l*/);
2558 extern bool range_contains_nothing_p(range /*r*/);
2559 extern bool loop_executed_never_p(loop /*l*/);
2560 extern bool index_of_a_loop_p(Variable /*v*/, list /*loops*/);
2561 /* fortran90.c */
2562 extern expression update_range(entity /*f*/, range /*r*/, expression /*lw*/, expression /*up*/, expression /*in*/, bool /*left*/);
2563 /* constant.c */
2564 extern int DefaultLengthOfBasic(tag /*t*/);
2565 extern bool integer_constant_name_p(string /*name*/);
2566 extern _int TK_CHARCON_to__int(const char */*name*/);
2567 extern entity make_C_or_Fortran_constant_entity(const char */*name*/, tag /*bt*/, size_t /*size*/, bool /*is_fortran*/, bool (* /*error_manager*/)(const char *, const char *));
2568 extern entity make_constant_entity(string /*name*/, tag /*bt*/, size_t /*size*/);
2569 extern entity SafeMakeConstant(string /*name*/, tag /*bt*/, bool (* /*error_manager*/)(const char *, const char *));
2570 extern entity MakeConstant(string /*name*/, tag /*bt*/);
2571 extern bool constant_string_entity_p(entity /*e*/);
2572 extern entity MakeComplexConstant(expression /*r*/, expression /*i*/);
2574 extern bool complex_constant_expression_p(expression /*cce*/);
2575 extern entity float_to_entity(float /*c*/);
2576 extern entity int_to_entity(_int /*c*/);
2577 extern bool logical_constant_p(entity /*ent*/);
2578 extern bool float_constant_p(entity /*ent*/);
2579 extern bool integer_constant_p(entity /*ent*/, int */*int_p*/);
2580 extern bool integer_symbolic_constant_p(entity /*ent*/, int */*int_p*/);
2581 extern expression MakeCharacterConstantExpression(string /*s*/);
2582 extern value MakeValueSymbolic(expression /*e*/);
2583 extern bool signed_constant_expression_p(expression /*e*/);
2584 extern basic constant_basic(entity /*c*/);
2585 extern double float_constant_to_double(entity /*c*/);
2586 extern bool expression_is_constant_p(expression /*e*/);
2587 /* constraint.c */
2588 extern void vect_debug(Pvecteur /*v*/);
2589 extern int compare_Pvecteur(Pvecteur */*pv1*/, Pvecteur */*pv2*/);
2590 extern bool vecteur_nul_p(Pvecteur /*v*/);
2591 /* bound_generation.c */
2592 extern int bound_generation_compare_vector_component(Pvecteur */*pv1*/, Pvecteur */*pv2*/);
2593 extern void make_bound_expression(Variable /*index*/, Pbase /*base*/, Psysteme /*sc*/, expression */*lower*/, expression */*upper*/);
2594 /* entity.c */
2595 extern void set_std_static_entities(void);
2596 extern void set_internal_static_entities(void);
2597 extern void reset_internal_static_entities(void);
2598 extern void reset_std_static_entities(void);
2599 extern void reset_static_entities(void);
2600 extern void register_static_entity(entity */*e*/);
2601 extern void print_entities(list /*l*/);
2602 extern void print_entity_set(set /*s*/);
2603 extern entity make_empty_module(const char */*full_name*/, type /*r*/, language /*l*/);
2604 extern entity make_empty_program(const char */*name*/, language /*l*/);
2605 extern entity make_empty_subroutine(const char */*name*/, language /*l*/);
2606 extern entity make_empty_f95module(const char */*name*/, language /*l*/);
2607 extern entity make_empty_function(const char */*name*/, type /*r*/, language /*l*/);
2608 extern entity make_empty_blockdata(const char */*name*/, language /*l*/);
2609 extern code EntityCode(entity /*e*/);
2610 extern entity make_label(const char */*module_name*/, const char */*local_name*/);
2611 extern void reset_label_counter(void);
2612 extern char *new_label_local_name(entity /*module*/);
2613 extern entity make_new_label(entity /*module*/);
2614 extern entity make_loop_label(int /*desired_number*/, entity /*module*/);
2615 extern bool label_defined_in_statement_p(entity /*l*/, statement /*s*/);
2616 extern bool label_defined_in_current_module_p(entity /*l*/);
2617 extern bool label_string_defined_in_current_module_p(string /*ls*/);
2618 extern bool label_string_defined_in_statement_p(string /*ls*/, statement /*s*/);
2619 extern string safe_entity_name(entity /*e*/);
2620 extern const char *entity_local_name(entity /*e*/);
2621 extern string entity_global_name(entity /*e*/);
2622 extern const char *entity_user_name(entity /*e*/);
2623 extern string empty_scope(void);
2624 extern bool empty_scope_p(string /*s*/);
2625 extern bool string_struct_scope_p(string /*s*/);
2626 extern bool string_block_scope_p(string /*s*/);
2627 extern string entity_name_without_scope(entity /*e*/);
2628 extern string local_name_to_scope(const char */*ln*/);
2629 extern const char *module_local_name(entity /*e*/);
2630 extern const char *module_resource_name(entity /*e*/);
2631 extern const char *label_local_name(entity /*e*/);
2632 extern bool label_name_conflict_with_labels(const char */*n*/, list /*ll*/);
2633 extern const char *entity_name_or_TCST(entity /*e*/);
2634 extern const char *entity_and_common_name(entity /*e*/);
2635 extern bool entity_empty_label_p(entity /*e*/);
2636 extern bool entity_return_label_p(entity /*e*/);
2637 extern bool entity_label_p(entity /*e*/);
2638 extern bool entity_module_p(entity /*e*/);
2639 extern bool entity_f95use_p(entity /*e*/);
2640 extern bool entity_main_module_p(entity /*e*/);
2641 extern bool entity_f95module_p(entity /*e*/);
2642 extern bool entity_blockdata_p(entity /*e*/);
2643 extern bool entity_common_p(entity /*e*/);
2644 extern bool entity_function_p(entity /*e*/);
2645 extern bool entity_subroutine_p(entity /*e*/);
2646 extern bool entity_pointer_p(entity /*e*/);
2647 extern bool entity_array_p(entity /*e*/);
2648 extern bool entity_register_p(entity /*e*/);
2649 extern void set_register_qualifier(entity /*v*/);
2650 extern bool array_entity_p(entity /*e*/);
2651 extern bool entity_variable_length_array_p(entity /*e*/);
2652 extern bool assumed_size_array_p(entity /*e*/);
2653 extern bool pointer_type_array_p(entity /*e*/);
2654 extern bool unnormalized_array_p(entity /*e*/);
2655 extern bool entity_field_p(entity /*e*/);
2659 extern int entity_field_rank(entity /*f*/);
2660 extern bool entity_enum_p(entity /*e*/);
2661 extern bool entity_enum_member_p(entity /*e*/);
2662 extern bool entity_enum_variable_p(entity /*e*/);
2663 extern bool entity_struct_p(entity /*e*/);
2664 extern bool same_struct_entity_p(const entity /*e0*/, const entity /*e1*/);
2665 extern bool same_field_entity_p(const entity /*f1*/, const entity /*f2*/);
2666 extern bool entity_union_p(entity /*e*/);
2667 extern bool derived_entity_p(entity /*e*/);
2668 extern bool local_entity_of_module_p(entity /*e*/, entity /*module*/);
2669 extern bool entity_in_common_p(entity /*e*/);
2670 extern const char *entity_module_name(entity /*e*/);
2671 extern code entity_code(entity /*e*/);
2672 extern entity entity_empty_label(void);
2673 extern bool top_level_entity_p(entity /*e*/);
2674 extern bool io_entity_p(entity /*e*/);
2675 extern bool io_luns_entity_p(entity /*e*/);
2676 extern bool rand_effects_entity_p(entity /*e*/);
2677 extern bool malloc_effect_entity_p(entity /*e*/);
2678 extern bool memmove_effect_entity_p(entity /*e*/);
2679 extern bool time_effect_entity_p(entity /*e*/);
2680 extern bool effects_package_entity_p(entity /*e*/);
2681 extern entity get_stdin_entity(void);
2682 extern bool stdin_entity_p(entity /*e*/);
2683 extern entity get_stdout_entity(void);
2684 extern bool stdout_entity_p(entity /*e*/);
2685 extern entity get_stderr_entity(void);
2686 extern bool stderr_entity_p(entity /*e*/);
2687 extern bool std_file_entity_p(entity /*e*/);
2689 extern bool intrinsic_entity_p(entity /*e*/);
2690 extern bool symbolic_entity_p(entity /*e*/);
2691 extern bool intrinsic_name_p(const char */*local_name*/);
2692 extern entity entity_intrinsic(const char */*name*/);
2693 extern entity CreateIntrinsic(string /*name*/);
2694 extern bool same_entity_p(entity /*e1*/, entity /*e2*/);
2695 extern int compare_entities(const entity */*pe1*/, const entity */*pe2*/);
2696 extern void sort_list_of_entities(list /*l*/);
2697 extern bool lexicographic_order_p(entity /*var1*/, entity /*var2*/);
2698 extern basic entity_basic(entity /*e*/);
2699 extern list entity_qualifiers(entity /*e*/);
2700 extern bool entity_basic_p(entity /*e*/, enum basic_utype /*basictag*/);
2701 extern bool entity_list_p(list /*el*/);
2702 extern entity local_name_to_top_level_entity(const char */*n*/);
2703 extern entity module_name_to_entity(const char */*mn*/);
2704 extern entity module_name_to_runtime_entity(const char */*name*/);
2705 extern entity FindEntity(const char */*package*/, const char */*name*/);
2706 extern entity global_name_to_entity(const char */*name*/);
2707 extern entity FindEntityFromUserName(const char */*package*/, const char */*name*/);
2708 extern entity CreateEntity(const char */*package_name*/, const char */*local_name*/);
2709 extern entity FindOrCreateEntity(const char */*package*/, const char */*local_name*/);
2710 extern entity FindOrCreateTopLevelEntity(const char */*name*/);
2711 extern expression entity_ith_bounds(entity /*e*/, int /*i*/);
2712 extern bool io_intrinsic_p(entity /*e*/);
2713 extern bool arithmetic_intrinsic_p(entity /*e*/);
2714 extern entity get_continue_entity(void);
2715 extern bool entity_continue_p(entity /*f*/);
2716 extern list common_members_of_module(entity /*common*/, entity /*module*/, bool /*only_primary*/);
2717 extern entity make_new_common(string /*name*/, entity /*mod*/);
2718 extern entity make_new_integer_scalar_common_variable(string /*name*/, entity /*mod*/, entity /*com*/);
2719 extern entity find_ith_formal_parameter(entity /*the_fnct*/, int /*rank*/);
2720 extern list string_to_entity_list(string /*module*/, string /*names*/);
2721 extern bool typedef_entity_p(entity /*e*/);
2722 extern bool member_entity_p(entity /*e*/);
2723 extern bool entity_formal_p(entity /*p*/);
2724 extern bool dummy_parameter_entity_p(entity /*p*/);
2725 extern entity MakeCompilationUnitEntity(const char */*name*/);
2726 extern bool extern_entity_p(entity /*module*/, entity /*e*/);
2727 extern bool explicit_extern_entity_p(entity /*module*/, entity /*e*/);
2728 extern string storage_to_string(storage /*s*/);
2729 extern entity entity_to_module_entity(entity /*e*/);
2730 extern void update_dummy_parameter(parameter /*p*/, entity /*ep*/);
2731 extern bool parameter_passing_mode_p(entity /*f*/, int tag);
2732 extern bool parameter_passing_by_value_p(entity /*f*/);
2733 extern bool parameter_passing_by_reference_p(entity /*f*/);
2734 extern char *AddPackageToName(string /*p*/, string /*n*/);
2736 extern bool entity_equivalence_p(entity /*e*/);
2737 extern bool same_entity_name_p(entity /*e1*/, entity /*e2*/);
2738 extern bool entity_in_list_p(entity /*ent*/, list /*ent_l*/);
2739 extern list concat_new_entities(list /*l1*/, list /*l2*/);
2740 extern bool entity_used_in_declarations_p(entity /*e*/, list /*ldecl*/);
2741 extern bool type_used_in_type_declarations_p(entity /*e*/, list /*ldecl*/);
2742 extern entity make_entity_copy(entity /*e*/);
2743 extern entity make_entity_copy_with_new_name(entity /*e*/, string /*global_new_name*/, bool /*move_initialization_p*/);
2744 extern entity make_entity_copy_with_new_name_and_suffix(entity /*e*/, string /*global_new_name*/, bool /*move_initialization_p*/);
2745 extern void add_thread_safe_variable(entity /*v*/);
2746 extern bool thread_safe_variable_p(entity /*v*/);
2747 extern void add_abstract_state_variable(entity /*v*/);
2748 extern bool abstract_state_variable_p(entity /*v*/);
2749 extern bool entities_p(list /*el*/);
2750 extern entity operator_neutral_element(entity /*op*/);
2751 extern bool commutative_call_p(call /*c*/);
2752 extern list entities_to_expressions(list /*l_ent*/);
2753 extern entity find_enum_of_member(entity /*m*/);
2754 extern bool c_module_p(entity /*m*/);
2755 extern bool fortran_module_p(entity /*m*/);
2757 extern Pbase entity_list_to_base(list /*l*/);
2758 extern set get_referenced_entities_filtered(void */*elem*/, bool (* /*chunk_filter*/)(void *), bool (* /*entity_filter*/)(entity));
2759 extern bool entity_not_constant_or_intrinsic_p(entity /*e*/);
2760 extern set get_referenced_entities(void */*elem*/);
2761 extern bool do_get_declared_entities(statement /*s*/, set /*declared_entities*/);
2762 extern set get_declared_entities(void */*elem*/);
2763 extern bool entity_local_variable_p(entity /*var*/, entity /*module*/);
2764 extern entity FindOrCreateEntityLikeModel(const char */*package*/, const char */*name*/, entity /*model*/);
2765 extern entity AddEntityToModule(entity /*e*/, entity /*module*/);
2766 extern void fprint_entity_list(FILE */*fp*/, list /*l*/);
2767 extern bool entity_in_formal_area_p(entity /*e*/);
2768 /* variable.c */
2769 extern bool variable_entity_p(entity /*e*/);
2770 extern bool symbolic_constant_entity_p(entity /*e*/);
2771 extern void AddEntityToDeclarations(entity /*e*/, entity /*module*/);
2772 extern void RemoveLocalEntityFromDeclarations(entity /*e*/, entity /*module*/, statement /*s*/);
2773 extern void AddLocalEntityToDeclarations(entity /*e*/, entity /*module*/, statement /*s*/);
2774 extern void AddLocalEntityToDeclarationsOnly(entity /*e*/, entity /*module*/, statement /*s*/);
2775 extern void AddEntityToCurrentModule(entity /*e*/);
2777 extern entity make_global_entity_from_local(entity /*local*/);
2778 extern entity make_stderr_variable(void);
2779 extern entity make_scalar_entity(const char */*name*/, const char */*module_name*/, basic /*base*/);
2780 extern entity make_derived_entity(const char */*name*/, const char */*module_name*/, type /*t*/);
2781 extern void reset_unique_variable_numbers(void);
2782 extern entity generate_variable_with_unique_name_to_module(const char */*seed_name*/, const char */*prefix*/, const char */*suffix*/, entity /*module*/);
2783 extern entity generic_clone_variable_with_unique_name(entity /*old_variable*/, statement /*declaration_statement*/, string /*prefix*/, string /*suffix*/, entity /*module*/, bool /*insert_p*/);
2784 extern entity clone_variable_with_unique_name(entity /*old_variable*/, statement /*declaration_statement*/, string /*prefix*/, string /*suffix*/, entity /*module*/);
2785 extern entity make_new_scalar_variable_with_prefix(const char */*prefix*/, entity /*module*/, basic /*b*/);
2786 extern entity make_new_derived_entity_with_prefix(const char */*prefix*/, entity /*module*/, type /*t*/);
2787 extern entity make_new_scalar_variable(entity /*module*/, basic /*b*/);
2788 extern entity make_new_array_variable_with_prefix(const char */*prefix*/, entity /*module*/, basic /*b*/, list /*dimensions*/);
2789 extern entity make_new_array_variable(entity /*module*/, basic /*b*/, list /*dimensions*/);
2790 extern entity make_temporary_pointer_to_array_entity_with_prefix(char */*prefix*/, entity /*efrom*/, entity /*module*/, expression /*from*/);
2791 extern entity make_temporary_pointer_to_array_entity(entity /*efrom*/, expression /*from*/, entity /*module*/);
2792 extern entity make_new_module_variable(entity /*module*/, int /*d*/);
2793 extern list integer_entities;
2794 extern list real_entities;
2795 extern list logical_entities;
2796 extern list complex_entities;
2797 extern list double_entities;
2798 extern list char_entities;
2799 extern entity make_new_entity(basic /*ba*/, int /*kind*/);
2800 extern entity find_or_create_scalar_entity(const char */*name*/, const char */*module_name*/, tag /*base*/);
2801 extern entity find_or_create_typed_entity(string /*name*/, const char */*module_name*/, tag /*base*/);
2802 extern entity make_scalar_integer_entity(const char */*name*/, const char */*module_name*/);
2803 extern bool entity_scalar_p(entity /*e*/);
2804 extern bool entity_integer_scalar_p(entity /*e*/);
2805 extern bool integer_scalar_entity_p(entity /*e*/);
2806 extern bool entity_static_variable_p(entity /*e*/);
2807 extern bool entity_atomic_reference_p(entity /*e*/);
2808 extern bool entity_non_pointer_scalar_p(entity /*e*/);
2809 extern dimension entity_ith_dimension(entity /*e*/, int /*i*/);
2810 extern bool entity_unbounded_p(entity /*e*/);
2811 extern bool array_with_numerical_bounds_p(entity /*a*/);
2812 extern int variable_entity_dimension(entity /*v*/);
2813 extern void remove_variable_entity(entity /*v*/);
2815 extern int add_variable_to_area(entity /*a*/, entity /*v*/);
2816 extern int add_C_variable_to_area(entity /*a*/, entity /*v*/);
2817 extern int add_any_variable_to_area(entity /*a*/, entity /*v*/, bool /*is_fortran_p*/);
2818 extern int new_add_any_variable_to_area(entity /*a*/, entity /*v*/, bool /*is_fortran_p*/);
2819 extern bool formal_parameter_p(entity /*v*/);
2820 extern bool static_global_variable_p(entity /*v*/);
2821 extern bool global_variable_p(entity /*v*/);
2822 extern bool variable_return_p(entity /*v*/);
2823 extern bool formal_context_variable_p(entity /*v*/);
2824 extern bool variable_is_a_module_formal_parameter_p(entity /*a_variable*/, entity /*a_module*/);
2825 extern bool variable_in_common_p(entity /*v*/);
2826 extern bool variable_static_p(entity /*v*/);
2827 extern bool variable_dynamic_p(entity /*v*/);
2828 extern bool variable_stack_p(entity /*v*/);
2829 extern bool variable_heap_p(entity /*v*/);
2830 extern bool variable_in_module_p(entity /*v*/, entity /*m*/);
2831 extern bool variable_in_list_p(entity /*e*/, list /*l*/);
2832 extern bool entity_volatile_variable_p(entity /*v*/);
2833 extern bool volatile_variable_p(variable /*v*/);
2834 extern bool qualified_variable_p(entity /*v*/, unsigned int /*is_qualified*/);
2835 extern bool const_variable_p(entity /*v*/);
2836 extern void discard_module_declaration_text(entity /*a_module*/);
2837 extern entity get_ith_dummy(string /*prefix*/, string /*suffix*/, int /*i*/);
2839 extern entity generate_pseudo_formal_variable_for_formal_label(const char */*p*/, int /*l*/);
2840 extern bool formal_label_replacement_p(entity /*fp*/);
2841 extern bool actual_label_replacement_p(expression /*eap*/);
2842 extern bool call_contains_alternate_returns_p(call /*c*/);
2843 extern entity make_new_index_entity(entity /*old_index*/, string /*suffix*/);
2844 extern bool implicit_c_variable_p(entity /*v*/);
2846 extern bool self_initialization_p(entity /*v*/);
2847 extern bool same_scalar_location_p(entity /*e1*/, entity /*e2*/);
2848 extern list struct_variable_to_fields(entity /*v*/);
2850 extern bool place_holder_variable_p(entity /*ph*/);
2851 /* instruction.c */
2852 extern instruction make_call_instruction(entity /*e*/, list /*l*/);
2853 extern instruction MakeNullaryCallInst(entity /*f*/);
2854 extern instruction MakeUnaryCallInst(entity /*f*/, expression /*e*/);
2857 extern instruction make_instruction_block(list /*statements*/);
2858 extern bool native_call_p(call /*c*/, string /*op_name*/);
2859 extern bool native_instruction_p(instruction /*i*/, string /*op_name*/);
2860 extern bool instruction_assign_p(instruction /*i*/);
2861 extern bool instruction_continue_p(instruction /*i*/);
2862 extern bool return_instruction_p(instruction /*i*/);
2863 extern bool fortran_return_instruction_p(instruction /*i*/);
2864 extern bool C_return_instruction_p(instruction /*i*/);
2865 extern bool exit_instruction_p(instruction /*i*/);
2866 extern bool abort_instruction_p(instruction /*i*/);
2867 extern bool instruction_stop_p(instruction /*i*/);
2868 extern bool instruction_format_p(instruction /*i*/);
2869 extern bool assignment_block_p(instruction /*i*/);
2870 extern void flatten_block_if_necessary(instruction /*i*/);
2871 extern string instruction_identification(instruction /*i*/);
2872 extern string safe_instruction_identification(instruction /*i*/);
2873 /* statement.c */
2874 extern bool empty_code_p(statement /*s*/);
2875 extern bool empty_code_list_p(list /*l*/);
2876 extern bool empty_comments_p(const char */*s*/);
2877 extern bool comments_equal_p(string /*c1*/, string /*c2*/);
2878 extern bool statement_with_empty_comment_p(statement /*s*/);
2879 extern bool assignment_statement_p(statement /*s*/);
2880 extern bool assignment_block_or_statement_p(statement /*s*/);
2881 extern bool return_statement_p(statement /*s*/);
2882 extern bool exit_statement_p(statement /*s*/);
2883 extern bool abort_statement_p(statement /*s*/);
2884 extern bool fortran_return_statement_p(statement /*s*/);
2885 extern bool C_return_statement_p(statement /*s*/);
2886 extern bool continue_statement_p(statement /*s*/);
2887 extern bool forloop_statement_p(statement /*s*/);
2888 extern bool declaration_statement_p(statement /*s*/);
2889 extern bool continue_statements_p(list /*sl*/);
2890 extern bool stop_statement_p(statement /*s*/);
2891 extern bool format_statement_p(statement /*s*/);
2892 extern bool write_statement_p(statement /*s*/);
2893 extern bool statement_less_p(statement /*st1*/, statement /*st2*/);
2894 extern bool statement_possible_less_p(statement /*st1*/, statement /*st2*/);
2895 extern bool statement_sequence_p(statement /*s*/);
2896 extern bool statement_test_p(statement /*s*/);
2897 extern bool statement_loop_p(statement /*s*/);
2898 extern bool statement_whileloop_p(statement /*s*/);
2899 extern bool statement_goto_p(statement /*s*/);
2900 extern bool statement_call_p(statement /*s*/);
2901 extern bool statement_unstructured_p(statement /*s*/);
2902 extern bool statement_forloop_p(statement /*s*/);
2903 extern bool statement_multitest_p(statement /*s*/);
2904 extern bool statement_expression_p(statement /*s*/);
2905 extern bool empty_statement_p(statement /*st*/);
2906 extern bool unlabelled_statement_p(statement /*st*/);
2907 extern bool nop_statement_p(statement /*s*/);
2909 extern bool empty_statement_or_continue_p(statement /*st*/);
2911 extern bool check_io_statement_p(statement /*s*/);
2912 extern string comments_dup(string /*comment*/);
2913 extern string decls_text_dup(string /*dt*/);
2916 extern statement make_block_statement(list /*body*/);
2918 extern statement make_empty_statement_with_declarations_and_comments(list /*d*/, string /*dt*/, string /*c*/);
2919 extern void move_statement_attributes(statement /*from*/, statement /*to*/);
2920 extern void copy_statement_attributes(statement /*from*/, statement /*to*/);
2925 extern statement make_return_statement(entity /*module*/);
2926 extern instruction make_simple_Fortran_io_instruction(bool /*is_read_p*/, expression /*f*/, list /*io_list*/);
2927 extern statement make_print_statement(string /*message*/);
2928 extern statement make_C_print_statement(string /*message*/);
2929 extern statement make_any_print_statement(string /*message*/);
2930 extern statement make_stop_statement(string /*message*/);
2931 extern statement make_exit_statement(int /*n*/, string /*errmess*/);
2934 extern statement make_declarations_statement(list /*idl*/, int /*sn*/, string /*cs*/);
2935 extern statement make_declaration_statement(entity /*v*/, int /*sn*/, string /*cs*/);
2936 extern bool declaration_statements_p(list /*sl*/);
2939 extern statement make_whileloop_statement(expression /*condition*/, statement /*body*/, int /*line_number*/, bool /*before*/);
2940 extern statement make_loop_statement(entity /*i*/, expression /*low*/, expression /*up*/, expression /*inc*/, statement /*b*/);
2941 extern statement make_forloop_statement(expression /*init*/, expression /*cond*/, expression /*inc*/, statement /*body*/);
2942 extern statement make_test_statement(expression /*cond*/, statement /*truebody*/, statement /*falsebody*/);
2943 extern statement make_call_statement(string /*function_name*/, list /*args*/, entity /*l*/, string /*c*/);
2945 extern sequence statement_sequence(statement /*s*/);
2946 extern list statement_block(statement /*s*/);
2947 extern test statement_test(statement /*s*/);
2948 extern statement effective_test_true(test /*t*/);
2949 extern loop statement_loop(statement /*s*/);
2951 extern statement statement_goto(statement /*s*/);
2952 extern call statement_call(statement /*s*/);
2954 extern forloop statement_forloop(statement /*s*/);
2957 extern statement apply_number_to_statement(hash_table /*nts*/, _int /*n*/);
2960 extern statement clear_labels(statement /*s*/);
2961 extern void clear_label(statement /*s*/);
2962 extern statement st_make_nice_test(expression /*condition*/, list /*ltrue*/, list /*lfalse*/);
2963 extern statement makeloopbody(loop /*l*/, statement /*s_old*/, bool /*inner_p*/);
2964 extern string external_statement_identification(statement /*s*/);
2965 extern string statement_identification(statement /*s*/);
2966 extern string safe_statement_identification(statement /*s*/);
2967 extern string gather_all_comments_of_a_statement(statement /*s*/);
2968 extern char **find_first_statement_comment(statement /*s*/);
2969 extern bool try_to_put_a_comment_on_a_statement(statement /*s*/, string /*the_comments*/);
2970 extern void put_a_comment_on_a_statement(statement /*s*/, string /*the_comments*/);
2971 extern void append_comments_to_statement(statement /*s*/, string /*the_comments*/);
2972 extern void insert_comments_to_statement(statement /*s*/, const char */*the_comments*/);
2973 extern void add_one_line_of_comment(statement /*s*/, string /*format*/, ...);
2974 extern statement add_comment_and_line_number(statement /*s*/, string /*sc*/, int /*sn*/);
2975 extern void fix_sequence_statement_attributes(statement /*s*/);
2977 extern entity statement_to_label(statement /*s*/);
2978 extern statement add_label_to_statement(entity /*label*/, statement /*s*/, statement */*labeled_statement*/);
2979 extern bool statement_does_return(statement /*s*/);
2980 extern bool unstructured_does_return(unstructured /*u*/);
2981 extern void gather_and_remove_all_format_statements_rewrite(statement /*s*/, list */*all_formats*/);
2983 extern void put_formats_at_module_beginning(statement /*s*/);
2984 extern void put_formats_at_module_end(statement /*s*/);
2985 extern bool figure_out_if_it_is_a_format(instruction /*i*/, bool */*format_inside_statement_has_been_found*/);
2986 extern bool format_inside_statement_p(statement /*s*/);
2987 extern int statement_to_comment_length(statement /*stmt*/);
2989 extern void insert_statement(statement /*s*/, statement /*s1*/, bool /*before*/);
2990 extern void insert_statement_no_matter_what(statement /*s*/, statement /*s1*/, bool /*before*/);
2991 extern void append_statement_to_block_statement(statement /*b*/, statement /*s*/);
2992 extern void push_generated_variable_commenter(string (* /*commenter*/)(entity));
2993 extern void pop_generated_variable_commenter(void);
2994 extern string generated_variable_comment(entity /*e*/);
2997 extern statement add_declaration_statement_here(statement /*block_statement*/, statement /*s*/, entity /*e*/, bool /*before_p*/);
2998 extern void fix_block_statement_declarations(statement /*s*/);
3001 extern void statement_replace_with_statement_list(statement /*as*/, statement /*rs*/, list /*sl*/);
3003 extern list statement_to_labels(statement /*s*/);
3004 extern bool all_statements_defined_p(statement /*s*/);
3005 extern list statement_to_declarations(void */*s*/);
3006 extern list statements_to_declarations(list /*sl*/);
3013 extern int count_static_references_to_variable(statement /*s*/, entity /*v*/);
3014 extern int count_references_to_variable(statement /*s*/, entity /*v*/);
3015 extern int count_references_to_variable_element(statement /*s*/, entity /*v*/);
3016 extern bool statement_substatement_walker(statement /*some*/, statement /*s*/);
3017 extern bool statement_substatement_p(statement /*s*/, statement /*root*/);
3018 extern int get_statement_depth(statement /*s*/, statement /*root*/);
3019 extern statement find_statement_from_label(statement /*s*/, entity /*label*/);
3020 extern statement find_statement_from_label_name(statement /*s*/, const char */*module_name*/, const char */*label_name*/);
3021 extern bool statement_with_pragma_p(statement /*s*/);
3022 extern list statement_pragmas(statement /*s*/);
3023 extern extension get_extension_from_statement_with_pragma(statement /*s*/, const char */*seed*/);
3024 extern list find_statements_with_pragma(statement /*s*/, const char */*begin*/);
3025 extern bool statement_contains_user_call_p(statement /*s*/);
3029 extern bool statement_in_statement_p(statement /*s*/, statement /*st*/);
3030 extern bool statement_in_statements_p(statement /*s*/, list /*l*/);
3031 extern bool statement_replace_in_root_statement(statement /*old_stat*/, statement /*new_stat*/, statement /*root_stat*/);
3032 extern void statement_remove_extensions(statement /*s*/);
3033 extern void statement_remove_useless_label(statement /*s*/, bool */*changed*/);
3034 extern bool belong_to_statement(statement /*stmt*/, statement /*s*/, bool /*found_p*/);
3036 extern string comment_sentinel(tag /*t*/);
3037 /* reorder.c */
3038 extern void reset_unstructured_number(void);
3039 extern void control_node_reorder(control /*c*/, set /*visited_control*/);
3040 extern bool unstructured_reorder(unstructured /*u*/);
3041 extern bool module_body_reorder(statement /*body*/);
3042 extern bool module_reorder(statement /*body*/);
3043 /* clean_up_sequences.c */
3046 extern void display_clean_up_sequences_statistics(void);
3047 extern bool statement_to_goto_table_flt(instruction /*i*/);
3048 extern void compute_statement_to_goto_table(statement /*s*/);
3049 extern void discard_statement_to_goto_table(void);
3050 extern void adjust_goto_from_to(statement /*s1*/, statement /*s2*/);
3051 extern bool clean_up_sequences_internal(statement /*s*/);
3052 extern bool clean_up_sequences(statement /*s*/);
3053 /* expression.c */
3054 extern int fortran_string_compare(string /*fs1*/, string /*fs2*/);
3056 extern expression expression_mult(expression /*ex*/);
3057 extern expression entity_to_expression(entity /*e*/);
3058 extern expression make_entity_expression(entity /*e*/, cons */*inds*/);
3062 extern void generic_reference_add_fixed_subscripts(reference /*r*/, type /*t*/, bool /*zero_p*/);
3063 extern void reference_add_zero_subscripts(reference /*r*/, type /*t*/);
3064 extern void reference_add_zero_subscript(reference /*r*/);
3066 extern void reference_add_unbounded_subscripts(reference /*r*/, type /*t*/);
3067 extern expression call_to_expression(call /*c*/);
3068 extern expression make_call_expression(entity /*e*/, list /*l*/);
3069 extern expression MakeNullaryCall(entity /*f*/);
3070 extern expression MakeUnaryCall(entity /*f*/, expression /*a*/);
3071 extern expression MakeBinaryCall(entity /*f*/, expression /*eg*/, expression /*ed*/);
3072 extern expression MakeTernaryCall(entity /*f*/, expression /*e1*/, expression /*e2*/, expression /*e3*/);
3073 extern expression make_assign_expression(expression /*lhs*/, expression /*rhs*/);
3074 extern expression make_subscript_expression(expression /*a*/, list /*sl*/);
3075 extern bool expression_brace_p(expression /*e*/);
3076 extern bool expression_call_p(expression /*e*/);
3077 extern bool expression_address_of_p(expression /*e*/);
3078 extern call expression_call(expression /*e*/);
3079 extern bool expression_cast_p(expression /*e*/);
3080 extern cast expression_cast(expression /*e*/);
3081 extern bool expression_sizeofexpression_p(expression /*e*/);
3083 extern bool expression_application_p(expression /*e*/);
3085 extern bool expression_field_p(expression /*e*/);
3086 extern bool field_expression_p(expression /*e*/);
3087 extern bool expression_pointer_p(expression /*e*/);
3088 extern bool array_argument_p(expression /*e*/);
3089 extern bool expression_reference_p(expression /*e*/);
3090 extern entity expression_variable(expression /*e*/);
3091 extern bool is_expression_reference_to_entity_p(expression /*e*/, entity /*v*/);
3092 extern bool same_expression_in_list_p(expression /*e*/, list /*le*/);
3093 extern bool expression_equal_in_list_p(expression /*e*/, list /*le*/);
3095 extern bool relational_expression_p(expression /*e*/);
3097 extern bool logical_expression_p(expression /*e*/);
3098 extern int trivial_expression_p(expression /*e*/);
3100 extern bool expression_implied_do_p(expression /*e*/);
3101 extern bool comma_expression_p(expression /*e*/);
3102 extern bool expression_list_directed_p(expression /*e*/);
3104 extern bool extended_integer_constant_expression_p_to_int(expression /*e*/, int */*result*/);
3105 extern bool integer_constant_expression_p(expression /*e*/);
3108 extern bool assignment_expression_p(expression /*e*/);
3109 extern bool add_expression_p(expression /*e*/);
3110 extern bool sub_expression_p(expression /*e*/);
3111 extern bool substraction_expression_p(expression /*e*/);
3112 extern bool modulo_expression_p(expression /*e*/);
3113 extern bool divide_expression_p(expression /*e*/);
3114 extern bool power_expression_p(expression /*e*/);
3115 extern bool abs_expression_p(expression /*e*/);
3116 extern bool unary_minus_expression_p(expression /*e*/);
3117 extern bool iabs_expression_p(expression /*e*/);
3118 extern bool dabs_expression_p(expression /*e*/);
3119 extern bool cabs_expression_p(expression /*e*/);
3120 extern bool min0_expression_p(expression /*e*/);
3121 extern bool max0_expression_p(expression /*e*/);
3122 extern bool user_function_call_p(expression /*e*/);
3123 extern bool operator_expression_p(expression /*e*/, string /*op_name*/);
3124 extern expression make_true_expression(void);
3125 extern expression make_false_expression(void);
3126 extern bool true_expression_p(expression /*e*/);
3127 extern bool false_expression_p(expression /*e*/);
3128 extern bool unbounded_dimension_p(dimension /*dim*/);
3129 extern expression find_ith_argument(list /*args*/, int /*n*/);
3130 extern expression find_ith_expression(list /*le*/, int /*r*/);
3131 extern expression int_to_expression(_int /*i*/);
3132 extern expression make_zero_expression(void);
3133 extern bool zero_expression_p(expression /*e*/);
3134 extern expression float_to_expression(float /*c*/);
3135 extern expression complex_to_expression(float /*re*/, float /*im*/);
3136 extern expression bool_to_expression(bool /*b*/);
3137 extern expression Value_to_expression(Value /*v*/);
3138 extern list expression_to_reference_list(expression /*e*/, list /*lr*/);
3139 extern list syntax_to_reference_list(syntax /*s*/, list /*lr*/);
3140 extern bool expression_equal_p(expression /*e1*/, expression /*e2*/);
3141 extern bool expression_equal_or_opposite_p(expression /*e1*/, expression /*e2*/);
3142 extern bool expression_opposite_p(expression /*e1*/, expression /*e2*/);
3143 extern bool expression_lists_equal_p(list /*l1*/, list /*l2*/);
3144 extern bool same_expression_p(expression /*e1*/, expression /*e2*/);
3145 extern bool sizeofexpression_equal_p(sizeofexpression /*s0*/, sizeofexpression /*s1*/);
3146 extern bool cast_equal_p(cast /*c1*/, cast /*c2*/);
3147 extern bool syntax_equal_p(syntax /*s1*/, syntax /*s2*/);
3148 extern bool subscript_equal_p(subscript /*s1*/, subscript /*s2*/);
3149 extern bool reference_equal_p(reference /*r1*/, reference /*r2*/);
3150 extern bool range_equal_p(range /*r1*/, range /*r2*/);
3151 extern bool call_equal_p(call /*c1*/, call /*c2*/);
3154 extern expression make_max_expression(expression /*e1*/, expression /*e2*/, enum language_utype /*lang*/);
3155 extern expression make_min_expression(expression /*e1*/, expression /*e2*/, enum language_utype /*lang*/);
3156 extern expression make_factor_expression(int /*coeff*/, entity /*vari*/);
3158 extern statement Pvecteur_to_assign_statement(entity /*var*/, Pvecteur /*v*/);
3159 extern expression make_constraint_expression(Pvecteur /*v*/, Variable /*index*/);
3160 extern expression make_contrainte_expression(Pcontrainte /*pc*/, Variable /*index*/);
3161 extern expression Pvecteur_to_expression(Pvecteur /*vect*/);
3163 extern bool expression_subscript_p(expression /*e*/);
3165 extern bool expression_range_p(expression /*e*/);
3166 extern range expression_range(expression /*e*/);
3167 extern bool array_reference_p(reference /*r*/);
3168 extern bool references_do_not_conflict_p(reference /*r1*/, reference /*r2*/);
3171 extern bool expression_intrinsic_operation_p(expression /*exp*/);
3172 extern bool call_constant_p(call /*c*/);
3173 extern bool expression_equal_integer_p(expression /*exp*/, int /*i*/);
3174 extern expression make_op_exp(char */*op_name*/, expression /*exp1*/, expression /*exp2*/);
3175 extern expression add_integer_to_expression(expression /*exp*/, int /*val*/);
3176 extern expression make_lin_op_exp(entity /*op_ent*/, expression /*exp1*/, expression /*exp2*/);
3177 extern int expression_to_int(expression /*exp*/);
3178 extern float expression_to_float(expression /*exp*/);
3179 extern constant expression_constant(expression /*exp*/);
3180 extern bool expression_string_constant_p(expression /*exp*/);
3181 extern char *expression_string_constant(expression /*exp*/);
3182 extern bool expression_integer_constant_p(expression /*e*/);
3183 extern bool expression_constant_p(expression /*exp*/);
3184 extern bool extended_expression_constant_p(expression /*exp*/);
3185 extern bool expression_is_C_rhs_p(expression /*exp*/);
3186 extern bool expression_one_p(expression /*exp*/);
3187 extern bool expression_null_p(expression /*exp*/);
3188 extern void davinci_dump_expression(FILE */*out*/, expression /*e*/);
3189 extern void davinci_dump_all_expressions(FILE */*out*/, statement /*s*/);
3191 extern expression substitute_entity_in_expression(entity /*old*/, entity /*new*/, expression /*e*/);
3192 extern bool simplify_C_expression(expression /*e*/);
3193 extern expression convert_bound_expression(expression /*e*/, bool /*upper_p*/, bool /*non_strict_p*/);
3194 extern bool reference_with_constant_indices_p(reference /*r*/);
3198 extern bool store_independent_reference_p(reference /*r*/);
3199 extern entity expression_to_entity(expression /*e*/);
3200 extern list expressions_to_entities(list /*expressions*/);
3201 extern bool expression_similar_get_context_p(expression /*target*/, expression /*pattern*/, hash_table */*symbol_table*/);
3202 extern bool expression_similar_p(expression /*target*/, expression /*pattern*/);
3203 extern list make_list_of_constant(int /*val*/, int /*number*/);
3204 extern bool brace_expression_p(expression /*e*/);
3205 extern list brace_expression_to_statements(entity /*arr*/, expression /*e*/);
3206 extern void brace_expression_to_updated_type(entity /*arr*/, expression /*e*/);
3207 extern bool reference_scalar_p(reference /*r*/);
3208 extern expression expressions_to_operation(const list /*l_exprs*/, entity /*op*/);
3209 extern void update_expression_syntax(expression /*e*/, syntax /*s*/);
3210 extern void local_assign_expression(expression /*caller*/, expression /*field*/);
3211 extern expression syntax_to_expression(syntax /*s*/);
3212 extern expression monome_to_expression(Pmonome /*pm*/);
3215 extern bool simplify_expression(expression */*pexp*/);
3216 extern void simplify_expressions(void */*obj*/);
3217 extern expression reference_offset(reference /*ref*/);
3219 extern bool expression_minmax_p(expression /*e*/);
3221 extern expression MakeSizeofType(type /*t*/);
3222 extern expression MakeCastExpression(type /*t*/, expression /*e*/);
3223 extern expression MakeCommaExpression(list /*l*/);
3224 extern expression MakeBraceExpression(list /*l*/);
3230 extern bool C_initialization_expression_p(expression /*e*/);
3232 extern void free_expressions(list /*el*/);
3233 extern void clean_all_normalized(expression /*e*/);
3234 extern expression subscript_value_stride(entity /*arr*/, list /*l_inds*/);
3235 extern expression size_of_actual_array(entity /*actual_array*/, list /*l_actual_ref*/, int /*i*/);
3236 extern expression make_ref_expr(entity /*ent*/, list /*args*/);
3237 extern bool unbounded_entity_p(entity /*f*/);
3238 extern bool unbounded_expression_p(expression /*e*/);
3240 extern list make_unbounded_subscripts(int /*d*/);
3241 extern bool user_call_p(call /*c*/);
3242 extern void normalize_subscript_expression(expression /*e*/);
3243 extern void expression_normalize_subscripts(expression /*e*/);
3244 extern void statement_normalize_subscripts(statement /*s*/);
3245 /* type.c */
3246 extern string type_to_string(const type /*t*/);
3247 extern string safe_type_to_string(const type /*t*/);
3248 extern basic MakeBasicOverloaded(void);
3249 extern mode MakeModeReference(void);
3250 extern mode MakeModeValue(void);
3251 extern type MakeTypeStatement(void);
3252 extern type MakeTypeUnknown(void);
3253 extern type MakeTypeVoid(void);
3254 extern type MakeTypeOverloaded(void);
3255 extern type MakeTypeVariable(basic /*b*/, cons */*ld*/);
3256 extern basic MakeBasic(int /*the_tag*/);
3257 extern type MakeTypeArray(basic /*b*/, cons */*ld*/);
3258 extern parameter MakeOverloadedParameter(void);
3259 extern parameter MakePointerParameter(void);
3260 extern parameter MakeVoidPointerParameter(void);
3261 extern parameter MakeIntegerParameter(void);
3262 extern parameter MakeLongIntegerParameter(void);
3265 extern parameter MakeRealParameter(void);
3268 extern parameter MakeLogicalParameter(void);
3269 extern parameter MakeComplexParameter(void);
3272 extern parameter MakeCharacterParameter(void);
3273 extern parameter MakeAnyScalarParameter(tag /*t*/, _int /*size*/);
3274 extern type MakeOverloadedResult(void);
3275 extern type MakeUnsignedIntegerResult(void);
3276 extern type MakeVoidPointerResult(void);
3277 extern type MakeIntegerResult(void);
3278 extern type MakeLongIntegerResult(void);
3279 extern type MakeLongLongIntegerResult(void);
3280 extern type MakeRealResult(void);
3281 extern type MakeDoubleprecisionResult(void);
3282 extern type MakeQuadprecisionResult(void);
3283 extern type MakeLogicalResult(void);
3284 extern type MakeComplexResult(void);
3285 extern type MakeDoublecomplexResult(void);
3286 extern type MakeLongDoublecomplexResult(void);
3287 extern type MakeCharacterResult(void);
3288 extern type MakeAnyScalarResult(tag /*t*/, _int /*size*/);
3289 extern bool same_type_p(type /*t1*/, type /*t2*/);
3290 extern bool type_equal_p(type /*t1*/, type /*t2*/);
3291 extern bool type_equal_up_to_qualifiers_p(type /*t1*/, type /*t2*/);
3292 extern bool type_equal_up_to_typedefs_and_qualifiers_p(type /*t1*/, type /*t2*/);
3293 extern bool ultimate_type_equal_p(type /*t1*/, type /*t2*/);
3294 extern bool concrete_type_equal_p(type /*t1*/, type /*t2*/);
3295 extern bool type_structurally_equal_p(type /*t1*/, type /*t2*/);
3296 extern type array_type_projection(type /*t*/);
3297 extern bool array_pointer_type_equal_p(type /*t1*/, type /*t2*/);
3298 extern bool array_pointer_string_type_equal_p(type /*t1*/, type /*t2*/);
3299 extern bool array_element_type_p(type /*at*/, type /*et*/);
3300 extern bool concrete_array_pointer_type_equal_p(type /*t1*/, type /*t2*/);
3301 extern type make_scalar_integer_type(_int /*n*/);
3302 extern type make_scalar_complex_type(_int /*n*/);
3303 extern type make_scalar_overloaded_type(void);
3304 extern bool area_equal_p(area /*a1*/, area /*a2*/);
3305 extern bool dimension_equal_p(dimension /*d1*/, dimension /*d2*/);
3306 extern bool dimensions_equal_p(list /*dims1*/, list /*dims2*/);
3307 extern bool qualifiers_equal_p(list /*dims1*/, list /*dims2*/);
3308 extern bool generic_variable_equal_p(variable /*v1*/, variable /*v2*/, bool /*strict_p*/, bool /*qualifier_p*/, hash_table /*structural_table*/);
3309 extern bool variable_equal_p(variable /*v1*/, variable /*v2*/);
3310 extern bool generic_basic_equal_p(basic /*b1*/, basic /*b2*/, bool /*strict_p*/, bool /*qualifier_p*/, hash_table /*structural_table*/);
3311 extern bool basic_equal_p(basic /*b1*/, basic /*b2*/);
3312 extern bool same_basic_p(basic /*b1*/, basic /*b2*/);
3313 extern bool compatible_basic_p(basic /*b1*/, basic /*b2*/);
3314 extern bool generic_functional_equal_p(functional /*f1*/, functional /*f2*/, bool /*strict_p*/, bool /*qualifier_p*/, hash_table /*structural_table*/);
3315 extern bool functional_equal_p(functional /*f1*/, functional /*f2*/);
3316 extern bool generic_parameter_equal_p(parameter /*p1*/, parameter /*p2*/, bool /*strict_p*/, bool /*qualifier_p*/, hash_table /*structural_table*/);
3317 extern bool parameter_equal_p(parameter /*p1*/, parameter /*p2*/);
3318 extern bool mode_equal_p(mode /*m1*/, mode /*m2*/);
3319 extern int string_type_size(basic /*b*/);
3320 extern int basic_type_size(basic /*b*/);
3321 extern basic expression_basic(expression /*expr*/);
3322 extern dimension dimension_dup(dimension /*d*/);
3323 extern list ldimensions_dup(list /*l*/);
3324 extern dimension FindIthDimension(entity /*e*/, int /*i*/);
3325 extern basic some_basic_of_any_expression(expression /*exp*/, bool /*apply_p*/, bool /*ultimate_p*/);
3326 extern basic basic_of_any_expression(expression /*exp*/, bool /*apply_p*/);
3327 extern basic basic_of_expression(expression /*exp*/);
3328 extern basic basic_of_any_reference(reference /*r*/, bool /*apply_p*/, bool /*ultimate_p*/);
3329 extern basic basic_of_reference(reference /*r*/);
3330 extern basic basic_of_call(call /*c*/, bool /*apply_p*/, bool /*ultimate_p*/);
3331 extern basic basic_of_external(call /*c*/);
3332 extern basic basic_of_intrinsic(call /*c*/, bool /*apply_p*/, bool /*ultimate_p*/);
3333 extern basic basic_of_constant(call /*c*/);
3334 extern basic basic_union(expression /*exp1*/, expression /*exp2*/);
3335 extern basic basic_ultimate(basic /*b*/);
3336 extern basic basic_maximum(basic /*fb1*/, basic /*fb2*/);
3337 extern basic basic_of_expressions(list /*expressions*/, bool /*skip_overloaded*/);
3338 extern type intrinsic_call_to_type(call /*c*/);
3339 extern type call_to_type(call /*c*/);
3340 extern type reference_to_type(reference /*ref*/);
3341 extern type expression_to_type(expression /*exp*/);
3344 extern bool overloaded_type_p(type /*t*/);
3345 extern bool is_inferior_basic(basic /*b1*/, basic /*b2*/);
3346 extern basic simple_basic_dup(basic /*b*/);
3348 extern bool signed_type_p(type /*t*/);
3349 extern bool unsigned_basic_p(basic /*b*/);
3350 extern bool unsigned_type_p(type /*t*/);
3351 extern bool long_type_p(type /*t*/);
3352 extern bool bit_type_p(type /*t*/);
3353 extern bool string_type_p(type /*t*/);
3354 extern bool logical_type_p(type /*t*/);
3355 extern bool char_type_p(type /*t*/);
3356 extern bool basic_type_p(type /*t*/);
3357 extern bool type_fundamental_basic_p(type /*t*/);
3358 extern bool array_type_p(type /*t*/);
3359 extern unsigned int array_type_dimension(type /*t*/);
3360 extern bool scalar_type_p(type /*t*/);
3361 extern bool type_pointer_on_struct_variable_p(type /*t*/);
3362 extern bool variable_length_array_type_p(type /*t*/);
3363 extern bool fixed_length_array_type_p(type /*t*/);
3364 extern bool pointer_type_p(type /*t*/);
3365 extern bool C_pointer_type_p(type /*t*/);
3366 extern bool array_of_pointers_type_p(type /*t*/);
3367 extern type pointed_type(type /*t*/);
3368 extern bool FILE_star_type_p(type /*t*/);
3369 extern list type_fields(type /*t*/);
3370 extern bool derived_type_p(type /*t*/);
3371 extern bool array_of_derived_type_p(type /*t*/);
3372 extern bool struct_type_p(type /*t*/);
3373 extern bool array_of_struct_type_p(type /*t*/);
3374 extern bool union_type_p(type /*t*/);
3375 extern bool enum_type_p(type /*t*/);
3376 extern bool typedef_type_p(type /*t*/);
3377 extern type make_standard_integer_type(type /*t*/, int /*size*/);
3378 extern bool standard_long_integer_type_p(type /*t*/);
3379 extern bool default_complex_type_p(type /*t*/);
3380 extern bool float_type_p(type /*t*/);
3381 extern bool scalar_integer_type_p(type /*t*/);
3382 extern bool integer_type_p(type /*t*/);
3384 extern type ultimate_type(type /*t*/);
3385 extern type ultimate_array_type(type /*t*/);
3386 extern void entity_basic_concrete_types_init(void);
3387 extern void entity_basic_concrete_types_reset(void);
3389 extern type compute_basic_concrete_type(type /*t*/);
3390 extern type entity_basic_concrete_type(entity /*e*/);
3391 extern bool basic_concrete_type_leads_to_pointer_p(type /*bct*/);
3393 extern bool call_compatible_type_p(type /*t*/);
3394 extern type call_compatible_type(type /*t*/);
3395 extern type call_to_functional_type(call /*c*/, bool /*ultimate_p*/);
3396 extern bool type_struct_variable_p(type /*t*/);
3397 extern bool type_union_variable_p(type /*t*/);
3398 extern int number_of_fields(type /*t*/);
3399 extern int number_of_items(type /*t*/);
3402 extern list enum_supporting_entities(list /*sel*/, set /*vt*/, entity /*e*/);
3403 extern list generic_constant_expression_supporting_entities(list /*sel*/, set /*vt*/, expression /*e*/, bool /*language_c_p*/);
3404 extern list constant_expression_supporting_entities(list /*sel*/, set /*vt*/, expression /*e*/);
3406 extern list generic_symbolic_supporting_entities(list /*sel*/, set /*vt*/, symbolic /*s*/, bool /*language_c_p*/);
3407 extern list symbolic_supporting_entities(list /*sel*/, set /*vt*/, symbolic /*s*/);
3408 extern list basic_supporting_entities(list /*sel*/, set /*vt*/, basic /*b*/);
3409 extern list variable_type_supporting_entities(list /*sel*/, set /*vt*/, variable /*v*/);
3410 extern list recursive_type_supporting_entities(list /*sel*/, set /*vt*/, type /*t*/);
3411 extern list type_supporting_entities(list /*sel*/, type /*t*/);
3412 extern bool declarable_type_p(type /*t*/, list /*pdl*/);
3414 extern list enum_supporting_references(list /*srl*/, entity /*e*/);
3416 extern list symbolic_supporting_references(list /*srl*/, symbolic /*s*/);
3417 extern list basic_supporting_references(list /*srl*/, basic /*b*/);
3418 extern list variable_type_supporting_references(list /*srl*/, variable /*v*/);
3419 extern list fortran_type_supporting_entities(list /*srl*/, type /*t*/);
3420 extern list type_supporting_references(list /*srl*/, type /*t*/);
3421 extern bool check_C_function_type(entity /*f*/, list /*args*/);
3422 extern size_t maximal_type_depth(type /*t*/);
3423 extern size_t type_depth(type /*t*/);
3424 extern int effect_type_depth(type /*t*/);
3425 extern int effect_basic_depth(basic /*b*/);
3427 extern list type_supporting_types(type /*t*/);
3428 extern type make_char_array_type(int /*n*/);
3429 extern type make_scalar_char_pointer_type(void);
3430 extern bool overloaded_parameters_p(list /*lparams*/);
3431 extern type type_to_pointer_type(type /*t*/);
3432 extern type type_to_pointed_type(type /*t*/);
3433 extern type C_type_to_pointed_type(type /*t*/);
3434 extern type type_to_returned_type(type /*t*/);
3435 extern type type_to_final_pointed_type(type /*t*/);
3436 extern list derived_type_fields(type /*t*/);
3437 extern list derived_type_to_fields(type /*t*/);
3438 extern entity find_field_in_field_list(entity /*f*/, list /*fl*/);
3439 extern bool qualifier_equal_p(qualifier /*q1*/, qualifier /*q2*/);
3440 extern string qualifier_to_string(qualifier /*q*/);
3441 extern bool qualifiers_const_p(list /*ql*/);
3442 extern bool qualifiers_restrict_p(list /*ql*/);
3443 extern bool type_with_const_qualifier_p(type /*t*/);
3444 extern type subscripted_type_to_type(type /*t*/, expression /*se*/);
3445 extern dimension find_ith_dimension(list /*dims*/, int /*n*/);
3446 extern int variable_dimension_number(variable /*v*/);
3447 extern type type_to_array_type(type /*t*/);
3448 extern type array_type_to_element_type(type /*t*/);
3449 extern type array_type_to_sub_array_type(type /*t*/);
3450 extern type array_type_to_pointer_type(type /*t*/);
3451 extern list make_unbounded_dimensions(int /*d*/);
3452 extern bool type_void_star_p(type /*t*/);
3453 extern bool char_star_type_p(type /*t*/);
3454 extern bool char_star_constant_function_type_p(type /*t*/);
3455 extern list struct_type_to_fields(type /*lt*/);
3456 extern bool dependent_type_p(type /*t*/);
3457 extern list dependence_of_dependent_type(type /*t*/);
3458 /* normalize.c */
3460 extern normalized NormalizeSyntax(syntax /*s*/);
3461 extern normalized NormalizeCast(cast /*c*/);
3462 extern normalized NormalizeCall(call /*c*/);
3463 extern normalized NormalizeConstant(constant /*c*/);
3465 extern normalized NormalizeIntrinsic(entity /*e*/, list /*la*/);
3466 extern normalized binary_to_normalized(list /*la*/, int /*op*/);
3467 extern bool EvalNormalized(normalized /*n*/, int */*pv*/);
3468 extern void FreeNormalized(normalized /*n*/);
3469 extern void free_expression_normalized(expression /*e*/);
3470 extern void unnormalize_expression(void */*st*/);
3473 extern void normalize_all_expressions_of(void */*obj*/);
3474 extern void normalize_first_expressions_of(void */*obj*/);
3475 /* static.c */
3477 extern entity get_current_module_entity(void);
3478 extern void reset_current_module_entity(void);
3479 extern void error_reset_current_module_entity(void);
3480 extern const char *get_current_module_name(void);
3481 extern void set_current_module_declarations(list /*l*/);
3482 extern void reset_current_module_declarations(void);
3485 extern void push_current_module_statement(statement /*s*/);
3486 extern void pop_current_module_statement(void);
3488 extern void reset_current_module_statement(void);
3489 extern void error_reset_current_module_statement(void);
3491 extern hash_table make_keyword_typedef_table(int /*tk*/);
3492 extern void set_keyword_typedef_table(hash_table /*h*/);
3493 extern void reset_keyword_typedef_table(void);
3494 extern void free_keyword_typedef_table(void);
3495 extern void declare_new_typedef(const string /*tn*/);
3496 extern _int is_c_keyword_typedef(char */*s*/);
3497 extern void make_statement_global_stack(void);
3501 extern void free_statement_global_stack(void);
3502 extern bool statement_global_stack_defined_p(void);
3503 /* arguments.c */
3504 extern void print_homogeneous_arguments(list /*args*/, const char */*variable_name*/(entity));
3505 extern void dump_arguments(cons */*args*/);
3506 extern cons *arguments_add_entity(cons */*a*/, entity /*e*/);
3507 extern cons *arguments_rm_entity(cons */*a*/, entity /*e*/);
3508 extern cons *arguments_union(cons */*a1*/, cons */*a2*/);
3509 extern bool arguments_equal_p(list /*a1*/, list /*a2*/);
3510 extern bool entity_is_argument_p(entity /*e*/, cons */*args*/);
3511 extern list arguments_intersection(list /*a1*/, list /*a2*/);
3512 extern bool arguments_set_equal_p(list /*a1*/, list /*a2*/);
3513 extern bool arguments_subset_p(list /*a1*/, list /*a2*/);
3514 extern void free_arguments(cons */*args*/);
3515 extern cons *dup_arguments(cons */*args*/);
3516 extern cons *arguments_difference(cons */*a1*/, cons */*a2*/);
3517 extern list base_to_entities(Pvecteur /*b*/);
3518 /* module.c */
3519 extern string build_new_top_level_module_name(const char */*prefix*/, bool /*prevent_suffix*/);
3520 extern bool static_module_p(entity /*e*/);
3521 extern bool compilation_unit_entity_p(entity /*e*/);
3522 extern bool variable_in_module_p2(entity /*v*/, entity /*m*/);
3523 extern void variable_declaration_verify(reference /*ref*/);
3524 extern void symbolic_constant_declaration_verify(call /*c*/);
3526 extern void add_symbolic_constant_to_declaration(call /*c*/);
3527 extern bool variable_declaration_coherency_p(entity /*module*/, statement /*st*/);
3528 extern sentence get_header_comments(entity /*module*/);
3529 extern sentence get_declaration_comments(entity /*module*/);
3530 extern list module_formal_parameters(entity /*func*/);
3531 extern int module_to_declaration_length(entity /*func*/);
3533 extern list module_all_declarations(entity /*m*/);
3534 extern bool c_language_module_p(entity /*m*/);
3535 extern bool fortran_language_module_p(entity /*m*/);
3536 extern bool fortran95_language_module_p(entity /*m*/);
3537 extern entity generic_function_to_return_value(entity /*m*/, bool /*safe_p*/);
3538 extern entity function_to_return_value(entity /*m*/);
3540 extern bool return_value_p(entity /*v*/);
3541 extern bool function_return_value_p(entity /*v*/, entity /*f*/);
3542 extern bool void_function_p(entity /*m*/);
3543 extern list string_to_user_modules(const char */*s*/);
3544 /* control.c */
3545 extern char vcid_ri_util_control[];
3546 extern void control_map_get_blocs(control /*c*/, list */*l*/);
3547 extern void find_a_control_path(control /*b*/, control /*e*/, list */*pp*/, list */*vp*/, int /*dir*/);
3548 extern void backward_control_map_get_blocs(control /*c*/, cons **/*l*/);
3549 extern void backward_control_map_get_blocs_but(control /*c*/, control /*f*/, list */*l*/);
3550 extern void forward_control_map_get_blocs(control /*c*/, cons **/*l*/);
3551 extern void forward_control_map_get_blocs_but(control /*c*/, control /*f*/, list */*l*/);
3552 extern void wide_forward_control_map_get_blocs(control /*c*/, cons **/*l*/);
3553 extern bool is_control_in_list_p(control /*c*/, list /*cs*/);
3554 extern int occurences_in_control_list(control /*c*/, list /*cs*/);
3555 extern void control_list_patch(list /*l*/, control /*c_old*/, control /*c_new*/);
3556 extern void transfer_control_predecessor(control /*old_node*/, control /*new_node*/, control /*c*/);
3557 extern void transfer_control_successor(control /*old_node*/, control /*new_node*/, control /*c*/);
3558 extern void replace_control_related_to_a_list(control /*old_node*/, control /*new_node*/, list /*controls*/);
3559 extern void check_control_coherency(control /*c*/);
3560 extern void print_control_node(control /*c*/);
3561 extern void print_control_nodes(list /*l*/);
3562 extern void display_address_of_control_nodes(list /*cs*/);
3563 extern void display_linked_control_nodes(control /*c*/);
3564 extern void remove_unreachable_following_control(control /*c*/, control /*do_not_delete_node*/, control /*do_not_delete_node_either*/);
3567 extern void remove_a_control_from_a_list_and_relink(control /*c*/, list /*a_source_control_list_of_c*/, list /*a_dest_control_list_of_c*/, remove_a_control_from_a_list_and_relink_direction /*which_way*/);
3572 extern void discard_a_control_sequence_without_its_statements(control /*begin*/, control /*end*/);
3574 extern void link_2_control_nodes(control /*source*/, control /*target*/);
3575 extern void link_3_control_nodes(control /*c_test*/, control /*c_then*/, control /*c_else*/);
3576 extern void unlink_2_control_nodes(control /*source*/, control /*target*/);
3577 extern void insert_control_in_arc(control /*c*/, control /*before*/, control /*after*/);
3578 extern void fuse_2_control_nodes(control /*first*/, control /*second*/);
3579 /* hpfc.c */
3580 extern bool hpf_directive_string_p(const char */*s*/);
3581 extern bool hpf_directive_entity_p(entity /*e*/);
3582 extern bool realign_directive_p(entity /*f*/);
3583 extern bool redistribute_directive_p(entity /*f*/);
3584 extern bool dead_fcd_directive_p(entity /*f*/);
3585 extern bool fcd_directive_string_p(const char */*s*/);
3586 extern bool fcd_directive_p(entity /*f*/);
3587 extern bool keep_directive_in_code_p(const char */*s*/);
3588 /* convex_hull.c */
3589 extern Psysteme cute_convex_union(Psysteme /*s1*/, Psysteme /*s2*/);
3590 /* clean.c */
3591 extern void GenericCleanEntities(list /*el*/, entity /*function*/, bool /*fortran_p*/);
3592 extern void GenericCleanLocalEntities(entity /*function*/, bool /*fortran_p*/);
3593 extern void CleanLocalEntities(entity /*function*/);
3594 extern void CCleanLocalEntities(entity /*function*/);
3595 extern void RemoveLocalEntities(entity /*function*/);
3596 /* clone_statement.c */
3597 extern statement clone_statement(statement /*s*/, clone_context /*cc*/);
3598 /* allocatable.c */
3599 extern bool entity_allocatable_p(entity /*e*/);
3603 /* replace.c */
3604 extern void replace_entities(void */*s*/, hash_table /*ht*/);
3605 extern void replace_entity(void */*s*/, entity /*old*/, entity /*new*/);
3606 extern void replace_reference(void */*s*/, reference /*old*/, entity /*new*/);
3607 extern void replace_entity_by_expression_with_filter(void */*s*/, entity /*ent*/, expression /*exp*/, bool (* /*filter*/)(expression));
3608 extern void replace_entity_by_expression(void */*s*/, entity /*ent*/, expression /*exp*/);
3609 extern void replace_entities_by_expression(void */*s*/, hash_table /*ht*/);
3610 #endif /* ri_util_header_included */
void const char const char const int
int Value
statement make_statement_from_statement_list_or_empty_block(list)
Build a statement sequence from a statement list.
Definition: statement.c:700
statement make_block_statement(list)
Make a block statement from a list of statement.
Definition: statement.c:616
statement make_statement_from_statement_list(list)
Build a statement sequence from a statement list.
Definition: statement.c:719
statement instruction_to_statement(instruction)
Build a statement from a give instruction.
Definition: statement.c:597
statement make_statement_from_statement_varargs_list(statement,...)
Build a statement sequence from a statement NULL-terminated varargs list.
Definition: statement.c:735
void copy_statement_attributes(statement, statement)
Copy all the attributes from one statement to another one.
Definition: statement.c:678
statement make_empty_statement_with_declarations_and_comments(list, string, string)
Build an empty statement with declaration list, declaration text and comment.
Definition: statement.c:638
statement make_empty_block_statement(void)
Build an empty statement (block/sequence)
Definition: statement.c:625
void move_statement_attributes(statement, statement)
Move all the attributes from one statement to another one.
Definition: statement.c:657
statement make_block_with_stmt_if_not_already(statement)
Build a statement block from a statement if not already a statement block.
Definition: statement.c:768
void remove_some_unreachable_controls_of_an_unstructured(unstructured)
Remove all the control sequences that are unreachable and that begin with a node without any predeces...
Definition: control.c:730
void insert_control_in_arc(control, control, control)
Insert a control node between 2 connected control nodes.
Definition: control.c:1299
void unlink_2_control_nodes(control, control)
Remove all edged between 2 control nodes.
Definition: control.c:1276
void remove_all_unreachable_controls_of_an_unstructured(unstructured)
Remove all control nodes that are not forward reachable from the entry node.
Definition: control.c:812
void display_linked_control_nodes(control)
Display all the control nodes reached or reachable from c for debugging purpose.
Definition: control.c:629
void transfer_control_successor(control, control, control)
Transfer a control node as a successor of one node to another one.
Definition: control.c:390
void display_address_of_control_nodes(list)
Display the adresses a list of control nodes.
Definition: control.c:612
void remove_a_control_from_a_list_and_relink(control, list, list, remove_a_control_from_a_list_and_relink_direction)
Replace each occurence of c in a_source_control_list_of_c with a a_dest_control_list_of_c:
Definition: control.c:913
void remove_unreachable_following_control(control, control, control)
Remove all the control nodes (with their statements) from c in the successor tree of c up to the node...
Definition: control.c:682
void link_3_control_nodes(control, control, control)
Add an edge between 2 control nodes.
Definition: control.c:1249
void link_2_control_nodes(control, control)
Add an edge between 2 control nodes.
Definition: control.c:1193
void print_control_node(control)
Definition: control.c:566
void remove_a_control_from_an_unstructured_without_relinking(control)
It removes a control node from its successor and predecessor.
Definition: control.c:1031
void transfer_control_predecessor(control, control, control)
Transfer a control node as a predecessor from one node to another one.
Definition: control.c:358
void discard_an_unstructured_without_its_statements(unstructured)
Used to discard an unstructured without touching its statements.
Definition: control.c:1063
void replace_control_related_to_a_list(control, control, list)
Replace all the references to a control node by a new one in the successors & predecessors of a list ...
Definition: control.c:419
bool is_control_in_list_p(control, list)
Test if a control node is in a list of control nodes.
Definition: control.c:299
void free_a_control_without_its_statement(control)
Remove a control node without touching its statement, its predecessors and successors,...
Definition: control.c:1087
void remove_a_control_from_an_unstructured(control)
Remove a control node from a control graph.
Definition: control.c:992
void control_list_patch(list, control, control)
Replace in a list of control nodes all the instance of a control node by another one.
Definition: control.c:336
void discard_a_control_sequence_without_its_statements(control, control)
Remove a control sequence without touching its statements.
Definition: control.c:1111
void print_control_nodes(list)
Display identification of a list of control nodes.
Definition: control.c:589
void fuse_2_control_nodes(control, control)
Fuse a 2 control nodes.
Definition: control.c:1391
void check_control_coherency(control)
Test the coherency of a control node network from a control node.
Definition: control.c:487
list generate_a_statement_list_from_a_control_sequence(control, control)
Take a control sequence and return a list of all the statements in the sequence (in the same order....
Definition: control.c:1156
int occurences_in_control_list(control, list)
Count the number of occurences of a control node in a list of control nodes.
Definition: control.c:319
void backward_control_map_get_blocs_but(control, control, list *)
Transitive closure of c's predecessors, but for control f.
Definition: control.c:184
void control_map_get_blocs(control, list *)
Build recursively the list of all controls reachable from a control of an unstructured.
Definition: control.c:75
void forward_control_map_get_blocs_but(control, control, list *)
Transitive closure of c's successors, but for control f.
Definition: control.c:234
void find_a_control_path(control, control, list *, list *, int)
Build recursively a control path from b to e.
Definition: control.c:107
void set_current_module_declarations(list)
Definition: static.c:131
list get_current_module_declarations(void)
Definition: static.c:141
void reset_current_module_entity(void)
Reset the current module entity.
Definition: static.c:97
void reset_current_module_statement(void)
Reset the current module statement.
Definition: static.c:221
const char * get_current_module_name(void)
Get the name of the current module.
Definition: static.c:121
statement set_current_module_statement(statement)
Set the current module statement.
Definition: static.c:165
void push_current_module_statement(statement)
Set the statement of the current module and push the statement of the previous one on a stack.
Definition: static.c:180
statement get_current_module_statement(void)
Get the current module statement.
Definition: static.c:208
void reset_current_module_declarations(void)
Definition: static.c:136
entity set_current_module_entity(entity)
static.c
Definition: static.c:66
entity get_current_module_entity(void)
Get the entity of the current module.
Definition: static.c:85
void pop_current_module_statement(void)
Pop the current module statement stack and use it as the current module statement.
Definition: static.c:194
void replace_entity_by_expression_with_filter(void *, entity, expression, bool(*)(expression))
Definition: replace.c:204
void replace_entities(void *, hash_table)
replace.c
Definition: replace.c:91
void replace_reference(void *, reference, entity)
Replace an old reference by a reference to a new entity in a statement.
Definition: replace.c:124
void replace_entity(void *, entity, entity)
per variable version of replace_entities.
Definition: replace.c:113
void replace_entity_by_expression(void *, entity, expression)
replace all reference to entity ent by expression exp in s.
Definition: replace.c:220
void replace_entities_by_expression(void *, hash_table)
Definition: replace.c:225
instruction make_instruction_block(list)
Build an instruction block from a list of statements.
Definition: instruction.c:106
instruction make_continue_instruction(void)
Creates a CONTINUE instruction, that is the FORTRAN nop, the ";" in C or the "pass" in Python for exa...
Definition: instruction.c:79
instruction make_assign_instruction(expression, expression)
Definition: instruction.c:87
instruction make_call_instruction(entity, list)
instruction.c
Definition: instruction.c:51
instruction MakeUnaryCallInst(entity, expression)
Creates a call instruction to a function with one argument.
Definition: instruction.c:70
instruction MakeNullaryCallInst(entity)
Creates a call instruction to a function with no argument.
Definition: instruction.c:60
bool instruction_assign_p(instruction)
Test if an instruction is an assignment.
Definition: instruction.c:164
bool instruction_stop_p(instruction)
Test if an instruction is a Fortran STOP.
Definition: instruction.c:214
bool assignment_block_p(instruction)
Checks if an instruction block is a list of assignments, possibly followed by a continue.
Definition: instruction.c:230
bool exit_instruction_p(instruction)
Definition: instruction.c:201
bool abort_instruction_p(instruction)
Definition: instruction.c:205
bool instruction_format_p(instruction)
Test if an instruction is a Fortran FORMAT.
Definition: instruction.c:222
bool native_instruction_p(instruction, string)
Test if an instruction is a native instruction of the language.
Definition: instruction.c:144
bool instruction_continue_p(instruction)
Test if an instruction is a CONTINUE, that is the FORTRAN nop, the ";" in C or the "pass" in Python....
Definition: instruction.c:173
bool return_instruction_p(instruction)
Test if an instruction is a C or Fortran "return".
Definition: instruction.c:185
bool C_return_instruction_p(instruction)
Definition: instruction.c:196
bool native_call_p(call, string)
Test if a call is a native instruction of the language.
Definition: instruction.c:124
bool fortran_return_instruction_p(instruction)
Definition: instruction.c:191
set distributable_loop(statement)
this functions checks if Kennedy's algorithm can be applied on the loop passed as argument.
Definition: loop.c:221
void print_number_of_loop_statistics(FILE *, string, statement)
Compute the number of parallel and sequential loops found in a statement and output them on a stream ...
Definition: loop.c:803
set region_of_loop(statement)
this function returns the set of all statements belonging to the given loop even if the loop contains...
Definition: loop.c:254
bool range_contains_at_least_one_point_p(range)
Definition: loop.c:911
bool loop_sequential_p(loop)
Test if a loop is sequential.
Definition: loop.c:404
bool loop_parallel_p(loop)
Test if a loop is parallel.
Definition: loop.c:393
bool loop_executed_never_p(loop)
Check if loop bound are constant and then if upper < lower.
Definition: loop.c:971
bool parallel_loop_statement_p(statement)
Test if a statement is a parallel loop.
Definition: loop.c:420
bool constant_step_loop_p(loop)
Test if a loop has a constant step loop.
Definition: loop.c:733
bool normal_loop_p(loop)
Test if a loop does have a 1-increment step.
Definition: loop.c:741
entity perfectly_nested_loop_index_at_depth(statement, int)
Get the index of the loop at a given depth inside a loop-nest.
Definition: loop.c:694
bool loop_executed_at_least_once_p(loop)
Check if loop bound are constant and then if upper >= lower.
Definition: loop.c:937
statement make_new_loop_statement(entity, expression, expression, expression, statement, execution)
This is an ad'hoc function designed for do_loop_unroll_with_epilogue().
Definition: loop.c:839
int loop_increment_value(loop)
Definition: loop.c:714
statement perfectly_nested_loop_to_body(statement)
Extract the body of a perfectly nested loop body.
Definition: loop.c:590
bool index_private_p(loop)
returns true if loop lo's index is private for this loop
Definition: loop.c:240
void clean_enclosing_loops(void)
Definition: loop.c:58
int depth_of_perfect_loop_nest(statement)
Compute the depth of a perfect loop-nest.
Definition: loop.c:476
statement perfectly_nested_loop_to_body_at_depth(statement, int)
Extract the loop-body of a perfect loop-nest at a given depth.
Definition: loop.c:646
list copy_loops(list)
Duplicate a loop list.
Definition: loop.c:826
void region_of_statement(statement, set)
Should be rewritten with a gen_recurse to deal with the recent RI...
Definition: loop.c:269
list loop_private_variables_as_entites(loop, bool, bool)
Get the variables local or private to a loop.
Definition: loop.c:338
void sort_all_loop_locals(statement)
Definition: loop.c:381
bool range_contains_nothing_p(range)
Definition: loop.c:943
list statement_to_loop_statement_list(statement)
If statement s is a perfectly loop nest, return the corresponding loop list.
Definition: loop.c:893
void print_parallelization_statistics(const char *, const char *, statement)
Print out the number of sequential versus parallel loops.
Definition: loop.c:814
void number_of_sequential_and_parallel_loops(statement, int *, int *)
Compute the number of parallel and sequential loops found in a statement and update given variables.
Definition: loop.c:784
int Nbrdo
loop.c
Definition: loop.c:54
bool index_of_a_loop_p(Variable, list)
Check if variable v is an index for an enclosing loop.
Definition: loop.c:980
statement get_first_inner_perfectly_nested_loop(statement)
Return the inner loop in a perfect loop-nest.
Definition: loop.c:508
statement_mapping loops_mapping_of_statement(statement)
Definition: loop.c:155
bool perfectly_nested_loop_p(statement)
Test if a statement is a perfect loop-nest.
Definition: loop.c:543
int depth_of_parallel_perfect_loop_nest(statement)
Compute the depth of a parallel perfect loop-nest.
Definition: loop.c:436
expression statement_expression(statement)
Get the expression of a statement.
Definition: statement.c:1446
sequence statement_sequence(statement)
Get the sequence of a statement sequence.
Definition: statement.c:1328
multitest statement_multitest(statement)
Get the multitest of a statement.
Definition: statement.c:1436
statement effective_test_true(test)
returns the effective true branch of a test by skipping a possible sequence of one element.
Definition: statement.c:1358
list statement_block(statement)
Get the list of block statements of a statement sequence.
Definition: statement.c:1338
loop statement_loop(statement)
Get the loop of a statement.
Definition: statement.c:1374
test statement_test(statement)
Get the test of a statement.
Definition: statement.c:1348
call statement_call(statement)
Get the call of a statement.
Definition: statement.c:1406
whileloop statement_whileloop(statement)
Get the whileloop of a statement.
Definition: statement.c:1383
statement statement_goto(statement)
Get the goto of a statement.
Definition: statement.c:1396
forloop statement_forloop(statement)
Get the forloop of a statement.
Definition: statement.c:1426
unstructured statement_unstructured(statement)
Get the unstructured of a statement.
Definition: statement.c:1416
bool empty_statement_or_labelless_continue_p(statement)
Return true if the statement is an empty instruction block without label or a continue without label ...
Definition: statement.c:446
bool statement_expression_p(statement)
Definition: statement.c:384
bool unlabelled_statement_p(statement)
Definition: statement.c:402
bool statement_goto_p(statement)
Definition: statement.c:359
bool statement_multitest_p(statement)
Definition: statement.c:379
bool statement_whileloop_p(statement)
Definition: statement.c:354
bool statement_test_p(statement)
Definition: statement.c:343
bool statement_call_p(statement)
Definition: statement.c:364
bool statement_forloop_p(statement)
Definition: statement.c:374
bool nop_statement_p(statement)
Definition: statement.c:407
bool empty_statement_or_continue_p(statement)
Return true if the statement is an empty instruction block or a continue or a recursive combination o...
Definition: statement.c:474
bool check_io_statement_p(statement)
Definition: statement.c:528
bool empty_statement_p(statement)
Test if a statement is empty.
Definition: statement.c:391
bool statement_loop_p(statement)
Definition: statement.c:349
bool empty_statement_or_continue_without_comment_p(statement)
Return true if the statement is an empty instruction block or a continue without comments or without ...
Definition: statement.c:497
bool statement_sequence_p(statement)
Statement classes induced from instruction type.
Definition: statement.c:335
bool statement_unstructured_p(statement)
Definition: statement.c:369
list gather_and_remove_all_format_statements(statement)
Used to keep aside the FORMAT before many code transformation that could remove them either.
Definition: statement.c:2298
statement apply_number_to_statement(hash_table, _int)
Definition: statement.c:1495
bool format_statement_p(statement)
Test if a statement is a Fortran FORMAT.
Definition: statement.c:273
hash_table allocate_number_to_statement(void)
Definition: statement.c:1540
statement make_any_print_statement(string)
Generate a print of a constant character string on stderr for C or on stdout for Fortran.
Definition: statement.c:893
list statement_to_implicit_target_labels(statement)
Look for labels appearing in END= or ERR= IO clauses and allocate a label list.
Definition: statement.c:3145
statement make_assign_statement(expression, expression)
Definition: statement.c:583
statement add_initialization_information_to_declaration_statement(statement, list)
The initialization expression list is integrated into the internal representation as an argument list...
Definition: statement.c:1119
int count_references_to_variable(statement, entity)
Definition: statement.c:3655
entity statement_to_label(statement)
See if statement s is labelled and can be reached by a GO TO.
Definition: statement.c:2090
bool comments_equal_p(string, string)
Definition: statement.c:116
statement add_declaration_statement_at_beginning(statement, entity)
Definition: statement.c:2795
void append_statement_to_block_statement(statement, statement)
Definition: statement.c:2586
list statement_to_referenced_entities(statement)
Get a list of all variables referenced recursively within a statement:
Definition: statement.c:3428
void insert_comments_to_statement(statement, const char *)
Insert a comment string (if non empty) at the beginning of the comments of a statement.
Definition: statement.c:1916
bool statement_contains_user_call_p(statement)
Definition: statement.c:3939
statement update_statement_instruction(statement, instruction)
Replace the instruction in statement s by instruction i.
Definition: statement.c:3039
void put_a_comment_on_a_statement(statement, string)
Similar to try_to_put_a_comment_on_a_statement() but insert a CONTINUE to put the comment on it if th...
Definition: statement.c:1863
int count_references_to_variable_element(statement, entity)
Definition: statement.c:3666
char ** find_first_statement_comment(statement)
Find the first non-empty comment of a statement, if any returns a pointer to the comment if found,...
Definition: statement.c:1772
int count_static_references_to_variable(statement, entity)
Definition: statement.c:3571
statement make_print_statement(string)
Make a Fortran print statement.
Definition: statement.c:835
statement make_whileloop_statement(expression, statement, int, bool)
Build a while loop statement.
Definition: statement.c:1150
void put_formats_at_module_beginning(statement)
Transfer all the FORMATs at the very beginning of a module:
Definition: statement.c:2311
statement makeloopbody(loop, statement, bool)
statement makeloopbody(l, s_old) make a statement for a loop body, using the fields of a previously e...
Definition: statement.c:1641
bool statement_substatement_walker(statement, statement)
Definition: statement.c:3683
void fix_block_statement_declarations(statement)
s is assumed to be a block statement and its declarations field is assumed to be correct,...
Definition: statement.c:2930
statement make_loop_statement(entity, expression, expression, expression, statement)
Build a loop statement.
Definition: statement.c:1181
bool all_statements_defined_p(statement)
Definition: statement.c:3213
bool unstructured_does_return(unstructured)
Definition: statement.c:2254
void append_comments_to_statement(statement, string)
Append a comment string (if non empty) to the comments of a statement, if the c.
Definition: statement.c:1889
bool try_to_put_a_comment_on_a_statement(statement, string)
Put a comment on a statement in a safe way.
Definition: statement.c:1831
statement make_expression_statement(expression)
Build a statement from a given expression.
Definition: statement.c:1308
string statement_identification(statement)
Like external_statement_identification(), but with internal information, the hexadecimal address of t...
Definition: statement.c:1700
statement make_stop_statement(string)
This function returns a Fortran stop statement with an error message.
Definition: statement.c:908
statement remove_declaration_statement(statement, entity)
Declarations are not only lists of entities, but also statement to carry the line number,...
Definition: statement.c:2966
list statements_to_declarations(list)
Returns the declarations contained in a list of statement.
Definition: statement.c:3265
bool declaration_statements_p(list)
Check that all statements contained in statement list sl are declaration statements.
Definition: statement.c:1099
bool return_statement_p(statement)
Test if a statement is a C or Fortran "return".
Definition: statement.c:172
bool statement_may_have_control_effects_p(statement)
Definition: statement.c:3978
void put_formats_at_module_end(statement)
Transfer all the FORMATs at the very end of a module:
Definition: statement.c:2328
bool exit_statement_p(statement)
Definition: statement.c:177
list statement_to_called_user_entities(statement)
Get a list of all user function called recursively within a statement:
Definition: statement.c:3478
int statement_to_comment_length(statement)
Number of comment line directly attached to a statement.
Definition: statement.c:2375
string decls_text_dup(string)
Duplicate statement decls_text.
Definition: statement.c:574
list statement_to_declarations(void *)
Get a list of all variables declared recursively within a statement.
Definition: statement.c:3253
string generated_variable_comment(entity)
Definition: statement.c:2629
list statement_to_labels(statement)
Look for non-empty labels appearing directly or indirectly and allocate a label list.
Definition: statement.c:3169
list find_statements_with_pragma(statement, const char *)
Get a list of statements with pragma begining with a prefix.
Definition: statement.c:3912
statement make_declaration_statement(entity, int, string)
Make one declaration statement.
Definition: statement.c:1091
statement make_call_statement(string, list, entity, string)
This function is limited to intrinsics calls...
Definition: statement.c:1274
list instruction_to_declarations(instruction)
Get a list of all variables declared recursively within an instruction.
Definition: statement.c:3279
bool statement_with_pragma_p(statement)
Test if a statement has some pragma.
Definition: statement.c:3836
bool write_statement_p(statement)
Definition: statement.c:281
bool figure_out_if_it_is_a_format(instruction, bool *)
Definition: statement.c:2343
void pop_generated_variable_commenter(void)
Definition: statement.c:2623
reference find_reference_to_variable(statement, entity)
Definition: statement.c:3543
bool stop_statement_p(statement)
Test if a statement is a Fortran STOP.
Definition: statement.c:263
void add_one_line_of_comment(statement, string,...)
Definition: statement.c:1940
string external_statement_identification(statement)
Does work neither with undefined statements nor with defined statements with undefined instructions.
Definition: statement.c:1671
statement add_comment_and_line_number(statement, string, int)
Since block cannot carry comments nor line numbers, they must be moved to an internal continue statem...
Definition: statement.c:1980
bool fortran_return_statement_p(statement)
Test if a statement is a Fortran "return".
Definition: statement.c:188
list statement_to_direct_declarations(statement)
Returns the declarations contained directly in a statement s.
Definition: statement.c:3366
statement make_C_print_statement(string)
Definition: statement.c:852
bool continue_statement_p(statement)
Test if a statement is a CONTINUE, that is the FORTRAN nop, the ";" in C or the "pass" in Python....
Definition: statement.c:203
statement find_statement_from_label(statement, entity)
find a statement in s with entity label
Definition: statement.c:3810
statement make_declarations_statement(list, int, string)
Make a declaration(s) statement.
Definition: statement.c:990
void insert_statement(statement, statement, bool)
This is the normal entry point.
Definition: statement.c:2570
bool empty_code_list_p(list)
Definition: statement.c:99
persistant_statement_to_int statement_to_line_number(statement)
Definition: statement.c:2460
string safe_statement_identification(statement)
Definition: statement.c:1726
statement make_return_statement(entity)
Definition: statement.c:779
bool empty_code_p(statement)
statement.c
Definition: statement.c:86
hash_table build_number_to_statement(hash_table, statement)
Definition: statement.c:1516
bool assignment_statement_p(statement)
Test if a statement is an assignment.
Definition: statement.c:135
void insert_statement_no_matter_what(statement, statement, bool)
Break the IR consistency or, at the very least, do not insert new declarations at the usual place,...
Definition: statement.c:2581
list statement_pragmas(statement)
get the list of pragma of a statement s
Definition: statement.c:3851
instruction make_simple_Fortran_io_instruction(bool, expression, list)
Derived from the Fortran parser code.
Definition: statement.c:807
statement add_declaration_statement_here(statement, statement, entity, bool)
Add a new declaration statement (inspired by generic_add_declaration_statement)
Definition: statement.c:2839
statement make_exit_statement(int, string)
This function returns a statement ending with a C exit statement.
Definition: statement.c:926
string comments_dup(string)
functions to generate statements
Definition: statement.c:557
bool statement_possible_less_p(statement, statement)
Definition: statement.c:306
bool statement_less_p(statement, statement)
Definition: statement.c:288
statement make_continue_statement(entity)
Definition: statement.c:953
bool forloop_statement_p(statement)
Definition: statement.c:209
string gather_all_comments_of_a_statement(statement)
Gather all the comments recursively found in the given statement and return them in a strduped string...
Definition: statement.c:1760
extension get_extension_from_statement_with_pragma(statement, const char *)
Get the extension of a statement with pragma beginning with a prefix.
Definition: statement.c:3871
bool C_return_statement_p(statement)
Test if a statement is a C "return".
Definition: statement.c:194
void fix_statement_attributes_if_sequence(statement)
Apply fix_sequence_statement_attributes() on the statement only if it really a sequence.
Definition: statement.c:2078
list statements_to_direct_declarations(list)
Returns the declarations contained directly in the declaration statements of a list of statements.
Definition: statement.c:3334
list declaration_statement_to_initializations(statement)
Definition: statement.c:1128
bool statement_replace_in_root_statement(statement, statement, statement)
replace old_stat by new_stat in root_stat this pass does not free old_stat similar to replace_in_sequ...
Definition: statement.c:4235
int get_statement_depth(statement, statement)
computes the block-depth of a statement NOT INTENDED to generate entity name declared at particular b...
Definition: statement.c:3725
statement add_declaration_statement(statement, entity)
Definition: statement.c:2790
bool assignment_block_or_statement_p(statement)
Definition: statement.c:142
bool statement_in_statement_p(statement, statement)
Definition: statement.c:4076
statement clear_labels(statement)
Get rid of all labels in controlized code before duplication.
Definition: statement.c:1560
bool empty_comments_p(const char *)
Definition: statement.c:107
bool statement_with_empty_comment_p(statement)
Return true if the statement has an empty statement:
Definition: statement.c:126
void clear_label(statement)
Definition: statement.c:1568
statement normalize_statement(statement)
Make (a bit more) sure that s is gen_defined_p in spite of poor decision for empty fields and that st...
Definition: statement.c:4035
statement find_statement_from_label_name(statement, const char *, const char *)
Definition: statement.c:3816
statement make_test_statement(expression, statement, statement)
Definition: statement.c:1248
bool abort_statement_p(statement)
Definition: statement.c:182
void gather_and_remove_all_format_statements_rewrite(statement, list *)
Definition: statement.c:2270
statement make_plain_continue_statement(void)
Make a simple continue statement to be used as a NOP or ";" in C.
Definition: statement.c:964
bool statement_may_contain_exiting_intrinsic_call_p(statement)
Definition: statement.c:4022
void push_generated_variable_commenter(string(*)(entity))
Definition: statement.c:2616
statement add_label_to_statement(entity, statement, statement *)
Add a label to a statement.
Definition: statement.c:2158
statement st_make_nice_test(expression, list, list)
Definition: statement.c:1585
bool continue_statements_p(list)
Check that all statements contained in statement list sl are a continue statements.
Definition: statement.c:246
bool format_inside_statement_p(statement)
Definition: statement.c:2360
statement make_forloop_statement(expression, expression, expression, statement)
Definition: statement.c:1220
void statement_replace_with_statement_list(statement, statement, list)
Assume that statement rs appears in statement as and replaced it by a statement list.
Definition: statement.c:3081
bool statement_substatement_p(statement, statement)
search a statement inside a statement
Definition: statement.c:3702
bool statement_does_return(statement)
Returns false is no syntactic control path exits s (i.e.
Definition: statement.c:2195
void fix_sequence_statement_attributes(statement)
Since blocks are not represented in Fortran, they cannot carry a label.
Definition: statement.c:2016
bool statement_in_statements_p(statement, list)
Definition: statement.c:4097
bool declaration_statement_p(statement)
Had to be optimized according to Beatrice Creusillet.
Definition: statement.c:224
void statement_remove_extensions(statement)
That's all folks.
Definition: statement.c:4263
bool belong_to_statement(statement, statement, bool)
return true if s is enclosed in stmt NL: What is the difference with statement_in_statement_p?
Definition: statement.c:4304
entity find_final_statement_label(statement)
Find the label associated with the last statement executed within s.
Definition: statement.c:4360
string comment_sentinel(tag)
Start a single line comment.
Definition: statement.c:4420
void statement_remove_useless_label(statement, bool *)
remove the label of a statement if the statement is not unstructured.
Definition: statement.c:4275
int bool
we cannot use an enum or stdbool because we need to be compatible with newgen, thus boolean need to h...
Definition: newgen_types.h:78
int tag
TAG.
Definition: newgen_types.h:92
intptr_t _int
_INT
Definition: newgen_types.h:53
struct cons * list
Definition: newgen_types.h:106
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15
remove_a_control_from_a_list_and_relink_direction
For the control graph modifiers:
range_to_expression_mode
entity find_enum_of_member(entity)
Definition: entity.c:2713
void update_expression_syntax(expression, syntax)
frees expression syntax of e and replace it by the new syntax s
Definition: expression.c:3564
bool typedef_entity_p(entity)
Definition: entity.c:1902
int storage_space_of_variable(entity)
Definition: size.c:656
expression substitute_entity_in_expression(entity, entity, expression)
This function replaces all the occurences of an old entity in the expression exp by the new entity.
Definition: expression.c:2792
bool formal_label_replacement_p(entity)
Definition: variable.c:1797
int IsBinaryOperator(entity)
FI: These string constants are defined in ri-util.h and the tokens in ri-util/operator....
Definition: eval.c:660
expression make_vecteur_expression(Pvecteur)
make expression for vector (Pvecteur)
Definition: expression.c:1650
bool clean_up_sequences(statement)
Recursively clean up the statement sequences by fusing them if possible and by removing useless one.
bool commutative_call_p(call)
Test if we are allowed to commute operations.
Definition: entity.c:2661
dimension entity_ith_dimension(entity, int)
Another semantics would be: is this reference r to e a kill for e? In general, this cannot be answere...
Definition: variable.c:1228
bool array_reference_p(reference)
predicates on references
Definition: expression.c:1861
bool char_star_constant_function_type_p(type)
Beware of typedefs.
Definition: type.c:5787
bool expression_address_of_p(expression)
Definition: expression.c:420
entity basic_to_generic_conversion(basic)
returns the corresponding generic conversion entity, if any.
Definition: type.c:2758
bool rand_effects_entity_p(entity)
Definition: entity.c:1152
expression int_to_expression(_int)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
Definition: expression.c:1188
bool expression_is_C_rhs_p(expression)
Not all expressions can be used as right-hand side (rhs) in C assignments.
Definition: expression.c:2582
bool const_variable_p(entity)
Definition: variable.c:1687
expression add_integer_to_expression(expression, int)
Definition: expression.c:2132
entity make_stderr_variable(void)
If the parser has not (yet) encountered "stderr", a PIPS transformation or instrumentation phase may ...
Definition: variable.c:302
string string_fuse_final_linefeeds(string)
Get rid of extra linefeed/newline at the end of a string.
Definition: util.c:227
basic simple_basic_dup(basic)
Definition: type.c:2735
string empty_scope(void)
Functions used to manage the block scoping in conjunction with ContextStack and yco ntext.
Definition: entity.c:498
void reset_static_entities(void)
Definition: entity.c:146
bool expression_constant_p(expression)
================================================================
Definition: expression.c:2453
basic basic_of_expression(expression)
basic basic_of_expression(expression exp): Makes a basic of the same basic as the expression "exp".
Definition: type.c:1383
bool fortran_language_module_p(entity)
Definition: module.c:452
expression make_assign_expression(expression, expression)
Make an assign expression, since in C the assignment is a side effect operator.
Definition: expression.c:390
type ultimate_type(type)
Definition: type.c:3466
bool true_expression_p(expression)
Definition: expression.c:1113
parameter MakeDoubleprecisionParameter(void)
Definition: type.c:209
expression pragma_private_as_expr(list)
Definition: pragma.c:207
bool reference_with_constant_indices_p(reference)
Definition: expression.c:3022
void fprint_environment(FILE *, entity)
Definition: declarations.c:287
bool array_type_p(type)
Definition: type.c:2942
entity MakeConstant(string, tag)
Make a Fortran constant.
Definition: constant.c:351
dimension find_ith_dimension(list, int)
This function returns the ith dimension of a list of dimensions.
Definition: type.c:5621
bool expression_list_directed_p(expression)
set get_referenced_entities(void *)
retrieves the set of entities used in elem beware that this entities may be formal parameters,...
Definition: entity.c:3063
list load_statement_enclosing_loops(statement)
bool variable_length_array_type_p(type)
Is this equivalent to dependent_type_p()?
Definition: type.c:2972
normalized NormalizeCall(call)
Definition: normalize.c:145
bool call_compatible_type_p(type)
end of basic_concrete_types
Definition: type.c:3764
type make_standard_long_integer_type(type)
Definition: type.c:3309
type MakeLongLongIntegerResult(void)
MB.
Definition: type.c:286
bool expression_subscript_p(expression)
Definition: expression.c:1838
void remove_variable_entity(entity)
Definition: variable.c:1306
list double_entities
Definition: ri-util.h:2387
Value ValueNumberOfElements(list)
Definition: size.c:435
expression expression_mult(expression)
Definition: expression.c:156
list functional_type_supporting_entities(list, functional)
Definition: type.c:4014
expression make_unbounded_expression(void)
Definition: expression.c:4339
expression MakeCharacterConstantExpression(string)
END_EOLE.
Definition: constant.c:573
entity entity_to_module_entity(entity)
Find the enclosing module of an entity.
Definition: entity.c:2053
bool SizeOfArray(entity, int *)
This function computes the total size of a variable in bytes, ie.
Definition: size.c:87
entity get_allocatable_data_entity(entity)
Get the entity inside the struct corresponding to the array, mostly for correct prettyprint.
Definition: allocatable.c:157
void print_ordering_to_statement(void)
Dump the ordering with the corresponding statement address.
Definition: ordering.c:71
void free_arguments(cons *)
Definition: arguments.c:218
bool cabs_expression_p(expression)
Definition: expression.c:1048
bool min0_expression_p(expression)
Definition: expression.c:1054
entity module_to_heap_area(entity)
Returns the heap area "a" associated to module "f".
Definition: area.c:129
bool default_complex_type_p(type)
Definition: type.c:3246
bool logical_constant_p(entity)
Definition: constant.c:463
bool intrinsic_entity_p(entity)
Definition: entity.c:1272
list generic_symbolic_supporting_entities(list, set, symbolic, bool)
Definition: type.c:4198
void reset_std_static_entities(void)
Definition: entity.c:138
void GenericCleanLocalEntities(entity, bool)
Definition: clean.c:123
bool expression_brace_p(expression)
predicates and short cut accessors on expressions
Definition: expression.c:407
void reset_unstructured_number(void)
reorder.c
Definition: reorder.c:56
type array_type_to_pointer_type(type)
Allocate a new type that is the type of an array constant.
Definition: type.c:5739
basic MakeBasic(int)
END_EOLE.
Definition: type.c:128
bool qualifiers_restrict_p(list)
Check that a qualifier list contains the restrict qualifier.
Definition: type.c:5466
bool dependent_type_p(type)
A type is dependent in many ways according to definitions given in Wikipedia.
Definition: type.c:5849
bool fixed_length_array_type_p(type)
Definition: type.c:2987
entity make_empty_program(const char *, language)
Definition: entity.c:261
entity any_function_to_return_value(entity)
Same as function_to_return_value(), but returns value_undefined when m is a C void function or a Fort...
Definition: module.c:516
bool explicit_extern_entity_p(entity, entity)
Definition: entity.c:2016
bool reference_scalar_p(reference)
This function returns true if Reference r is scalar.
Definition: expression.c:3530
entity CreateEntity(const char *, const char *)
BEGIN_EOLE.
Definition: entity.c:1572
void reference_complete_with_zero_subscripts(reference)
Reference r to an array maybe partial, as is possible in C: with declaration "int a[10][10]",...
Definition: expression.c:278
void set_keyword_typedef_table(hash_table)
Definition: static.c:263
void print_type(type)
For debugging.
Definition: type.c:111
entity get_stdin_entity(void)
Definition: entity.c:1197
bool stderr_entity_p(entity)
Definition: entity.c:1226
bool expression_pointer_p(expression)
we get the type of the expression by calling expression_to_type() which allocates a new one.
Definition: expression.c:506
expression make_op_exp(char *, expression, expression)
================================================================
Definition: expression.c:2012
basic basic_of_intrinsic(call, bool, bool)
basic basic_of_intrinsic(call c): returns the basic of the result given by call to an intrinsic funct...
Definition: type.c:1555
string module_predicat_fortranfilename(entity)
Definition: util.c:82
bool reference_with_unbounded_indices_p(reference)
indices can be constant or unbounded: they are store independent.
Definition: expression.c:3066
bool arguments_set_equal_p(list, list)
Set equality of lists a1 and a2.
Definition: arguments.c:181
bool sub_expression_p(expression)
Definition: expression.c:991
list real_entities
Definition: ri-util.h:2386
list constant_expression_supporting_references(list, expression)
Only applicable to C expressions.
Definition: type.c:4451
bool entity_local_variable_p(entity, entity)
Check if a variable "var" is local to a module "module".
Definition: entity.c:3104
bool call_constant_p(call)
bool call_constant_p(call c): Returns true if "c" is a call to a constant, that is,...
Definition: expression.c:1965
type MakeDoublecomplexResult(void)
Definition: type.c:316
void error_reset_current_module_statement(void)
To be called by an error management routine only.
Definition: static.c:234
bool expression_similar_p(expression, expression)
compare if two expressions are similar that is can we exchange target and pattern by substituing vari...
Definition: expression.c:3360
entity entity_field_to_entity_struct(entity)
Definition: entity.c:905
expression SizeOfDimensions(list)
computes the product of all dimensions in dims
Definition: size.c:522
int effect_basic_depth(basic)
Definition: type.c:4985
bool heap_area_p(entity)
Definition: area.c:86
bool expression_implied_do_p(expression)
void CleanLocalEntities(entity)
Fortran version.
Definition: clean.c:140
dimension FindIthDimension(entity, int)
Definition: type.c:1180
basic constant_basic(entity)
Definition: constant.c:633
bool references_do_not_conflict_p(reference, reference)
If true is returned, the two references cannot conflict unless array bound declarations are violated.
Definition: expression.c:1888
bool reference_equal_p(reference, reference)
Definition: expression.c:1500
bool qualifiers_equal_p(list, list)
Definition: type.c:758
bool entity_array_p(entity)
Is e a variable with an array type?
Definition: entity.c:754
bool formal_context_variable_p(entity)
Such pseudo-variables are generated by the points-to analysis.
Definition: variable.c:1535
bool NumberOfElements(basic, list, int *)
Definition: size.c:403
type make_scalar_char_pointer_type(void)
Allocate a char * pointer type.
Definition: type.c:5227
entity make_entity_copy(entity)
Create a copy of an entity, with (almost) identical type, storage and initial value if move_initializ...
Definition: entity.c:2433
list type_supporting_types(type)
Return the list of types used to define type t.
Definition: type.c:5203
bool integer_constant_p(entity, int *)
Returns the double value associated to a PIPS constant.
Definition: constant.c:542
bool logical_operator_expression_p(expression)
C xor is missing.
Definition: expression.c:573
bool stack_area_p(entity)
Definition: area.c:104
bool string_block_scope_p(string)
Definition: entity.c:511
type MakeLongIntegerResult(void)
MB.
Definition: type.c:281
cons * arguments_union(cons *, cons *)
cons * arguments_union(cons * a1, cons * a2): returns a = union(a1, a2) where a1 and a2 are lists of ...
Definition: arguments.c:116
entity make_new_entity(basic, int)
Definition: variable.c:898
type array_type_to_sub_array_type(type)
Allocate a new type, the sub-array type of "t".
Definition: type.c:5718
bool stdin_entity_p(entity)
Definition: entity.c:1203
entity DynamicArea
area.c
Definition: area.c:57
Pvecteur vect_product(Pvecteur *, Pvecteur *)
returns a Pvecteur equal to (*pv1) * (*pv2) if this product is linear or NULL otherwise.
Definition: eval.c:1032
entity int_to_entity(_int)
Definition: constant.c:453
type MakeLongDoublecomplexResult(void)
MB.
Definition: type.c:322
Ppolynome expression_to_polynome(expression)
===========================================================================
Definition: expression.c:3650
bool entity_static_variable_p(entity)
return true if the entity is declared with the keyword static
Definition: variable.c:1146
int effect_type_depth(type)
Number of steps to access the lowest leave of type t.
Definition: type.c:4948
bool expression_equal_in_list_p(expression, list)
This function returns true, if there exists an expression equal in the list false,...
Definition: expression.c:566
list concat_new_entities(list, list)
returns l1 after elements of l2 but not of l1 have been appended to l1.
Definition: entity.c:2236
void backward_control_map_get_blocs(control, cons **)
bool entity_unbounded_p(entity)
bool entity_unbounded_p(entity e) input : an array entity output : true if the last dimension of the ...
Definition: variable.c:1252
bool variable_is_a_module_formal_parameter_p(entity, entity)
Definition: variable.c:1547
entity make_new_label(entity)
This function returns a new label.
Definition: entity.c:357
bool ultimate_type_equal_p(type, type)
Definition: type.c:563
parameter MakeAnyScalarParameter(tag, _int)
For Fortran.
Definition: type.c:251
bool expression_opposite_p(expression, expression)
e1+e2==0, i.e.
Definition: expression.c:1386
int IsNaryOperator(entity)
Definition: eval.c:746
bool unary_minus_expression_p(expression)
Definition: expression.c:1030
list base_to_entities(Pvecteur)
generate a Newgen list with all entities refered in vector b
Definition: arguments.c:250
bool same_entity_p(entity, entity)
predicates on entities
Definition: entity.c:1321
expression entity_ith_bounds(entity, int)
FIND_MODULE returns entity.
Definition: entity.c:1626
entity global_name_to_entity(const char *)
Find an entity, if it exists, from its global name, a.k.a.
Definition: entity.c:1516
bool expression_reference_p(expression)
Test if an expression is a reference.
Definition: expression.c:528
entity get_stderr_entity(void)
Definition: entity.c:1220
list subscript_expressions_to_constant_subscript_expressions(list)
make a full copy of the subscript expression list, preserve constant subscripts, replace non-constant...
Definition: expression.c:3981
list struct_initialization_expression_to_expressions(expression)
Returns a list of expressions hidden by the brace function.
Definition: expression.c:4073
const string FORTRAN_PRAGMA_HEADER
pragma.c
Definition: pragma.c:51
entity HeapArea
Definition: area.c:59
int ExpressionToInt(expression)
this function computes the value of an integer constant expression and returns it to the calling func...
Definition: size.c:562
type MakeUnsignedIntegerResult(void)
Definition: type.c:265
void CCleanLocalEntities(entity)
C language version.
Definition: clean.c:146
bool variable_equal_p(variable, variable)
Definition: type.c:819
bool entity_enum_p(entity)
Definition: entity.c:968
normalized NormalizeSyntax(syntax)
Definition: normalize.c:94
int current_offset_of_area(entity, entity)
Definition: area.c:174
entity FindOrCreateEntityLikeModel(const char *, const char *, entity)
hmmm...
Definition: entity.c:3136
string storage_to_string(storage)
Definition: entity.c:2030
mode MakeModeValue(void)
Definition: type.c:87
type make_standard_integer_type(type, int)
Definition: type.c:3196
value EvalNaryOp(int, list)
Definition: eval.c:591
bool static_module_p(entity)
Check if the given module entity is a static module.
Definition: module.c:80
expression expression_list_to_binary_operator_call(list, entity)
Definition: expression.c:1917
list recursive_functional_type_supporting_entities(list, set, functional)
Definition: type.c:3977
bool fcd_directive_p(entity)
Definition: hpfc.c:90
bool range_count(range, intptr_t *)
The range count only can be evaluated if the three range expressions are constant and if the incremen...
Definition: eval.c:979
type call_compatible_type(type)
returns the type necessary to generate or check a call to an object of type t.
Definition: type.c:3791
void AddLocalEntityToDeclarationsOnly(entity, entity, statement)
Add the variable entity e to the list of variables of the function module.
Definition: variable.c:253
expression make_true_expression(void)
Definition: expression.c:1103
bool expression_sizeofexpression_p(expression)
Definition: expression.c:460
list complex_entities
Definition: ri-util.h:2386
string string_strip_final_linefeeds(string)
Get rid of linefeed/newline at the end of a string.
Definition: util.c:208
bool clean_up_sequences_internal(statement)
An entry point for internal usage, such as from take_out_the_exit_node_if_not_a_continue():
hash_table statement_to_goto_table
clean_up_sequences.c
bool long_type_p(type)
Definition: type.c:2831
int basic_type_size(basic)
See also SizeOfElements()
Definition: type.c:1074
basic basic_of_external(call)
basic basic_of_external(call c): returns the basic of the result given by the call to an external fun...
Definition: type.c:1509
range expression_range(expression)
Definition: expression.c:1853
void free_keyword_typedef_table(void)
Definition: static.c:275
char vcid_ri_util_control[]
control.c
Definition: control.c:34
bool type_void_star_p(type)
Definition: type.c:5765
bool entity_equivalence_p(entity)
checks if an entity is an equivalent
Definition: entity.c:2194
const char * entity_name_or_TCST(entity)
Return a name valid for sorting variables in vectors and constraint systems.
Definition: entity.c:627
bool expression_with_constant_signed_integer_value_p(expression)
The expression may be complicated but all its leaves are constants or parameters.
Definition: expression.c:960
value EvalConditionalOp(list)
Definition: eval.c:309
bool entity_enum_variable_p(entity)
Definition: entity.c:992
value MakeValueSymbolic(expression)
this function creates a value for a symbolic constant.
Definition: constant.c:581
expression Value_to_expression(Value)
added interface for linear stuff.
Definition: expression.c:1251
type make_scalar_complex_type(_int)
Definition: type.c:719
void AddLocalEntityToDeclarations(entity, entity, statement)
Add the variable entity e to the list of variables of the function module.
Definition: variable.c:233
reference reference_with_store_independent_indices(reference)
Return by side effect a reference whose memory locations includes the memory locations of r in case t...
Definition: expression.c:3045
type make_char_array_type(int)
Definition: type.c:5213
expression float_to_expression(float)
Definition: expression.c:1229
expression MakeTernaryCall(entity, expression, expression, expression)
Creates a call expression to a function with 3 arguments.
Definition: expression.c:367
char * AddPackageToName(string, string)
This function concatenate a package name and a local name to produce a global entity name.
Definition: entity.c:2134
void variable_declaration_verify(reference)
Definition: module.c:116
bool type_used_in_type_declarations_p(entity, list)
check if e is used to declare one of the entities in entity list ldecl
Definition: entity.c:2289
void reset_label_counter(void)
Definition: entity.c:322
constant expression_constant(expression)
This function returns a "constant" object if the expression is a constant such as 10,...
Definition: expression.c:2347
bool label_string_defined_in_statement_p(string, statement)
Definition: entity.c:417
list entity_qualifiers(entity)
return the qualifiers associated to entity e if it's a variable NIL otherwise
Definition: entity.c:1394
void fprint_C_environment(FILE *, entity)
Definition: declarations.c:292
bool entities_p(list)
Make sure that an list is an homogeneous list of entities.
Definition: entity.c:2580
entity make_scalar_entity(const char *, const char *, basic)
entity make_scalar_entity(name, module_name, base)
Definition: variable.c:331
bool array_with_numerical_bounds_p(entity)
bool array_with_numerical_bounds_p(entity a) input : an array entity output : true if all bounds of a...
Definition: variable.c:1266
list filter_variables_in_pragma_expr(list, list)
filter out a pragma (expression list) removing all requested variables @params l_expr is the list of ...
Definition: pragma.c:256
set get_referenced_entities_filtered(void *, bool(*)(void *), bool(*)(entity))
Same as get_referenced_entities, but will only consider entities that fulfills entity_filter and will...
Definition: entity.c:2982
list make_unbounded_subscripts(int)
FI: this piece of code must have been duplicated somewhere else in an effect library.
Definition: expression.c:4346
bool std_file_entity_p(entity)
Definition: entity.c:1232
void add_non_declared_reference_to_declaration(reference)
Definition: module.c:142
expression MakeNullaryCall(entity)
Creates a call expression to a function with zero arguments.
Definition: expression.c:331
void flatten_block_if_necessary(instruction)
Flatten an instruction block if necessary.
Definition: instruction.c:259
list module_all_declarations(entity)
The function itself is not in its declarations.
Definition: module.c:419
bool enclosing_loops_map_undefined_p(void)
list brace_expression_to_statements(entity, expression)
converts a brace expression used to initialize an array (not a struct yet) into a statement sequence
Definition: expression.c:3480
list functional_type_supporting_references(list, functional)
Definition: type.c:4390
expression make_max_expression(expression, expression, enum language_utype)
Definition: expression.c:1579
int signed_integer_constant_expression_value(expression)
Definition: expression.c:1551
bool entity_non_pointer_scalar_p(entity)
Definition: variable.c:1193
bool entity_main_module_p(entity)
Definition: entity.c:700
expression syntax_to_expression(syntax)
generates an expression from a syntax
Definition: expression.c:3581
bool brace_expression_p(expression)
Return bool indicating if expression e is a brace expression.
Definition: expression.c:3384
sentence get_header_comments(entity)
Get the header comments (before PROGRAM, FUNCTION,...) from the text declaration:
Definition: module.c:254
type expression_to_type(expression)
For an array declared as int a[10][20], the type returned for a[i] is int [20].
Definition: type.c:2486
bool time_effect_entity_p(entity)
Definition: entity.c:1170
bool entity_volatile_variable_p(entity)
Definition: variable.c:1637
dimension dimension_dup(dimension)
Definition: type.c:1159
void initialize_clean_up_sequences_statistics(void)
bool generic_basic_equal_p(basic, basic, bool, bool, hash_table)
Definition: type.c:824
void safe_reset_entity_to_size(void)
In case of error handling, PIPS may try to reset this table twice.
Definition: size.c:647
bool compatible_basic_p(basic, basic)
check if two basics are similar.
Definition: type.c:978
bool same_field_entity_p(const entity, const entity)
Definition: entity.c:1019
type make_scalar_overloaded_type(void)
Definition: type.c:726
bool area_equal_p(area, area)
Definition: type.c:733
string entity_global_name(entity)
Used instead of the macro to pass as formal argument.
Definition: entity.c:464
const char * module_local_name(entity)
Returns the module local user name.
Definition: entity.c:582
bool keep_directive_in_code_p(const char *)
whether an entity must be kept in the code.
Definition: hpfc.c:101
list pragma_omp_parallel_as_exprs(void)
Definition: pragma.c:215
parameter MakeLongDoublecomplexParameter(void)
MB.
Definition: type.c:234
mode MakeModeReference(void)
Definition: type.c:82
bool expression_equal_p(expression, expression)
Syntactic equality e1==e2.
Definition: expression.c:1347
entity StaticArea
Definition: area.c:58
expression make_address_of_expression(expression)
generate a newly allocated expression for &(e)
Definition: expression.c:3956
string entity_name_without_scope(entity)
allocates a new string
Definition: entity.c:543
bool comment_string_p(const string)
Test if a string can be a Fortran 77 comment:
Definition: util.c:159
expression make_subscript_expression(expression, list)
Definition: expression.c:397
bool mode_equal_p(mode, mode)
Definition: type.c:1035
Pbase entity_list_to_base(list)
Definition: entity.c:2860
bool entity_scalar_p(entity)
The concrete type of e is a scalar type.
Definition: variable.c:1113
bool call_equal_p(call, call)
Definition: expression.c:1529
list get_common_members(entity, entity, bool)
bool void_function_p(entity)
Check if m is a C void function or a Fortran subroutine.
Definition: module.c:538
cons * arguments_difference(cons *, cons *)
set difference: a1 - a2 ; similar to set intersection
Definition: arguments.c:233
list fortran_constant_expression_supporting_entities(list, expression)
Fortran version.
Definition: type.c:4187
bool subscript_equal_p(subscript, subscript)
Definition: expression.c:1495
list declaration_supporting_references(list)
Find all references in the declaration list.
Definition: module.c:392
entity make_new_array_variable_with_prefix(const char *, entity, basic, list)
J'ai ameliore la fonction make_new_scalar_variable_with_prefix
Definition: variable.c:785
bool add_ordering_of_the_statement_to_current_mapping(statement)
Add the statement for its ordering, if any, in the hash-map.
Definition: ordering.c:130
expression expression_list_to_conjonction(list)
Definition: expression.c:1937
void update_dummy_parameter(parameter, entity)
Definition: entity.c:2072
bool reference_with_unbounded_subscript_p(reference)
See if the reference uses the unbounded function '*'.
Definition: expression.c:3085
expression make_lin_op_exp(entity, expression, expression)
================================================================
Definition: expression.c:2147
bool entity_basic_p(entity, enum basic_utype)
return true if the basic associated with entity e matchs the passed tag
Definition: entity.c:1405
void wide_forward_control_map_get_blocs(control, cons **)
bool entity_register_p(entity)
Definition: entity.c:766
bool array_element_type_p(type, type)
is "et" the type of an element of an array of type "at"?
Definition: type.c:684
expression MakeSizeofType(type)
Definition: expression.c:3904
entity make_new_module_variable(entity, int)
Make a new module integer variable of name X<d>.
Definition: variable.c:830
bool parameter_equal_p(parameter, parameter)
Definition: type.c:1030
bool divide_expression_p(expression)
Definition: expression.c:1012
entity make_new_scalar_variable(entity, basic)
Definition: variable.c:741
entity std_file_entity_to_pointed_file_entity(entity)
Dummy standard files targets.
Definition: entity.c:1243
void reset_keyword_typedef_table(void)
Definition: static.c:268
bool expression_linear_p(expression)
returns if e is already normalized and linear.
Definition: eval.c:951
expression pragma_if_as_expr(expression)
Definition: pragma.c:184
entity make_entity_copy_with_new_name_and_suffix(entity, string, bool)
Create a copy of an entity, with (almost) identical type, storage and initial value if move_initializ...
Definition: entity.c:2495
entity FindEntityFromUserName(const char *, const char *)
Definition: entity.c:1520
bool array_of_derived_type_p(type)
Definition: type.c:3109
bool parameter_passing_mode_p(entity, int tag)
Returns true when f has no parameters.
Definition: entity.c:2089
expression make_constraint_expression(Pvecteur, Variable)
Make an expression from a constraint v for a given index.
Definition: expression.c:1748
void add_pragma_strings_to_statement(statement, list, bool)
Add a list of strings as as many pragmas to a statement.
Definition: pragma.c:448
string module_codefilename(entity)
To find resources (this should be located in workspace-util as it depends both on pipsdbm and ri-util...
Definition: util.c:57
bool unstructured_reorder(unstructured)
Reorder an unstructured.
Definition: reorder.c:166
entity make_label(const char *, const char *)
Definition: entity.c:308
tag suggest_basic_for_expression(expression)
a BASIC tag is returned for the expression this is a preliminary version.
Definition: expression.c:130
Psysteme cute_convex_union(Psysteme, Psysteme)
convex_hull.c
Definition: convex_hull.c:41
basic entity_basic(entity)
return the basic associated to entity e if it's a function/variable/constant basic_undefined otherwis...
Definition: entity.c:1380
bool empty_static_area_p(entity)
Definition: area.c:201
bool variable_return_p(entity)
True if a variable is the pseudo-variable used to store value returned by a function:
Definition: variable.c:1522
expression make_factor_expression(int, entity)
Some functions to generate expressions from vectors and constraint systems.
Definition: expression.c:1631
void reset_enclosing_loops_map(void)
bool array_of_pointers_type_p(type)
Definition: type.c:3025
statement clone_statement(statement, clone_context)
clone_statement.c
statement pop_statement_global_stack(void)
Definition: static.c:352
int dimension_size(dimension)
this function computes the size of a dimension.
Definition: size.c:491
int number_of_initial_values(list)
size.c
Definition: size.c:44
type expression_to_uncasted_type(expression)
If the expression is casted, return its type before cast.
Definition: type.c:2620
bool empty_scope_p(string)
Definition: entity.c:500
void fprint_entity_list(FILE *, list)
void fprint_entity_list(FILE *fp,list l): prints a list of entities on file fp.
Definition: entity.c:3188
bool variable_in_common_p(entity)
true if v is in a common.
Definition: variable.c:1570
list basic_supporting_entities(list, set, basic)
Definition: type.c:4211
expression bool_to_expression(bool)
Definition: expression.c:1238
bool unbounded_entity_p(entity)
Definition: expression.c:4323
type intrinsic_call_to_type(call)
END_EOLE.
Definition: type.c:2080
bool label_string_defined_in_current_module_p(string)
Definition: entity.c:407
int element_number(basic, list)
END_EOLE.
Definition: size.c:391
list make_unbounded_dimensions(int)
Minimal information to build a d-dimensional array type.
Definition: type.c:5752
bool scalar_integer_type_p(type)
Definition: type.c:3276
void update_statement_enclosing_loops(statement, list)
int array_size(entity)
Definition: size.c:195
expression MakeBinaryCall(entity, expression, expression)
Creates a call expression to a function with 2 arguments.
Definition: expression.c:354
bool label_name_conflict_with_labels(const char *, list)
Definition: entity.c:610
type MakeLogicalResult(void)
Definition: type.c:306
cast expression_cast(expression)
Definition: expression.c:455
bool derived_entity_p(entity)
Definition: entity.c:1048
bool place_holder_variable_p(entity)
Definition: variable.c:2069
bool variable_entity_p(entity)
variable.c
Definition: variable.c:70
normalized NormalizeExpression(expression)
normalize.c
Definition: normalize.c:81
remove_a_control_from_a_list_and_relink_direction
For the control graph modifiers:
Definition: ri-util.h:1839
@ source_is_predecessor_and_dest_is_successor
Put some strange number to avoid random clash as much as possible...
Definition: ri-util.h:1842
@ source_is_successor_and_dest_is_predecessor
Definition: ri-util.h:1843
type expression_to_concrete_type(expression)
A new type is allocated.
Definition: type.c:3751
set get_declared_entities(void *)
retrieves the set of entities declared in elem
Definition: entity.c:3086
bool abs_expression_p(expression)
Definition: expression.c:1024
list logical_entities
Definition: ri-util.h:2387
bool scalar_type_p(type)
Definition: type.c:2955
void split_initializations_in_statement(statement)
Transform a declaration with an initialization statement into 2 parts, a declaration statement and an...
Definition: declarations.c:437
expression make_contrainte_expression(Pcontrainte, Variable)
A wrapper around make_constraint_expression() for compatibility.
Definition: expression.c:1815
bool realign_directive_p(entity)
Definition: hpfc.c:62
list char_entities
Definition: ri-util.h:2387
parameter MakeDoublecomplexParameter(void)
Definition: type.c:229
bool arguments_subset_p(list, list)
Check if a1 is a subset of a2.
Definition: arguments.c:204
application expression_application(expression)
Definition: expression.c:485
bool field_expression_p(expression)
The expression is of kind "a", where "a" is a field of some struct "s".
Definition: expression.c:498
bool variable_entities_may_conflict_p(entity, entity)
Definition: size.c:689
code EntityCode(entity)
this function checks that e has an initial value code.
Definition: entity.c:301
bool unbounded_dimension_p(dimension)
bool unbounded_dimension_p(dim) input : a dimension of an array entity.
Definition: expression.c:1130
entity make_temporary_pointer_to_array_entity(entity, expression, entity)
Definition: variable.c:819
bool global_variable_p(entity)
Is v a global variable such as "int i;".
Definition: variable.c:1510
_int TK_CHARCON_to__int(const char *)
Definition: constant.c:88
expression expression_verbose_reduction_p_and_return_increment(expression, bool(expression))
bool symbolic_entity_p(entity)
Definition: entity.c:1277
bool compilation_unit_entity_p(entity)
Check if the given module entity is a compilation unit.
Definition: module.c:87
void reference_add_unbounded_subscripts(reference, type)
Definition: expression.c:300
bool hpf_directive_entity_p(entity)
Definition: hpfc.c:56
bool substraction_expression_p(expression)
Test if an expression is an substraction.
Definition: expression.c:1000
list pragma_omp_parallel_for_as_exprs(void)
Definition: pragma.c:236
int module_to_declaration_length(entity)
Number of user declaration lines for a module.
Definition: module.c:352
if_clause_policy
that is all for ri-util-local.h
Definition: ri-util.h:2319
@ AND_IF_POLICY
Definition: ri-util.h:2321
@ OR_IF_POLICY
Definition: ri-util.h:2322
@ IGNORE_IF_POLICY
Definition: ri-util.h:2320
string basic_to_string(basic)
Warning! Do not modify this file that is automatically generated!
Definition: type.c:87
bool enum_type_p(type)
Returns true if t is of type derived and if the derived type is a enum.
Definition: type.c:3172
void reference_add_zero_subscript(reference)
No check on reference r.
Definition: expression.c:267
list derived_type_fields(type)
Definition: type.c:5354
bool entity_module_p(entity)
Definition: entity.c:683
bool dynamic_area_p(entity)
Definition: area.c:68
expression make_zero_expression(void)
Make a zero expression.
Definition: expression.c:1212
string module_entitiesfilename(entity)
Definition: util.c:87
type C_type_to_pointed_type(type)
returns a copy of t if t is not a pointer type, and the pointed type if t is a pointer type or.
Definition: type.c:5288
void expression_normalize_subscripts(expression)
To be used for initialization expressions.
Definition: expression.c:4465
bool expression_one_p(expression)
Definition: expression.c:2591
bool entity_blockdata_p(entity)
Definition: entity.c:712
expression range_to_expression(range, enum range_to_expression_mode mode)
computes the distance between the lower bound and the upper bound of the range
Definition: eval.c:963
void AddEntityToDeclarations(entity, entity)
END_EOLE.
Definition: variable.c:108
type MakeTypeUnknown(void)
Definition: type.c:97
void davinci_dump_all_expressions(FILE *, statement)
dump all expressions in s to out.
Definition: expression.c:2728
normalized NormalizeConstant(constant)
Definition: normalize.c:175
statement get_current_statement_from_statement_global_stack(void)
Definition: static.c:344
bool type_fundamental_basic_p(type)
Definition: type.c:2930
type ultimate_array_type(type)
Definition: type.c:3471
type type_to_array_type(type)
convert a type "t" into a newly allocated array type "at" whose elements are of type "t",...
Definition: type.c:5653
type MakeComplexResult(void)
Definition: type.c:311
bool thread_safe_variable_p(entity)
Definition: entity.c:2539
list make_list_of_constant(int, int)
of expression
Definition: expression.c:3369
type call_to_type(call)
Definition: type.c:2313
entity make_empty_blockdata(const char *, language)
Definition: entity.c:290
bool statement_global_stack_defined_p(void)
Definition: static.c:364
entity generate_pseudo_formal_variable_for_formal_label(const char *, int)
Definition: variable.c:1744
bool arguments_equal_p(list, list)
Check the syntactic equality of lists a1 and a2.
Definition: arguments.c:139
hash_table set_ordering_to_statement(statement)
To be used instead of initialize_ordering_to_statement() to make sure that the hash table ots is in s...
Definition: ordering.c:172
void add_thread_safe_variable(entity)
Definition: entity.c:2525
list type_supporting_references(list, type)
Definition: type.c:4700
const string FORTRAN_OMP_CONTINUATION
Definition: pragma.c:52
bool static_global_variable_p(entity)
Is v a global variable declared local to a C file such "static int i;".
Definition: variable.c:1498
type type_to_pointer_type(type)
allocate a new type "pt" which includes directly "t".
Definition: type.c:5253
const char * label_local_name(entity)
END_EOLE.
Definition: entity.c:604
bool expression_string_constant_p(expression)
Definition: expression.c:2398
entity make_loop_label(int, entity)
bool local_entity_of_module_p(entity, entity)
This test shows that "e" has been declared in "module".
Definition: entity.c:1069
void control_node_reorder(control, set)
type call_to_functional_type(call, bool)
The function called can have a functional type, or a typedef type or a pointer type to a functional t...
Definition: type.c:3824
int number_of_fields(type)
Recursive number of fields in a data structure...
Definition: type.c:3893
void normalize_first_expressions_of(void *)
Definition: normalize.c:694
entity get_stdout_entity(void)
Definition: entity.c:1209
entity make_new_derived_entity_with_prefix(const char *, entity, type)
derived from make_new_scalar_variable_with_prefix
Definition: variable.c:685
expression MakeCastExpression(type, expression)
Definition: expression.c:3911
bool function_return_value_p(entity, entity)
Is entity v the return value of function f?
Definition: module.c:529
expression make_entity_expression(entity, cons *)
Definition: expression.c:176
float expression_to_float(expression)
Same as above for floating point constants.
Definition: expression.c:2305
list extract_references_from_declarations(list)
FI: this function has not yet been extended for C types!!!
Definition: entity.c:2834
list enum_supporting_entities(list, set, entity)
Definition: type.c:4025
entity entity_empty_label(void)
Definition: entity.c:1105
bool variable_dynamic_p(entity)
Definition: variable.c:1586
entity CreateIntrinsic(string)
this function does not create an intrinsic function because they must all be created beforehand by th...
Definition: entity.c:1311
bool hpf_directive_string_p(const char *)
hpfc.c
Definition: hpfc.c:51
void statement_normalize_subscripts(statement)
To be used for module statements.
Definition: expression.c:4471
void free_enclosing_loops_map(void)
extensions empty_extensions(void)
extension.c
Definition: extension.c:43
bool entity_not_constant_or_intrinsic_p(entity)
Default entity filter for get_referenced_entities()
Definition: entity.c:3050
parameter MakePointerParameter(void)
Definition: type.c:173
bool fortran95_language_module_p(entity)
Definition: module.c:457
bool expression_is_constant_p(expression)
BEGIN_EOLE.
Definition: constant.c:666
bool memmove_effect_entity_p(entity)
Definition: entity.c:1165
type MakeTypeVoid(void)
Definition: type.c:102
bool same_type_name_p(type, type)
For naming homogeneity: expression_to_string(), reference_to_string()...
Definition: type.c:74
int SizeOfIthDimension(entity, int)
this function returns the size of the ith dimension of a variable e.
Definition: size.c:453
bool arithmetic_intrinsic_p(entity)
true if e is an arithmetic instrinsic
Definition: entity.c:1702
expression reference_ith_index(reference, int)
functions for references
Definition: util.c:145
void discard_statement_to_goto_table(void)
Discard the statement_to_goto_table map:
bool qualifiers_const_p(list)
Check that a qualifier list contains the const qualifier.
Definition: type.c:5453
basic some_basic_of_any_expression(expression, bool, bool)
basic basic_of_any_expression(expression exp, bool apply_p): Makes a basic of the same basic as the e...
Definition: type.c:1258
int variable_dimension_number(variable)
Definition: type.c:5632
bool constant_string_entity_p(entity)
Definition: constant.c:356
entity make_constant_entity(string, tag, size_t)
For historical reason, call the Fortran version.
Definition: constant.c:301
void check_fortran_declaration_dependencies(list)
declarations.c
Definition: declarations.c:47
void compute_statement_to_goto_table(statement)
Since clean_up_sequences() is called before the controlizer, there may be some GOTO.
value EvalConstant(constant)
Constant c is returned as field of value v.
Definition: eval.c:235
bool same_basic_p(basic, basic)
check if two basics are similar.
Definition: type.c:969
void forward_control_map_get_blocs(control, cons **)
int entity_field_rank(entity)
f is a field of a structure or of an union: what is its rank?
Definition: entity.c:940
bool entity_pointer_p(entity)
Definition: entity.c:745
bool comma_expression_p(expression)
Definition: expression.c:830
void RemoveLocalEntities(entity)
Useful for ParserError()?
Definition: clean.c:152
string string_remove_trailing_line_feeds(string)
Remove trailing line feeds.
Definition: util.c:186
normalized NormalizeIntrinsic(entity, list)
Definition: normalize.c:221
void fprint_any_environment(FILE *, entity, bool)
Definition: declarations.c:297
int add_C_variable_to_area(entity, entity)
Definition: variable.c:1381
bool parameter_passing_by_value_p(entity)
Definition: entity.c:2116
basic basic_of_any_expression(expression, bool)
Definition: type.c:1364
string safe_type_to_string(const type)
Definition: type.c:59
basic basic_union(expression, expression)
basic basic_union(expression exp1 exp2): returns the basic of the expression which has the most globa...
Definition: type.c:1792
expression substitute_entity_variable_in_expression(entity, entity, expression)
(This function isn't use for the moment) This function replaces all the occurrences of an old entity ...
Definition: expression.c:2772
type MakeVoidPointerResult(void)
Definition: type.c:271
entity entity_field_to_entity_union(entity)
Definition: entity.c:915
list generic_constant_expression_supporting_entities(list, set, expression, bool)
Definition: type.c:4058
expression size_of_actual_array(entity, list, int)
Definition: expression.c:4197
bool actual_label_replacement_p(expression)
Assumes that eap is a call.
Definition: variable.c:1811
entity FindEntity(const char *, const char *)
Retrieve an entity from its package/module name and its local name.
Definition: entity.c:1503
list type_fields(type)
Definition: type.c:3073
bool dabs_expression_p(expression)
Definition: expression.c:1042
list basic_supporting_references(list, basic)
Definition: type.c:4519
bool dummy_parameter_entity_p(entity)
is p a dummy parameter?
Definition: entity.c:1941
expression dereference_expression(expression)
generate a newly allocated expression for *(e)
Definition: expression.c:3934
parameter MakeOverloadedParameter(void)
Definition: type.c:167
bool overloaded_parameters_p(list)
Definition: type.c:5236
bool entity_union_p(entity)
Is entity e an entity representing the union declaration?
Definition: entity.c:1038
bool label_defined_in_statement_p(entity, statement)
Definition: entity.c:388
type type_to_final_pointed_type(type)
returns t if t is not a pointer type, and the first indirectly pointed type that is not a pointer if ...
Definition: type.c:5336
bool do_get_declared_entities(statement, set)
Helper for get_declared_entities() Add all locally declared entity to the set given in argument.
Definition: entity.c:3074
int number_of_items(type)
Same as above, but arrays in struct are taken into account.
Definition: type.c:3925
void store_statement_enclosing_loops(statement, list)
bool basic_type_p(type)
Safer than the other implementation? bool pointer_type_p(type t) { bool is_pointer = false;.
Definition: type.c:2912
bool entity_in_common_p(entity)
Definition: entity.c:1082
void AddEntityToCurrentModuleWithoutDeclaration(entity)
Add a variable entity to the current module declarations.
Definition: variable.c:271
value EvalSyntax(syntax)
Definition: eval.c:113
bool type_equal_p(type, type)
Definition: type.c:547
int DefaultLengthOfBasic(tag)
constant.c
Definition: constant.c:44
void reset_unique_variable_numbers(void)
Definition: variable.c:421
_int is_c_keyword_typedef(char *)
This function checks if s is a C keyword or typedef name and returns the token number thanks to the h...
Definition: static.c:297
bool member_entity_p(entity)
Definition: entity.c:1921
bool module_body_reorder(statement)
Reorder a module.
Definition: reorder.c:211
bool power_expression_p(expression)
Definition: expression.c:1018
bool return_value_p(entity)
Is entity v the return value of some function?
Definition: module.c:522
bool variable_in_module_p(entity, entity)
This test can only be applied to variables, not to functions, subroutines or commons visible from a m...
Definition: variable.c:1610
bool generic_variable_equal_p(variable, variable, bool, bool, hash_table)
Definition: type.c:762
void set_std_static_entities(void)
entity.c
Definition: entity.c:80
bool io_luns_entity_p(entity)
Definition: entity.c:1146
void discard_module_declaration_text(entity)
Discard the decls_text string of the module code to make the prettyprinter ignoring the textual decla...
Definition: variable.c:1696
void set_entity_to_size(void)
Definition: size.c:625
size_t maximal_type_depth(type)
Number of steps to access the lowest leave of type t without a recursive test.
Definition: type.c:4856
type expression_to_user_type(expression)
Preserve typedef'ed types when possible.
Definition: type.c:2645
parameter MakeCharacterParameter(void)
Definition: type.c:239
void declare_new_typedef(const string)
Definition: static.c:283
entity AddEntityToModule(entity, entity)
!!! caution, it may not be a module, but a common...
Definition: entity.c:3171
bool basic_equal_p(basic, basic)
Definition: type.c:927
string build_new_top_level_module_name(const char *, bool)
module.c
Definition: module.c:55
void fprint_functional(FILE *, functional)
This function is called from c_parse() via ResetCurrentModule() and fprint_environment()
Definition: declarations.c:227
bool generic_parameter_equal_p(parameter, parameter, bool, bool, hash_table)
Definition: type.c:1016
entity expression_to_entity(expression)
just returns the entity of an expression, or entity_undefined
Definition: expression.c:3140
value EvalIntrinsic(entity, list)
This function tries to evaluate a call to an intrinsic function.
Definition: eval.c:290
bool integer_scalar_entity_p(entity)
integer_scalar_entity_p() is obsolete; use entity_integer_scalar_p()
Definition: variable.c:1137
bool malloc_effect_entity_p(entity)
Definition: entity.c:1158
basic basic_of_any_reference(reference, bool, bool)
Retrieves the basic of a reference in a newly allocated basic object.
Definition: type.c:1395
list syntax_to_reference_list(syntax, list)
Definition: expression.c:1270
expression pragma_build_if_condition(expression, language)
build the expression to be put in the if clause.
Definition: pragma.c:159
bool entity_f95use_p(entity)
Definition: entity.c:694
void add_abstract_state_variable(entity)
Definition: entity.c:2558
bool complex_constant_expression_p(expression)
Definition: constant.c:416
expression complex_to_expression(float, float)
Definition: expression.c:1234
const char * entity_user_name(entity)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
Definition: entity.c:487
void add_pragma_str_to_statement(statement, const char *, bool)
Add a string as a pragma to a statement.
Definition: pragma.c:425
bool integer_type_p(type)
Definition: type.c:3298
bool extended_integer_constant_expression_p(expression)
More extensive than next function.
Definition: expression.c:858
statement Pvecteur_to_assign_statement(entity, Pvecteur)
generates var = linear expression from the Pvecteur.
Definition: expression.c:1720
expression make_call_expression(entity, list)
Build an expression that call an function entity with an argument list.
Definition: expression.c:321
bool type_equal_up_to_qualifiers_p(type, type)
Definition: type.c:552
bool syntax_equal_p(syntax, syntax)
Definition: expression.c:1462
void AddEntityToCurrentModule(entity)
Add a variable entity to the current module declarations.
Definition: variable.c:260
bool unnormalized_array_p(entity)
Definition: entity.c:846
int type_memory_size(type)
Definition: size.c:248
entity module_name_to_entity(const char *)
This is an alias for local_name_to_top_level_entity.
Definition: entity.c:1479
bool assumed_size_array_p(entity)
Definition: entity.c:807
type MakeCharacterResult(void)
Definition: type.c:328
bool concrete_type_equal_p(type, type)
Expand typedefs before the type comparison.
Definition: type.c:571
int bound_generation_compare_vector_component(Pvecteur *, Pvecteur *)
bound_generation.c
bool expression_integer_constant_p(expression)
Definition: expression.c:2417
bool abstract_state_variable_p(entity)
Definition: entity.c:2572
type MakeTypeArray(basic, cons *)
functions on types
Definition: type.c:162
int new_add_any_variable_to_area(entity, entity, bool)
Definition: variable.c:1436
bool vecteur_nul_p(Pvecteur)
Definition: constraint.c:56
const char * entity_and_common_name(entity)
See next function!
Definition: entity.c:654
list type_supporting_entities(list, type)
Definition: type.c:4347
basic MakeBasicOverloaded(void)
bool same_type_name_p(const type t0, const type t1) {
Definition: type.c:77
void RemoveLocalEntityFromDeclarations(entity, entity, statement)
Definition: variable.c:120
bool lexicographic_order_p(entity, entity)
true if var1 <= var2
Definition: entity.c:1365
bool same_entity_name_p(entity, entity)
compare entity names
Definition: entity.c:2208
entity update_operator_to_regular_operator(entity)
Returns the binary operator associated to a C update operator such as +=.
Definition: entity.c:2154
reference constant_reference_to_normalized_constant_reference(reference)
Allocate a new reference with evaluated subscripts.
Definition: eval.c:1068
type type_to_pointed_type(type)
returns t if t is not a pointer type, and the pointed type if t is a pointer type.
Definition: type.c:5265
bool formal_area_p(entity)
Definition: area.c:95
void free_expressions(list)
Free a list of expressions.
Definition: expression.c:4084
void symbolic_constant_declaration_verify(call)
Definition: module.c:128
bool check_C_function_type(entity, list)
Check that an effective parameter list is compatible with a function type.
Definition: type.c:4716
Value ValueSizeOfDimension(dimension)
FI: I do not understand the "Value" cast.
Definition: size.c:531
bool expression_field_p(expression)
The expression is of kind "s.a", where "s" is a struct and a "a" field.
Definition: expression.c:491
type entity_basic_concrete_type(entity)
retrieves or computes and then returns the basic concrete type of an entity
Definition: type.c:3677
cons * dup_arguments(cons *)
Definition: arguments.c:225
bool cast_equal_p(cast, cast)
Definition: expression.c:1455
expression reference_offset(reference)
computes the offset of a C reference with its origin
Definition: expression.c:3807
const char * module_resource_name(entity)
Returns a pointer towards the resource name.
Definition: entity.c:593
entity FindOrCreateTopLevelEntity(const char *)
Return a top-level entity.
Definition: entity.c:1603
bool is_expression_reference_to_entity_p(expression, entity)
Test if an expression is a reference to a given variable entity.
Definition: expression.c:541
void dump_arguments(cons *)
entity_name is a macro, hence the code replication
Definition: arguments.c:69
void simplify_expressions(void *)
Definition: expression.c:3801
bool extern_entity_p(entity, entity)
Definition: entity.c:1977
int entity_memory_size(entity)
Definition: size.c:239
type pointed_type(type)
returns the type pointed by the input type if it is a pointer or an array of pointers
Definition: type.c:3035
bool unsigned_type_p(type)
Predicates on types.
Definition: type.c:2821
bool intrinsic_name_p(const char *)
Definition: entity.c:1282
int integer_constant_expression_value(expression)
Definition: expression.c:1545
bool statement_to_goto_table_flt(instruction)
End: clean up sequences context.
bool dimension_equal_p(dimension, dimension)
Definition: type.c:747
bool allocatable_area_p(entity)
Definition: area.c:64
entity MakeComplexConstant(expression, expression)
make a complex constant from two calls to real or integer constants
Definition: constant.c:373
normalized NormalizeCast(cast)
Definition: normalize.c:130
Value ValueSizeOfArray(entity)
Definition: size.c:206
bool signed_constant_expression_p(expression)
Definition: constant.c:604
bool basic_concrete_type_leads_to_pointer_p(type)
returns true when the input type successors may be pointers
Definition: type.c:3699
cons * arguments_rm_entity(cons *, entity)
Definition: arguments.c:94
bool declarable_type_p(type, list)
Are all types necessary to define fully type "t" listed in list "pdl"?
Definition: type.c:4361
bool variable_stack_p(entity)
Definition: variable.c:1593
bool io_entity_p(entity)
Several implicit entities are declared to define the implicit effects of IO statements.
Definition: entity.c:1139
const char * entity_module_name(entity)
See comments about module_name().
Definition: entity.c:1092
bool max0_expression_p(expression)
Definition: expression.c:1061
void entity_basic_concrete_types_init(void)
Definition: type.c:3507
type MakeAnyScalarResult(tag, _int)
Definition: type.c:337
expression get_allocatable_data_expr(entity)
This function produce an expression that is an access to the array inside the allocatable structure.
Definition: allocatable.c:141
const char * entity_local_name(entity)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
Definition: entity.c:453
type MakeIntegerResult(void)
Definition: type.c:276
bool signed_integer_constant_expression_p(expression)
Definition: expression.c:932
expression find_ith_expression(list, int)
find_ith_expression() is obsolet; use find_ith_argument() instead
Definition: expression.c:1161
void register_static_entity(entity *)
add given entity to the set of entities that must reset upon workspace deletion practically,...
Definition: entity.c:156
type subscripted_type_to_type(type, expression)
Returns the type of an object of type t subscripted by expression se.
Definition: type.c:5562
bool entity_used_in_declarations_p(entity, list)
check if e is used to declare one of the entities in entity list ldecl
Definition: entity.c:2258
int trivial_expression_p(expression)
This function returns:
Definition: expression.c:679
void GenericCleanEntities(list, entity, bool)
clean.c
Definition: clean.c:63
void sort_list_of_entities(list)
sorted in place.
Definition: entity.c:1358
int IsUnaryOperator(entity)
Definition: eval.c:632
bool FILE_star_type_p(type)
Definition: type.c:3046
bool same_scalar_location_p(entity, entity)
FI: transferred from semantics (should be used for effect translation as well)
Definition: variable.c:1992
subscript expression_subscript(expression)
Definition: expression.c:1843
bool c_module_p(entity)
Test if a module "m" is written in C.
Definition: entity.c:2777
entity StackArea
Definition: area.c:60
expression generate_string_for_alternate_return_argument(string)
Definition: variable.c:1721
bool variable_declaration_coherency_p(entity, statement)
Definition: module.c:203
bool unbounded_expression_p(expression)
Definition: expression.c:4329
value EvalBinaryOp(int, list)
t defines the operator and la is a list to two sub-expressions.
Definition: eval.c:385
type array_type_projection(type)
T is assumed to be an array type.
Definition: type.c:596
value EvalUnaryOp(int, list)
Definition: eval.c:349
void unnormalize_expression(void *)
void unnormalize_expression(expression exp): puts all the normalized field of expressions in "st" to ...
Definition: normalize.c:452
list variable_type_supporting_entities(list, set, variable)
Definition: type.c:4254
bool integer_constant_name_p(string)
Definition: constant.c:83
bool union_type_p(type)
Returns true if t is of type derived and if the derived type is a union.
Definition: type.c:3151
bool statement_enclosing_loops_undefined_p(statement)
bool pointer_type_p(type)
Check for scalar pointers.
Definition: type.c:2993
bool array_entity_p(entity)
Definition: entity.c:793
bool integer_constant_expression_p(expression)
positive integer constant expression: call to a positive constant or to a sum of positive integer con...
Definition: expression.c:903
bool top_level_entity_p(entity)
Check if the scope of entity e is global.
Definition: entity.c:1130
void adjust_goto_from_to(statement, statement)
Adjust all the GOTOs pointing s1 to s2:
bool expression_equal_integer_p(expression, int)
================================================================
Definition: expression.c:1977
unsigned int array_type_dimension(type)
Definition: type.c:2947
string qualifier_to_string(qualifier)
Definition: type.c:5427
list enum_supporting_references(list, entity)
Definition: type.c:4415
list derived_type_to_fields(type)
Definition: type.c:5381
bool dimensions_equal_p(list, list)
Definition: type.c:754
entity make_new_common(string, entity)
This function creates a common for a given name in a given module.
Definition: entity.c:1806
bool module_reorder(statement)
Reorder a module and recompute order to statement if any.
Definition: reorder.c:244
bool type_structurally_equal_p(type, type)
Type t1 and t2 are equal if their basic concrete components are equal.
Definition: type.c:586
expression entity_to_expression(entity)
if v is a constant, returns a constant call.
Definition: expression.c:165
void normalize_subscript_expression(expression)
Normalization of subscript in expressions.
Definition: expression.c:4407
entity entity_intrinsic(const char *)
FI: I do not understand this function name (see next one!).
Definition: entity.c:1292
bool array_pointer_type_equal_p(type, type)
assume that a pointer to type x is equal to a 1-D array of x
Definition: type.c:609
reference expression_to_reference(expression)
Definition: expression.c:212
entity make_scalar_integer_entity(const char *, const char *)
Create an integer variable of name "name" in module of name "module_name".
Definition: variable.c:1068
bool simplify_expression(expression *)
use polynomials to simplify an expression in some cases this operation can change the basic of the ex...
Definition: expression.c:3770
type MakeRealResult(void)
Definition: type.c:291
size_t type_depth(type)
Number of steps to access the lowest leave of type t without dereferencing.
Definition: type.c:4880
bool type_union_variable_p(type)
Definition: type.c:3877
type MakeTypeStatement(void)
Definition: type.c:92
bool derived_type_p(type)
Returns true if t is of type struct, union or enum.
Definition: type.c:3104
expression make_false_expression(void)
Definition: expression.c:1108
type MakeDoubleprecisionResult(void)
Definition: type.c:296
bool c_language_module_p(entity)
Definition: module.c:447
type make_scalar_integer_type(_int)
Definition: type.c:712
bool positive_expression_p(expression)
Use constants and type information to decide if the value of sigma(e) is always positive,...
Definition: eval.c:826
bool formal_parameter_p(entity)
Definition: variable.c:1489
int compare_entities(const entity *, const entity *)
Comparison function for qsort.
Definition: entity.c:1328
bool simplify_C_expression(expression)
Replace C operators "+C" and "-C" which can handle pointers by arithmetic operators "+" and "-" when ...
Definition: expression.c:2814
expression variable_initial_expression(entity)
Returns a copy of the initial (i.e.
Definition: variable.c:1899
bool store_independent_reference_p(reference)
Does this reference define the same set of memory locations regardless of the current (environment an...
Definition: expression.c:3108
void generic_reference_add_fixed_subscripts(reference, type, bool)
Add a set of zero subscripts to a reference "r" by side effect.
Definition: expression.c:236
hash_table make_keyword_typedef_table(int)
Definition: static.c:256
entity make_C_or_Fortran_constant_entity(const char *, tag, size_t, bool, bool(*)(const char *, const char *))
This function creates a constant.
Definition: constant.c:148
bool unsigned_basic_p(basic)
Definition: type.c:2812
void set_register_qualifier(entity)
Assuming that v is of type variable, add a qualifier register.
Definition: entity.c:778
list struct_type_to_fields(type)
Definition: type.c:5798
bool extended_expression_constant_p(expression)
Returns true if the value of the expression does not depend syntactically on the current store.
Definition: expression.c:2461
normalized binary_to_normalized(list, int)
Definition: normalize.c:320
entity make_empty_function(const char *, type, language)
Definition: entity.c:283
bool entity_is_argument_p(entity, cons *)
Definition: arguments.c:150
parameter MakeIntegerParameter(void)
Definition: type.c:184
entity generic_clone_variable_with_unique_name(entity, statement, string, string, entity, bool)
clone a variable with a new name.
Definition: variable.c:509
bool dead_fcd_directive_p(entity)
Definition: hpfc.c:74
bool operator_expression_p(expression, string)
Definition: expression.c:1087
expression expressions_to_operation(const list, entity)
take a list of expression and apply a binary operator between all of them and return it as an express...
Definition: expression.c:3544
bool call_contains_alternate_returns_p(call)
Definition: variable.c:1835
string module_par_codefilename(entity)
Definition: util.c:62
void print_entity_set(set)
Definition: entity.c:174
entity make_new_array_variable(entity, basic, list)
Definition: variable.c:793
hash_table keyword_typedef_table
Because of typedefs, the C lexers need help to decide if a character string such as toto is a type na...
Definition: static.c:253
bool entity_atomic_reference_p(entity)
Any reference r such that reference_variable(r)==e accesses all bytes (or bits) allocated to variable...
Definition: variable.c:1163
bool io_intrinsic_p(entity)
rue is a statement s is an io intrinsic
Definition: entity.c:1655
list arguments_intersection(list, list)
Build a new list with all entities occuring in both a1 and a2.
Definition: arguments.c:158
bool assignment_expression_p(expression)
Test if an expression is an assignment operation.
Definition: expression.c:979
char * new_label_local_name(entity)
Definition: entity.c:326
list module_formal_parameters(entity)
list module_formal_parameters(entity func) input : an entity representing a function.
Definition: module.c:327
bool empty_extensions_p(extensions)
Definition: extension.c:50
list variable_type_supporting_references(list, variable)
Definition: type.c:4562
bool entity_in_list_p(entity, list)
look for ent in ent_l
Definition: entity.c:2221
list dimensions_to_normalized_dimensions(list)
evaluate constant expressions appearing in dimensions of list dl
Definition: type.c:3528
bool variable_in_list_p(entity, list)
Definition: variable.c:1623
bool iabs_expression_p(expression)
Definition: expression.c:1036
_int SizeOfElements(basic)
This function returns the length in bytes of the Fortran or C type represented by a basic,...
Definition: size.c:297
bool entity_return_label_p(entity)
Definition: entity.c:673
void print_homogeneous_arguments(list, const char *(entity))
arguments.c
Definition: arguments.c:54
entity function_to_return_value(entity)
Returns the entity rv that carries the value returned by module m, when m is not a C void function or...
Definition: module.c:509
bool expression_null_p(expression)
returns true if the expression is equal to zero or NULL (even if there is a cast before such as in (v...
Definition: expression.c:2611
bool effects_package_entity_p(entity)
checks if an entity is an IO_EFFECTS_PACKAGE_NAME, a MALLOC_EFFECTS_NAME or a RAND_EFFECTS_PACKAGE_NA...
Definition: entity.c:1181
entity module_name_to_runtime_entity(const char *)
similar to module_name_to_entity but generates a warning and a stub if the entity is not found
Definition: entity.c:1485
bool array_pointer_string_type_equal_p(type, type)
Assume that a pointer to type x is equal to a 1-D array of x.
Definition: type.c:658
type MakeTypeOverloaded(void)
Definition: type.c:107
entity SafeMakeConstant(string, tag, bool(*)(const char *, const char *))
END_EOLE.
Definition: constant.c:315
bool struct_type_p(type)
Returns true if t is of type derived and if the derived type is a struct.
Definition: type.c:3121
type MakeQuadprecisionResult(void)
MB.
Definition: type.c:301
parameter MakeUnsignedIntegerParameter(void)
Definition: type.c:194
expression MakeCommaExpression(list)
Definition: expression.c:3918
entity operator_neutral_element(entity)
Definition: entity.c:2593
bool qualified_variable_p(entity, unsigned int)
The variable may turn out to be a function.
Definition: variable.c:1666
expression MakeBraceExpression(list)
Definition: expression.c:3927
entity make_derived_entity(const char *, const char *, type)
Definition: variable.c:378
bool same_expression_p(expression, expression)
this is slightly different from expression_equal_p, as it will return true for a+b vs b+a
Definition: expression.c:1426
char * expression_string_constant(expression)
returns a newly allocated string!
Definition: expression.c:2409
@ range_to_distance
Definition: ri-util.h:2307
@ range_to_nbiter
Definition: ri-util.h:2308
entity MakeCompilationUnitEntity(const char *)
This is useful for the C language only.
Definition: entity.c:1954
basic basic_of_call(call, bool, bool)
basic basic_of_call(call c): returns the basic of the result given by the call "c".
Definition: type.c:1469
bool expression_intrinsic_operation_p(expression)
bool expression_intrinsic_operation_p(expression exp): Returns true if "exp" is an expression with a ...
Definition: expression.c:1949
expression MakeSizeofExpression(expression)
Definition: expression.c:3896
value EvalCall(call)
only calls to constant, symbolic or intrinsic functions might be evaluated.
Definition: eval.c:170
void push_statement_on_statement_global_stack(statement)
Definition: static.c:333
parameter MakeVoidPointerParameter(void)
Definition: type.c:178
void reset_internal_static_entities(void)
Definition: entity.c:119
entity find_or_create_typed_entity(string, const char *, tag)
Looks for an entity of the specified basic.
Definition: variable.c:1046
bool generic_functional_equal_p(functional, functional, bool, bool, hash_table)
Definition: type.c:983
entity make_empty_module(const char *, type, language)
The source language is not specified.
Definition: entity.c:197
bool false_expression_p(expression)
Definition: expression.c:1118
entity make_new_scalar_variable_with_prefix(const char *, entity, basic)
Create a new scalar variable of type b in the given module.
Definition: variable.c:592
value EvalExpression(expression)
cproto-generated files
Definition: eval.c:108
void make_bound_expression(Variable, Pbase, Psysteme, expression *, expression *)
void make_bound_expression(variable index, Pbase base, Psysteme sc, expression *lower,...
void add_pragma_expr_to_statement(statement, list)
Add a pragma as a list of expression to a statement.
Definition: pragma.c:460
bool extended_integer_constant_expression_p_to_int(expression, int *)
Definition: expression.c:874
bool type_with_const_qualifier_p(type)
Is there a const qualifier associated to type t.
Definition: type.c:5483
entity find_label_entity(const char *, const char *)
util.c
Definition: util.c:43
bool float_type_p(type)
Definition: type.c:3263
sentence get_declaration_comments(entity)
Get all the declaration comments, that are comments from the PROGRAM, FUNCTION,...
Definition: module.c:275
type array_type_to_element_type(type)
returns the type of the elements of an array type, as a newly allocated type.
Definition: type.c:5700
bool entity_list_p(list)
Checks that el only contains entity.
Definition: entity.c:1411
parameter MakeRealParameter(void)
Definition: type.c:204
int NumberOfDimension(entity)
Definition: size.c:588
entity make_entity_copy_with_new_name(entity, string, bool)
Create a copy of an entity, with (almost) identical type, storage and initial value if move_initializ...
Definition: entity.c:2463
bool entity_formal_p(entity)
is p a formal parameter?
Definition: entity.c:1935
int expression_to_int(expression)
================================================================
Definition: expression.c:2205
list integer_entities
Make a new variable entity which name is one letter prefix + one incrementing number.
Definition: ri-util.h:2787
void reference_add_zero_subscripts(reference, type)
Definition: expression.c:261
bool redistribute_directive_p(entity)
Definition: hpfc.c:68
void display_clean_up_sequences_statistics(void)
void brace_expression_to_updated_type(entity, expression)
use a brace expression to update the type of array "arr" if the dimensions are implicit
Definition: expression.c:3517
bool sizeofexpression_equal_p(sizeofexpression, sizeofexpression)
Definition: expression.c:1446
list entities_to_expressions(list)
build a list of expressions from a list of entities
Definition: entity.c:2703
expression expression_to_dereferencing_expression(expression)
Reuse expression e to build expression *(e) without cheking the legality of the construct.
Definition: expression.c:4051
bool integer_expression_p(expression)
Definition: expression.c:601
bool bit_type_p(type)
Definition: type.c:2843
string local_name_to_scope(const char *)
allocates a new string
Definition: entity.c:563
type MakeOverloadedResult(void)
this function creates a default fortran operator result, i.e.
Definition: type.c:261
bool fortran_module_p(entity)
Test if a module is in Fortran.
Definition: entity.c:2799
string module_pp_fortranfilename(entity)
Definition: util.c:77
bool expression_minmax_p(expression)
Definition: expression.c:3882
entity generic_function_to_return_value(entity, bool)
Returns the entity rv that carries the value returned by module m, when m is not a C void function or...
Definition: module.c:469
bool C_initialization_expression_p(expression)
Definition: expression.c:4056
bool negative_expression_p(expression)
Use constants and type information to decide if the value of sigma(e) is always negative,...
Definition: eval.c:896
void reset_ordering_to_statement(void)
Reset the mapping from ordering to statement.
Definition: ordering.c:185
expression convert_bound_expression(expression, bool, bool)
Replace a C expression used as FOR bound by a Fortran DO bound expression, taking into account the C ...
Definition: expression.c:2968
bool signed_type_p(type)
Definition: type.c:2800
code entity_code(entity)
Definition: entity.c:1098
bool array_argument_p(expression)
Definition: expression.c:513
parameter MakeLogicalParameter(void)
Definition: type.c:219
string module_par_fortranfilename(entity)
Definition: util.c:72
bool ith_parameter_p(entity, entity, int)
returns true if v is the ith formal parameter of function f
Definition: util.c:125
entity AllocatableArea
Definition: area.c:61
parameter MakeLongIntegerParameter(void)
Definition: type.c:189
type compute_basic_concrete_type(type)
computes a new type which is the basic concrete type of the input type (this new type is not stored i...
Definition: type.c:3556
string safe_entity_name(entity)
predicates and functions for entities
Definition: entity.c:433
void make_enclosing_loops_map(void)
bool overloaded_type_p(type)
Returns true if t is a variable type with a basic overloaded.
Definition: type.c:2666
bool implicit_c_variable_p(entity)
Definition: variable.c:1877
reference expression_reference(expression)
Short cut, meaningful only if expression_reference_p(e) holds.
Definition: expression.c:1832
bool expression_similar_get_context_p(expression, expression, hash_table *)
similar to expression_similar_p but the hash_map containing the crossref value is retured for further...
Definition: expression.c:3339
entity make_new_integer_scalar_common_variable(string, entity, entity)
This function creates a common variable in a given common in a given module.
Definition: entity.c:1843
entity module_to_dynamic_area(entity)
Definition: area.c:139
entity clone_variable_with_unique_name(entity, statement, string, string, entity)
Clone a variable with a new user name.
Definition: variable.c:562
bool variable_heap_p(entity)
Definition: variable.c:1600
bool expression_application_p(expression)
Duplicate bool expression_subscript_p(expression e) { return(syntax_subscript_p(expression_syntax(e))...
Definition: expression.c:480
list ldimensions_dup(list)
Definition: type.c:1166
bool expression_equal_or_opposite_p(expression, expression)
e1==e2 or -e1==e2 or e1==-e2 syntactically
Definition: expression.c:1366
bool entity_continue_p(entity)
Definition: entity.c:1731
expression update_range(entity, range, expression, expression, expression, bool)
fortran90.c
sizeofexpression expression_sizeofexpression(expression)
Definition: expression.c:465
statement_mapping get_enclosing_loops_map(void)
basic basic_ultimate(basic)
get the ultimate basic from a basic typedef
Definition: type.c:1806
bool stdout_entity_p(entity)
Definition: entity.c:1215
entity get_continue_entity(void)
true if continue.
Definition: entity.c:1726
void normalize_all_expressions_of(void *)
Definition: normalize.c:668
int add_variable_to_area(entity, entity)
Definition: variable.c:1376
bool zero_expression_p(expression)
Definition: expression.c:1217
void davinci_dump_expression(FILE *, expression)
dump expression e in file out as a davinci graph.
Definition: expression.c:2710
bool entity_label_p(entity)
Definition: entity.c:678
bool entity_subroutine_p(entity)
Definition: entity.c:737
bool expression_integer_value(expression, intptr_t *)
Definition: eval.c:792
bool entity_enum_member_p(entity)
Definition: entity.c:980
entity make_empty_f95module(const char *, language)
Definition: entity.c:275
list fortran_type_supporting_entities(list, type)
Definition: type.c:4593
expression make_min_expression(expression, expression, enum language_utype)
Definition: expression.c:1600
bool expression_cast_p(expression)
Definition: expression.c:450
string module_fortranfilename(entity)
Definition: util.c:67
void set_internal_static_entities(void)
beware: cannot be called on creating the database
Definition: entity.c:92
expression make_ref_expr(entity, list)
Definition: expression.c:4316
entity make_new_index_entity(entity, string)
Definition: variable.c:1851
bool pointer_type_array_p(entity)
Definition: entity.c:826
bool char_star_type_p(type)
Beware of typedefs.
Definition: type.c:5774
void print_common_layout(FILE *, entity, bool)
Definition: area.c:207
type reference_to_type(reference)
Definition: type.c:2354
entity make_empty_subroutine(const char *, language)
Definition: entity.c:268
expression pointer_reference_to_expression(reference)
Assume p is a pointer.
Definition: expression.c:4004
reference add_subscript_to_reference(reference, expression)
Add a last subscript expression s to a reference r.
Definition: expression.c:224
bool expression_allocatable_data_access_p(expression)
Check if an expression is a reference to an allocatable array.
Definition: allocatable.c:95
void error_reset_current_module_entity(void)
To be called by an error management routine only.
Definition: static.c:109
expression normalize_integer_constant_expression(expression)
Allocate a new expression equivalent to e, but constant expressions are evaluated.
Definition: eval.c:1112
@ ENTITY_POINTER_DUMMY_TARGETS_AREA
Definition: ri-util.h:2339
@ ENTITY_STATIC_AREA
Definition: ri-util.h:2338
@ ENTITY_FORMAL_AREA
Definition: ri-util.h:2340
@ EFFECTS_PACKAGE
Definition: ri-util.h:2333
@ ABSTRACT_LOCATION
Definition: ri-util.h:2334
@ DEFAULT_ENTITY_KIND
Definition: ri-util.h:2332
@ ENTITY_DYNAMIC_AREA
Definition: ri-util.h:2337
@ ENTITY_STACK_AREA
Definition: ri-util.h:2335
@ ENTITY_HEAP_AREA
Definition: ri-util.h:2336
bool pointer_dummy_targets_area_p(entity)
Definition: area.c:113
bool string_struct_scope_p(string)
same kind of testing required for union as well
Definition: entity.c:503
int string_type_size(basic)
Definition: type.c:1047
expression find_ith_argument(list, int)
Definition: expression.c:1147
bool entity_struct_p(entity)
Is entity e the entity corresponding to a struct declaration?
Definition: entity.c:1002
entity generate_variable_with_unique_name_to_module(const char *, const char *, const char *, entity)
Generate a new variable name from a seed name to a module.
Definition: variable.c:460
bool expression_call_p(expression)
Definition: expression.c:415
expression Pvecteur_to_expression(Pvecteur)
AP, sep 25th 95 : some usefull functions moved from static_controlize/utils.c.
Definition: expression.c:1825
bool string_type_p(type)
Definition: type.c:2854
void free_expression_normalized(expression)
Definition: normalize.c:432
parameter MakeLongLongIntegerParameter(void)
MB.
Definition: type.c:199
list common_members_of_module(entity, entity, bool)
returns the list of entity to appear in the common declaration.
Definition: entity.c:1741
bool fcd_directive_string_p(const char *)
Definition: hpfc.c:80
list symbolic_supporting_references(list, symbolic)
Definition: type.c:4512
bool self_initialization_p(entity)
Check if a variable is initialized by itself as "int a = a;" is legal C code according to gcc.
Definition: variable.c:1966
type MakeTypeVariable(basic, cons *)
BEGIN_EOLE.
Definition: type.c:116
void free_statement_global_stack(void)
Definition: static.c:358
int add_any_variable_to_area(entity, entity, bool)
Definition: variable.c:1386
statement ordering_to_statement(int)
Get the statement associated to a given ordering.
Definition: ordering.c:111
expression subscript_value_stride(entity, list)
Definition: expression.c:4127
list symbolic_supporting_entities(list, set, symbolic)
C version.
Definition: type.c:4206
bool typedef_type_p(type)
Returns true if t is a typedefED type.
Definition: type.c:3189
normalized normalize_reference(reference)
Definition: normalize.c:592
expression monome_to_expression(Pmonome)
converts a monome to an expression
Definition: expression.c:3589
bool entity_special_area_p(entity)
Definition: area.c:154
bool entity_function_p(entity)
Definition: entity.c:724
string safe_instruction_identification(instruction)
Definition: instruction.c:337
bool array_of_struct_type_p(type)
Definition: type.c:3133
bool char_type_p(type)
return true whether ‘t’ is a char or an unsigned char
Definition: type.c:2877
expression SizeOfDimension(dimension)
Definition: size.c:503
void delete_statement_enclosing_loops(statement)
entity local_name_to_top_level_entity(const char *)
This function try to find a top-level entity from a local name.
Definition: entity.c:1450
bool integer_symbolic_constant_p(entity, int *)
(*int_p) gets integer constant if any
Definition: constant.c:556
void entity_basic_concrete_types_reset(void)
Definition: type.c:3513
bool add_expression_p(expression)
Test if an expression is an addition.
Definition: expression.c:986
bool user_call_p(call)
Test if a call is a user call.
Definition: expression.c:4361
list dependence_of_dependent_type(type)
similar to dependent_type_p but return a list of reference on which the type depend.
Definition: type.c:5942
bool type_struct_variable_p(type)
Definition: type.c:3867
void set_enclosing_loops_map(statement_mapping)
cons * arguments_add_entity(cons *, entity)
Definition: arguments.c:85
entity entity_field_to_entity_struct_or_union(entity)
Definition: entity.c:925
bool type_pointer_on_struct_variable_p(type)
Definition: type.c:2960
bool entity_in_formal_area_p(entity)
Formal parameters do not use the standard ram storage.
Definition: entity.c:3196
bool same_expression_in_list_p(expression, list)
This function returns true, if there exists a same expression in the list false, otherwise.
Definition: expression.c:557
bool symbolic_constant_entity_p(entity)
BEGIN_EOLE.
Definition: variable.c:83
entity find_ith_formal_parameter(entity, int)
This function gives back the ith formal parameter, which is found in the declarations of a call or a ...
Definition: entity.c:1863
bool overwrite_ordering_of_the_statement_to_current_mapping(statement)
Overwrite the statement for its ordering, if any, in the hash-map.
Definition: ordering.c:142
list expressions_to_entities(list)
map expression_to_entity on expressions
Definition: expression.c:3161
bool entity_integer_scalar_p(entity)
for variables (like I), not constants (like 1)! use integer_constant_p() for constants
Definition: variable.c:1130
string string_of_type(type)
Definition: type.c:56
parameter MakeQuadprecisionParameter(void)
MB.
Definition: type.c:214
bool standard_long_integer_type_p(type)
Used to encode the long keyword in the parser.
Definition: type.c:3227
list string_to_user_modules(const char *)
Build a list of functions from a string s containing SPACE separated function names.
Definition: module.c:562
entity get_ith_dummy(string, string, int)
Returns a numbered entity the name of which is suffix + number, the module of which is prefix.
Definition: variable.c:1711
bool C_pointer_type_p(type)
Returns OK for "char[]" as well as for "char *".
Definition: type.c:3011
bool ordering_to_statement_initialized_p(void)
ordering.c
Definition: ordering.c:63
void FreeNormalized(normalized)
Definition: normalize.c:419
value EvalSizeofexpression(sizeofexpression)
Definition: eval.c:210
void vect_debug(Pvecteur)
constraint.c
Definition: constraint.c:43
bool relational_expression_p(expression)
Definition: expression.c:587
bool volatile_variable_p(variable)
Definition: variable.c:1649
expression MakeUnaryCall(entity, expression)
Creates a call expression to a function with one argument.
Definition: expression.c:342
expression reference_to_expression(reference)
Definition: expression.c:196
entity make_global_entity_from_local(entity)
Definition: variable.c:281
void clean_all_normalized(expression)
Definition: expression.c:4102
bool modulo_expression_p(expression)
Definition: expression.c:1006
void dump_functional(functional, string_buffer)
Definition: declarations.c:581
call expression_call(expression)
Definition: expression.c:445
bool functional_equal_p(functional, functional)
Definition: type.c:1011
int ipow(int, int)
FI: such a function should exist in Linear/arithmetique.
Definition: eval.c:769
bool expression_negative_integer_value_p(expression)
Return true iff the expression has an integer value known statically and this value is negative.
Definition: eval.c:814
basic expression_basic(expression)
Definition: type.c:1115
bool variable_static_p(entity)
true if v appears in a SAVE statement, or in a DATA statement, or is declared static i C.
Definition: variable.c:1579
Pvecteur expression_to_affine(expression)
Definition: normalize.c:461
expression MakeComplexConstantExpression(expression, expression)
Definition: constant.c:397
list recursive_type_supporting_entities(list, set, type)
Definition: type.c:4283
bool expression_lists_equal_p(list, list)
Definition: expression.c:1405
bool parameter_passing_by_reference_p(entity)
Definition: entity.c:2121
int compare_Pvecteur(Pvecteur *, Pvecteur *)
comparison function for Pvecteur in pips, to be used by qsort.
Definition: constraint.c:50
list functional_type_supporting_types(functional)
FI: I'm not sure this function is of any use.
Definition: type.c:5059
expression pragma_private_as_expr_with_args(list)
Definition: pragma.c:196
int fortran_string_compare(string, string)
expression.c
Definition: expression.c:101
bool entity_f95module_p(entity)
Definition: entity.c:707
void reset_entity_to_size(void)
Definition: size.c:635
bool entity_field_p(entity)
e is the field of a structure
Definition: entity.c:857
int variable_entity_dimension(entity)
variable_entity_dimension(entity v): returns the dimension of variable v; scalar have dimension 0.
Definition: variable.c:1293
entity FindOrCreateEntity(const char *, const char *)
Problem: A functional global entity may be referenced without parenthesis or CALL keyword in a functi...
Definition: entity.c:1586
normalized NormalizeReference(reference)
Definition: normalize.c:182
entity find_field_in_field_list(entity, list)
To deal with fields declared in different C files.
Definition: type.c:5401
void add_symbolic_constant_to_declaration(call)
Definition: module.c:175
bool type_equal_up_to_typedefs_and_qualifiers_p(type, type)
Definition: type.c:557
bool range_equal_p(range, range)
Definition: expression.c:1522
bool is_inferior_basic(basic, basic)
bool is_inferior_basic(basic1, basic2) return true if basic1 is less complex than basic2 ex: int is l...
Definition: type.c:2687
list constant_expression_supporting_entities(list, set, expression)
C version.
Definition: type.c:4181
bool entity_common_p(entity)
Definition: entity.c:718
basic basic_of_expressions(list, bool)
Definition: type.c:2040
entity find_or_create_scalar_entity(const char *, const char *, tag)
Looks for an entity which should be a scalar of the specified basic.
Definition: variable.c:1025
bool entity_variable_length_array_p(entity)
Definition: entity.c:798
void print_C_common_layout(FILE *, entity, bool)
Definition: declarations.c:129
string string_remove_trailing_line_feed(string)
Remove trailing line feed if any.
Definition: util.c:169
void make_statement_global_stack(void)
Definition: static.c:318
bool label_defined_in_current_module_p(entity)
Definition: entity.c:399
entity make_place_holder_variable(entity)
Definition: variable.c:2059
void local_assign_expression(expression, expression)
replace expression caller by expression field , where field is contained by caller
Definition: expression.c:3571
bool entity_allocatable_p(entity)
allocatable.c
Definition: allocatable.c:72
bool expression_range_p(expression)
Definition: expression.c:1848
bool static_area_p(entity)
Definition: area.c:77
bool logical_type_p(type)
Definition: type.c:2865
bool same_type_p(type, type)
Type equality and equivalence.
Definition: type.c:409
expression call_to_expression(call)
Build an expression that call a function or procedure.
Definition: expression.c:309
double float_constant_to_double(entity)
Definition: constant.c:639
bool EvalNormalized(normalized, int *)
Definition: normalize.c:404
entity float_to_entity(float)
Definition: constant.c:430
bool entity_empty_label_p(entity)
Definition: entity.c:666
bool logical_expression_p(expression)
Definition: expression.c:610
expression replace_expression_content(expression, expression)
Use side effects to move the content of e2, s2 and n2, into e1; s1 and n1 are freed,...
Definition: expression.c:3864
basic basic_of_constant(call)
basic basic_of_constant(call c): returns the basic of the call to a constant.
Definition: type.c:1763
bool qualifier_equal_p(qualifier, qualifier)
Definition: type.c:5420
type type_to_returned_type(type)
returns t if t is not a functoional type, and the returned type if t is a functional type.
Definition: type.c:5316
entity expression_variable(expression)
Definition: expression.c:532
entity find_ith_parameter(entity, int)
Definition: util.c:93
bool variable_in_module_p2(entity, entity)
Definition: module.c:94
entity make_integer_constant_entity(_int)
entity make_integer_constant_entity(int c) make entity for integer constant c
Definition: variable.c:1345
list pragma_omp_merge_expr(list, list, language)
merge omp pragma.
Definition: pragma.c:326
string instruction_identification(instruction)
Return a constant string representing symbolically the instruction type.
Definition: instruction.c:284
bool same_struct_entity_p(const entity, const entity)
Definition: entity.c:1012
list expression_to_reference_list(expression, list)
conversion of an expression into a list of references; references are appended to list lr as they are...
Definition: expression.c:1263
parameter MakeComplexParameter(void)
Definition: type.c:224
string type_to_string(const type)
type.c
Definition: type.c:51
basic basic_of_reference(reference)
Retrieves the basic of a reference in a newly allocated basic object.
Definition: type.c:1459
bool float_constant_p(entity)
ent can be either a numerical or a symbolic float constant
Definition: constant.c:487
bool entity_area_p(entity)
Definition: area.c:149
basic basic_maximum(basic, basic)
Definition: type.c:1816
bool user_function_call_p(expression)
Definition: expression.c:1068
bool concrete_array_pointer_type_equal_p(type, type)
Same as above, but resolve typedefs first.
Definition: type.c:700
list string_to_entity_list(string, string)
of entity
Definition: entity.c:1887
void print_entities(list)
Definition: entity.c:167
int CSafeSizeOfArray(entity)
BEGIN_EOLE.
Definition: size.c:225
expression polynome_to_expression(Ppolynome)
converts a polynomial to expression
Definition: expression.c:3622
entity make_temporary_pointer_to_array_entity_with_prefix(char *, entity, entity, expression)
Definition: variable.c:801
list struct_variable_to_fields(entity)
Assume that v is declared as a struct.
Definition: variable.c:2045
basic_utype
Definition: ri.h:570
struct _newgen_struct_call_ * call
Definition: ri.h:63
language_utype
Definition: ri.h:1565
#define intptr_t
Definition: stdint.in.h:294
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
Definition: vecteur-local.h:89
internally defined structure.
Definition: string_buffer.c:47
FI: I do not understand why the type is duplicated at the set level.
Definition: set.c:59
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
for intrinsic registration
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
Definition: vecteur-local.h:60