PIPS
pointer_values_intrinsics.c
Go to the documentation of this file.
1 /*
2 
3  $Id: pointer_values_intrinsics.c 23065 2016-03-02 09:05:50Z coelho $
4 
5  Copyright 1989-2016 MINES ParisTech
6  Copyright 2010 HPC Project
7 
8  This file is part of PIPS.
9 
10  PIPS is free software: you can redistribute it and/or modify it
11  under the terms of the GNU General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  any later version.
14 
15  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
16  WARRANTY; without even the implied warranty of MERCHANTABILITY or
17  FITNESS FOR A PARTICULAR PURPOSE.
18 
19  See the GNU General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
23 */
24 
25 #ifdef HAVE_CONFIG_H
26  #include "pips_config.h"
27 #endif
28 
29 #include <stdio.h>
30 #include <string.h>
31 
32 #include "genC.h"
33 #include "linear.h"
34 #include "ri.h"
35 #include "ri-util.h"
36 #include "prettyprint.h"
37 #include "effects.h"
38 #include "effects-util.h"
39 #include "text-util.h"
40 #include "effects-simple.h"
41 #include "effects-generic.h"
42 #include "misc.h"
43 
44 #include "pointer_values.h"
45 
46 /**************** SPECIFIC INTRINSIC FUNCTIONS */
47 
48 static void assignment_intrinsic_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
49 
50 static void binary_arithmetic_operator_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
51 static void unary_arithmetic_operator_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
52 static void update_operator_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
53 static void logical_operator_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
54 static void conditional_operator_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
55 
56 
57 static void dereferencing_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
58 static void field_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
59 static void point_to_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
60 static void address_of_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
61 
62 static void c_io_function_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
63 static void unix_io_function_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
64 static void string_function_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
65 static void va_list_function_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
66 static void heap_intrinsic_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
67 //static void stop_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
68 static void c_return_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
69 
70 static void safe_intrinsic_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
71 
72 static void intrinsic_to_identical_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
73 
74 static void unknown_intrinsic_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
75 
76 static void default_intrinsic_to_post_pv(entity func, list func_args, list l_in, pv_results * pv_res, pv_context *ctxt);
77 
78 /**************** YET ANOTHER INTRINSICS TABLE */
79 
80 /* the following data structure describes an intrinsic function: its
81 name and the function to apply on a call to this intrinsic to get the
82 post pointer values of the call */
83 
84 /* These intrinsics are arranged in the order of the standard ISO/IEC 9899:TC2. MB */
85 
86 typedef struct IntrinsicDescriptor
87 {
88  string name;
91 
97 
101 
114 
116  {"ENDDO", unknown_intrinsic_to_post_pv},
122 
125 
134  {DREAL_GENERIC_CONVERSION_NAME, unknown_intrinsic_to_post_pv}, /* Added for Arnauld Leservot */
150 
182 
215 
220 
223 
225 
226  /* Fortran IO related intrinsic */
238 
241 
242  /* These operators are used within the OPTIMIZE transformation in
243  order to manipulate operators such as n-ary add and multiply or
244  multiply-add operators ( JZ - sept 98) */
248 
251 
252 
253  /* Bit manipulation F90 functions. ISO/IEC 1539 : 1991 Amira Mensi */
254 
266 
267  /* Here are C intrinsics.*/
268 
269  /* ISO 6.5.2.3 structure and union members */
272 
273  /* ISO 6.5.2.4 postfix increment and decrement operators, real or pointer type operand */
276 
277  /* ISO 6.5.3.1 prefix increment and decrement operators, real or pointer type operand */
280 
281  /* ISO 6.5.3.2 address and indirection operators, add pointer type */
284 
285  /* ISO 6.5.3.3 unary arithmetic operators */
287  // {"-unary", intrinsic_to_identical_post_pv},UNARY_MINUS_OPERATOR already exist (FORTRAN)
290 
292 
293  /* ISO 6.5.6 additive operators, arithmetic types or pointer + integer type*/
296 
297  /* ISO 6.5.7 bitwise shift operators*/
300 
301  /* ISO 6.5.8 relational operators,arithmetic or pointer types */
306 
307  /* ISO 6.5.9 equality operators, return 0 or 1*/
310 
311  /* ISO 6.5.10 bitwise AND operator */
313 
314  /* ISO 6.5.11 bitwise exclusive OR operator */
316 
317  /* ISO 6.5.12 bitwise inclusive OR operator */
319 
320  /* ISO 6.5.13 logical AND operator */
322 
323  /* ISO 6.5.14 logical OR operator */
325 
326  /* ISO 6.5.15 conditional operator */
328 
329  /* ISO 6.5.16.2 compound assignments*/
340 
341  /* ISO 6.5.17 comma operator */
343 
348 
349  /* intrinsic to handle C initialization */
350 
352 
353 
354  /* assert.h */
355  /* These intrinsics are added with intrinsic_to_identical_post_pv to work with C.
356  The real effects on aliasing must be studied !!! I do not have time for the moment */
357 
359  {ASSERT_FAIL_FUNCTION_NAME, intrinsic_to_identical_post_pv}, /* in fact, IO effect, does not return */
360 
361  /* #include <complex.h> */
428 
429  /* #include <ctype.h>*/
430 
445 
446  /* errno.h */
447  // MB: errno is usually an extern int variable, but *errno() is allowed (ISO section 7.5 in C99)
449 
450  /* fenv.h */
451 
458  // fenv_t *
459  // {FESETENV_FUNCTION_NAME, intrinsic_to_identical_post_pv},
460  //{FEUPDATEENV_FUNCTION_NAME, intrinsic_to_identical_post_pv},
461 
462 
463  /* inttypes.h */
466 
467  /* locale.h */
469  {"localeconv", intrinsic_to_identical_post_pv},
470 
471  /* #include <math.h>*/
472 
529  //frexp has a write effect not defined correctly. MB
552  //modf & modff have write effects not defined correctly. MB
558  {SCALB_OPERATOR_NAME, intrinsic_to_identical_post_pv}, /* POSIX.1-2001, The scalb function is the BSD name for ldexp */
656 
657 
658  /*#include <setjmp.h>*/
659 
660  {"setjmp", intrinsic_to_identical_post_pv},
661  {"__setjmp", intrinsic_to_identical_post_pv},
662  {"longjmp", intrinsic_to_identical_post_pv}, // control effect 7.13 in C99
663  {"__longjmp", intrinsic_to_identical_post_pv},
664  {"sigsetjmp", intrinsic_to_identical_post_pv}, //POSIX.1-2001
665  {"siglongjmp", intrinsic_to_identical_post_pv}, //POSIX.1-2001
666 
667 
668  /* signal.h 7.14 */
672 
673 
674  /* stdarg.h */
675 
679  /* va_arg is not a standard call; it is directly represented in PIPS
680  internal representation. */
681 
682  /*#include <stdio.h>*/
683  // IO functions
738 
739 
740  /* #include <stdlib.h> */
757  /* SG: I am setting an any_heap_effects for alloca, which is over pessimistic ... */
778 
779  /*#include <string.h>*/
780 
805 
806  /*#include <time.h>*/
813  {SECOND_FUNCTION_NAME, intrinsic_to_identical_post_pv}, // gfortran intrinsic
814 
815  /*#include <wchar.h>*/
819 
820  /* #include <wctype.h> */
839 
840 
841 
842  //not found in standard C99 (in GNU C Library)
843  {ISASCII_OPERATOR_NAME, intrinsic_to_identical_post_pv}, //This function is a BSD extension and is also an SVID extension.
844  {TOASCII_OPERATOR_NAME, intrinsic_to_identical_post_pv}, //This function is a BSD extension and is also an SVID extension.
845  {_TOLOWER_OPERATOR_NAME, intrinsic_to_identical_post_pv}, //This function is provided for compatibility with the SVID
846  {_TOUPPER_OPERATOR_NAME, intrinsic_to_identical_post_pv}, //This function is provided for compatibility with the SVID
847 
848  /* Part of the binary standard */
850 
851 
852 
853  {"__flt_rounds", intrinsic_to_identical_post_pv},
854 
855  {"_sysconf", intrinsic_to_identical_post_pv},
856  {"wdinit", intrinsic_to_identical_post_pv},
857  {"wdchkind", intrinsic_to_identical_post_pv},
858  {"wdbindf", intrinsic_to_identical_post_pv},
859  {"wddelim", intrinsic_to_identical_post_pv},
860  {"mcfiller", intrinsic_to_identical_post_pv},
861  {"mcwrap", intrinsic_to_identical_post_pv},
862 
863  //GNU C Library
864  {"dcgettext", intrinsic_to_identical_post_pv},
865  {"dgettext", intrinsic_to_identical_post_pv},
866  {"gettext", intrinsic_to_identical_post_pv},
867  {"textdomain", intrinsic_to_identical_post_pv},
868  {"bindtextdomain", intrinsic_to_identical_post_pv},
869 
870 
871  /* not found in C99 standard (in GNU C Library) */
872 
879 
880  //In the System V math library
882 
883  //This function exists mainly for use in certain standardized tests of IEEE 754 conformance.
885 
886  /* netdb.h not in C99 standard (in GNU library) */
888 
889  /* bits/errno.h */
891 
892 
893  //Posix LEGACY Std 1003.1
897 
898 
899  /* Random number generators in stdlib.h Conforming to SVr4, POSIX.1-2001 but not in C99 */
900 
912 
913 
914  //Posix
919 
920  //MB: not found in C99 standard. POSIX.2
945 
946  //MB: not found in C99
958  //3bsd
968 
969  /* C IO system functions in man -S 2 unistd.h */
970 
979 
989 
990 
991 
992  /* {char *getenv(const char *, 0, 0},
993  {long int labs(long, 0, 0},
994  {ldiv_t ldiv(long, long, 0, 0},*/
995 
996  /* F95 */
1001 
1002  /* F2003 */
1004 
1005  /* BSD <err.h> */
1006  /* SG: concerning the err* family of functions, they also exit() from the program
1007  * This is not represented in the EXIT_FUNCTION_NAME description, so neither it is here
1008  * but it seems an error to me */
1017 
1018  /*Conforming to 4.3BSD, POSIX.1-2001.*/
1019  /* POSIX.1-2001 declares this function obsolete; use nanosleep(2) instead.*/
1020  /*POSIX.1-2008 removes the specification of usleep()*/
1022 
1023  /* _POSIX_C_SOURCE >= 199309L */
1025 
1026  /* {int mblen(const char *, size_t, 0, 0},
1027  {size_t mbstowcs(wchar_t *, const char *, size_t, 0, 0},
1028  {int mbtowc(wchar_t *, const char *, size_t, 0, 0},
1029  {void qsort(void *, size_t, size_t,
1030  int (*)(const void *, const void *), 0, 0},
1031  {int rand(void, 0, 0},
1032  {void *realloc(void *, size_t, 0, 0},
1033  {void srand(unsigned int, 0, 0},
1034  {double strtod(const char *, char **, 0, 0},
1035  {long int strtol(const char *, char **, int, 0, 0},
1036  {unsigned long int strtoul(const char *, char **, int, 0, 0},
1037  {int system(const char *, 0, 0},
1038  {int wctomb(char *, wchar_t, 0, 0},
1039  {size_t wcstombs(char *, const wchar_t *, size_t, 0, 0},
1040  {void _exithandle(void, 0, 0},
1041  {double drand48(void, 0, 0},
1042  {double erand48(unsigned short *, 0, 0},
1043  {long jrand48(unsigned short *, 0, 0},
1044  {void lcong48(unsigned short *, 0, 0},
1045  {long lrand48(void, 0, 0},
1046  {long mrand48(void, 0, 0},
1047  {long nrand48(unsigned short *, 0, 0},
1048  {unsigned short *seed48(unsigned short *, 0, 0},
1049  {void srand48(long, 0, 0},
1050  {int putenv(char *, 0, 0},
1051  {void setkey(const char *, 0, 0},
1052  {void swab(const char *, char *, ssize_t, 0, 0},
1053  {int mkstemp(char *, 0, 0},
1054  {int mkstemp64(char *, 0, 0},
1055  {long a64l(const char *, 0, 0},
1056  {char *ecvt(double, int, int *, int *, 0, 0},
1057  {char *fcvt(double, int, int *, int *, 0, 0},
1058  {char *gcvt(double, int, char *, 0, 0},
1059  {int getsubopt(char **, char *const *, char **, 0, 0},
1060  {int grantpt(int, 0, 0},
1061  {char *initstate(unsigned, char *, size_t, 0, 0},
1062  {char *l64a(long, 0, 0},
1063  {char *mktemp(char *, 0, 0},
1064  {char *ptsname(int, 0, 0},
1065  {long random(void, 0, 0},
1066  {char *realpath(const char *, char *, 0, 0},
1067  {char *setstate(const char *, 0, 0},
1068  {void srandom(unsigned, 0, 0},
1069  {int ttyslot(void, 0, 0},
1070  {int unlockpt(int, 0, 0},
1071  {void *valloc(size_t, 0, 0},
1072  {int dup2(int, int, 0, 0},
1073  {char *qecvt(long double, int, int *, int *, 0, 0},
1074  {char *qfcvt(long double, int, int *, int *, 0, 0},
1075  {char *qgcvt(long double, int, char *, 0, 0},
1076  {char *getcwd(char *, size_t, 0, 0},
1077  {const char *getexecname(void, 0, 0},
1078  {char *getlogin(void, 0, 0},
1079  {int getopt(int, char *const *, const char *, 0, 0},
1080  {char *optarg;
1081  {int optind, opterr, optopt;
1082  {char *getpass(const char *, 0, 0},
1083  {char *getpassphrase(const char *, 0, 0},
1084  {int getpw(uid_t, char *, 0, 0},
1085  {int isatty(int, 0, 0},
1086  {void *memalign(size_t, size_t, 0, 0},
1087  {char *ttyname(int, 0, 0},
1088  {long long atoll(const char *, 0, 0},
1089  {long long llabs(long long, 0, 0},
1090  {lldiv_t lldiv(long long, long long, 0, 0},
1091  {char *lltostr(long long, char *, 0, 0},
1092  {long long strtoll(const char *, char **, int, 0, 0},
1093  {unsigned long long strtoull(const char *, char **, int, 0, 0},
1094  {char *ulltostr(unsigned long long, char *, 0, 0},*/
1095  {NULL, 0}
1096 };
1097 
1098 /******************************************/
1099 
1101  list func_args,
1102  list l_in, pv_results * pv_res,
1103  pv_context *ctxt)
1104 {
1105  expression lhs = EXPRESSION(CAR(func_args));
1106  expression rhs = EXPRESSION(CAR(CDR(func_args)));
1107  assignment_to_post_pv(lhs, false, rhs, false, l_in, pv_res, ctxt);
1108 }
1109 
1111  list l_in, pv_results * pv_res,
1112  pv_context *ctxt)
1113 {
1114  list l_in_cur;
1115 
1116  pips_debug(1, "begin\n");
1117 
1118  pv_results pv_res1 = make_pv_results();
1119  expression arg1 = EXPRESSION(CAR(func_args));
1120  expression_to_post_pv(arg1, l_in, &pv_res1, ctxt);
1121 
1122  l_in_cur = pv_res1.l_out;
1123  if (l_in != l_in_cur) gen_full_free_list(l_in);
1124 
1125  pv_results pv_res2 = make_pv_results();
1126  expression arg2 = EXPRESSION(CAR(CDR(func_args)));
1127  expression_to_post_pv(arg2, l_in_cur, &pv_res2, ctxt);
1128  if (pv_res2.l_out != l_in_cur) gen_full_free_list(l_in_cur);
1129 
1130 
1131  type t1 = expression_to_type(arg1);
1132  bool pointer_t1 = pointer_type_p(t1);
1133  bool array_t1 = array_type_p(t1);
1134  pips_debug(5, "type t1 is: %s (%s)\n", string_of_type(t1),
1135  type_to_string(t1));
1136 
1137  type t2 = expression_to_type(arg2);
1138  bool pointer_t2 = pointer_type_p(t2);
1139  bool array_t2 = array_type_p(t2);
1140  pips_debug(5, "type t2 is: %s (%s)\n", string_of_type(t2),
1141  type_to_string(t2));
1142 
1143  int nb_dims = 0;
1144 
1145  const char* func_name = entity_local_name(func);
1146 
1147  /* From ISO/IEC 9899:TC3 :
1148 
1149  - For addition, either both operands shall have arithmetic type,
1150  or one operand shall be a pointer to an object type and the other
1151  shall have integer type.
1152 
1153  - For substraction, one of the following shall hold :
1154 
1155  - both operands have arithmetic types
1156  - both operands are pointers to qualified or unqualified versions of
1157  compatible object types;
1158  (in this case, both pointers shall point to elements of the same array object,
1159  or one past the last element of the array object; the result is the difference
1160  of the subscripts of the two array elements)
1161  (as a consequence the result is not of a pointer type)
1162  - the left operand is a pointer to an object type and the right operand has
1163  integer type
1164  */
1165  list l_eff1 = pv_res1.result_paths;
1166  list l_eff2 = pv_res2.result_paths;
1167 
1168  bool pointer_arithmetic = false;
1169  list l_eff_pointer = NIL;
1170  expression other_arg = expression_undefined;
1171 
1172  if ((pointer_t1 || array_t1) && !(pointer_t2 || array_t2))
1173  /* pointer arithmetic, the pointer is in the first expression */
1174  {
1175  pointer_arithmetic = true;
1176  l_eff_pointer = l_eff1;
1177  other_arg = arg2;
1178  nb_dims = pointer_t1 ? 1 : gen_length(variable_dimensions(type_variable(t1)));
1179  }
1180  else if ((pointer_t2 || array_t2) && !(pointer_t1 || array_t1))
1181  {
1182  pointer_arithmetic = true;
1183  l_eff_pointer = l_eff2;
1184  other_arg = arg1;
1185  nb_dims = pointer_t2 ? 1 : gen_length(variable_dimensions(type_variable(t2)));
1186  }
1187  free_type(t1);
1188  free_type(t2);
1189 
1190  if (pointer_arithmetic)
1191  {
1192  free_pv_results_paths(pv_res);
1193  if (!anywhere_effect_p(EFFECT(CAR(l_eff_pointer))))
1194  {
1195  /* build new effects */
1196  list l_new_eff = NIL;
1197  list l_new_eff_kind = NIL;
1198 
1199  if (nb_dims == 1)
1200  {
1201 
1202  pips_debug(3, "one dimension case\n");
1203  expression new_arg = copy_expression(other_arg);
1204 
1205  if (same_string_p(func_name, MINUS_C_OPERATOR_NAME))
1206  {
1207  entity unary_minus_ent =
1210  entity_domain);
1211  new_arg = MakeUnaryCall(unary_minus_ent, new_arg);
1212  }
1213 
1214  FOREACH(EFFECT, eff, l_eff_pointer)
1215  {
1216  effect new_eff = copy_effect(eff);
1217  reference new_ref = effect_any_reference(new_eff);
1218  list l_inds = reference_indices(new_ref);
1219  if (ENDP(l_inds))
1220  {
1221  // functions that can be pointed by effect_add_expression_dimension_func:
1222  // simple_effect_add_expression_dimension
1223  // convex_region_add_expression_dimension
1224  (*effect_add_expression_dimension_func)(new_eff, new_arg);
1225  }
1226  else
1227  {
1228  expression last_exp = EXPRESSION(CAR(gen_last(l_inds)));
1231  entity_domain);
1232  new_arg = MakeBinaryCall(binary_plus_ent, copy_expression(last_exp), new_arg);
1233  // functions that can be pointed by effect_change_ith_dimension_expression_func:
1234  // simple_effect_change_ith_dimension_expression
1235  // convex_region_change_ith_dimension_expression
1236  (*effect_change_ith_dimension_expression_func)(new_eff, new_arg, (int) gen_length(l_inds));
1237  }
1238  l_new_eff = CONS(EFFECT, new_eff, l_new_eff);
1239  l_new_eff_kind = CONS(CELL_INTERPRETATION,
1241  }
1242  free_expression(new_arg);
1243 
1244  }
1245  else
1246  {
1247  pips_debug(3, "several dimensions (%d) case\n", nb_dims);
1248 
1249  // we could do more work to be more precise
1251  FOREACH(EFFECT, eff, l_eff_pointer)
1252  {
1253  effect new_eff = copy_effect(eff);
1254 
1255  for(int i = 1; i <= nb_dims; i++) {
1256  // functions that can be pointed by effect_add_expression_dimension_func:
1257  // simple_effect_add_expression_dimension
1258  // convex_region_add_expression_dimension
1259  (*effect_add_expression_dimension_func)(new_eff, copy_expression(new_ind));
1260  }
1261  l_new_eff = CONS(EFFECT, new_eff, l_new_eff);
1262  l_new_eff_kind = CONS(CELL_INTERPRETATION,
1264  }
1265  free_expression(new_ind);
1266  }
1267  gen_nreverse(l_new_eff);
1268  gen_nreverse(l_new_eff_kind);
1269  pv_res->result_paths = l_new_eff;
1270  pv_res->result_paths_interpretations = l_new_eff_kind;
1271  }
1272  }
1273  pv_res->l_out = pv_res2.l_out;
1274  free_pv_results_paths(&pv_res1);
1275  free_pv_results_paths(&pv_res2);
1276  pips_debug_pv_results(1, "end with pv_res =\n", *pv_res);
1277 }
1278 
1280  list func_args,
1281  list l_in, pv_results * pv_res,
1282  pv_context *ctxt)
1283 {
1284  expression arg = EXPRESSION(CAR(func_args));
1285  expression_to_post_pv(arg, l_in, pv_res, ctxt);
1286  ifdebug(1)
1287  {
1288  type t = expression_to_type(arg);
1289  pips_assert("unary arithmetic operators should not have pointer arguments",
1290  !pointer_type_p(t));
1291  free_type(t);
1292  }
1293 }
1294 
1295 static void update_operator_to_post_pv(entity func, list func_args, list l_in,
1296  pv_results * pv_res, pv_context *ctxt)
1297 {
1298  pips_debug(1, "begin for update operator\n");
1299 
1300  expression arg = EXPRESSION(CAR(func_args));
1301  expression_to_post_pv(arg, l_in, pv_res, ctxt);
1302  list l_in_cur = pv_res->l_out;
1303  if (l_in != l_in_cur) gen_full_free_list(l_in);
1304 
1305  type t = expression_to_type(arg);
1306  if (pointer_type_p(t))
1307  {
1308  list l_lhs_eff = pv_res->result_paths;
1309  //list l_lhs_kind = pv_res->result_paths_interpretations;
1310  const char* func_name = entity_local_name(func);
1311 
1312  pips_assert("update operators admit a single path\n",
1313  gen_length(l_lhs_eff) == (size_t) 1);
1314 
1315  effect lhs_eff = EFFECT(CAR(l_lhs_eff));
1316  effect rhs_eff = copy_effect(lhs_eff);
1318  NIL);
1319 
1320  if (!anywhere_effect_p(lhs_eff))
1321  {
1322  /* build rhs */
1323  expression new_dim = expression_undefined;
1324 
1327  {
1328  new_dim = int_to_expression(1);
1329  }
1330  else if (same_string_p(func_name, POST_DECREMENT_OPERATOR_NAME)
1332  {
1333  new_dim = int_to_expression(-1);
1334  }
1335  else
1336  //pips_internal_error("unexpected update operator on pointers");
1337  new_dim = make_unbounded_expression();
1338 
1339  // functions that can be pointed by effect_add_expression_dimension_func:
1340  // simple_effect_add_expression_dimension
1341  // convex_region_add_expression_dimension
1342  (*effect_add_expression_dimension_func)(rhs_eff, new_dim);
1343  /*l_lhs_kind = CONS(CELL_INTERPRETATION, make_cell_interpretation_address_of(),
1344  NIL);*/
1345  }
1346  list l_rhs_eff = CONS(EFFECT, rhs_eff, NIL);
1347  single_pointer_assignment_to_post_pv(lhs_eff, l_rhs_eff, l_rhs_kind, false,
1348  l_in_cur, pv_res, ctxt);
1349  }
1350  pips_debug_pv_results(1, "end with pv_res:\n", *pv_res);
1351 }
1352 
1354  list func_args, list l_in,
1355  pv_results *pv_res, pv_context *ctxt)
1356 {
1357  expression e1 = EXPRESSION(CAR(func_args));
1358  expression e2 = EXPRESSION(CAR(CDR(func_args)));
1359  pv_results pv_res1 = make_pv_results();
1360 
1361  /* If it is a pure logical operator (&& or ||), there is a
1362  sequence point just after the evaluation of the first operand
1363  so we must evaluate the second operand in the memory store
1364  resulting from the evaluation of the first operand.
1365  If it's a relational operator, the evaluation order is not important,
1366  so let's do the same !
1367  */
1368  /* first operand */
1369  expression_to_post_pv(e1, l_in, &pv_res1, ctxt);
1370  list l_in_cur = pv_res1.l_out;
1371  if (l_in != l_in_cur) gen_full_free_list(l_in);
1372  free_pv_results_paths(&pv_res1);
1373 
1374  /* second operand */
1375  expression_to_post_pv(e2, l_in_cur, pv_res, ctxt);
1376  free_pv_results_paths(pv_res);
1377  /* the resulting path of a relational expression is not a pointer value */
1378  pv_res->result_paths = NIL;
1380 }
1381 
1383  list func_args, list l_in,
1384  pv_results * pv_res, pv_context *ctxt)
1385 {
1386  pips_debug(1, "begin for conditional operator\n");
1387 
1388  expression t_cond = EXPRESSION(CAR(func_args));
1389  POP(func_args);
1390  expression t_true = EXPRESSION(CAR(func_args));
1391  POP(func_args);
1392  expression t_false = EXPRESSION(CAR(func_args));
1393 
1394  pv_results pv_res_cond = make_pv_results();
1395  expression_to_post_pv(t_cond, l_in, &pv_res_cond, ctxt);
1396 
1397  list l_in_branches = pv_res_cond.l_out;
1398 
1399  pv_results pv_res_true = make_pv_results();
1400  list l_in_true = gen_full_copy_list(l_in_branches);
1401  expression_to_post_pv(t_true, l_in_true, &pv_res_true, ctxt);
1402  if (pv_res_true.l_out != l_in_true) gen_full_free_list(l_in_true);
1403 
1404  pv_results pv_res_false = make_pv_results();
1405  list l_in_false = gen_full_copy_list(l_in_branches);
1406  expression_to_post_pv(t_false, l_in_false, &pv_res_false, ctxt);
1407  if (pv_res_false.l_out != l_in_false) gen_full_free_list(l_in_false);
1408 
1409 
1410  pv_res->l_out = (*ctxt->pvs_may_union_func)(pv_res_true.l_out,
1411  gen_full_copy_list(pv_res_false.l_out));
1412 
1413  /* well, it should be a union, but there may not be such stupid things as (..)? a:a;
1414  I cannot use the effects test union operator because I must also merge
1415  interpretations */
1416  pv_res->result_paths = gen_nconc(pv_res_true.result_paths, pv_res_false.result_paths);
1420  pv_res_false.result_paths_interpretations);
1421 
1422  pips_debug_pv_results(1, "end with pv_results =\n", *pv_res);
1423  pips_debug(1, "end\n");
1424 
1425 }
1426 
1427 
1428 
1429 static void dereferencing_to_post_pv(entity __attribute__ ((unused))func, list func_args,
1430  list l_in, pv_results * pv_res, pv_context *ctxt)
1431 {
1432  expression_to_post_pv(EXPRESSION(CAR(func_args)), l_in, pv_res, ctxt);
1433  list l_eff_ci = pv_res->result_paths_interpretations;
1434  FOREACH(EFFECT, eff, pv_res->result_paths)
1435  {
1439  else
1441  POP(l_eff_ci);
1442  }
1443 }
1444 
1445 static void field_to_post_pv(entity __attribute__ ((unused))func, list func_args,
1446  list l_in, pv_results * pv_res, pv_context *ctxt)
1447 {
1448  expression e2 = EXPRESSION(CAR(CDR(func_args)));
1449  syntax s2 = expression_syntax(e2);
1450  reference r2 = syntax_reference(s2);
1451  entity f = reference_variable(r2);
1452 
1453  pips_assert("e2 is a reference", syntax_reference_p(s2));
1454  pips_debug(4, "It's a field operator\n");
1455 
1456  expression_to_post_pv(EXPRESSION(CAR(func_args)), l_in, pv_res, ctxt);
1457  FOREACH(EFFECT, eff, pv_res->result_paths)
1458  {
1460  }
1461 }
1462 
1463 static void point_to_to_post_pv(entity __attribute__ ((unused))func, list func_args,
1464  list l_in, pv_results * pv_res, pv_context *ctxt)
1465 {
1466  expression e2 = EXPRESSION(CAR(CDR(func_args)));
1467  syntax s2 = expression_syntax(e2);
1468  entity f;
1469 
1470  pips_assert("e2 is a reference", syntax_reference_p(s2));
1472 
1473  pips_debug(4, "It's a point to operator\n");
1474  expression_to_post_pv(EXPRESSION(CAR(func_args)), l_in, pv_res, ctxt);
1475 
1476  FOREACH(EFFECT, eff, pv_res->result_paths)
1477  {
1478  /* We add a dereferencing */
1480  /* we add the field dimension */
1482  }
1483 }
1484 
1485 static void address_of_to_post_pv(entity __attribute__ ((unused))func, list func_args,
1486  list l_in, pv_results * pv_res, pv_context *ctxt)
1487 {
1488  expression_to_post_pv(EXPRESSION(CAR(func_args)), l_in, pv_res, ctxt);
1490  {
1492  }
1493 }
1494 
1495 static void c_io_function_to_post_pv(entity func, list func_args, list l_in,
1496  pv_results * pv_res, pv_context *ctxt)
1497 {
1498  const char* func_name = entity_local_name(func);
1499  list general_args = NIL;
1500  bool free_general_args = false;
1501  list l_in_cur = l_in;
1502 
1503  /* first argument is a FILE* */
1504  if (same_string_p(func_name,FCLOSE_FUNCTION_NAME)
1505  || same_string_p(func_name,FPRINTF_FUNCTION_NAME)
1506  || same_string_p(func_name,FSCANF_FUNCTION_NAME)
1508  || same_string_p(func_name,VFSCANF_FUNCTION_NAME)
1510  || same_string_p(func_name,FGETC_FUNCTION_NAME)
1511  || same_string_p(func_name,GETC_FUNCTION_NAME)
1513  || same_string_p(func_name,FGETPOS_FUNCTION_NAME)
1514  || same_string_p(func_name,FSEEK_FUNCTION_NAME)
1515  || same_string_p(func_name,FSETPOS_FUNCTION_NAME)
1516  || same_string_p(func_name,FTELL_FUNCTION_NAME)
1519  || same_string_p(func_name,FEOF_FUNCTION_NAME)
1520  || same_string_p(func_name,FERROR_FUNCTION_NAME))
1521  {
1522  general_args = CDR(func_args);
1523  }
1524  /* last argument is a FILE* */
1525  else if (same_string_p(func_name,FGETS_FUNCTION_NAME)
1526  || same_string_p(func_name,FPUTC_FUNCTION_NAME)
1527  || same_string_p(func_name,FPUTS_FUNCTION_NAME)
1528  || same_string_p(func_name,PUTC_FUNCTION_NAME)
1530  || same_string_p(func_name,UNGETC_FUNCTION_NAME)
1531  || same_string_p(func_name,FREAD_FUNCTION_NAME)
1532  || same_string_p(func_name,FWRITE_FUNCTION_NAME))
1533  {
1534  for(; !ENDP(CDR(func_args)); POP(func_args))
1535  {
1536  general_args = CONS(EXPRESSION, EXPRESSION(CAR(func_args)), general_args);
1537  }
1538  free_general_args = true;
1539  }
1540 
1541  /* we assume that there is no effects on aliasing due to FILE* argument if any */
1542 
1543  safe_intrinsic_to_post_pv(func, general_args, l_in_cur, pv_res, ctxt);
1544 
1545  if (free_general_args)
1546  gen_free_list(general_args);
1547 }
1548 
1549 static void unix_io_function_to_post_pv(entity func, list func_args, list l_in,
1550  pv_results * pv_res, pv_context *ctxt)
1551 {
1552  safe_intrinsic_to_post_pv(func, func_args, l_in, pv_res, ctxt);
1553 }
1554 
1555 static void string_function_to_post_pv(entity func, list func_args, list l_in,
1556  pv_results * pv_res, pv_context *ctxt)
1557 {
1558  safe_intrinsic_to_post_pv(func, func_args, l_in, pv_res, ctxt);
1559 }
1560 
1561 static void va_list_function_to_post_pv(entity func, list func_args, list l_in,
1562  pv_results * pv_res, pv_context *ctxt)
1563 {
1564  safe_intrinsic_to_post_pv(func, func_args, l_in, pv_res, ctxt);
1565 }
1566 
1567 
1568 static void free_to_post_pv(list l_free_eff, list l_in,
1569  pv_results * pv_res, pv_context *ctxt)
1570 {
1571  pips_debug_effects(5, "begin with input effects :\n", l_free_eff);
1572 
1573  FOREACH(EFFECT, eff, l_free_eff)
1574  {
1575  /* for each freed pointer, find it's targets */
1576 
1577  list l_remnants = NIL;
1578  cell_relation exact_eff_pv = cell_relation_undefined;
1579  list l_values = NIL;
1580 
1581  pips_debug_effect(4, "begin, looking for an exact target for eff:\n",
1582  eff);
1583 
1584  l_values = effect_find_equivalent_pointer_values(eff, l_in,
1585  &exact_eff_pv,
1586  &l_remnants);
1587  pips_debug_pvs(3, "l_values:\n", l_values);
1588  pips_debug_pvs(3, "l_remnants:\n", l_remnants);
1589  pips_debug_pv(3, "exact_eff_pv:\n", exact_eff_pv);
1590 
1591  list l_heap_eff = NIL;
1592 
1593  if (exact_eff_pv != cell_relation_undefined)
1594  {
1595  cell heap_c = cell_undefined;
1596  /* try to find the heap location */
1597  cell c1 = cell_relation_first_cell(exact_eff_pv);
1599 
1600  cell c2 = cell_relation_second_cell(exact_eff_pv);
1602 
1604  heap_c = c1;
1606  heap_c = c2;
1607  if (!cell_undefined_p(heap_c))
1608  l_heap_eff =
1609  CONS(EFFECT,
1610  make_effect(copy_cell(heap_c),
1614  NIL);
1615  else
1616  {
1617  /* try to find the heap target in remants */
1618  cell other_c = cell_undefined;
1619  if (same_entity_p(effect_entity(eff), e1))
1620  other_c = c2;
1621  else other_c = c1;
1622  list l_tmp =
1623  CONS(EFFECT,
1624  make_effect(copy_cell(other_c),
1628  NIL);
1629  free_to_post_pv(l_tmp, l_remnants, pv_res, ctxt);
1630  pv_res->l_out = CONS(CELL_RELATION,
1631  copy_cell_relation(exact_eff_pv),
1632  pv_res->l_out);
1633  gen_free_list(l_tmp);
1634  return;
1635  }
1636  }
1637  else
1638  {
1639  /* try first to find another target */
1640  FOREACH(CELL_RELATION, pv_tmp, l_values) {
1641  cell heap_c = cell_undefined;
1642  /* try to find the heap location */
1643  cell c1 = cell_relation_first_cell(pv_tmp);
1645 
1646  cell c2 = cell_relation_second_cell(pv_tmp);
1648 
1650  heap_c = c1;
1652  heap_c = c2;
1653  if (!cell_undefined_p(heap_c))
1654  l_heap_eff =
1655  CONS(EFFECT,
1656  make_effect(copy_cell(heap_c),
1658  cell_relation_exact_p(pv_tmp)
1660  (effect_approximation(eff))
1663  NIL);
1664 
1665  }
1666  }
1667 
1668  if (!ENDP(l_heap_eff))
1669  {
1670  /* assign an undefined_value to freed pointer */
1671  list l_rhs =
1672  CONS(EFFECT,
1677  NIL);
1678  list l_kind = CONS(CELL_INTERPRETATION,
1680  NIL);
1681  single_pointer_assignment_to_post_pv(eff, l_rhs, l_kind,
1682  false, l_in, pv_res, ctxt);
1683  gen_full_free_list(l_rhs);
1684  gen_full_free_list(l_kind);
1685  free_pv_results_paths(pv_res);
1686  if (l_in != pv_res->l_out)
1687  {
1688  gen_full_free_list(l_in);
1689  l_in = pv_res->l_out;
1690  }
1691  pips_debug_pvs(5, "l_in after assigning "
1692  "undefined value to freed pointer:\n",
1693  l_in);
1694 
1695  FOREACH(EFFECT, heap_eff, l_heap_eff)
1696  {
1697  entity heap_e =
1699  pips_debug(5, "heap entity found (%s)\n", entity_name(heap_e));
1700 
1702  effect_may_p(eff)
1703  || effect_may_p(heap_eff),
1704  l_in,
1705  pv_res, ctxt);
1706  l_in= pv_res->l_out;
1707  }
1708  }
1709  else /* no flow or context sensitive variable found */
1710  {
1711  list l_rhs =
1712  CONS(EFFECT,
1717  NIL);
1718  list l_kind = CONS(CELL_INTERPRETATION,
1720  NIL);
1721  single_pointer_assignment_to_post_pv(eff, l_rhs, l_kind,
1722  false, l_in, pv_res, ctxt);
1723  gen_full_free_list(l_rhs);
1724  gen_full_free_list(l_kind);
1725  free_pv_results_paths(pv_res);
1726  if (l_in != pv_res->l_out)
1727  {
1728  gen_full_free_list(l_in);
1729  l_in = pv_res->l_out;
1730  }
1731  pips_debug_pvs(5, "l_in after assigning "
1732  "undefined value to freed pointer:\n",
1733  l_in);
1734  }
1735 
1736  } /* FOREACH */
1737  pips_debug_pvs(5, "end with pv_res->l_out:", pv_res->l_out);
1738 }
1739 
1740 static void heap_intrinsic_to_post_pv(entity func, list func_args, list l_in,
1741  pv_results * pv_res, pv_context *ctxt)
1742 {
1743  const char* func_name = entity_local_name(func);
1744  expression malloc_arg = expression_undefined;
1745  bool free_malloc_arg = false;
1746  list l_in_cur = l_in;
1747 
1748 
1749  /* free the previously allocated path if need be */
1750  if (same_string_p(func_name, FREE_FUNCTION_NAME)
1751  || same_string_p(func_name, REALLOC_FUNCTION_NAME))
1752  {
1753  expression free_ptr_exp = EXPRESSION(CAR(func_args));
1754 
1755  pv_results pv_res_arg = make_pv_results();
1756  expression_to_post_pv(free_ptr_exp, l_in_cur, &pv_res_arg, ctxt);
1757  if (pv_res_arg.l_out != l_in_cur)
1758  {
1759  gen_full_free_list(l_in_cur);
1760  l_in_cur = pv_res_arg.l_out;
1761  }
1762  free_to_post_pv(pv_res_arg.result_paths, l_in_cur, pv_res, ctxt);
1763  l_in_cur = pv_res->l_out;
1764  }
1765 
1766  /* Then retrieve the allocated path if any */
1767  if(same_string_p(func_name, MALLOC_FUNCTION_NAME))
1768  {
1769  malloc_arg = EXPRESSION(CAR(func_args));
1770  }
1771  else if(same_string_p(func_name, CALLOC_FUNCTION_NAME))
1772  {
1773  malloc_arg =
1774  make_op_exp("*",
1775  copy_expression(EXPRESSION(CAR(func_args))),
1776  copy_expression(EXPRESSION(CAR(CDR(func_args)))));
1777  free_malloc_arg = true;
1778  }
1779  else if (same_string_p(func_name, REALLOC_FUNCTION_NAME))
1780  {
1781  malloc_arg = EXPRESSION(CAR(CDR(func_args)));
1782  }
1783  else if (same_string_p(func_name, STRDUP_FUNCTION_NAME))
1784  {
1785  malloc_arg = MakeBinaryCall(
1787  int_to_expression(1),
1788  MakeUnaryCall(
1790  copy_expression(EXPRESSION(CAR(func_args)))
1791  )
1792  );
1793  free_malloc_arg = true;
1794  }
1795 
1796  if (!expression_undefined_p(malloc_arg))
1797  {
1798 
1799  /* first, impact of argument evaluation on pointer values */
1800  pv_results pv_res_arg = make_pv_results();
1801  expression_to_post_pv(malloc_arg, l_in_cur, &pv_res_arg, ctxt);
1802  free_pv_results_paths(&pv_res_arg);
1803  if (pv_res_arg.l_out != l_in_cur)
1804  {
1805  gen_full_free_list(l_in_cur);
1806  l_in_cur = pv_res_arg.l_out;
1807  }
1808 
1812  NIL);
1813  entity e = malloc_to_abstract_location(malloc_arg, &si);
1814 
1819 
1820  if (!entity_all_heap_locations_p(e) &&
1822  {
1823  if (!entity_scalar_p(e))
1824  effect_add_dereferencing_dimension(eff); // well, in fact, it's a [0] array dimension!
1825  }
1826  else
1827  effect_to_may_effect(eff);
1828  pv_res->result_paths = CONS(EFFECT, eff, NIL);
1832  NIL);
1833  if (free_malloc_arg)
1834  free_expression(malloc_arg);
1835  }
1836 
1837  pv_res->l_out = l_in_cur;
1838 }
1839 
1840 #if 0
1841 static void stop_to_post_pv(entity __attribute__ ((unused))func, list func_args,
1842  list l_in, pv_results * pv_res, pv_context *ctxt)
1843 {
1844  /* The call is never returned from. No information is available
1845  for the dead code that follows.
1846  */
1847  pv_res->l_out = NIL;
1848  pv_res->result_paths = NIL;
1850 }
1851 #endif
1852 
1853 static void c_return_to_post_pv(entity __attribute__ ((unused)) func, list func_args,
1854  list l_in, pv_results * pv_res, pv_context *ctxt)
1855 {
1856  /* but we have to evaluate the impact
1857  of the argument evaluation on pointer values
1858  eliminate local variables, retrieve the value of the returned pointer if any...
1859  */
1860  if (!ENDP(func_args))
1861  expression_to_post_pv(EXPRESSION(CAR(func_args)), l_in, pv_res, ctxt);
1862 }
1863 
1864 static void safe_intrinsic_to_post_pv(entity __attribute__ ((unused)) func,
1865  list func_args, list l_in,
1866  pv_results * pv_res, pv_context *ctxt)
1867 {
1868  /* first assume that all pointers reachable from arguments are written and set to
1869  anywhere */
1870  /* this should be quickly refined */
1872  NIL);
1873  list l_rhs_kind = CONS(CELL_INTERPRETATION,
1875 
1876  pips_debug(1, "begin\n");
1877 
1878  if (!ENDP(func_args))
1879  {
1880  list lw = NIL;
1881  list l_in_cur = l_in;
1882  FOREACH(EXPRESSION, arg, func_args)
1883  {
1884  pv_results pv_res_arg = make_pv_results();
1885  expression_to_post_pv(arg, l_in_cur, &pv_res_arg, ctxt);
1886  free_pv_results_paths(&pv_res_arg);
1887  if (pv_res_arg.l_out != l_in_cur)
1888  {
1889  //gen_full_free_list(l_in_cur);
1890  l_in_cur = pv_res_arg.l_out;
1891  }
1892  /* well this is not safe in case of arguments with external function calls
1893  I should use the result paths of pv_res_arg, but there is a lot of work
1894  done in c_actual_argument_to_may_ summary_effect about arrays, and I'm not
1895  sure expression_to_post_pv does the same job
1896  */
1898  }
1899 
1900  pips_debug_effects(3, "effects to be killed: \n", lw);
1901 
1902  /* assume all pointers now point to anywhere */
1903 
1904  FOREACH(EFFECT, eff, lw)
1905  {
1906  bool to_be_freed = false;
1907  type t = cell_to_type(effect_cell(eff), &to_be_freed);
1908  if (pointer_type_p(t))
1909  {
1911  l_anywhere_eff, l_rhs_kind,
1912  false, l_in_cur,
1913  pv_res, ctxt);
1914  if (pv_res->l_out != l_in_cur)
1915  {
1916  gen_full_free_list(l_in_cur);
1917  l_in_cur = pv_res->l_out;
1918  }
1919  free_pv_results_paths(pv_res);
1920  }
1921  if (to_be_freed) free_type(t);
1922  }
1923  pv_res->l_out = l_in_cur;
1924  }
1925  else
1926  pv_res->l_out = l_in;
1927  /* then retrieve the return value type to set pv_res->result_paths */
1928  /* if it is a pointer type, set it to anywhere for the moment
1929  specific work should be done for each intrinsic
1930  */
1931  pv_res->result_paths = l_anywhere_eff;
1932  pv_res->result_paths_interpretations = l_rhs_kind;
1933 
1934  pips_debug_pv_results(1, "ending with pv_res:", *pv_res);
1935 
1936 }
1937 
1939  list __attribute__ ((unused)) func_args,
1940  list l_in, pv_results * pv_res, pv_context __attribute__ ((unused)) *ctxt)
1941 {
1942  pv_res->l_out = l_in;
1943 }
1944 
1946  list __attribute__ ((unused)) func_args,
1947  list __attribute__ ((unused)) l_in,
1948  pv_results __attribute__ ((unused)) *pv_res,
1949  pv_context __attribute__ ((unused)) *ctxt)
1950 {
1951  pips_internal_error("not a C intrinsic");
1952 }
1953 
1955  list func_args, list l_in,
1956  pv_results * pv_res, pv_context *ctxt)
1957 {
1958  list l_in_cur = l_in;
1959  FOREACH(EXPRESSION, arg, func_args)
1960  {
1961  /* free the result paths of the previous expression evaluation */
1962  free_pv_results_paths(pv_res);
1963  expression_to_post_pv(arg, l_in_cur, pv_res, ctxt);
1964  l_in_cur = pv_res->l_out;
1965  }
1966 }
1967 
1968 
1969 void intrinsic_to_post_pv(entity func, list func_args, list l_in,
1970  pv_results * pv_res, pv_context *ctxt)
1971 {
1972  const char* func_name = entity_local_name(func);
1973  pips_debug(1, "begin for %s\n", func_name);
1974 
1976 
1977  while (pid->name != NULL)
1978  {
1979  if (strcmp(pid->name, func_name) == 0)
1980  {
1981  (*(pid->to_post_pv_function))(func, func_args, l_in, pv_res, ctxt);
1982  pips_debug_pv_results(2, "resulting pv_res:", *pv_res);
1983  pips_debug(1, "end\n");
1984  return;
1985  }
1986  pid += 1;
1987  }
1988 
1989  pips_internal_error("unknown intrinsic %s", func_name);
1990  pips_debug(1, "end\n");
1991  return;
1992 }
1993 
float a2sf[2] __attribute__((aligned(16)))
USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.
Definition: 3dnow.h:3
cell make_cell_reference(reference _field_)
Definition: effects.c:293
cell_interpretation make_cell_interpretation_value_of(void)
Definition: effects.c:237
cell_interpretation make_cell_interpretation_address_of(void)
Definition: effects.c:240
approximation make_approximation_exact(void)
Definition: effects.c:185
approximation copy_approximation(approximation p)
APPROXIMATION.
Definition: effects.c:132
approximation make_approximation_may(void)
Definition: effects.c:179
effect make_effect(cell a1, action a2, approximation a3, descriptor a4)
Definition: effects.c:484
cell_relation copy_cell_relation(cell_relation p)
CELL_RELATION.
Definition: effects.c:305
effect copy_effect(effect p)
EFFECT.
Definition: effects.c:448
descriptor make_descriptor_none(void)
Definition: effects.c:442
cell copy_cell(cell p)
CELL.
Definition: effects.c:246
expression copy_expression(expression p)
EXPRESSION.
Definition: ri.c:850
reference make_reference(entity a1, list a2)
Definition: ri.c:2083
void free_expression(expression p)
Definition: ri.c:853
void free_type(type p)
Definition: ri.c:2658
sensitivity_information make_sensitivity_information(statement current_stmt, entity current_module, list enclosing_flow)
entity malloc_to_abstract_location(expression malloc_exp, sensitivity_information *psi)
generate an abstract heap location entity
bool entity_flow_or_context_sentitive_heap_location_p(entity e)
bool entity_all_module_heap_locations_p(entity e)
test if an entity is the a heap area
bool entity_all_heap_locations_p(entity e)
test if an entity is the set of all heap locations
void const char const char const int
#define pips_debug_effects(level, message, l_eff)
#define pips_debug_effect(level, message, eff)
for debug
void effects_to_may_effects(list)
effect make_anywhere_effect(action)
void effect_add_dereferencing_dimension(effect)
void effect_to_may_effect(effect)
list c_actual_argument_to_may_summary_effects(expression, tag)
void effect_add_field_dimension(effect, entity)
#define effect_may_p(eff)
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
#define pips_debug_pv(level, message, pv)
#define cell_relation_second_cell(cr)
#define pips_debug_pvs(level, message, l_pv)
#define cell_relation_exact_p(cr)
#define cell_relation_first_cell(cr)
type cell_to_type(cell, bool *)
Definition: type.c:513
entity effect_entity(effect)
cproto-generated files
Definition: effects.c:52
action make_action_write_memory(void)
To ease the extension of action with action_kind.
Definition: effects.c:1011
bool anywhere_effect_p(effect)
Is it an anywhere effect? ANYMMODULE:ANYWHERE
Definition: effects.c:346
cell make_undefined_pointer_value_cell(void)
#define cell_reference(x)
Definition: effects.h:469
#define CELL_RELATION(x)
CELL_RELATION.
Definition: effects.h:479
#define cell_undefined_p(x)
Definition: effects.h:431
#define cell_interpretation_tag(x)
Definition: effects.h:414
@ is_cell_interpretation_address_of
Definition: effects.h:397
@ is_cell_interpretation_value_of
Definition: effects.h:396
#define cell_undefined
Definition: effects.h:430
#define cell_relation_undefined
Definition: effects.h:485
#define cell_interpretation_value_of_p(x)
Definition: effects.h:415
#define effect_approximation(x)
Definition: effects.h:644
#define CELL_INTERPRETATION(x)
CELL_INTERPRETATION.
Definition: effects.h:375
#define EFFECT(x)
EFFECT.
Definition: effects.h:608
#define effect_cell(x)
Definition: effects.h:640
string make_entity_fullname(const char *module_name, const char *local_name)
END_EOLE.
Definition: entity_names.c:230
void gen_full_free_list(list l)
Definition: genClib.c:1023
entity get_current_module_entity(void)
Get the entity of the current module.
Definition: static.c:85
#define ENDP(l)
Test if a list is empty.
Definition: newgen_list.h:66
list gen_nreverse(list cp)
reverse a list in place
Definition: list.c:304
#define POP(l)
Modify a list pointer to point on the next element of the list.
Definition: newgen_list.h:59
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
size_t gen_length(const list l)
Definition: list.c:150
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
Definition: newgen_list.h:150
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
Definition: list.c:344
#define CAR(pcons)
Get the value of the first element of a list.
Definition: newgen_list.h:92
void gen_free_list(list l)
free the spine of the list
Definition: list.c:327
list gen_last(list l)
Return the last element of a list.
Definition: list.c:578
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
Definition: newgen_list.h:179
#define CDR(pcons)
Get the list less its first element.
Definition: newgen_list.h:111
list gen_full_copy_list(list l)
Copy a list structure with element copy.
Definition: list.c:535
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
Definition: misc-local.h:145
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
Definition: misc-local.h:172
#define pips_internal_error
Definition: misc-local.h:149
#define LIST_DIRECTED_FORMAT_NAME
Definition: naming-local.h:97
#define TOP_LEVEL_MODULE_NAME
Module containing the global variables in Fortran and C.
Definition: naming-local.h:101
#define same_string_p(s1, s2)
void * gen_find_tabulated(const char *, int)
Definition: tabulated.c:218
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15
#define pips_debug_pv_results(level, message, pv_res)
void pointer_values_remove_var(entity, bool, list, pv_results *, pv_context *)
pv_results make_pv_results(void)
void assignment_to_post_pv(expression, bool, expression, bool, list, pv_results *, pv_context *)
void expression_to_post_pv(expression, list, pv_results *, pv_context *)
void single_pointer_assignment_to_post_pv(effect, list, list, bool, list, pv_results *, pv_context *)
void free_pv_results_paths(pv_results *)
list effect_find_equivalent_pointer_values(effect, list, cell_relation *, list *)
find pointer_values in l_in which give (possible or exact) paths equivalent to eff.
statement pv_context_statement_head(pv_context *)
static void intrinsic_to_identical_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
static void default_intrinsic_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
static void address_of_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
static void unknown_intrinsic_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
static void string_function_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
static void heap_intrinsic_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
static IntrinsicToPostPVDescriptor IntrinsicToPostPVDescriptorTable[]
static void unix_io_function_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
static void assignment_intrinsic_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
static void unary_arithmetic_operator_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
static void safe_intrinsic_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
static void c_io_function_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
static void va_list_function_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
static void conditional_operator_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
static void field_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
struct IntrinsicDescriptor IntrinsicToPostPVDescriptor
the following data structure describes an intrinsic function: its name and the function to apply on a...
static void update_operator_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
static void logical_operator_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
static void free_to_post_pv(list l_free_eff, list l_in, pv_results *pv_res, pv_context *ctxt)
static void binary_arithmetic_operator_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
static void c_return_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
static void point_to_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
void intrinsic_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
pointer_values_intrinsics.c
static void dereferencing_to_post_pv(entity func, list func_args, list l_in, pv_results *pv_res, pv_context *ctxt)
string string_of_type(const type)
Definition: type.c:56
#define UNBOUNDED_DIMENSION_NAME
Definition: ri-util-local.h:74
#define GETS_FUNCTION_NAME
#define ERFCL_OPERATOR_NAME
#define ERFC_OPERATOR_NAME
#define BITWISE_OR_OPERATOR_NAME
#define FREAD_FUNCTION_NAME
#define ALLOCA_FUNCTION_NAME
#define NINT_CONVERSION_NAME
#define ATAN2_OPERATOR_NAME
#define SGCONVERT_OPERATOR_NAME
#define FWSCANF_FUNCTION_NAME
#define LDEXPL_OPERATOR_NAME
#define QECONVERT_OPERATOR_NAME
#define CREALF_OPERATOR_NAME
#define FESETEXCEPTFLAG_FUNCTION_NAME
#define VFPRINTF_FUNCTION_NAME
#define EXPM1L_OPERATOR_NAME
#define C_TANH_OPERATOR_NAME
#define CTANHF_OPERATOR_NAME
#define LABS_FUNCTION_NAME
#define FUNC_TO_DECIMAL_OPERATOR_NAME
#define C_WRITE_FUNCTION_NAME
#define DREAL_GENERIC_CONVERSION_NAME
#define TGAMMAL_OPERATOR_NAME
#define BUILTIN_VA_END
vararg stuff.
#define SRAND_FUNCTION_NAME
#define CASINL_OPERATOR_NAME
#define MAX_OPERATOR_NAME
#define POWER_OPERATOR_NAME
#define ATOI_FUNCTION_NAME
#define LLE_OPERATOR_NAME
#define DECIMAL_TO_SINGLE_OPERATOR_NAME
#define _TOLOWER_OPERATOR_NAME
#define ATANL_OPERATOR_NAME
#define CABS_OPERATOR_NAME
#define REALLOC_FUNCTION_NAME
#define LOGB_OPERATOR_NAME
#define CPROJ_OPERATOR_NAME
#define WCSTOMBS_FUNCTION_NAME
#define FGETC_FUNCTION_NAME
#define LOG1P_OPERATOR_NAME
#define STRLEN_FUNCTION_NAME
#define TOWUPPER_OPERATOR_NAME
#define POST_DECREMENT_OPERATOR_NAME
Definition: ri-util-local.h:98
#define DTIME_FUNCTION_NAME
#define NEXTAFTERF_OPERATOR_NAME
#define STAT_FUNCTION_NAME
#define MEMSET_FUNCTION_NAME
#define CEXP_OPERATOR_NAME
#define CPOWL_OPERATOR_NAME
#define FDATASYNC_FUNCTION_NAME
#define IDNINT_CONVERSION_NAME
#define FWRITE_FUNCTION_NAME
#define MBTOWC_FUNCTION_NAME
#define FLOAT_GENERIC_CONVERSION_NAME
#define ISOC99_VFSCANF_FUNCTION_NAME
#define TOLOWER_OPERATOR_NAME
#define BITWISE_XOR_OPERATOR_NAME
#define STRSPN_FUNCTION_NAME
#define FGETPOS_FUNCTION_NAME
#define C_LESS_OR_EQUAL_OPERATOR_NAME
#define NANL_OPERATOR_NAME
#define SEED48_FUNCTION_NAME
#define TANH_OPERATOR_NAME
#define REMAINDERF_OPERATOR_NAME
#define IMAXDIV_FUNCTION_NAME
#define FMINF_OPERATOR_NAME
#define STRCMP_FUNCTION_NAME
#define CACOSH_OPERATOR_NAME
#define NEARBYINTF_OPERATOR_NAME
#define COS_OPERATOR_NAME
#define __FILBUF_FUNCTION_NAME
#define C_EXP_OPERATOR_NAME
#define CDABS_OPERATOR_NAME
#define DSIGN_OPERATOR_NAME
#define SCANF_FUNCTION_NAME
#define COPYSIGNF_OPERATOR_NAME
#define ISWALNUM_OPERATOR_NAME
include <wctype.h>
#define MRAND48_FUNCTION_NAME
#define FSYNC_FUNCTION_NAME
fcntl is declared with fcntl.h
#define FTELLO64_FUNCTION_NAME
#define DOUBLE_MODULO_OPERATOR_NAME
#define READ_FUNCTION_NAME
#define ISLOWER_OPERATOR_NAME
#define STRNCPY_FUNCTION_NAME
#define C_ACOSH_OPERATOR_NAME
#define CTANHL_OPERATOR_NAME
#define FDIML_OPERATOR_NAME
#define WARNX_FUNCTION_NAME
#define C_AND_OPERATOR_NAME
#define GREATER_THAN_OPERATOR_NAME
#define CTANF_OPERATOR_NAME
#define ENDFILE_FUNCTION_NAME
#define DIV_FUNCTION_NAME
#define FREOPEN64_FUNCTION_NAME
#define TOWLOWER_OPERATOR_NAME
#define C_GREATER_OR_EQUAL_OPERATOR_NAME
#define SIGN_OPERATOR_NAME
#define ATANF_OPERATOR_NAME
#define ISWXDIGIT_OPERATOR_NAME
#define DMIN1_OPERATOR_NAME
#define C_LOG10_OPERATOR_NAME
#define FDIMF_OPERATOR_NAME
#define LOGF_OPERATOR_NAME
#define ATAN2F_OPERATOR_NAME
#define CACOS_OPERATOR_NAME
include <complex.h>
#define STRSTR_FUNCTION_NAME
#define BUILTIN_VA_COPY
#define BITWISE_OR_UPDATE_OPERATOR_NAME
#define ABS_OPERATOR_NAME
#define DECIMAL_TO_QUADRUPLE_OPERATOR_NAME
#define TOWCTRANS_OPERATOR_NAME
#define C_REWIND_FUNCTION_NAME
#define LLROUNDF_OPERATOR_NAME
#define NEXTTOWARDF_OPERATOR_NAME
#define DBLE_GENERIC_CONVERSION_NAME
#define SYSTEM_FUNCTION_NAME
#define FEGETROUND_FUNCTION_NAME
#define SUBSTRING_FUNCTION_NAME
#define COSHL_OPERATOR_NAME
#define GETC_FUNCTION_NAME
#define ISOC99_FSCANF_FUNCTION_NAME
#define DACOS_OPERATOR_NAME
#define ISHFT_OPERATOR_NAME
Bit manipulation functions.
#define TOASCII_OPERATOR_NAME
#define MALLOC_FUNCTION_NAME
#define ASSERT_FUNCTION_NAME
Here are C intrinsics arranged in the order of the standard ISO/IEC 9899:TC2.
#define LLROUND_OPERATOR_NAME
#define CLEARERR_FUNCTION_NAME
#define TIME_FUNCTION_NAME
include<time.h>
#define CSINL_OPERATOR_NAME
#define COSH_OPERATOR_NAME
#define ISUPPER_OPERATOR_NAME
#define ISALNUM_OPERATOR_NAME
include <ctype.h>
#define VERR_FUNCTION_NAME
#define BUFFERIN_FUNCTION_NAME
#define EOLE_FMA_OPERATOR_NAME
These operators are used within the optimize transformation in order to manipulate operators such as ...
#define IEOR_OPERATOR_NAME
#define LRAND48_FUNCTION_NAME
#define LLRINT_OPERATOR_NAME
#define ACOSHL_OPERATOR_NAME
#define ISPUNCT_OPERATOR_NAME
#define STRERROR_R_FUNCTION_NAME
#define NEXTTOWARDL_OPERATOR_NAME
#define ERR_FUNCTION_NAME
F2008.
#define C_GREATER_THAN_OPERATOR_NAME
#define CPOW_OPERATOR_NAME
#define DSQRT_OPERATOR_NAME
#define C_CCOS_OPERATOR_NAME
#define SSCANF_FUNCTION_NAME
#define SINF_OPERATOR_NAME
#define C_MODULO_OPERATOR_NAME
#define ISDIGIT_OPERATOR_NAME
#define COPYSIGNL_OPERATOR_NAME
#define CACOSHL_OPERATOR_NAME
#define STRCPY_FUNCTION_NAME
#define MINUS_OPERATOR_NAME
#define IDIM_OPERATOR_NAME
#define CSINHF_OPERATOR_NAME
#define C_COSH_OPERATOR_NAME
#define _TOUPPER_OPERATOR_NAME
#define EXP2L_OPERATOR_NAME
#define LGAMMAF_OPERATOR_NAME
#define ATOF_FUNCTION_NAME
random functions of <stdlib.h>
#define ETIME_FUNCTION_NAME
#define ILOGBF_OPERATOR_NAME
#define AINT_CONVERSION_NAME
#define STRTOUL_FUNCTION_NAME
#define LESS_THAN_OPERATOR_NAME
#define DCMPLX_GENERIC_CONVERSION_NAME
#define DNINT_CONVERSION_NAME
#define PUTC_FUNCTION_NAME
#define ISFINITE_OPERATOR_NAME
#define CCOSH_OPERATOR_NAME
#define CLOG_OPERATOR_NAME
#define VSSCANF_FUNCTION_NAME
#define DINT_CONVERSION_NAME
#define IABS_OPERATOR_NAME
#define FLOORF_OPERATOR_NAME
#define ERRX_FUNCTION_NAME
#define EQUIV_OPERATOR_NAME
#define STRTOL_FUNCTION_NAME
#define CLOGF_OPERATOR_NAME
#define NRAND48_FUNCTION_NAME
#define SCALBLNL_OPERATOR_NAME
#define CTAN_OPERATOR_NAME
#define Y0_OPERATOR_NAME
#define DIVIDE_UPDATE_OPERATOR_NAME
#define WSCANF_FUNCTION_NAME
#define RAISE_FUNCTION_NAME
#define CEILF_OPERATOR_NAME
#define FSEEK_FUNCTION_NAME
#define ISGREATER_OPERATOR_NAME
#define C_SQRT_OPERATOR_NAME
#define USLEEP_FUNCTION_NAME
#define STRCHR_FUNCTION_NAME
#define MODF_OPERATOR_NAME
#define GETOPT_FUNCTION_NAME
#define CBRT_OPERATOR_NAME
#define ATOLL_FUNCTION_NAME
#define COMMA_OPERATOR_NAME
#define MODULO_UPDATE_OPERATOR_NAME
#define POINT_TO_OPERATOR_NAME
Definition: ri-util-local.h:92
#define CSQRTF_OPERATOR_NAME
#define _IO_GETC_FUNCTION_NAME
#define ISWLOWER_OPERATOR_NAME
#define PUTCHAR_FUNCTION_NAME
#define PLUS_OPERATOR_NAME
#define LOG10_OPERATOR_NAME
#define VPRINTF_FUNCTION_NAME
#define LENGTH_OPERATOR_NAME
#define CATAN_OPERATOR_NAME
#define LOG2F_OPERATOR_NAME
#define SIGNAL_OPERATOR_NAME
signal.h
#define STRTOK_FUNCTION_NAME
#define DCOSH_OPERATOR_NAME
#define DIM_OPERATOR_NAME
#define LOCALTIME_FUNCTION_NAME
#define IOCTL_FUNCTION_NAME
#define EXPF_OPERATOR_NAME
#define LRINTF_OPERATOR_NAME
#define LLRINTL_OPERATOR_NAME
#define _EXIT_FUNCTION_NAME
#define SPRINTF_FUNCTION_NAME
#define TANL_OPERATOR_NAME
#define DIMAG_CONVERSION_NAME
#define MVBITS_OPERATOR_NAME
#define FMAL_OPERATOR_NAME
#define LDEXP_OPERATOR_NAME
#define SIN_OPERATOR_NAME
#define RAND_FUNCTION_NAME
#define SINGLE_TO_DECIMAL_OPERATOR_NAME
#define RANDOM_FUNCTION_NAME
#define C_COS_OPERATOR_NAME
#define FMAX_OPERATOR_NAME
#define TMPFILE64_FUNCTION_NAME
#define EXPL_OPERATOR_NAME
#define NEARBYINTL_OPERATOR_NAME
#define EQUAL_OPERATOR_NAME
#define CEXPF_OPERATOR_NAME
#define FTELLO_FUNCTION_NAME
#define STRRCHR_FUNCTION_NAME
#define STRNCAT_FUNCTION_NAME
#define QGCONVERT_OPERATOR_NAME
#define FETESTEXCEPT_FUNCTION_NAME
#define FMODL_OPERATOR_NAME
#define REMAINDER_OPERATOR_NAME
#define WARN_FUNCTION_NAME
#define MEMCMP_FUNCTION_NAME
#define FMIN_OPERATOR_NAME
#define C_CSQRT_OPERATOR_NAME
#define ISWUPPER_OPERATOR_NAME
#define LROUNDL_OPERATOR_NAME
#define ATANHL_OPERATOR_NAME
#define FDOPEN_FUNCTION_NAME
#define EXPM1_OPERATOR_NAME
#define CREALL_OPERATOR_NAME
#define CPROJL_OPERATOR_NAME
#define CLOGL_OPERATOR_NAME
#define IBITS_OPERATOR_NAME
#define DLOG10_OPERATOR_NAME
#define DCONJG_OPERATOR_NAME
#define FREOPEN_FUNCTION_NAME
#define CCOSHF_OPERATOR_NAME
#define QSORT_FUNCTION_NAME
#define CALLOC_FUNCTION_NAME
#define ILOGBL_OPERATOR_NAME
#define CSINHL_OPERATOR_NAME
#define MAX0_OPERATOR_NAME
#define J1_OPERATOR_NAME
#define AMIN0_OPERATOR_NAME
#define SETLOCALE_FUNCTION_NAME
include <locale.h>
#define PSELECT_FUNCTION_NAME
#define ECONVERT_OPERATOR_NAME
#define CLOCK_FUNCTION_NAME
time.h
#define POWF_OPERATOR_NAME
#define SCALBLN_OPERATOR_NAME
#define FOPEN_FUNCTION_NAME
#define RETURN_FUNCTION_NAME
#define C_ASINH_OPERATOR_NAME
#define BACKSPACE_FUNCTION_NAME
#define ISOC99_VSSCANF_FUNCTION_NAME
#define CARGL_OPERATOR_NAME
#define DEREFERENCING_OPERATOR_NAME
Definition: ri-util-local.h:93
#define CEILL_OPERATOR_NAME
#define CASE_FUNCTION_NAME
#define MIN0_OPERATOR_NAME
#define LRINT_OPERATOR_NAME
#define CSINF_OPERATOR_NAME
#define JRAND48_FUNCTION_NAME
#define GETCHAR_FUNCTION_NAME
#define C_CABS_OPERATOR_NAME
#define __ERRNO_LOCATION_OPERATOR_NAME
bits/errno.h
#define UNLINK_FUNCTION_NAME
#define ASINL_OPERATOR_NAME
#define CREAT_FUNCTION_NAME
#define HYPOTL_OPERATOR_NAME
#define LOG2L_OPERATOR_NAME
#define STRCSPN_FUNCTION_NAME
#define MAX1_OPERATOR_NAME
#define FIELD_OPERATOR_NAME
Definition: ri-util-local.h:91
#define SFCONVERT_OPERATOR_NAME
#define ROUNDF_OPERATOR_NAME
#define HYPOT_OPERATOR_NAME
#define CARGF_OPERATOR_NAME
#define NON_EQUIV_OPERATOR_NAME
#define CEIL_OPERATOR_NAME
#define C_CLOG_OPERATOR_NAME
#define LGAMMAL_OPERATOR_NAME
#define ISOC99_SSCANF_FUNCTION_NAME
#define WCTRANS_OPERATOR_NAME
#define MATHERR_OPERATOR_NAME
#define CASINH_OPERATOR_NAME
#define FABSL_OPERATOR_NAME
#define C_NON_EQUAL_OPERATOR_NAME
#define ISWPRINT_OPERATOR_NAME
#define MODFF_OPERATOR_NAME
#define LEFT_SHIFT_UPDATE_OPERATOR_NAME
#define LDEXPF_OPERATOR_NAME
#define SCALB_OPERATOR_NAME
#define ATOQ_FUNCTION_NAME
#define IMS_OPERATOR_NAME
#define FMINL_OPERATOR_NAME
#define MEMCPY_FUNCTION_NAME
include <string.h>
#define DECIMAL_TO_DOUBLE_OPERATOR_NAME
#define REAL_MODULO_OPERATOR_NAME
#define SETVBUF_FUNCTION_NAME
#define ISBLANK_OPERATOR_NAME
#define STRXFRM_FUNCTION_NAME
#define LLABS_FUNCTION_NAME
#define CCOSHL_OPERATOR_NAME
#define ILOGB_OPERATOR_NAME
#define GETW_FUNCTION_NAME
#define LOG10L_OPERATOR_NAME
#define NEARBYINT_OPERATOR_NAME
#define CONJG_OPERATOR_NAME
#define ASINHL_OPERATOR_NAME
#define ISOC99_SCANF_FUNCTION_NAME
#define C_TAN_OPERATOR_NAME
#define GCVT_FUNCTION_NAME
#define LOGBL_OPERATOR_NAME
#define C_SIN_OPERATOR_NAME
#define AMAX0_OPERATOR_NAME
#define VFSCANF_FUNCTION_NAME
#define CCOSL_OPERATOR_NAME
#define FFLUSH_FUNCTION_NAME
#define STRDUP_FUNCTION_NAME
#define ROUNDL_OPERATOR_NAME
#define ISWBLANK_OPERATOR_NAME
#define FMAXF_OPERATOR_NAME
#define REWIND_FUNCTION_NAME
#define LROUND_OPERATOR_NAME
#define LLROUNDL_OPERATOR_NAME
#define DMAX1_OPERATOR_NAME
#define RENAME_FUNCTION_NAME
#define IBSET_OPERATOR_NAME
#define BUILTIN_VA_START
#define IFIX_GENERIC_CONVERSION_NAME
#define FREE_FUNCTION_NAME
#define ACOS_OPERATOR_NAME
#define EXPM1F_OPERATOR_NAME
#define FPRINTF_FUNCTION_NAME
#define MULTIPLY_UPDATE_OPERATOR_NAME
#define GETSUBOPT_FUNCTION_NAME
#define Y1_OPERATOR_NAME
#define ACOSL_OPERATOR_NAME
#define C_READ_FUNCTION_NAME
#define GETTIMEOFDAY_FUNCTION_NAME
#define C_ACOS_OPERATOR_NAME
#define OPEN_FUNCTION_NAME
#define END_FUNCTION_NAME
#define CCOSF_OPERATOR_NAME
#define ISWPUNCT_OPERATOR_NAME
#define BSEARCH_FUNCTION_NAME
#define ISHFTC_OPERATOR_NAME
#define TMPFILE_FUNCTION_NAME
#define C_ABS_FUNCTION_NAME
#define ISNAN_OPERATOR_NAME
#define FCVT_FUNCTION_NAME
#define IMPLIED_DO_NAME
Definition: ri-util-local.h:75
#define ABORT_FUNCTION_NAME
#define CREAL_OPERATOR_NAME
#define INVERSE_OPERATOR_NAME
#define ERFF_OPERATOR_NAME
#define LEFT_SHIFT_OPERATOR_NAME
#define ISXDIGIT_OPERATOR_NAME
#define CONDITIONAL_OPERATOR_NAME
#define BREAK_FUNCTION_NAME
#define CPOWF_OPERATOR_NAME
#define SCALBLNF_OPERATOR_NAME
#define ALOG10_OPERATOR_NAME
#define FMODF_OPERATOR_NAME
#define EXTENDED_TO_DECIMAL_OPERATOR_NAME
#define LLT_OPERATOR_NAME
#define VSPRINTF_FUNCTION_NAME
#define SETBUFFER_FUNCTION_NAME
#define C_ASIN_OPERATOR_NAME
#define CLOCK_GETTIME_FUNCTION_NAME
#define C_RETURN_FUNCTION_NAME
#define FSEEKO_FUNCTION_NAME
#define YN_OPERATOR_NAME
#define BUFFEROUT_FUNCTION_NAME
#define CCOS_OPERATOR_NAME
#define ROUND_OPERATOR_NAME
#define C_LOC_FUNCTION_NAME
F2003.
#define ISGRAPH_OPERATOR_NAME
#define LCONG48_FUNCTION_NAME
#define DPROD_OPERATOR_NAME
#define GETENV_FUNCTION_NAME
#define CUSERID_FUNCTION_NAME
#define SCALBNF_OPERATOR_NAME
#define LLRINTF_OPERATOR_NAME
#define SINHL_OPERATOR_NAME
#define AND_OPERATOR_NAME
FI: intrinsics are defined at a third place after bootstrap and effects! I guess the name should be d...
#define ISNORMAL_OPERATOR_NAME
#define MINUS_UPDATE_OPERATOR_NAME
#define ANINT_CONVERSION_NAME
#define REMOVE_FUNCTION_NAME
#define CPROJF_OPERATOR_NAME
#define TRUNCL_OPERATOR_NAME
#define SIGNBIT_OPERATOR_NAME
#define C_NOT_OPERATOR_NAME
#define CATANHL_OPERATOR_NAME
#define CABSL_OPERATOR_NAME
#define INT_TO_CHAR_CONVERSION_NAME
#define ISWALPHA_OPERATOR_NAME
#define FOPEN64_FUNCTION_NAME
#define ASSERT_FAIL_FUNCTION_NAME
#define GCONVERT_OPERATOR_NAME
#define POW_OPERATOR_NAME
#define LGAMMA_OPERATOR_NAME
#define CONTINUE_FUNCTION_NAME
#define ACOSF_OPERATOR_NAME
#define FMAF_OPERATOR_NAME
#define ALLOCATE_FUNCTION_NAME
F95.
#define ISLESS_OPERATOR_NAME
#define FSTAT_FUNCTION_NAME
#define __FILSBUF_FUNCTION_NAME
#define STRTOD_FUNCTION_NAME
#define RINT_OPERATOR_NAME
#define LINK_FUNCTION_NAME
#define ISOC99_VSCANF_FUNCTION_NAME
#define POSIX_MEMALIGN_FUNCTION_NAME
#define SNPRINTF_FUNCTION_NAME
#define COPYSIGN_OPERATOR_NAME
#define CSINH_OPERATOR_NAME
#define NEXTAFTERL_OPERATOR_NAME
#define COSHF_OPERATOR_NAME
#define COSL_OPERATOR_NAME
#define ADDRESS_OF_OPERATOR_NAME
#define CMPLX_GENERIC_CONVERSION_NAME
#define FABSF_OPERATOR_NAME
#define DOUBLE_TO_DECIMAL_OPERATOR_NAME
#define ATOL_FUNCTION_NAME
#define C_ATAN2_OPERATOR_NAME
#define PRE_DECREMENT_OPERATOR_NAME
#define CHAR_TO_INT_CONVERSION_NAME
#define FCNTL_FUNCTION_NAME
include <fcntl.h>
#define SQRT_OPERATOR_NAME
#define ATAN_OPERATOR_NAME
#define ATANHF_OPERATOR_NAME
#define ERFL_OPERATOR_NAME
#define ISIGN_OPERATOR_NAME
#define C_CEXP_OPERATOR_NAME
#define STRTOULL_FUNCTION_NAME
#define TGAMMA_OPERATOR_NAME
#define UNGETC_FUNCTION_NAME
#define STRPBRK_FUNCTION_NAME
#define SRAND48_FUNCTION_NAME
#define QUADRUPLE_TO_DECIMAL_OPERATOR_NAME
#define INT_GENERIC_CONVERSION_NAME
generic conversion names.
#define C_ATAN_OPERATOR_NAME
#define EXP2F_OPERATOR_NAME
#define SELECT_FUNCTION_NAME
#define C_CLOSE_FUNCTION_NAME
#define GAMMA_OPERATOR_NAME
#define LGE_OPERATOR_NAME
#define IMPLIED_DCOMPLEX_NAME
Definition: ri-util-local.h:89
#define SWSCANF_FUNCTION_NAME
#define NANOSLEEP_FUNCTION_NAME
#define DIVIDE_OPERATOR_NAME
#define MEMCHR_FUNCTION_NAME
#define DRAND48_FUNCTION_NAME
#define BIT_SIZE_OPERATOR_NAME
#define TGAMMAF_OPERATOR_NAME
#define WRITE_FUNCTION_NAME
#define SETLINEBUF_FUNCTION_NAME
#define NAN_OPERATOR_NAME
#define DABS_OPERATOR_NAME
#define REMAINDERL_OPERATOR_NAME
#define SINL_OPERATOR_NAME
#define FECLEAREXCEPT_FUNCTION_NAME
include <fenv.h>
#define DIFFTIME_FUNCTION_NAME
#define CBRTL_OPERATOR_NAME
#define JN_OPERATOR_NAME
#define CLOSE_FUNCTION_NAME
#define FABS_OPERATOR_NAME
#define STRCOLL_FUNCTION_NAME
#define UNARY_MINUS_OPERATOR_NAME
#define AMIN1_OPERATOR_NAME
#define LROUNDF_OPERATOR_NAME
#define _IO_PUTC_FUNCTION_NAME
#define DCOS_OPERATOR_NAME
#define RINTF_OPERATOR_NAME
#define BITWISE_XOR_UPDATE_OPERATOR_NAME
#define FERAISEEXCEPT_FUNCTION_NAME
#define CASINHL_OPERATOR_NAME
#define C_OPEN_FUNCTION_NAME
Not found in unistd.h.
#define LRINTL_OPERATOR_NAME
#define ISNANL_OPERATOR_NAME
#define QFCONVERT_OPERATOR_NAME
#define STRCAT_FUNCTION_NAME
#define ISGREATEREQUAL_OPERATOR_NAME
#define CATANHF_OPERATOR_NAME
#define TEMPNAM_FUNCTION_NAME
#define CARG_OPERATOR_NAME
#define LLTOSTR_FUNCTION_NAME
#define CONCATENATION_FUNCTION_NAME
#define EXP_OPERATOR_NAME
#define ERAND48_FUNCTION_NAME
#define FMA_OPERATOR_NAME
#define EOLE_PROD_OPERATOR_NAME
#define VSCANF_FUNCTION_NAME
#define HYPOTF_OPERATOR_NAME
#define IBCLR_OPERATOR_NAME
#define CTANH_OPERATOR_NAME
#define PCLOSE_FUNCTION_NAME
#define SRANDOM_FUNCTION_NAME
#define LDIV_FUNCTION_NAME
#define FSEEKO64_FUNCTION_NAME
#define ATAN2L_OPERATOR_NAME
#define C_LOG_OPERATOR_NAME
#define LOGBF_OPERATOR_NAME
#define IMA_OPERATOR_NAME
Integer Multiply Add and Sub, FC 27/10/2005 for FI.
#define ERF_OPERATOR_NAME
#define UNARY_PLUS_OPERATOR_NAME
#define ASINHF_OPERATOR_NAME
#define BRACE_INTRINSIC
Definition: ri-util-local.h:85
#define NANF_OPERATOR_NAME
#define LOG_OPERATOR_NAME
#define FDIM_OPERATOR_NAME
#define RIGHT_SHIFT_UPDATE_OPERATOR_NAME
#define POPEN_FUNCTION_NAME
#define ATEXIT_FUNCTION_NAME
#define LOGL_OPERATOR_NAME
#define SECOND_FUNCTION_NAME
#define DSIN_OPERATOR_NAME
#define NEXTAFTER_OPERATOR_NAME
#define RINTL_OPERATOR_NAME
#define FGETS_FUNCTION_NAME
#define ISSPACE_OPERATOR_NAME
#define FEOF_FUNCTION_NAME
#define ISLESSGREATER_OPERATOR_NAME
#define FESETROUND_FUNCTION_NAME
#define VERRX_FUNCTION_NAME
#define C_ATANH_OPERATOR_NAME
#define CSQRT_OPERATOR_NAME
#define ISASCII_OPERATOR_NAME
#define IOR_OPERATOR_NAME
#define C_SINH_OPERATOR_NAME
#define CSQRTL_OPERATOR_NAME
#define ASINF_OPERATOR_NAME
#define C_LESS_THAN_OPERATOR_NAME
#define ACOSHF_OPERATOR_NAME
#define BITWISE_NOT_OPERATOR_NAME
#define __H_ERRNO_LOCATION_OPERATOR_NAME
netdb.h
#define CATANL_OPERATOR_NAME
#define CACOSHF_OPERATOR_NAME
#define FLOORL_OPERATOR_NAME
#define GREATER_OR_EQUAL_OPERATOR_NAME
#define TAN_OPERATOR_NAME
#define FILE_TO_DECIMAL_OPERATOR_NAME
#define PUTW_FUNCTION_NAME
#define VWARNX_FUNCTION_NAME
#define ERFCF_OPERATOR_NAME
#define FILENO_FUNCTION_NAME
#define STOP_FUNCTION_NAME
#define DECIMAL_TO_EXTENDED_OPERATOR_NAME
#define PRE_INCREMENT_OPERATOR_NAME
Definition: ri-util-local.h:99
#define VWARN_FUNCTION_NAME
#define STRING_TO_DECIMAL_OPERATOR_NAME
#define FTELL_FUNCTION_NAME
#define CACOSL_OPERATOR_NAME
#define CIMAG_OPERATOR_NAME
#define EOLE_SUM_OPERATOR_NAME
#define FPUTC_FUNCTION_NAME
#define CEXPL_OPERATOR_NAME
#define SETBUF_FUNCTION_NAME
#define C_CSIN_OPERATOR_NAME
#define POST_INCREMENT_OPERATOR_NAME
Definition: ri-util-local.h:97
#define TMPNAM_FUNCTION_NAME
#define DSINH_OPERATOR_NAME
#define SIGFPE_OPERATOR_NAME
#define IAND_OPERATOR_NAME
#define ISWCNTRL_OPERATOR_NAME
#define AIMAG_CONVERSION_NAME
#define EXIT_FUNCTION_NAME
#define PLUS_UPDATE_OPERATOR_NAME
#define CONJ_OPERATOR_NAME
#define SIGNIFICAND_OPERATOR_NAME
#define J0_OPERATOR_NAME
#define LSTAT_FUNCTION_NAME
#define INDEX_OPERATOR_NAME
#define ISLESSEQUAL_OPERATOR_NAME
#define ISWGRAPH_OPERATOR_NAME
#define ISNANF_OPERATOR_NAME
#define BTEST_OPERATOR_NAME
#define WCTYPE_OPERATOR_NAME
#define TRUNCF_OPERATOR_NAME
#define MBLEN_FUNCTION_NAME
#define ISWDIGIT_OPERATOR_NAME
#define PAUSE_FUNCTION_NAME
#define STRTOF_FUNCTION_NAME
#define FLOOR_OPERATOR_NAME
#define SINHF_OPERATOR_NAME
#define STRTOLL_FUNCTION_NAME
#define COSF_OPERATOR_NAME
#define LOG10F_OPERATOR_NAME
#define VSNPRINTF_FUNCTION_NAME
#define FORMAT_FUNCTION_NAME
#define LLDIV_FUNCTION_NAME
#define DATAN2_OPERATOR_NAME
#define DDIM_OPERATOR_NAME
#define TANHF_OPERATOR_NAME
#define FGETPOS64_FUNCTION_NAME
#define SINH_OPERATOR_NAME
#define FPCLASSIFY_OPERATOR_NAME
include <math.h>
#define PERROR_FUNCTION_NAME
#define REAL_GENERIC_CONVERSION_NAME
#define DEFAULT_FUNCTION_NAME
#define WCTOMB_FUNCTION_NAME
#define CACOSF_OPERATOR_NAME
#define TRUNC_OPERATOR_NAME
#define CTERMID_FUNCTION_NAME
#define SQRTF_OPERATOR_NAME
#define ISINF_OPERATOR_NAME
#define STRNCMP_FUNCTION_NAME
#define ISUNORDERED_OPERATOR_NAME
#define TOUPPER_OPERATOR_NAME
#define MINUS_C_OPERATOR_NAME
#define MULTIPLY_OPERATOR_NAME
#define DEXP_OPERATOR_NAME
#define BITWISE_AND_UPDATE_OPERATOR_NAME
#define DLOG_OPERATOR_NAME
#define LESS_OR_EQUAL_OPERATOR_NAME
#define CBRTF_OPERATOR_NAME
#define C_OR_OPERATOR_NAME
#define STRERROR_FUNCTION_NAME
#define CONJL_OPERATOR_NAME
#define BITWISE_AND_OPERATOR_NAME
#define CSIN_OPERATOR_NAME
#define SNGL_GENERIC_CONVERSION_NAME
#define FMOD_OPERATOR_NAME
#define IMAXABS_FUNCTION_NAME
include <inttypes.h>
#define SCALBNL_OPERATOR_NAME
#define DTANH_OPERATOR_NAME
#define EXP2_OPERATOR_NAME
#define DFLOAT_GENERIC_CONVERSION_NAME
#define SQRTL_OPERATOR_NAME
#define FERROR_FUNCTION_NAME
#define TANHL_OPERATOR_NAME
#define SYMLINK_FUNCTION_NAME
#define ULLTOSTR_FUNCTION_NAME
#define RIGHT_SHIFT_OPERATOR_NAME
#define CATANF_OPERATOR_NAME
#define CATANH_OPERATOR_NAME
#define ISCNTRL_OPERATOR_NAME
#define ASIN_OPERATOR_NAME
#define AMAX1_OPERATOR_NAME
#define CTANL_OPERATOR_NAME
#define CABSF_OPERATOR_NAME
#define CASINHF_OPERATOR_NAME
#define CONJF_OPERATOR_NAME
#define DEALLOCATE_FUNCTION_NAME
#define SECONVERT_OPERATOR_NAME
#define DASIN_OPERATOR_NAME
#define TANF_OPERATOR_NAME
#define INQUIRE_FUNCTION_NAME
#define NEXTTOWARD_OPERATOR_NAME
#define PUTS_FUNCTION_NAME
#define IDINT_GENERIC_CONVERSION_NAME
#define MEMMOVE_FUNCTION_NAME
#define NOT_OPERATOR_NAME
#define POWL_OPERATOR_NAME
#define IMPLIED_COMPLEX_NAME
Definition: ri-util-local.h:88
#define FSCANF_FUNCTION_NAME
#define FCONVERT_OPERATOR_NAME
#define LGT_OPERATOR_NAME
#define MIN1_OPERATOR_NAME
#define ISWCTYPE_OPERATOR_NAME
#define CASIN_OPERATOR_NAME
#define LOG1PF_OPERATOR_NAME
#define ASSIGN_SUBSTRING_FUNCTION_NAME
#define OR_OPERATOR_NAME
#define LOG1PL_OPERATOR_NAME
#define FSETPOS64_FUNCTION_NAME
#define CIMAGL_OPERATOR_NAME
#define NON_EQUAL_OPERATOR_NAME
#define DATAN_OPERATOR_NAME
#define DTAN_OPERATOR_NAME
#define C_EQUAL_OPERATOR_NAME
#define ISWSPACE_OPERATOR_NAME
#define PRINTF_FUNCTION_NAME
include<stdio.h>
#define ECVT_FUNCTION_NAME
#define CIMAGF_OPERATOR_NAME
#define ASSIGN_OPERATOR_NAME
Definition: ri-util-local.h:95
#define ISPRINT_OPERATOR_NAME
#define MODULO_OPERATOR_NAME
#define SCALBN_OPERATOR_NAME
#define FPUTS_FUNCTION_NAME
#define PLUS_C_OPERATOR_NAME
#define FCLOSE_FUNCTION_NAME
#define ALOG_OPERATOR_NAME
#define FMAXL_OPERATOR_NAME
#define FREXP_OPERATOR_NAME
#define FSETPOS_FUNCTION_NAME
#define MIN_OPERATOR_NAME
#define CTYPE_B_LOC_OPERATOR_NAME
Part of the binary standard.
#define ISALPHA_OPERATOR_NAME
#define LOG2_OPERATOR_NAME
#define MBSTOWCS_FUNCTION_NAME
#define CASINF_OPERATOR_NAME
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
Definition: entity.c:453
bool same_entity_p(entity e1, entity e2)
predicates on entities
Definition: entity.c:1321
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
Definition: entity.c:1292
expression make_unbounded_expression()
Definition: expression.c:4339
expression MakeBinaryCall(entity f, expression eg, expression ed)
Creates a call expression to a function with 2 arguments.
Definition: expression.c:354
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
Definition: expression.c:1188
expression make_op_exp(char *op_name, expression exp1, expression exp2)
================================================================
Definition: expression.c:2012
expression MakeUnaryCall(entity f, expression a)
Creates a call expression to a function with one argument.
Definition: expression.c:342
bool array_type_p(type)
Definition: type.c:2942
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 entity_scalar_p(entity)
The concrete type of e is a scalar type.
Definition: variable.c:1113
bool pointer_type_p(type)
Check for scalar pointers.
Definition: type.c:2993
string type_to_string(const type)
type.c
Definition: type.c:51
#define syntax_reference_p(x)
Definition: ri.h:2728
#define syntax_reference(x)
Definition: ri.h:2730
#define reference_variable(x)
Definition: ri.h:2326
#define type_variable(x)
Definition: ri.h:2949
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217
#define expression_undefined
Definition: ri.h:1223
#define entity_name(x)
Definition: ri.h:2790
#define reference_indices(x)
Definition: ri.h:2328
#define expression_undefined_p(x)
Definition: ri.h:1224
#define variable_dimensions(x)
Definition: ri.h:3122
#define expression_syntax(x)
Definition: ri.h:1247
#define entity_domain
newgen_syntax_domain_defined
Definition: ri.h:410
#define ifdebug(n)
Definition: sg.c:47
The following data structure describes an intrinsic function: its name and its arity and its type,...
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
pv_context is a structure holding the methods to use during pointer values analyses
list(* pvs_may_union_func)(list, list)
pv_results is a structure holding the different results of an expression pointer values analysis
list result_paths_interpretations
resulting pointer path of the expression evaluation
list result_paths
resulting pointer_values