PIPS
ri-util.h File Reference
#include "linear.h"
#include "genC.h"
#include "ri.h"
#include "text.h"
#include "cloning.h"
#include "newgen.h"
#include "naming.h"
+ Include dependency graph for ri-util.h:

Go to the source code of this file.

Data Structures

struct  intrinsic_desc_t
 for intrinsic registration More...
 

Macros

#define UNBOUNDED_DIMENSION_NAME   "UNBOUNDED-DIMENSION"
 
#define IMPLIED_DO_NAME   "IMPLIED-DO"
 
#define IMPLIED_DO_FUNCTION_NAME   "IMPLIED-DO"
 
#define REPEAT_VALUE_NAME   "REPEAT-VALUE"
 
#define REPEAT_VALUE_FUNCTION_NAME   "REPEAT-VALUE"
 
#define STATIC_INITIALIZATION_NAME   "STATIC-INITIALIZATION"
 
#define STATIC_INITIALIZATION_FUNCTION_NAME   "STATIC-INITIALIZATION"
 
#define DATA_LIST_FUNCTION_NAME   "DATA-LIST="
 
#define IO_LIST_STRING_NAME   "IOLIST="
 
#define BRACE_INTRINSIC   "BRACE_INTRINSIC"
 
#define NULL_STATEMENT_INTRINSIC   "NULL_STATEMENT_INTRINSIC"
 
#define IMPLIED_COMPLEX_NAME   "CMPLX_"
 
#define IMPLIED_DCOMPLEX_NAME   "DCMPLX_"
 
#define FIELD_OPERATOR_NAME   "."
 
#define POINT_TO_OPERATOR_NAME   "->"
 
#define DEREFERENCING_OPERATOR_NAME   "*indirection"
 
#define ASSIGN_OPERATOR_NAME   "="
 
#define ASSIGN_OPERATOR_PRECEDENCE   (2)
 
#define POST_INCREMENT_OPERATOR_NAME   "post++"
 
#define POST_DECREMENT_OPERATOR_NAME   "post--"
 
#define PRE_INCREMENT_OPERATOR_NAME   "++pre"
 
#define PRE_DECREMENT_OPERATOR_NAME   "--pre"
 
#define MULTIPLY_UPDATE_OPERATOR_NAME   "*="
 
#define DIVIDE_UPDATE_OPERATOR_NAME   "/="
 
#define PLUS_UPDATE_OPERATOR_NAME   "+="
 
#define MINUS_UPDATE_OPERATOR_NAME   "-="
 
#define LEFT_SHIFT_UPDATE_OPERATOR_NAME   "<<="
 
#define RIGHT_SHIFT_UPDATE_OPERATOR_NAME   ">>="
 
#define BITWISE_OR_UPDATE_OPERATOR_NAME   "|="
 
#define COMMA_OPERATOR_NAME   ","
 
#define PLUS_OPERATOR_NAME   "+"
 
#define PLUS_C_OPERATOR_NAME   "+C" /**includes pointer arithmetic */
 
#define MINUS_OPERATOR_NAME   "-"
 
#define MINUS_C_OPERATOR_NAME   "-C" /**includes pointer arithmetic */
 
#define UNARY_MINUS_OPERATOR_NAME   "--"
 
#define UNARY_PLUS_OPERATOR_NAME   "+unary"
 
#define MULTIPLY_OPERATOR_NAME   "*"
 
#define DIVIDE_OPERATOR_NAME   "/"
 
#define INVERSE_OPERATOR_NAME   "_INV_" /**internal stuff */
 
#define POWER_OPERATOR_NAME   "**"
 
#define MODULO_OPERATOR_NAME   "MOD"
 
#define REAL_MODULO_OPERATOR_NAME   "AMOD"
 
#define DOUBLE_MODULO_OPERATOR_NAME   "DMOD"
 
#define SIGN_OPERATOR_NAME   "SIGN"
 
#define ISIGN_OPERATOR_NAME   "ISIGN"
 
#define DSIGN_OPERATOR_NAME   "DSIGN"
 
#define DIM_OPERATOR_NAME   "DIM"
 
#define IDIM_OPERATOR_NAME   "IDIM"
 
#define DDIM_OPERATOR_NAME   "DDIM"
 
#define DPROD_OPERATOR_NAME   "DPROD"
 
#define CONJG_OPERATOR_NAME   "CONJG"
 
#define DCONJG_OPERATOR_NAME   "DCONJG"
 
#define SQRT_OPERATOR_NAME   "SQRT"
 
#define DSQRT_OPERATOR_NAME   "DSQRT"
 
#define CSQRT_OPERATOR_NAME   "CSQRT"
 
#define CDSQRT_OPERATOR_NAME   "CDSQRT"
 
#define EXP_OPERATOR_NAME   "EXP"
 
#define DEXP_OPERATOR_NAME   "DEXP"
 
#define CEXP_OPERATOR_NAME   "CEXP"
 
#define CDEXP_OPERATOR_NAME   "CDEXP"
 
#define LOG_OPERATOR_NAME   "LOG"
 
#define ALOG_OPERATOR_NAME   "ALOG"
 
#define DLOG_OPERATOR_NAME   "DLOG"
 
#define CLOG_OPERATOR_NAME   "CLOG"
 
#define CDLOG_OPERATOR_NAME   "CDLOG"
 
#define LOG10_OPERATOR_NAME   "LOG10"
 
#define ALOG10_OPERATOR_NAME   "ALOG10"
 
#define DLOG10_OPERATOR_NAME   "DLOG10"
 
#define SIN_OPERATOR_NAME   "SIN"
 
#define DSIN_OPERATOR_NAME   "DSIN"
 
#define CSIN_OPERATOR_NAME   "CSIN"
 
#define CDSIN_OPERATOR_NAME   "CDSIN"
 
#define COS_OPERATOR_NAME   "COS"
 
#define DCOS_OPERATOR_NAME   "DCOS"
 
#define CCOS_OPERATOR_NAME   "CCOS"
 
#define CDCOS_OPERATOR_NAME   "CDCOS"
 
#define TAN_OPERATOR_NAME   "TAN"
 
#define DTAN_OPERATOR_NAME   "DTAN"
 
#define ASIN_OPERATOR_NAME   "ASIN"
 
#define DASIN_OPERATOR_NAME   "DASIN"
 
#define ACOS_OPERATOR_NAME   "ACOS"
 
#define DACOS_OPERATOR_NAME   "DACOS"
 
#define ATAN_OPERATOR_NAME   "ATAN"
 
#define DATAN_OPERATOR_NAME   "DATAN"
 
#define ATAN2_OPERATOR_NAME   "ATAN2"
 
#define DATAN2_OPERATOR_NAME   "DATAN2"
 
#define SINH_OPERATOR_NAME   "SINH"
 
#define DSINH_OPERATOR_NAME   "DSINH"
 
#define COSH_OPERATOR_NAME   "COSH"
 
#define DCOSH_OPERATOR_NAME   "DCOSH"
 
#define TANH_OPERATOR_NAME   "TANH"
 
#define DTANH_OPERATOR_NAME   "DTANH"
 
#define LEFT_SHIFT_OPERATOR_NAME   "<<"
 
#define RIGHT_SHIFT_OPERATOR_NAME   ">>"
 
#define ADDRESS_OF_OPERATOR_NAME   "__address-of__"
 
#define BITWISE_AND_OPERATOR_NAME   "__bit-and__"
 
#define BITWISE_NOT_OPERATOR_NAME   "__bit-not__"
 
#define BITWISE_XOR_OPERATOR_NAME   "__C-xor__"
 
#define C_AND_OPERATOR_NAME   "__C-and__"
 
#define MODULO_UPDATE_OPERATOR_NAME   "__C-modulo-update__"
 
#define BITWISE_AND_UPDATE_OPERATOR_NAME   "__C-bit-and-update__"
 
#define BITWISE_XOR_UPDATE_OPERATOR_NAME   "__C-bit-xor-update__"
 
#define CONDITIONAL_OPERATOR_NAME   "__C-conditional__"
 
#define C_NOT_OPERATOR_NAME   "__C-logical-not__"
 
#define C_NON_EQUAL_OPERATOR_NAME   "__C-non-equal__"
 
#define C_MODULO_OPERATOR_NAME   "__C-modulo__"
 
#define BITWISE_OR_OPERATOR_NAME   "|"
 
#define MIN_OPERATOR_NAME   "MIN"
 
#define MIN0_OPERATOR_NAME   "MIN0"
 
#define MIN1_OPERATOR_NAME   "MIN1"
 
#define AMIN0_OPERATOR_NAME   "AMIN0"
 
#define AMIN1_OPERATOR_NAME   "AMIN1"
 
#define DMIN1_OPERATOR_NAME   "DMIN1"
 
#define MAX_OPERATOR_NAME   "MAX"
 
#define MAX0_OPERATOR_NAME   "MAX0"
 
#define AMAX0_OPERATOR_NAME   "AMAX0"
 
#define MAX1_OPERATOR_NAME   "MAX1"
 
#define AMAX1_OPERATOR_NAME   "AMAX1"
 
#define DMAX1_OPERATOR_NAME   "DMAX1"
 
#define ABS_OPERATOR_NAME   "ABS"
 
#define IABS_OPERATOR_NAME   "IABS"
 
#define DABS_OPERATOR_NAME   "DABS"
 
#define CABS_OPERATOR_NAME   "CABS"
 
#define CDABS_OPERATOR_NAME   "CDABS"
 
#define LENGTH_OPERATOR_NAME   "LEN"
 
#define INDEX_OPERATOR_NAME   "INDEX"
 
#define LGE_OPERATOR_NAME   "LGE"
 
#define LGT_OPERATOR_NAME   "LGT"
 
#define LLE_OPERATOR_NAME   "LLE"
 
#define LLT_OPERATOR_NAME   "LLT"
 
#define INT_GENERIC_CONVERSION_NAME   "INT"
 generic conversion names. More...
 
#define IFIX_GENERIC_CONVERSION_NAME   "IFIX"
 
#define IDINT_GENERIC_CONVERSION_NAME   "IDINT"
 
#define REAL_GENERIC_CONVERSION_NAME   "REAL"
 
#define FLOAT_GENERIC_CONVERSION_NAME   "FLOAT"
 
#define DFLOAT_GENERIC_CONVERSION_NAME   "DFLOAT"
 
#define SNGL_GENERIC_CONVERSION_NAME   "SNGL"
 
#define DBLE_GENERIC_CONVERSION_NAME   "DBLE"
 
#define DREAL_GENERIC_CONVERSION_NAME   "DREAL"
 
#define CMPLX_GENERIC_CONVERSION_NAME   "CMPLX"
 
#define DCMPLX_GENERIC_CONVERSION_NAME   "DCMPLX"
 
#define INT_TO_CHAR_CONVERSION_NAME   "CHAR"
 
#define CHAR_TO_INT_CONVERSION_NAME   "ICHAR"
 
#define AINT_CONVERSION_NAME   "AINT"
 
#define DINT_CONVERSION_NAME   "DINT"
 
#define ANINT_CONVERSION_NAME   "ANINT"
 
#define DNINT_CONVERSION_NAME   "DNINT"
 
#define NINT_CONVERSION_NAME   "NINT"
 
#define IDNINT_CONVERSION_NAME   "IDNINT"
 
#define AIMAG_CONVERSION_NAME   "AIMAG"
 
#define DIMAG_CONVERSION_NAME   "DIMAG"
 
#define AND_OPERATOR_NAME   ".AND."
 FI: intrinsics are defined at a third place after bootstrap and effects! I guess the name should be defined here and used in table(s) there. More...
 
#define OR_OPERATOR_NAME   ".OR."
 
#define C_OR_OPERATOR_NAME   "||"
 
#define NOT_OPERATOR_NAME   ".NOT."
 
#define NON_EQUAL_OPERATOR_NAME   ".NE."
 
#define EQUIV_OPERATOR_NAME   ".EQV."
 
#define NON_EQUIV_OPERATOR_NAME   ".NEQV."
 
#define TRUE_OPERATOR_NAME   ".TRUE."
 
#define FALSE_OPERATOR_NAME   ".FALSE."
 
#define ONE_OPERATOR_NAME   "1"
 
#define ZERO_OPERATOR_NAME   "0"
 
#define GREATER_OR_EQUAL_OPERATOR_NAME   ".GE."
 
#define C_GREATER_OR_EQUAL_OPERATOR_NAME   ">="
 
#define GREATER_THAN_OPERATOR_NAME   ".GT."
 
#define C_GREATER_THAN_OPERATOR_NAME   ">"
 
#define LESS_OR_EQUAL_OPERATOR_NAME   ".LE."
 
#define C_LESS_OR_EQUAL_OPERATOR_NAME   "<="
 
#define LESS_THAN_OPERATOR_NAME   ".LT."
 
#define C_LESS_THAN_OPERATOR_NAME   "<"
 
#define EQUAL_OPERATOR_NAME   ".EQ."
 
#define C_EQUAL_OPERATOR_NAME   "=="
 
#define CONTINUE_FUNCTION_NAME   "CONTINUE"
 
#define C_CONTINUE_FUNCTION_NAME   ";"
 
#define C_STATEMENT_END_STRING   ";"
 
#define RETURN_FUNCTION_NAME   "RETURN"
 
#define STOP_FUNCTION_NAME   "STOP"
 
#define PAUSE_FUNCTION_NAME   "PAUSE"
 
#define END_FUNCTION_NAME   "END"
 
#define ENDDO_FUNCTION_NAME   "ENDDO"
 
#define BREAK_FUNCTION_NAME   "break"
 
#define CASE_FUNCTION_NAME   "case"
 
#define DEFAULT_FUNCTION_NAME   "default"
 
#define C_RETURN_FUNCTION_NAME   "return"
 
#define SUBSTRING_FUNCTION_NAME   "_SUBSTR"
 
#define CONCATENATION_FUNCTION_NAME   "//"
 
#define ASSIGN_SUBSTRING_FUNCTION_NAME   "_ASSIGN_SUBSTR"
 
#define WRITE_FUNCTION_NAME   "WRITE"
 
#define PRINT_FUNCTION_NAME   "PRINT"
 
#define REWIND_FUNCTION_NAME   "REWIND"
 
#define OPEN_FUNCTION_NAME   "OPEN"
 
#define CLOSE_FUNCTION_NAME   "CLOSE"
 
#define INQUIRE_FUNCTION_NAME   "INQUIRE"
 
#define BACKSPACE_FUNCTION_NAME   "BACKSPACE"
 
#define READ_FUNCTION_NAME   "READ"
 
#define BUFFERIN_FUNCTION_NAME   "BUFFERIN"
 
#define BUFFEROUT_FUNCTION_NAME   "BUFFEROUT"
 
#define ENDFILE_FUNCTION_NAME   "ENDFILE"
 
#define FORMAT_FUNCTION_NAME   "FORMAT"
 
#define ISHFT_OPERATOR_NAME   "ISHFT"
 Bit manipulation functions. More...
 
#define ISHFTC_OPERATOR_NAME   "ISHFTC"
 
#define IBITS_OPERATOR_NAME   "IBITS"
 
#define MVBITS_OPERATOR_NAME   "MVBITS"
 
#define BTEST_OPERATOR_NAME   "BTEST"
 
#define IBSET_OPERATOR_NAME   "IBSET"
 
#define IBCLR_OPERATOR_NAME   "IBCLR"
 
#define BIT_SIZE_OPERATOR_NAME   "BIT_SIZE"
 
#define IAND_OPERATOR_NAME   "IAND"
 
#define IEOR_OPERATOR_NAME   "IEOR"
 
#define IOR_OPERATOR_NAME   "IOR"
 
#define OMP_IF_FUNCTION_NAME   "if"
 OMP related function and opertor names. More...
 
#define OMP_OMP_FUNCTION_NAME   "omp"
 
#define OMP_FOR_FUNCTION_NAME   "for"
 
#define OMP_PRIVATE_FUNCTION_NAME   "private"
 
#define OMP_PARALLEL_FUNCTION_NAME   "parallel"
 
#define OMP_REDUCTION_FUNCTION_NAME   "reduction"
 
#define ALLOCATE_FUNCTION_NAME   "ALLOCATE"
 F95. More...
 
#define DEALLOCATE_FUNCTION_NAME   "DEALLOCATE"
 
#define ETIME_FUNCTION_NAME   "ETIME"
 
#define DTIME_FUNCTION_NAME   "DTIME"
 
#define CPU_TIME_FUNCTION_NAME   "CPU_TIME"
 
#define C_LOC_FUNCTION_NAME   "C_LOC"
 F2003. More...
 
#define ERR_FUNCTION_NAME   "err"
 F2008. More...
 
#define ERRX_FUNCTION_NAME   "errx"
 
#define WARN_FUNCTION_NAME   "warn"
 
#define WARNX_FUNCTION_NAME   "warnx"
 
#define VERR_FUNCTION_NAME   "verr"
 
#define VERRX_FUNCTION_NAME   "verrx"
 
#define VWARN_FUNCTION_NAME   "vwarn"
 
#define VWARNX_FUNCTION_NAME   "vwarnx"
 
#define CLOCK_FUNCTION_NAME   "clock"
 time.h More...
 
#define TIME_FUNCTION_NAME   "time"
 include<time.h> More...
 
#define DIFFTIME_FUNCTION_NAME   "difftime"
 
#define MKTIME_FUNCTION_NAME   "mktime"
 
#define STRFTIME_FUNCTION_NAME   "strftime"
 
#define STRPTIME_FUNCTION_NAME   "strptime"
 
#define STRFTIME_L_FUNCTION_NAME   "strftime_l"
 
#define STRPTIME_L_FUNCTION_NAME   "strptime_l"
 
#define GMTIME_FUNCTION_NAME   "gmtime"
 
#define LOCALTIME_FUNCTION_NAME   "localtime"
 
#define GMTIME_R_FUNCTION_NAME   "gmtime_r"
 
#define LOCALTIME_R_FUNCTION_NAME   "localtime_r"
 
#define ASCTIME_FUNCTION_NAME   "asctime"
 
#define CTIME_FUNCTION_NAME   "ctime"
 
#define ASCTIME_R_FUNCTION_NAME   "asctime_r"
 
#define CTIME_R_FUNCTION_NAME   "ctime_r"
 
#define TZSET_FUNCTION_NAME   "tzset"
 
#define STIME_FUNCTION_NAME   "stime"
 
#define TIMEGM_FUNCTION_NAME   "timegm"
 
#define TIMELOCAL_FUNCTION_NAME   "timelocal"
 
#define DYSIZE_FUNCTION_NAME   "dysize"
 
#define NANOSLEEP_FUNCTION_NAME   "nanosleep"
 
#define CLOCK_GETRES_FUNCTION_NAME   "clock_getres"
 
#define CLOCK_GETTIME_FUNCTION_NAME   "clock_gettime"
 
#define CLOCK_SETTIME_FUNCTION_NAME   "clock_settime"
 
#define CLOCK_NANOSLEEP_FUNCTION_NAME   "clock_nanosleep"
 
#define CLOCK_GETCPULOCKID_FUNCTION_NAME   "clock_getcpulockid"
 
#define TIMER_CREATE_FUNCTION_NAME   "timer_create"
 
#define TIMER_DELETE_FUNCTION_NAME   "timer_delete"
 
#define TIMER_SETTIME_FUNCTION_NAME   "timer_settime"
 
#define TIMER_GETTIME_FUNCTION_NAME   "timer_gettime"
 
#define TIMER_GETOVERRUN_FUNCTION_NAME   "timer_getoverrun"
 
#define GETDATE_FUNCTION_NAME   "getdate"
 
#define GETDATE_R_FUNCTION_NAME   "getdate_r"
 
#define DRAND48_FUNCTION_NAME   "drand48"
 
#define ERAND48_FUNCTION_NAME   "erand48"
 
#define JRAND48_FUNCTION_NAME   "jrand48"
 
#define LCONG48_FUNCTION_NAME   "lcong48"
 
#define LRAND48_FUNCTION_NAME   "lrand48"
 
#define MRAND48_FUNCTION_NAME   "mrand48"
 
#define NRAND48_FUNCTION_NAME   "nrand48"
 
#define SEED48_FUNCTION_NAME   "seed48"
 
#define SRAND48_FUNCTION_NAME   "srand48"
 
#define PUTENV_FUNCTION_NAME   "putenv"
 
#define SETKEY_FUNCTION_NAME   "setkey"
 
#define SWAB_FUNCTION_NAME   "swab"
 
#define MKSTEMP_FUNCTION_NAME   "mkstemp"
 
#define MKSTEMP64_FUNCTION_NAME   "mkstemp64"
 
#define A614_FUNCTION_NAME   "a64l"
 
#define ECVT_FUNCTION_NAME   "ecvt"
 
#define FCVT_FUNCTION_NAME   "fcvt"
 
#define GCVT_FUNCTION_NAME   "gcvt"
 
#define GETSUBOPT_FUNCTION_NAME   "getsubopt"
 
#define GRANTPT_FUNCTION_NAME   "grantpt"
 
#define INITSTATE_FUNCTION_NAME   "initstate"
 
#define C_164A_FUNCTION_NAME   "l64a"
 
#define MKTEMP_FUNCTION_NAME   "mktemp"
 
#define PTSNAME_FUNCTION_NAME   "ptsname"
 
#define REALPATH_FUNCTION_NAME   "realpath"
 
#define SETSTATE_FUNCTION_NAME   "setstate"
 
#define TTYSLOT_FUNCTION_NAME   "ttyslot"
 
#define UNLOCKPT_FUNCTION_NAME   "unlockpt"
 
#define VALLOC_FUNCTION_NAME   "valloc"
 
#define DUP2_FUNCTION_NAME   "dup2"
 
#define QECVT_FUNCTION_NAME   "qecvt"
 
#define QFCVT_FUNCTION_NAME   "qfcvt"
 
#define QGCVT_FUNCTION_NAME   "qgcvt"
 
#define GETCWD_FUNCTION_NAME   "getcwd"
 
#define GETEXECNAME_FUNCTION_NAME   "getexecname"
 
#define GETLOGIN_FUNCTION_NAME   "getlogin"
 
#define GETOPT_FUNCTION_NAME   "getopt"
 
#define GETOPT_LONG_FUNCTION_NAME   "getopt_long"
 
#define GETOPT_LONG_ONLY_FUNCTION_NAME   "getopt_long_only"
 
#define GETPASS_FUNCTION_NAME   "getpass"
 
#define GETPASSPHRASE_FUNCTION_NAME   "getpassphrase"
 
#define GETPW_FUNCTION_NAME   "getpw"
 
#define ISATTY_FUNCTION_NAME   "isatty"
 
#define MEMALIGN_FUNCTION_NAME   "memalign"
 
#define TTYNAME_FUNCTION_NAME   "ttyname"
 
#define LLTOSTR_FUNCTION_NAME   "lltostr"
 
#define ULLTOSTR_FUNCTION_NAME   "ulltostr"
 
#define POSIX_MEMALIGN_FUNCTION_NAME   "posix_memalign"
 
#define ATOQ_FUNCTION_NAME   "atoq"
 
#define RANDOM_FUNCTION_NAME   "random"
 
#define SRANDOM_FUNCTION_NAME   "srandom"
 
#define MOD_INTRINSIC_NAME   "MOD"
 
#define PIPS_C_MIN_OPERATOR_NAME   "pips_min"
 PIPS run-time support for C code generation. More...
 
#define PIPS_C_MAX_OPERATOR_NAME   "pips_max"
 
#define PIPS_C_DIV_OPERATOR_NAME   "pips_div"
 
#define ASSERT_FUNCTION_NAME   "__assert"
 Here are C intrinsics arranged in the order of the standard ISO/IEC 9899:TC2. More...
 
#define ASSERT_FAIL_FUNCTION_NAME   "__assert_fail"
 
#define CACOS_OPERATOR_NAME   "cacos"
 include <complex.h> More...
 
#define CACOSF_OPERATOR_NAME   "cacosf"
 
#define CACOSL_OPERATOR_NAME   "cacosl"
 
#define CASIN_OPERATOR_NAME   "casin"
 
#define CASINF_OPERATOR_NAME   "casinf"
 
#define CASINL_OPERATOR_NAME   "casinl"
 
#define CATAN_OPERATOR_NAME   "catan"
 
#define CATANF_OPERATOR_NAME   "catanf"
 
#define CATANL_OPERATOR_NAME   "catanl"
 
#define C_CCOS_OPERATOR_NAME   "ccos"
 
#define CCOSF_OPERATOR_NAME   "ccosf"
 
#define CCOSL_OPERATOR_NAME   "ccosl"
 
#define C_CSIN_OPERATOR_NAME   "csin"
 
#define CSINF_OPERATOR_NAME   "csinf"
 
#define CSINL_OPERATOR_NAME   "csinl"
 
#define CTAN_OPERATOR_NAME   "ctan"
 
#define CTANF_OPERATOR_NAME   "ctanf"
 
#define CTANL_OPERATOR_NAME   "ctanl"
 
#define CACOSH_OPERATOR_NAME   "cacosh"
 
#define CACOSHF_OPERATOR_NAME   "cacoshf"
 
#define CACOSHL_OPERATOR_NAME   "cacoshl"
 
#define CASINH_OPERATOR_NAME   "casinh"
 
#define CASINHF_OPERATOR_NAME   "casinhf"
 
#define CASINHL_OPERATOR_NAME   "casinhl"
 
#define CATANH_OPERATOR_NAME   "catanh"
 
#define CATANHF_OPERATOR_NAME   "catanhf"
 
#define CATANHL_OPERATOR_NAME   "catanhl"
 
#define CCOSH_OPERATOR_NAME   "ccosh"
 
#define CCOSHF_OPERATOR_NAME   "ccoshf"
 
#define CCOSHL_OPERATOR_NAME   "ccoshl"
 
#define CSINH_OPERATOR_NAME   "csinh"
 
#define CSINHF_OPERATOR_NAME   "csinhf"
 
#define CSINHL_OPERATOR_NAME   "csinhl"
 
#define CTANH_OPERATOR_NAME   "ctanh"
 
#define CTANHF_OPERATOR_NAME   "ctanhf"
 
#define CTANHL_OPERATOR_NAME   "ctanhl"
 
#define C_CEXP_OPERATOR_NAME   "cexp"
 
#define CEXPF_OPERATOR_NAME   "cexpf"
 
#define CEXPL_OPERATOR_NAME   "cexpl"
 
#define C_CLOG_OPERATOR_NAME   "clog"
 
#define CLOGF_OPERATOR_NAME   "clogf"
 
#define CLOGL_OPERATOR_NAME   "clogl"
 
#define C_CABS_OPERATOR_NAME   "cabs"
 
#define CABSF_OPERATOR_NAME   "cabsf"
 
#define CABSL_OPERATOR_NAME   "cabsl"
 
#define CPOW_OPERATOR_NAME   "cpow"
 
#define CPOWF_OPERATOR_NAME   "cpowf"
 
#define CPOWL_OPERATOR_NAME   "cpowl"
 
#define C_CSQRT_OPERATOR_NAME   "csqrt"
 
#define CSQRTF_OPERATOR_NAME   "csqrtf"
 
#define CSQRTL_OPERATOR_NAME   "csqrtl"
 
#define CARG_OPERATOR_NAME   "carg"
 
#define CARGF_OPERATOR_NAME   "cargf"
 
#define CARGL_OPERATOR_NAME   "cargl"
 
#define CIMAG_OPERATOR_NAME   "cimag"
 
#define GCC_CIMAG_OPERATOR_NAME   "__imag__"
 
#define CIMAGF_OPERATOR_NAME   "cimagf"
 
#define CIMAGL_OPERATOR_NAME   "cimagl"
 
#define CONJ_OPERATOR_NAME   "conj"
 
#define CONJF_OPERATOR_NAME   "conjf"
 
#define CONJL_OPERATOR_NAME   "conjl"
 
#define CPROJ_OPERATOR_NAME   "cproj"
 
#define CPROJF_OPERATOR_NAME   "cprojf"
 
#define CPROJL_OPERATOR_NAME   "cprojl"
 
#define CREAL_OPERATOR_NAME   "creal"
 
#define GCC_CREAL_OPERATOR_NAME   "__real__"
 
#define CREALF_OPERATOR_NAME   "crealf"
 
#define CREALL_OPERATOR_NAME   "creall"
 
#define ISALNUM_OPERATOR_NAME   "isalnum"
 include <ctype.h> More...
 
#define ISALPHA_OPERATOR_NAME   "isalpha"
 
#define ISBLANK_OPERATOR_NAME   "isblank"
 
#define ISCNTRL_OPERATOR_NAME   "iscntrl"
 
#define ISDIGIT_OPERATOR_NAME   "isdigit"
 
#define ISGRAPH_OPERATOR_NAME   "isgraph"
 
#define ISLOWER_OPERATOR_NAME   "islower"
 
#define ISPRINT_OPERATOR_NAME   "isprint"
 
#define ISPUNCT_OPERATOR_NAME   "ispunct"
 
#define ISSPACE_OPERATOR_NAME   "isspace"
 
#define ISUPPER_OPERATOR_NAME   "isupper"
 
#define ISXDIGIT_OPERATOR_NAME   "isxdigit"
 
#define TOLOWER_OPERATOR_NAME   "tolower"
 
#define TOUPPER_OPERATOR_NAME   "toupper"
 
#define ISASCII_OPERATOR_NAME   "isascii"
 
#define TOASCII_OPERATOR_NAME   "toascii"
 
#define _TOLOWER_OPERATOR_NAME   "_tolower"
 
#define _TOUPPER_OPERATOR_NAME   "_toupper"
 
#define CTYPE_B_LOC_OPERATOR_NAME   "__ctype_b_loc"
 Part of the binary standard. More...
 
#define __ERRNO_LOCATION_OPERATOR_NAME   "__errno_location"
 bits/errno.h More...
 
#define FECLEAREXCEPT_FUNCTION_NAME   "feclearexcept"
 include <fenv.h> More...
 
#define FERAISEEXCEPT_FUNCTION_NAME   "feraiseexcept"
 
#define FESETEXCEPTFLAG_FUNCTION_NAME   "fesetexceptflag"
 
#define FETESTEXCEPT_FUNCTION_NAME   "fetestexcept"
 
#define FEGETROUND_FUNCTION_NAME   "fegetround"
 
#define FESETROUND_FUNCTION_NAME   "fesetround"
 
#define IMAXABS_FUNCTION_NAME   "imaxabs"
 include <inttypes.h> More...
 
#define IMAXDIV_FUNCTION_NAME   "imaxdiv"
 
#define SETLOCALE_FUNCTION_NAME   "setlocale"
 include <locale.h> More...
 
#define FPCLASSIFY_OPERATOR_NAME   "fpclassify"
 include <math.h> More...
 
#define ISFINITE_OPERATOR_NAME   "isfinite"
 
#define ISINF_OPERATOR_NAME   "isinf"
 
#define ISNAN_OPERATOR_NAME   "isnan"
 
#define ISNANL_OPERATOR_NAME   "isnanl"
 
#define ISNANF_OPERATOR_NAME   "isnanf"
 
#define ISNORMAL_OPERATOR_NAME   "isnormal"
 
#define SIGNBIT_OPERATOR_NAME   "signbit"
 
#define C_ACOS_OPERATOR_NAME   "acos"
 
#define ACOSF_OPERATOR_NAME   "acosf"
 
#define ACOSL_OPERATOR_NAME   "acosl"
 
#define C_ASIN_OPERATOR_NAME   "asin"
 
#define ASINF_OPERATOR_NAME   "asinf"
 
#define ASINL_OPERATOR_NAME   "asinl"
 
#define C_ATAN_OPERATOR_NAME   "atan"
 
#define ATANF_OPERATOR_NAME   "atanf"
 
#define ATANL_OPERATOR_NAME   "atanl"
 
#define C_ATAN2_OPERATOR_NAME   "atan2"
 
#define ATAN2F_OPERATOR_NAME   "atan2f"
 
#define ATAN2L_OPERATOR_NAME   "atan2l"
 
#define C_COS_OPERATOR_NAME   "cos"
 
#define COSF_OPERATOR_NAME   "cosf"
 
#define COSL_OPERATOR_NAME   "cosl"
 
#define C_SIN_OPERATOR_NAME   "sin"
 
#define SINF_OPERATOR_NAME   "sinf"
 
#define SINL_OPERATOR_NAME   "sinl"
 
#define C_TAN_OPERATOR_NAME   "tan"
 
#define TANF_OPERATOR_NAME   "tanf"
 
#define TANL_OPERATOR_NAME   "tanl"
 
#define C_ACOSH_OPERATOR_NAME   "acosh"
 
#define ACOSHF_OPERATOR_NAME   "acoshf"
 
#define ACOSHL_OPERATOR_NAME   "acoshl"
 
#define C_ASINH_OPERATOR_NAME   "asinh"
 
#define ASINHF_OPERATOR_NAME   "asinhf"
 
#define ASINHL_OPERATOR_NAME   "asinhl"
 
#define C_ATANH_OPERATOR_NAME   "atanh"
 
#define ATANHF_OPERATOR_NAME   "atanhf"
 
#define ATANHL_OPERATOR_NAME   "atanhl"
 
#define C_COSH_OPERATOR_NAME   "cosh"
 
#define COSHF_OPERATOR_NAME   "coshf"
 
#define COSHL_OPERATOR_NAME   "coshl"
 
#define C_SINH_OPERATOR_NAME   "sinh"
 
#define SINHF_OPERATOR_NAME   "sinhf"
 
#define SINHL_OPERATOR_NAME   "sinhl"
 
#define C_TANH_OPERATOR_NAME   "tanh"
 
#define TANHF_OPERATOR_NAME   "tanhf"
 
#define TANHL_OPERATOR_NAME   "tanhl"
 
#define C_EXP_OPERATOR_NAME   "exp"
 
#define EXPF_OPERATOR_NAME   "expf"
 
#define EXPL_OPERATOR_NAME   "expl"
 
#define EXP2_OPERATOR_NAME   "exp2"
 
#define EXP2F_OPERATOR_NAME   "exp2f"
 
#define EXP2L_OPERATOR_NAME   "exp2l"
 
#define EXPM1_OPERATOR_NAME   "expm1"
 
#define EXPM1F_OPERATOR_NAME   "expm1f"
 
#define EXPM1L_OPERATOR_NAME   "expm1l"
 
#define FREXP_OPERATOR_NAME   "frexp"
 
#define ILOGB_OPERATOR_NAME   "ilogb"
 
#define ILOGBF_OPERATOR_NAME   "ilogbf"
 
#define ILOGBL_OPERATOR_NAME   "ilogbl"
 
#define LDEXP_OPERATOR_NAME   "ldexp"
 
#define LDEXPF_OPERATOR_NAME   "ldexpf"
 
#define LDEXPL_OPERATOR_NAME   "ldexpl"
 
#define C_LOG_OPERATOR_NAME   "log"
 
#define LOGF_OPERATOR_NAME   "logf"
 
#define LOGL_OPERATOR_NAME   "logl"
 
#define C_LOG10_OPERATOR_NAME   "log10"
 
#define LOG10F_OPERATOR_NAME   "log10f"
 
#define LOG10L_OPERATOR_NAME   "log10l"
 
#define LOG1P_OPERATOR_NAME   "log1p"
 
#define LOG1PF_OPERATOR_NAME   "log1pf"
 
#define LOG1PL_OPERATOR_NAME   "log1pl"
 
#define LOG2_OPERATOR_NAME   "log2"
 
#define LOG2F_OPERATOR_NAME   "log2f"
 
#define LOG2L_OPERATOR_NAME   "log2l"
 
#define LOGB_OPERATOR_NAME   "logb"
 
#define LOGBF_OPERATOR_NAME   "logbf"
 
#define LOGBL_OPERATOR_NAME   "logbl"
 
#define MODF_OPERATOR_NAME   "modf"
 
#define SCALBN_OPERATOR_NAME   "scalbn"
 
#define SCALBNF_OPERATOR_NAME   "scalbnf"
 
#define SCALBNL_OPERATOR_NAME   "scalbnl"
 
#define SCALB_OPERATOR_NAME   "scalb"
 
#define SCALBLN_OPERATOR_NAME   "scalbln"
 
#define SCALBLNF_OPERATOR_NAME   "scalblnf"
 
#define SCALBLNL_OPERATOR_NAME   "scalblnl"
 
#define CBRT_OPERATOR_NAME   "cbrt"
 
#define CBRTF_OPERATOR_NAME   "cbrtf"
 
#define CBRTL_OPERATOR_NAME   "cbrtl"
 
#define FABS_OPERATOR_NAME   "fabs"
 
#define FABSF_OPERATOR_NAME   "fabsf"
 
#define FABSL_OPERATOR_NAME   "fabsl"
 
#define HYPOT_OPERATOR_NAME   "hypot"
 
#define HYPOTF_OPERATOR_NAME   "hypotf"
 
#define HYPOTL_OPERATOR_NAME   "hypotl"
 
#define POW_OPERATOR_NAME   "pow"
 
#define POWF_OPERATOR_NAME   "powf"
 
#define POWL_OPERATOR_NAME   "powl"
 
#define C_SQRT_OPERATOR_NAME   "sqrt"
 
#define SQRTF_OPERATOR_NAME   "sqrtf"
 
#define SQRTL_OPERATOR_NAME   "sqrtl"
 
#define ERF_OPERATOR_NAME   "erf"
 
#define ERFF_OPERATOR_NAME   "erff"
 
#define ERFL_OPERATOR_NAME   "erfl"
 
#define ERFC_OPERATOR_NAME   "erfc"
 
#define ERFCF_OPERATOR_NAME   "erfcf"
 
#define ERFCL_OPERATOR_NAME   "erfcl"
 
#define GAMMA_OPERATOR_NAME   "gamma"
 
#define LGAMMA_OPERATOR_NAME   "lgamma"
 
#define LGAMMAF_OPERATOR_NAME   "lgammaf"
 
#define LGAMMAL_OPERATOR_NAME   "lgammal"
 
#define TGAMMA_OPERATOR_NAME   "tgamma"
 
#define TGAMMAF_OPERATOR_NAME   "tgammaf"
 
#define TGAMMAL_OPERATOR_NAME   "tgammal"
 
#define CEIL_OPERATOR_NAME   "ceil"
 
#define CEILF_OPERATOR_NAME   "ceilf"
 
#define CEILL_OPERATOR_NAME   "ceill"
 
#define FLOOR_OPERATOR_NAME   "floor"
 
#define FLOORF_OPERATOR_NAME   "floorf"
 
#define FLOORL_OPERATOR_NAME   "floorl"
 
#define NEARBYINT_OPERATOR_NAME   "nearbyint"
 
#define NEARBYINTF_OPERATOR_NAME   "nearbyintf"
 
#define NEARBYINTL_OPERATOR_NAME   "nearbyintl"
 
#define RINT_OPERATOR_NAME   "rint"
 
#define RINTF_OPERATOR_NAME   "rintf"
 
#define RINTL_OPERATOR_NAME   "rintl"
 
#define LRINT_OPERATOR_NAME   "lrint"
 
#define LRINTF_OPERATOR_NAME   "lrintf"
 
#define LRINTL_OPERATOR_NAME   "lrintl"
 
#define LLRINT_OPERATOR_NAME   "llrint"
 
#define LLRINTF_OPERATOR_NAME   "llrintf"
 
#define LLRINTL_OPERATOR_NAME   "llrintl"
 
#define ROUND_OPERATOR_NAME   "round"
 
#define ROUNDF_OPERATOR_NAME   "roundf"
 
#define ROUNDL_OPERATOR_NAME   "roundl"
 
#define LROUND_OPERATOR_NAME   "lround"
 
#define LROUNDF_OPERATOR_NAME   "lroundf"
 
#define LROUNDL_OPERATOR_NAME   "lroundl"
 
#define LLROUND_OPERATOR_NAME   "llround"
 
#define LLROUNDF_OPERATOR_NAME   "llroundf"
 
#define LLROUNDL_OPERATOR_NAME   "llroundl"
 
#define TRUNC_OPERATOR_NAME   "trunc"
 
#define TRUNCF_OPERATOR_NAME   "truncf"
 
#define TRUNCL_OPERATOR_NAME   "truncl"
 
#define FMOD_OPERATOR_NAME   "fmod"
 
#define FMODF_OPERATOR_NAME   "fmodf"
 
#define FMODL_OPERATOR_NAME   "fmodl"
 
#define REMAINDER_OPERATOR_NAME   "remainder"
 
#define REMAINDERF_OPERATOR_NAME   "remainderf"
 
#define REMAINDERL_OPERATOR_NAME   "remainderl"
 
#define COPYSIGN_OPERATOR_NAME   "copysign"
 
#define COPYSIGNF_OPERATOR_NAME   "copysignf"
 
#define COPYSIGNL_OPERATOR_NAME   "copysignl"
 
#define NAN_OPERATOR_NAME   "nan"
 
#define NANF_OPERATOR_NAME   "nanf"
 
#define NANL_OPERATOR_NAME   "nanl"
 
#define NEXTAFTER_OPERATOR_NAME   "nextafter"
 
#define NEXTAFTERF_OPERATOR_NAME   "nextafterf"
 
#define NEXTAFTERL_OPERATOR_NAME   "nextafterl"
 
#define NEXTTOWARD_OPERATOR_NAME   "nexttoward"
 
#define NEXTTOWARDF_OPERATOR_NAME   "nexttowardf"
 
#define NEXTTOWARDL_OPERATOR_NAME   "nexttowardl"
 
#define FDIM_OPERATOR_NAME   "fdim"
 
#define FDIMF_OPERATOR_NAME   "fdimf"
 
#define FDIML_OPERATOR_NAME   "fdiml"
 
#define FMAX_OPERATOR_NAME   "fmax"
 
#define FMAXF_OPERATOR_NAME   "fmaxf"
 
#define FMAXL_OPERATOR_NAME   "fmaxl"
 
#define FMIN_OPERATOR_NAME   "fmin"
 
#define FMINF_OPERATOR_NAME   "fminf"
 
#define FMINL_OPERATOR_NAME   "fminl"
 
#define FMA_OPERATOR_NAME   "fma"
 
#define FMAF_OPERATOR_NAME   "fmaf"
 
#define FMAL_OPERATOR_NAME   "fmal"
 
#define ISGREATER_OPERATOR_NAME   "isgreater"
 
#define ISGREATEREQUAL_OPERATOR_NAME   "isgreaterequal"
 
#define ISLESS_OPERATOR_NAME   "isless"
 
#define ISLESSEQUAL_OPERATOR_NAME   "islessequal"
 
#define ISLESSGREATER_OPERATOR_NAME   "islessgreater"
 
#define ISUNORDERED_OPERATOR_NAME   "isunordered"
 
#define SIGNAL_OPERATOR_NAME   "signal"
 signal.h More...
 
#define RAISE_FUNCTION_NAME   "raise"
 
#define BUILTIN_VA_END   "__builtin_va_end"
 vararg stuff. More...
 
#define BUILTIN_VA_START   "__builtin_va_start"
 
#define BUILTIN_VA_COPY   "__builtin_va_copy"
 
#define LSEEK_FUNCTION_NAME   "lseek"
 o functions: C library and system IO. More...
 
#define LSEEK64_FUNCTION_NAME   "lseekg4"
 
#define C_CLOSE_FUNCTION_NAME   "close"
 
#define C_READ_FUNCTION_NAME   "read"
 
#define C_WRITE_FUNCTION_NAME   "write"
 
#define PREAD_FUNCTION_NAME   "pread"
 
#define PWRITE_FUNCTION_NAME   "pwrite"
 
#define PREAD64_FUNCTION_NAME   "pread64"
 
#define PIPE_FUNCTION_NAME   "pipe"
 
#define PIPE2_FUNCTION_NAME   "pipe2"
 
#define SLEEP_FUNCTION_NAME   "sleep"
 
#define UALARM_FUNCTION_NAME   "ualarm"
 
#define USLEEP_FUNCTION_NAME   "usleep"
 
#define C_PAUSE_FUNCTION_NAME   "pause"
 
#define CHOWN_FUNCTION_NAME   "chown"
 
#define FCHOWN_FUNCTION_NAME   "fchown"
 
#define LCHOWN_FUNCTION_NAME   "lchown"
 
#define FCHOWNAT_FUNCTION_NAME   "fchownat"
 
#define CHDIR_FUNCTION_NAME   "chdir"
 
#define FCHDIR_FUNCTION_NAME   "fchdir"
 
#define GETCWD_FUNCTION_NAME   "getcwd"
 
#define GET_CURRENT_DIR_NAME_FUNCTION_NAME   "get_current_dir_name"
 
#define GETWD_FUNCTION_NAME   "getwd"
 
#define DUP_FUNCTION_NAME   "dup"
 
#define DUP2_FUNCTION_NAME   "dup2"
 
#define DUP3_FUNCTION_NAME   "dup3"
 
#define EXECVE_FUNCTION_NAME   "execve"
 
#define FEXECVE_FUNCTION_NAME   "fexecve"
 
#define EXECV_FUNCTION_NAME   "execv"
 
#define EXECLE_FUNCTION_NAME   "execle"
 
#define EXECL_FUNCTION_NAME   "execl"
 
#define EXECVP_FUNCTION_NAME   "execvp"
 
#define EXECLP_FUNCTION_NAME   "execlp"
 
#define EXECVPE_FUNCTION_NAME   "execvpe"
 
#define NICE_FUNCTION_NAME   "nice"
 
#define _EXIT_FUNCTION_NAME   "_exit"
 
#define PATHCONF_FUNCTION_NAME   "pathconf"
 
#define FPATHCONF_FUNCTION_NAME   "fpathconf"
 
#define SYSCONF_FUNCTION_NAME   "sysconf"
 
#define CONFSTR_FUNCTION_NAME   "constrf"
 
#define GETPID_FUNCTION_NAME   "getpid"
 
#define GETPPID_FUNCTION_NAME   "getppid"
 
#define GETPGRP_FUNCTION_NAME   "getpgrp"
 
#define __GETPGID_FUNCTION_NAME   "__getpgid"
 
#define GETPGID_FUNCTION_NAME   "getpgid"
 
#define SETPGID_FUNCTION_NAME   "setpgid"
 
#define SETPGRP_FUNCTION_NAME   "setpgrp"
 
#define SETSID_FUNCTION_NAME   "setsid"
 
#define GETSID_FUNCTION_NAME   "getsid"
 
#define GETUID_FUNCTION_NAME   "getuid"
 
#define GETEUID_FUNCTION_NAME   "geteuid"
 
#define GETGID_FUNCTION_NAME   "getgid"
 
#define GETEGID_FUNCTION_NAME   "getegid"
 
#define GETPGROUPS_FUNCTION_NAME   "getgroups"
 
#define GROUP_MEMBER_FUNCTION_NAME   "group_member"
 
#define SETUID_FUNCTION_NAME   "setuid"
 
#define SETREUID_FUNCTION_NAME   "setreuid"
 
#define SETEUID_FUNCTION_NAME   "seteuid"
 
#define SETGID_FUNCTION_NAME   "setgid"
 
#define SETREGID_FUNCTION_NAME   "setregid"
 
#define SETEGID_FUNCTION_NAME   "setegid"
 
#define GETRESUID_FUNCTION_NAME   "getresuid"
 
#define GETRESGID_FUNCTION_NAME   "getresgid"
 
#define SETRESUID_FUNCTION_NAME   "setresuid"
 
#define SETRESGID_FUNCTION_NAME   "setresgid"
 
#define FORK_FUNCTION_NAME   "fork"
 
#define VFORK_FUNCTION_NAME   "vfork"
 
#define TTYNAME_FUNCTION_NAME   "ttyname"
 
#define TTYNAME_R_FUNCTION_NAME   "ttyname_r"
 
#define ISATTY_FUNCTION_NAME   "isatty"
 
#define TTYSLOT_FUNCTION_NAME   "ttyslot"
 
#define LINK_FUNCTION_NAME   "link"
 
#define LINKAT_FUNCTION_NAME   "linkat"
 
#define SYMLINK_FUNCTION_NAME   "symlink"
 
#define READLINK_FUNCTION_NAME   "readlink"
 
#define SYMLINKAT_FUNCTION_NAME   "symlinkar"
 
#define READLINKAT_FUNCTION_NAME   "readlinkat"
 
#define UNLINK_FUNCTION_NAME   "unlink"
 
#define UNLINKAT_FUNCTION_NAME   "unlinkat"
 
#define RMDIR_FUNCTION_NAME   "rmdir"
 
#define TCGETPGRP_FUNCTION_NAME   "tcgetpgrp"
 
#define TCSETPGRP_FUNCTION_NAME   "tcsetpgrp"
 
#define GETLOGIN_FUNCTION_NAME   "getlogin"
 
#define GETLOGIN_R_FUNCTION_NAME   "getlogin_r"
 
#define SETLOGIN_FUNCTION_NAME   "setlogin"
 
#define GETHOSTNAME_FUNCTION_NAME   "gethostname"
 
#define SETHOSTNAME_FUNCTION_NAME   "sethostname"
 
#define SETHOSTID_FUNCTION_NAME   "sethostid"
 
#define GETDOMAINNAME_FUNCTION_NAME   "getdomainname"
 
#define SETDOMAINNAME_FUNCTION_NAME   "setdomainname"
 
#define VHANGUP_FUNCTION_NAME   "vhangup"
 
#define REVOKE_FUNCTION_NAME   "revoke"
 
#define PROFIL_FUNCTION_NAME   "profil"
 
#define ACCT_FUNCTION_NAME   "acct"
 
#define GETUSERSHELL_FUNCTION_NAME   "getusershell"
 
#define ENDUSERSHELL_FUNCTION_NAME   "endusershell"
 
#define SETUSERSHELL_FUNCTION_NAME   "setusershell"
 
#define DAEMON_FUNCTION_NAME   "daemon"
 
#define CHROOT_FUNCTION_NAME   "chroot"
 
#define GETPASS_FUNCTION_NAME   "getpass"
 
#define FSYNC_FUNCTION_NAME   "fsync"
 fcntl is declared with fcntl.h More...
 
#define SYNCFS_FUNCTION_NAME   "syncfs"
 
#define GETHOSTID_FUNCTION_NAME   "gethostid"
 
#define GETPAGESIZE_FUNCTION_NAME   "getpagesize"
 
#define GETDTABLESIZE_FUNCTION_NAME   "getdtablesize"
 
#define TRUNCATE_FUNCTION_NAME   "truncate"
 
#define TRUNCATE64_FUNCTION_NAME   "truncate64"
 
#define FTRUNCATE_FUNCTION_NAME   "ftruncate"
 
#define FTRUNCATE64_FUNCTION_NAME   "ftruncate64"
 
#define BRK_FUNCTION_NAME   "brk"
 
#define SBRK_FUNCTION_NAME   "sbrk"
 
#define SYSCALL_FUNCTION_NAME   "syscall"
 
#define LOCKF_FUNCTION_NAME   "lockf"
 
#define LOCKF64_FUNCTION_NAME   "lockf64"
 
#define FDATASYNC_FUNCTION_NAME   "fdatasync"
 
#define CRYPT_FUNCTION_NAME   "crypt"
 
#define ENCRYPT_FUNCTION_NAME   "encrypt"
 
#define SWAB_FUNCTION_NAME   "swab"
 
#define CTERMID_FUNCTION_NAME   "ctermid"
 
#define C_OPEN_FUNCTION_NAME   "open"
 Not found in unistd.h. More...
 
#define PRINTF_FUNCTION_NAME   "printf"
 include<stdio.h> More...
 
#define FPRINTF_FUNCTION_NAME   "fprintf"
 
#define SCANF_FUNCTION_NAME   "scanf"
 
#define ISOC99_SCANF_FUNCTION_NAME   "__isoc99_scanf"
 
#define ISOC99_SCANF_USER_FUNCTION_NAME   "scanf"
 
#define FSCANF_FUNCTION_NAME   "fscanf"
 
#define ISOC99_FSCANF_FUNCTION_NAME   "__isoc99_fscanf"
 
#define ISOC99_FSCANF_USER_FUNCTION_NAME   "fscanf"
 
#define PUTS_FUNCTION_NAME   "puts"
 
#define GETS_FUNCTION_NAME   "gets"
 
#define FPUTS_FUNCTION_NAME   "fputs"
 
#define FGETS_FUNCTION_NAME   "fgets"
 
#define FPUTC_FUNCTION_NAME   "fputc"
 
#define FGETC_FUNCTION_NAME   "fgetc"
 
#define FOPEN_FUNCTION_NAME   "fopen"
 
#define FDOPEN_FUNCTION_NAME   "fdopen"
 
#define FREOPEN_FUNCTION_NAME   "freopen"
 
#define FCLOSE_FUNCTION_NAME   "fclose"
 
#define SNPRINTF_FUNCTION_NAME   "snprintf"
 
#define SSCANF_FUNCTION_NAME   "sscanf"
 
#define ISOC99_SSCANF_FUNCTION_NAME   "__isoc99_sscanf"
 
#define ISOC99_SSCANF_USER_FUNCTION_NAME   "sscanf"
 
#define VFPRINTF_FUNCTION_NAME   "vfprintf"
 
#define VFSCANF_FUNCTION_NAME   "vfscanf"
 
#define ISOC99_VFSCANF_FUNCTION_NAME   "__isoc99_vfscanf"
 
#define ISOC99_VFSCANF_USER_FUNCTION_NAME   "vfscanf"
 
#define VPRINTF_FUNCTION_NAME   "vprintf"
 
#define VSCANF_FUNCTION_NAME   "vscanf"
 
#define ISOC99_VSCANF_FUNCTION_NAME   "__isoc99_vscanf"
 
#define ISOC99_VSCANF_USER_FUNCTION_NAME   "vscanf"
 
#define VSSCANF_FUNCTION_NAME   "vsscanf"
 
#define ISOC99_VSSCANF_FUNCTION_NAME   "__isoc99_vsscanf"
 
#define ISOC99_VSSCANF_USER_FUNCTION_NAME   "vsscanf"
 
#define VSNPRINTF_FUNCTION_NAME   "vsnprintf"
 
#define VSPRINTF_FUNCTION_NAME   "vsprintf"
 
#define SPRINTF_FUNCTION_NAME   "sprintf"
 
#define GETC_FUNCTION_NAME   "getc"
 
#define _IO_GETC_FUNCTION_NAME   "_IO_getc" /**libio.h */
 
#define GETCHAR_FUNCTION_NAME   "getchar"
 
#define PUTC_FUNCTION_NAME   "putc"
 
#define _IO_PUTC_FUNCTION_NAME   "_IO_putc" /**libio.h */
 
#define PUTCHAR_FUNCTION_NAME   "putchar"
 
#define UNGETC_FUNCTION_NAME   "ungetc"
 
#define FREAD_FUNCTION_NAME   "fread"
 
#define FWRITE_FUNCTION_NAME   "fwrite"
 
#define FGETPOS_FUNCTION_NAME   "fgetpos"
 
#define FSEEK_FUNCTION_NAME   "fseek"
 
#define FSETPOS_FUNCTION_NAME   "fsetpos"
 
#define FTELL_FUNCTION_NAME   "ftell"
 
#define C_REWIND_FUNCTION_NAME   "rewind"
 
#define CLEARERR_FUNCTION_NAME   "clearerr"
 
#define FEOF_FUNCTION_NAME   "feof"
 
#define FERROR_FUNCTION_NAME   "ferror"
 
#define FILENO_FUNCTION_NAME   "fileno"
 
#define PERROR_FUNCTION_NAME   "perror"
 
#define REMOVE_FUNCTION_NAME   "remove"
 
#define RENAME_FUNCTION_NAME   "rename"
 
#define TMPFILE_FUNCTION_NAME   "tmpfile"
 
#define TMPNAM_FUNCTION_NAME   "tmpnam"
 
#define FFLUSH_FUNCTION_NAME   "fflush"
 
#define FREOPEN_FUNCTION_NAME   "freopen"
 
#define SETBUF_FUNCTION_NAME   "setbuf"
 
#define SETVBUF_FUNCTION_NAME   "setvbuf"
 
#define __FILBUF_FUNCTION_NAME   "__filbuf"
 
#define __FILSBUF_FUNCTION_NAME   "__flsbuf"
 
#define SETBUFFER_FUNCTION_NAME   "setbuffer"
 
#define SETLINEBUF_FUNCTION_NAME   "setlinebuf"
 
#define FDOPEN_FUNCTION_NAME   "fdopen"
 
#define CTERMID_FUNCTION_NAME   "ctermid"
 
#define FILENO_FUNCTION_NAME   "fileno"
 
#define POPEN_FUNCTION_NAME   "popen"
 
#define CUSERID_FUNCTION_NAME   "cuserid"
 
#define TEMPNAM_FUNCTION_NAME   "tempnam"
 
#define GETW_FUNCTION_NAME   "getw"
 
#define PUTW_FUNCTION_NAME   "putw"
 
#define PCLOSE_FUNCTION_NAME   "pclose"
 
#define FSEEKO_FUNCTION_NAME   "fseeko"
 
#define FTELLO_FUNCTION_NAME   "ftello"
 
#define FOPEN64_FUNCTION_NAME   "fopen64"
 
#define FREOPEN64_FUNCTION_NAME   "freopen64"
 
#define TMPFILE64_FUNCTION_NAME   "tmpfile64"
 
#define FGETPOS64_FUNCTION_NAME   "fgetpos64"
 
#define FSETPOS64_FUNCTION_NAME   "fsetpos64"
 
#define FSEEKO64_FUNCTION_NAME   "fseeko64"
 
#define FTELLO64_FUNCTION_NAME   "ftello64"
 
#define EXITHANDLE_FUNCTION_NAME   "exithandle"
 
#define ATOF_FUNCTION_NAME   "atof"
 random functions of <stdlib.h> More...
 
#define ATOI_FUNCTION_NAME   "atoi"
 
#define ATOL_FUNCTION_NAME   "atol"
 
#define ATOLL_FUNCTION_NAME   "atoll"
 
#define STRTOD_FUNCTION_NAME   "strtod"
 
#define STRTOF_FUNCTION_NAME   "strtof"
 
#define STRTOLD_FUNCTION_NAME   "strtold"
 
#define STRTOL_FUNCTION_NAME   "strtol"
 
#define STRTOLL_FUNCTION_NAME   "strtoll"
 
#define STRTOUL_FUNCTION_NAME   "strtoul"
 
#define STRTOULL_FUNCTION_NAME   "strtoull"
 
#define RAND_FUNCTION_NAME   "rand"
 
#define SRAND_FUNCTION_NAME   "srand"
 
#define CALLOC_FUNCTION_NAME   "calloc"
 
#define FREE_FUNCTION_NAME   "free"
 
#define MALLOC_FUNCTION_NAME   "malloc"
 
#define REALLOC_FUNCTION_NAME   "realloc"
 
#define ALLOCA_FUNCTION_NAME   "alloca"
 
#define ABORT_FUNCTION_NAME   "abort"
 
#define ATEXIT_FUNCTION_NAME   "atexit"
 
#define EXIT_FUNCTION_NAME   "exit"
 
#define _EXIT_FUNCTION_NAME   "_exit"
 
#define GETENV_FUNCTION_NAME   "getenv"
 
#define SYSTEM_FUNCTION_NAME   "system"
 
#define BSEARCH_FUNCTION_NAME   "bsearch"
 
#define QSORT_FUNCTION_NAME   "qsort"
 
#define C_ABS_FUNCTION_NAME   "abs"
 
#define LABS_FUNCTION_NAME   "labs"
 
#define LLABS_FUNCTION_NAME   "llabs"
 
#define DIV_FUNCTION_NAME   "div"
 
#define LDIV_FUNCTION_NAME   "ldiv"
 
#define LLDIV_FUNCTION_NAME   "lldiv"
 
#define MBLEN_FUNCTION_NAME   "mblen"
 
#define MBTOWC_FUNCTION_NAME   "mbtowc"
 
#define WCTOMB_FUNCTION_NAME   "wctomb"
 
#define MBSTOWCS_FUNCTION_NAME   "mbstowcs"
 
#define WCSTOMBS_FUNCTION_NAME   "wcstombs"
 
#define MEMCPY_FUNCTION_NAME   "memcpy"
 include <string.h> More...
 
#define MEMMOVE_FUNCTION_NAME   "memmove"
 
#define STRCPY_FUNCTION_NAME   "strcpy"
 
#define STRDUP_FUNCTION_NAME   "strdup"
 
#define STRNCPY_FUNCTION_NAME   "strncpy"
 
#define STRCAT_FUNCTION_NAME   "strcat"
 
#define STRNCAT_FUNCTION_NAME   "strncat"
 
#define MEMCMP_FUNCTION_NAME   "memcmp"
 
#define STRCMP_FUNCTION_NAME   "strcmp"
 
#define STRCOLL_FUNCTION_NAME   "strcoll"
 
#define STRNCMP_FUNCTION_NAME   "strncmp"
 
#define STRXFRM_FUNCTION_NAME   "strxfrm"
 
#define MEMCHR_FUNCTION_NAME   "memchr"
 
#define STRCHR_FUNCTION_NAME   "strchr"
 
#define STRCSPN_FUNCTION_NAME   "strcspn"
 
#define STRPBRK_FUNCTION_NAME   "strbprk"
 
#define STRRCHR_FUNCTION_NAME   "strrchr"
 
#define STRSPN_FUNCTION_NAME   "strspn"
 
#define STRSTR_FUNCTION_NAME   "strstr"
 
#define STRTOK_FUNCTION_NAME   "strtok"
 
#define MEMSET_FUNCTION_NAME   "memset"
 
#define STRERROR_FUNCTION_NAME   "strerror"
 
#define STRERROR_R_FUNCTION_NAME   "strerror_r"
 
#define STRLEN_FUNCTION_NAME   "strlen"
 
#define TIME_FUNCTION_NAME   "time"
 include<time.h> More...
 
#define LOCALTIME_FUNCTION_NAME   "localtime"
 
#define DIFFTIME_FUNCTION_NAME   "difftime"
 
#define NANOSLEEP_FUNCTION_NAME   "nanosleep"
 
#define FWPRINTF_FUNCTION_NAME   "fwprintf"
 include <wchar.h> More...
 
#define FWSCANF_FUNCTION_NAME   "fwscanf"
 
#define SWPRINTF_FUNCTION_NAME   "swprintf"
 
#define SWSCANF_FUNCTION_NAME   "swscanf"
 
#define VFWPRINTF_FUNCTION_NAME   "vfwprintf"
 
#define VFWSCANF_FUNCTION_NAME   "vfwscanf"
 
#define VSWPRINTF_FUNCTION_NAME   "vswprintf"
 
#define VSWSCANF_FUNCTION_NAME   "vswscanf"
 
#define VWPRINTF_FUNCTION_NAME   "vwprintf"
 
#define VWSCANF_FUNCTION_NAME   "vwscanf"
 
#define WPRINTF_FUNCTION_NAME   "wprintf"
 
#define WSCANF_FUNCTION_NAME   "wscanf"
 
#define FGETWC_FUNCTION_NAME   "fgetwc"
 
#define FGETWS_FUNCTION_NAME   "fgetws"
 
#define FPUTWC_FUNCTION_NAME   "fputwc"
 
#define FPUTWS_FUNCTION_NAME   "fputws"
 
#define FWIDE_FUNCTION_NAME   "fwide"
 
#define GETWC_FUNCTION_NAME   "getwc"
 
#define GETWCHAR_FUNCTION_NAME   "getwchar"
 
#define PUTWC_FUNCTION_NAME   "putwc"
 
#define PUTWCHAR_FUNCTION_NAME   "putwchar"
 
#define UNGETWC_FUNCTION_NAME   "ungetwc"
 
#define WCSTOD_FUNCTION_NAME   "wcstod"
 
#define WCSTOF_FUNCTION_NAME   "wcstof"
 
#define WCSTOLD_FUNCTION_NAME   "wcstold"
 
#define WCSTOL_FUNCTION_NAME   "wcstol"
 
#define WCSTOLL_FUNCTION_NAME   "wcstoll"
 
#define WCSTOUL_FUNCTION_NAME   "wcstoul"
 
#define WCSTOULL_FUNCTION_NAME   "wcstoull"
 
#define WCSCPY_FUNCTION_NAME   "wcscpy"
 
#define WCSNCPY_FUNCTION_NAME   "wcsncpy"
 
#define WMEMCPY_FUNCTION_NAME   "wmemcpy"
 
#define WMEMMOVE_FUNCTION_NAME   "wmemmove"
 
#define WCSCAT_FUNCTION_NAME   "wcscat"
 
#define WCSNCAT_FUNCTION_NAME   "wcsncat"
 
#define WCSCMP_FUNCTION_NAME   "wcscmp"
 
#define WCSCOLL_FUNCTION_NAME   "wcscoll"
 
#define WCSNCMP_FUNCTION_NAME   "wcsncmp"
 
#define WCSXFRM_FUNCTION_NAME   "wcsxfrm"
 
#define WMEMCMP_FUNCTION_NAME   "wmemcmp"
 
#define WCSCHR_FUNCTION_NAME   "wcschr"
 
#define WCSCSPN_FUNCTION_NAME   "wcscspn"
 
#define WCSPBRK_FUNCTION_NAME   "wcspbrk"
 
#define WCSRCHR_FUNCTION_NAME   "wcsrchr"
 
#define WCSSPN_FUNCTION_NAME   "wcsspn"
 
#define WCSSTR_FUNCTION_NAME   "wcsstr"
 
#define WCSTOK_FUNCTION_NAME   "wcstok"
 
#define WMEMCHR_FUNCTION_NAME   "wmemchr"
 
#define WCSLEN_FUNCTION_NAME   "wcslen"
 
#define WMEMSET_FUNCTION_NAME   "wmemset"
 
#define WCSFTIME_FUNCTION_NAME   "wcsftime"
 
#define BTOWC_FUNCTION_NAME   "btowc"
 
#define WCTOB_FUNCTION_NAME   "wctob"
 
#define MBSINIT_FUNCTION_NAME   "mbsinit"
 
#define MBRLEN_FUNCTION_NAME   "mbrlen"
 
#define MBRTOWC_FUNCTION_NAME   "mbrtowc"
 
#define WCRTOMB_FUNCTION_NAME   "wcrtomb"
 
#define MBSRTOWCS_FUNCTION_NAME   "mbsrtowcs"
 
#define WCSRTOMBS_FUNCTION_NAME   "wcsrtombs"
 
#define ISWALNUM_OPERATOR_NAME   "iswalnum"
 include <wctype.h> More...
 
#define ISWALPHA_OPERATOR_NAME   "iswalpha"
 
#define ISWBLANK_OPERATOR_NAME   "iswblank"
 
#define ISWCNTRL_OPERATOR_NAME   "iswcntrl"
 
#define ISWDIGIT_OPERATOR_NAME   "iswdigit"
 
#define ISWGRAPH_OPERATOR_NAME   "iswgraph"
 
#define ISWLOWER_OPERATOR_NAME   "iswlower"
 
#define ISWPRINT_OPERATOR_NAME   "iswprint"
 
#define ISWPUNCT_OPERATOR_NAME   "iswpunct"
 
#define ISWSPACE_OPERATOR_NAME   "iswspace"
 
#define ISWUPPER_OPERATOR_NAME   "iswupper"
 
#define ISWXDIGIT_OPERATOR_NAME   "iswxdigit"
 
#define ISWCTYPE_OPERATOR_NAME   "iswctype"
 
#define WCTYPE_OPERATOR_NAME   "wctype"
 
#define TOWLOWER_OPERATOR_NAME   "towlower"
 
#define TOWUPPER_OPERATOR_NAME   "towupper"
 
#define TOWCTRANS_OPERATOR_NAME   "towctrans"
 
#define WCTRANS_OPERATOR_NAME   "wctrans"
 
#define FCNTL_FUNCTION_NAME   "fcntl"
 include <fcntl.h> More...
 
#define CREAT_FUNCTION_NAME   "creat"
 
#define DIRECTIO_FUNCTION_NAME   "directio"
 
#define OPEN64_FUNCTION_NAME   "open64"
 
#define CREAT64_FUNCTION_NAME   "creat64"
 
#define FSYNC_FUNCTION_NAME   "fsync"
 fcntl is declared with fcntl.h More...
 
#define FDATASYNC_FUNCTION_NAME   "fdatasync"
 
#define IOCTL_FUNCTION_NAME   "ioctl"
 
#define SELECT_FUNCTION_NAME   "select"
 
#define PSELECT_FUNCTION_NAME   "pselect"
 
#define STAT_FUNCTION_NAME   "stat"
 
#define FSTAT_FUNCTION_NAME   "fstat"
 
#define LSTAT_FUNCTION_NAME   "lstat"
 
#define J0_OPERATOR_NAME   "j0"
 
#define J1_OPERATOR_NAME   "j1"
 
#define JN_OPERATOR_NAME   "jn"
 
#define Y0_OPERATOR_NAME   "y0"
 
#define Y1_OPERATOR_NAME   "y1"
 
#define YN_OPERATOR_NAME   "yn"
 
#define NEXTAFTER_OPERATOR_NAME   "nextafter"
 
#define REMAINDER_OPERATOR_NAME   "remainder"
 
#define MATHERR_OPERATOR_NAME   "matherr"
 
#define SIGNIFICAND_OPERATOR_NAME   "significand"
 
#define MODFF_OPERATOR_NAME   "modff"
 
#define SIGFPE_OPERATOR_NAME   "sigfpe"
 
#define SINGLE_TO_DECIMAL_OPERATOR_NAME   "single_to_decimal"
 
#define DOUBLE_TO_DECIMAL_OPERATOR_NAME   "double_to_decimal"
 
#define EXTENDED_TO_DECIMAL_OPERATOR_NAME   "extended_to_decimal"
 
#define QUADRUPLE_TO_DECIMAL_OPERATOR_NAME   "quadruple_to_decimal"
 
#define DECIMAL_TO_SINGLE_OPERATOR_NAME   "decimal_to_single"
 
#define DECIMAL_TO_DOUBLE_OPERATOR_NAME   "decimal_to_double"
 
#define DECIMAL_TO_EXTENDED_OPERATOR_NAME   "decimal_to_extended"
 
#define DECIMAL_TO_QUADRUPLE_OPERATOR_NAME   "decimal_to_quadruple"
 
#define STRING_TO_DECIMAL_OPERATOR_NAME   "string_to_decimal"
 
#define FUNC_TO_DECIMAL_OPERATOR_NAME   "func_to_decimal"
 
#define FILE_TO_DECIMAL_OPERATOR_NAME   "file_to_decimal"
 
#define SECONVERT_OPERATOR_NAME   "seconvert"
 
#define SFCONVERT_OPERATOR_NAME   "sfconvert"
 
#define SGCONVERT_OPERATOR_NAME   "sgconvert"
 
#define ECONVERT_OPERATOR_NAME   "econvert"
 
#define FCONVERT_OPERATOR_NAME   "fconvert"
 
#define GCONVERT_OPERATOR_NAME   "gconvert"
 
#define QECONVERT_OPERATOR_NAME   "qeconvert"
 
#define QFCONVERT_OPERATOR_NAME   "qfconvert"
 
#define QGCONVERT_OPERATOR_NAME   "qgconvert"
 
#define CLOCK_FUNCTION_NAME   "clock"
 time.h More...
 
#define SECOND_FUNCTION_NAME   "SECOND"
 
#define CLOCK_GETTIME_FUNCTION_NAME   "clock_gettime"
 
#define GETTIMEOFDAY_FUNCTION_NAME   "gettimeofday"
 
#define __H_ERRNO_LOCATION_OPERATOR_NAME   "__h_erno_location"
 netdb.h More...
 
#define EOLE_FMA_OPERATOR_NAME   "EOLE-FMA-OP"
 These operators are used within the optimize transformation in order to manipulate operators such as n-ary add and multiply or multiply-add operators ( JZ - sept 98) More...
 
#define EOLE_FMS_OPERATOR_NAME   "EOLE-FMS-OP"
 
#define EOLE_PROD_OPERATOR_NAME   "EOLE-PROD-OP"
 
#define EOLE_SUM_OPERATOR_NAME   "EOLE-SUM-OP"
 
#define IMA_OPERATOR_NAME   "IMA-OP"
 Integer Multiply Add and Sub, FC 27/10/2005 for FI. More...
 
#define IMS_OPERATOR_NAME   "IMS-OP"
 
#define LOOP_COUNTER_MODULE_NAME   "LOOP-COUNTER"
 moved from ricedg-local.h More...
 
#define DI_VAR_MODULE_NAME   "DI-VAR"
 
#define PIPS_MEMORY_BARRIER_OPERATOR_NAME   "__pips_memory_barrier"
 special pips intrinsics with global effects More...
 
#define PIPS_IO_BARRIER_OPERATOR_NAME   "__pips_io_barrier"
 
#define entity_an_operator_p(e, name)    (same_string_p(global_name_to_user_name(entity_name(e)), name##_OPERATOR_NAME))
 macros More...
 
#define entity_a_function_p(e, name)    (same_string_p(global_name_to_user_name(entity_name(e)), name##_FUNCTION_NAME))
 
#define entity_a_special_entity_p(e, name)    (same_string_p(global_name_to_user_name(entity_name(e)), name))
 
#define ENTITY_CONVERSION_P(e, name)    (strcmp(entity_local_name(e), name##_GENERIC_CONVERSION_NAME)==0)
 
#define ENTITY_CONVERSION_CMPLX_P(e)   ENTITY_CONVERSION_P(e, CMPLX)
 
#define ENTITY_CONVERSION_DCMPLX_P(e)   ENTITY_CONVERSION_P(e, DCMPLX)
 
#define ENTITY_CONTINUE_P(e)   entity_a_function_p(e, CONTINUE)
 
#define ENTITY_STOP_P(e)   entity_a_function_p(e, STOP)
 
#define ENTITY_RETURN_P(e)   entity_a_function_p(e, RETURN)
 
#define ENTITY_C_RETURN_P(e)   entity_a_function_p(e, C_RETURN)
 
#define ENTITY_ASSIGN_P(e)   entity_an_operator_p(e, ASSIGN)
 
#define ENTITY_POST_INCREMENT_P(e)   entity_an_operator_p(e, POST_INCREMENT)
 
#define ENTITY_POST_DECREMENT_P(e)   entity_an_operator_p(e, POST_DECREMENT)
 
#define ENTITY_PRE_INCREMENT_P(e)   entity_an_operator_p(e, PRE_INCREMENT)
 
#define ENTITY_PRE_DECREMENT_P(e)   entity_an_operator_p(e, PRE_DECREMENT)
 
#define ENTITY_MULTIPLY_UPDATE_P(e)   entity_an_operator_p(e, MULTIPLY_UPDATE)
 
#define ENTITY_DIVIDE_UPDATE_P(e)   entity_an_operator_p(e, DIVIDE_UPDATE)
 
#define ENTITY_MODULO_UPDATE_P(e)   entity_an_operator_p(e, MODULO_UPDATE)
 
#define ENTITY_PLUS_UPDATE_P(e)   entity_an_operator_p(e, PLUS_UPDATE)
 
#define ENTITY_MINUS_UPDATE_P(e)   entity_an_operator_p(e, MINUS_UPDATE)
 
#define ENTITY_LEFT_SHIFT_UPDATE_P(e)   entity_an_operator_p(e, LEFT_SHIFT_UPDATE)
 
#define ENTITY_RIGHT_SHIFT_UPDATE_P(e)   entity_an_operator_p(e, RIGHT_SHIFT_UPDATE)
 
#define ENTITY_BITWISE_AND_UPDATE_P(e)   entity_an_operator_p(e, BITWISE_AND_UPDATE)
 
#define ENTITY_BITWISE_XOR_UPDATE_P(e)   entity_an_operator_p(e, BITWISE_XOR_UPDATE)
 
#define ENTITY_BITWISE_OR_UPDATE_P(e)   entity_an_operator_p(e, BITWISE_OR_UPDATE)
 
#define ENTITY_COMMA_P(e)   entity_an_operator_p(e, COMMA)
 
#define ENTITY_ADDRESS_OF_P(e)   entity_an_operator_p(e, ADDRESS_OF)
 
#define ENTITY_CONDITIONAL_P(e)   entity_an_operator_p(e, CONDITIONAL)
 
#define ENTITY_PLUS_P(e)   entity_an_operator_p(e, PLUS)
 
#define ENTITY_PLUS_C_P(e)   entity_an_operator_p(e, PLUS_C)
 
#define ENTITY_MINUS_P(e)   entity_an_operator_p(e, MINUS)
 
#define ENTITY_MINUS_C_P(e)   entity_an_operator_p(e, MINUS_C)
 
#define ENTITY_UNARY_MINUS_P(e)   entity_an_operator_p(e, UNARY_MINUS)
 
#define ENTITY_UNARY_PLUS_P(e)   entity_an_operator_p(e, UNARY_PLUS)
 
#define ENTITY_MULTIPLY_P(e)   entity_an_operator_p(e, MULTIPLY)
 
#define ENTITY_MODULO_P(e)   entity_an_operator_p(e, MODULO)
 
#define ENTITY_C_MODULO_P(e)   entity_an_operator_p(e, C_MODULO)
 
#define ENTITY_POWER_P(e)   entity_an_operator_p(e, POWER)
 
#define ENTITY_DIVIDE_P(e)   entity_an_operator_p(e, DIVIDE)
 
#define ENTITY_MIN_P(e)   entity_an_operator_p(e, MIN)
 
#define ENTITY_C_MIN_P(e)   entity_an_operator_p(e,PIPS_C_MIN)
 
#define ENTITY_MAX_P(e)   entity_an_operator_p(e, MAX)
 
#define ENTITY_C_MAX_P(e)   entity_an_operator_p(e,PIPS_C_MAX)
 
#define ENTITY_MIN0_P(e)   entity_an_operator_p(e, MIN0)
 
#define ENTITY_MAX0_P(e)   entity_an_operator_p(e, MAX0)
 
#define ENTITY_AMIN1_P(e)   entity_an_operator_p(e, AMIN1)
 
#define ENTITY_AMAX1_P(e)   entity_an_operator_p(e, AMAX1)
 
#define ENTITY_DMIN1_P(e)   entity_an_operator_p(e, DMIN1)
 
#define ENTITY_DMAX1_P(e)   entity_an_operator_p(e, DMAX1)
 
#define ENTITY_MIN_OR_MAX_P(e)   (ENTITY_MIN_P(e) || ENTITY_MAX_P(e) )
 
#define ENTITY_ABS_P(e)   entity_an_operator_p(e, ABS)
 
#define ENTITY_IABS_P(e)   entity_an_operator_p(e, IABS)
 
#define ENTITY_DABS_P(e)   entity_an_operator_p(e, DABS)
 
#define ENTITY_CABS_P(e)   entity_an_operator_p(e, CABS)
 
#define ENTITY_C_ABS_P(e)   entity_a_function_p(e, C_ABS)
 
#define ENTITY_LABS_P(e)   entity_a_function_p(e, LABS)
 
#define ENTITY_LLABS_P(e)   entity_a_function_p(e, LLABS)
 
#define ENTITY_IMAXABS_P(e)   entity_a_function_p(e, IMAXABS)
 
#define ENTITY_FABS_P(e)   entity_an_operator_p(e, FABS)
 
#define ENTITY_FABSF_P(e)   entity_an_operator_p(e, FABSF)
 
#define ENTITY_FABSL_P(e)   entity_an_operator_p(e, FABSL)
 
#define ENTITY_C_CABS_P(e)   entity_an_operator_p(e, C_CABS)
 
#define ENTITY_CABSF_P(e)   entity_an_operator_p(e, CABSF)
 
#define ENTITY_CABSL_P(e)   entity_an_operator_p(e, CABSL)
 
#define ENTITY_AND_P(e)   (entity_an_operator_p(e, AND) || entity_an_operator_p(e, C_AND))
 
#define ENTITY_OR_P(e)   (entity_an_operator_p(e, OR) || entity_an_operator_p(e, C_OR))
 
#define ENTITY_BITWISE_AND_P(e)   (entity_an_operator_p(e, BITWISE_AND))
 
#define ENTITY_BITWISE_OR_P(e)   (entity_an_operator_p(e, BITWISE_OR))
 
#define ENTITY_BITWISE_XOR_P(e)   (entity_an_operator_p(e, BITWISE_XOR))
 
#define ENTITY_NOT_P(e)   (entity_an_operator_p(e, NOT) || entity_an_operator_p(e, C_NOT))
 
#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))
 
#define ENTITY_EQUIV_P(e)   entity_an_operator_p(e, EQUIV)
 
#define ENTITY_NON_EQUIV_P(e)   entity_an_operator_p(e, NON_EQUIV)
 
#define ENTITY_LEFT_SHIFT_P(e)   entity_an_operator_p(e, LEFT_SHIFT)
 
#define ENTITY_RIGHT_SHIFT_P(e)   entity_an_operator_p(e, RIGHT_SHIFT)
 
#define ENTITY_ADDRESS_OF_P(e)   entity_an_operator_p(e, ADDRESS_OF)
 
#define ENTITY_LOGICAL_OPERATOR_P(e)
 Attention : This definition is different with the Fortran Standard where the logical operators are the following only: AND, OR, NOT, EQUIV, NEQUIV (NN-Mars 2000) More...
 
#define ENTITY_TRUE_P(e)   entity_an_operator_p(e, TRUE)
 
#define ENTITY_FALSE_P(e)   entity_an_operator_p(e, FALSE)
 
#define ENTITY_ONE_P(e)   entity_an_operator_p(e, ONE)
 
#define ENTITY_ZERO_P(e)   entity_an_operator_p(e, ZERO)
 
#define ENTITY_GREATER_OR_EQUAL_P(e)   (entity_an_operator_p(e, GREATER_OR_EQUAL) || entity_an_operator_p(e, C_GREATER_OR_EQUAL))
 
#define ENTITY_GREATER_THAN_P(e)   (entity_an_operator_p(e, GREATER_THAN) || entity_an_operator_p(e, C_GREATER_THAN))
 
#define ENTITY_LESS_OR_EQUAL_P(e)   (entity_an_operator_p(e, LESS_OR_EQUAL) || entity_an_operator_p(e, C_LESS_OR_EQUAL))
 
#define ENTITY_LESS_THAN_P(e)   (entity_an_operator_p(e, LESS_THAN) || entity_an_operator_p(e, C_LESS_THAN))
 
#define ENTITY_EQUAL_P(e)   (entity_an_operator_p(e, EQUAL) || entity_an_operator_p(e, EQUIV) || entity_an_operator_p(e, C_EQUAL))
 
#define ENTITY_RELATIONAL_OPERATOR_P(e)
 
#define ENTITY_NAME_P(e, name)   (same_string_p(entity_user_name(e),name))
 
#define ENTITY_WRITE_P(e)   ENTITY_NAME_P(e, "WRITE")
 Fortran IO Management. More...
 
#define ENTITY_REWIND_P(e)   ENTITY_NAME_P(e, "REWIND")
 
#define ENTITY_OPEN_P(e)   ENTITY_NAME_P(e, "OPEN")
 
#define ENTITY_CLOSE_P(e)   ENTITY_NAME_P(e, "CLOSE")
 
#define ENTITY_READ_P(e)   ENTITY_NAME_P(e, READ_FUNCTION_NAME)
 
#define ENTITY_BUFFERIN_P(e)   ENTITY_NAME_P(e, "BUFFERIN")
 
#define ENTITY_BUFFEROUT_P(e)   ENTITY_NAME_P(e, "BUFFEROUT")
 
#define ENTITY_ENDFILE_P(e)   ENTITY_NAME_P(e, "ENDFILE")
 
#define ENTITY_IMPLIEDDO_P(e)   ENTITY_NAME_P(e, IMPLIED_DO_NAME)
 
#define ENTITY_IO_LIST_P(e)   ENTITY_NAME_P(e, IO_LIST_STRING_NAME)
 
#define ENTITY_FORMAT_P(e)   ENTITY_NAME_P(e, "FORMAT")
 
#define ENTITY_ISHFT_P(e)   ENTITY_NAME_P(e, "ISHFT")
 Bit manipulation functions. More...
 
#define ENTITY_ISHFTC_P(e)   ENTITY_NAME_P(e, "ISHFTC")
 
#define ENTITY_IBITS_P(e)   ENTITY_NAME_P(e, "IBITS")
 
#define ENTITY_MVBITS_P(e)   ENTITY_NAME_P(e, "MVBITS")
 
#define ENTITY_BTEST_P(e)   ENTITY_NAME_P(e, "BTEST")
 
#define ENTITY_IBSET_P(e)   ENTITY_NAME_P(e, "IBSET")
 
#define ENTITY_IBCLR_P(e)   ENTITY_NAME_P(e, "IBCLR")
 
#define ENTITY_BIT_SIZE_P(e)   ENTITY_NAME_P(e, "BIT_SIZE")
 
#define ENTITY_IOR_P(e)   ENTITY_NAME_P(e, "IOR")
 
#define ENTITY_IEOR_P(e)   ENTITY_NAME_P(e, "IEOR")
 
#define ENTITY_IAND_P(e)   ENTITY_NAME_P(e, "IAND")
 
#define ENTITY_OMP_IF_P(e)   ENTITY_NAME_P(e,OMP_IF_FUNCTION_NAME)
 OMP entity test. More...
 
#define ENTITY_OMP_OMP_P(e)   ENTITY_NAME_P(e,OMP_OMP_FUNCTION_NAME)
 
#define ENTITY_OMP_FOR_P(e)   ENTITY_NAME_P(e,OMP_FOR_FUNCTION_NAME)
 
#define ENTITY_OMP_PRIVATE_P(e)   ENTITY_NAME_P(e,OMP_PRIVATE_FUNCTION_NAME)
 
#define ENTITY_OMP_PARALLEL_P(e)   ENTITY_NAME_P(e,OMP_PARALLEL_FUNCTION_NAME)
 
#define ENTITY_OMP_REDUCTION_P(e)   ENTITY_NAME_P(e,OMP_REDUCTION_FUNCTION_NAME)
 
#define ENTITY_PRINTF_P(e)   ENTITY_NAME_P(e, "printf")
 o functions: C library and system io.Amira Mensi More...
 
#define ENTITY_FPRINTF_P(e)   ENTITY_NAME_P(e, "fprintf")
 
#define ENTITY_SCANF_P(e)   ENTITY_NAME_P(e, "scanf")
 
#define ENTITY_ISOC99_SCANF_P(e)   ENTITY_NAME_P(e, ISOC99_SCANF_FUNCTION_NAME)
 
#define ENTITY_FSCANF_P(e)   ENTITY_NAME_P(e, "fscanf")
 
#define ENTITY_ISOC99_FSCANF_P(e)   ENTITY_NAME_P(e, ISOC99_FSCANF_FUNCTION_NAME)
 
#define ENTITY_PUTS_P(e)   ENTITY_NAME_P(e, "puts")
 
#define ENTITY_GETS_P(e)   ENTITY_NAME_P(e, "gets")
 
#define ENTITY_FPUTS_P(e)   ENTITY_NAME_P(e, "fputs")
 
#define ENTITY_FGETS_P(e)   ENTITY_NAME_P(e, "fgets")
 
#define ENTITY_FPUTC_P(e)   ENTITY_NAME_P(e, "fputc")
 
#define ENTITY_FGETC_P(e)   ENTITY_NAME_P(e, "fgetc")
 
#define ENTITY_FOPEN_P(e)   ENTITY_NAME_P(e, "fopen")
 
#define ENTITY_FDOPEN_P(e)   ENTITY_NAME_P(e, "fdopen")
 
#define ENTITY_FREOPEN_P(e)   ENTITY_NAME_P(e, "freopen")
 
#define ENTITY_FCLOSE_P(e)   ENTITY_NAME_P(e, "fclose")
 
#define ENTITY_SNPRINTF_P(e)   ENTITY_NAME_P(e, "snprintf")
 
#define ENTITY_SSCANF_P(e)   ENTITY_NAME_P(e, "sscanf")
 
#define ENTITY_ISOC99_SSCANF_P(e)   ENTITY_NAME_P(e, ISOC99_SSCANF_FUNCTION_NAME)
 
#define ENTITY_VFPRINTF_P(e)   ENTITY_NAME_P(e, "vfprintf")
 
#define ENTITY_VFSCANF_P(e)   ENTITY_NAME_P(e, "vfscanf")
 
#define ENTITY_ISOC99_VFSCANF_P(e)   ENTITY_NAME_P(e, ISOC99_VFSCANF_FUNCTION_NAME)
 
#define ENTITY_VPRINTF_P(e)   ENTITY_NAME_P(e, "vprintf")
 
#define ENTITY_VSCANF_P(e)   ENTITY_NAME_P(e, "vscanf")
 
#define ENTITY_ISOC99_VSCANF_P(e)   ENTITY_NAME_P(e, ISOC99_VSCANF_FUNCTION_NAME)
 
#define ENTITY_VSNPRINTF_P(e)   ENTITY_NAME_P(e, "vsnprintf")
 
#define ENTITY_VSPRINTF_P(e)   ENTITY_NAME_P(e, "vsprintf")
 
#define ENTITY_SPRINTF_P(e)   ENTITY_NAME_P(e, "sprintf")
 
#define ENTITY_VSSCANF_P(e)   ENTITY_NAME_P(e, "vsscanf")
 
#define ENTITY_ISOC99_VSSCANF_P(e)   ENTITY_NAME_P(e, ISOC99_VSSCANF_FUNCTION_NAME)
 
#define ENTITY_GETC_P(e)   ENTITY_NAME_P(e, "getc")
 
#define ENTITY__IO_GETC_P(e)   ENTITY_NAME_P(e, "_IO_getc")
 
#define ENTITY_GETCHAR_P(e)   ENTITY_NAME_P(e, "getchar")
 
#define ENTITY_PUTC_P(e)   ENTITY_NAME_P(e, "putc")
 
#define ENTITY__IO_PUTC_P(e)   ENTITY_NAME_P(e, "_IO_putc")
 
#define ENTITY_PUTCHAR_P(e)   ENTITY_NAME_P(e, "putchar")
 
#define ENTITY_UNGETC_P(e)   ENTITY_NAME_P(e, "ungetc")
 
#define ENTITY_FREAD_P(e)   ENTITY_NAME_P(e, "fread")
 
#define ENTITY_FWRITE_P(e)   ENTITY_NAME_P(e, "fwrite")
 
#define ENTITY_FGETPOS_P(e)   ENTITY_NAME_P(e, "fgetpos")
 
#define ENTITY_FSEEK_P(e)   ENTITY_NAME_P(e, "fseek")
 
#define ENTITY_FSETPOS_P(e)   ENTITY_NAME_P(e, "fsetpos")
 
#define ENTITY_FTELL_P(e)   ENTITY_NAME_P(e, "ftell")
 
#define ENTITY_C_REWIND_P(e)   ENTITY_NAME_P(e, "rewind")
 
#define ENTITY_CLEARERR_P(e)   ENTITY_NAME_P(e, "clearer")
 
#define ENTITY_FEOF_P(e)   ENTITY_NAME_P(e, "feof")
 
#define ENTITY_FERROR_P(e)   ENTITY_NAME_P(e, "ferror")
 
#define ENTITY_FILENO_P(e)   ENTITY_NAME_P(e, "fileno")
 
#define ENTITY_PERROR_P(e)   ENTITY_NAME_P(e, "perror")
 
#define ENTITY_C_OPEN_SYSTEM_P(e)   ENTITY_NAME_P(e, C_OPEN_FUNCTION_NAME)
 o functions: C library and system io.Amira Mensi More...
 
#define ENTITY_C_CLOSE_SYSTEM_P(e)   ENTITY_NAME_P(e, C_CLOSE_FUNCTION_NAME)
 
#define ENTITY_C_READ_SYSTEM_P(e)   ENTITY_NAME_P(e, C_READ_FUNCTION_NAME)
 
#define ENTITY_C_WRITE_SYSTEM_P(e)   ENTITY_NAME_P(e, C_WRITE_FUNCTION_NAME)
 
#define ENTITY_LINK_SYSTEM_P(e)   ENTITY_NAME_P(e, LINK_FUNCTION_NAME)
 
#define ENTITY_SYMLINK_SYSTEM_P(e)   ENTITY_NAME_P(e, SYMLINK_FUNCTION_NAME)
 
#define ENTITY_UNLINK_SYSTEM_P(e)   ENTITY_NAME_P(e, UNLINK_FUNCTION_NAME)
 
#define ENTITY_FSYNC_SYSTEM_P(e)   ENTITY_NAME_P(e, FSYNC_FUNCTION_NAME)
 fcntl() More...
 
#define ENTITY_FDATASYNC_SYSTEM_P(e)   ENTITY_NAME_P(e, FDATASYNC_FUNCTION_NAME)
 
#define ENTITY_IOCTL_SYSTEM_P(e)   ENTITY_NAME_P(e, IOCTL_FUNCTION_NAME)
 
#define ENTITY_SELECT_SYSTEM_P(e)   ENTITY_NAME_P(e, SELECT_FUNCTION_NAME)
 
#define ENTITY_PSELECT_SYSTEM_P(e)   ENTITY_NAME_P(e, PSELECT_FUNCTION_NAME)
 
#define ENTITY_STAT_SYSTEM_P(e)   ENTITY_NAME_P(e, STAT_FUNCTION_NAME)
 
#define ENTITY_FSTAT_SYSTEM_P(e)   ENTITY_NAME_P(e, FSTAT_FUNCTION_NAME)
 
#define ENTITY_LSTAT_SYSTEM_P(e)   ENTITY_NAME_P(e, LSTAT_FUNCTION_NAME)
 
#define ENTITY_REMOVE_SYSTEM_P(e)   ENTITY_NAME_P(e, "remove")
 
#define ENTITY_RENAME_SYSTEM_P(e)   ENTITY_NAME_P(e, "rename")
 
#define ENTITY_TMPFILE_SYSTEM_P(e)   ENTITY_NAME_P(e, "tmpfile")
 
#define ENTITY_TMPNAM_SYSTEM_P(e)   ENTITY_NAME_P(e, "tmpnam")
 
#define ENTITY_FFLUSH_SYSTEM_P(e)   ENTITY_NAME_P(e, "fflush")
 
#define ENTITY_FREOPEN_SYSTEM_P(e)   ENTITY_NAME_P(e, "freopen")
 
#define ENTITY_SETBUF_SYSTEM_P(e)   ENTITY_NAME_P(e, "setbuf")
 
#define ENTITY_SETVBUF_SYSTEM_P(e)   ENTITY_NAME_P(e, "setvbuf")
 
#define ENTITY__FILBUF_SYSTEM_P(e)   ENTITY_NAME_P(e, "__filbuf")
 
#define ENTITY__FILSBUF_SYSTEM_P(e)   ENTITY_NAME_P(e, "__flsbuf")
 
#define ENTITY_SETBUFFER_SYSTEM_P(e)   ENTITY_NAME_P(e, "setbuffer")
 
#define ENTITY_SETLINEBUF_SYSTEM_P(e)   ENTITY_NAME_P(e, "setlinebuf")
 
#define ENTITY_FDOPEN_SYSTEM_P(e)   ENTITY_NAME_P(e, "fdopen")
 
#define ENTITY_CTERMID_SYSTEM_P(e)   ENTITY_NAME_P(e, "ctermid")
 
#define ENTITY_FILENO_SYSTEM_P(e)   ENTITY_NAME_P(e, "fileno")
 
#define ENTITY_POPEN_SYSTEM_P(e)   ENTITY_NAME_P(e, "popen")
 
#define ENTITY_CUSERID_SYSTEM_P(e)   ENTITY_NAME_P(e, "cuserid")
 
#define ENTITY_TEMPNAM_SYSTEM_P(e)   ENTITY_NAME_P(e, "tempnam")
 
#define ENTITY_GETW_SYSTEM_P(e)   ENTITY_NAME_P(e, "getw")
 
#define ENTITY_PUTW_SYSTEM_P(e)   ENTITY_NAME_P(e, "putw")
 
#define ENTITY_PCLOSE_SYSTEM_P(e)   ENTITY_NAME_P(e, "pclose")
 
#define ENTITY_FSEEKO_SYSTEM_P(e)   ENTITY_NAME_P(e, "fseeko")
 
#define ENTITY_FTELLO_SYSTEM_P(e)   ENTITY_NAME_P(e, "ftello")
 
#define ENTITY_FOPEN64_SYSTEM_P(e)   ENTITY_NAME_P(e, "fopen64")
 
#define ENTITY_FREOPEN64_SYSTEM_P(e)   ENTITY_NAME_P(e, "freopen64")
 
#define ENTITY_TMPFILE64_SYSTEM_P(e)   ENTITY_NAME_P(e, "tmpfile64")
 
#define ENTITY_FGETPOS64_SYSTEM_P(e)   ENTITY_NAME_P(e, "fgetpos64")
 
#define ENTITY_FSETPOS64_SYSTEM_P(e)   ENTITY_NAME_P(e, "fsetpos64")
 
#define ENTITY_FSEEKO64_SYSTEM_P(e)   ENTITY_NAME_P(e, "fseeko64")
 
#define ENTITY_FTELLO64_SYSTEM_P(e)   ENTITY_NAME_P(e, "ftello64")
 
#define ENTITY_ABORT_SYSTEM_P(e)   ENTITY_NAME_P(e, "abort")
 
#define ENTITY_C_ABS_SYSTEM_P(e)   ENTITY_NAME_P(e, "abs")
 
#define ENTITY_ATEXIT_SYSTEM_P(e)   ENTITY_NAME_P(e, "atexit")
 
#define ENTITY_ATOF_SYSTEM_P(e)   ENTITY_NAME_P(e, "atof")
 
#define ENTITY_ATOI_SYSTEM_P(e)   ENTITY_NAME_P(e, "atoi")
 
#define ENTITY_BSEARCH_SYSTEM_P(e)   ENTITY_NAME_P(e, "bsearch")
 
#define ENTITY_CALLOC_SYSTEM_P(e)   ENTITY_NAME_P(e, "calloc")
 
#define ENTITY_DIV_SYSTEM_P(e)   ENTITY_NAME_P(e, "div")
 
#define ENTITY_EXIT_SYSTEM_P(e)   ENTITY_NAME_P(e, "exit")
 
#define ENTITY_FREE_SYSTEM_P(e)   ENTITY_NAME_P(e, "free")
 
#define ENTITY_GETENV_SYSTEM_P(e)   ENTITY_NAME_P(e, "getenv")
 
#define ENTITY_LABS_SYSTEM_P(e)   ENTITY_NAME_P(e, "labs")
 
#define ENTITY_LDIV_SYSTEM_P(e)   ENTITY_NAME_P(e, "ldiv")
 
#define ENTITY_MALLOC_SYSTEM_P(e)   ENTITY_NAME_P(e, "malloc")
 
#define ENTITY_MBLEN_SYSTEM_P(e)   ENTITY_NAME_P(e, "mblen")
 
#define ENTITY_MBSTOWCS_SYSTEM_P(e)   ENTITY_NAME_P(e, "mbstowcs")
 
#define ENTITY_MBTOWC_SYSTEM_P(e)   ENTITY_NAME_P(e, "mbtowc")
 
#define ENTITY_QSORT_SYSTEM_P(e)   ENTITY_NAME_P(e, "qsort")
 
#define ENTITY_REALLOC_SYSTEM_P(e)   ENTITY_NAME_P(e, "realloc")
 
#define ENTITY_STRTOD_SYSTEM_P(e)   ENTITY_NAME_P(e, "strtod")
 
#define ENTITY_STRTOL_SYSTEM_P(e)   ENTITY_NAME_P(e, "strtol")
 
#define ENTITY_STRTOUL_SYSTEM_P(e)   ENTITY_NAME_P(e, "strtoul")
 
#define ENTITY_SYSTEM_SYSTEM_P(e)   ENTITY_NAME_P(e, "system")
 
#define ENTITY_WCTOMB_SYSTEM_P(e)   ENTITY_NAME_P(e, "wctomb")
 
#define ENTITY_WCSTOMBS_SYSTEM_P(e)   ENTITY_NAME_P(e, "wcstombs")
 
#define ENTITY_EXITHANDLESYSTEM_P(e)   ENTITY_NAME_P(e, "exithandle")
 
#define ENTITY_DRAND48_SYSTEM_P(e)   ENTITY_NAME_P(e, "drand48")
 
#define ENTITY_ERAND48_SYSTEM_P(e)   ENTITY_NAME_P(e, "erand48")
 
#define ENTITY_JRAND48_SYSTEM_P(e)   ENTITY_NAME_P(e, "jrand48")
 
#define ENTITY_LCONG48_SYSTEM_P(e)   ENTITY_NAME_P(e, "lcong48")
 
#define ENTITY_LRAND48_SYSTEM_P(e)   ENTITY_NAME_P(e, "lrand48")
 
#define ENTITY_MRAND48_SYSTEM_P(e)   ENTITY_NAME_P(e, "mrand48")
 
#define ENTITY_NRAND48_SYSTEM_P(e)   ENTITY_NAME_P(e, "nrand48")
 
#define ENTITY_SEED48_SYSTEM_P(e)   ENTITY_NAME_P(e, "seed48")
 
#define ENTITY_SRAND48_SYSTEM_P(e)   ENTITY_NAME_P(e, "srand48")
 
#define ENTITY_PUTENV_SYSTEM_P(e)   ENTITY_NAME_P(e, "putenv")
 
#define ENTITY_SETKEY_SYSTEM_P(e)   ENTITY_NAME_P(e, "setkey")
 
#define ENTITY_SWAB_SYSTEM_P(e)   ENTITY_NAME_P(e, "swab")
 
#define ENTITY_MKSTEMP_SYSTEM_P(e)   ENTITY_NAME_P(e, "mkstemp")
 
#define ENTITY_MKSTEMP64_SYSTEM_P(e)   ENTITY_NAME_P(e, "mkstemp64")
 
#define ENTITY_A614_SYSTEM_P(e)   ENTITY_NAME_P(e, "a64l")
 
#define ENTITY_ECVT_SYSTEM_P(e)   ENTITY_NAME_P(e, "ecvt")
 
#define ENTITY_FCVT_SYSTEM_P(e)   ENTITY_NAME_P(e, "fcvt")
 
#define ENTITY_GCVT_SYSTEM_P(e)   ENTITY_NAME_P(e, "gcvt")
 
#define ENTITY_GETSUBOPT_SYSTEM_P(e)   ENTITY_NAME_P(e, "getsubopt")
 
#define ENTITY_GRANTPT_SYSTEM_P(e)   ENTITY_NAME_P(e, "grantpt")
 
#define ENTITY_INITSTATE_SYSTEM_P(e)   ENTITY_NAME_P(e, "initstate")
 
#define ENTITY_C_164A_SYSTEM_P(e)   ENTITY_NAME_P(e, "l64a")
 
#define ENTITY_MKTEMP_SYSTEM_P(e)   ENTITY_NAME_P(e, "mktemp")
 
#define ENTITY_PTSNAME_SYSTEM_P(e)   ENTITY_NAME_P(e, "ptsname")
 
#define ENTITY_REALPATH_SYSTEM_P(e)   ENTITY_NAME_P(e, "realpath")
 
#define ENTITY_SETSTATE_SYSTEM_P(e)   ENTITY_NAME_P(e, "setstate")
 
#define ENTITY_TTYSLOT_SYSTEM_P(e)   ENTITY_NAME_P(e, "ttyslot")
 
#define ENTITY_UNLOCKPT_SYSTEM_P(e)   ENTITY_NAME_P(e, "unlockpt")
 
#define ENTITY_VALLOC_SYSTEM_P(e)   ENTITY_NAME_P(e, "valloc")
 
#define ENTITY_DUP2_SYSTEM_P(e)   ENTITY_NAME_P(e, "dup2")
 
#define ENTITY_QECVT_SYSTEM_P(e)   ENTITY_NAME_P(e, "qecvt")
 
#define ENTITY_QFCVT_SYSTEM_P(e)   ENTITY_NAME_P(e, "qfcvt")
 
#define ENTITY_QGCVT_SYSTEM_P(e)   ENTITY_NAME_P(e, "qgcvt")
 
#define ENTITY_GETCWD_SYSTEM_P(e)   ENTITY_NAME_P(e, "getcwd")
 
#define ENTITY_GETEXECNAME_SYSTEM_P(e)   ENTITY_NAME_P(e, "getexecname")
 
#define ENTITY_GETLOGIN_SYSTEM_P(e)   ENTITY_NAME_P(e, "getlogin")
 
#define ENTITY_GETOPT_SYSTEM_P(e)   ENTITY_NAME_P(e, "getopt")
 
#define ENTITY_GETPASS_SYSTEM_P(e)   ENTITY_NAME_P(e, "getpass")
 
#define ENTITY_GETPASSPHRASE_SYSTEM_P(e)   ENTITY_NAME_P(e, "getpassphrase")
 
#define ENTITY_GETPW_SYSTEM_P(e)   ENTITY_NAME_P(e, "getpw")
 
#define ENTITY_ISATTY_SYSTEM_P(e)   ENTITY_NAME_P(e, "isatty")
 
#define ENTITY_MEMALIGN_SYSTEM_P(e)   ENTITY_NAME_P(e, "memalign")
 
#define ENTITY_TTYNAME_SYSTEM_P(e)   ENTITY_NAME_P(e, "ttyname")
 
#define ENTITY_ATOLL_SYSTEM_P(e)   ENTITY_NAME_P(e, "atoll")
 
#define ENTITY_LLABS_SYSTEM_P(e)   ENTITY_NAME_P(e, "llabs")
 
#define ENTITY_LLDIV_SYSTEM_P(e)   ENTITY_NAME_P(e, "lldiv")
 
#define ENTITY_LLTOSTR_SYSTEM_P(e)   ENTITY_NAME_P(e, "lltostr")
 
#define ENTITY_STROLL_SYSTEM_P(e)   ENTITY_NAME_P(e, "strtoll")
 
#define ENTITY_STROULL_SYSTEM_P(e)   ENTITY_NAME_P(e, "strtoull")
 
#define ENTITY_ULLOSTR_SYSTEM_P(e)   ENTITY_NAME_P(e, "ulltostr")
 
#define ENTITY_ASSERT_SYSTEM_P(e)   ENTITY_NAME_P(e, ASSERT_FUNCTION_NAME)
 include <assert.h> More...
 
#define ENTITY_ASSERT_FAIL_SYSTEM_P(e)   ENTITY_NAME_P(e, ASSERT_FAIL_FUNCTION_NAME)
 
#define ENTITY_STRCMP_SYSTEM_P(e)   ENTITY_NAME_P(e, "strcmp")
 include <string.h> More...
 
#define ENTITY_STRNCMP_SYSTEM_P(e)   ENTITY_NAME_P(e, "strncmp")
 
#define ENTITY_STRCPY_SYSTEM_P(e)   ENTITY_NAME_P(e, "strcpy")
 
#define ENTITY_STRCAT_SYSTEM_P(e)   ENTITY_NAME_P(e, "strcat")
 
#define ENTITY_STRNCAT_SYSTEM_P(e)   ENTITY_NAME_P(e, "strncat")
 
#define ENTITY_STRLEN_SYSTEM_P(e)   ENTITY_NAME_P(e, "strlen")
 
#define ENTITY_STRERROR_SYSTEM_P(e)   ENTITY_NAME_P(e, "strerror")
 
#define ENTITY_STRERROR_R_SYSTEM_P(e)   ENTITY_NAME_P(e, "strerror_r")
 
#define ENTITY_FOPEN_SYSTEM_P(e)   ENTITY_NAME_P(e, "fopen")
 FI: Why is it declared "system"? Why is it in the middle of string functions? More...
 
#define ENTITY_FCNTL_SYSTEM_P(e)   ENTITY_NAME_P(e,"fcntl")
 include <fcntl.h> More...
 
#define ENTITY_OPEN_SYSTEM_P(e)   ENTITY_NAME_P(e,"open")
 
#define ENTITY_CREAT_SYSTEM_P(e)   ENTITY_NAME_P(e,"creat")
 
#define ENTITY_DIRECTIO_SYSTEM_P(e)   ENTITY_NAME_P(e,"directio")
 
#define ENTITY_OPEN64_SYSTEM_P(e)   ENTITY_NAME_P(e,"open64")
 
#define ENTITY_CREAT64_SYSTEM_P(e)   ENTITY_NAME_P(e,"creat64")
 
#define ENTITY_RANDOM_P(e)   ENTITY_NAME_P(e,"random")
 some random functions of stdlib.h More...
 
#define ENTITY_SRANDOM_P(e)   ENTITY_NAME_P(e,"srandom")
 
#define ENTITY_RAND_P(e)   ENTITY_NAME_P(e,"rand")
 
#define ENTITY_SRAND_P(e)   ENTITY_NAME_P(e,"srand")
 
#define ENTITY_SIGNAL_P(e)   ENTITY_NAME_P(e,"signal")
 signal.h More...
 
#define ENTITY_STATIC_INITIALIZATION_P(e)   ENTITY_NAME_P(e, STATIC_INITIALIZATION_FUNCTION_NAME)
 Fortran DATA management. More...
 
#define ENTITY_REPEAT_VALUE_P(e)   ENTITY_NAME_P(e, REPEAT_VALUE_FUNCTION_NAME)
 
#define ENTITY_DATA_LIST_P(e)   ENTITY_NAME_P(e, DATA_LIST_FUNCTION_NAME)
 
#define ENTITY_BRACE_INTRINSIC_P(e)   ENTITY_NAME_P(e, BRACE_INTRINSIC)
 C initialization expression. More...
 
#define ENTITY_IMPLIED_CMPLX_P(e)   ENTITY_NAME_P(e, IMPLIED_COMPLEX_NAME)
 
#define ENTITY_IMPLIED_DCMPLX_P(e)   ENTITY_NAME_P(e, IMPLIED_DCOMPLEX_NAME)
 
#define ENTITY_FIELD_P(e)   entity_an_operator_p(e, FIELD)
 C data structure and pointer management. More...
 
#define ENTITY_POINT_TO_P(e)   entity_an_operator_p(e, POINT_TO)
 
#define ENTITY_DEREFERENCING_P(e)   entity_an_operator_p(e, DEREFERENCING)
 
#define ENTITY_VA_END_P(e)   ENTITY_NAME_P(e, BUILTIN_VA_END)
 Defined elsewhere: #define ENTITY_ADDRESS_OF_P(e) entity_an_operator_p(e, ADDRESS_OF) More...
 
#define ENTITY_VA_START_P(e)   ENTITY_NAME_P(e, BUILTIN_VA_START)
 
#define ENTITY_VA_COPY_P(e)   ENTITY_NAME_P(e, BUILTIN_VA_COPY)
 
#define ENTITY_FIVE_OPERATION_P(e)
 
#define IO_CALL_P(call)   io_intrinsic_p(call_function(call))
 
#define ALLOCATABLE_PREFIX   "__pips_allocatable__"
 
#define ALLOCATABLE_LBOUND_PREFIX   "__pips__allocatable__lbound__"
 
#define ALLOCATABLE_UBOUND_PREFIX   "__pips__allocatable__ubound__"
 
#define ENTITY_ALLOCATABLE_BOUND_P(e)
 
#define basic_numeric_simple_p(b)   (basic_int_p(b) || basic_float_p(b))
 classification of basics More...
 
#define basic_numeric_p(b)   (basic_numeric_simple_p(b) || basic_complex_p(b))
 
#define basic_compatible_simple_p(b1, b2)
 
#define basic_compatible_p(b1, b2)
 
#define LABEL_SIZE   5
 constant sizes More...
 
#define INDENTATION   (get_int_property("PRETTYPRINT_INDENTATION"))
 
#define INDENT_A_LIST_OF_WORDS(list_of_words)
 
#define STATEMENT_NUMBER_UNDEFINED   (-1)
 default values More...
 
#define UNKNOWN_RAM_OFFSET   (-1)
 
#define UNDEFINED_RAM_OFFSET   (-2)
 
#define DYNAMIC_RAM_OFFSET   (-3)
 FI: I would have assumed that it is used for the stack area, but I must be wrong... More...
 
#define MAKE_ORDERING(u, s)   (u<<16|s)
 On devrait utiliser Newgen pour cela, mais comme on ne doit pas les utiliser directement (mais via statement_less_p), cela devrait decourager les temeraires. More...
 
#define ORDERING_NUMBER(o)   (o>>16)
 
#define ORDERING_STATEMENT(o)   (o & 0xffff)
 
#define NORMALIZE_EXPRESSION(e)
 
#define entity_declarations(e)   (code_declarations(entity_code(e)))
 MISC: newgen shorthands. More...
 
#define entity_variable_p(e)   (type_variable_p(entity_type(e)))
 An entity_variable_p(e) may hide a typedef and hence a functional type. More...
 
#define entity_symbolic_p(e)
 
#define module_language(e)    code_language(value_code(entity_initial((e))))
 implemented as a macro to allow lhs More...
 
#define module_functional_parameters(func)    functional_parameters(type_functional(entity_type(func)))
 
#define call_intrinsic_p(C)    value_intrinsic_p(entity_initial(call_function(C)))
 
#define statement_block_p(stat)    (instruction_block_p(statement_instruction(stat)))
 
#define entity_constant_p(e)
 
#define loop_to_instruction   make_instruction_loop
 
#define test_to_instruction   make_instruction_test
 
#define call_to_instruction   make_instruction_call
 
#define loop_to_statement(l)   instruction_to_statement(loop_to_instruction(l))
 
#define test_to_statement(t)   instruction_to_statement(test_to_instruction(t))
 
#define call_to_statement(c)   instruction_to_statement(call_to_instruction(c))
 
#define unary_intrinsic_expression(name, e)    call_to_expression(make_call(entity_intrinsic(name),CONS(EXPRESSION,e,NIL)))
 Building quickly bool expressions, FC. More...
 
#define binary_intrinsic_expression(name, e1, e2)
 
#define not_expression(e)    unary_intrinsic_expression(NOT_OPERATOR_NAME, e)
 
#define or_expression(e1, e2)    binary_intrinsic_expression(OR_OPERATOR_NAME, e1, e2)
 
#define and_expression(e1, e2)    binary_intrinsic_expression(AND_OPERATOR_NAME, e1, e2)
 
#define ne_expression(e1, e2)    binary_intrinsic_expression(NON_EQUAL_OPERATOR_NAME, e1, e2)
 
#define eq_expression(e1, e2)    binary_intrinsic_expression(EQUAL_OPERATOR_NAME, e1, e2)
 
#define gt_expression(e1, e2)    binary_intrinsic_expression(GREATER_THAN_OPERATOR_NAME, e1, e2)
 
#define ge_expression(e1, e2)    binary_intrinsic_expression(GREATER_OR_EQUAL_OPERATOR_NAME, e1, e2)
 
#define lt_expression(e1, e2)    binary_intrinsic_expression(LESS_THAN_OPERATOR_NAME, e1, e2)
 
#define le_expression(e1, e2)    binary_intrinsic_expression(LESS_OR_EQUAL_OPERATOR_NAME, e1, e2)
 
#define TMP_ENT   1
 Constants for some ex-atomizer variable generation. More...
 
#define AUX_ENT   2
 
#define DOUBLE_PRECISION_SIZE   8
 
#define HPF_PREFIX   "HPFC"
 moved here because needed by syntax:-( More...
 
#define BLOCK_SUFFIX   "K"
 suffixies for encoded hpf keywords More...
 
#define CYCLIC_SUFFIX   "C"
 
#define STAR_SUFFIX   "S"
 
#define ALIGN_SUFFIX   "A"
 suffixes for HPF directives managed by HPFC More...
 
#define REALIGN_SUFFIX   "B"
 
#define DISTRIBUTE_SUFFIX   "D"
 
#define REDISTRIBUTE_SUFFIX   "E"
 
#define INDEPENDENT_SUFFIX   "I"
 
#define NEW_SUFFIX   "N"
 
#define REDUCTION_SUFFIX   "R"
 
#define PROCESSORS_SUFFIX   "P"
 
#define TEMPLATE_SUFFIX   "T"
 
#define PURE_SUFFIX   "U"
 
#define DYNAMIC_SUFFIX   "Y"
 
#define TELL_SUFFIX   "0"
 suffixes for my own (FCD:-) directives. More...
 
#define SYNCHRO_SUFFIX   "1"
 
#define TIMEON_SUFFIX   "2"
 
#define TIMEOFF_SUFFIX   "3"
 
#define SETBOOL_SUFFIX   "4"
 
#define SETINT_SUFFIX   "5"
 
#define HPFCIO_SUFFIX   "6"
 
#define HOSTSECTION_SUFFIX   "7"
 
#define DEAD_SUFFIX   "8"
 
#define FAKE_SUFFIX   "9"
 
#define FCD_IGNORE_PREFIX   "HPFC_IGNORE_FCD_"
 property prefix for ignoring FCD directives TIME, SYNCHRO and SET exists. More...
 
#define ASM_FUNCTION_NAME   "__asm"
 __asm function More...
 
#define is_instruction_block   is_instruction_sequence
 soft block->sequence transition More...
 
#define instruction_block_p(i)   instruction_sequence_p(i)
 
#define instruction_block(i)   sequence_statements(instruction_sequence(i))
 
#define make_statement_list(stats...)    (gen_make_list(statement_domain, ##stats, 0))
 easy list constructor More...
 
#define make_expression_list(stats...)    (gen_make_list(expression_domain, ##stats, 0))
 
#define unstructured_control   unstructured_entry
 After the modification in Newgen: unstructured = entry:control x exit:control we have create a macro to transform automatically unstructured_control to unstructured_entry. More...
 
#define DEFAULT_CHARACTER_TYPE_SIZE   (1)
 Default type sizes. More...
 
#define DEFAULT_SHORT_INTEGER_TYPE_SIZE   (2)
 
#define DEFAULT_INTEGER_TYPE_SIZE   (4)
 
#define DEFAULT_LONG_INTEGER_TYPE_SIZE   (6)
 
#define DEFAULT_LONG_LONG_INTEGER_TYPE_SIZE   (8)
 
#define DEFAULT_LONG_LONG_LONG_INTEGER_TYPE_SIZE   (9)
 
#define DEFAULT_POINTER_TYPE_SIZE   (8)
 
#define DEFAULT_UNSIGNED_TYPE_SIZE   (1)
 
#define DEFAULT_SIGNED_TYPE_SIZE   (2)
 
#define DEFAULT_REAL_TYPE_SIZE   (4)
 The standard C integer types are represented as follow char = 1 short_int = 2 int = 4 long_int = 6 long_long_int = 8 __int128_t = 9 (gcc extension) More...
 
#define DEFAULT_DOUBLEPRECISION_TYPE_SIZE   (8)
 
#define DEFAULT_QUADPRECISION_TYPE_SIZE   (16)
 
#define DEFAULT_COMPLEX_TYPE_SIZE   (8)
 
#define DEFAULT_DOUBLECOMPLEX_TYPE_SIZE   (16)
 
#define DEFAULT_LONGDOUBLECOMPLEX_TYPE_SIZE   (32)
 
#define DEFAULT_LOGICAL_TYPE_SIZE   (4)
 
#define REGIONS_MODULE_NAME   "REGIONS-PACKAGE"
 Already defined. More...
 
#define IO_EFFECTS_PACKAGE_NAME   "__IO_EFFECTS"
 Implicit variables to handle IO effetcs. More...
 
#define TIME_EFFECTS_PACKAGE_NAME   "__TIME_EFFECTS"
 package name for time routines More...
 
#define RAND_EFFECTS_PACKAGE_NAME   "_RANDOM_EFFECTS"
 package name for random routines More...
 
#define RAND_GEN_EFFECTS_NAME   "GEN_SEED"
 variable name for random unit More...
 
#define MALLOC_EFFECTS_PACKAGE_NAME   "_MALLOC_EFFECTS"
 package name for malloc routines (could be libc package) More...
 
#define MALLOC_EFFECTS_NAME   "_MALLOC_"
 variable name for heap effects More...
 
#define MEMMOVE_EFFECTS_PACKAGE_NAME   "_MEMMOVE_EFFECTS"
 package name for memmove routines More...
 
#define MEMMOVE_EFFECTS_NAME   "_MEMMOVE_"
 variable name for memmove unit More...
 
#define IO_EFFECTS_ARRAY_NAME   "LUNS"
 array of Logical UNits; it is more or less handled as the current file pointer; in C, used for open, close, read, write... More...
 
#define IO_EFFECTS_IO_FILE_NAME   "IO_FILES"
 Array of struct io_files pointed to by pointers returned by fopen and used by fclose, fscanf, fprintf... More...
 
#define IO_EFFECTS_PTR_NAME   "_C_IO_ptr"
 To express C IO intrinsics effects. More...
 
#define IO_EOF_ARRAY_NAME   "END_LUNS"
 array of end of file codes More...
 
#define IO_ERROR_ARRAY_NAME   "ERR_LUNS"
 array of error codes for LUNs More...
 
#define TIME_EFFECTS_VARIABLE_NAME   "KALI" /**Kali is the goddess of time in the Hindu mythology */
 variable holding time effects More...
 
#define TIME_EFFECTS_BUFFER_NAME   "KALI-BUFFER" /**Kali is the goddess of time in the Hindu mythology */
 
#define IO_EFFECTS_UNIT_SPECIFIER_LENGTH   4
 size of the unit specifier More...
 
#define STDERR_LUN   (0)
 Standard unit numbers depend on the operating system. More...
 
#define STDERR_NAME   "stderr"
 
#define ENTITY_STDERR_P(e)   entity_a_special_entity_p(e, STDERR_NAME)
 
#define STDIN_LUN   (5)
 
#define STDIN_NAME   "stdin"
 
#define ENTITY_STDIN_P(e)   entity_a_special_entity_p(e, STDIN_NAME)
 
#define STDOUT_LUN   (6)
 
#define STDOUT_NAME   "stdout"
 
#define ENTITY_STDOUT_P(e)   entity_a_special_entity_p(e, STDOUT_NAME)
 
#define STDIN_FILENO   (0)
 ymbolic constants for the file descriptors belonging to the standard streams: unistd.h More...
 
#define STDOUT_FILENO   (1)
 
#define STDERR_FILENO   (2)
 
#define IMPLICIT_VARIABLE_NAME_1   "__FUNCTION__"
 Implicit variable names for C. More...
 
#define IMPLICIT_VARIABLE_NAME_2   "__func__"
 
#define empty_comments   string_undefined
 Empty comments (i.e. More...
 
#define make_empty_statement   make_empty_block_statement
 An alias for make_empty_block_statement. More...
 
#define make_nop_statement   make_empty_block_statement
 An alias for make_empty_block_statement. More...
 
#define CONTROL_MAP(ctl, code, c, list)
 Macro to walk through all the controls reachable from a given control node of an unstructured. More...
 
#define UNSTRUCTURED_CONTROL_MAP(c, u, l, code)
 Walk through all the controls of un unstructured. More...
 
#define FORWARD_CONTROL_MAP(ctl, code, c, list)
 Walk through all the controls forward-reachable from a given control node of an unstructured. More...
 
#define BACKWARD_CONTROL_MAP(ctl, code, c, list)
 Walk through all the controls backward-reachable from a given control node of an unstructured. More...
 
#define WIDE_FORWARD_CONTROL_MAP(ctl, code, c, list)
 Walk through all the controls backward-reachable from a given control node of an unstructured. More...
 
#define GENERIC_CONTROL_MAP(get_controls, ctl, code, c, list)
 The control node visiting engine. More...
 
#define PIPS_PHASE_PRELUDE(module_name, debug_env_var)
 Start a phase that use a module CODE. More...
 
#define PIPS_PHASE_POSTLUDE(new_module_statement)
 End a transformation phase by putting back into PIPS the (possibly) modified statement. More...
 
#define INSTANCE_OF(type, value)   ( (_int)((value)->u) == (_int)(type##_domain) )
 polymorhism thanks to newgen ! More...
 
#define binary_call_lhs(c)   (EXPRESSION(CAR(call_arguments((c)))))
 
#define binary_call_rhs(c)   (EXPRESSION(CAR(CDR(call_arguments((c))))))
 
#define expression_scalar_p(e)   (expression_reference_p((e)) && reference_scalar_p(expression_reference((e))))
 
#define hash_contains_p(htp, key)   (hash_get(htp, key) != HASH_UNDEFINED_VALUE)
 
#define range_to_distance_p(e)   ((e) == range_to_distance)
 
#define range_to_nbiter_p(e)   ((e) == range_to_nbiter)
 
#define GENERATED_LABEL_MODULE_NAME   "__GENSYM"
 
#define make_entity(n, t, s, i)   make_entity(n,t,s,i,DEFAULT_ENTITY_KIND)
 
#define SEND_FUNCTION_NAME   "send"
 SPIRE API. More...
 
#define RECV_FUNCTION_NAME   "recv"
 
#define SIGNAL_FUNCTION_NAME   "signal"
 
#define WAIT_FUNCTION_NAME   "wait"
 
#define MPI_INIT_FUNCTION_NAME   "MPI_Init"
 PI calls. More...
 
#define MPI_FINALIZE_FUNCTION_NAME   "MPI_Finalize"
 
#define MPI_ISEND_FUNCTION_NAME   "MPI_Isend"
 
#define MPI_RECV_FUNCTION_NAME   "MPI_Recv"
 
#define MPI_BARRIER_FUNCTION_NAME   "MPI_Barrier"
 
#define MPI_COMM_SIZE_FUNCTION_NAME   "MPI_Comm_size"
 
#define MPI_COMM_RANK_FUNCTION_NAME   "MPI_Comm_rank"
 
#define MPI_SEND_FUNCTION_NAME   "MPI_Send"
 
#define MPI_SSEND_FUNCTION_NAME   "MPI_Ssend"
 
#define MPI_RSEND_FUNCTION_NAME   "MPI_Rsend"
 
#define MPI_BSEND_FUNCTION_NAME   "MPI_Bsend"
 
#define MPI_ISEND_FUNCTION_NAME   "MPI_Isend"
 
#define MPI_ISSEND_FUNCTION_NAME   "MPI_Issend"
 
#define MPI_IRSEND_FUNCTION_NAME   "MPI_Irsend"
 
#define MPI_IBSEND_FUNCTION_NAME   "MPI_Ibsend"
 
#define MPI_RECV_FUNCTION_NAME   "MPI_Recv"
 
#define MPI_IRECV_FUNCTION_NAME   "MPI_Irecv"
 
#define MPI_SENDRECV_FUNCTION_NAME   "MPI_Sendrecv"
 
#define MPI_STATUS   "MPI_Status"
 PI types. More...
 
#define MPI_REQUEST   "MPI_Request"
 
#define MPI_COMM   "MPI_Comm"
 
#define MPI_DATATYPE   "MPI_Datatype"
 
#define ENTITY_SEND_P(e)   ENTITY_NAME_P(e, "send")
 intrinsic entity declarations More...
 

Typedefs

typedef enum remove_a_control_from_a_list_and_relink_direction remove_a_control_from_a_list_and_relink_direction
 

Enumerations

enum  remove_a_control_from_a_list_and_relink_direction { source_is_predecessor_and_dest_is_successor = 119 , source_is_successor_and_dest_is_predecessor = -123 , source_is_predecessor_and_dest_is_successor = 119 , source_is_successor_and_dest_is_predecessor = -123 }
 For the control graph modifiers: More...
 
enum  range_to_expression_mode { range_to_distance , range_to_nbiter , range_to_distance , range_to_nbiter }
 
enum  if_clause_policy {
  IGNORE_IF_POLICY , AND_IF_POLICY , OR_IF_POLICY , IGNORE_IF_POLICY ,
  AND_IF_POLICY , OR_IF_POLICY
}
 that is all for ri-util-local.h More...
 
enum  {
  DEFAULT_ENTITY_KIND = 0 , EFFECTS_PACKAGE = 1 , ABSTRACT_LOCATION = 2 , ENTITY_STACK_AREA = 4 ,
  ENTITY_HEAP_AREA = 8 , ENTITY_DYNAMIC_AREA = 16 , ENTITY_STATIC_AREA = 32 , ENTITY_POINTER_DUMMY_TARGETS_AREA = 64 ,
  ENTITY_FORMAL_AREA = 128
}
 

Functions

string basic_to_string (basic)
 Warning! Do not modify this file that is automatically generated! More...
 
string string_of_type (type)
 
void print_type (type)
 For debugging. More...
 
bool same_type_name_p (type, type)
 For naming homogeneity: expression_to_string(), reference_to_string()... More...
 
value EvalExpression (expression)
 cproto-generated files More...
 
value EvalSyntax (syntax)
 
value EvalCall (call)
 only calls to constant, symbolic or intrinsic functions might be evaluated. More...
 
value EvalSizeofexpression (sizeofexpression)
 
value EvalConstant (constant)
 Constant c is returned as field of value v. More...
 
value EvalIntrinsic (entity, list)
 This function tries to evaluate a call to an intrinsic function. More...
 
value EvalConditionalOp (list)
 
value EvalUnaryOp (int, list)
 
value EvalBinaryOp (int, list)
 t defines the operator and la is a list to two sub-expressions. More...
 
value EvalNaryOp (int, list)
 
int IsUnaryOperator (entity)
 
int IsBinaryOperator (entity)
 FI: These string constants are defined in ri-util.h and the tokens in ri-util/operator.h. More...
 
int IsNaryOperator (entity)
 
int ipow (int, int)
 FI: such a function should exist in Linear/arithmetique. More...
 
bool expression_integer_value (expression, intptr_t *)
 
bool expression_negative_integer_value_p (expression)
 Return true iff the expression has an integer value known statically and this value is negative. More...
 
bool positive_expression_p (expression)
 Use constants and type information to decide if the value of sigma(e) is always positive, e.g. More...
 
bool negative_expression_p (expression)
 Use constants and type information to decide if the value of sigma(e) is always negative, e.g. More...
 
bool expression_linear_p (expression)
 returns if e is already normalized and linear. More...
 
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 More...
 
bool range_count (range, intptr_t *)
 The range count only can be evaluated if the three range expressions are constant and if the increment is non zero. More...
 
Pvecteur vect_product (Pvecteur *, Pvecteur *)
 returns a Pvecteur equal to (*pv1) * (*pv2) if this product is linear or NULL otherwise. More...
 
reference constant_reference_to_normalized_constant_reference (reference)
 Allocate a new reference with evaluated subscripts. More...
 
expression normalize_integer_constant_expression (expression)
 Allocate a new expression equivalent to e, but constant expressions are evaluated. More...
 
int number_of_initial_values (list)
 size.c More...
 
bool SizeOfArray (entity, int *)
 This function computes the total size of a variable in bytes, ie. More...
 
int array_size (entity)
 
Value ValueSizeOfArray (entity)
 
int CSafeSizeOfArray (entity)
 BEGIN_EOLE. More...
 
int entity_memory_size (entity)
 
int type_memory_size (type)
 
_int SizeOfElements (basic)
 This function returns the length in bytes of the Fortran or C type represented by a basic, except for a varying size string (formal parameter). More...
 
int element_number (basic, list)
 END_EOLE. More...
 
bool NumberOfElements (basic, list, int *)
 
Value ValueNumberOfElements (list)
 
int SizeOfIthDimension (entity, int)
 this function returns the size of the ith dimension of a variable e. More...
 
int dimension_size (dimension)
 this function computes the size of a dimension. More...
 
expression SizeOfDimension (dimension)
 
expression SizeOfDimensions (list)
 computes the product of all dimensions in dims More...
 
Value ValueSizeOfDimension (dimension)
 FI: I do not understand the "Value" cast. More...
 
int ExpressionToInt (expression)
 this function computes the value of an integer constant expression and returns it to the calling function. More...
 
int NumberOfDimension (entity)
 
void set_entity_to_size (void)
 
void reset_entity_to_size (void)
 
void safe_reset_entity_to_size (void)
 In case of error handling, PIPS may try to reset this table twice. More...
 
int storage_space_of_variable (entity)
 
bool variable_entities_may_conflict_p (entity, entity)
 
expression pragma_build_if_condition (expression, language)
 build the expression to be put in the if clause. More...
 
expression pragma_if_as_expr (expression)
 
expression pragma_private_as_expr_with_args (list)
 
expression pragma_private_as_expr (list)
 
list pragma_omp_parallel_as_exprs (void)
 
list pragma_omp_parallel_for_as_exprs (void)
 
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 expressions to filter @params to_filter is the list of entities to remove from l_pragma More...
 
list pragma_omp_merge_expr (list, list, language)
 merge omp pragma. More...
 
void add_pragma_str_to_statement (statement, const char *, bool)
 Add a string as a pragma to a statement. More...
 
void add_pragma_strings_to_statement (statement, list, bool)
 Add a list of strings as as many pragmas to a statement. More...
 
void add_pragma_expr_to_statement (statement, list)
 Add a pragma as a list of expression to a statement. More...
 
extensions empty_extensions (void)
 extension.c More...
 
bool empty_extensions_p (extensions)
 
bool allocatable_area_p (entity)
 
bool dynamic_area_p (entity)
 
bool static_area_p (entity)
 
bool heap_area_p (entity)
 
bool formal_area_p (entity)
 
bool stack_area_p (entity)
 
bool pointer_dummy_targets_area_p (entity)
 
entity module_to_heap_area (entity)
 Returns the heap area "a" associated to module "f". More...
 
entity module_to_dynamic_area (entity)
 
bool entity_area_p (entity)
 
bool entity_special_area_p (entity)
 
int current_offset_of_area (entity, entity)
 
bool empty_static_area_p (entity)
 
void print_common_layout (FILE *, entity, bool)
 
entity find_label_entity (const char *, const char *)
 util.c More...
 
string module_codefilename (entity)
 To find resources (this should be located in workspace-util as it depends both on pipsdbm and ri-util. More...
 
string module_par_codefilename (entity)
 
string module_fortranfilename (entity)
 
string module_par_fortranfilename (entity)
 
string module_pp_fortranfilename (entity)
 
string module_predicat_fortranfilename (entity)
 
string module_entitiesfilename (entity)
 
entity find_ith_parameter (entity, int)
 
bool ith_parameter_p (entity, entity, int)
 returns true if v is the ith formal parameter of function f More...
 
expression reference_ith_index (reference, int)
 functions for references More...
 
bool comment_string_p (const string)
 Test if a string can be a Fortran 77 comment: More...
 
string string_remove_trailing_line_feed (string)
 Remove trailing line feed if any. More...
 
string string_remove_trailing_line_feeds (string)
 Remove trailing line feeds. More...
 
string string_strip_final_linefeeds (string)
 Get rid of linefeed/newline at the end of a string. More...
 
string string_fuse_final_linefeeds (string)
 Get rid of extra linefeed/newline at the end of a string. More...
 
bool ordering_to_statement_initialized_p (void)
 ordering.c More...
 
void print_ordering_to_statement (void)
 Dump the ordering with the corresponding statement address. More...
 
statement ordering_to_statement (int)
 Get the statement associated to a given ordering. More...
 
bool add_ordering_of_the_statement_to_current_mapping (statement)
 Add the statement for its ordering, if any, in the hash-map. More...
 
bool overwrite_ordering_of_the_statement_to_current_mapping (statement)
 Overwrite the statement for its ordering, if any, in the hash-map. More...
 
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 sync with the current module. More...
 
void reset_ordering_to_statement (void)
 Reset the mapping from ordering to statement. More...
 
void check_fortran_declaration_dependencies (list)
 declarations.c More...
 
list get_common_members (entity, entity, bool)
 
void print_C_common_layout (FILE *, entity, bool)
 
void fprint_functional (FILE *, functional)
 This function is called from c_parse() via ResetCurrentModule() and fprint_environment() More...
 
void fprint_environment (FILE *, entity)
 
void fprint_C_environment (FILE *, entity)
 
void fprint_any_environment (FILE *, entity, bool)
 
void split_initializations_in_statement (statement)
 Transform a declaration with an initialization statement into 2 parts, a declaration statement and an initializer statement. More...
 
void dump_functional (functional, string_buffer)
 
bool enclosing_loops_map_undefined_p (void)
 
void set_enclosing_loops_map (statement_mapping)
 
statement_mapping get_enclosing_loops_map (void)
 
void reset_enclosing_loops_map (void)
 
void free_enclosing_loops_map (void)
 
void make_enclosing_loops_map (void)
 
list load_statement_enclosing_loops (statement)
 
void delete_statement_enclosing_loops (statement)
 
bool statement_enclosing_loops_undefined_p (statement)
 
void store_statement_enclosing_loops (statement, list)
 
void update_statement_enclosing_loops (statement, list)
 
void clean_enclosing_loops (void)
 
statement_mapping loops_mapping_of_statement (statement)
 
set distributable_loop (statement)
 this functions checks if Kennedy's algorithm can be applied on the loop passed as argument. More...
 
bool index_private_p (loop)
 returns true if loop lo's index is private for this loop More...
 
set region_of_loop (statement)
 this function returns the set of all statements belonging to the given loop even if the loop contains test, goto or unstructured control structures More...
 
void region_of_statement (statement, set)
 Should be rewritten with a gen_recurse to deal with the recent RI... More...
 
list loop_private_variables_as_entites (loop, bool, bool)
 Get the variables local or private to a loop. More...
 
void sort_all_loop_locals (statement)
 
bool loop_parallel_p (loop)
 Test if a loop is parallel. More...
 
bool loop_sequential_p (loop)
 Test if a loop is sequential. More...
 
bool parallel_loop_statement_p (statement)
 Test if a statement is a parallel loop. More...
 
int depth_of_parallel_perfect_loop_nest (statement)
 Compute the depth of a parallel perfect loop-nest. More...
 
int depth_of_perfect_loop_nest (statement)
 Compute the depth of a perfect loop-nest. More...
 
statement get_first_inner_perfectly_nested_loop (statement)
 Return the inner loop in a perfect loop-nest. More...
 
bool perfectly_nested_loop_p (statement)
 Test if a statement is a perfect loop-nest. More...
 
statement perfectly_nested_loop_to_body (statement)
 Extract the body of a perfectly nested loop body. More...
 
statement perfectly_nested_loop_to_body_at_depth (statement, int)
 Extract the loop-body of a perfect loop-nest at a given depth. More...
 
entity perfectly_nested_loop_index_at_depth (statement, int)
 Get the index of the loop at a given depth inside a loop-nest. More...
 
int loop_increment_value (loop)
 
bool constant_step_loop_p (loop)
 Test if a loop has a constant step loop. More...
 
bool normal_loop_p (loop)
 Test if a loop does have a 1-increment step. More...
 
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. More...
 
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 with a message before. More...
 
void print_parallelization_statistics (const char *, const char *, statement)
 Print out the number of sequential versus parallel loops. More...
 
list copy_loops (list)
 Duplicate a loop list. More...
 
statement make_new_loop_statement (entity, expression, expression, expression, statement, execution)
 This is an ad'hoc function designed for do_loop_unroll_with_epilogue(). More...
 
list statement_to_loop_statement_list (statement)
 If statement s is a perfectly loop nest, return the corresponding loop list. More...
 
bool range_contains_at_least_one_point_p (range)
 
bool loop_executed_at_least_once_p (loop)
 Check if loop bound are constant and then if upper >= lower. More...
 
bool range_contains_nothing_p (range)
 
bool loop_executed_never_p (loop)
 Check if loop bound are constant and then if upper < lower. More...
 
bool index_of_a_loop_p (Variable, list)
 Check if variable v is an index for an enclosing loop. More...
 
expression update_range (entity, range, expression, expression, expression, bool)
 fortran90.c More...
 
int DefaultLengthOfBasic (tag)
 constant.c More...
 
bool integer_constant_name_p (string)
 
_int TK_CHARCON_to__int (const char *)
 
entity make_C_or_Fortran_constant_entity (const char *, tag, size_t, bool, bool(*)(const char *, const char *))
 This function creates a constant. More...
 
entity make_constant_entity (string, tag, size_t)
 For historical reason, call the Fortran version. More...
 
entity SafeMakeConstant (string, tag, bool(*)(const char *, const char *))
 END_EOLE. More...
 
entity MakeConstant (string, tag)
 Make a Fortran constant. More...
 
bool constant_string_entity_p (entity)
 
entity MakeComplexConstant (expression, expression)
 make a complex constant from two calls to real or integer constants More...
 
expression MakeComplexConstantExpression (expression, expression)
 
bool complex_constant_expression_p (expression)
 
entity float_to_entity (float)
 
entity int_to_entity (_int)
 
bool logical_constant_p (entity)
 
bool float_constant_p (entity)
 ent can be either a numerical or a symbolic float constant More...
 
bool integer_constant_p (entity, int *)
 Returns the double value associated to a PIPS constant. More...
 
bool integer_symbolic_constant_p (entity, int *)
 (*int_p) gets integer constant if any More...
 
expression MakeCharacterConstantExpression (string)
 END_EOLE. More...
 
value MakeValueSymbolic (expression)
 this function creates a value for a symbolic constant. More...
 
bool signed_constant_expression_p (expression)
 
basic constant_basic (entity)
 
double float_constant_to_double (entity)
 
bool expression_is_constant_p (expression)
 BEGIN_EOLE. More...
 
void vect_debug (Pvecteur)
 constraint.c More...
 
int compare_Pvecteur (Pvecteur *, Pvecteur *)
 comparison function for Pvecteur in pips, to be used by qsort. More...
 
bool vecteur_nul_p (Pvecteur)
 
int bound_generation_compare_vector_component (Pvecteur *, Pvecteur *)
 bound_generation.c More...
 
void make_bound_expression (Variable, Pbase, Psysteme, expression *, expression *)
 void make_bound_expression(variable index, Pbase base, Psysteme sc, expression *lower, expression *upper) More...
 
void set_std_static_entities (void)
 entity.c More...
 
void set_internal_static_entities (void)
 beware: cannot be called on creating the database More...
 
void reset_internal_static_entities (void)
 
void reset_std_static_entities (void)
 
void reset_static_entities (void)
 
void register_static_entity (entity *)
 add given entity to the set of entities that must reset upon workspace deletion practically, all static entities should be stored that way More...
 
void print_entities (list)
 
void print_entity_set (set)
 
entity make_empty_module (const char *, type, language)
 The source language is not specified. More...
 
entity make_empty_program (const char *, language)
 
entity make_empty_subroutine (const char *, language)
 
entity make_empty_f95module (const char *, language)
 
entity make_empty_function (const char *, type, language)
 
entity make_empty_blockdata (const char *, language)
 
code EntityCode (entity)
 this function checks that e has an initial value code. More...
 
entity make_label (const char *, const char *)
 
void reset_label_counter (void)
 
char * new_label_local_name (entity)
 
entity make_new_label (entity)
 This function returns a new label. More...
 
entity make_loop_label (int, entity)
 
bool label_defined_in_statement_p (entity, statement)
 
bool label_defined_in_current_module_p (entity)
 
bool label_string_defined_in_current_module_p (string)
 
bool label_string_defined_in_statement_p (string, statement)
 
string safe_entity_name (entity)
 predicates and functions for entities More...
 
const char * entity_local_name (entity)
 entity_local_name modified so that it does not core when used in vect_fprint, since someone thought that it was pertinent to remove the special care of constants there. More...
 
string entity_global_name (entity)
 Used instead of the macro to pass as formal argument. More...
 
const char * entity_user_name (entity)
 Since entity_local_name may contain PIPS special characters such as prefixes (label, common, struct, union, typedef, ...), this entity_user_name function is created to return the initial entity/variable name, as viewed by the user in his code. More...
 
string empty_scope (void)
 Functions used to manage the block scoping in conjunction with ContextStack and yco ntext. More...
 
bool empty_scope_p (string)
 
bool string_struct_scope_p (string)
 same kind of testing required for union as well More...
 
bool string_block_scope_p (string)
 
string entity_name_without_scope (entity)
 allocates a new string More...
 
string local_name_to_scope (const char *)
 allocates a new string More...
 
const char * module_local_name (entity)
 Returns the module local user name. More...
 
const char * module_resource_name (entity)
 Returns a pointer towards the resource name. More...
 
const char * label_local_name (entity)
 END_EOLE. More...
 
bool label_name_conflict_with_labels (const char *, list)
 
const char * entity_name_or_TCST (entity)
 Return a name valid for sorting variables in vectors and constraint systems. More...
 
const char * entity_and_common_name (entity)
 See next function! More...
 
bool entity_empty_label_p (entity)
 
bool entity_return_label_p (entity)
 
bool entity_label_p (entity)
 
bool entity_module_p (entity)
 
bool entity_f95use_p (entity)
 
bool entity_main_module_p (entity)
 
bool entity_f95module_p (entity)
 
bool entity_blockdata_p (entity)
 
bool entity_common_p (entity)
 
bool entity_function_p (entity)
 
bool entity_subroutine_p (entity)
 
bool entity_pointer_p (entity)
 
bool entity_array_p (entity)
 Is e a variable with an array type? More...
 
bool entity_register_p (entity)
 
void set_register_qualifier (entity)
 Assuming that v is of type variable, add a qualifier register. More...
 
bool array_entity_p (entity)
 
bool entity_variable_length_array_p (entity)
 
bool assumed_size_array_p (entity)
 
bool pointer_type_array_p (entity)
 
bool unnormalized_array_p (entity)
 
bool entity_field_p (entity)
 e is the field of a structure More...
 
entity entity_field_to_entity_struct (entity)
 
entity entity_field_to_entity_union (entity)
 
entity entity_field_to_entity_struct_or_union (entity)
 
int entity_field_rank (entity)
 f is a field of a structure or of an union: what is its rank? More...
 
bool entity_enum_p (entity)
 
bool entity_enum_member_p (entity)
 
bool entity_enum_variable_p (entity)
 
bool entity_struct_p (entity)
 Is entity e the entity corresponding to a struct declaration? More...
 
bool same_struct_entity_p (const entity, const entity)
 
bool same_field_entity_p (const entity, const entity)
 
bool entity_union_p (entity)
 Is entity e an entity representing the union declaration? More...
 
bool derived_entity_p (entity)
 
bool local_entity_of_module_p (entity, entity)
 This test shows that "e" has been declared in "module". More...
 
bool entity_in_common_p (entity)
 
const char * entity_module_name (entity)
 See comments about module_name(). More...
 
code entity_code (entity)
 
entity entity_empty_label (void)
 
bool top_level_entity_p (entity)
 Check if the scope of entity e is global. More...
 
bool io_entity_p (entity)
 Several implicit entities are declared to define the implicit effects of IO statements. More...
 
bool io_luns_entity_p (entity)
 
bool rand_effects_entity_p (entity)
 
bool malloc_effect_entity_p (entity)
 
bool memmove_effect_entity_p (entity)
 
bool time_effect_entity_p (entity)
 
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_NAME entity. More...
 
entity get_stdin_entity (void)
 
bool stdin_entity_p (entity)
 
entity get_stdout_entity (void)
 
bool stdout_entity_p (entity)
 
entity get_stderr_entity (void)
 
bool stderr_entity_p (entity)
 
bool std_file_entity_p (entity)
 
entity std_file_entity_to_pointed_file_entity (entity)
 Dummy standard files targets. More...
 
bool intrinsic_entity_p (entity)
 
bool symbolic_entity_p (entity)
 
bool intrinsic_name_p (const char *)
 
entity entity_intrinsic (const char *)
 FI: I do not understand this function name (see next one!). More...
 
entity CreateIntrinsic (string)
 this function does not create an intrinsic function because they must all be created beforehand by the bootstrap phase (see bootstrap/bootstrap.c). More...
 
bool same_entity_p (entity, entity)
 predicates on entities More...
 
int compare_entities (const entity *, const entity *)
 Comparison function for qsort. More...
 
void sort_list_of_entities (list)
 sorted in place. More...
 
bool lexicographic_order_p (entity, entity)
 true if var1 <= var2 More...
 
basic entity_basic (entity)
 return the basic associated to entity e if it's a function/variable/constant basic_undefined otherwise More...
 
list entity_qualifiers (entity)
 return the qualifiers associated to entity e if it's a variable NIL otherwise More...
 
bool entity_basic_p (entity, enum basic_utype)
 return true if the basic associated with entity e matchs the passed tag More...
 
bool entity_list_p (list)
 Checks that el only contains entity. More...
 
entity local_name_to_top_level_entity (const char *)
 This function try to find a top-level entity from a local name. More...
 
entity module_name_to_entity (const char *)
 This is an alias for local_name_to_top_level_entity. More...
 
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 More...
 
entity FindEntity (const char *, const char *)
 Retrieve an entity from its package/module name and its local name. More...
 
entity global_name_to_entity (const char *)
 Find an entity, if it exists, from its global name, a.k.a. More...
 
entity FindEntityFromUserName (const char *, const char *)
 
entity CreateEntity (const char *, const char *)
 BEGIN_EOLE. More...
 
entity FindOrCreateEntity (const char *, const char *)
 Problem: A functional global entity may be referenced without parenthesis or CALL keyword in a function or subroutine call. More...
 
entity FindOrCreateTopLevelEntity (const char *)
 Return a top-level entity. More...
 
expression entity_ith_bounds (entity, int)
 FIND_MODULE returns entity. More...
 
bool io_intrinsic_p (entity)
 rue is a statement s is an io intrinsic More...
 
bool arithmetic_intrinsic_p (entity)
 true if e is an arithmetic instrinsic More...
 
entity get_continue_entity (void)
 true if continue. More...
 
bool entity_continue_p (entity)
 
list common_members_of_module (entity, entity, bool)
 returns the list of entity to appear in the common declaration. More...
 
entity make_new_common (string, entity)
 This function creates a common for a given name in a given module. More...
 
entity make_new_integer_scalar_common_variable (string, entity, entity)
 This function creates a common variable in a given common in a given module. More...
 
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 subroutine. More...
 
list string_to_entity_list (string, string)
 of entity More...
 
bool typedef_entity_p (entity)
 
bool member_entity_p (entity)
 
bool entity_formal_p (entity)
 is p a formal parameter? More...
 
bool dummy_parameter_entity_p (entity)
 is p a dummy parameter? More...
 
entity MakeCompilationUnitEntity (const char *)
 This is useful for the C language only. More...
 
bool extern_entity_p (entity, entity)
 
bool explicit_extern_entity_p (entity, entity)
 
string storage_to_string (storage)
 
entity entity_to_module_entity (entity)
 Find the enclosing module of an entity. More...
 
void update_dummy_parameter (parameter, entity)
 
bool parameter_passing_mode_p (entity, int tag)
 Returns true when f has no parameters. More...
 
bool parameter_passing_by_value_p (entity)
 
bool parameter_passing_by_reference_p (entity)
 
char * AddPackageToName (string, string)
 This function concatenate a package name and a local name to produce a global entity name. More...
 
entity update_operator_to_regular_operator (entity)
 Returns the binary operator associated to a C update operator such as +=. More...
 
bool entity_equivalence_p (entity)
 checks if an entity is an equivalent More...
 
bool same_entity_name_p (entity, entity)
 compare entity names More...
 
bool entity_in_list_p (entity, list)
 look for ent in ent_l More...
 
list concat_new_entities (list, list)
 returns l1 after elements of l2 but not of l1 have been appended to l1. More...
 
bool entity_used_in_declarations_p (entity, list)
 check if e is used to declare one of the entities in entity list ldecl More...
 
bool type_used_in_type_declarations_p (entity, list)
 check if e is used to declare one of the entities in entity list ldecl More...
 
entity make_entity_copy (entity)
 Create a copy of an entity, with (almost) identical type, storage and initial value if move_initialization_p is false, but with a slightly different name as entities are uniquely known by their names, and a different offset if the storage is ram (still to be done). More...
 
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_initialization_p is false, but with a slightly different name as entities are uniquely known by their names, and a different offset if the storage is ram (still to be done). More...
 
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_initialization_p is false, but with a slightly different name as entities are uniquely known by their names, and a different offset if the storage is ram (still to be done). More...
 
void add_thread_safe_variable (entity)
 
bool thread_safe_variable_p (entity)
 
void add_abstract_state_variable (entity)
 
bool abstract_state_variable_p (entity)
 
bool entities_p (list)
 Make sure that an list is an homogeneous list of entities. More...
 
entity operator_neutral_element (entity)
 
bool commutative_call_p (call)
 Test if we are allowed to commute operations. More...
 
list entities_to_expressions (list)
 build a list of expressions from a list of entities More...
 
entity find_enum_of_member (entity)
 
bool c_module_p (entity)
 Test if a module "m" is written in C. More...
 
bool fortran_module_p (entity)
 Test if a module is in Fortran. More...
 
list extract_references_from_declarations (list)
 FI: this function has not yet been extended for C types!!! More...
 
Pbase entity_list_to_base (list)
 
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 only enter consider entities directly involved in object matching chunk_filter \/!\ if you strip out statements, it will not consider declared entities, but it will consider their initial value. More...
 
bool entity_not_constant_or_intrinsic_p (entity)
 Default entity filter for get_referenced_entities() More...
 
set get_referenced_entities (void *)
 retrieves the set of entities used in elem beware that this entities may be formal parameters, functions etc so consider filter this set depending on your need, using get_referenced_entities_filtered More...
 
bool do_get_declared_entities (statement, set)
 Helper for get_declared_entities() Add all locally declared entity to the set given in argument. More...
 
set get_declared_entities (void *)
 retrieves the set of entities declared in elem More...
 
bool entity_local_variable_p (entity, entity)
 Check if a variable "var" is local to a module "module". More...
 
entity FindOrCreateEntityLikeModel (const char *, const char *, entity)
 hmmm... More...
 
entity AddEntityToModule (entity, entity)
 !!! caution, it may not be a module, but a common... More...
 
void fprint_entity_list (FILE *, list)
 void fprint_entity_list(FILE *fp,list l): prints a list of entities on file fp. More...
 
bool entity_in_formal_area_p (entity)
 Formal parameters do not use the standard ram storage. More...
 
bool variable_entity_p (entity)
 variable.c More...
 
bool symbolic_constant_entity_p (entity)
 BEGIN_EOLE. More...
 
void AddEntityToDeclarations (entity, entity)
 END_EOLE. More...
 
void RemoveLocalEntityFromDeclarations (entity, entity, statement)
 
void AddLocalEntityToDeclarations (entity, entity, statement)
 Add the variable entity e to the list of variables of the function module. More...
 
void AddLocalEntityToDeclarationsOnly (entity, entity, statement)
 Add the variable entity e to the list of variables of the function module. More...
 
void AddEntityToCurrentModule (entity)
 Add a variable entity to the current module declarations. More...
 
void AddEntityToCurrentModuleWithoutDeclaration (entity)
 Add a variable entity to the current module declarations. More...
 
entity make_global_entity_from_local (entity)
 
entity make_stderr_variable (void)
 If the parser has not (yet) encountered "stderr", a PIPS transformation or instrumentation phase may need "stderr" to generate AST code. More...
 
entity make_scalar_entity (const char *, const char *, basic)
 entity make_scalar_entity(name, module_name, base) More...
 
entity make_derived_entity (const char *, const char *, type)
 
void reset_unique_variable_numbers (void)
 
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. More...
 
entity generic_clone_variable_with_unique_name (entity, statement, string, string, entity, bool)
 clone a variable with a new name. More...
 
entity clone_variable_with_unique_name (entity, statement, string, string, entity)
 Clone a variable with a new user name. More...
 
entity make_new_scalar_variable_with_prefix (const char *, entity, basic)
 Create a new scalar variable of type b in the given module. More...
 
entity make_new_derived_entity_with_prefix (const char *, entity, type)
 derived from make_new_scalar_variable_with_prefix More...
 
entity make_new_scalar_variable (entity, basic)
 
entity make_new_array_variable_with_prefix (const char *, entity, basic, list)
 J'ai ameliore la fonction make_new_scalar_variable_with_prefix
More...
 
entity make_new_array_variable (entity, basic, list)
 
entity make_temporary_pointer_to_array_entity_with_prefix (char *, entity, entity, expression)
 
entity make_temporary_pointer_to_array_entity (entity, expression, entity)
 
entity make_new_module_variable (entity, int)
 Make a new module integer variable of name X<d>. More...
 
entity make_new_entity (basic, int)
 
entity find_or_create_scalar_entity (const char *, const char *, tag)
 Looks for an entity which should be a scalar of the specified basic. More...
 
entity find_or_create_typed_entity (string, const char *, tag)
 Looks for an entity of the specified basic. More...
 
entity make_scalar_integer_entity (const char *, const char *)
 Create an integer variable of name "name" in module of name "module_name". More...
 
bool entity_scalar_p (entity)
 The concrete type of e is a scalar type. More...
 
bool entity_integer_scalar_p (entity)
 for variables (like I), not constants (like 1)! use integer_constant_p() for constants More...
 
bool integer_scalar_entity_p (entity)
 integer_scalar_entity_p() is obsolete; use entity_integer_scalar_p() More...
 
bool entity_static_variable_p (entity)
 return true if the entity is declared with the keyword static More...
 
bool entity_atomic_reference_p (entity)
 Any reference r such that reference_variable(r)==e accesses all bytes (or bits) allocated to variable e. More...
 
bool entity_non_pointer_scalar_p (entity)
 
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 answered at the entity level only (see previous function) and the reference itself must be passed as an argument. More...
 
bool entity_unbounded_p (entity)
 bool entity_unbounded_p(entity e) input : an array entity output : true if the last dimension of the array is unbounded (*), false otherwise. More...
 
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 all dimensions are numerical false otherwise (adjustable arrays, formal parameters). More...
 
int variable_entity_dimension (entity)
 variable_entity_dimension(entity v): returns the dimension of variable v; scalar have dimension 0. More...
 
void remove_variable_entity (entity)
 
entity make_integer_constant_entity (_int)
 entity make_integer_constant_entity(int c) make entity for integer constant c More...
 
int add_variable_to_area (entity, entity)
 
int add_C_variable_to_area (entity, entity)
 
int add_any_variable_to_area (entity, entity, bool)
 
int new_add_any_variable_to_area (entity, entity, bool)
 
bool formal_parameter_p (entity)
 
bool static_global_variable_p (entity)
 Is v a global variable declared local to a C file such "static int i;". More...
 
bool global_variable_p (entity)
 Is v a global variable such as "int i;". More...
 
bool variable_return_p (entity)
 True if a variable is the pseudo-variable used to store value returned by a function: More...
 
bool formal_context_variable_p (entity)
 Such pseudo-variables are generated by the points-to analysis. More...
 
bool variable_is_a_module_formal_parameter_p (entity, entity)
 
bool variable_in_common_p (entity)
 true if v is in a common. More...
 
bool variable_static_p (entity)
 true if v appears in a SAVE statement, or in a DATA statement, or is declared static i C. More...
 
bool variable_dynamic_p (entity)
 
bool variable_stack_p (entity)
 
bool variable_heap_p (entity)
 
bool variable_in_module_p (entity, entity)
 This test can only be applied to variables, not to functions, subroutines or commons visible from a module. More...
 
bool variable_in_list_p (entity, list)
 
bool entity_volatile_variable_p (entity)
 
bool volatile_variable_p (variable)
 
bool qualified_variable_p (entity, unsigned int)
 The variable may turn out to be a function. More...
 
bool const_variable_p (entity)
 
void discard_module_declaration_text (entity)
 Discard the decls_text string of the module code to make the prettyprinter ignoring the textual declaration and remake all from the declarations without touching the corresponding property (PRETTYPRINT_ALL_DECLARATIONS). More...
 
entity get_ith_dummy (string, string, int)
 Returns a numbered entity the name of which is suffix + number, the module of which is prefix. More...
 
expression generate_string_for_alternate_return_argument (string)
 
entity generate_pseudo_formal_variable_for_formal_label (const char *, int)
 
bool formal_label_replacement_p (entity)
 
bool actual_label_replacement_p (expression)
 Assumes that eap is a call. More...
 
bool call_contains_alternate_returns_p (call)
 
entity make_new_index_entity (entity, string)
 
bool implicit_c_variable_p (entity)
 
expression variable_initial_expression (entity)
 Returns a copy of the initial (i.e. More...
 
bool self_initialization_p (entity)
 Check if a variable is initialized by itself as "int a = a;" is legal C code according to gcc. More...
 
bool same_scalar_location_p (entity, entity)
 FI: transferred from semantics (should be used for effect translation as well) More...
 
list struct_variable_to_fields (entity)
 Assume that v is declared as a struct. More...
 
entity make_place_holder_variable (entity)
 
bool place_holder_variable_p (entity)
 
instruction make_call_instruction (entity, list)
 instruction.c More...
 
instruction MakeNullaryCallInst (entity)
 Creates a call instruction to a function with no argument. More...
 
instruction MakeUnaryCallInst (entity, expression)
 Creates a call instruction to a function with one argument. More...
 
instruction make_continue_instruction (void)
 Creates a CONTINUE instruction, that is the FORTRAN nop, the ";" in C or the "pass" in Python for example. More...
 
instruction make_assign_instruction (expression, expression)
 
instruction make_instruction_block (list)
 Build an instruction block from a list of statements. More...
 
bool native_call_p (call, string)
 Test if a call is a native instruction of the language. More...
 
bool native_instruction_p (instruction, string)
 Test if an instruction is a native instruction of the language. More...
 
bool instruction_assign_p (instruction)
 Test if an instruction is an assignment. More...
 
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... More...
 
bool return_instruction_p (instruction)
 Test if an instruction is a C or Fortran "return". More...
 
bool fortran_return_instruction_p (instruction)
 
bool C_return_instruction_p (instruction)
 
bool exit_instruction_p (instruction)
 
bool abort_instruction_p (instruction)
 
bool instruction_stop_p (instruction)
 Test if an instruction is a Fortran STOP. More...
 
bool instruction_format_p (instruction)
 Test if an instruction is a Fortran FORMAT. More...
 
bool assignment_block_p (instruction)
 Checks if an instruction block is a list of assignments, possibly followed by a continue. More...
 
void flatten_block_if_necessary (instruction)
 Flatten an instruction block if necessary. More...
 
string instruction_identification (instruction)
 Return a constant string representing symbolically the instruction type. More...
 
string safe_instruction_identification (instruction)
 
bool empty_code_p (statement)
 statement.c More...
 
bool empty_code_list_p (list)
 
bool empty_comments_p (const char *)
 
bool comments_equal_p (string, string)
 
bool statement_with_empty_comment_p (statement)
 Return true if the statement has an empty statement: More...
 
bool assignment_statement_p (statement)
 Test if a statement is an assignment. More...
 
bool assignment_block_or_statement_p (statement)
 
bool return_statement_p (statement)
 Test if a statement is a C or Fortran "return". More...
 
bool exit_statement_p (statement)
 
bool abort_statement_p (statement)
 
bool fortran_return_statement_p (statement)
 Test if a statement is a Fortran "return". More...
 
bool C_return_statement_p (statement)
 Test if a statement is a C "return". More...
 
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... More...
 
bool forloop_statement_p (statement)
 
bool declaration_statement_p (statement)
 Had to be optimized according to Beatrice Creusillet. More...
 
bool continue_statements_p (list)
 Check that all statements contained in statement list sl are a continue statements. More...
 
bool stop_statement_p (statement)
 Test if a statement is a Fortran STOP. More...
 
bool format_statement_p (statement)
 Test if a statement is a Fortran FORMAT. More...
 
bool write_statement_p (statement)
 
bool statement_less_p (statement, statement)
 
bool statement_possible_less_p (statement, statement)
 
bool statement_sequence_p (statement)
 Statement classes induced from instruction type. More...
 
bool statement_test_p (statement)
 
bool statement_loop_p (statement)
 
bool statement_whileloop_p (statement)
 
bool statement_goto_p (statement)
 
bool statement_call_p (statement)
 
bool statement_unstructured_p (statement)
 
bool statement_forloop_p (statement)
 
bool statement_multitest_p (statement)
 
bool statement_expression_p (statement)
 
bool empty_statement_p (statement)
 Test if a statement is empty. More...
 
bool unlabelled_statement_p (statement)
 
bool nop_statement_p (statement)
 
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 or a recursive combination of above. More...
 
bool empty_statement_or_continue_p (statement)
 Return true if the statement is an empty instruction block or a continue or a recursive combination of above. More...
 
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 LABEL or without declarations or a recursive combination of above. More...
 
bool check_io_statement_p (statement)
 
string comments_dup (string)
 functions to generate statements More...
 
string decls_text_dup (string)
 Duplicate statement decls_text. More...
 
statement make_assign_statement (expression, expression)
 
statement instruction_to_statement (instruction)
 Build a statement from a give instruction. More...
 
statement make_block_statement (list)
 Make a block statement from a list of statement. More...
 
statement make_empty_block_statement (void)
 Build an empty statement (block/sequence) More...
 
statement make_empty_statement_with_declarations_and_comments (list, string, string)
 Build an empty statement with declaration list, declaration text and comment. More...
 
void move_statement_attributes (statement, statement)
 Move all the attributes from one statement to another one. More...
 
void copy_statement_attributes (statement, statement)
 Copy all the attributes from one statement to another one. More...
 
statement make_statement_from_statement_list_or_empty_block (list)
 Build a statement sequence from a statement list. More...
 
statement make_statement_from_statement_list (list)
 Build a statement sequence from a statement list. More...
 
statement make_statement_from_statement_varargs_list (statement,...)
 Build a statement sequence from a statement NULL-terminated varargs list. More...
 
statement make_block_with_stmt_if_not_already (statement)
 Build a statement block from a statement if not already a statement block. More...
 
statement make_return_statement (entity)
 
instruction make_simple_Fortran_io_instruction (bool, expression, list)
 Derived from the Fortran parser code. More...
 
statement make_print_statement (string)
 Make a Fortran print statement. More...
 
statement make_C_print_statement (string)
 
statement make_any_print_statement (string)
 Generate a print of a constant character string on stderr for C or on stdout for Fortran. More...
 
statement make_stop_statement (string)
 This function returns a Fortran stop statement with an error message. More...
 
statement make_exit_statement (int, string)
 This function returns a statement ending with a C exit statement. More...
 
statement make_continue_statement (entity)
 
statement make_plain_continue_statement (void)
 Make a simple continue statement to be used as a NOP or ";" in C. More...
 
statement make_declarations_statement (list, int, string)
 Make a declaration(s) statement. More...
 
statement make_declaration_statement (entity, int, string)
 Make one declaration statement. More...
 
bool declaration_statements_p (list)
 Check that all statements contained in statement list sl are declaration statements. More...
 
statement add_initialization_information_to_declaration_statement (statement, list)
 The initialization expression list is integrated into the internal representation as an argument list. More...
 
list declaration_statement_to_initializations (statement)
 
statement make_whileloop_statement (expression, statement, int, bool)
 Build a while loop statement. More...
 
statement make_loop_statement (entity, expression, expression, expression, statement)
 Build a loop statement. More...
 
statement make_forloop_statement (expression, expression, expression, statement)
 
statement make_test_statement (expression, statement, statement)
 
statement make_call_statement (string, list, entity, string)
 This function is limited to intrinsics calls... More...
 
statement make_expression_statement (expression)
 Build a statement from a given expression. More...
 
sequence statement_sequence (statement)
 Get the sequence of a statement sequence. More...
 
list statement_block (statement)
 Get the list of block statements of a statement sequence. More...
 
test statement_test (statement)
 Get the test of a statement. More...
 
statement effective_test_true (test)
 returns the effective true branch of a test by skipping a possible sequence of one element. More...
 
loop statement_loop (statement)
 Get the loop of a statement. More...
 
whileloop statement_whileloop (statement)
 Get the whileloop of a statement. More...
 
statement statement_goto (statement)
 Get the goto of a statement. More...
 
call statement_call (statement)
 Get the call of a statement. More...
 
unstructured statement_unstructured (statement)
 Get the unstructured of a statement. More...
 
forloop statement_forloop (statement)
 Get the forloop of a statement. More...
 
multitest statement_multitest (statement)
 Get the multitest of a statement. More...
 
expression statement_expression (statement)
 Get the expression of a statement. More...
 
statement apply_number_to_statement (hash_table, _int)
 
hash_table build_number_to_statement (hash_table, statement)
 
hash_table allocate_number_to_statement (void)
 
statement clear_labels (statement)
 Get rid of all labels in controlized code before duplication. More...
 
void clear_label (statement)
 
statement st_make_nice_test (expression, list, list)
 
statement makeloopbody (loop, statement, bool)
 statement makeloopbody(l, s_old) make a statement for a loop body, using the fields of a previously existing statement More...
 
string external_statement_identification (statement)
 Does work neither with undefined statements nor with defined statements with undefined instructions. More...
 
string statement_identification (statement)
 Like external_statement_identification(), but with internal information, the hexadecimal address of the statement. More...
 
string safe_statement_identification (statement)
 
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 (NULL if no comment found). More...
 
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, pointer to a "string_undefined" otherwise. More...
 
bool try_to_put_a_comment_on_a_statement (statement, string)
 Put a comment on a statement in a safe way. More...
 
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 there is only empty sequence(s) More...
 
void append_comments_to_statement (statement, string)
 Append a comment string (if non empty) to the comments of a statement, if the c. More...
 
void insert_comments_to_statement (statement, const char *)
 Insert a comment string (if non empty) at the beginning of the comments of a statement. More...
 
void add_one_line_of_comment (statement, string,...)
 
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 statement. More...
 
void fix_sequence_statement_attributes (statement)
 Since blocks are not represented in Fortran, they cannot carry a label. More...
 
void fix_statement_attributes_if_sequence (statement)
 Apply fix_sequence_statement_attributes() on the statement only if it really a sequence. More...
 
entity statement_to_label (statement)
 See if statement s is labelled and can be reached by a GO TO. More...
 
statement add_label_to_statement (entity, statement, statement *)
 Add a label to a statement. More...
 
bool statement_does_return (statement)
 Returns false is no syntactic control path exits s (i.e. More...
 
bool unstructured_does_return (unstructured)
 
void gather_and_remove_all_format_statements_rewrite (statement, list *)
 
list gather_and_remove_all_format_statements (statement)
 Used to keep aside the FORMAT before many code transformation that could remove them either. More...
 
void put_formats_at_module_beginning (statement)
 Transfer all the FORMATs at the very beginning of a module: More...
 
void put_formats_at_module_end (statement)
 Transfer all the FORMATs at the very end of a module: More...
 
bool figure_out_if_it_is_a_format (instruction, bool *)
 
bool format_inside_statement_p (statement)
 
int statement_to_comment_length (statement)
 Number of comment line directly attached to a statement. More...
 
persistant_statement_to_int statement_to_line_number (statement)
 
void insert_statement (statement, statement, bool)
 This is the normal entry point. More...
 
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, i.e. More...
 
void append_statement_to_block_statement (statement, statement)
 
void push_generated_variable_commenter (string(*)(entity))
 
void pop_generated_variable_commenter (void)
 
string generated_variable_comment (entity)
 
statement add_declaration_statement (statement, entity)
 
statement add_declaration_statement_at_beginning (statement, entity)
 
statement add_declaration_statement_here (statement, statement, entity, bool)
 Add a new declaration statement (inspired by generic_add_declaration_statement) More...
 
void fix_block_statement_declarations (statement)
 s is assumed to be a block statement and its declarations field is assumed to be correct, but not necessarily the declaration statements within the block s. More...
 
statement remove_declaration_statement (statement, entity)
 Declarations are not only lists of entities, but also statement to carry the line number, comments,... More...
 
statement update_statement_instruction (statement, instruction)
 Replace the instruction in statement s by instruction i. More...
 
void statement_replace_with_statement_list (statement, statement, list)
 Assume that statement rs appears in statement as and replaced it by a statement list. More...
 
list statement_to_implicit_target_labels (statement)
 Look for labels appearing in END= or ERR= IO clauses and allocate a label list. More...
 
list statement_to_labels (statement)
 Look for non-empty labels appearing directly or indirectly and allocate a label list. More...
 
bool all_statements_defined_p (statement)
 
list statement_to_declarations (void *)
 Get a list of all variables declared recursively within a statement. More...
 
list statements_to_declarations (list)
 Returns the declarations contained in a list of statement. More...
 
list instruction_to_declarations (instruction)
 Get a list of all variables declared recursively within an instruction. More...
 
list statements_to_direct_declarations (list)
 Returns the declarations contained directly in the declaration statements of a list of statements. More...
 
list statement_to_direct_declarations (statement)
 Returns the declarations contained directly in a statement s. More...
 
list statement_to_referenced_entities (statement)
 Get a list of all variables referenced recursively within a statement: More...
 
list statement_to_called_user_entities (statement)
 Get a list of all user function called recursively within a statement: More...
 
reference find_reference_to_variable (statement, entity)
 
int count_static_references_to_variable (statement, entity)
 
int count_references_to_variable (statement, entity)
 
int count_references_to_variable_element (statement, entity)
 
bool statement_substatement_walker (statement, statement)
 
bool statement_substatement_p (statement, statement)
 search a statement inside a statement More...
 
int get_statement_depth (statement, statement)
 computes the block-depth of a statement NOT INTENDED to generate entity name declared at particular block level : The block scope depends on the number of different blocks at the same depth ! More...
 
statement find_statement_from_label (statement, entity)
 find a statement in s with entity label More...
 
statement find_statement_from_label_name (statement, const char *, const char *)
 
bool statement_with_pragma_p (statement)
 Test if a statement has some pragma. More...
 
list statement_pragmas (statement)
 get the list of pragma of a statement s More...
 
extension get_extension_from_statement_with_pragma (statement, const char *)
 Get the extension of a statement with pragma beginning with a prefix. More...
 
list find_statements_with_pragma (statement, const char *)
 Get a list of statements with pragma begining with a prefix. More...
 
bool statement_contains_user_call_p (statement)
 
bool statement_may_have_control_effects_p (statement)
 
bool statement_may_contain_exiting_intrinsic_call_p (statement)
 
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 strdup can be used on the string fields. More...
 
bool statement_in_statement_p (statement, statement)
 
bool statement_in_statements_p (statement, list)
 
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_sequence_statement_with() in phrase/phrase_tools.c but without the constraint that old_stat is in a sequence More...
 
void statement_remove_extensions (statement)
 That's all folks. More...
 
void statement_remove_useless_label (statement, bool *)
 remove the label of a statement if the statement is not unstructured. More...
 
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? More...
 
entity find_final_statement_label (statement)
 Find the label associated with the last statement executed within s. More...
 
string comment_sentinel (tag)
 Start a single line comment. More...
 
void reset_unstructured_number (void)
 reorder.c More...
 
void control_node_reorder (control, set)
 
bool unstructured_reorder (unstructured)
 Reorder an unstructured. More...
 
bool module_body_reorder (statement)
 Reorder a module. More...
 
bool module_reorder (statement)
 Reorder a module and recompute order to statement if any. More...
 
void initialize_clean_up_sequences_statistics (void)
 
void display_clean_up_sequences_statistics (void)
 
bool statement_to_goto_table_flt (instruction)
 End: clean up sequences context. More...
 
void compute_statement_to_goto_table (statement)
 Since clean_up_sequences() is called before the controlizer, there may be some GOTO. More...
 
void discard_statement_to_goto_table (void)
 Discard the statement_to_goto_table map: More...
 
void adjust_goto_from_to (statement, statement)
 Adjust all the GOTOs pointing s1 to s2: More...
 
bool clean_up_sequences_internal (statement)
 An entry point for internal usage, such as from take_out_the_exit_node_if_not_a_continue(): More...
 
bool clean_up_sequences (statement)
 Recursively clean up the statement sequences by fusing them if possible and by removing useless one. More...
 
int fortran_string_compare (string, string)
 expression.c More...
 
tag suggest_basic_for_expression (expression)
 a BASIC tag is returned for the expression this is a preliminary version. More...
 
expression expression_mult (expression)
 
expression entity_to_expression (entity)
 if v is a constant, returns a constant call. More...
 
expression make_entity_expression (entity, cons *)
 
expression reference_to_expression (reference)
 
reference expression_to_reference (expression)
 
reference add_subscript_to_reference (reference, expression)
 Add a last subscript expression s to a reference r. More...
 
void generic_reference_add_fixed_subscripts (reference, type, bool)
 Add a set of zero subscripts to a reference "r" by side effect. More...
 
void reference_add_zero_subscripts (reference, type)
 
void reference_add_zero_subscript (reference)
 No check on reference r. More...
 
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]", references "a", "a[i]" and "a[i][j]" are all legal. More...
 
void reference_add_unbounded_subscripts (reference, type)
 
expression call_to_expression (call)
 Build an expression that call a function or procedure. More...
 
expression make_call_expression (entity, list)
 Build an expression that call an function entity with an argument list. More...
 
expression MakeNullaryCall (entity)
 Creates a call expression to a function with zero arguments. More...
 
expression MakeUnaryCall (entity, expression)
 Creates a call expression to a function with one argument. More...
 
expression MakeBinaryCall (entity, expression, expression)
 Creates a call expression to a function with 2 arguments. More...
 
expression MakeTernaryCall (entity, expression, expression, expression)
 Creates a call expression to a function with 3 arguments. More...
 
expression make_assign_expression (expression, expression)
 Make an assign expression, since in C the assignment is a side effect operator. More...
 
expression make_subscript_expression (expression, list)
 
bool expression_brace_p (expression)
 predicates and short cut accessors on expressions More...
 
bool expression_call_p (expression)
 
bool expression_address_of_p (expression)
 
call expression_call (expression)
 
bool expression_cast_p (expression)
 
cast expression_cast (expression)
 
bool expression_sizeofexpression_p (expression)
 
sizeofexpression expression_sizeofexpression (expression)
 
bool expression_application_p (expression)
 Duplicate bool expression_subscript_p(expression e) { return(syntax_subscript_p(expression_syntax(e))); }. More...
 
application expression_application (expression)
 
bool expression_field_p (expression)
 The expression is of kind "s.a", where "s" is a struct and a "a" field. More...
 
bool field_expression_p (expression)
 The expression is of kind "a", where "a" is a field of some struct "s". More...
 
bool expression_pointer_p (expression)
 we get the type of the expression by calling expression_to_type() which allocates a new one. More...
 
bool array_argument_p (expression)
 
bool expression_reference_p (expression)
 Test if an expression is a reference. More...
 
entity expression_variable (expression)
 
bool is_expression_reference_to_entity_p (expression, entity)
 Test if an expression is a reference to a given variable entity. More...
 
bool same_expression_in_list_p (expression, list)
 This function returns true, if there exists a same expression in the list false, otherwise. More...
 
bool expression_equal_in_list_p (expression, list)
 This function returns true, if there exists an expression equal in the list false, otherwise. More...
 
bool logical_operator_expression_p (expression)
 C xor is missing. More...
 
bool relational_expression_p (expression)
 
bool integer_expression_p (expression)
 
bool logical_expression_p (expression)
 
int trivial_expression_p (expression)
 This function returns: More...
 
expression expression_verbose_reduction_p_and_return_increment (expression, bool(expression))
 
bool expression_implied_do_p (expression)
 
bool comma_expression_p (expression)
 
bool expression_list_directed_p (expression)
 
bool extended_integer_constant_expression_p (expression)
 More extensive than next function. More...
 
bool extended_integer_constant_expression_p_to_int (expression, int *)
 
bool integer_constant_expression_p (expression)
 positive integer constant expression: call to a positive constant or to a sum of positive integer constant expressions (much too restrictive, but enough for the source codes submitted to PIPS up to now). More...
 
bool signed_integer_constant_expression_p (expression)
 
bool expression_with_constant_signed_integer_value_p (expression)
 The expression may be complicated but all its leaves are constants or parameters. More...
 
bool assignment_expression_p (expression)
 Test if an expression is an assignment operation. More...
 
bool add_expression_p (expression)
 Test if an expression is an addition. More...
 
bool sub_expression_p (expression)
 
bool substraction_expression_p (expression)
 Test if an expression is an substraction. More...
 
bool modulo_expression_p (expression)
 
bool divide_expression_p (expression)
 
bool power_expression_p (expression)
 
bool abs_expression_p (expression)
 
bool unary_minus_expression_p (expression)
 
bool iabs_expression_p (expression)
 
bool dabs_expression_p (expression)
 
bool cabs_expression_p (expression)
 
bool min0_expression_p (expression)
 
bool max0_expression_p (expression)
 
bool user_function_call_p (expression)
 
bool operator_expression_p (expression, string)
 
expression make_true_expression (void)
 
expression make_false_expression (void)
 
bool true_expression_p (expression)
 
bool false_expression_p (expression)
 
bool unbounded_dimension_p (dimension)
 bool unbounded_dimension_p(dim) input : a dimension of an array entity. More...
 
expression find_ith_argument (list, int)
 
expression find_ith_expression (list, int)
 find_ith_expression() is obsolet; use find_ith_argument() instead More...
 
expression int_to_expression (_int)
 transform an int into an expression and generate the corresponding entity if necessary; it is not clear if strdup() is always/sometimes necessary and if a memory leak occurs; wait till syntax/expression.c is merged with ri-util/expression.c More...
 
expression make_zero_expression (void)
 Make a zero expression. More...
 
bool zero_expression_p (expression)
 
expression float_to_expression (float)
 
expression complex_to_expression (float, float)
 
expression bool_to_expression (bool)
 
expression Value_to_expression (Value)
 added interface for linear stuff. More...
 
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 encountered; array references are added before their index expressions are scanned; More...
 
list syntax_to_reference_list (syntax, list)
 
bool expression_equal_p (expression, expression)
 Syntactic equality e1==e2. More...
 
bool expression_equal_or_opposite_p (expression, expression)
 e1==e2 or -e1==e2 or e1==-e2 syntactically More...
 
bool expression_opposite_p (expression, expression)
 e1+e2==0, i.e. More...
 
bool expression_lists_equal_p (list, list)
 
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 More...
 
bool sizeofexpression_equal_p (sizeofexpression, sizeofexpression)
 
bool cast_equal_p (cast, cast)
 
bool syntax_equal_p (syntax, syntax)
 
bool subscript_equal_p (subscript, subscript)
 
bool reference_equal_p (reference, reference)
 
bool range_equal_p (range, range)
 
bool call_equal_p (call, call)
 
int integer_constant_expression_value (expression)
 
int signed_integer_constant_expression_value (expression)
 
expression make_max_expression (expression, expression, enum language_utype)
 
expression make_min_expression (expression, expression, enum language_utype)
 
expression make_factor_expression (int, entity)
 Some functions to generate expressions from vectors and constraint systems. More...
 
expression make_vecteur_expression (Pvecteur)
 make expression for vector (Pvecteur) More...
 
statement Pvecteur_to_assign_statement (entity, Pvecteur)
 generates var = linear expression from the Pvecteur. More...
 
expression make_constraint_expression (Pvecteur, Variable)
 Make an expression from a constraint v for a given index. More...
 
expression make_contrainte_expression (Pcontrainte, Variable)
 A wrapper around make_constraint_expression() for compatibility. More...
 
expression Pvecteur_to_expression (Pvecteur)
 AP, sep 25th 95 : some usefull functions moved from static_controlize/utils.c. More...
 
reference expression_reference (expression)
 Short cut, meaningful only if expression_reference_p(e) holds. More...
 
bool expression_subscript_p (expression)
 
subscript expression_subscript (expression)
 
bool expression_range_p (expression)
 
range expression_range (expression)
 
bool array_reference_p (reference)
 predicates on references More...
 
bool references_do_not_conflict_p (reference, reference)
 If true is returned, the two references cannot conflict unless array bound declarations are violated. More...
 
expression expression_list_to_binary_operator_call (list, entity)
 
expression expression_list_to_conjonction (list)
 
bool expression_intrinsic_operation_p (expression)
 bool expression_intrinsic_operation_p(expression exp): Returns true if "exp" is an expression with a call to an intrinsic operation. More...
 
bool call_constant_p (call)
 bool call_constant_p(call c): Returns true if "c" is a call to a constant, that is, a constant number or a symbolic constant. More...
 
bool expression_equal_integer_p (expression, int)
 ================================================================ More...
 
expression make_op_exp (char *, expression, expression)
 ================================================================ More...
 
expression add_integer_to_expression (expression, int)
 
expression make_lin_op_exp (entity, expression, expression)
 ================================================================ More...
 
int expression_to_int (expression)
 ================================================================ More...
 
float expression_to_float (expression)
 Same as above for floating point constants. More...
 
constant expression_constant (expression)
 This function returns a "constant" object if the expression is a constant such as 10, -11 or 2.345 or "foo". More...
 
bool expression_string_constant_p (expression)
 
char * expression_string_constant (expression)
 returns a newly allocated string! More...
 
bool expression_integer_constant_p (expression)
 
bool expression_constant_p (expression)
 ================================================================ More...
 
bool extended_expression_constant_p (expression)
 Returns true if the value of the expression does not depend syntactically on the current store. More...
 
bool expression_is_C_rhs_p (expression)
 Not all expressions can be used as right-hand side (rhs) in C assignments. More...
 
bool expression_one_p (expression)
 
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 (void *) 0). More...
 
void davinci_dump_expression (FILE *, expression)
 dump expression e in file out as a davinci graph. More...
 
void davinci_dump_all_expressions (FILE *, statement)
 dump all expressions in s to out. More...
 
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 in the expression exp by the new entity. More...
 
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. More...
 
bool simplify_C_expression (expression)
 Replace C operators "+C" and "-C" which can handle pointers by arithmetic operators "+" and "-" when it is safe to do so, i.e. More...
 
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 comparison operator used. More...
 
bool reference_with_constant_indices_p (reference)
 
reference reference_with_store_independent_indices (reference)
 Return by side effect a reference whose memory locations includes the memory locations of r in case the subcript expressions are changed by a store change. More...
 
bool reference_with_unbounded_indices_p (reference)
 indices can be constant or unbounded: they are store independent. More...
 
bool reference_with_unbounded_subscript_p (reference)
 See if the reference uses the unbounded function '*'. More...
 
bool store_independent_reference_p (reference)
 Does this reference define the same set of memory locations regardless of the current (environment and) memory state? More...
 
entity expression_to_entity (expression)
 just returns the entity of an expression, or entity_undefined More...
 
list expressions_to_entities (list)
 map expression_to_entity on expressions More...
 
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 use More...
 
bool expression_similar_p (expression, expression)
 compare if two expressions are similar that is can we exchange target and pattern by substituing variables examples: 1+2 ~ a+b a+b !~ a+2 1+b ~ 1+c More...
 
list make_list_of_constant (int, int)
 of expression More...
 
bool brace_expression_p (expression)
 Return bool indicating if expression e is a brace expression. More...
 
list brace_expression_to_statements (entity, expression)
 converts a brace expression used to initialize an array (not a struct yet) into a statement sequence More...
 
void brace_expression_to_updated_type (entity, expression)
 use a brace expression to update the type of array "arr" if the dimensions are implicit More...
 
bool reference_scalar_p (reference)
 This function returns true if Reference r is scalar. More...
 
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 expression More...
 
void update_expression_syntax (expression, syntax)
 frees expression syntax of e and replace it by the new syntax s More...
 
void local_assign_expression (expression, expression)
 replace expression caller by expression field , where field is contained by caller More...
 
expression syntax_to_expression (syntax)
 generates an expression from a syntax More...
 
expression monome_to_expression (Pmonome)
 converts a monome to an expression More...
 
expression polynome_to_expression (Ppolynome)
 converts a polynomial to expression More...
 
Ppolynome expression_to_polynome (expression)
 =========================================================================== More...
 
bool simplify_expression (expression *)
 use polynomials to simplify an expression in some cases this operation can change the basic of the expression. More...
 
void simplify_expressions (void *)
 
expression reference_offset (reference)
 computes the offset of a C reference with its origin More...
 
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, as well as e2. More...
 
bool expression_minmax_p (expression)
 
expression MakeSizeofExpression (expression)
 
expression MakeSizeofType (type)
 
expression MakeCastExpression (type, expression)
 
expression MakeCommaExpression (list)
 
expression MakeBraceExpression (list)
 
expression dereference_expression (expression)
 generate a newly allocated expression for *(e) More...
 
expression make_address_of_expression (expression)
 generate a newly allocated expression for &(e) More...
 
list subscript_expressions_to_constant_subscript_expressions (list)
 make a full copy of the subscript expression list, preserve constant subscripts, replace non-constant subscript by the star subscript expression. More...
 
expression pointer_reference_to_expression (reference)
 Assume p is a pointer. More...
 
expression expression_to_dereferencing_expression (expression)
 Reuse expression e to build expression *(e) without cheking the legality of the construct. More...
 
bool C_initialization_expression_p (expression)
 
list struct_initialization_expression_to_expressions (expression)
 Returns a list of expressions hidden by the brace function. More...
 
void free_expressions (list)
 Free a list of expressions. More...
 
void clean_all_normalized (expression)
 
expression subscript_value_stride (entity, list)
 
expression size_of_actual_array (entity, list, int)
 
expression make_ref_expr (entity, list)
 
bool unbounded_entity_p (entity)
 
bool unbounded_expression_p (expression)
 
expression make_unbounded_expression (void)
 
list make_unbounded_subscripts (int)
 FI: this piece of code must have been duplicated somewhere else in an effect library. More...
 
bool user_call_p (call)
 Test if a call is a user call. More...
 
void normalize_subscript_expression (expression)
 Normalization of subscript in expressions. More...
 
void expression_normalize_subscripts (expression)
 To be used for initialization expressions. More...
 
void statement_normalize_subscripts (statement)
 To be used for module statements. More...
 
string type_to_string (const type)
 type.c More...
 
string safe_type_to_string (const type)
 
basic MakeBasicOverloaded (void)
 bool same_type_name_p(const type t0, const type t1) { More...
 
mode MakeModeReference (void)
 
mode MakeModeValue (void)
 
type MakeTypeStatement (void)
 
type MakeTypeUnknown (void)
 
type MakeTypeVoid (void)
 
type MakeTypeOverloaded (void)
 
type MakeTypeVariable (basic, cons *)
 BEGIN_EOLE. More...
 
basic MakeBasic (int)
 END_EOLE. More...
 
type MakeTypeArray (basic, cons *)
 functions on types More...
 
parameter MakeOverloadedParameter (void)
 
parameter MakePointerParameter (void)
 
parameter MakeVoidPointerParameter (void)
 
parameter MakeIntegerParameter (void)
 
parameter MakeLongIntegerParameter (void)
 
parameter MakeUnsignedIntegerParameter (void)
 
parameter MakeLongLongIntegerParameter (void)
 MB. More...
 
parameter MakeRealParameter (void)
 
parameter MakeDoubleprecisionParameter (void)
 
parameter MakeQuadprecisionParameter (void)
 MB. More...
 
parameter MakeLogicalParameter (void)
 
parameter MakeComplexParameter (void)
 
parameter MakeDoublecomplexParameter (void)
 
parameter MakeLongDoublecomplexParameter (void)
 MB. More...
 
parameter MakeCharacterParameter (void)
 
parameter MakeAnyScalarParameter (tag, _int)
 For Fortran. More...
 
type MakeOverloadedResult (void)
 this function creates a default fortran operator result, i.e. More...
 
type MakeUnsignedIntegerResult (void)
 
type MakeVoidPointerResult (void)
 
type MakeIntegerResult (void)
 
type MakeLongIntegerResult (void)
 MB. More...
 
type MakeLongLongIntegerResult (void)
 MB. More...
 
type MakeRealResult (void)
 
type MakeDoubleprecisionResult (void)
 
type MakeQuadprecisionResult (void)
 MB. More...
 
type MakeLogicalResult (void)
 
type MakeComplexResult (void)
 
type MakeDoublecomplexResult (void)
 
type MakeLongDoublecomplexResult (void)
 MB. More...
 
type MakeCharacterResult (void)
 
type MakeAnyScalarResult (tag, _int)
 
bool same_type_p (type, type)
 Type equality and equivalence. More...
 
bool type_equal_p (type, type)
 
bool type_equal_up_to_qualifiers_p (type, type)
 
bool type_equal_up_to_typedefs_and_qualifiers_p (type, type)
 
bool ultimate_type_equal_p (type, type)
 
bool concrete_type_equal_p (type, type)
 Expand typedefs before the type comparison. More...
 
bool type_structurally_equal_p (type, type)
 Type t1 and t2 are equal if their basic concrete components are equal. More...
 
type array_type_projection (type)
 T is assumed to be an array type. More...
 
bool array_pointer_type_equal_p (type, type)
 assume that a pointer to type x is equal to a 1-D array of x More...
 
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. More...
 
bool array_element_type_p (type, type)
 is "et" the type of an element of an array of type "at"? More...
 
bool concrete_array_pointer_type_equal_p (type, type)
 Same as above, but resolve typedefs first. More...
 
type make_scalar_integer_type (_int)
 
type make_scalar_complex_type (_int)
 
type make_scalar_overloaded_type (void)
 
bool area_equal_p (area, area)
 
bool dimension_equal_p (dimension, dimension)
 
bool dimensions_equal_p (list, list)
 
bool qualifiers_equal_p (list, list)
 
bool generic_variable_equal_p (variable, variable, bool, bool, hash_table)
 
bool variable_equal_p (variable, variable)
 
bool generic_basic_equal_p (basic, basic, bool, bool, hash_table)
 
bool basic_equal_p (basic, basic)
 
bool same_basic_p (basic, basic)
 check if two basics are similar. More...
 
bool compatible_basic_p (basic, basic)
 check if two basics are similar. More...
 
bool generic_functional_equal_p (functional, functional, bool, bool, hash_table)
 
bool functional_equal_p (functional, functional)
 
bool generic_parameter_equal_p (parameter, parameter, bool, bool, hash_table)
 
bool parameter_equal_p (parameter, parameter)
 
bool mode_equal_p (mode, mode)
 
int string_type_size (basic)
 
int basic_type_size (basic)
 See also SizeOfElements() More...
 
basic expression_basic (expression)
 
dimension dimension_dup (dimension)
 
list ldimensions_dup (list)
 
dimension FindIthDimension (entity, int)
 
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 expression "exp" if "apply_p" is FALSE. More...
 
basic basic_of_any_expression (expression, bool)
 
basic basic_of_expression (expression)
 basic basic_of_expression(expression exp): Makes a basic of the same basic as the expression "exp". More...
 
basic basic_of_any_reference (reference, bool, bool)
 Retrieves the basic of a reference in a newly allocated basic object. More...
 
basic basic_of_reference (reference)
 Retrieves the basic of a reference in a newly allocated basic object. More...
 
basic basic_of_call (call, bool, bool)
 basic basic_of_call(call c): returns the basic of the result given by the call "c". More...
 
basic basic_of_external (call)
 basic basic_of_external(call c): returns the basic of the result given by the call to an external function. More...
 
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 function. More...
 
basic basic_of_constant (call)
 basic basic_of_constant(call c): returns the basic of the call to a constant. More...
 
basic basic_union (expression, expression)
 basic basic_union(expression exp1 exp2): returns the basic of the expression which has the most global basic. More...
 
basic basic_ultimate (basic)
 get the ultimate basic from a basic typedef More...
 
basic basic_maximum (basic, basic)
 
basic basic_of_expressions (list, bool)
 
type intrinsic_call_to_type (call)
 END_EOLE. More...
 
type call_to_type (call)
 
type reference_to_type (reference)
 
type expression_to_type (expression)
 For an array declared as int a[10][20], the type returned for a[i] is int [20]. More...
 
type expression_to_uncasted_type (expression)
 If the expression is casted, return its type before cast. More...
 
type expression_to_user_type (expression)
 Preserve typedef'ed types when possible. More...
 
bool overloaded_type_p (type)
 Returns true if t is a variable type with a basic overloaded. More...
 
bool is_inferior_basic (basic, basic)
 bool is_inferior_basic(basic1, basic2) return true if basic1 is less complex than basic2 ex: int is less complex than float*4, float*4 is less complex than float*8, ... More...
 
basic simple_basic_dup (basic)
 
entity basic_to_generic_conversion (basic)
 returns the corresponding generic conversion entity, if any. More...
 
bool signed_type_p (type)
 
bool unsigned_basic_p (basic)
 
bool unsigned_type_p (type)
 Predicates on types. More...
 
bool long_type_p (type)
 
bool bit_type_p (type)
 
bool string_type_p (type)
 
bool logical_type_p (type)
 
bool char_type_p (type)
 return true whether ‘t’ is a char or an unsigned char More...
 
bool basic_type_p (type)
 Safer than the other implementation? bool pointer_type_p(type t) { bool is_pointer = false;. More...
 
bool type_fundamental_basic_p (type)
 
bool array_type_p (type)
 
unsigned int array_type_dimension (type)
 
bool scalar_type_p (type)
 
bool type_pointer_on_struct_variable_p (type)
 
bool variable_length_array_type_p (type)
 Is this equivalent to dependent_type_p()? More...
 
bool fixed_length_array_type_p (type)
 
bool pointer_type_p (type)
 Check for scalar pointers. More...
 
bool C_pointer_type_p (type)
 Returns OK for "char[]" as well as for "char *". More...
 
bool array_of_pointers_type_p (type)
 
type pointed_type (type)
 returns the type pointed by the input type if it is a pointer or an array of pointers More...
 
bool FILE_star_type_p (type)
 
list type_fields (type)
 
bool derived_type_p (type)
 Returns true if t is of type struct, union or enum. More...
 
bool array_of_derived_type_p (type)
 
bool struct_type_p (type)
 Returns true if t is of type derived and if the derived type is a struct. More...
 
bool array_of_struct_type_p (type)
 
bool union_type_p (type)
 Returns true if t is of type derived and if the derived type is a union. More...
 
bool enum_type_p (type)
 Returns true if t is of type derived and if the derived type is a enum. More...
 
bool typedef_type_p (type)
 Returns true if t is a typedefED type. More...
 
type make_standard_integer_type (type, int)
 
bool standard_long_integer_type_p (type)
 Used to encode the long keyword in the parser. More...
 
bool default_complex_type_p (type)
 
bool float_type_p (type)
 
bool scalar_integer_type_p (type)
 
bool integer_type_p (type)
 
type make_standard_long_integer_type (type)
 
type ultimate_type (type)
 
type ultimate_array_type (type)
 
void entity_basic_concrete_types_init (void)
 
void entity_basic_concrete_types_reset (void)
 
list dimensions_to_normalized_dimensions (list)
 evaluate constant expressions appearing in dimensions of list dl More...
 
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 in the entity_types_to_bctypes table). More...
 
type entity_basic_concrete_type (entity)
 retrieves or computes and then returns the basic concrete type of an entity More...
 
bool basic_concrete_type_leads_to_pointer_p (type)
 returns true when the input type successors may be pointers More...
 
type expression_to_concrete_type (expression)
 A new type is allocated. More...
 
bool call_compatible_type_p (type)
 end of basic_concrete_types More...
 
type call_compatible_type (type)
 returns the type necessary to generate or check a call to an object of type t. More...
 
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 type. More...
 
bool type_struct_variable_p (type)
 
bool type_union_variable_p (type)
 
int number_of_fields (type)
 Recursive number of fields in a data structure... More...
 
int number_of_items (type)
 Same as above, but arrays in struct are taken into account. More...
 
list recursive_functional_type_supporting_entities (list, set, functional)
 
list functional_type_supporting_entities (list, functional)
 
list enum_supporting_entities (list, set, entity)
 
list generic_constant_expression_supporting_entities (list, set, expression, bool)
 
list constant_expression_supporting_entities (list, set, expression)
 C version. More...
 
list fortran_constant_expression_supporting_entities (list, expression)
 Fortran version. More...
 
list generic_symbolic_supporting_entities (list, set, symbolic, bool)
 
list symbolic_supporting_entities (list, set, symbolic)
 C version. More...
 
list basic_supporting_entities (list, set, basic)
 
list variable_type_supporting_entities (list, set, variable)
 
list recursive_type_supporting_entities (list, set, type)
 
list type_supporting_entities (list, type)
 
bool declarable_type_p (type, list)
 Are all types necessary to define fully type "t" listed in list "pdl"? More...
 
list functional_type_supporting_references (list, functional)
 
list enum_supporting_references (list, entity)
 
list constant_expression_supporting_references (list, expression)
 Only applicable to C expressions. More...
 
list symbolic_supporting_references (list, symbolic)
 
list basic_supporting_references (list, basic)
 
list variable_type_supporting_references (list, variable)
 
list fortran_type_supporting_entities (list, type)
 
list type_supporting_references (list, type)
 
bool check_C_function_type (entity, list)
 Check that an effective parameter list is compatible with a function type. More...
 
size_t maximal_type_depth (type)
 Number of steps to access the lowest leave of type t without a recursive test. More...
 
size_t type_depth (type)
 Number of steps to access the lowest leave of type t without dereferencing. More...
 
int effect_type_depth (type)
 Number of steps to access the lowest leave of type t. More...
 
int effect_basic_depth (basic)
 
list functional_type_supporting_types (functional)
 FI: I'm not sure this function is of any use. More...
 
list type_supporting_types (type)
 Return the list of types used to define type t. More...
 
type make_char_array_type (int)
 
type make_scalar_char_pointer_type (void)
 Allocate a char * pointer type. More...
 
bool overloaded_parameters_p (list)
 
type type_to_pointer_type (type)
 allocate a new type "pt" which includes directly "t". More...
 
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. More...
 
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. More...
 
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. More...
 
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 t is a pointer type. More...
 
list derived_type_fields (type)
 
list derived_type_to_fields (type)
 
entity find_field_in_field_list (entity, list)
 To deal with fields declared in different C files. More...
 
bool qualifier_equal_p (qualifier, qualifier)
 
string qualifier_to_string (qualifier)
 
bool qualifiers_const_p (list)
 Check that a qualifier list contains the const qualifier. More...
 
bool qualifiers_restrict_p (list)
 Check that a qualifier list contains the restrict qualifier. More...
 
bool type_with_const_qualifier_p (type)
 Is there a const qualifier associated to type t. More...
 
type subscripted_type_to_type (type, expression)
 Returns the type of an object of type t subscripted by expression se. More...
 
dimension find_ith_dimension (list, int)
 This function returns the ith dimension of a list of dimensions. More...
 
int variable_dimension_number (variable)
 
type type_to_array_type (type)
 convert a type "t" into a newly allocated array type "at" whose elements are of type "t", unless "t" is void. More...
 
type array_type_to_element_type (type)
 returns the type of the elements of an array type, as a newly allocated type. More...
 
type array_type_to_sub_array_type (type)
 Allocate a new type, the sub-array type of "t". More...
 
type array_type_to_pointer_type (type)
 Allocate a new type that is the type of an array constant. More...
 
list make_unbounded_dimensions (int)
 Minimal information to build a d-dimensional array type. More...
 
bool type_void_star_p (type)
 
bool char_star_type_p (type)
 Beware of typedefs. More...
 
bool char_star_constant_function_type_p (type)
 Beware of typedefs. More...
 
list struct_type_to_fields (type)
 
bool dependent_type_p (type)
 A type is dependent in many ways according to definitions given in Wikipedia. More...
 
list dependence_of_dependent_type (type)
 similar to dependent_type_p but return a list of reference on which the type depend. More...
 
normalized NormalizeExpression (expression)
 normalize.c More...
 
normalized NormalizeSyntax (syntax)
 
normalized NormalizeCast (cast)
 
normalized NormalizeCall (call)
 
normalized NormalizeConstant (constant)
 
normalized NormalizeReference (reference)
 
normalized NormalizeIntrinsic (entity, list)
 
normalized binary_to_normalized (list, int)
 
bool EvalNormalized (normalized, int *)
 
void FreeNormalized (normalized)
 
void free_expression_normalized (expression)
 
void unnormalize_expression (void *)
 void unnormalize_expression(expression exp): puts all the normalized field of expressions in "st" to undefined and does the unnormalization recursively More...
 
Pvecteur expression_to_affine (expression)
 
normalized normalize_reference (reference)
 
void normalize_all_expressions_of (void *)
 
void normalize_first_expressions_of (void *)
 
entity set_current_module_entity (entity)
 static.c More...
 
entity get_current_module_entity (void)
 Get the entity of the current module. More...
 
void reset_current_module_entity (void)
 Reset the current module entity. More...
 
void error_reset_current_module_entity (void)
 To be called by an error management routine only. More...
 
const char * get_current_module_name (void)
 Get the name of the current module. More...
 
void set_current_module_declarations (list)
 
void reset_current_module_declarations (void)
 
list get_current_module_declarations (void)
 
statement set_current_module_statement (statement)
 Set the current module statement. More...
 
void push_current_module_statement (statement)
 Set the statement of the current module and push the statement of the previous one on a stack. More...
 
void pop_current_module_statement (void)
 Pop the current module statement stack and use it as the current module statement. More...
 
statement get_current_module_statement (void)
 Get the current module statement. More...
 
void reset_current_module_statement (void)
 Reset the current module statement. More...
 
void error_reset_current_module_statement (void)
 To be called by an error management routine only. More...
 
hash_table make_keyword_typedef_table (int)
 
void set_keyword_typedef_table (hash_table)
 
void reset_keyword_typedef_table (void)
 
void free_keyword_typedef_table (void)
 
void declare_new_typedef (const string)
 
_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 hash-table keyword_typedef_table. More...
 
void make_statement_global_stack (void)
 
void push_statement_on_statement_global_stack (statement)
 
statement get_current_statement_from_statement_global_stack (void)
 
statement pop_statement_global_stack (void)
 
void free_statement_global_stack (void)
 
bool statement_global_stack_defined_p (void)
 
void print_homogeneous_arguments (list, const char *(entity))
 arguments.c More...
 
void dump_arguments (cons *)
 entity_name is a macro, hence the code replication More...
 
consarguments_add_entity (cons *, entity)
 
consarguments_rm_entity (cons *, entity)
 
consarguments_union (cons *, cons *)
 cons * arguments_union(cons * a1, cons * a2): returns a = union(a1, a2) where a1 and a2 are lists of entities. More...
 
bool arguments_equal_p (list, list)
 Check the syntactic equality of lists a1 and a2. More...
 
bool entity_is_argument_p (entity, cons *)
 
list arguments_intersection (list, list)
 Build a new list with all entities occuring in both a1 and a2. More...
 
bool arguments_set_equal_p (list, list)
 Set equality of lists a1 and a2. More...
 
bool arguments_subset_p (list, list)
 Check if a1 is a subset of a2. More...
 
void free_arguments (cons *)
 
consdup_arguments (cons *)
 
consarguments_difference (cons *, cons *)
 set difference: a1 - a2 ; similar to set intersection More...
 
list base_to_entities (Pvecteur)
 generate a Newgen list with all entities refered in vector b More...
 
string build_new_top_level_module_name (const char *, bool)
 module.c More...
 
bool static_module_p (entity)
 Check if the given module entity is a static module. More...
 
bool compilation_unit_entity_p (entity)
 Check if the given module entity is a compilation unit. More...
 
bool variable_in_module_p2 (entity, entity)
 
void variable_declaration_verify (reference)
 
void symbolic_constant_declaration_verify (call)
 
void add_non_declared_reference_to_declaration (reference)
 
void add_symbolic_constant_to_declaration (call)
 
bool variable_declaration_coherency_p (entity, statement)
 
sentence get_header_comments (entity)
 Get the header comments (before PROGRAM, FUNCTION,...) from the text declaration: More...
 
sentence get_declaration_comments (entity)
 Get all the declaration comments, that are comments from the PROGRAM, FUNCTION,... More...
 
list module_formal_parameters (entity)
 list module_formal_parameters(entity func) input : an entity representing a function. More...
 
int module_to_declaration_length (entity)
 Number of user declaration lines for a module. More...
 
list declaration_supporting_references (list)
 Find all references in the declaration list. More...
 
list module_all_declarations (entity)
 The function itself is not in its declarations. More...
 
bool c_language_module_p (entity)
 
bool fortran_language_module_p (entity)
 
bool fortran95_language_module_p (entity)
 
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 a Fortran subroutine. More...
 
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 a Fortran subroutine. More...
 
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 Fortran subroutine. More...
 
bool return_value_p (entity)
 Is entity v the return value of some function? More...
 
bool function_return_value_p (entity, entity)
 Is entity v the return value of function f? More...
 
bool void_function_p (entity)
 Check if m is a C void function or a Fortran subroutine. More...
 
list string_to_user_modules (const char *)
 Build a list of functions from a string s containing SPACE separated function names. More...
 
void control_map_get_blocs (control, list *)
 Build recursively the list of all controls reachable from a control of an unstructured. More...
 
void find_a_control_path (control, control, list *, list *, int)
 Build recursively a control path from b to e. More...
 
void backward_control_map_get_blocs (control, cons **)
 
void backward_control_map_get_blocs_but (control, control, list *)
 Transitive closure of c's predecessors, but for control f. More...
 
void forward_control_map_get_blocs (control, cons **)
 
void forward_control_map_get_blocs_but (control, control, list *)
 Transitive closure of c's successors, but for control f. More...
 
void wide_forward_control_map_get_blocs (control, cons **)
 
bool is_control_in_list_p (control, list)
 Test if a control node is in a list of control nodes. More...
 
int occurences_in_control_list (control, list)
 Count the number of occurences of a control node in a list of control nodes. More...
 
void control_list_patch (list, control, control)
 Replace in a list of control nodes all the instance of a control node by another one. More...
 
void transfer_control_predecessor (control, control, control)
 Transfer a control node as a predecessor from one node to another one. More...
 
void transfer_control_successor (control, control, control)
 Transfer a control node as a successor of one node to another one. More...
 
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 of controls. More...
 
void check_control_coherency (control)
 Test the coherency of a control node network from a control node. More...
 
void print_control_node (control)
 
void print_control_nodes (list)
 Display identification of a list of control nodes. More...
 
void display_address_of_control_nodes (list)
 Display the adresses a list of control nodes. More...
 
void display_linked_control_nodes (control)
 Display all the control nodes reached or reachable from c for debugging purpose. More...
 
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 nodes with more than 1 predecessor, that is when it reach another flow. More...
 
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 predecessor. More...
 
void remove_all_unreachable_controls_of_an_unstructured (unstructured)
 Remove all control nodes that are not forward reachable from the entry node. More...
 
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: More...
 
void remove_a_control_from_an_unstructured (control)
 Remove a control node from a control graph. More...
 
void remove_a_control_from_an_unstructured_without_relinking (control)
 It removes a control node from its successor and predecessor. More...
 
void discard_an_unstructured_without_its_statements (unstructured)
 Used to discard an unstructured without touching its statements. More...
 
void free_a_control_without_its_statement (control)
 Remove a control node without touching its statement, its predecessors and successors, if any. More...
 
void discard_a_control_sequence_without_its_statements (control, control)
 Remove a control sequence without touching its statements. More...
 
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... More...
 
void link_2_control_nodes (control, control)
 Add an edge between 2 control nodes. More...
 
void link_3_control_nodes (control, control, control)
 Add an edge between 2 control nodes. More...
 
void unlink_2_control_nodes (control, control)
 Remove all edged between 2 control nodes. More...
 
void insert_control_in_arc (control, control, control)
 Insert a control node between 2 connected control nodes. More...
 
void fuse_2_control_nodes (control, control)
 Fuse a 2 control nodes. More...
 
bool hpf_directive_string_p (const char *)
 hpfc.c More...
 
bool hpf_directive_entity_p (entity)
 
bool realign_directive_p (entity)
 
bool redistribute_directive_p (entity)
 
bool dead_fcd_directive_p (entity)
 
bool fcd_directive_string_p (const char *)
 
bool fcd_directive_p (entity)
 
bool keep_directive_in_code_p (const char *)
 whether an entity must be kept in the code. More...
 
Psysteme cute_convex_union (Psysteme, Psysteme)
 convex_hull.c More...
 
void GenericCleanEntities (list, entity, bool)
 clean.c More...
 
void GenericCleanLocalEntities (entity, bool)
 
void CleanLocalEntities (entity)
 Fortran version. More...
 
void CCleanLocalEntities (entity)
 C language version. More...
 
void RemoveLocalEntities (entity)
 Useful for ParserError()? More...
 
statement clone_statement (statement, clone_context)
 clone_statement.c More...
 
bool entity_allocatable_p (entity)
 allocatable.c More...
 
bool expression_allocatable_data_access_p (expression)
 Check if an expression is a reference to an allocatable array. More...
 
expression get_allocatable_data_expr (entity)
 This function produce an expression that is an access to the array inside the allocatable structure. More...
 
entity get_allocatable_data_entity (entity)
 Get the entity inside the struct corresponding to the array, mostly for correct prettyprint. More...
 
void replace_entities (void *, hash_table)
 replace.c More...
 
void replace_entity (void *, entity, entity)
 per variable version of replace_entities. More...
 
void replace_reference (void *, reference, entity)
 Replace an old reference by a reference to a new entity in a statement. More...
 
void replace_entity_by_expression_with_filter (void *, entity, expression, bool(*)(expression))
 
void replace_entity_by_expression (void *, entity, expression)
 replace all reference to entity ent by expression exp in s. More...
 
void replace_entities_by_expression (void *, hash_table)
 

Variables

list integer_entities
 Make a new variable entity which name is one letter prefix + one incrementing number. More...
 
list real_entities
 
list complex_entities
 
list logical_entities
 
list double_entities
 
list char_entities
 
const string FORTRAN_PRAGMA_HEADER
 pragma.c More...
 
const string FORTRAN_OMP_CONTINUATION
 
entity DynamicArea
 area.c More...
 
entity StaticArea
 
entity HeapArea
 
entity StackArea
 
entity AllocatableArea
 
int Nbrdo
 loop.c More...
 
hash_table statement_to_goto_table
 clean_up_sequences.c More...
 
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 name or a keyword or an identifier. More...
 
char vcid_ri_util_control []
 control.c More...
 

Macro Definition Documentation

◆ __ERRNO_LOCATION_OPERATOR_NAME

#define __ERRNO_LOCATION_OPERATOR_NAME   "__errno_location"

bits/errno.h

Definition at line 571 of file ri-util.h.

◆ __FILBUF_FUNCTION_NAME

#define __FILBUF_FUNCTION_NAME   "__filbuf"

Definition at line 981 of file ri-util.h.

◆ __FILSBUF_FUNCTION_NAME

#define __FILSBUF_FUNCTION_NAME   "__flsbuf"

Definition at line 982 of file ri-util.h.

◆ __GETPGID_FUNCTION_NAME

#define __GETPGID_FUNCTION_NAME   "__getpgid"

Definition at line 832 of file ri-util.h.

◆ __H_ERRNO_LOCATION_OPERATOR_NAME

#define __H_ERRNO_LOCATION_OPERATOR_NAME   "__h_erno_location"

netdb.h

Definition at line 1235 of file ri-util.h.

◆ _EXIT_FUNCTION_NAME [1/2]

#define _EXIT_FUNCTION_NAME   "_exit"

Definition at line 1030 of file ri-util.h.

◆ _EXIT_FUNCTION_NAME [2/2]

#define _EXIT_FUNCTION_NAME   "_exit"

Definition at line 1030 of file ri-util.h.

◆ _IO_GETC_FUNCTION_NAME

#define _IO_GETC_FUNCTION_NAME   "_IO_getc" /**libio.h */

Definition at line 953 of file ri-util.h.

◆ _IO_PUTC_FUNCTION_NAME

#define _IO_PUTC_FUNCTION_NAME   "_IO_putc" /**libio.h */

Definition at line 956 of file ri-util.h.

◆ _TOLOWER_OPERATOR_NAME

#define _TOLOWER_OPERATOR_NAME   "_tolower"

Definition at line 563 of file ri-util.h.

◆ _TOUPPER_OPERATOR_NAME

#define _TOUPPER_OPERATOR_NAME   "_toupper"

Definition at line 564 of file ri-util.h.

◆ A614_FUNCTION_NAME

#define A614_FUNCTION_NAME   "a64l"

Definition at line 408 of file ri-util.h.

◆ ABORT_FUNCTION_NAME

#define ABORT_FUNCTION_NAME   "abort"

Definition at line 1027 of file ri-util.h.

◆ ABS_OPERATOR_NAME

#define ABS_OPERATOR_NAME   "ABS"

Definition at line 213 of file ri-util.h.

◆ ACCT_FUNCTION_NAME

#define ACCT_FUNCTION_NAME   "acct"

Definition at line 882 of file ri-util.h.

◆ ACOS_OPERATOR_NAME

#define ACOS_OPERATOR_NAME   "ACOS"

Definition at line 169 of file ri-util.h.

◆ ACOSF_OPERATOR_NAME

#define ACOSF_OPERATOR_NAME   "acosf"

Definition at line 600 of file ri-util.h.

◆ ACOSHF_OPERATOR_NAME

#define ACOSHF_OPERATOR_NAME   "acoshf"

Definition at line 621 of file ri-util.h.

◆ ACOSHL_OPERATOR_NAME

#define ACOSHL_OPERATOR_NAME   "acoshl"

Definition at line 622 of file ri-util.h.

◆ ACOSL_OPERATOR_NAME

#define ACOSL_OPERATOR_NAME   "acosl"

Definition at line 601 of file ri-util.h.

◆ ADDRESS_OF_OPERATOR_NAME

#define ADDRESS_OF_OPERATOR_NAME   "__address-of__"

Definition at line 187 of file ri-util.h.

◆ AIMAG_CONVERSION_NAME

#define AIMAG_CONVERSION_NAME   "AIMAG"

Definition at line 249 of file ri-util.h.

◆ AINT_CONVERSION_NAME

#define AINT_CONVERSION_NAME   "AINT"

Definition at line 243 of file ri-util.h.

◆ ALIGN_SUFFIX

#define ALIGN_SUFFIX   "A"

suffixes for HPF directives managed by HPFC

Definition at line 1880 of file ri-util.h.

◆ ALLOCA_FUNCTION_NAME

#define ALLOCA_FUNCTION_NAME   "alloca"

Definition at line 1026 of file ri-util.h.

◆ ALLOCATABLE_LBOUND_PREFIX

#define ALLOCATABLE_LBOUND_PREFIX   "__pips__allocatable__lbound__"

Definition at line 1688 of file ri-util.h.

◆ ALLOCATABLE_PREFIX

#define ALLOCATABLE_PREFIX   "__pips_allocatable__"

Definition at line 1687 of file ri-util.h.

◆ ALLOCATABLE_UBOUND_PREFIX

#define ALLOCATABLE_UBOUND_PREFIX   "__pips__allocatable__ubound__"

Definition at line 1689 of file ri-util.h.

◆ ALLOCATE_FUNCTION_NAME

#define ALLOCATE_FUNCTION_NAME   "ALLOCATE"

F95.

Definition at line 335 of file ri-util.h.

◆ ALOG10_OPERATOR_NAME

#define ALOG10_OPERATOR_NAME   "ALOG10"

Definition at line 155 of file ri-util.h.

◆ ALOG_OPERATOR_NAME

#define ALOG_OPERATOR_NAME   "ALOG"

Definition at line 150 of file ri-util.h.

◆ AMAX0_OPERATOR_NAME

#define AMAX0_OPERATOR_NAME   "AMAX0"

Definition at line 209 of file ri-util.h.

◆ AMAX1_OPERATOR_NAME

#define AMAX1_OPERATOR_NAME   "AMAX1"

Definition at line 211 of file ri-util.h.

◆ AMIN0_OPERATOR_NAME

#define AMIN0_OPERATOR_NAME   "AMIN0"

Definition at line 204 of file ri-util.h.

◆ AMIN1_OPERATOR_NAME

#define AMIN1_OPERATOR_NAME   "AMIN1"

Definition at line 205 of file ri-util.h.

◆ and_expression

#define and_expression (   e1,
  e2 
)     binary_intrinsic_expression(AND_OPERATOR_NAME, e1, e2)

Definition at line 1816 of file ri-util.h.

◆ AND_OPERATOR_NAME

#define AND_OPERATOR_NAME   ".AND."

FI: intrinsics are defined at a third place after bootstrap and effects! I guess the name should be defined here and used in table(s) there.

Definition at line 256 of file ri-util.h.

◆ ANINT_CONVERSION_NAME

#define ANINT_CONVERSION_NAME   "ANINT"

Definition at line 245 of file ri-util.h.

◆ ASCTIME_FUNCTION_NAME

#define ASCTIME_FUNCTION_NAME   "asctime"

Definition at line 369 of file ri-util.h.

◆ ASCTIME_R_FUNCTION_NAME

#define ASCTIME_R_FUNCTION_NAME   "asctime_r"

Definition at line 371 of file ri-util.h.

◆ ASIN_OPERATOR_NAME

#define ASIN_OPERATOR_NAME   "ASIN"

Definition at line 167 of file ri-util.h.

◆ ASINF_OPERATOR_NAME

#define ASINF_OPERATOR_NAME   "asinf"

Definition at line 603 of file ri-util.h.

◆ ASINHF_OPERATOR_NAME

#define ASINHF_OPERATOR_NAME   "asinhf"

Definition at line 624 of file ri-util.h.

◆ ASINHL_OPERATOR_NAME

#define ASINHL_OPERATOR_NAME   "asinhl"

Definition at line 625 of file ri-util.h.

◆ ASINL_OPERATOR_NAME

#define ASINL_OPERATOR_NAME   "asinl"

Definition at line 604 of file ri-util.h.

◆ ASM_FUNCTION_NAME

#define ASM_FUNCTION_NAME   "__asm"

__asm function

Definition at line 1914 of file ri-util.h.

◆ ASSERT_FAIL_FUNCTION_NAME

#define ASSERT_FAIL_FUNCTION_NAME   "__assert_fail"

Definition at line 469 of file ri-util.h.

◆ ASSERT_FUNCTION_NAME

#define ASSERT_FUNCTION_NAME   "__assert"

Here are C intrinsics arranged in the order of the standard ISO/IEC 9899:TC2.

MB include <assert.h>

Definition at line 468 of file ri-util.h.

◆ ASSIGN_OPERATOR_NAME

#define ASSIGN_OPERATOR_NAME   "="

Definition at line 103 of file ri-util.h.

◆ ASSIGN_OPERATOR_PRECEDENCE

#define ASSIGN_OPERATOR_PRECEDENCE   (2)

Definition at line 104 of file ri-util.h.

◆ ASSIGN_SUBSTRING_FUNCTION_NAME

#define ASSIGN_SUBSTRING_FUNCTION_NAME   "_ASSIGN_SUBSTR"

Definition at line 296 of file ri-util.h.

◆ ATAN2_OPERATOR_NAME

#define ATAN2_OPERATOR_NAME   "ATAN2"

Definition at line 173 of file ri-util.h.

◆ ATAN2F_OPERATOR_NAME

#define ATAN2F_OPERATOR_NAME   "atan2f"

Definition at line 609 of file ri-util.h.

◆ ATAN2L_OPERATOR_NAME

#define ATAN2L_OPERATOR_NAME   "atan2l"

Definition at line 610 of file ri-util.h.

◆ ATAN_OPERATOR_NAME

#define ATAN_OPERATOR_NAME   "ATAN"

Definition at line 171 of file ri-util.h.

◆ ATANF_OPERATOR_NAME

#define ATANF_OPERATOR_NAME   "atanf"

Definition at line 606 of file ri-util.h.

◆ ATANHF_OPERATOR_NAME

#define ATANHF_OPERATOR_NAME   "atanhf"

Definition at line 627 of file ri-util.h.

◆ ATANHL_OPERATOR_NAME

#define ATANHL_OPERATOR_NAME   "atanhl"

Definition at line 628 of file ri-util.h.

◆ ATANL_OPERATOR_NAME

#define ATANL_OPERATOR_NAME   "atanl"

Definition at line 607 of file ri-util.h.

◆ ATEXIT_FUNCTION_NAME

#define ATEXIT_FUNCTION_NAME   "atexit"

Definition at line 1028 of file ri-util.h.

◆ ATOF_FUNCTION_NAME

#define ATOF_FUNCTION_NAME   "atof"

random functions of <stdlib.h>

Definition at line 1009 of file ri-util.h.

◆ ATOI_FUNCTION_NAME

#define ATOI_FUNCTION_NAME   "atoi"

Definition at line 1010 of file ri-util.h.

◆ ATOL_FUNCTION_NAME

#define ATOL_FUNCTION_NAME   "atol"

Definition at line 1011 of file ri-util.h.

◆ ATOLL_FUNCTION_NAME

#define ATOLL_FUNCTION_NAME   "atoll"

Definition at line 1012 of file ri-util.h.

◆ ATOQ_FUNCTION_NAME

#define ATOQ_FUNCTION_NAME   "atoq"

Definition at line 443 of file ri-util.h.

◆ AUX_ENT

#define AUX_ENT   2

Definition at line 1851 of file ri-util.h.

◆ BACKSPACE_FUNCTION_NAME

#define BACKSPACE_FUNCTION_NAME   "BACKSPACE"

Definition at line 304 of file ri-util.h.

◆ basic_compatible_p

#define basic_compatible_p (   b1,
  b2 
)
Value:
(\
#define basic_numeric_p(b)
Definition: ri-util.h:1698
#define basic_overloaded_p(x)
Definition: ri.h:623
#define basic_undefined_p(x)
Definition: ri.h:557
#define basic_string_p(x)
Definition: ri.h:629
#define basic_logical_p(x)
Definition: ri.h:620
Value b2
Definition: sc_gram.c:105
Value b1
booleen indiquant quel membre est en cours d'analyse
Definition: sc_gram.c:105

Definition at line 1705 of file ri-util.h.

◆ basic_compatible_simple_p

#define basic_compatible_simple_p (   b1,
  b2 
)
Value:

Definition at line 1699 of file ri-util.h.

◆ basic_numeric_p

#define basic_numeric_p (   b)    (basic_numeric_simple_p(b) || basic_complex_p(b))

Definition at line 1698 of file ri-util.h.

◆ basic_numeric_simple_p

#define basic_numeric_simple_p (   b)    (basic_int_p(b) || basic_float_p(b))

classification of basics

Definition at line 1697 of file ri-util.h.

◆ binary_call_lhs

#define binary_call_lhs (   c)    (EXPRESSION(CAR(call_arguments((c)))))

Definition at line 2301 of file ri-util.h.

◆ binary_call_rhs

#define binary_call_rhs (   c)    (EXPRESSION(CAR(CDR(call_arguments((c))))))

Definition at line 2302 of file ri-util.h.

◆ binary_intrinsic_expression

#define binary_intrinsic_expression (   name,
  e1,
  e2 
)
Value:
call make_call(entity a1, list a2)
Definition: ri.c:269
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
Definition: newgen_list.h:150
entity entity_intrinsic(const char *)
FI: I do not understand this function name (see next one!).
Definition: entity.c:1292
expression call_to_expression(call)
Build an expression that call a function or procedure.
Definition: expression.c:309
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217

Definition at line 1808 of file ri-util.h.

◆ BIT_SIZE_OPERATOR_NAME

#define BIT_SIZE_OPERATOR_NAME   "BIT_SIZE"

Definition at line 320 of file ri-util.h.

◆ BITWISE_AND_OPERATOR_NAME

#define BITWISE_AND_OPERATOR_NAME   "__bit-and__"

Definition at line 188 of file ri-util.h.

◆ BITWISE_AND_UPDATE_OPERATOR_NAME

#define BITWISE_AND_UPDATE_OPERATOR_NAME   "__C-bit-and-update__"

Definition at line 193 of file ri-util.h.

◆ BITWISE_NOT_OPERATOR_NAME

#define BITWISE_NOT_OPERATOR_NAME   "__bit-not__"

Definition at line 189 of file ri-util.h.

◆ BITWISE_OR_OPERATOR_NAME

#define BITWISE_OR_OPERATOR_NAME   "|"

Definition at line 200 of file ri-util.h.

◆ BITWISE_OR_UPDATE_OPERATOR_NAME

#define BITWISE_OR_UPDATE_OPERATOR_NAME   "|="

Definition at line 115 of file ri-util.h.

◆ BITWISE_XOR_OPERATOR_NAME

#define BITWISE_XOR_OPERATOR_NAME   "__C-xor__"

Definition at line 190 of file ri-util.h.

◆ BITWISE_XOR_UPDATE_OPERATOR_NAME

#define BITWISE_XOR_UPDATE_OPERATOR_NAME   "__C-bit-xor-update__"

Definition at line 194 of file ri-util.h.

◆ BLOCK_SUFFIX

#define BLOCK_SUFFIX   "K"

suffixies for encoded hpf keywords

Definition at line 1874 of file ri-util.h.

◆ BRACE_INTRINSIC

#define BRACE_INTRINSIC   "BRACE_INTRINSIC"

Definition at line 93 of file ri-util.h.

◆ BREAK_FUNCTION_NAME

#define BREAK_FUNCTION_NAME   "break"

Definition at line 289 of file ri-util.h.

◆ BRK_FUNCTION_NAME

#define BRK_FUNCTION_NAME   "brk"

Definition at line 898 of file ri-util.h.

◆ BSEARCH_FUNCTION_NAME

#define BSEARCH_FUNCTION_NAME   "bsearch"

Definition at line 1033 of file ri-util.h.

◆ BTEST_OPERATOR_NAME

#define BTEST_OPERATOR_NAME   "BTEST"

Definition at line 317 of file ri-util.h.

◆ BTOWC_FUNCTION_NAME

#define BTOWC_FUNCTION_NAME   "btowc"

Definition at line 1137 of file ri-util.h.

◆ BUFFERIN_FUNCTION_NAME

#define BUFFERIN_FUNCTION_NAME   "BUFFERIN"

Definition at line 306 of file ri-util.h.

◆ BUFFEROUT_FUNCTION_NAME

#define BUFFEROUT_FUNCTION_NAME   "BUFFEROUT"

Definition at line 307 of file ri-util.h.

◆ BUILTIN_VA_COPY

#define BUILTIN_VA_COPY   "__builtin_va_copy"

Definition at line 782 of file ri-util.h.

◆ BUILTIN_VA_END

#define BUILTIN_VA_END   "__builtin_va_end"

vararg stuff.

va_args is a special construct because its second parameter is a type, not an expression.

Definition at line 780 of file ri-util.h.

◆ BUILTIN_VA_START

#define BUILTIN_VA_START   "__builtin_va_start"

Definition at line 781 of file ri-util.h.

◆ C_164A_FUNCTION_NAME

#define C_164A_FUNCTION_NAME   "l64a"

Definition at line 415 of file ri-util.h.

◆ C_ABS_FUNCTION_NAME

#define C_ABS_FUNCTION_NAME   "abs"

Definition at line 1035 of file ri-util.h.

◆ C_ACOS_OPERATOR_NAME

#define C_ACOS_OPERATOR_NAME   "acos"

Definition at line 599 of file ri-util.h.

◆ C_ACOSH_OPERATOR_NAME

#define C_ACOSH_OPERATOR_NAME   "acosh"

Definition at line 620 of file ri-util.h.

◆ C_AND_OPERATOR_NAME

#define C_AND_OPERATOR_NAME   "__C-and__"

Definition at line 191 of file ri-util.h.

◆ C_ASIN_OPERATOR_NAME

#define C_ASIN_OPERATOR_NAME   "asin"

Definition at line 602 of file ri-util.h.

◆ C_ASINH_OPERATOR_NAME

#define C_ASINH_OPERATOR_NAME   "asinh"

Definition at line 623 of file ri-util.h.

◆ C_ATAN2_OPERATOR_NAME

#define C_ATAN2_OPERATOR_NAME   "atan2"

Definition at line 608 of file ri-util.h.

◆ C_ATAN_OPERATOR_NAME

#define C_ATAN_OPERATOR_NAME   "atan"

Definition at line 605 of file ri-util.h.

◆ C_ATANH_OPERATOR_NAME

#define C_ATANH_OPERATOR_NAME   "atanh"

Definition at line 626 of file ri-util.h.

◆ C_CABS_OPERATOR_NAME

#define C_CABS_OPERATOR_NAME   "cabs"

Definition at line 515 of file ri-util.h.

◆ C_CCOS_OPERATOR_NAME

#define C_CCOS_OPERATOR_NAME   "ccos"

Definition at line 482 of file ri-util.h.

◆ C_CEXP_OPERATOR_NAME

#define C_CEXP_OPERATOR_NAME   "cexp"

Definition at line 509 of file ri-util.h.

◆ C_CLOG_OPERATOR_NAME

#define C_CLOG_OPERATOR_NAME   "clog"

Definition at line 512 of file ri-util.h.

◆ C_CLOSE_FUNCTION_NAME

#define C_CLOSE_FUNCTION_NAME   "close"

Definition at line 791 of file ri-util.h.

◆ C_CONTINUE_FUNCTION_NAME

#define C_CONTINUE_FUNCTION_NAME   ";"

Definition at line 281 of file ri-util.h.

◆ C_COS_OPERATOR_NAME

#define C_COS_OPERATOR_NAME   "cos"

Definition at line 611 of file ri-util.h.

◆ C_COSH_OPERATOR_NAME

#define C_COSH_OPERATOR_NAME   "cosh"

Definition at line 629 of file ri-util.h.

◆ C_CSIN_OPERATOR_NAME

#define C_CSIN_OPERATOR_NAME   "csin"

Definition at line 485 of file ri-util.h.

◆ C_CSQRT_OPERATOR_NAME

#define C_CSQRT_OPERATOR_NAME   "csqrt"

Definition at line 521 of file ri-util.h.

◆ C_EQUAL_OPERATOR_NAME

#define C_EQUAL_OPERATOR_NAME   "=="

Definition at line 278 of file ri-util.h.

◆ C_EXP_OPERATOR_NAME

#define C_EXP_OPERATOR_NAME   "exp"

Definition at line 638 of file ri-util.h.

◆ C_GREATER_OR_EQUAL_OPERATOR_NAME

#define C_GREATER_OR_EQUAL_OPERATOR_NAME   ">="

Definition at line 270 of file ri-util.h.

◆ C_GREATER_THAN_OPERATOR_NAME

#define C_GREATER_THAN_OPERATOR_NAME   ">"

Definition at line 272 of file ri-util.h.

◆ C_LESS_OR_EQUAL_OPERATOR_NAME

#define C_LESS_OR_EQUAL_OPERATOR_NAME   "<="

Definition at line 274 of file ri-util.h.

◆ C_LESS_THAN_OPERATOR_NAME

#define C_LESS_THAN_OPERATOR_NAME   "<"

Definition at line 276 of file ri-util.h.

◆ C_LOC_FUNCTION_NAME

#define C_LOC_FUNCTION_NAME   "C_LOC"

F2003.

Definition at line 342 of file ri-util.h.

◆ C_LOG10_OPERATOR_NAME

#define C_LOG10_OPERATOR_NAME   "log10"

Definition at line 657 of file ri-util.h.

◆ C_LOG_OPERATOR_NAME

#define C_LOG_OPERATOR_NAME   "log"

Definition at line 654 of file ri-util.h.

◆ C_MODULO_OPERATOR_NAME

#define C_MODULO_OPERATOR_NAME   "__C-modulo__"

Definition at line 198 of file ri-util.h.

◆ C_NON_EQUAL_OPERATOR_NAME

#define C_NON_EQUAL_OPERATOR_NAME   "__C-non-equal__"

Definition at line 197 of file ri-util.h.

◆ C_NOT_OPERATOR_NAME

#define C_NOT_OPERATOR_NAME   "__C-logical-not__"

Definition at line 196 of file ri-util.h.

◆ C_OPEN_FUNCTION_NAME

#define C_OPEN_FUNCTION_NAME   "open"

Not found in unistd.h.

Requires sys/types.h sys/stat.h and fcntl.h. The man -S 2 page indicates it is overloaded with two or three arguments.

Definition at line 912 of file ri-util.h.

◆ C_OR_OPERATOR_NAME

#define C_OR_OPERATOR_NAME   "||"

Definition at line 258 of file ri-util.h.

◆ C_PAUSE_FUNCTION_NAME

#define C_PAUSE_FUNCTION_NAME   "pause"

Definition at line 802 of file ri-util.h.

◆ C_READ_FUNCTION_NAME

#define C_READ_FUNCTION_NAME   "read"

Definition at line 792 of file ri-util.h.

◆ C_RETURN_FUNCTION_NAME

#define C_RETURN_FUNCTION_NAME   "return"

Definition at line 292 of file ri-util.h.

◆ C_REWIND_FUNCTION_NAME

#define C_REWIND_FUNCTION_NAME   "rewind"

Definition at line 965 of file ri-util.h.

◆ C_SIN_OPERATOR_NAME

#define C_SIN_OPERATOR_NAME   "sin"

Definition at line 614 of file ri-util.h.

◆ C_SINH_OPERATOR_NAME

#define C_SINH_OPERATOR_NAME   "sinh"

Definition at line 632 of file ri-util.h.

◆ C_SQRT_OPERATOR_NAME

#define C_SQRT_OPERATOR_NAME   "sqrt"

Definition at line 689 of file ri-util.h.

◆ C_STATEMENT_END_STRING

#define C_STATEMENT_END_STRING   ";"

Definition at line 282 of file ri-util.h.

◆ C_TAN_OPERATOR_NAME

#define C_TAN_OPERATOR_NAME   "tan"

Definition at line 617 of file ri-util.h.

◆ C_TANH_OPERATOR_NAME

#define C_TANH_OPERATOR_NAME   "tanh"

Definition at line 635 of file ri-util.h.

◆ C_WRITE_FUNCTION_NAME

#define C_WRITE_FUNCTION_NAME   "write"

Definition at line 793 of file ri-util.h.

◆ CABS_OPERATOR_NAME

#define CABS_OPERATOR_NAME   "CABS"

Definition at line 216 of file ri-util.h.

◆ CABSF_OPERATOR_NAME

#define CABSF_OPERATOR_NAME   "cabsf"

Definition at line 516 of file ri-util.h.

◆ CABSL_OPERATOR_NAME

#define CABSL_OPERATOR_NAME   "cabsl"

Definition at line 517 of file ri-util.h.

◆ CACOS_OPERATOR_NAME

#define CACOS_OPERATOR_NAME   "cacos"

include <complex.h>

Definition at line 473 of file ri-util.h.

◆ CACOSF_OPERATOR_NAME

#define CACOSF_OPERATOR_NAME   "cacosf"

Definition at line 474 of file ri-util.h.

◆ CACOSH_OPERATOR_NAME

#define CACOSH_OPERATOR_NAME   "cacosh"

Definition at line 491 of file ri-util.h.

◆ CACOSHF_OPERATOR_NAME

#define CACOSHF_OPERATOR_NAME   "cacoshf"

Definition at line 492 of file ri-util.h.

◆ CACOSHL_OPERATOR_NAME

#define CACOSHL_OPERATOR_NAME   "cacoshl"

Definition at line 493 of file ri-util.h.

◆ CACOSL_OPERATOR_NAME

#define CACOSL_OPERATOR_NAME   "cacosl"

Definition at line 475 of file ri-util.h.

◆ call_intrinsic_p

#define call_intrinsic_p (   C)     value_intrinsic_p(entity_initial(call_function(C)))

Definition at line 1782 of file ri-util.h.

◆ call_to_instruction

#define call_to_instruction   make_instruction_call

Definition at line 1794 of file ri-util.h.

◆ call_to_statement

#define call_to_statement (   c)    instruction_to_statement(call_to_instruction(c))

Definition at line 1798 of file ri-util.h.

◆ CALLOC_FUNCTION_NAME

#define CALLOC_FUNCTION_NAME   "calloc"

Definition at line 1022 of file ri-util.h.

◆ CARG_OPERATOR_NAME

#define CARG_OPERATOR_NAME   "carg"

Definition at line 524 of file ri-util.h.

◆ CARGF_OPERATOR_NAME

#define CARGF_OPERATOR_NAME   "cargf"

Definition at line 525 of file ri-util.h.

◆ CARGL_OPERATOR_NAME

#define CARGL_OPERATOR_NAME   "cargl"

Definition at line 526 of file ri-util.h.

◆ CASE_FUNCTION_NAME

#define CASE_FUNCTION_NAME   "case"

Definition at line 290 of file ri-util.h.

◆ CASIN_OPERATOR_NAME

#define CASIN_OPERATOR_NAME   "casin"

Definition at line 476 of file ri-util.h.

◆ CASINF_OPERATOR_NAME

#define CASINF_OPERATOR_NAME   "casinf"

Definition at line 477 of file ri-util.h.

◆ CASINH_OPERATOR_NAME

#define CASINH_OPERATOR_NAME   "casinh"

Definition at line 494 of file ri-util.h.

◆ CASINHF_OPERATOR_NAME

#define CASINHF_OPERATOR_NAME   "casinhf"

Definition at line 495 of file ri-util.h.

◆ CASINHL_OPERATOR_NAME

#define CASINHL_OPERATOR_NAME   "casinhl"

Definition at line 496 of file ri-util.h.

◆ CASINL_OPERATOR_NAME

#define CASINL_OPERATOR_NAME   "casinl"

Definition at line 478 of file ri-util.h.

◆ CATAN_OPERATOR_NAME

#define CATAN_OPERATOR_NAME   "catan"

Definition at line 479 of file ri-util.h.

◆ CATANF_OPERATOR_NAME

#define CATANF_OPERATOR_NAME   "catanf"

Definition at line 480 of file ri-util.h.

◆ CATANH_OPERATOR_NAME

#define CATANH_OPERATOR_NAME   "catanh"

Definition at line 497 of file ri-util.h.

◆ CATANHF_OPERATOR_NAME

#define CATANHF_OPERATOR_NAME   "catanhf"

Definition at line 498 of file ri-util.h.

◆ CATANHL_OPERATOR_NAME

#define CATANHL_OPERATOR_NAME   "catanhl"

Definition at line 499 of file ri-util.h.

◆ CATANL_OPERATOR_NAME

#define CATANL_OPERATOR_NAME   "catanl"

Definition at line 481 of file ri-util.h.

◆ CBRT_OPERATOR_NAME

#define CBRT_OPERATOR_NAME   "cbrt"

Definition at line 677 of file ri-util.h.

◆ CBRTF_OPERATOR_NAME

#define CBRTF_OPERATOR_NAME   "cbrtf"

Definition at line 678 of file ri-util.h.

◆ CBRTL_OPERATOR_NAME

#define CBRTL_OPERATOR_NAME   "cbrtl"

Definition at line 679 of file ri-util.h.

◆ CCOS_OPERATOR_NAME

#define CCOS_OPERATOR_NAME   "CCOS"

Definition at line 163 of file ri-util.h.

◆ CCOSF_OPERATOR_NAME

#define CCOSF_OPERATOR_NAME   "ccosf"

Definition at line 483 of file ri-util.h.

◆ CCOSH_OPERATOR_NAME

#define CCOSH_OPERATOR_NAME   "ccosh"

Definition at line 500 of file ri-util.h.

◆ CCOSHF_OPERATOR_NAME

#define CCOSHF_OPERATOR_NAME   "ccoshf"

Definition at line 501 of file ri-util.h.

◆ CCOSHL_OPERATOR_NAME

#define CCOSHL_OPERATOR_NAME   "ccoshl"

Definition at line 502 of file ri-util.h.

◆ CCOSL_OPERATOR_NAME

#define CCOSL_OPERATOR_NAME   "ccosl"

Definition at line 484 of file ri-util.h.

◆ CDABS_OPERATOR_NAME

#define CDABS_OPERATOR_NAME   "CDABS"

Definition at line 217 of file ri-util.h.

◆ CDCOS_OPERATOR_NAME

#define CDCOS_OPERATOR_NAME   "CDCOS"

Definition at line 164 of file ri-util.h.

◆ CDEXP_OPERATOR_NAME

#define CDEXP_OPERATOR_NAME   "CDEXP"

Definition at line 148 of file ri-util.h.

◆ CDLOG_OPERATOR_NAME

#define CDLOG_OPERATOR_NAME   "CDLOG"

Definition at line 153 of file ri-util.h.

◆ CDSIN_OPERATOR_NAME

#define CDSIN_OPERATOR_NAME   "CDSIN"

Definition at line 160 of file ri-util.h.

◆ CDSQRT_OPERATOR_NAME

#define CDSQRT_OPERATOR_NAME   "CDSQRT"

Definition at line 144 of file ri-util.h.

◆ CEIL_OPERATOR_NAME

#define CEIL_OPERATOR_NAME   "ceil"

Definition at line 705 of file ri-util.h.

◆ CEILF_OPERATOR_NAME

#define CEILF_OPERATOR_NAME   "ceilf"

Definition at line 706 of file ri-util.h.

◆ CEILL_OPERATOR_NAME

#define CEILL_OPERATOR_NAME   "ceill"

Definition at line 707 of file ri-util.h.

◆ CEXP_OPERATOR_NAME

#define CEXP_OPERATOR_NAME   "CEXP"

Definition at line 147 of file ri-util.h.

◆ CEXPF_OPERATOR_NAME

#define CEXPF_OPERATOR_NAME   "cexpf"

Definition at line 510 of file ri-util.h.

◆ CEXPL_OPERATOR_NAME

#define CEXPL_OPERATOR_NAME   "cexpl"

Definition at line 511 of file ri-util.h.

◆ CHAR_TO_INT_CONVERSION_NAME

#define CHAR_TO_INT_CONVERSION_NAME   "ICHAR"

Definition at line 241 of file ri-util.h.

◆ CHDIR_FUNCTION_NAME

#define CHDIR_FUNCTION_NAME   "chdir"

Definition at line 807 of file ri-util.h.

◆ CHOWN_FUNCTION_NAME

#define CHOWN_FUNCTION_NAME   "chown"

Definition at line 803 of file ri-util.h.

◆ CHROOT_FUNCTION_NAME

#define CHROOT_FUNCTION_NAME   "chroot"

Definition at line 887 of file ri-util.h.

◆ CIMAG_OPERATOR_NAME

#define CIMAG_OPERATOR_NAME   "cimag"

Definition at line 527 of file ri-util.h.

◆ CIMAGF_OPERATOR_NAME

#define CIMAGF_OPERATOR_NAME   "cimagf"

Definition at line 529 of file ri-util.h.

◆ CIMAGL_OPERATOR_NAME

#define CIMAGL_OPERATOR_NAME   "cimagl"

Definition at line 530 of file ri-util.h.

◆ CLEARERR_FUNCTION_NAME

#define CLEARERR_FUNCTION_NAME   "clearerr"

Definition at line 966 of file ri-util.h.

◆ CLOCK_FUNCTION_NAME [1/2]

#define CLOCK_FUNCTION_NAME   "clock"

time.h

Definition at line 1229 of file ri-util.h.

◆ CLOCK_FUNCTION_NAME [2/2]

#define CLOCK_FUNCTION_NAME   "clock"

time.h

Definition at line 1229 of file ri-util.h.

◆ CLOCK_GETCPULOCKID_FUNCTION_NAME

#define CLOCK_GETCPULOCKID_FUNCTION_NAME   "clock_getcpulockid"

Definition at line 383 of file ri-util.h.

◆ CLOCK_GETRES_FUNCTION_NAME

#define CLOCK_GETRES_FUNCTION_NAME   "clock_getres"

Definition at line 379 of file ri-util.h.

◆ CLOCK_GETTIME_FUNCTION_NAME [1/2]

#define CLOCK_GETTIME_FUNCTION_NAME   "clock_gettime"

Definition at line 1231 of file ri-util.h.

◆ CLOCK_GETTIME_FUNCTION_NAME [2/2]

#define CLOCK_GETTIME_FUNCTION_NAME   "clock_gettime"

Definition at line 1231 of file ri-util.h.

◆ CLOCK_NANOSLEEP_FUNCTION_NAME

#define CLOCK_NANOSLEEP_FUNCTION_NAME   "clock_nanosleep"

Definition at line 382 of file ri-util.h.

◆ CLOCK_SETTIME_FUNCTION_NAME

#define CLOCK_SETTIME_FUNCTION_NAME   "clock_settime"

Definition at line 381 of file ri-util.h.

◆ CLOG_OPERATOR_NAME

#define CLOG_OPERATOR_NAME   "CLOG"

Definition at line 152 of file ri-util.h.

◆ CLOGF_OPERATOR_NAME

#define CLOGF_OPERATOR_NAME   "clogf"

Definition at line 513 of file ri-util.h.

◆ CLOGL_OPERATOR_NAME

#define CLOGL_OPERATOR_NAME   "clogl"

Definition at line 514 of file ri-util.h.

◆ CLOSE_FUNCTION_NAME

#define CLOSE_FUNCTION_NAME   "CLOSE"

Definition at line 302 of file ri-util.h.

◆ CMPLX_GENERIC_CONVERSION_NAME

#define CMPLX_GENERIC_CONVERSION_NAME   "CMPLX"

Definition at line 237 of file ri-util.h.

◆ COMMA_OPERATOR_NAME

#define COMMA_OPERATOR_NAME   ","

Definition at line 117 of file ri-util.h.

◆ CONCATENATION_FUNCTION_NAME

#define CONCATENATION_FUNCTION_NAME   "//"

Definition at line 295 of file ri-util.h.

◆ CONDITIONAL_OPERATOR_NAME

#define CONDITIONAL_OPERATOR_NAME   "__C-conditional__"

Definition at line 195 of file ri-util.h.

◆ CONFSTR_FUNCTION_NAME

#define CONFSTR_FUNCTION_NAME   "constrf"

Definition at line 828 of file ri-util.h.

◆ CONJ_OPERATOR_NAME

#define CONJ_OPERATOR_NAME   "conj"

Definition at line 531 of file ri-util.h.

◆ CONJF_OPERATOR_NAME

#define CONJF_OPERATOR_NAME   "conjf"

Definition at line 532 of file ri-util.h.

◆ CONJG_OPERATOR_NAME

#define CONJG_OPERATOR_NAME   "CONJG"

Definition at line 139 of file ri-util.h.

◆ CONJL_OPERATOR_NAME

#define CONJL_OPERATOR_NAME   "conjl"

Definition at line 533 of file ri-util.h.

◆ CONTINUE_FUNCTION_NAME

#define CONTINUE_FUNCTION_NAME   "CONTINUE"

Definition at line 280 of file ri-util.h.

◆ COPYSIGN_OPERATOR_NAME

#define COPYSIGN_OPERATOR_NAME   "copysign"

Definition at line 741 of file ri-util.h.

◆ COPYSIGNF_OPERATOR_NAME

#define COPYSIGNF_OPERATOR_NAME   "copysignf"

Definition at line 742 of file ri-util.h.

◆ COPYSIGNL_OPERATOR_NAME

#define COPYSIGNL_OPERATOR_NAME   "copysignl"

Definition at line 743 of file ri-util.h.

◆ COS_OPERATOR_NAME

#define COS_OPERATOR_NAME   "COS"

Definition at line 161 of file ri-util.h.

◆ COSF_OPERATOR_NAME

#define COSF_OPERATOR_NAME   "cosf"

Definition at line 612 of file ri-util.h.

◆ COSH_OPERATOR_NAME

#define COSH_OPERATOR_NAME   "COSH"

Definition at line 177 of file ri-util.h.

◆ COSHF_OPERATOR_NAME

#define COSHF_OPERATOR_NAME   "coshf"

Definition at line 630 of file ri-util.h.

◆ COSHL_OPERATOR_NAME

#define COSHL_OPERATOR_NAME   "coshl"

Definition at line 631 of file ri-util.h.

◆ COSL_OPERATOR_NAME

#define COSL_OPERATOR_NAME   "cosl"

Definition at line 613 of file ri-util.h.

◆ CPOW_OPERATOR_NAME

#define CPOW_OPERATOR_NAME   "cpow"

Definition at line 518 of file ri-util.h.

◆ CPOWF_OPERATOR_NAME

#define CPOWF_OPERATOR_NAME   "cpowf"

Definition at line 519 of file ri-util.h.

◆ CPOWL_OPERATOR_NAME

#define CPOWL_OPERATOR_NAME   "cpowl"

Definition at line 520 of file ri-util.h.

◆ CPROJ_OPERATOR_NAME

#define CPROJ_OPERATOR_NAME   "cproj"

Definition at line 534 of file ri-util.h.

◆ CPROJF_OPERATOR_NAME

#define CPROJF_OPERATOR_NAME   "cprojf"

Definition at line 535 of file ri-util.h.

◆ CPROJL_OPERATOR_NAME

#define CPROJL_OPERATOR_NAME   "cprojl"

Definition at line 536 of file ri-util.h.

◆ CPU_TIME_FUNCTION_NAME

#define CPU_TIME_FUNCTION_NAME   "CPU_TIME"

Definition at line 339 of file ri-util.h.

◆ CREAL_OPERATOR_NAME

#define CREAL_OPERATOR_NAME   "creal"

Definition at line 537 of file ri-util.h.

◆ CREALF_OPERATOR_NAME

#define CREALF_OPERATOR_NAME   "crealf"

Definition at line 539 of file ri-util.h.

◆ CREALL_OPERATOR_NAME

#define CREALL_OPERATOR_NAME   "creall"

Definition at line 540 of file ri-util.h.

◆ CREAT64_FUNCTION_NAME

#define CREAT64_FUNCTION_NAME   "creat64"

Definition at line 1175 of file ri-util.h.

◆ CREAT_FUNCTION_NAME

#define CREAT_FUNCTION_NAME   "creat"

Definition at line 1172 of file ri-util.h.

◆ CRYPT_FUNCTION_NAME

#define CRYPT_FUNCTION_NAME   "crypt"

Definition at line 904 of file ri-util.h.

◆ CSIN_OPERATOR_NAME

#define CSIN_OPERATOR_NAME   "CSIN"

Definition at line 159 of file ri-util.h.

◆ CSINF_OPERATOR_NAME

#define CSINF_OPERATOR_NAME   "csinf"

Definition at line 486 of file ri-util.h.

◆ CSINH_OPERATOR_NAME

#define CSINH_OPERATOR_NAME   "csinh"

Definition at line 503 of file ri-util.h.

◆ CSINHF_OPERATOR_NAME

#define CSINHF_OPERATOR_NAME   "csinhf"

Definition at line 504 of file ri-util.h.

◆ CSINHL_OPERATOR_NAME

#define CSINHL_OPERATOR_NAME   "csinhl"

Definition at line 505 of file ri-util.h.

◆ CSINL_OPERATOR_NAME

#define CSINL_OPERATOR_NAME   "csinl"

Definition at line 487 of file ri-util.h.

◆ CSQRT_OPERATOR_NAME

#define CSQRT_OPERATOR_NAME   "CSQRT"

Definition at line 143 of file ri-util.h.

◆ CSQRTF_OPERATOR_NAME

#define CSQRTF_OPERATOR_NAME   "csqrtf"

Definition at line 522 of file ri-util.h.

◆ CSQRTL_OPERATOR_NAME

#define CSQRTL_OPERATOR_NAME   "csqrtl"

Definition at line 523 of file ri-util.h.

◆ CTAN_OPERATOR_NAME

#define CTAN_OPERATOR_NAME   "ctan"

Definition at line 488 of file ri-util.h.

◆ CTANF_OPERATOR_NAME

#define CTANF_OPERATOR_NAME   "ctanf"

Definition at line 489 of file ri-util.h.

◆ CTANH_OPERATOR_NAME

#define CTANH_OPERATOR_NAME   "ctanh"

Definition at line 506 of file ri-util.h.

◆ CTANHF_OPERATOR_NAME

#define CTANHF_OPERATOR_NAME   "ctanhf"

Definition at line 507 of file ri-util.h.

◆ CTANHL_OPERATOR_NAME

#define CTANHL_OPERATOR_NAME   "ctanhl"

Definition at line 508 of file ri-util.h.

◆ CTANL_OPERATOR_NAME

#define CTANL_OPERATOR_NAME   "ctanl"

Definition at line 490 of file ri-util.h.

◆ CTERMID_FUNCTION_NAME [1/2]

#define CTERMID_FUNCTION_NAME   "ctermid"

Definition at line 986 of file ri-util.h.

◆ CTERMID_FUNCTION_NAME [2/2]

#define CTERMID_FUNCTION_NAME   "ctermid"

Definition at line 986 of file ri-util.h.

◆ CTIME_FUNCTION_NAME

#define CTIME_FUNCTION_NAME   "ctime"

Definition at line 370 of file ri-util.h.

◆ CTIME_R_FUNCTION_NAME

#define CTIME_R_FUNCTION_NAME   "ctime_r"

Definition at line 372 of file ri-util.h.

◆ CTYPE_B_LOC_OPERATOR_NAME

#define CTYPE_B_LOC_OPERATOR_NAME   "__ctype_b_loc"

Part of the binary standard.

Definition at line 567 of file ri-util.h.

◆ CUSERID_FUNCTION_NAME

#define CUSERID_FUNCTION_NAME   "cuserid"

Definition at line 989 of file ri-util.h.

◆ CYCLIC_SUFFIX

#define CYCLIC_SUFFIX   "C"

Definition at line 1875 of file ri-util.h.

◆ DABS_OPERATOR_NAME

#define DABS_OPERATOR_NAME   "DABS"

Definition at line 215 of file ri-util.h.

◆ DACOS_OPERATOR_NAME

#define DACOS_OPERATOR_NAME   "DACOS"

Definition at line 170 of file ri-util.h.

◆ DAEMON_FUNCTION_NAME

#define DAEMON_FUNCTION_NAME   "daemon"

Definition at line 886 of file ri-util.h.

◆ DASIN_OPERATOR_NAME

#define DASIN_OPERATOR_NAME   "DASIN"

Definition at line 168 of file ri-util.h.

◆ DATA_LIST_FUNCTION_NAME

#define DATA_LIST_FUNCTION_NAME   "DATA-LIST="

Definition at line 89 of file ri-util.h.

◆ DATAN2_OPERATOR_NAME

#define DATAN2_OPERATOR_NAME   "DATAN2"

Definition at line 174 of file ri-util.h.

◆ DATAN_OPERATOR_NAME

#define DATAN_OPERATOR_NAME   "DATAN"

Definition at line 172 of file ri-util.h.

◆ DBLE_GENERIC_CONVERSION_NAME

#define DBLE_GENERIC_CONVERSION_NAME   "DBLE"

Definition at line 235 of file ri-util.h.

◆ DCMPLX_GENERIC_CONVERSION_NAME

#define DCMPLX_GENERIC_CONVERSION_NAME   "DCMPLX"

Definition at line 238 of file ri-util.h.

◆ DCONJG_OPERATOR_NAME

#define DCONJG_OPERATOR_NAME   "DCONJG"

Definition at line 140 of file ri-util.h.

◆ DCOS_OPERATOR_NAME

#define DCOS_OPERATOR_NAME   "DCOS"

Definition at line 162 of file ri-util.h.

◆ DCOSH_OPERATOR_NAME

#define DCOSH_OPERATOR_NAME   "DCOSH"

Definition at line 178 of file ri-util.h.

◆ DDIM_OPERATOR_NAME

#define DDIM_OPERATOR_NAME   "DDIM"

Definition at line 137 of file ri-util.h.

◆ DEAD_SUFFIX

#define DEAD_SUFFIX   "8"

Definition at line 1904 of file ri-util.h.

◆ DEALLOCATE_FUNCTION_NAME

#define DEALLOCATE_FUNCTION_NAME   "DEALLOCATE"

Definition at line 336 of file ri-util.h.

◆ DECIMAL_TO_DOUBLE_OPERATOR_NAME

#define DECIMAL_TO_DOUBLE_OPERATOR_NAME   "decimal_to_double"

Definition at line 1213 of file ri-util.h.

◆ DECIMAL_TO_EXTENDED_OPERATOR_NAME

#define DECIMAL_TO_EXTENDED_OPERATOR_NAME   "decimal_to_extended"

Definition at line 1214 of file ri-util.h.

◆ DECIMAL_TO_QUADRUPLE_OPERATOR_NAME

#define DECIMAL_TO_QUADRUPLE_OPERATOR_NAME   "decimal_to_quadruple"

Definition at line 1215 of file ri-util.h.

◆ DECIMAL_TO_SINGLE_OPERATOR_NAME

#define DECIMAL_TO_SINGLE_OPERATOR_NAME   "decimal_to_single"

Definition at line 1212 of file ri-util.h.

◆ DEFAULT_CHARACTER_TYPE_SIZE

#define DEFAULT_CHARACTER_TYPE_SIZE   (1)

Default type sizes.

Definition at line 1935 of file ri-util.h.

◆ DEFAULT_COMPLEX_TYPE_SIZE

#define DEFAULT_COMPLEX_TYPE_SIZE   (8)

Definition at line 1975 of file ri-util.h.

◆ DEFAULT_DOUBLECOMPLEX_TYPE_SIZE

#define DEFAULT_DOUBLECOMPLEX_TYPE_SIZE   (16)

Definition at line 1976 of file ri-util.h.

◆ DEFAULT_DOUBLEPRECISION_TYPE_SIZE

#define DEFAULT_DOUBLEPRECISION_TYPE_SIZE   (8)

Definition at line 1973 of file ri-util.h.

◆ DEFAULT_FUNCTION_NAME

#define DEFAULT_FUNCTION_NAME   "default"

Definition at line 291 of file ri-util.h.

◆ DEFAULT_INTEGER_TYPE_SIZE

#define DEFAULT_INTEGER_TYPE_SIZE   (4)

Definition at line 1937 of file ri-util.h.

◆ DEFAULT_LOGICAL_TYPE_SIZE

#define DEFAULT_LOGICAL_TYPE_SIZE   (4)

Definition at line 1978 of file ri-util.h.

◆ DEFAULT_LONG_INTEGER_TYPE_SIZE

#define DEFAULT_LONG_INTEGER_TYPE_SIZE   (6)

Definition at line 1938 of file ri-util.h.

◆ DEFAULT_LONG_LONG_INTEGER_TYPE_SIZE

#define DEFAULT_LONG_LONG_INTEGER_TYPE_SIZE   (8)

Definition at line 1939 of file ri-util.h.

◆ DEFAULT_LONG_LONG_LONG_INTEGER_TYPE_SIZE

#define DEFAULT_LONG_LONG_LONG_INTEGER_TYPE_SIZE   (9)

Definition at line 1940 of file ri-util.h.

◆ DEFAULT_LONGDOUBLECOMPLEX_TYPE_SIZE

#define DEFAULT_LONGDOUBLECOMPLEX_TYPE_SIZE   (32)

Definition at line 1977 of file ri-util.h.

◆ DEFAULT_POINTER_TYPE_SIZE

#define DEFAULT_POINTER_TYPE_SIZE   (8)

Definition at line 1944 of file ri-util.h.

◆ DEFAULT_QUADPRECISION_TYPE_SIZE

#define DEFAULT_QUADPRECISION_TYPE_SIZE   (16)

Definition at line 1974 of file ri-util.h.

◆ DEFAULT_REAL_TYPE_SIZE

#define DEFAULT_REAL_TYPE_SIZE   (4)

The standard C integer types are represented as follow char = 1 short_int = 2 int = 4 long_int = 6 long_long_int = 8 __int128_t = 9 (gcc extension)

unsigned_char = 11 unsigned_short_int = 12 unsigned_int = 14 unsigned_long_int = 16 unsigned_long_long_int = 18 __uint128_t = 19 (gcc extension)

signed_char = 21 signed_short_int = 22 signed_int = 24 signed_long_int = 26 signed_long_long_int = 28

mod(i,10) refers to the basic size and div(i,10) refers that the variable is unsigned, signed or not

Definition at line 1972 of file ri-util.h.

◆ DEFAULT_SHORT_INTEGER_TYPE_SIZE

#define DEFAULT_SHORT_INTEGER_TYPE_SIZE   (2)

Definition at line 1936 of file ri-util.h.

◆ DEFAULT_SIGNED_TYPE_SIZE

#define DEFAULT_SIGNED_TYPE_SIZE   (2)

Definition at line 1946 of file ri-util.h.

◆ DEFAULT_UNSIGNED_TYPE_SIZE

#define DEFAULT_UNSIGNED_TYPE_SIZE   (1)

Definition at line 1945 of file ri-util.h.

◆ DEREFERENCING_OPERATOR_NAME

#define DEREFERENCING_OPERATOR_NAME   "*indirection"

Definition at line 101 of file ri-util.h.

◆ DEXP_OPERATOR_NAME

#define DEXP_OPERATOR_NAME   "DEXP"

Definition at line 146 of file ri-util.h.

◆ DFLOAT_GENERIC_CONVERSION_NAME

#define DFLOAT_GENERIC_CONVERSION_NAME   "DFLOAT"

Definition at line 233 of file ri-util.h.

◆ DI_VAR_MODULE_NAME

#define DI_VAR_MODULE_NAME   "DI-VAR"

Definition at line 1256 of file ri-util.h.

◆ DIFFTIME_FUNCTION_NAME [1/2]

#define DIFFTIME_FUNCTION_NAME   "difftime"

Definition at line 1081 of file ri-util.h.

◆ DIFFTIME_FUNCTION_NAME [2/2]

#define DIFFTIME_FUNCTION_NAME   "difftime"

Definition at line 1081 of file ri-util.h.

◆ DIM_OPERATOR_NAME

#define DIM_OPERATOR_NAME   "DIM"

Definition at line 135 of file ri-util.h.

◆ DIMAG_CONVERSION_NAME

#define DIMAG_CONVERSION_NAME   "DIMAG"

Definition at line 250 of file ri-util.h.

◆ DINT_CONVERSION_NAME

#define DINT_CONVERSION_NAME   "DINT"

Definition at line 244 of file ri-util.h.

◆ DIRECTIO_FUNCTION_NAME

#define DIRECTIO_FUNCTION_NAME   "directio"

Definition at line 1173 of file ri-util.h.

◆ DISTRIBUTE_SUFFIX

#define DISTRIBUTE_SUFFIX   "D"

Definition at line 1882 of file ri-util.h.

◆ DIV_FUNCTION_NAME

#define DIV_FUNCTION_NAME   "div"

Definition at line 1038 of file ri-util.h.

◆ DIVIDE_OPERATOR_NAME

#define DIVIDE_OPERATOR_NAME   "/"

Definition at line 126 of file ri-util.h.

◆ DIVIDE_UPDATE_OPERATOR_NAME

#define DIVIDE_UPDATE_OPERATOR_NAME   "/="

Definition at line 110 of file ri-util.h.

◆ DLOG10_OPERATOR_NAME

#define DLOG10_OPERATOR_NAME   "DLOG10"

Definition at line 156 of file ri-util.h.

◆ DLOG_OPERATOR_NAME

#define DLOG_OPERATOR_NAME   "DLOG"

Definition at line 151 of file ri-util.h.

◆ DMAX1_OPERATOR_NAME

#define DMAX1_OPERATOR_NAME   "DMAX1"

Definition at line 212 of file ri-util.h.

◆ DMIN1_OPERATOR_NAME

#define DMIN1_OPERATOR_NAME   "DMIN1"

Definition at line 206 of file ri-util.h.

◆ DNINT_CONVERSION_NAME

#define DNINT_CONVERSION_NAME   "DNINT"

Definition at line 246 of file ri-util.h.

◆ DOUBLE_MODULO_OPERATOR_NAME

#define DOUBLE_MODULO_OPERATOR_NAME   "DMOD"

Definition at line 131 of file ri-util.h.

◆ DOUBLE_PRECISION_SIZE

#define DOUBLE_PRECISION_SIZE   8

Definition at line 1852 of file ri-util.h.

◆ DOUBLE_TO_DECIMAL_OPERATOR_NAME

#define DOUBLE_TO_DECIMAL_OPERATOR_NAME   "double_to_decimal"

Definition at line 1209 of file ri-util.h.

◆ DPROD_OPERATOR_NAME

#define DPROD_OPERATOR_NAME   "DPROD"

Definition at line 138 of file ri-util.h.

◆ DRAND48_FUNCTION_NAME

#define DRAND48_FUNCTION_NAME   "drand48"

Definition at line 393 of file ri-util.h.

◆ DREAL_GENERIC_CONVERSION_NAME

#define DREAL_GENERIC_CONVERSION_NAME   "DREAL"

Definition at line 236 of file ri-util.h.

◆ DSIGN_OPERATOR_NAME

#define DSIGN_OPERATOR_NAME   "DSIGN"

Definition at line 134 of file ri-util.h.

◆ DSIN_OPERATOR_NAME

#define DSIN_OPERATOR_NAME   "DSIN"

Definition at line 158 of file ri-util.h.

◆ DSINH_OPERATOR_NAME

#define DSINH_OPERATOR_NAME   "DSINH"

Definition at line 176 of file ri-util.h.

◆ DSQRT_OPERATOR_NAME

#define DSQRT_OPERATOR_NAME   "DSQRT"

Definition at line 142 of file ri-util.h.

◆ DTAN_OPERATOR_NAME

#define DTAN_OPERATOR_NAME   "DTAN"

Definition at line 166 of file ri-util.h.

◆ DTANH_OPERATOR_NAME

#define DTANH_OPERATOR_NAME   "DTANH"

Definition at line 180 of file ri-util.h.

◆ DTIME_FUNCTION_NAME

#define DTIME_FUNCTION_NAME   "DTIME"

Definition at line 338 of file ri-util.h.

◆ DUP2_FUNCTION_NAME [1/2]

#define DUP2_FUNCTION_NAME   "dup2"

Definition at line 813 of file ri-util.h.

◆ DUP2_FUNCTION_NAME [2/2]

#define DUP2_FUNCTION_NAME   "dup2"

Definition at line 813 of file ri-util.h.

◆ DUP3_FUNCTION_NAME

#define DUP3_FUNCTION_NAME   "dup3"

Definition at line 814 of file ri-util.h.

◆ DUP_FUNCTION_NAME

#define DUP_FUNCTION_NAME   "dup"

Definition at line 812 of file ri-util.h.

◆ DYNAMIC_RAM_OFFSET

#define DYNAMIC_RAM_OFFSET   (-3)

FI: I would have assumed that it is used for the stack area, but I must be wrong...

Definition at line 1735 of file ri-util.h.

◆ DYNAMIC_SUFFIX

#define DYNAMIC_SUFFIX   "Y"

Definition at line 1890 of file ri-util.h.

◆ DYSIZE_FUNCTION_NAME

#define DYSIZE_FUNCTION_NAME   "dysize"

Definition at line 377 of file ri-util.h.

◆ ECONVERT_OPERATOR_NAME

#define ECONVERT_OPERATOR_NAME   "econvert"

Definition at line 1222 of file ri-util.h.

◆ ECVT_FUNCTION_NAME

#define ECVT_FUNCTION_NAME   "ecvt"

Definition at line 409 of file ri-util.h.

◆ empty_comments

#define empty_comments   string_undefined

Empty comments (i.e.

default comments) FI: this is a poor choice as the statements won't be gen_defined_p and as strdup() won't be usable without an extra test. Would it be so bad to use strdup(""); as empty_comments?

Definition at line 2046 of file ri-util.h.

◆ ENCRYPT_FUNCTION_NAME

#define ENCRYPT_FUNCTION_NAME   "encrypt"

Definition at line 905 of file ri-util.h.

◆ END_FUNCTION_NAME

#define END_FUNCTION_NAME   "END"

Definition at line 286 of file ri-util.h.

◆ ENDDO_FUNCTION_NAME

#define ENDDO_FUNCTION_NAME   "ENDDO"

Definition at line 287 of file ri-util.h.

◆ ENDFILE_FUNCTION_NAME

#define ENDFILE_FUNCTION_NAME   "ENDFILE"

Definition at line 308 of file ri-util.h.

◆ ENDUSERSHELL_FUNCTION_NAME

#define ENDUSERSHELL_FUNCTION_NAME   "endusershell"

Definition at line 884 of file ri-util.h.

◆ ENTITY__FILBUF_SYSTEM_P

#define ENTITY__FILBUF_SYSTEM_P (   e)    ENTITY_NAME_P(e, "__filbuf")

Definition at line 1509 of file ri-util.h.

◆ ENTITY__FILSBUF_SYSTEM_P

#define ENTITY__FILSBUF_SYSTEM_P (   e)    ENTITY_NAME_P(e, "__flsbuf")

Definition at line 1510 of file ri-util.h.

◆ ENTITY__IO_GETC_P

#define ENTITY__IO_GETC_P (   e)    ENTITY_NAME_P(e, "_IO_getc")

Definition at line 1462 of file ri-util.h.

◆ ENTITY__IO_PUTC_P

#define ENTITY__IO_PUTC_P (   e)    ENTITY_NAME_P(e, "_IO_putc")

Definition at line 1465 of file ri-util.h.

◆ ENTITY_A614_SYSTEM_P

#define ENTITY_A614_SYSTEM_P (   e)    ENTITY_NAME_P(e, "a64l")

Definition at line 1572 of file ri-util.h.

◆ entity_a_function_p

#define entity_a_function_p (   e,
  name 
)     (same_string_p(global_name_to_user_name(entity_name(e)), name##_FUNCTION_NAME))

Definition at line 1267 of file ri-util.h.

◆ entity_a_special_entity_p

#define entity_a_special_entity_p (   e,
  name 
)     (same_string_p(global_name_to_user_name(entity_name(e)), name))

Definition at line 1269 of file ri-util.h.

◆ ENTITY_ABORT_SYSTEM_P

#define ENTITY_ABORT_SYSTEM_P (   e)    ENTITY_NAME_P(e, "abort")

Definition at line 1532 of file ri-util.h.

◆ ENTITY_ABS_P

#define ENTITY_ABS_P (   e)    entity_an_operator_p(e, ABS)

Definition at line 1325 of file ri-util.h.

◆ ENTITY_ADDRESS_OF_P [1/2]

#define ENTITY_ADDRESS_OF_P (   e)    entity_an_operator_p(e, ADDRESS_OF)

Definition at line 1357 of file ri-util.h.

◆ ENTITY_ADDRESS_OF_P [2/2]

#define ENTITY_ADDRESS_OF_P (   e)    entity_an_operator_p(e, ADDRESS_OF)

Definition at line 1357 of file ri-util.h.

◆ ENTITY_ALLOCATABLE_BOUND_P

#define ENTITY_ALLOCATABLE_BOUND_P (   e)
Value:
#define ALLOCATABLE_UBOUND_PREFIX
Definition: ri-util.h:1689
const char * entity_user_name(entity)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
Definition: entity.c:487
#define ALLOCATABLE_LBOUND_PREFIX
Definition: ri-util.h:1688

Definition at line 1690 of file ri-util.h.

◆ ENTITY_AMAX1_P

#define ENTITY_AMAX1_P (   e)    entity_an_operator_p(e, AMAX1)

Definition at line 1320 of file ri-util.h.

◆ ENTITY_AMIN1_P

#define ENTITY_AMIN1_P (   e)    entity_an_operator_p(e, AMIN1)

Definition at line 1319 of file ri-util.h.

◆ entity_an_operator_p

#define entity_an_operator_p (   e,
  name 
)     (same_string_p(global_name_to_user_name(entity_name(e)), name##_OPERATOR_NAME))

macros

FI: entity_local_name() should be sufficient for these comparisons

Definition at line 1265 of file ri-util.h.

◆ ENTITY_AND_P

#define ENTITY_AND_P (   e)    (entity_an_operator_p(e, AND) || entity_an_operator_p(e, C_AND))

Definition at line 1344 of file ri-util.h.

◆ ENTITY_ASSERT_FAIL_SYSTEM_P

#define ENTITY_ASSERT_FAIL_SYSTEM_P (   e)    ENTITY_NAME_P(e, ASSERT_FAIL_FUNCTION_NAME)

Definition at line 1612 of file ri-util.h.

◆ ENTITY_ASSERT_SYSTEM_P

#define ENTITY_ASSERT_SYSTEM_P (   e)    ENTITY_NAME_P(e, ASSERT_FUNCTION_NAME)

include <assert.h>

Definition at line 1611 of file ri-util.h.

◆ ENTITY_ASSIGN_P

#define ENTITY_ASSIGN_P (   e)    entity_an_operator_p(e, ASSIGN)

Definition at line 1282 of file ri-util.h.

◆ ENTITY_ATEXIT_SYSTEM_P

#define ENTITY_ATEXIT_SYSTEM_P (   e)    ENTITY_NAME_P(e, "atexit")

Definition at line 1534 of file ri-util.h.

◆ ENTITY_ATOF_SYSTEM_P

#define ENTITY_ATOF_SYSTEM_P (   e)    ENTITY_NAME_P(e, "atof")

Definition at line 1535 of file ri-util.h.

◆ ENTITY_ATOI_SYSTEM_P

#define ENTITY_ATOI_SYSTEM_P (   e)    ENTITY_NAME_P(e, "atoi")

Definition at line 1536 of file ri-util.h.

◆ ENTITY_ATOLL_SYSTEM_P

#define ENTITY_ATOLL_SYSTEM_P (   e)    ENTITY_NAME_P(e, "atoll")

Definition at line 1601 of file ri-util.h.

◆ ENTITY_BIT_SIZE_P

#define ENTITY_BIT_SIZE_P (   e)    ENTITY_NAME_P(e, "BIT_SIZE")

Definition at line 1413 of file ri-util.h.

◆ ENTITY_BITWISE_AND_P

#define ENTITY_BITWISE_AND_P (   e)    (entity_an_operator_p(e, BITWISE_AND))

Definition at line 1346 of file ri-util.h.

◆ ENTITY_BITWISE_AND_UPDATE_P

#define ENTITY_BITWISE_AND_UPDATE_P (   e)    entity_an_operator_p(e, BITWISE_AND_UPDATE)

Definition at line 1294 of file ri-util.h.

◆ ENTITY_BITWISE_OR_P

#define ENTITY_BITWISE_OR_P (   e)    (entity_an_operator_p(e, BITWISE_OR))

Definition at line 1347 of file ri-util.h.

◆ ENTITY_BITWISE_OR_UPDATE_P

#define ENTITY_BITWISE_OR_UPDATE_P (   e)    entity_an_operator_p(e, BITWISE_OR_UPDATE)

Definition at line 1296 of file ri-util.h.

◆ ENTITY_BITWISE_XOR_P

#define ENTITY_BITWISE_XOR_P (   e)    (entity_an_operator_p(e, BITWISE_XOR))

Definition at line 1348 of file ri-util.h.

◆ ENTITY_BITWISE_XOR_UPDATE_P

#define ENTITY_BITWISE_XOR_UPDATE_P (   e)    entity_an_operator_p(e, BITWISE_XOR_UPDATE)

Definition at line 1295 of file ri-util.h.

◆ ENTITY_BRACE_INTRINSIC_P

#define ENTITY_BRACE_INTRINSIC_P (   e)    ENTITY_NAME_P(e, BRACE_INTRINSIC)

C initialization expression.

Definition at line 1655 of file ri-util.h.

◆ ENTITY_BSEARCH_SYSTEM_P

#define ENTITY_BSEARCH_SYSTEM_P (   e)    ENTITY_NAME_P(e, "bsearch")

Definition at line 1537 of file ri-util.h.

◆ ENTITY_BTEST_P

#define ENTITY_BTEST_P (   e)    ENTITY_NAME_P(e, "BTEST")

Definition at line 1410 of file ri-util.h.

◆ ENTITY_BUFFERIN_P

#define ENTITY_BUFFERIN_P (   e)    ENTITY_NAME_P(e, "BUFFERIN")

Definition at line 1398 of file ri-util.h.

◆ ENTITY_BUFFEROUT_P

#define ENTITY_BUFFEROUT_P (   e)    ENTITY_NAME_P(e, "BUFFEROUT")

Definition at line 1399 of file ri-util.h.

◆ ENTITY_C_164A_SYSTEM_P

#define ENTITY_C_164A_SYSTEM_P (   e)    ENTITY_NAME_P(e, "l64a")

Definition at line 1579 of file ri-util.h.

◆ ENTITY_C_ABS_P

#define ENTITY_C_ABS_P (   e)    entity_a_function_p(e, C_ABS)

Definition at line 1330 of file ri-util.h.

◆ ENTITY_C_ABS_SYSTEM_P

#define ENTITY_C_ABS_SYSTEM_P (   e)    ENTITY_NAME_P(e, "abs")

Definition at line 1533 of file ri-util.h.

◆ ENTITY_C_CABS_P

#define ENTITY_C_CABS_P (   e)    entity_an_operator_p(e, C_CABS)

Definition at line 1340 of file ri-util.h.

◆ ENTITY_C_CLOSE_SYSTEM_P

#define ENTITY_C_CLOSE_SYSTEM_P (   e)    ENTITY_NAME_P(e, C_CLOSE_FUNCTION_NAME)

Definition at line 1484 of file ri-util.h.

◆ ENTITY_C_MAX_P

#define ENTITY_C_MAX_P (   e)    entity_an_operator_p(e,PIPS_C_MAX)

Definition at line 1316 of file ri-util.h.

◆ ENTITY_C_MIN_P

#define ENTITY_C_MIN_P (   e)    entity_an_operator_p(e,PIPS_C_MIN)

Definition at line 1314 of file ri-util.h.

◆ ENTITY_C_MODULO_P

#define ENTITY_C_MODULO_P (   e)    entity_an_operator_p(e, C_MODULO)

Definition at line 1309 of file ri-util.h.

◆ ENTITY_C_OPEN_SYSTEM_P

#define ENTITY_C_OPEN_SYSTEM_P (   e)    ENTITY_NAME_P(e, C_OPEN_FUNCTION_NAME)

o functions: C library and system io.Amira Mensi

Definition at line 1483 of file ri-util.h.

◆ ENTITY_C_READ_SYSTEM_P

#define ENTITY_C_READ_SYSTEM_P (   e)    ENTITY_NAME_P(e, C_READ_FUNCTION_NAME)

Definition at line 1485 of file ri-util.h.

◆ ENTITY_C_RETURN_P

#define ENTITY_C_RETURN_P (   e)    entity_a_function_p(e, C_RETURN)

Definition at line 1280 of file ri-util.h.

◆ ENTITY_C_REWIND_P

#define ENTITY_C_REWIND_P (   e)    ENTITY_NAME_P(e, "rewind")

Definition at line 1474 of file ri-util.h.

◆ ENTITY_C_WRITE_SYSTEM_P

#define ENTITY_C_WRITE_SYSTEM_P (   e)    ENTITY_NAME_P(e, C_WRITE_FUNCTION_NAME)

Definition at line 1486 of file ri-util.h.

◆ ENTITY_CABS_P

#define ENTITY_CABS_P (   e)    entity_an_operator_p(e, CABS)

Definition at line 1328 of file ri-util.h.

◆ ENTITY_CABSF_P

#define ENTITY_CABSF_P (   e)    entity_an_operator_p(e, CABSF)

Definition at line 1341 of file ri-util.h.

◆ ENTITY_CABSL_P

#define ENTITY_CABSL_P (   e)    entity_an_operator_p(e, CABSL)

Definition at line 1342 of file ri-util.h.

◆ ENTITY_CALLOC_SYSTEM_P

#define ENTITY_CALLOC_SYSTEM_P (   e)    ENTITY_NAME_P(e, "calloc")

Definition at line 1538 of file ri-util.h.

◆ ENTITY_CLEARERR_P

#define ENTITY_CLEARERR_P (   e)    ENTITY_NAME_P(e, "clearer")

Definition at line 1475 of file ri-util.h.

◆ ENTITY_CLOSE_P

#define ENTITY_CLOSE_P (   e)    ENTITY_NAME_P(e, "CLOSE")

Definition at line 1396 of file ri-util.h.

◆ ENTITY_COMMA_P

#define ENTITY_COMMA_P (   e)    entity_an_operator_p(e, COMMA)

Definition at line 1297 of file ri-util.h.

◆ ENTITY_CONDITIONAL_P

#define ENTITY_CONDITIONAL_P (   e)    entity_an_operator_p(e, CONDITIONAL)

Definition at line 1299 of file ri-util.h.

◆ entity_constant_p

#define entity_constant_p (   e)
Value:
#define type_functional_p(x)
Definition: ri.h:2950
#define entity_storage(x)
Definition: ri.h:2794
#define value_constant_p(x)
Definition: ri.h:3071
#define entity_type(x)
Definition: ri.h:2792
#define entity_initial(x)
Definition: ri.h:2796

Definition at line 1789 of file ri-util.h.

◆ ENTITY_CONTINUE_P

#define ENTITY_CONTINUE_P (   e)    entity_a_function_p(e, CONTINUE)

Definition at line 1277 of file ri-util.h.

◆ ENTITY_CONVERSION_CMPLX_P

#define ENTITY_CONVERSION_CMPLX_P (   e)    ENTITY_CONVERSION_P(e, CMPLX)

Definition at line 1274 of file ri-util.h.

◆ ENTITY_CONVERSION_DCMPLX_P

#define ENTITY_CONVERSION_DCMPLX_P (   e)    ENTITY_CONVERSION_P(e, DCMPLX)

Definition at line 1275 of file ri-util.h.

◆ ENTITY_CONVERSION_P

#define ENTITY_CONVERSION_P (   e,
  name 
)     (strcmp(entity_local_name(e), name##_GENERIC_CONVERSION_NAME)==0)

Definition at line 1272 of file ri-util.h.

◆ ENTITY_CREAT64_SYSTEM_P

#define ENTITY_CREAT64_SYSTEM_P (   e)    ENTITY_NAME_P(e,"creat64")

Definition at line 1635 of file ri-util.h.

◆ ENTITY_CREAT_SYSTEM_P

#define ENTITY_CREAT_SYSTEM_P (   e)    ENTITY_NAME_P(e,"creat")

Definition at line 1632 of file ri-util.h.

◆ ENTITY_CTERMID_SYSTEM_P

#define ENTITY_CTERMID_SYSTEM_P (   e)    ENTITY_NAME_P(e, "ctermid")

Definition at line 1514 of file ri-util.h.

◆ ENTITY_CUSERID_SYSTEM_P

#define ENTITY_CUSERID_SYSTEM_P (   e)    ENTITY_NAME_P(e, "cuserid")

Definition at line 1517 of file ri-util.h.

◆ ENTITY_DABS_P

#define ENTITY_DABS_P (   e)    entity_an_operator_p(e, DABS)

Definition at line 1327 of file ri-util.h.

◆ ENTITY_DATA_LIST_P

#define ENTITY_DATA_LIST_P (   e)    ENTITY_NAME_P(e, DATA_LIST_FUNCTION_NAME)

Definition at line 1651 of file ri-util.h.

◆ entity_declarations

#define entity_declarations (   e)    (code_declarations(entity_code(e)))

MISC: newgen shorthands.

Definition at line 1753 of file ri-util.h.

◆ ENTITY_DEREFERENCING_P

#define ENTITY_DEREFERENCING_P (   e)    entity_an_operator_p(e, DEREFERENCING)

Definition at line 1664 of file ri-util.h.

◆ ENTITY_DIRECTIO_SYSTEM_P

#define ENTITY_DIRECTIO_SYSTEM_P (   e)    ENTITY_NAME_P(e,"directio")

Definition at line 1633 of file ri-util.h.

◆ ENTITY_DIV_SYSTEM_P

#define ENTITY_DIV_SYSTEM_P (   e)    ENTITY_NAME_P(e, "div")

Definition at line 1539 of file ri-util.h.

◆ ENTITY_DIVIDE_P

#define ENTITY_DIVIDE_P (   e)    entity_an_operator_p(e, DIVIDE)

Definition at line 1311 of file ri-util.h.

◆ ENTITY_DIVIDE_UPDATE_P

#define ENTITY_DIVIDE_UPDATE_P (   e)    entity_an_operator_p(e, DIVIDE_UPDATE)

Definition at line 1288 of file ri-util.h.

◆ ENTITY_DMAX1_P

#define ENTITY_DMAX1_P (   e)    entity_an_operator_p(e, DMAX1)

Definition at line 1322 of file ri-util.h.

◆ ENTITY_DMIN1_P

#define ENTITY_DMIN1_P (   e)    entity_an_operator_p(e, DMIN1)

Definition at line 1321 of file ri-util.h.

◆ ENTITY_DRAND48_SYSTEM_P

#define ENTITY_DRAND48_SYSTEM_P (   e)    ENTITY_NAME_P(e, "drand48")

Definition at line 1558 of file ri-util.h.

◆ ENTITY_DUP2_SYSTEM_P

#define ENTITY_DUP2_SYSTEM_P (   e)    ENTITY_NAME_P(e, "dup2")

Definition at line 1587 of file ri-util.h.

◆ ENTITY_ECVT_SYSTEM_P

#define ENTITY_ECVT_SYSTEM_P (   e)    ENTITY_NAME_P(e, "ecvt")

Definition at line 1573 of file ri-util.h.

◆ ENTITY_ENDFILE_P

#define ENTITY_ENDFILE_P (   e)    ENTITY_NAME_P(e, "ENDFILE")

Definition at line 1400 of file ri-util.h.

◆ ENTITY_EQUAL_P

#define ENTITY_EQUAL_P (   e)    (entity_an_operator_p(e, EQUAL) || entity_an_operator_p(e, EQUIV) || entity_an_operator_p(e, C_EQUAL))

Definition at line 1379 of file ri-util.h.

◆ ENTITY_EQUIV_P

#define ENTITY_EQUIV_P (   e)    entity_an_operator_p(e, EQUIV)

Definition at line 1352 of file ri-util.h.

◆ ENTITY_ERAND48_SYSTEM_P

#define ENTITY_ERAND48_SYSTEM_P (   e)    ENTITY_NAME_P(e, "erand48")

Definition at line 1559 of file ri-util.h.

◆ ENTITY_EXIT_SYSTEM_P

#define ENTITY_EXIT_SYSTEM_P (   e)    ENTITY_NAME_P(e, "exit")

Definition at line 1540 of file ri-util.h.

◆ ENTITY_EXITHANDLESYSTEM_P

#define ENTITY_EXITHANDLESYSTEM_P (   e)    ENTITY_NAME_P(e, "exithandle")

Definition at line 1557 of file ri-util.h.

◆ ENTITY_FABS_P

#define ENTITY_FABS_P (   e)    entity_an_operator_p(e, FABS)

Definition at line 1336 of file ri-util.h.

◆ ENTITY_FABSF_P

#define ENTITY_FABSF_P (   e)    entity_an_operator_p(e, FABSF)

Definition at line 1337 of file ri-util.h.

◆ ENTITY_FABSL_P

#define ENTITY_FABSL_P (   e)    entity_an_operator_p(e, FABSL)

Definition at line 1338 of file ri-util.h.

◆ ENTITY_FALSE_P

#define ENTITY_FALSE_P (   e)    entity_an_operator_p(e, FALSE)

Definition at line 1369 of file ri-util.h.

◆ ENTITY_FCLOSE_P

#define ENTITY_FCLOSE_P (   e)    ENTITY_NAME_P(e, "fclose")

Definition at line 1446 of file ri-util.h.

◆ ENTITY_FCNTL_SYSTEM_P

#define ENTITY_FCNTL_SYSTEM_P (   e)    ENTITY_NAME_P(e,"fcntl")

include <fcntl.h>

Definition at line 1630 of file ri-util.h.

◆ ENTITY_FCVT_SYSTEM_P

#define ENTITY_FCVT_SYSTEM_P (   e)    ENTITY_NAME_P(e, "fcvt")

Definition at line 1574 of file ri-util.h.

◆ ENTITY_FDATASYNC_SYSTEM_P

#define ENTITY_FDATASYNC_SYSTEM_P (   e)    ENTITY_NAME_P(e, FDATASYNC_FUNCTION_NAME)

Definition at line 1493 of file ri-util.h.

◆ ENTITY_FDOPEN_P

#define ENTITY_FDOPEN_P (   e)    ENTITY_NAME_P(e, "fdopen")

Definition at line 1444 of file ri-util.h.

◆ ENTITY_FDOPEN_SYSTEM_P

#define ENTITY_FDOPEN_SYSTEM_P (   e)    ENTITY_NAME_P(e, "fdopen")

Definition at line 1513 of file ri-util.h.

◆ ENTITY_FEOF_P

#define ENTITY_FEOF_P (   e)    ENTITY_NAME_P(e, "feof")

Definition at line 1476 of file ri-util.h.

◆ ENTITY_FERROR_P

#define ENTITY_FERROR_P (   e)    ENTITY_NAME_P(e, "ferror")

Definition at line 1477 of file ri-util.h.

◆ ENTITY_FFLUSH_SYSTEM_P

#define ENTITY_FFLUSH_SYSTEM_P (   e)    ENTITY_NAME_P(e, "fflush")

Definition at line 1505 of file ri-util.h.

◆ ENTITY_FGETC_P

#define ENTITY_FGETC_P (   e)    ENTITY_NAME_P(e, "fgetc")

Definition at line 1442 of file ri-util.h.

◆ ENTITY_FGETPOS64_SYSTEM_P

#define ENTITY_FGETPOS64_SYSTEM_P (   e)    ENTITY_NAME_P(e, "fgetpos64")

Definition at line 1527 of file ri-util.h.

◆ ENTITY_FGETPOS_P

#define ENTITY_FGETPOS_P (   e)    ENTITY_NAME_P(e, "fgetpos")

Definition at line 1470 of file ri-util.h.

◆ ENTITY_FGETS_P

#define ENTITY_FGETS_P (   e)    ENTITY_NAME_P(e, "fgets")

Definition at line 1440 of file ri-util.h.

◆ ENTITY_FIELD_P

#define ENTITY_FIELD_P (   e)    entity_an_operator_p(e, FIELD)

C data structure and pointer management.

Definition at line 1662 of file ri-util.h.

◆ ENTITY_FILENO_P

#define ENTITY_FILENO_P (   e)    ENTITY_NAME_P(e, "fileno")

Definition at line 1478 of file ri-util.h.

◆ ENTITY_FILENO_SYSTEM_P

#define ENTITY_FILENO_SYSTEM_P (   e)    ENTITY_NAME_P(e, "fileno")

Definition at line 1515 of file ri-util.h.

◆ ENTITY_FIVE_OPERATION_P

#define ENTITY_FIVE_OPERATION_P (   e)
Value:
( ENTITY_PLUS_P(e) || \
ENTITY_PLUS_C_P(e) || \
ENTITY_MINUS_P(e) || \
ENTITY_MINUS_C_P(e) || \
ENTITY_UNARY_MINUS_P(e) || \
ENTITY_MULTIPLY_P(e) || \
ENTITY_MODULO_P(e) ||\
ENTITY_DIVIDE_P(e) )
#define ENTITY_PLUS_P(e)
Definition: ri-util.h:1301

Definition at line 1673 of file ri-util.h.

◆ ENTITY_FOPEN64_SYSTEM_P

#define ENTITY_FOPEN64_SYSTEM_P (   e)    ENTITY_NAME_P(e, "fopen64")

Definition at line 1524 of file ri-util.h.

◆ ENTITY_FOPEN_P

#define ENTITY_FOPEN_P (   e)    ENTITY_NAME_P(e, "fopen")

Definition at line 1443 of file ri-util.h.

◆ ENTITY_FOPEN_SYSTEM_P

#define ENTITY_FOPEN_SYSTEM_P (   e)    ENTITY_NAME_P(e, "fopen")

FI: Why is it declared "system"? Why is it in the middle of string functions?

Definition at line 1626 of file ri-util.h.

◆ ENTITY_FORMAT_P

#define ENTITY_FORMAT_P (   e)    ENTITY_NAME_P(e, "FORMAT")

Definition at line 1403 of file ri-util.h.

◆ ENTITY_FPRINTF_P

#define ENTITY_FPRINTF_P (   e)    ENTITY_NAME_P(e, "fprintf")

Definition at line 1432 of file ri-util.h.

◆ ENTITY_FPUTC_P

#define ENTITY_FPUTC_P (   e)    ENTITY_NAME_P(e, "fputc")

Definition at line 1441 of file ri-util.h.

◆ ENTITY_FPUTS_P

#define ENTITY_FPUTS_P (   e)    ENTITY_NAME_P(e, "fputs")

Definition at line 1439 of file ri-util.h.

◆ ENTITY_FREAD_P

#define ENTITY_FREAD_P (   e)    ENTITY_NAME_P(e, "fread")

Definition at line 1468 of file ri-util.h.

◆ ENTITY_FREE_SYSTEM_P

#define ENTITY_FREE_SYSTEM_P (   e)    ENTITY_NAME_P(e, "free")

Definition at line 1541 of file ri-util.h.

◆ ENTITY_FREOPEN64_SYSTEM_P

#define ENTITY_FREOPEN64_SYSTEM_P (   e)    ENTITY_NAME_P(e, "freopen64")

Definition at line 1525 of file ri-util.h.

◆ ENTITY_FREOPEN_P

#define ENTITY_FREOPEN_P (   e)    ENTITY_NAME_P(e, "freopen")

Definition at line 1445 of file ri-util.h.

◆ ENTITY_FREOPEN_SYSTEM_P

#define ENTITY_FREOPEN_SYSTEM_P (   e)    ENTITY_NAME_P(e, "freopen")

Definition at line 1506 of file ri-util.h.

◆ ENTITY_FSCANF_P

#define ENTITY_FSCANF_P (   e)    ENTITY_NAME_P(e, "fscanf")

Definition at line 1435 of file ri-util.h.

◆ ENTITY_FSEEK_P

#define ENTITY_FSEEK_P (   e)    ENTITY_NAME_P(e, "fseek")

Definition at line 1471 of file ri-util.h.

◆ ENTITY_FSEEKO64_SYSTEM_P

#define ENTITY_FSEEKO64_SYSTEM_P (   e)    ENTITY_NAME_P(e, "fseeko64")

Definition at line 1529 of file ri-util.h.

◆ ENTITY_FSEEKO_SYSTEM_P

#define ENTITY_FSEEKO_SYSTEM_P (   e)    ENTITY_NAME_P(e, "fseeko")

Definition at line 1522 of file ri-util.h.

◆ ENTITY_FSETPOS64_SYSTEM_P

#define ENTITY_FSETPOS64_SYSTEM_P (   e)    ENTITY_NAME_P(e, "fsetpos64")

Definition at line 1528 of file ri-util.h.

◆ ENTITY_FSETPOS_P

#define ENTITY_FSETPOS_P (   e)    ENTITY_NAME_P(e, "fsetpos")

Definition at line 1472 of file ri-util.h.

◆ ENTITY_FSTAT_SYSTEM_P

#define ENTITY_FSTAT_SYSTEM_P (   e)    ENTITY_NAME_P(e, FSTAT_FUNCTION_NAME)

Definition at line 1498 of file ri-util.h.

◆ ENTITY_FSYNC_SYSTEM_P

#define ENTITY_FSYNC_SYSTEM_P (   e)    ENTITY_NAME_P(e, FSYNC_FUNCTION_NAME)

fcntl()

Definition at line 1492 of file ri-util.h.

◆ ENTITY_FTELL_P

#define ENTITY_FTELL_P (   e)    ENTITY_NAME_P(e, "ftell")

Definition at line 1473 of file ri-util.h.

◆ ENTITY_FTELLO64_SYSTEM_P

#define ENTITY_FTELLO64_SYSTEM_P (   e)    ENTITY_NAME_P(e, "ftello64")

Definition at line 1530 of file ri-util.h.

◆ ENTITY_FTELLO_SYSTEM_P

#define ENTITY_FTELLO_SYSTEM_P (   e)    ENTITY_NAME_P(e, "ftello")

Definition at line 1523 of file ri-util.h.

◆ ENTITY_FWRITE_P

#define ENTITY_FWRITE_P (   e)    ENTITY_NAME_P(e, "fwrite")

Definition at line 1469 of file ri-util.h.

◆ ENTITY_GCVT_SYSTEM_P

#define ENTITY_GCVT_SYSTEM_P (   e)    ENTITY_NAME_P(e, "gcvt")

Definition at line 1575 of file ri-util.h.

◆ ENTITY_GETC_P

#define ENTITY_GETC_P (   e)    ENTITY_NAME_P(e, "getc")

Definition at line 1461 of file ri-util.h.

◆ ENTITY_GETCHAR_P

#define ENTITY_GETCHAR_P (   e)    ENTITY_NAME_P(e, "getchar")

Definition at line 1463 of file ri-util.h.

◆ ENTITY_GETCWD_SYSTEM_P

#define ENTITY_GETCWD_SYSTEM_P (   e)    ENTITY_NAME_P(e, "getcwd")

Definition at line 1591 of file ri-util.h.

◆ ENTITY_GETENV_SYSTEM_P

#define ENTITY_GETENV_SYSTEM_P (   e)    ENTITY_NAME_P(e, "getenv")

Definition at line 1542 of file ri-util.h.

◆ ENTITY_GETEXECNAME_SYSTEM_P

#define ENTITY_GETEXECNAME_SYSTEM_P (   e)    ENTITY_NAME_P(e, "getexecname")

Definition at line 1592 of file ri-util.h.

◆ ENTITY_GETLOGIN_SYSTEM_P

#define ENTITY_GETLOGIN_SYSTEM_P (   e)    ENTITY_NAME_P(e, "getlogin")

Definition at line 1593 of file ri-util.h.

◆ ENTITY_GETOPT_SYSTEM_P

#define ENTITY_GETOPT_SYSTEM_P (   e)    ENTITY_NAME_P(e, "getopt")

Definition at line 1594 of file ri-util.h.

◆ ENTITY_GETPASS_SYSTEM_P

#define ENTITY_GETPASS_SYSTEM_P (   e)    ENTITY_NAME_P(e, "getpass")

Definition at line 1595 of file ri-util.h.

◆ ENTITY_GETPASSPHRASE_SYSTEM_P

#define ENTITY_GETPASSPHRASE_SYSTEM_P (   e)    ENTITY_NAME_P(e, "getpassphrase")

Definition at line 1596 of file ri-util.h.

◆ ENTITY_GETPW_SYSTEM_P

#define ENTITY_GETPW_SYSTEM_P (   e)    ENTITY_NAME_P(e, "getpw")

Definition at line 1597 of file ri-util.h.

◆ ENTITY_GETS_P

#define ENTITY_GETS_P (   e)    ENTITY_NAME_P(e, "gets")

Definition at line 1438 of file ri-util.h.

◆ ENTITY_GETSUBOPT_SYSTEM_P

#define ENTITY_GETSUBOPT_SYSTEM_P (   e)    ENTITY_NAME_P(e, "getsubopt")

Definition at line 1576 of file ri-util.h.

◆ ENTITY_GETW_SYSTEM_P

#define ENTITY_GETW_SYSTEM_P (   e)    ENTITY_NAME_P(e, "getw")

Definition at line 1519 of file ri-util.h.

◆ ENTITY_GRANTPT_SYSTEM_P

#define ENTITY_GRANTPT_SYSTEM_P (   e)    ENTITY_NAME_P(e, "grantpt")

Definition at line 1577 of file ri-util.h.

◆ ENTITY_GREATER_OR_EQUAL_P

#define ENTITY_GREATER_OR_EQUAL_P (   e)    (entity_an_operator_p(e, GREATER_OR_EQUAL) || entity_an_operator_p(e, C_GREATER_OR_EQUAL))

Definition at line 1373 of file ri-util.h.

◆ ENTITY_GREATER_THAN_P

#define ENTITY_GREATER_THAN_P (   e)    (entity_an_operator_p(e, GREATER_THAN) || entity_an_operator_p(e, C_GREATER_THAN))

Definition at line 1374 of file ri-util.h.

◆ ENTITY_IABS_P

#define ENTITY_IABS_P (   e)    entity_an_operator_p(e, IABS)

Definition at line 1326 of file ri-util.h.

◆ ENTITY_IAND_P

#define ENTITY_IAND_P (   e)    ENTITY_NAME_P(e, "IAND")

Definition at line 1416 of file ri-util.h.

◆ ENTITY_IBCLR_P

#define ENTITY_IBCLR_P (   e)    ENTITY_NAME_P(e, "IBCLR")

Definition at line 1412 of file ri-util.h.

◆ ENTITY_IBITS_P

#define ENTITY_IBITS_P (   e)    ENTITY_NAME_P(e, "IBITS")

Definition at line 1408 of file ri-util.h.

◆ ENTITY_IBSET_P

#define ENTITY_IBSET_P (   e)    ENTITY_NAME_P(e, "IBSET")

Definition at line 1411 of file ri-util.h.

◆ ENTITY_IEOR_P

#define ENTITY_IEOR_P (   e)    ENTITY_NAME_P(e, "IEOR")

Definition at line 1415 of file ri-util.h.

◆ ENTITY_IMAXABS_P

#define ENTITY_IMAXABS_P (   e)    entity_a_function_p(e, IMAXABS)

Definition at line 1334 of file ri-util.h.

◆ ENTITY_IMPLIED_CMPLX_P

#define ENTITY_IMPLIED_CMPLX_P (   e)    ENTITY_NAME_P(e, IMPLIED_COMPLEX_NAME)

Definition at line 1657 of file ri-util.h.

◆ ENTITY_IMPLIED_DCMPLX_P

#define ENTITY_IMPLIED_DCMPLX_P (   e)    ENTITY_NAME_P(e, IMPLIED_DCOMPLEX_NAME)

Definition at line 1658 of file ri-util.h.

◆ ENTITY_IMPLIEDDO_P

#define ENTITY_IMPLIEDDO_P (   e)    ENTITY_NAME_P(e, IMPLIED_DO_NAME)

Definition at line 1401 of file ri-util.h.

◆ ENTITY_INITSTATE_SYSTEM_P

#define ENTITY_INITSTATE_SYSTEM_P (   e)    ENTITY_NAME_P(e, "initstate")

Definition at line 1578 of file ri-util.h.

◆ ENTITY_IO_LIST_P

#define ENTITY_IO_LIST_P (   e)    ENTITY_NAME_P(e, IO_LIST_STRING_NAME)

Definition at line 1402 of file ri-util.h.

◆ ENTITY_IOCTL_SYSTEM_P

#define ENTITY_IOCTL_SYSTEM_P (   e)    ENTITY_NAME_P(e, IOCTL_FUNCTION_NAME)

Definition at line 1494 of file ri-util.h.

◆ ENTITY_IOR_P

#define ENTITY_IOR_P (   e)    ENTITY_NAME_P(e, "IOR")

Definition at line 1414 of file ri-util.h.

◆ ENTITY_ISATTY_SYSTEM_P

#define ENTITY_ISATTY_SYSTEM_P (   e)    ENTITY_NAME_P(e, "isatty")

Definition at line 1598 of file ri-util.h.

◆ ENTITY_ISHFT_P

#define ENTITY_ISHFT_P (   e)    ENTITY_NAME_P(e, "ISHFT")

Bit manipulation functions.

Amira Mensi

Definition at line 1406 of file ri-util.h.

◆ ENTITY_ISHFTC_P

#define ENTITY_ISHFTC_P (   e)    ENTITY_NAME_P(e, "ISHFTC")

Definition at line 1407 of file ri-util.h.

◆ ENTITY_ISOC99_FSCANF_P

#define ENTITY_ISOC99_FSCANF_P (   e)    ENTITY_NAME_P(e, ISOC99_FSCANF_FUNCTION_NAME)

Definition at line 1436 of file ri-util.h.

◆ ENTITY_ISOC99_SCANF_P

#define ENTITY_ISOC99_SCANF_P (   e)    ENTITY_NAME_P(e, ISOC99_SCANF_FUNCTION_NAME)

Definition at line 1434 of file ri-util.h.

◆ ENTITY_ISOC99_SSCANF_P

#define ENTITY_ISOC99_SSCANF_P (   e)    ENTITY_NAME_P(e, ISOC99_SSCANF_FUNCTION_NAME)

Definition at line 1449 of file ri-util.h.

◆ ENTITY_ISOC99_VFSCANF_P

#define ENTITY_ISOC99_VFSCANF_P (   e)    ENTITY_NAME_P(e, ISOC99_VFSCANF_FUNCTION_NAME)

Definition at line 1452 of file ri-util.h.

◆ ENTITY_ISOC99_VSCANF_P

#define ENTITY_ISOC99_VSCANF_P (   e)    ENTITY_NAME_P(e, ISOC99_VSCANF_FUNCTION_NAME)

Definition at line 1455 of file ri-util.h.

◆ ENTITY_ISOC99_VSSCANF_P

#define ENTITY_ISOC99_VSSCANF_P (   e)    ENTITY_NAME_P(e, ISOC99_VSSCANF_FUNCTION_NAME)

Definition at line 1460 of file ri-util.h.

◆ ENTITY_JRAND48_SYSTEM_P

#define ENTITY_JRAND48_SYSTEM_P (   e)    ENTITY_NAME_P(e, "jrand48")

Definition at line 1560 of file ri-util.h.

◆ ENTITY_LABS_P

#define ENTITY_LABS_P (   e)    entity_a_function_p(e, LABS)

Definition at line 1331 of file ri-util.h.

◆ ENTITY_LABS_SYSTEM_P

#define ENTITY_LABS_SYSTEM_P (   e)    ENTITY_NAME_P(e, "labs")

Definition at line 1543 of file ri-util.h.

◆ ENTITY_LCONG48_SYSTEM_P

#define ENTITY_LCONG48_SYSTEM_P (   e)    ENTITY_NAME_P(e, "lcong48")

Definition at line 1561 of file ri-util.h.

◆ ENTITY_LDIV_SYSTEM_P

#define ENTITY_LDIV_SYSTEM_P (   e)    ENTITY_NAME_P(e, "ldiv")

Definition at line 1544 of file ri-util.h.

◆ ENTITY_LEFT_SHIFT_P

#define ENTITY_LEFT_SHIFT_P (   e)    entity_an_operator_p(e, LEFT_SHIFT)

Definition at line 1354 of file ri-util.h.

◆ ENTITY_LEFT_SHIFT_UPDATE_P

#define ENTITY_LEFT_SHIFT_UPDATE_P (   e)    entity_an_operator_p(e, LEFT_SHIFT_UPDATE)

Definition at line 1292 of file ri-util.h.

◆ ENTITY_LESS_OR_EQUAL_P

#define ENTITY_LESS_OR_EQUAL_P (   e)    (entity_an_operator_p(e, LESS_OR_EQUAL) || entity_an_operator_p(e, C_LESS_OR_EQUAL))

Definition at line 1375 of file ri-util.h.

◆ ENTITY_LESS_THAN_P

#define ENTITY_LESS_THAN_P (   e)    (entity_an_operator_p(e, LESS_THAN) || entity_an_operator_p(e, C_LESS_THAN))

Definition at line 1376 of file ri-util.h.

◆ ENTITY_LINK_SYSTEM_P

#define ENTITY_LINK_SYSTEM_P (   e)    ENTITY_NAME_P(e, LINK_FUNCTION_NAME)

Definition at line 1487 of file ri-util.h.

◆ ENTITY_LLABS_P

#define ENTITY_LLABS_P (   e)    entity_a_function_p(e, LLABS)

Definition at line 1332 of file ri-util.h.

◆ ENTITY_LLABS_SYSTEM_P

#define ENTITY_LLABS_SYSTEM_P (   e)    ENTITY_NAME_P(e, "llabs")

Definition at line 1602 of file ri-util.h.

◆ ENTITY_LLDIV_SYSTEM_P

#define ENTITY_LLDIV_SYSTEM_P (   e)    ENTITY_NAME_P(e, "lldiv")

Definition at line 1603 of file ri-util.h.

◆ ENTITY_LLTOSTR_SYSTEM_P

#define ENTITY_LLTOSTR_SYSTEM_P (   e)    ENTITY_NAME_P(e, "lltostr")

Definition at line 1604 of file ri-util.h.

◆ ENTITY_LOGICAL_OPERATOR_P

#define ENTITY_LOGICAL_OPERATOR_P (   e)
Value:
ENTITY_AND_P(e) || \
ENTITY_OR_P(e) || \
ENTITY_NOT_P(e))
#define ENTITY_RELATIONAL_OPERATOR_P(e)
Definition: ri-util.h:1381

Attention : This definition is different with the Fortran Standard where the logical operators are the following only: AND, OR, NOT, EQUIV, NEQUIV (NN-Mars 2000)

Definition at line 1363 of file ri-util.h.

◆ ENTITY_LRAND48_SYSTEM_P

#define ENTITY_LRAND48_SYSTEM_P (   e)    ENTITY_NAME_P(e, "lrand48")

Definition at line 1562 of file ri-util.h.

◆ ENTITY_LSTAT_SYSTEM_P

#define ENTITY_LSTAT_SYSTEM_P (   e)    ENTITY_NAME_P(e, LSTAT_FUNCTION_NAME)

Definition at line 1499 of file ri-util.h.

◆ ENTITY_MALLOC_SYSTEM_P

#define ENTITY_MALLOC_SYSTEM_P (   e)    ENTITY_NAME_P(e, "malloc")

Definition at line 1545 of file ri-util.h.

◆ ENTITY_MAX0_P

#define ENTITY_MAX0_P (   e)    entity_an_operator_p(e, MAX0)

Definition at line 1318 of file ri-util.h.

◆ ENTITY_MAX_P

#define ENTITY_MAX_P (   e)    entity_an_operator_p(e, MAX)

Definition at line 1315 of file ri-util.h.

◆ ENTITY_MBLEN_SYSTEM_P

#define ENTITY_MBLEN_SYSTEM_P (   e)    ENTITY_NAME_P(e, "mblen")

Definition at line 1546 of file ri-util.h.

◆ ENTITY_MBSTOWCS_SYSTEM_P

#define ENTITY_MBSTOWCS_SYSTEM_P (   e)    ENTITY_NAME_P(e, "mbstowcs")

Definition at line 1547 of file ri-util.h.

◆ ENTITY_MBTOWC_SYSTEM_P

#define ENTITY_MBTOWC_SYSTEM_P (   e)    ENTITY_NAME_P(e, "mbtowc")

Definition at line 1548 of file ri-util.h.

◆ ENTITY_MEMALIGN_SYSTEM_P

#define ENTITY_MEMALIGN_SYSTEM_P (   e)    ENTITY_NAME_P(e, "memalign")

Definition at line 1599 of file ri-util.h.

◆ ENTITY_MIN0_P

#define ENTITY_MIN0_P (   e)    entity_an_operator_p(e, MIN0)

Definition at line 1317 of file ri-util.h.

◆ ENTITY_MIN_OR_MAX_P

#define ENTITY_MIN_OR_MAX_P (   e)    (ENTITY_MIN_P(e) || ENTITY_MAX_P(e) )

Definition at line 1323 of file ri-util.h.

◆ ENTITY_MIN_P

#define ENTITY_MIN_P (   e)    entity_an_operator_p(e, MIN)

Definition at line 1313 of file ri-util.h.

◆ ENTITY_MINUS_C_P

#define ENTITY_MINUS_C_P (   e)    entity_an_operator_p(e, MINUS_C)

Definition at line 1304 of file ri-util.h.

◆ ENTITY_MINUS_P

#define ENTITY_MINUS_P (   e)    entity_an_operator_p(e, MINUS)

Definition at line 1303 of file ri-util.h.

◆ ENTITY_MINUS_UPDATE_P

#define ENTITY_MINUS_UPDATE_P (   e)    entity_an_operator_p(e, MINUS_UPDATE)

Definition at line 1291 of file ri-util.h.

◆ ENTITY_MKSTEMP64_SYSTEM_P

#define ENTITY_MKSTEMP64_SYSTEM_P (   e)    ENTITY_NAME_P(e, "mkstemp64")

Definition at line 1571 of file ri-util.h.

◆ ENTITY_MKSTEMP_SYSTEM_P

#define ENTITY_MKSTEMP_SYSTEM_P (   e)    ENTITY_NAME_P(e, "mkstemp")

Definition at line 1570 of file ri-util.h.

◆ ENTITY_MKTEMP_SYSTEM_P

#define ENTITY_MKTEMP_SYSTEM_P (   e)    ENTITY_NAME_P(e, "mktemp")

Definition at line 1580 of file ri-util.h.

◆ ENTITY_MODULO_P

#define ENTITY_MODULO_P (   e)    entity_an_operator_p(e, MODULO)

Definition at line 1308 of file ri-util.h.

◆ ENTITY_MODULO_UPDATE_P

#define ENTITY_MODULO_UPDATE_P (   e)    entity_an_operator_p(e, MODULO_UPDATE)

Definition at line 1289 of file ri-util.h.

◆ ENTITY_MRAND48_SYSTEM_P

#define ENTITY_MRAND48_SYSTEM_P (   e)    ENTITY_NAME_P(e, "mrand48")

Definition at line 1563 of file ri-util.h.

◆ ENTITY_MULTIPLY_P

#define ENTITY_MULTIPLY_P (   e)    entity_an_operator_p(e, MULTIPLY)

Definition at line 1307 of file ri-util.h.

◆ ENTITY_MULTIPLY_UPDATE_P

#define ENTITY_MULTIPLY_UPDATE_P (   e)    entity_an_operator_p(e, MULTIPLY_UPDATE)

Definition at line 1287 of file ri-util.h.

◆ ENTITY_MVBITS_P

#define ENTITY_MVBITS_P (   e)    ENTITY_NAME_P(e, "MVBITS")

Definition at line 1409 of file ri-util.h.

◆ ENTITY_NAME_P

#define ENTITY_NAME_P (   e,
  name 
)    (same_string_p(entity_user_name(e),name))

Definition at line 1389 of file ri-util.h.

◆ ENTITY_NON_EQUAL_P

#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))

Definition at line 1351 of file ri-util.h.

◆ ENTITY_NON_EQUIV_P

#define ENTITY_NON_EQUIV_P (   e)    entity_an_operator_p(e, NON_EQUIV)

Definition at line 1353 of file ri-util.h.

◆ ENTITY_NOT_P

#define ENTITY_NOT_P (   e)    (entity_an_operator_p(e, NOT) || entity_an_operator_p(e, C_NOT))

Definition at line 1349 of file ri-util.h.

◆ ENTITY_NRAND48_SYSTEM_P

#define ENTITY_NRAND48_SYSTEM_P (   e)    ENTITY_NAME_P(e, "nrand48")

Definition at line 1564 of file ri-util.h.

◆ ENTITY_OMP_FOR_P

#define ENTITY_OMP_FOR_P (   e)    ENTITY_NAME_P(e,OMP_FOR_FUNCTION_NAME)

Definition at line 1421 of file ri-util.h.

◆ ENTITY_OMP_IF_P

#define ENTITY_OMP_IF_P (   e)    ENTITY_NAME_P(e,OMP_IF_FUNCTION_NAME)

OMP entity test.

Definition at line 1419 of file ri-util.h.

◆ ENTITY_OMP_OMP_P

#define ENTITY_OMP_OMP_P (   e)    ENTITY_NAME_P(e,OMP_OMP_FUNCTION_NAME)

Definition at line 1420 of file ri-util.h.

◆ ENTITY_OMP_PARALLEL_P

#define ENTITY_OMP_PARALLEL_P (   e)    ENTITY_NAME_P(e,OMP_PARALLEL_FUNCTION_NAME)

Definition at line 1423 of file ri-util.h.

◆ ENTITY_OMP_PRIVATE_P

#define ENTITY_OMP_PRIVATE_P (   e)    ENTITY_NAME_P(e,OMP_PRIVATE_FUNCTION_NAME)

Definition at line 1422 of file ri-util.h.

◆ ENTITY_OMP_REDUCTION_P

#define ENTITY_OMP_REDUCTION_P (   e)    ENTITY_NAME_P(e,OMP_REDUCTION_FUNCTION_NAME)

Definition at line 1424 of file ri-util.h.

◆ ENTITY_ONE_P

#define ENTITY_ONE_P (   e)    entity_an_operator_p(e, ONE)

Definition at line 1370 of file ri-util.h.

◆ ENTITY_OPEN64_SYSTEM_P

#define ENTITY_OPEN64_SYSTEM_P (   e)    ENTITY_NAME_P(e,"open64")

Definition at line 1634 of file ri-util.h.

◆ ENTITY_OPEN_P

#define ENTITY_OPEN_P (   e)    ENTITY_NAME_P(e, "OPEN")

Definition at line 1395 of file ri-util.h.

◆ ENTITY_OPEN_SYSTEM_P

#define ENTITY_OPEN_SYSTEM_P (   e)    ENTITY_NAME_P(e,"open")

Definition at line 1631 of file ri-util.h.

◆ ENTITY_OR_P

#define ENTITY_OR_P (   e)    (entity_an_operator_p(e, OR) || entity_an_operator_p(e, C_OR))

Definition at line 1345 of file ri-util.h.

◆ ENTITY_PCLOSE_SYSTEM_P

#define ENTITY_PCLOSE_SYSTEM_P (   e)    ENTITY_NAME_P(e, "pclose")

Definition at line 1521 of file ri-util.h.

◆ ENTITY_PERROR_P

#define ENTITY_PERROR_P (   e)    ENTITY_NAME_P(e, "perror")

Definition at line 1479 of file ri-util.h.

◆ ENTITY_PLUS_C_P

#define ENTITY_PLUS_C_P (   e)    entity_an_operator_p(e, PLUS_C)

Definition at line 1302 of file ri-util.h.

◆ ENTITY_PLUS_P

#define ENTITY_PLUS_P (   e)    entity_an_operator_p(e, PLUS)

Definition at line 1301 of file ri-util.h.

◆ ENTITY_PLUS_UPDATE_P

#define ENTITY_PLUS_UPDATE_P (   e)    entity_an_operator_p(e, PLUS_UPDATE)

Definition at line 1290 of file ri-util.h.

◆ ENTITY_POINT_TO_P

#define ENTITY_POINT_TO_P (   e)    entity_an_operator_p(e, POINT_TO)

Definition at line 1663 of file ri-util.h.

◆ ENTITY_POPEN_SYSTEM_P

#define ENTITY_POPEN_SYSTEM_P (   e)    ENTITY_NAME_P(e, "popen")

Definition at line 1516 of file ri-util.h.

◆ ENTITY_POST_DECREMENT_P

#define ENTITY_POST_DECREMENT_P (   e)    entity_an_operator_p(e, POST_DECREMENT)

Definition at line 1284 of file ri-util.h.

◆ ENTITY_POST_INCREMENT_P

#define ENTITY_POST_INCREMENT_P (   e)    entity_an_operator_p(e, POST_INCREMENT)

Definition at line 1283 of file ri-util.h.

◆ ENTITY_POWER_P

#define ENTITY_POWER_P (   e)    entity_an_operator_p(e, POWER)

Definition at line 1310 of file ri-util.h.

◆ ENTITY_PRE_DECREMENT_P

#define ENTITY_PRE_DECREMENT_P (   e)    entity_an_operator_p(e, PRE_DECREMENT)

Definition at line 1286 of file ri-util.h.

◆ ENTITY_PRE_INCREMENT_P

#define ENTITY_PRE_INCREMENT_P (   e)    entity_an_operator_p(e, PRE_INCREMENT)

Definition at line 1285 of file ri-util.h.

◆ ENTITY_PRINTF_P

#define ENTITY_PRINTF_P (   e)    ENTITY_NAME_P(e, "printf")

o functions: C library and system io.Amira Mensi

include<stdio.h>

Definition at line 1431 of file ri-util.h.

◆ ENTITY_PSELECT_SYSTEM_P

#define ENTITY_PSELECT_SYSTEM_P (   e)    ENTITY_NAME_P(e, PSELECT_FUNCTION_NAME)

Definition at line 1496 of file ri-util.h.

◆ ENTITY_PTSNAME_SYSTEM_P

#define ENTITY_PTSNAME_SYSTEM_P (   e)    ENTITY_NAME_P(e, "ptsname")

Definition at line 1581 of file ri-util.h.

◆ ENTITY_PUTC_P

#define ENTITY_PUTC_P (   e)    ENTITY_NAME_P(e, "putc")

Definition at line 1464 of file ri-util.h.

◆ ENTITY_PUTCHAR_P

#define ENTITY_PUTCHAR_P (   e)    ENTITY_NAME_P(e, "putchar")

Definition at line 1466 of file ri-util.h.

◆ ENTITY_PUTENV_SYSTEM_P

#define ENTITY_PUTENV_SYSTEM_P (   e)    ENTITY_NAME_P(e, "putenv")

Definition at line 1567 of file ri-util.h.

◆ ENTITY_PUTS_P

#define ENTITY_PUTS_P (   e)    ENTITY_NAME_P(e, "puts")

Definition at line 1437 of file ri-util.h.

◆ ENTITY_PUTW_SYSTEM_P

#define ENTITY_PUTW_SYSTEM_P (   e)    ENTITY_NAME_P(e, "putw")

Definition at line 1520 of file ri-util.h.

◆ ENTITY_QECVT_SYSTEM_P

#define ENTITY_QECVT_SYSTEM_P (   e)    ENTITY_NAME_P(e, "qecvt")

Definition at line 1588 of file ri-util.h.

◆ ENTITY_QFCVT_SYSTEM_P

#define ENTITY_QFCVT_SYSTEM_P (   e)    ENTITY_NAME_P(e, "qfcvt")

Definition at line 1589 of file ri-util.h.

◆ ENTITY_QGCVT_SYSTEM_P

#define ENTITY_QGCVT_SYSTEM_P (   e)    ENTITY_NAME_P(e, "qgcvt")

Definition at line 1590 of file ri-util.h.

◆ ENTITY_QSORT_SYSTEM_P

#define ENTITY_QSORT_SYSTEM_P (   e)    ENTITY_NAME_P(e, "qsort")

Definition at line 1549 of file ri-util.h.

◆ ENTITY_RAND_P

#define ENTITY_RAND_P (   e)    ENTITY_NAME_P(e,"rand")

Definition at line 1641 of file ri-util.h.

◆ ENTITY_RANDOM_P

#define ENTITY_RANDOM_P (   e)    ENTITY_NAME_P(e,"random")

some random functions of stdlib.h

Definition at line 1639 of file ri-util.h.

◆ ENTITY_READ_P

#define ENTITY_READ_P (   e)    ENTITY_NAME_P(e, READ_FUNCTION_NAME)

Definition at line 1397 of file ri-util.h.

◆ ENTITY_REALLOC_SYSTEM_P

#define ENTITY_REALLOC_SYSTEM_P (   e)    ENTITY_NAME_P(e, "realloc")

Definition at line 1550 of file ri-util.h.

◆ ENTITY_REALPATH_SYSTEM_P

#define ENTITY_REALPATH_SYSTEM_P (   e)    ENTITY_NAME_P(e, "realpath")

Definition at line 1582 of file ri-util.h.

◆ ENTITY_RELATIONAL_OPERATOR_P

#define ENTITY_RELATIONAL_OPERATOR_P (   e)
Value:
( \
ENTITY_GREATER_OR_EQUAL_P(e) || \
ENTITY_GREATER_THAN_P(e) || \
ENTITY_LESS_OR_EQUAL_P(e) || \
ENTITY_LESS_THAN_P(e) || \
ENTITY_NON_EQUAL_P(e) || \
ENTITY_EQUAL_P(e) )

Definition at line 1381 of file ri-util.h.

◆ ENTITY_REMOVE_SYSTEM_P

#define ENTITY_REMOVE_SYSTEM_P (   e)    ENTITY_NAME_P(e, "remove")

Definition at line 1501 of file ri-util.h.

◆ ENTITY_RENAME_SYSTEM_P

#define ENTITY_RENAME_SYSTEM_P (   e)    ENTITY_NAME_P(e, "rename")

Definition at line 1502 of file ri-util.h.

◆ ENTITY_REPEAT_VALUE_P

#define ENTITY_REPEAT_VALUE_P (   e)    ENTITY_NAME_P(e, REPEAT_VALUE_FUNCTION_NAME)

Definition at line 1650 of file ri-util.h.

◆ ENTITY_RETURN_P

#define ENTITY_RETURN_P (   e)    entity_a_function_p(e, RETURN)

Definition at line 1279 of file ri-util.h.

◆ ENTITY_REWIND_P

#define ENTITY_REWIND_P (   e)    ENTITY_NAME_P(e, "REWIND")

Definition at line 1394 of file ri-util.h.

◆ ENTITY_RIGHT_SHIFT_P

#define ENTITY_RIGHT_SHIFT_P (   e)    entity_an_operator_p(e, RIGHT_SHIFT)

Definition at line 1355 of file ri-util.h.

◆ ENTITY_RIGHT_SHIFT_UPDATE_P

#define ENTITY_RIGHT_SHIFT_UPDATE_P (   e)    entity_an_operator_p(e, RIGHT_SHIFT_UPDATE)

Definition at line 1293 of file ri-util.h.

◆ ENTITY_SCANF_P

#define ENTITY_SCANF_P (   e)    ENTITY_NAME_P(e, "scanf")

Definition at line 1433 of file ri-util.h.

◆ ENTITY_SEED48_SYSTEM_P

#define ENTITY_SEED48_SYSTEM_P (   e)    ENTITY_NAME_P(e, "seed48")

Definition at line 1565 of file ri-util.h.

◆ ENTITY_SELECT_SYSTEM_P

#define ENTITY_SELECT_SYSTEM_P (   e)    ENTITY_NAME_P(e, SELECT_FUNCTION_NAME)

Definition at line 1495 of file ri-util.h.

◆ ENTITY_SEND_P

#define ENTITY_SEND_P (   e)    ENTITY_NAME_P(e, "send")

intrinsic entity declarations

Definition at line 2383 of file ri-util.h.

◆ ENTITY_SETBUF_SYSTEM_P

#define ENTITY_SETBUF_SYSTEM_P (   e)    ENTITY_NAME_P(e, "setbuf")

Definition at line 1507 of file ri-util.h.

◆ ENTITY_SETBUFFER_SYSTEM_P

#define ENTITY_SETBUFFER_SYSTEM_P (   e)    ENTITY_NAME_P(e, "setbuffer")

Definition at line 1511 of file ri-util.h.

◆ ENTITY_SETKEY_SYSTEM_P

#define ENTITY_SETKEY_SYSTEM_P (   e)    ENTITY_NAME_P(e, "setkey")

Definition at line 1568 of file ri-util.h.

◆ ENTITY_SETLINEBUF_SYSTEM_P

#define ENTITY_SETLINEBUF_SYSTEM_P (   e)    ENTITY_NAME_P(e, "setlinebuf")

Definition at line 1512 of file ri-util.h.

◆ ENTITY_SETSTATE_SYSTEM_P

#define ENTITY_SETSTATE_SYSTEM_P (   e)    ENTITY_NAME_P(e, "setstate")

Definition at line 1583 of file ri-util.h.

◆ ENTITY_SETVBUF_SYSTEM_P

#define ENTITY_SETVBUF_SYSTEM_P (   e)    ENTITY_NAME_P(e, "setvbuf")

Definition at line 1508 of file ri-util.h.

◆ ENTITY_SIGNAL_P

#define ENTITY_SIGNAL_P (   e)    ENTITY_NAME_P(e,"signal")

signal.h

Definition at line 1645 of file ri-util.h.

◆ ENTITY_SNPRINTF_P

#define ENTITY_SNPRINTF_P (   e)    ENTITY_NAME_P(e, "snprintf")

Definition at line 1447 of file ri-util.h.

◆ ENTITY_SPRINTF_P

#define ENTITY_SPRINTF_P (   e)    ENTITY_NAME_P(e, "sprintf")

Definition at line 1458 of file ri-util.h.

◆ ENTITY_SRAND48_SYSTEM_P

#define ENTITY_SRAND48_SYSTEM_P (   e)    ENTITY_NAME_P(e, "srand48")

Definition at line 1566 of file ri-util.h.

◆ ENTITY_SRAND_P

#define ENTITY_SRAND_P (   e)    ENTITY_NAME_P(e,"srand")

Definition at line 1642 of file ri-util.h.

◆ ENTITY_SRANDOM_P

#define ENTITY_SRANDOM_P (   e)    ENTITY_NAME_P(e,"srandom")

Definition at line 1640 of file ri-util.h.

◆ ENTITY_SSCANF_P

#define ENTITY_SSCANF_P (   e)    ENTITY_NAME_P(e, "sscanf")

Definition at line 1448 of file ri-util.h.

◆ ENTITY_STAT_SYSTEM_P

#define ENTITY_STAT_SYSTEM_P (   e)    ENTITY_NAME_P(e, STAT_FUNCTION_NAME)

Definition at line 1497 of file ri-util.h.

◆ ENTITY_STATIC_INITIALIZATION_P

#define ENTITY_STATIC_INITIALIZATION_P (   e)    ENTITY_NAME_P(e, STATIC_INITIALIZATION_FUNCTION_NAME)

Fortran DATA management.

Definition at line 1649 of file ri-util.h.

◆ ENTITY_STDERR_P

#define ENTITY_STDERR_P (   e)    entity_a_special_entity_p(e, STDERR_NAME)

Definition at line 2022 of file ri-util.h.

◆ ENTITY_STDIN_P

#define ENTITY_STDIN_P (   e)    entity_a_special_entity_p(e, STDIN_NAME)

Definition at line 2025 of file ri-util.h.

◆ ENTITY_STDOUT_P

#define ENTITY_STDOUT_P (   e)    entity_a_special_entity_p(e, STDOUT_NAME)

Definition at line 2028 of file ri-util.h.

◆ ENTITY_STOP_P

#define ENTITY_STOP_P (   e)    entity_a_function_p(e, STOP)

Definition at line 1278 of file ri-util.h.

◆ ENTITY_STRCAT_SYSTEM_P

#define ENTITY_STRCAT_SYSTEM_P (   e)    ENTITY_NAME_P(e, "strcat")

Definition at line 1619 of file ri-util.h.

◆ ENTITY_STRCMP_SYSTEM_P

#define ENTITY_STRCMP_SYSTEM_P (   e)    ENTITY_NAME_P(e, "strcmp")

include <string.h>

Definition at line 1616 of file ri-util.h.

◆ ENTITY_STRCPY_SYSTEM_P

#define ENTITY_STRCPY_SYSTEM_P (   e)    ENTITY_NAME_P(e, "strcpy")

Definition at line 1618 of file ri-util.h.

◆ ENTITY_STRERROR_R_SYSTEM_P

#define ENTITY_STRERROR_R_SYSTEM_P (   e)    ENTITY_NAME_P(e, "strerror_r")

Definition at line 1623 of file ri-util.h.

◆ ENTITY_STRERROR_SYSTEM_P

#define ENTITY_STRERROR_SYSTEM_P (   e)    ENTITY_NAME_P(e, "strerror")

Definition at line 1622 of file ri-util.h.

◆ ENTITY_STRLEN_SYSTEM_P

#define ENTITY_STRLEN_SYSTEM_P (   e)    ENTITY_NAME_P(e, "strlen")

Definition at line 1621 of file ri-util.h.

◆ ENTITY_STRNCAT_SYSTEM_P

#define ENTITY_STRNCAT_SYSTEM_P (   e)    ENTITY_NAME_P(e, "strncat")

Definition at line 1620 of file ri-util.h.

◆ ENTITY_STRNCMP_SYSTEM_P

#define ENTITY_STRNCMP_SYSTEM_P (   e)    ENTITY_NAME_P(e, "strncmp")

Definition at line 1617 of file ri-util.h.

◆ ENTITY_STROLL_SYSTEM_P

#define ENTITY_STROLL_SYSTEM_P (   e)    ENTITY_NAME_P(e, "strtoll")

Definition at line 1605 of file ri-util.h.

◆ ENTITY_STROULL_SYSTEM_P

#define ENTITY_STROULL_SYSTEM_P (   e)    ENTITY_NAME_P(e, "strtoull")

Definition at line 1606 of file ri-util.h.

◆ ENTITY_STRTOD_SYSTEM_P

#define ENTITY_STRTOD_SYSTEM_P (   e)    ENTITY_NAME_P(e, "strtod")

Definition at line 1551 of file ri-util.h.

◆ ENTITY_STRTOL_SYSTEM_P

#define ENTITY_STRTOL_SYSTEM_P (   e)    ENTITY_NAME_P(e, "strtol")

Definition at line 1552 of file ri-util.h.

◆ ENTITY_STRTOUL_SYSTEM_P

#define ENTITY_STRTOUL_SYSTEM_P (   e)    ENTITY_NAME_P(e, "strtoul")

Definition at line 1553 of file ri-util.h.

◆ ENTITY_SWAB_SYSTEM_P

#define ENTITY_SWAB_SYSTEM_P (   e)    ENTITY_NAME_P(e, "swab")

Definition at line 1569 of file ri-util.h.

◆ entity_symbolic_p

#define entity_symbolic_p (   e)
Value:
#define value_symbolic_p(x)
Definition: ri.h:3068

Definition at line 1772 of file ri-util.h.

◆ ENTITY_SYMLINK_SYSTEM_P

#define ENTITY_SYMLINK_SYSTEM_P (   e)    ENTITY_NAME_P(e, SYMLINK_FUNCTION_NAME)

Definition at line 1488 of file ri-util.h.

◆ ENTITY_SYSTEM_SYSTEM_P

#define ENTITY_SYSTEM_SYSTEM_P (   e)    ENTITY_NAME_P(e, "system")

Definition at line 1554 of file ri-util.h.

◆ ENTITY_TEMPNAM_SYSTEM_P

#define ENTITY_TEMPNAM_SYSTEM_P (   e)    ENTITY_NAME_P(e, "tempnam")

Definition at line 1518 of file ri-util.h.

◆ ENTITY_TMPFILE64_SYSTEM_P

#define ENTITY_TMPFILE64_SYSTEM_P (   e)    ENTITY_NAME_P(e, "tmpfile64")

Definition at line 1526 of file ri-util.h.

◆ ENTITY_TMPFILE_SYSTEM_P

#define ENTITY_TMPFILE_SYSTEM_P (   e)    ENTITY_NAME_P(e, "tmpfile")

Definition at line 1503 of file ri-util.h.

◆ ENTITY_TMPNAM_SYSTEM_P

#define ENTITY_TMPNAM_SYSTEM_P (   e)    ENTITY_NAME_P(e, "tmpnam")

Definition at line 1504 of file ri-util.h.

◆ ENTITY_TRUE_P

#define ENTITY_TRUE_P (   e)    entity_an_operator_p(e, TRUE)

Definition at line 1368 of file ri-util.h.

◆ ENTITY_TTYNAME_SYSTEM_P

#define ENTITY_TTYNAME_SYSTEM_P (   e)    ENTITY_NAME_P(e, "ttyname")

Definition at line 1600 of file ri-util.h.

◆ ENTITY_TTYSLOT_SYSTEM_P

#define ENTITY_TTYSLOT_SYSTEM_P (   e)    ENTITY_NAME_P(e, "ttyslot")

Definition at line 1584 of file ri-util.h.

◆ ENTITY_ULLOSTR_SYSTEM_P

#define ENTITY_ULLOSTR_SYSTEM_P (   e)    ENTITY_NAME_P(e, "ulltostr")

Definition at line 1607 of file ri-util.h.

◆ ENTITY_UNARY_MINUS_P

#define ENTITY_UNARY_MINUS_P (   e)    entity_an_operator_p(e, UNARY_MINUS)

Definition at line 1305 of file ri-util.h.

◆ ENTITY_UNARY_PLUS_P

#define ENTITY_UNARY_PLUS_P (   e)    entity_an_operator_p(e, UNARY_PLUS)

Definition at line 1306 of file ri-util.h.

◆ ENTITY_UNGETC_P

#define ENTITY_UNGETC_P (   e)    ENTITY_NAME_P(e, "ungetc")

Definition at line 1467 of file ri-util.h.

◆ ENTITY_UNLINK_SYSTEM_P

#define ENTITY_UNLINK_SYSTEM_P (   e)    ENTITY_NAME_P(e, UNLINK_FUNCTION_NAME)

Definition at line 1489 of file ri-util.h.

◆ ENTITY_UNLOCKPT_SYSTEM_P

#define ENTITY_UNLOCKPT_SYSTEM_P (   e)    ENTITY_NAME_P(e, "unlockpt")

Definition at line 1585 of file ri-util.h.

◆ ENTITY_VA_COPY_P

#define ENTITY_VA_COPY_P (   e)    ENTITY_NAME_P(e, BUILTIN_VA_COPY)

Definition at line 1670 of file ri-util.h.

◆ ENTITY_VA_END_P

#define ENTITY_VA_END_P (   e)    ENTITY_NAME_P(e, BUILTIN_VA_END)

Defined elsewhere: #define ENTITY_ADDRESS_OF_P(e) entity_an_operator_p(e, ADDRESS_OF)

C varargs stuff

Definition at line 1668 of file ri-util.h.

◆ ENTITY_VA_START_P

#define ENTITY_VA_START_P (   e)    ENTITY_NAME_P(e, BUILTIN_VA_START)

Definition at line 1669 of file ri-util.h.

◆ ENTITY_VALLOC_SYSTEM_P

#define ENTITY_VALLOC_SYSTEM_P (   e)    ENTITY_NAME_P(e, "valloc")

Definition at line 1586 of file ri-util.h.

◆ entity_variable_p

#define entity_variable_p (   e)    (type_variable_p(entity_type(e)))

An entity_variable_p(e) may hide a typedef and hence a functional type.

In C, use type_variable_p(ultimate_type(entity_type(e))) to make sure e is a variable.

It may also be a dummy C parameter.

It may also be a hidden entity such as an abstract location.

To sum up, this predicate does not imply that entity e represents a variable declared in the source code by the programmer.

See also the function variable_entity_p() which checks the storage of the entity.

Definition at line 1770 of file ri-util.h.

◆ ENTITY_VFPRINTF_P

#define ENTITY_VFPRINTF_P (   e)    ENTITY_NAME_P(e, "vfprintf")

Definition at line 1450 of file ri-util.h.

◆ ENTITY_VFSCANF_P

#define ENTITY_VFSCANF_P (   e)    ENTITY_NAME_P(e, "vfscanf")

Definition at line 1451 of file ri-util.h.

◆ ENTITY_VPRINTF_P

#define ENTITY_VPRINTF_P (   e)    ENTITY_NAME_P(e, "vprintf")

Definition at line 1453 of file ri-util.h.

◆ ENTITY_VSCANF_P

#define ENTITY_VSCANF_P (   e)    ENTITY_NAME_P(e, "vscanf")

Definition at line 1454 of file ri-util.h.

◆ ENTITY_VSNPRINTF_P

#define ENTITY_VSNPRINTF_P (   e)    ENTITY_NAME_P(e, "vsnprintf")

Definition at line 1456 of file ri-util.h.

◆ ENTITY_VSPRINTF_P

#define ENTITY_VSPRINTF_P (   e)    ENTITY_NAME_P(e, "vsprintf")

Definition at line 1457 of file ri-util.h.

◆ ENTITY_VSSCANF_P

#define ENTITY_VSSCANF_P (   e)    ENTITY_NAME_P(e, "vsscanf")

Definition at line 1459 of file ri-util.h.

◆ ENTITY_WCSTOMBS_SYSTEM_P

#define ENTITY_WCSTOMBS_SYSTEM_P (   e)    ENTITY_NAME_P(e, "wcstombs")

Definition at line 1556 of file ri-util.h.

◆ ENTITY_WCTOMB_SYSTEM_P

#define ENTITY_WCTOMB_SYSTEM_P (   e)    ENTITY_NAME_P(e, "wctomb")

Definition at line 1555 of file ri-util.h.

◆ ENTITY_WRITE_P

#define ENTITY_WRITE_P (   e)    ENTITY_NAME_P(e, "WRITE")

Fortran IO Management.

Definition at line 1393 of file ri-util.h.

◆ ENTITY_ZERO_P

#define ENTITY_ZERO_P (   e)    entity_an_operator_p(e, ZERO)

Definition at line 1371 of file ri-util.h.

◆ EOLE_FMA_OPERATOR_NAME

#define EOLE_FMA_OPERATOR_NAME   "EOLE-FMA-OP"

These operators are used within the optimize transformation in order to manipulate operators such as n-ary add and multiply or multiply-add operators ( JZ - sept 98)

Definition at line 1242 of file ri-util.h.

◆ EOLE_FMS_OPERATOR_NAME

#define EOLE_FMS_OPERATOR_NAME   "EOLE-FMS-OP"

Definition at line 1243 of file ri-util.h.

◆ EOLE_PROD_OPERATOR_NAME

#define EOLE_PROD_OPERATOR_NAME   "EOLE-PROD-OP"

Definition at line 1244 of file ri-util.h.

◆ EOLE_SUM_OPERATOR_NAME

#define EOLE_SUM_OPERATOR_NAME   "EOLE-SUM-OP"

Definition at line 1245 of file ri-util.h.

◆ eq_expression

#define eq_expression (   e1,
  e2 
)     binary_intrinsic_expression(EQUAL_OPERATOR_NAME, e1, e2)

Definition at line 1820 of file ri-util.h.

◆ EQUAL_OPERATOR_NAME

#define EQUAL_OPERATOR_NAME   ".EQ."

Definition at line 277 of file ri-util.h.

◆ EQUIV_OPERATOR_NAME

#define EQUIV_OPERATOR_NAME   ".EQV."

Definition at line 261 of file ri-util.h.

◆ ERAND48_FUNCTION_NAME

#define ERAND48_FUNCTION_NAME   "erand48"

Definition at line 394 of file ri-util.h.

◆ ERF_OPERATOR_NAME

#define ERF_OPERATOR_NAME   "erf"

Definition at line 692 of file ri-util.h.

◆ ERFC_OPERATOR_NAME

#define ERFC_OPERATOR_NAME   "erfc"

Definition at line 695 of file ri-util.h.

◆ ERFCF_OPERATOR_NAME

#define ERFCF_OPERATOR_NAME   "erfcf"

Definition at line 696 of file ri-util.h.

◆ ERFCL_OPERATOR_NAME

#define ERFCL_OPERATOR_NAME   "erfcl"

Definition at line 697 of file ri-util.h.

◆ ERFF_OPERATOR_NAME

#define ERFF_OPERATOR_NAME   "erff"

Definition at line 693 of file ri-util.h.

◆ ERFL_OPERATOR_NAME

#define ERFL_OPERATOR_NAME   "erfl"

Definition at line 694 of file ri-util.h.

◆ ERR_FUNCTION_NAME

#define ERR_FUNCTION_NAME   "err"

F2008.

BSD <err.h>

Definition at line 347 of file ri-util.h.

◆ ERRX_FUNCTION_NAME

#define ERRX_FUNCTION_NAME   "errx"

Definition at line 348 of file ri-util.h.

◆ ETIME_FUNCTION_NAME

#define ETIME_FUNCTION_NAME   "ETIME"

Definition at line 337 of file ri-util.h.

◆ EXECL_FUNCTION_NAME

#define EXECL_FUNCTION_NAME   "execl"

Definition at line 819 of file ri-util.h.

◆ EXECLE_FUNCTION_NAME

#define EXECLE_FUNCTION_NAME   "execle"

Definition at line 818 of file ri-util.h.

◆ EXECLP_FUNCTION_NAME

#define EXECLP_FUNCTION_NAME   "execlp"

Definition at line 821 of file ri-util.h.

◆ EXECV_FUNCTION_NAME

#define EXECV_FUNCTION_NAME   "execv"

Definition at line 817 of file ri-util.h.

◆ EXECVE_FUNCTION_NAME

#define EXECVE_FUNCTION_NAME   "execve"

Definition at line 815 of file ri-util.h.

◆ EXECVP_FUNCTION_NAME

#define EXECVP_FUNCTION_NAME   "execvp"

Definition at line 820 of file ri-util.h.

◆ EXECVPE_FUNCTION_NAME

#define EXECVPE_FUNCTION_NAME   "execvpe"

Definition at line 822 of file ri-util.h.

◆ EXIT_FUNCTION_NAME

#define EXIT_FUNCTION_NAME   "exit"

Definition at line 1029 of file ri-util.h.

◆ EXITHANDLE_FUNCTION_NAME

#define EXITHANDLE_FUNCTION_NAME   "exithandle"

Definition at line 1003 of file ri-util.h.

◆ EXP2_OPERATOR_NAME

#define EXP2_OPERATOR_NAME   "exp2"

Definition at line 641 of file ri-util.h.

◆ EXP2F_OPERATOR_NAME

#define EXP2F_OPERATOR_NAME   "exp2f"

Definition at line 642 of file ri-util.h.

◆ EXP2L_OPERATOR_NAME

#define EXP2L_OPERATOR_NAME   "exp2l"

Definition at line 643 of file ri-util.h.

◆ EXP_OPERATOR_NAME

#define EXP_OPERATOR_NAME   "EXP"

Definition at line 145 of file ri-util.h.

◆ EXPF_OPERATOR_NAME

#define EXPF_OPERATOR_NAME   "expf"

Definition at line 639 of file ri-util.h.

◆ EXPL_OPERATOR_NAME

#define EXPL_OPERATOR_NAME   "expl"

Definition at line 640 of file ri-util.h.

◆ EXPM1_OPERATOR_NAME

#define EXPM1_OPERATOR_NAME   "expm1"

Definition at line 644 of file ri-util.h.

◆ EXPM1F_OPERATOR_NAME

#define EXPM1F_OPERATOR_NAME   "expm1f"

Definition at line 645 of file ri-util.h.

◆ EXPM1L_OPERATOR_NAME

#define EXPM1L_OPERATOR_NAME   "expm1l"

Definition at line 646 of file ri-util.h.

◆ expression_scalar_p

#define expression_scalar_p (   e)    (expression_reference_p((e)) && reference_scalar_p(expression_reference((e))))

Definition at line 2303 of file ri-util.h.

◆ EXTENDED_TO_DECIMAL_OPERATOR_NAME

#define EXTENDED_TO_DECIMAL_OPERATOR_NAME   "extended_to_decimal"

Definition at line 1210 of file ri-util.h.

◆ FABS_OPERATOR_NAME

#define FABS_OPERATOR_NAME   "fabs"

Definition at line 680 of file ri-util.h.

◆ FABSF_OPERATOR_NAME

#define FABSF_OPERATOR_NAME   "fabsf"

Definition at line 681 of file ri-util.h.

◆ FABSL_OPERATOR_NAME

#define FABSL_OPERATOR_NAME   "fabsl"

Definition at line 682 of file ri-util.h.

◆ FAKE_SUFFIX

#define FAKE_SUFFIX   "9"

Definition at line 1905 of file ri-util.h.

◆ FALSE_OPERATOR_NAME

#define FALSE_OPERATOR_NAME   ".FALSE."

Definition at line 265 of file ri-util.h.

◆ FCD_IGNORE_PREFIX

#define FCD_IGNORE_PREFIX   "HPFC_IGNORE_FCD_"

property prefix for ignoring FCD directives TIME, SYNCHRO and SET exists.

Definition at line 1910 of file ri-util.h.

◆ FCHDIR_FUNCTION_NAME

#define FCHDIR_FUNCTION_NAME   "fchdir"

Definition at line 808 of file ri-util.h.

◆ FCHOWN_FUNCTION_NAME

#define FCHOWN_FUNCTION_NAME   "fchown"

Definition at line 804 of file ri-util.h.

◆ FCHOWNAT_FUNCTION_NAME

#define FCHOWNAT_FUNCTION_NAME   "fchownat"

Definition at line 806 of file ri-util.h.

◆ FCLOSE_FUNCTION_NAME

#define FCLOSE_FUNCTION_NAME   "fclose"

Definition at line 933 of file ri-util.h.

◆ FCNTL_FUNCTION_NAME

#define FCNTL_FUNCTION_NAME   "fcntl"

include <fcntl.h>

Definition at line 1171 of file ri-util.h.

◆ FCONVERT_OPERATOR_NAME

#define FCONVERT_OPERATOR_NAME   "fconvert"

Definition at line 1223 of file ri-util.h.

◆ FCVT_FUNCTION_NAME

#define FCVT_FUNCTION_NAME   "fcvt"

Definition at line 410 of file ri-util.h.

◆ FDATASYNC_FUNCTION_NAME [1/2]

#define FDATASYNC_FUNCTION_NAME   "fdatasync"

Definition at line 1179 of file ri-util.h.

◆ FDATASYNC_FUNCTION_NAME [2/2]

#define FDATASYNC_FUNCTION_NAME   "fdatasync"

Definition at line 1179 of file ri-util.h.

◆ FDIM_OPERATOR_NAME

#define FDIM_OPERATOR_NAME   "fdim"

Definition at line 753 of file ri-util.h.

◆ FDIMF_OPERATOR_NAME

#define FDIMF_OPERATOR_NAME   "fdimf"

Definition at line 754 of file ri-util.h.

◆ FDIML_OPERATOR_NAME

#define FDIML_OPERATOR_NAME   "fdiml"

Definition at line 755 of file ri-util.h.

◆ FDOPEN_FUNCTION_NAME [1/2]

#define FDOPEN_FUNCTION_NAME   "fdopen"

Definition at line 985 of file ri-util.h.

◆ FDOPEN_FUNCTION_NAME [2/2]

#define FDOPEN_FUNCTION_NAME   "fdopen"

Definition at line 985 of file ri-util.h.

◆ FECLEAREXCEPT_FUNCTION_NAME

#define FECLEAREXCEPT_FUNCTION_NAME   "feclearexcept"

include <fenv.h>

Definition at line 575 of file ri-util.h.

◆ FEGETROUND_FUNCTION_NAME

#define FEGETROUND_FUNCTION_NAME   "fegetround"

Definition at line 579 of file ri-util.h.

◆ FEOF_FUNCTION_NAME

#define FEOF_FUNCTION_NAME   "feof"

Definition at line 967 of file ri-util.h.

◆ FERAISEEXCEPT_FUNCTION_NAME

#define FERAISEEXCEPT_FUNCTION_NAME   "feraiseexcept"

Definition at line 576 of file ri-util.h.

◆ FERROR_FUNCTION_NAME

#define FERROR_FUNCTION_NAME   "ferror"

Definition at line 968 of file ri-util.h.

◆ FESETEXCEPTFLAG_FUNCTION_NAME

#define FESETEXCEPTFLAG_FUNCTION_NAME   "fesetexceptflag"

Definition at line 577 of file ri-util.h.

◆ FESETROUND_FUNCTION_NAME

#define FESETROUND_FUNCTION_NAME   "fesetround"

Definition at line 580 of file ri-util.h.

◆ FETESTEXCEPT_FUNCTION_NAME

#define FETESTEXCEPT_FUNCTION_NAME   "fetestexcept"

Definition at line 578 of file ri-util.h.

◆ FEXECVE_FUNCTION_NAME

#define FEXECVE_FUNCTION_NAME   "fexecve"

Definition at line 816 of file ri-util.h.

◆ FFLUSH_FUNCTION_NAME

#define FFLUSH_FUNCTION_NAME   "fflush"

Definition at line 977 of file ri-util.h.

◆ FGETC_FUNCTION_NAME

#define FGETC_FUNCTION_NAME   "fgetc"

Definition at line 929 of file ri-util.h.

◆ FGETPOS64_FUNCTION_NAME

#define FGETPOS64_FUNCTION_NAME   "fgetpos64"

Definition at line 999 of file ri-util.h.

◆ FGETPOS_FUNCTION_NAME

#define FGETPOS_FUNCTION_NAME   "fgetpos"

Definition at line 961 of file ri-util.h.

◆ FGETS_FUNCTION_NAME

#define FGETS_FUNCTION_NAME   "fgets"

Definition at line 927 of file ri-util.h.

◆ FGETWC_FUNCTION_NAME

#define FGETWC_FUNCTION_NAME   "fgetwc"

Definition at line 1098 of file ri-util.h.

◆ FGETWS_FUNCTION_NAME

#define FGETWS_FUNCTION_NAME   "fgetws"

Definition at line 1099 of file ri-util.h.

◆ FIELD_OPERATOR_NAME

#define FIELD_OPERATOR_NAME   "."

Definition at line 99 of file ri-util.h.

◆ FILE_TO_DECIMAL_OPERATOR_NAME

#define FILE_TO_DECIMAL_OPERATOR_NAME   "file_to_decimal"

Definition at line 1218 of file ri-util.h.

◆ FILENO_FUNCTION_NAME [1/2]

#define FILENO_FUNCTION_NAME   "fileno"

Definition at line 987 of file ri-util.h.

◆ FILENO_FUNCTION_NAME [2/2]

#define FILENO_FUNCTION_NAME   "fileno"

Definition at line 987 of file ri-util.h.

◆ FLOAT_GENERIC_CONVERSION_NAME

#define FLOAT_GENERIC_CONVERSION_NAME   "FLOAT"

Definition at line 232 of file ri-util.h.

◆ FLOOR_OPERATOR_NAME

#define FLOOR_OPERATOR_NAME   "floor"

Definition at line 708 of file ri-util.h.

◆ FLOORF_OPERATOR_NAME

#define FLOORF_OPERATOR_NAME   "floorf"

Definition at line 709 of file ri-util.h.

◆ FLOORL_OPERATOR_NAME

#define FLOORL_OPERATOR_NAME   "floorl"

Definition at line 710 of file ri-util.h.

◆ FMA_OPERATOR_NAME

#define FMA_OPERATOR_NAME   "fma"

Definition at line 762 of file ri-util.h.

◆ FMAF_OPERATOR_NAME

#define FMAF_OPERATOR_NAME   "fmaf"

Definition at line 763 of file ri-util.h.

◆ FMAL_OPERATOR_NAME

#define FMAL_OPERATOR_NAME   "fmal"

Definition at line 764 of file ri-util.h.

◆ FMAX_OPERATOR_NAME

#define FMAX_OPERATOR_NAME   "fmax"

Definition at line 756 of file ri-util.h.

◆ FMAXF_OPERATOR_NAME

#define FMAXF_OPERATOR_NAME   "fmaxf"

Definition at line 757 of file ri-util.h.

◆ FMAXL_OPERATOR_NAME

#define FMAXL_OPERATOR_NAME   "fmaxl"

Definition at line 758 of file ri-util.h.

◆ FMIN_OPERATOR_NAME

#define FMIN_OPERATOR_NAME   "fmin"

Definition at line 759 of file ri-util.h.

◆ FMINF_OPERATOR_NAME

#define FMINF_OPERATOR_NAME   "fminf"

Definition at line 760 of file ri-util.h.

◆ FMINL_OPERATOR_NAME

#define FMINL_OPERATOR_NAME   "fminl"

Definition at line 761 of file ri-util.h.

◆ FMOD_OPERATOR_NAME

#define FMOD_OPERATOR_NAME   "fmod"

Definition at line 735 of file ri-util.h.

◆ FMODF_OPERATOR_NAME

#define FMODF_OPERATOR_NAME   "fmodf"

Definition at line 736 of file ri-util.h.

◆ FMODL_OPERATOR_NAME

#define FMODL_OPERATOR_NAME   "fmodl"

Definition at line 737 of file ri-util.h.

◆ FOPEN64_FUNCTION_NAME

#define FOPEN64_FUNCTION_NAME   "fopen64"

Definition at line 996 of file ri-util.h.

◆ FOPEN_FUNCTION_NAME

#define FOPEN_FUNCTION_NAME   "fopen"

Definition at line 930 of file ri-util.h.

◆ FORK_FUNCTION_NAME

#define FORK_FUNCTION_NAME   "fork"

Definition at line 854 of file ri-util.h.

◆ FORMAT_FUNCTION_NAME

#define FORMAT_FUNCTION_NAME   "FORMAT"

Definition at line 309 of file ri-util.h.

◆ FPATHCONF_FUNCTION_NAME

#define FPATHCONF_FUNCTION_NAME   "fpathconf"

Definition at line 826 of file ri-util.h.

◆ FPCLASSIFY_OPERATOR_NAME

#define FPCLASSIFY_OPERATOR_NAME   "fpclassify"

include <math.h>

Definition at line 591 of file ri-util.h.

◆ FPRINTF_FUNCTION_NAME

#define FPRINTF_FUNCTION_NAME   "fprintf"

Definition at line 917 of file ri-util.h.

◆ FPUTC_FUNCTION_NAME

#define FPUTC_FUNCTION_NAME   "fputc"

Definition at line 928 of file ri-util.h.

◆ FPUTS_FUNCTION_NAME

#define FPUTS_FUNCTION_NAME   "fputs"

Definition at line 926 of file ri-util.h.

◆ FPUTWC_FUNCTION_NAME

#define FPUTWC_FUNCTION_NAME   "fputwc"

Definition at line 1100 of file ri-util.h.

◆ FPUTWS_FUNCTION_NAME

#define FPUTWS_FUNCTION_NAME   "fputws"

Definition at line 1101 of file ri-util.h.

◆ FREAD_FUNCTION_NAME

#define FREAD_FUNCTION_NAME   "fread"

Definition at line 959 of file ri-util.h.

◆ FREE_FUNCTION_NAME

#define FREE_FUNCTION_NAME   "free"

Definition at line 1023 of file ri-util.h.

◆ FREOPEN64_FUNCTION_NAME

#define FREOPEN64_FUNCTION_NAME   "freopen64"

Definition at line 997 of file ri-util.h.

◆ FREOPEN_FUNCTION_NAME [1/2]

#define FREOPEN_FUNCTION_NAME   "freopen"

Definition at line 978 of file ri-util.h.

◆ FREOPEN_FUNCTION_NAME [2/2]

#define FREOPEN_FUNCTION_NAME   "freopen"

Definition at line 978 of file ri-util.h.

◆ FREXP_OPERATOR_NAME

#define FREXP_OPERATOR_NAME   "frexp"

Definition at line 647 of file ri-util.h.

◆ FSCANF_FUNCTION_NAME

#define FSCANF_FUNCTION_NAME   "fscanf"

Definition at line 921 of file ri-util.h.

◆ FSEEK_FUNCTION_NAME

#define FSEEK_FUNCTION_NAME   "fseek"

Definition at line 962 of file ri-util.h.

◆ FSEEKO64_FUNCTION_NAME

#define FSEEKO64_FUNCTION_NAME   "fseeko64"

Definition at line 1001 of file ri-util.h.

◆ FSEEKO_FUNCTION_NAME

#define FSEEKO_FUNCTION_NAME   "fseeko"

Definition at line 994 of file ri-util.h.

◆ FSETPOS64_FUNCTION_NAME

#define FSETPOS64_FUNCTION_NAME   "fsetpos64"

Definition at line 1000 of file ri-util.h.

◆ FSETPOS_FUNCTION_NAME

#define FSETPOS_FUNCTION_NAME   "fsetpos"

Definition at line 963 of file ri-util.h.

◆ FSTAT_FUNCTION_NAME

#define FSTAT_FUNCTION_NAME   "fstat"

Definition at line 1184 of file ri-util.h.

◆ FSYNC_FUNCTION_NAME [1/2]

#define FSYNC_FUNCTION_NAME   "fsync"

fcntl is declared with fcntl.h

Definition at line 1178 of file ri-util.h.

◆ FSYNC_FUNCTION_NAME [2/2]

#define FSYNC_FUNCTION_NAME   "fsync"

fcntl is declared with fcntl.h

Definition at line 1178 of file ri-util.h.

◆ FTELL_FUNCTION_NAME

#define FTELL_FUNCTION_NAME   "ftell"

Definition at line 964 of file ri-util.h.

◆ FTELLO64_FUNCTION_NAME

#define FTELLO64_FUNCTION_NAME   "ftello64"

Definition at line 1002 of file ri-util.h.

◆ FTELLO_FUNCTION_NAME

#define FTELLO_FUNCTION_NAME   "ftello"

Definition at line 995 of file ri-util.h.

◆ FTRUNCATE64_FUNCTION_NAME

#define FTRUNCATE64_FUNCTION_NAME   "ftruncate64"

Definition at line 897 of file ri-util.h.

◆ FTRUNCATE_FUNCTION_NAME

#define FTRUNCATE_FUNCTION_NAME   "ftruncate"

Definition at line 896 of file ri-util.h.

◆ FUNC_TO_DECIMAL_OPERATOR_NAME

#define FUNC_TO_DECIMAL_OPERATOR_NAME   "func_to_decimal"

Definition at line 1217 of file ri-util.h.

◆ FWIDE_FUNCTION_NAME

#define FWIDE_FUNCTION_NAME   "fwide"

Definition at line 1102 of file ri-util.h.

◆ FWPRINTF_FUNCTION_NAME

#define FWPRINTF_FUNCTION_NAME   "fwprintf"

include <wchar.h>

Definition at line 1086 of file ri-util.h.

◆ FWRITE_FUNCTION_NAME

#define FWRITE_FUNCTION_NAME   "fwrite"

Definition at line 960 of file ri-util.h.

◆ FWSCANF_FUNCTION_NAME

#define FWSCANF_FUNCTION_NAME   "fwscanf"

Definition at line 1087 of file ri-util.h.

◆ GAMMA_OPERATOR_NAME

#define GAMMA_OPERATOR_NAME   "gamma"

Definition at line 698 of file ri-util.h.

◆ GCC_CIMAG_OPERATOR_NAME

#define GCC_CIMAG_OPERATOR_NAME   "__imag__"

Definition at line 528 of file ri-util.h.

◆ GCC_CREAL_OPERATOR_NAME

#define GCC_CREAL_OPERATOR_NAME   "__real__"

Definition at line 538 of file ri-util.h.

◆ GCONVERT_OPERATOR_NAME

#define GCONVERT_OPERATOR_NAME   "gconvert"

Definition at line 1224 of file ri-util.h.

◆ GCVT_FUNCTION_NAME

#define GCVT_FUNCTION_NAME   "gcvt"

Definition at line 411 of file ri-util.h.

◆ ge_expression

#define ge_expression (   e1,
  e2 
)     binary_intrinsic_expression(GREATER_OR_EQUAL_OPERATOR_NAME, e1, e2)

Definition at line 1824 of file ri-util.h.

◆ GENERATED_LABEL_MODULE_NAME

#define GENERATED_LABEL_MODULE_NAME   "__GENSYM"

Definition at line 2314 of file ri-util.h.

◆ GET_CURRENT_DIR_NAME_FUNCTION_NAME

#define GET_CURRENT_DIR_NAME_FUNCTION_NAME   "get_current_dir_name"

Definition at line 810 of file ri-util.h.

◆ GETC_FUNCTION_NAME

#define GETC_FUNCTION_NAME   "getc"

Definition at line 952 of file ri-util.h.

◆ GETCHAR_FUNCTION_NAME

#define GETCHAR_FUNCTION_NAME   "getchar"

Definition at line 954 of file ri-util.h.

◆ GETCWD_FUNCTION_NAME [1/2]

#define GETCWD_FUNCTION_NAME   "getcwd"

Definition at line 809 of file ri-util.h.

◆ GETCWD_FUNCTION_NAME [2/2]

#define GETCWD_FUNCTION_NAME   "getcwd"

Definition at line 809 of file ri-util.h.

◆ GETDATE_FUNCTION_NAME

#define GETDATE_FUNCTION_NAME   "getdate"

Definition at line 389 of file ri-util.h.

◆ GETDATE_R_FUNCTION_NAME

#define GETDATE_R_FUNCTION_NAME   "getdate_r"

Definition at line 390 of file ri-util.h.

◆ GETDOMAINNAME_FUNCTION_NAME

#define GETDOMAINNAME_FUNCTION_NAME   "getdomainname"

Definition at line 877 of file ri-util.h.

◆ GETDTABLESIZE_FUNCTION_NAME

#define GETDTABLESIZE_FUNCTION_NAME   "getdtablesize"

Definition at line 893 of file ri-util.h.

◆ GETEGID_FUNCTION_NAME

#define GETEGID_FUNCTION_NAME   "getegid"

Definition at line 841 of file ri-util.h.

◆ GETENV_FUNCTION_NAME

#define GETENV_FUNCTION_NAME   "getenv"

Definition at line 1031 of file ri-util.h.

◆ GETEUID_FUNCTION_NAME

#define GETEUID_FUNCTION_NAME   "geteuid"

Definition at line 839 of file ri-util.h.

◆ GETEXECNAME_FUNCTION_NAME

#define GETEXECNAME_FUNCTION_NAME   "getexecname"

Definition at line 428 of file ri-util.h.

◆ GETGID_FUNCTION_NAME

#define GETGID_FUNCTION_NAME   "getgid"

Definition at line 840 of file ri-util.h.

◆ GETHOSTID_FUNCTION_NAME

#define GETHOSTID_FUNCTION_NAME   "gethostid"

Definition at line 891 of file ri-util.h.

◆ GETHOSTNAME_FUNCTION_NAME

#define GETHOSTNAME_FUNCTION_NAME   "gethostname"

Definition at line 874 of file ri-util.h.

◆ GETLOGIN_FUNCTION_NAME [1/2]

#define GETLOGIN_FUNCTION_NAME   "getlogin"

Definition at line 871 of file ri-util.h.

◆ GETLOGIN_FUNCTION_NAME [2/2]

#define GETLOGIN_FUNCTION_NAME   "getlogin"

Definition at line 871 of file ri-util.h.

◆ GETLOGIN_R_FUNCTION_NAME

#define GETLOGIN_R_FUNCTION_NAME   "getlogin_r"

Definition at line 872 of file ri-util.h.

◆ GETOPT_FUNCTION_NAME

#define GETOPT_FUNCTION_NAME   "getopt"

Definition at line 430 of file ri-util.h.

◆ GETOPT_LONG_FUNCTION_NAME

#define GETOPT_LONG_FUNCTION_NAME   "getopt_long"

Definition at line 431 of file ri-util.h.

◆ GETOPT_LONG_ONLY_FUNCTION_NAME

#define GETOPT_LONG_ONLY_FUNCTION_NAME   "getopt_long_only"

Definition at line 432 of file ri-util.h.

◆ GETPAGESIZE_FUNCTION_NAME

#define GETPAGESIZE_FUNCTION_NAME   "getpagesize"

Definition at line 892 of file ri-util.h.

◆ GETPASS_FUNCTION_NAME [1/2]

#define GETPASS_FUNCTION_NAME   "getpass"

Definition at line 888 of file ri-util.h.

◆ GETPASS_FUNCTION_NAME [2/2]

#define GETPASS_FUNCTION_NAME   "getpass"

Definition at line 888 of file ri-util.h.

◆ GETPASSPHRASE_FUNCTION_NAME

#define GETPASSPHRASE_FUNCTION_NAME   "getpassphrase"

Definition at line 434 of file ri-util.h.

◆ GETPGID_FUNCTION_NAME

#define GETPGID_FUNCTION_NAME   "getpgid"

Definition at line 833 of file ri-util.h.

◆ GETPGROUPS_FUNCTION_NAME

#define GETPGROUPS_FUNCTION_NAME   "getgroups"

Definition at line 842 of file ri-util.h.

◆ GETPGRP_FUNCTION_NAME

#define GETPGRP_FUNCTION_NAME   "getpgrp"

Definition at line 831 of file ri-util.h.

◆ GETPID_FUNCTION_NAME

#define GETPID_FUNCTION_NAME   "getpid"

Definition at line 829 of file ri-util.h.

◆ GETPPID_FUNCTION_NAME

#define GETPPID_FUNCTION_NAME   "getppid"

Definition at line 830 of file ri-util.h.

◆ GETPW_FUNCTION_NAME

#define GETPW_FUNCTION_NAME   "getpw"

Definition at line 435 of file ri-util.h.

◆ GETRESGID_FUNCTION_NAME

#define GETRESGID_FUNCTION_NAME   "getresgid"

Definition at line 851 of file ri-util.h.

◆ GETRESUID_FUNCTION_NAME

#define GETRESUID_FUNCTION_NAME   "getresuid"

Definition at line 850 of file ri-util.h.

◆ GETS_FUNCTION_NAME

#define GETS_FUNCTION_NAME   "gets"

Definition at line 925 of file ri-util.h.

◆ GETSID_FUNCTION_NAME

#define GETSID_FUNCTION_NAME   "getsid"

Definition at line 837 of file ri-util.h.

◆ GETSUBOPT_FUNCTION_NAME

#define GETSUBOPT_FUNCTION_NAME   "getsubopt"

Definition at line 412 of file ri-util.h.

◆ GETTIMEOFDAY_FUNCTION_NAME

#define GETTIMEOFDAY_FUNCTION_NAME   "gettimeofday"

Definition at line 1232 of file ri-util.h.

◆ GETUID_FUNCTION_NAME

#define GETUID_FUNCTION_NAME   "getuid"

Definition at line 838 of file ri-util.h.

◆ GETUSERSHELL_FUNCTION_NAME

#define GETUSERSHELL_FUNCTION_NAME   "getusershell"

Definition at line 883 of file ri-util.h.

◆ GETW_FUNCTION_NAME

#define GETW_FUNCTION_NAME   "getw"

Definition at line 991 of file ri-util.h.

◆ GETWC_FUNCTION_NAME

#define GETWC_FUNCTION_NAME   "getwc"

Definition at line 1103 of file ri-util.h.

◆ GETWCHAR_FUNCTION_NAME

#define GETWCHAR_FUNCTION_NAME   "getwchar"

Definition at line 1104 of file ri-util.h.

◆ GETWD_FUNCTION_NAME

#define GETWD_FUNCTION_NAME   "getwd"

Definition at line 811 of file ri-util.h.

◆ GMTIME_FUNCTION_NAME

#define GMTIME_FUNCTION_NAME   "gmtime"

Definition at line 365 of file ri-util.h.

◆ GMTIME_R_FUNCTION_NAME

#define GMTIME_R_FUNCTION_NAME   "gmtime_r"

Definition at line 367 of file ri-util.h.

◆ GRANTPT_FUNCTION_NAME

#define GRANTPT_FUNCTION_NAME   "grantpt"

Definition at line 413 of file ri-util.h.

◆ GREATER_OR_EQUAL_OPERATOR_NAME

#define GREATER_OR_EQUAL_OPERATOR_NAME   ".GE."

Definition at line 269 of file ri-util.h.

◆ GREATER_THAN_OPERATOR_NAME

#define GREATER_THAN_OPERATOR_NAME   ".GT."

Definition at line 271 of file ri-util.h.

◆ GROUP_MEMBER_FUNCTION_NAME

#define GROUP_MEMBER_FUNCTION_NAME   "group_member"

Definition at line 843 of file ri-util.h.

◆ gt_expression

#define gt_expression (   e1,
  e2 
)     binary_intrinsic_expression(GREATER_THAN_OPERATOR_NAME, e1, e2)

Definition at line 1822 of file ri-util.h.

◆ hash_contains_p

#define hash_contains_p (   htp,
  key 
)    (hash_get(htp, key) != HASH_UNDEFINED_VALUE)

Definition at line 2304 of file ri-util.h.

◆ HOSTSECTION_SUFFIX

#define HOSTSECTION_SUFFIX   "7"

Definition at line 1903 of file ri-util.h.

◆ HPF_PREFIX

#define HPF_PREFIX   "HPFC"

moved here because needed by syntax:-(

Directive names encoding: HPF_PREFIX + one character. This encoding is achieved thru a sed script that transforms directives into calls that can be parsed by the PIPS F77 parser. It's a hack but it greatly reduced the number of lines for directive analysis, and it allowed quite simply to figure out where the executable directives are in the code. However the syntax allowed in mapping directives is restricted to F77. prefix for spacial directive calls

Definition at line 1870 of file ri-util.h.

◆ HPFCIO_SUFFIX

#define HPFCIO_SUFFIX   "6"

Definition at line 1902 of file ri-util.h.

◆ HYPOT_OPERATOR_NAME

#define HYPOT_OPERATOR_NAME   "hypot"

Definition at line 683 of file ri-util.h.

◆ HYPOTF_OPERATOR_NAME

#define HYPOTF_OPERATOR_NAME   "hypotf"

Definition at line 684 of file ri-util.h.

◆ HYPOTL_OPERATOR_NAME

#define HYPOTL_OPERATOR_NAME   "hypotl"

Definition at line 685 of file ri-util.h.

◆ IABS_OPERATOR_NAME

#define IABS_OPERATOR_NAME   "IABS"

Definition at line 214 of file ri-util.h.

◆ IAND_OPERATOR_NAME

#define IAND_OPERATOR_NAME   "IAND"

Definition at line 321 of file ri-util.h.

◆ IBCLR_OPERATOR_NAME

#define IBCLR_OPERATOR_NAME   "IBCLR"

Definition at line 319 of file ri-util.h.

◆ IBITS_OPERATOR_NAME

#define IBITS_OPERATOR_NAME   "IBITS"

Definition at line 315 of file ri-util.h.

◆ IBSET_OPERATOR_NAME

#define IBSET_OPERATOR_NAME   "IBSET"

Definition at line 318 of file ri-util.h.

◆ IDIM_OPERATOR_NAME

#define IDIM_OPERATOR_NAME   "IDIM"

Definition at line 136 of file ri-util.h.

◆ IDINT_GENERIC_CONVERSION_NAME

#define IDINT_GENERIC_CONVERSION_NAME   "IDINT"

Definition at line 230 of file ri-util.h.

◆ IDNINT_CONVERSION_NAME

#define IDNINT_CONVERSION_NAME   "IDNINT"

Definition at line 248 of file ri-util.h.

◆ IEOR_OPERATOR_NAME

#define IEOR_OPERATOR_NAME   "IEOR"

Definition at line 322 of file ri-util.h.

◆ IFIX_GENERIC_CONVERSION_NAME

#define IFIX_GENERIC_CONVERSION_NAME   "IFIX"

Definition at line 229 of file ri-util.h.

◆ ILOGB_OPERATOR_NAME

#define ILOGB_OPERATOR_NAME   "ilogb"

Definition at line 648 of file ri-util.h.

◆ ILOGBF_OPERATOR_NAME

#define ILOGBF_OPERATOR_NAME   "ilogbf"

Definition at line 649 of file ri-util.h.

◆ ILOGBL_OPERATOR_NAME

#define ILOGBL_OPERATOR_NAME   "ilogbl"

Definition at line 650 of file ri-util.h.

◆ IMA_OPERATOR_NAME

#define IMA_OPERATOR_NAME   "IMA-OP"

Integer Multiply Add and Sub, FC 27/10/2005 for FI.

Definition at line 1249 of file ri-util.h.

◆ IMAXABS_FUNCTION_NAME

#define IMAXABS_FUNCTION_NAME   "imaxabs"

include <inttypes.h>

Definition at line 583 of file ri-util.h.

◆ IMAXDIV_FUNCTION_NAME

#define IMAXDIV_FUNCTION_NAME   "imaxdiv"

Definition at line 584 of file ri-util.h.

◆ IMPLICIT_VARIABLE_NAME_1

#define IMPLICIT_VARIABLE_NAME_1   "__FUNCTION__"

Implicit variable names for C.

Definition at line 2039 of file ri-util.h.

◆ IMPLICIT_VARIABLE_NAME_2

#define IMPLICIT_VARIABLE_NAME_2   "__func__"

Definition at line 2040 of file ri-util.h.

◆ IMPLIED_COMPLEX_NAME

#define IMPLIED_COMPLEX_NAME   "CMPLX_"

Definition at line 96 of file ri-util.h.

◆ IMPLIED_DCOMPLEX_NAME

#define IMPLIED_DCOMPLEX_NAME   "DCMPLX_"

Definition at line 97 of file ri-util.h.

◆ IMPLIED_DO_FUNCTION_NAME

#define IMPLIED_DO_FUNCTION_NAME   "IMPLIED-DO"

Definition at line 84 of file ri-util.h.

◆ IMPLIED_DO_NAME

#define IMPLIED_DO_NAME   "IMPLIED-DO"

Definition at line 83 of file ri-util.h.

◆ IMS_OPERATOR_NAME

#define IMS_OPERATOR_NAME   "IMS-OP"

Definition at line 1250 of file ri-util.h.

◆ INDENT_A_LIST_OF_WORDS

#define INDENT_A_LIST_OF_WORDS (   list_of_words)
Value:
{ \
if(list_of_words) { \
list blanks = NIL; \
for(int i=0; i<INDENTATION; i++) { \
blanks = CHAIN_SWORD(blanks, " "); \
} \
list_of_words = gen_nconc(blanks,list_of_words); \
} \
}
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
Definition: list.c:344
#define INDENTATION
Definition: ri-util.h:1715
#define CHAIN_SWORD(l, s)

Definition at line 1716 of file ri-util.h.

◆ INDENTATION

#define INDENTATION   (get_int_property("PRETTYPRINT_INDENTATION"))

Definition at line 1715 of file ri-util.h.

◆ INDEPENDENT_SUFFIX

#define INDEPENDENT_SUFFIX   "I"

Definition at line 1884 of file ri-util.h.

◆ INDEX_OPERATOR_NAME

#define INDEX_OPERATOR_NAME   "INDEX"

Definition at line 220 of file ri-util.h.

◆ INITSTATE_FUNCTION_NAME

#define INITSTATE_FUNCTION_NAME   "initstate"

Definition at line 414 of file ri-util.h.

◆ INQUIRE_FUNCTION_NAME

#define INQUIRE_FUNCTION_NAME   "INQUIRE"

Definition at line 303 of file ri-util.h.

◆ INSTANCE_OF

#define INSTANCE_OF (   type,
  value 
)    ( (_int)((value)->u) == (_int)(type##_domain) )

polymorhism thanks to newgen !

Definition at line 2299 of file ri-util.h.

◆ instruction_block

#define instruction_block (   i)    sequence_statements(instruction_sequence(i))

Definition at line 1920 of file ri-util.h.

◆ instruction_block_p

#define instruction_block_p (   i)    instruction_sequence_p(i)

Definition at line 1919 of file ri-util.h.

◆ INT_GENERIC_CONVERSION_NAME

#define INT_GENERIC_CONVERSION_NAME   "INT"

generic conversion names.

Definition at line 228 of file ri-util.h.

◆ INT_TO_CHAR_CONVERSION_NAME

#define INT_TO_CHAR_CONVERSION_NAME   "CHAR"

Definition at line 240 of file ri-util.h.

◆ INVERSE_OPERATOR_NAME

#define INVERSE_OPERATOR_NAME   "_INV_" /**internal stuff */

Definition at line 127 of file ri-util.h.

◆ IO_CALL_P

#define IO_CALL_P (   call)    io_intrinsic_p(call_function(call))

Definition at line 1682 of file ri-util.h.

◆ IO_EFFECTS_ARRAY_NAME

#define IO_EFFECTS_ARRAY_NAME   "LUNS"

array of Logical UNits; it is more or less handled as the current file pointer; in C, used for open, close, read, write...

Definition at line 2004 of file ri-util.h.

◆ IO_EFFECTS_IO_FILE_NAME

#define IO_EFFECTS_IO_FILE_NAME   "IO_FILES"

Array of struct io_files pointed to by pointers returned by fopen and used by fclose, fscanf, fprintf...

Definition at line 2007 of file ri-util.h.

◆ IO_EFFECTS_PACKAGE_NAME

#define IO_EFFECTS_PACKAGE_NAME   "__IO_EFFECTS"

Implicit variables to handle IO effetcs.

package name for io routines

Definition at line 1988 of file ri-util.h.

◆ IO_EFFECTS_PTR_NAME

#define IO_EFFECTS_PTR_NAME   "_C_IO_ptr"

To express C IO intrinsics effects.

Definition at line 2009 of file ri-util.h.

◆ IO_EFFECTS_UNIT_SPECIFIER_LENGTH

#define IO_EFFECTS_UNIT_SPECIFIER_LENGTH   4

size of the unit specifier

Definition at line 2018 of file ri-util.h.

◆ IO_EOF_ARRAY_NAME

#define IO_EOF_ARRAY_NAME   "END_LUNS"

array of end of file codes

Definition at line 2011 of file ri-util.h.

◆ IO_ERROR_ARRAY_NAME

#define IO_ERROR_ARRAY_NAME   "ERR_LUNS"

array of error codes for LUNs

Definition at line 2013 of file ri-util.h.

◆ IO_LIST_STRING_NAME

#define IO_LIST_STRING_NAME   "IOLIST="

Definition at line 90 of file ri-util.h.

◆ IOCTL_FUNCTION_NAME

#define IOCTL_FUNCTION_NAME   "ioctl"

Definition at line 1180 of file ri-util.h.

◆ IOR_OPERATOR_NAME

#define IOR_OPERATOR_NAME   "IOR"

Definition at line 323 of file ri-util.h.

◆ is_instruction_block

#define is_instruction_block   is_instruction_sequence

soft block->sequence transition

Definition at line 1918 of file ri-util.h.

◆ ISALNUM_OPERATOR_NAME

#define ISALNUM_OPERATOR_NAME   "isalnum"

include <ctype.h>

Definition at line 545 of file ri-util.h.

◆ ISALPHA_OPERATOR_NAME

#define ISALPHA_OPERATOR_NAME   "isalpha"

Definition at line 546 of file ri-util.h.

◆ ISASCII_OPERATOR_NAME

#define ISASCII_OPERATOR_NAME   "isascii"

Definition at line 561 of file ri-util.h.

◆ ISATTY_FUNCTION_NAME [1/2]

#define ISATTY_FUNCTION_NAME   "isatty"

Definition at line 858 of file ri-util.h.

◆ ISATTY_FUNCTION_NAME [2/2]

#define ISATTY_FUNCTION_NAME   "isatty"

Definition at line 858 of file ri-util.h.

◆ ISBLANK_OPERATOR_NAME

#define ISBLANK_OPERATOR_NAME   "isblank"

Definition at line 547 of file ri-util.h.

◆ ISCNTRL_OPERATOR_NAME

#define ISCNTRL_OPERATOR_NAME   "iscntrl"

Definition at line 548 of file ri-util.h.

◆ ISDIGIT_OPERATOR_NAME

#define ISDIGIT_OPERATOR_NAME   "isdigit"

Definition at line 549 of file ri-util.h.

◆ ISFINITE_OPERATOR_NAME

#define ISFINITE_OPERATOR_NAME   "isfinite"

Definition at line 592 of file ri-util.h.

◆ ISGRAPH_OPERATOR_NAME

#define ISGRAPH_OPERATOR_NAME   "isgraph"

Definition at line 550 of file ri-util.h.

◆ ISGREATER_OPERATOR_NAME

#define ISGREATER_OPERATOR_NAME   "isgreater"

Definition at line 765 of file ri-util.h.

◆ ISGREATEREQUAL_OPERATOR_NAME

#define ISGREATEREQUAL_OPERATOR_NAME   "isgreaterequal"

Definition at line 766 of file ri-util.h.

◆ ISHFT_OPERATOR_NAME

#define ISHFT_OPERATOR_NAME   "ISHFT"

Bit manipulation functions.

Definition at line 313 of file ri-util.h.

◆ ISHFTC_OPERATOR_NAME

#define ISHFTC_OPERATOR_NAME   "ISHFTC"

Definition at line 314 of file ri-util.h.

◆ ISIGN_OPERATOR_NAME

#define ISIGN_OPERATOR_NAME   "ISIGN"

Definition at line 133 of file ri-util.h.

◆ ISINF_OPERATOR_NAME

#define ISINF_OPERATOR_NAME   "isinf"

Definition at line 593 of file ri-util.h.

◆ ISLESS_OPERATOR_NAME

#define ISLESS_OPERATOR_NAME   "isless"

Definition at line 767 of file ri-util.h.

◆ ISLESSEQUAL_OPERATOR_NAME

#define ISLESSEQUAL_OPERATOR_NAME   "islessequal"

Definition at line 768 of file ri-util.h.

◆ ISLESSGREATER_OPERATOR_NAME

#define ISLESSGREATER_OPERATOR_NAME   "islessgreater"

Definition at line 769 of file ri-util.h.

◆ ISLOWER_OPERATOR_NAME

#define ISLOWER_OPERATOR_NAME   "islower"

Definition at line 551 of file ri-util.h.

◆ ISNAN_OPERATOR_NAME

#define ISNAN_OPERATOR_NAME   "isnan"

Definition at line 594 of file ri-util.h.

◆ ISNANF_OPERATOR_NAME

#define ISNANF_OPERATOR_NAME   "isnanf"

Definition at line 596 of file ri-util.h.

◆ ISNANL_OPERATOR_NAME

#define ISNANL_OPERATOR_NAME   "isnanl"

Definition at line 595 of file ri-util.h.

◆ ISNORMAL_OPERATOR_NAME

#define ISNORMAL_OPERATOR_NAME   "isnormal"

Definition at line 597 of file ri-util.h.

◆ ISOC99_FSCANF_FUNCTION_NAME

#define ISOC99_FSCANF_FUNCTION_NAME   "__isoc99_fscanf"

Definition at line 922 of file ri-util.h.

◆ ISOC99_FSCANF_USER_FUNCTION_NAME

#define ISOC99_FSCANF_USER_FUNCTION_NAME   "fscanf"

Definition at line 923 of file ri-util.h.

◆ ISOC99_SCANF_FUNCTION_NAME

#define ISOC99_SCANF_FUNCTION_NAME   "__isoc99_scanf"

Definition at line 919 of file ri-util.h.

◆ ISOC99_SCANF_USER_FUNCTION_NAME

#define ISOC99_SCANF_USER_FUNCTION_NAME   "scanf"

Definition at line 920 of file ri-util.h.

◆ ISOC99_SSCANF_FUNCTION_NAME

#define ISOC99_SSCANF_FUNCTION_NAME   "__isoc99_sscanf"

Definition at line 936 of file ri-util.h.

◆ ISOC99_SSCANF_USER_FUNCTION_NAME

#define ISOC99_SSCANF_USER_FUNCTION_NAME   "sscanf"

Definition at line 937 of file ri-util.h.

◆ ISOC99_VFSCANF_FUNCTION_NAME

#define ISOC99_VFSCANF_FUNCTION_NAME   "__isoc99_vfscanf"

Definition at line 940 of file ri-util.h.

◆ ISOC99_VFSCANF_USER_FUNCTION_NAME

#define ISOC99_VFSCANF_USER_FUNCTION_NAME   "vfscanf"

Definition at line 941 of file ri-util.h.

◆ ISOC99_VSCANF_FUNCTION_NAME

#define ISOC99_VSCANF_FUNCTION_NAME   "__isoc99_vscanf"

Definition at line 944 of file ri-util.h.

◆ ISOC99_VSCANF_USER_FUNCTION_NAME

#define ISOC99_VSCANF_USER_FUNCTION_NAME   "vscanf"

Definition at line 945 of file ri-util.h.

◆ ISOC99_VSSCANF_FUNCTION_NAME

#define ISOC99_VSSCANF_FUNCTION_NAME   "__isoc99_vsscanf"

Definition at line 947 of file ri-util.h.

◆ ISOC99_VSSCANF_USER_FUNCTION_NAME

#define ISOC99_VSSCANF_USER_FUNCTION_NAME   "vsscanf"

Definition at line 948 of file ri-util.h.

◆ ISPRINT_OPERATOR_NAME

#define ISPRINT_OPERATOR_NAME   "isprint"

Definition at line 552 of file ri-util.h.

◆ ISPUNCT_OPERATOR_NAME

#define ISPUNCT_OPERATOR_NAME   "ispunct"

Definition at line 553 of file ri-util.h.

◆ ISSPACE_OPERATOR_NAME

#define ISSPACE_OPERATOR_NAME   "isspace"

Definition at line 554 of file ri-util.h.

◆ ISUNORDERED_OPERATOR_NAME

#define ISUNORDERED_OPERATOR_NAME   "isunordered"

Definition at line 770 of file ri-util.h.

◆ ISUPPER_OPERATOR_NAME

#define ISUPPER_OPERATOR_NAME   "isupper"

Definition at line 555 of file ri-util.h.

◆ ISWALNUM_OPERATOR_NAME

#define ISWALNUM_OPERATOR_NAME   "iswalnum"

include <wctype.h>

Definition at line 1149 of file ri-util.h.

◆ ISWALPHA_OPERATOR_NAME

#define ISWALPHA_OPERATOR_NAME   "iswalpha"

Definition at line 1150 of file ri-util.h.

◆ ISWBLANK_OPERATOR_NAME

#define ISWBLANK_OPERATOR_NAME   "iswblank"

Definition at line 1151 of file ri-util.h.

◆ ISWCNTRL_OPERATOR_NAME

#define ISWCNTRL_OPERATOR_NAME   "iswcntrl"

Definition at line 1152 of file ri-util.h.

◆ ISWCTYPE_OPERATOR_NAME

#define ISWCTYPE_OPERATOR_NAME   "iswctype"

Definition at line 1161 of file ri-util.h.

◆ ISWDIGIT_OPERATOR_NAME

#define ISWDIGIT_OPERATOR_NAME   "iswdigit"

Definition at line 1153 of file ri-util.h.

◆ ISWGRAPH_OPERATOR_NAME

#define ISWGRAPH_OPERATOR_NAME   "iswgraph"

Definition at line 1154 of file ri-util.h.

◆ ISWLOWER_OPERATOR_NAME

#define ISWLOWER_OPERATOR_NAME   "iswlower"

Definition at line 1155 of file ri-util.h.

◆ ISWPRINT_OPERATOR_NAME

#define ISWPRINT_OPERATOR_NAME   "iswprint"

Definition at line 1156 of file ri-util.h.

◆ ISWPUNCT_OPERATOR_NAME

#define ISWPUNCT_OPERATOR_NAME   "iswpunct"

Definition at line 1157 of file ri-util.h.

◆ ISWSPACE_OPERATOR_NAME

#define ISWSPACE_OPERATOR_NAME   "iswspace"

Definition at line 1158 of file ri-util.h.

◆ ISWUPPER_OPERATOR_NAME

#define ISWUPPER_OPERATOR_NAME   "iswupper"

Definition at line 1159 of file ri-util.h.

◆ ISWXDIGIT_OPERATOR_NAME

#define ISWXDIGIT_OPERATOR_NAME   "iswxdigit"

Definition at line 1160 of file ri-util.h.

◆ ISXDIGIT_OPERATOR_NAME

#define ISXDIGIT_OPERATOR_NAME   "isxdigit"

Definition at line 556 of file ri-util.h.

◆ J0_OPERATOR_NAME

#define J0_OPERATOR_NAME   "j0"

Definition at line 1191 of file ri-util.h.

◆ J1_OPERATOR_NAME

#define J1_OPERATOR_NAME   "j1"

Definition at line 1192 of file ri-util.h.

◆ JN_OPERATOR_NAME

#define JN_OPERATOR_NAME   "jn"

Definition at line 1193 of file ri-util.h.

◆ JRAND48_FUNCTION_NAME

#define JRAND48_FUNCTION_NAME   "jrand48"

Definition at line 395 of file ri-util.h.

◆ LABEL_SIZE

#define LABEL_SIZE   5

constant sizes

Definition at line 1714 of file ri-util.h.

◆ LABS_FUNCTION_NAME

#define LABS_FUNCTION_NAME   "labs"

Definition at line 1036 of file ri-util.h.

◆ LCHOWN_FUNCTION_NAME

#define LCHOWN_FUNCTION_NAME   "lchown"

Definition at line 805 of file ri-util.h.

◆ LCONG48_FUNCTION_NAME

#define LCONG48_FUNCTION_NAME   "lcong48"

Definition at line 396 of file ri-util.h.

◆ LDEXP_OPERATOR_NAME

#define LDEXP_OPERATOR_NAME   "ldexp"

Definition at line 651 of file ri-util.h.

◆ LDEXPF_OPERATOR_NAME

#define LDEXPF_OPERATOR_NAME   "ldexpf"

Definition at line 652 of file ri-util.h.

◆ LDEXPL_OPERATOR_NAME

#define LDEXPL_OPERATOR_NAME   "ldexpl"

Definition at line 653 of file ri-util.h.

◆ LDIV_FUNCTION_NAME

#define LDIV_FUNCTION_NAME   "ldiv"

Definition at line 1039 of file ri-util.h.

◆ le_expression

#define le_expression (   e1,
  e2 
)     binary_intrinsic_expression(LESS_OR_EQUAL_OPERATOR_NAME, e1, e2)

Definition at line 1828 of file ri-util.h.

◆ LEFT_SHIFT_OPERATOR_NAME

#define LEFT_SHIFT_OPERATOR_NAME   "<<"

Definition at line 181 of file ri-util.h.

◆ LEFT_SHIFT_UPDATE_OPERATOR_NAME

#define LEFT_SHIFT_UPDATE_OPERATOR_NAME   "<<="

Definition at line 113 of file ri-util.h.

◆ LENGTH_OPERATOR_NAME

#define LENGTH_OPERATOR_NAME   "LEN"

Definition at line 219 of file ri-util.h.

◆ LESS_OR_EQUAL_OPERATOR_NAME

#define LESS_OR_EQUAL_OPERATOR_NAME   ".LE."

Definition at line 273 of file ri-util.h.

◆ LESS_THAN_OPERATOR_NAME

#define LESS_THAN_OPERATOR_NAME   ".LT."

Definition at line 275 of file ri-util.h.

◆ LGAMMA_OPERATOR_NAME

#define LGAMMA_OPERATOR_NAME   "lgamma"

Definition at line 699 of file ri-util.h.

◆ LGAMMAF_OPERATOR_NAME

#define LGAMMAF_OPERATOR_NAME   "lgammaf"

Definition at line 700 of file ri-util.h.

◆ LGAMMAL_OPERATOR_NAME

#define LGAMMAL_OPERATOR_NAME   "lgammal"

Definition at line 701 of file ri-util.h.

◆ LGE_OPERATOR_NAME

#define LGE_OPERATOR_NAME   "LGE"

Definition at line 221 of file ri-util.h.

◆ LGT_OPERATOR_NAME

#define LGT_OPERATOR_NAME   "LGT"

Definition at line 222 of file ri-util.h.

◆ LINK_FUNCTION_NAME

#define LINK_FUNCTION_NAME   "link"

Definition at line 860 of file ri-util.h.

◆ LINKAT_FUNCTION_NAME

#define LINKAT_FUNCTION_NAME   "linkat"

Definition at line 861 of file ri-util.h.

◆ LLABS_FUNCTION_NAME

#define LLABS_FUNCTION_NAME   "llabs"

Definition at line 1037 of file ri-util.h.

◆ LLDIV_FUNCTION_NAME

#define LLDIV_FUNCTION_NAME   "lldiv"

Definition at line 1040 of file ri-util.h.

◆ LLE_OPERATOR_NAME

#define LLE_OPERATOR_NAME   "LLE"

Definition at line 223 of file ri-util.h.

◆ LLRINT_OPERATOR_NAME

#define LLRINT_OPERATOR_NAME   "llrint"

Definition at line 720 of file ri-util.h.

◆ LLRINTF_OPERATOR_NAME

#define LLRINTF_OPERATOR_NAME   "llrintf"

Definition at line 721 of file ri-util.h.

◆ LLRINTL_OPERATOR_NAME

#define LLRINTL_OPERATOR_NAME   "llrintl"

Definition at line 722 of file ri-util.h.

◆ LLROUND_OPERATOR_NAME

#define LLROUND_OPERATOR_NAME   "llround"

Definition at line 729 of file ri-util.h.

◆ LLROUNDF_OPERATOR_NAME

#define LLROUNDF_OPERATOR_NAME   "llroundf"

Definition at line 730 of file ri-util.h.

◆ LLROUNDL_OPERATOR_NAME

#define LLROUNDL_OPERATOR_NAME   "llroundl"

Definition at line 731 of file ri-util.h.

◆ LLT_OPERATOR_NAME

#define LLT_OPERATOR_NAME   "LLT"

Definition at line 224 of file ri-util.h.

◆ LLTOSTR_FUNCTION_NAME

#define LLTOSTR_FUNCTION_NAME   "lltostr"

Definition at line 439 of file ri-util.h.

◆ LOCALTIME_FUNCTION_NAME [1/2]

#define LOCALTIME_FUNCTION_NAME   "localtime"

Definition at line 1080 of file ri-util.h.

◆ LOCALTIME_FUNCTION_NAME [2/2]

#define LOCALTIME_FUNCTION_NAME   "localtime"

Definition at line 1080 of file ri-util.h.

◆ LOCALTIME_R_FUNCTION_NAME

#define LOCALTIME_R_FUNCTION_NAME   "localtime_r"

Definition at line 368 of file ri-util.h.

◆ LOCKF64_FUNCTION_NAME

#define LOCKF64_FUNCTION_NAME   "lockf64"

Definition at line 902 of file ri-util.h.

◆ LOCKF_FUNCTION_NAME

#define LOCKF_FUNCTION_NAME   "lockf"

Definition at line 901 of file ri-util.h.

◆ LOG10_OPERATOR_NAME

#define LOG10_OPERATOR_NAME   "LOG10"

Definition at line 154 of file ri-util.h.

◆ LOG10F_OPERATOR_NAME

#define LOG10F_OPERATOR_NAME   "log10f"

Definition at line 658 of file ri-util.h.

◆ LOG10L_OPERATOR_NAME

#define LOG10L_OPERATOR_NAME   "log10l"

Definition at line 659 of file ri-util.h.

◆ LOG1P_OPERATOR_NAME

#define LOG1P_OPERATOR_NAME   "log1p"

Definition at line 660 of file ri-util.h.

◆ LOG1PF_OPERATOR_NAME

#define LOG1PF_OPERATOR_NAME   "log1pf"

Definition at line 661 of file ri-util.h.

◆ LOG1PL_OPERATOR_NAME

#define LOG1PL_OPERATOR_NAME   "log1pl"

Definition at line 662 of file ri-util.h.

◆ LOG2_OPERATOR_NAME

#define LOG2_OPERATOR_NAME   "log2"

Definition at line 663 of file ri-util.h.

◆ LOG2F_OPERATOR_NAME

#define LOG2F_OPERATOR_NAME   "log2f"

Definition at line 664 of file ri-util.h.

◆ LOG2L_OPERATOR_NAME

#define LOG2L_OPERATOR_NAME   "log2l"

Definition at line 665 of file ri-util.h.

◆ LOG_OPERATOR_NAME

#define LOG_OPERATOR_NAME   "LOG"

Definition at line 149 of file ri-util.h.

◆ LOGB_OPERATOR_NAME

#define LOGB_OPERATOR_NAME   "logb"

Definition at line 666 of file ri-util.h.

◆ LOGBF_OPERATOR_NAME

#define LOGBF_OPERATOR_NAME   "logbf"

Definition at line 667 of file ri-util.h.

◆ LOGBL_OPERATOR_NAME

#define LOGBL_OPERATOR_NAME   "logbl"

Definition at line 668 of file ri-util.h.

◆ LOGF_OPERATOR_NAME

#define LOGF_OPERATOR_NAME   "logf"

Definition at line 655 of file ri-util.h.

◆ LOGL_OPERATOR_NAME

#define LOGL_OPERATOR_NAME   "logl"

Definition at line 656 of file ri-util.h.

◆ LOOP_COUNTER_MODULE_NAME

#define LOOP_COUNTER_MODULE_NAME   "LOOP-COUNTER"

moved from ricedg-local.h

Definition at line 1255 of file ri-util.h.

◆ loop_to_instruction

#define loop_to_instruction   make_instruction_loop

Definition at line 1792 of file ri-util.h.

◆ loop_to_statement

#define loop_to_statement (   l)    instruction_to_statement(loop_to_instruction(l))

Definition at line 1796 of file ri-util.h.

◆ LRAND48_FUNCTION_NAME

#define LRAND48_FUNCTION_NAME   "lrand48"

Definition at line 397 of file ri-util.h.

◆ LRINT_OPERATOR_NAME

#define LRINT_OPERATOR_NAME   "lrint"

Definition at line 717 of file ri-util.h.

◆ LRINTF_OPERATOR_NAME

#define LRINTF_OPERATOR_NAME   "lrintf"

Definition at line 718 of file ri-util.h.

◆ LRINTL_OPERATOR_NAME

#define LRINTL_OPERATOR_NAME   "lrintl"

Definition at line 719 of file ri-util.h.

◆ LROUND_OPERATOR_NAME

#define LROUND_OPERATOR_NAME   "lround"

Definition at line 726 of file ri-util.h.

◆ LROUNDF_OPERATOR_NAME

#define LROUNDF_OPERATOR_NAME   "lroundf"

Definition at line 727 of file ri-util.h.

◆ LROUNDL_OPERATOR_NAME

#define LROUNDL_OPERATOR_NAME   "lroundl"

Definition at line 728 of file ri-util.h.

◆ LSEEK64_FUNCTION_NAME

#define LSEEK64_FUNCTION_NAME   "lseekg4"

Definition at line 790 of file ri-util.h.

◆ LSEEK_FUNCTION_NAME

#define LSEEK_FUNCTION_NAME   "lseek"

o functions: C library and system IO.

Amira Mensi unistd.h

Definition at line 789 of file ri-util.h.

◆ LSTAT_FUNCTION_NAME

#define LSTAT_FUNCTION_NAME   "lstat"

Definition at line 1185 of file ri-util.h.

◆ lt_expression

#define lt_expression (   e1,
  e2 
)     binary_intrinsic_expression(LESS_THAN_OPERATOR_NAME, e1, e2)

Definition at line 1826 of file ri-util.h.

◆ make_empty_statement

#define make_empty_statement   make_empty_block_statement

An alias for make_empty_block_statement.

Definition at line 2049 of file ri-util.h.

◆ make_entity

#define make_entity (   n,
  t,
  s,
 
)    make_entity(n,t,s,i,DEFAULT_ENTITY_KIND)

Definition at line 2343 of file ri-util.h.

◆ make_expression_list

#define make_expression_list (   stats...)     (gen_make_list(expression_domain, ##stats, 0))

Definition at line 1926 of file ri-util.h.

◆ make_nop_statement

#define make_nop_statement   make_empty_block_statement

An alias for make_empty_block_statement.

Definition at line 2052 of file ri-util.h.

◆ MAKE_ORDERING

#define MAKE_ORDERING (   u,
 
)    (u<<16|s)

On devrait utiliser Newgen pour cela, mais comme on ne doit pas les utiliser directement (mais via statement_less_p), cela devrait decourager les temeraires.

Definition at line 1742 of file ri-util.h.

◆ make_statement_list

#define make_statement_list (   stats...)     (gen_make_list(statement_domain, ##stats, 0))

easy list constructor

Definition at line 1924 of file ri-util.h.

◆ MALLOC_EFFECTS_NAME

#define MALLOC_EFFECTS_NAME   "_MALLOC_"

variable name for heap effects

Definition at line 1998 of file ri-util.h.

◆ MALLOC_EFFECTS_PACKAGE_NAME

#define MALLOC_EFFECTS_PACKAGE_NAME   "_MALLOC_EFFECTS"

package name for malloc routines (could be libc package)

Definition at line 1996 of file ri-util.h.

◆ MALLOC_FUNCTION_NAME

#define MALLOC_FUNCTION_NAME   "malloc"

Definition at line 1024 of file ri-util.h.

◆ MATHERR_OPERATOR_NAME

#define MATHERR_OPERATOR_NAME   "matherr"

Definition at line 1202 of file ri-util.h.

◆ MAX0_OPERATOR_NAME

#define MAX0_OPERATOR_NAME   "MAX0"

Definition at line 208 of file ri-util.h.

◆ MAX1_OPERATOR_NAME

#define MAX1_OPERATOR_NAME   "MAX1"

Definition at line 210 of file ri-util.h.

◆ MAX_OPERATOR_NAME

#define MAX_OPERATOR_NAME   "MAX"

Definition at line 207 of file ri-util.h.

◆ MBLEN_FUNCTION_NAME

#define MBLEN_FUNCTION_NAME   "mblen"

Definition at line 1041 of file ri-util.h.

◆ MBRLEN_FUNCTION_NAME

#define MBRLEN_FUNCTION_NAME   "mbrlen"

Definition at line 1140 of file ri-util.h.

◆ MBRTOWC_FUNCTION_NAME

#define MBRTOWC_FUNCTION_NAME   "mbrtowc"

Definition at line 1141 of file ri-util.h.

◆ MBSINIT_FUNCTION_NAME

#define MBSINIT_FUNCTION_NAME   "mbsinit"

Definition at line 1139 of file ri-util.h.

◆ MBSRTOWCS_FUNCTION_NAME

#define MBSRTOWCS_FUNCTION_NAME   "mbsrtowcs"

Definition at line 1143 of file ri-util.h.

◆ MBSTOWCS_FUNCTION_NAME

#define MBSTOWCS_FUNCTION_NAME   "mbstowcs"

Definition at line 1044 of file ri-util.h.

◆ MBTOWC_FUNCTION_NAME

#define MBTOWC_FUNCTION_NAME   "mbtowc"

Definition at line 1042 of file ri-util.h.

◆ MEMALIGN_FUNCTION_NAME

#define MEMALIGN_FUNCTION_NAME   "memalign"

Definition at line 437 of file ri-util.h.

◆ MEMCHR_FUNCTION_NAME

#define MEMCHR_FUNCTION_NAME   "memchr"

Definition at line 1063 of file ri-util.h.

◆ MEMCMP_FUNCTION_NAME

#define MEMCMP_FUNCTION_NAME   "memcmp"

Definition at line 1058 of file ri-util.h.

◆ MEMCPY_FUNCTION_NAME

#define MEMCPY_FUNCTION_NAME   "memcpy"

include <string.h>

Definition at line 1051 of file ri-util.h.

◆ MEMMOVE_EFFECTS_NAME

#define MEMMOVE_EFFECTS_NAME   "_MEMMOVE_"

variable name for memmove unit

Definition at line 2002 of file ri-util.h.

◆ MEMMOVE_EFFECTS_PACKAGE_NAME

#define MEMMOVE_EFFECTS_PACKAGE_NAME   "_MEMMOVE_EFFECTS"

package name for memmove routines

Definition at line 2000 of file ri-util.h.

◆ MEMMOVE_FUNCTION_NAME

#define MEMMOVE_FUNCTION_NAME   "memmove"

Definition at line 1052 of file ri-util.h.

◆ MEMSET_FUNCTION_NAME

#define MEMSET_FUNCTION_NAME   "memset"

Definition at line 1071 of file ri-util.h.

◆ MIN0_OPERATOR_NAME

#define MIN0_OPERATOR_NAME   "MIN0"

Definition at line 202 of file ri-util.h.

◆ MIN1_OPERATOR_NAME

#define MIN1_OPERATOR_NAME   "MIN1"

Definition at line 203 of file ri-util.h.

◆ MIN_OPERATOR_NAME

#define MIN_OPERATOR_NAME   "MIN"

Definition at line 201 of file ri-util.h.

◆ MINUS_C_OPERATOR_NAME

#define MINUS_C_OPERATOR_NAME   "-C" /**includes pointer arithmetic */

Definition at line 122 of file ri-util.h.

◆ MINUS_OPERATOR_NAME

#define MINUS_OPERATOR_NAME   "-"

Definition at line 121 of file ri-util.h.

◆ MINUS_UPDATE_OPERATOR_NAME

#define MINUS_UPDATE_OPERATOR_NAME   "-="

Definition at line 112 of file ri-util.h.

◆ MKSTEMP64_FUNCTION_NAME

#define MKSTEMP64_FUNCTION_NAME   "mkstemp64"

Definition at line 407 of file ri-util.h.

◆ MKSTEMP_FUNCTION_NAME

#define MKSTEMP_FUNCTION_NAME   "mkstemp"

Definition at line 406 of file ri-util.h.

◆ MKTEMP_FUNCTION_NAME

#define MKTEMP_FUNCTION_NAME   "mktemp"

Definition at line 416 of file ri-util.h.

◆ MKTIME_FUNCTION_NAME

#define MKTIME_FUNCTION_NAME   "mktime"

Definition at line 360 of file ri-util.h.

◆ MOD_INTRINSIC_NAME

#define MOD_INTRINSIC_NAME   "MOD"

Definition at line 446 of file ri-util.h.

◆ MODF_OPERATOR_NAME

#define MODF_OPERATOR_NAME   "modf"

Definition at line 669 of file ri-util.h.

◆ MODFF_OPERATOR_NAME

#define MODFF_OPERATOR_NAME   "modff"

Definition at line 1206 of file ri-util.h.

◆ module_functional_parameters

#define module_functional_parameters (   func)     functional_parameters(type_functional(entity_type(func)))

Definition at line 1779 of file ri-util.h.

◆ module_language

#define module_language (   e)     code_language(value_code(entity_initial((e))))

implemented as a macro to allow lhs

Definition at line 1776 of file ri-util.h.

◆ MODULO_OPERATOR_NAME

#define MODULO_OPERATOR_NAME   "MOD"

Definition at line 129 of file ri-util.h.

◆ MODULO_UPDATE_OPERATOR_NAME

#define MODULO_UPDATE_OPERATOR_NAME   "__C-modulo-update__"

Definition at line 192 of file ri-util.h.

◆ MPI_BARRIER_FUNCTION_NAME

#define MPI_BARRIER_FUNCTION_NAME   "MPI_Barrier"

Definition at line 2357 of file ri-util.h.

◆ MPI_BSEND_FUNCTION_NAME

#define MPI_BSEND_FUNCTION_NAME   "MPI_Bsend"

Definition at line 2364 of file ri-util.h.

◆ MPI_COMM

#define MPI_COMM   "MPI_Comm"

Definition at line 2379 of file ri-util.h.

◆ MPI_COMM_RANK_FUNCTION_NAME

#define MPI_COMM_RANK_FUNCTION_NAME   "MPI_Comm_rank"

Definition at line 2360 of file ri-util.h.

◆ MPI_COMM_SIZE_FUNCTION_NAME

#define MPI_COMM_SIZE_FUNCTION_NAME   "MPI_Comm_size"

Definition at line 2359 of file ri-util.h.

◆ MPI_DATATYPE

#define MPI_DATATYPE   "MPI_Datatype"

Definition at line 2380 of file ri-util.h.

◆ MPI_FINALIZE_FUNCTION_NAME

#define MPI_FINALIZE_FUNCTION_NAME   "MPI_Finalize"

Definition at line 2354 of file ri-util.h.

◆ MPI_IBSEND_FUNCTION_NAME

#define MPI_IBSEND_FUNCTION_NAME   "MPI_Ibsend"

Definition at line 2368 of file ri-util.h.

◆ MPI_INIT_FUNCTION_NAME

#define MPI_INIT_FUNCTION_NAME   "MPI_Init"

PI calls.

Definition at line 2353 of file ri-util.h.

◆ MPI_IRECV_FUNCTION_NAME

#define MPI_IRECV_FUNCTION_NAME   "MPI_Irecv"

Definition at line 2370 of file ri-util.h.

◆ MPI_IRSEND_FUNCTION_NAME

#define MPI_IRSEND_FUNCTION_NAME   "MPI_Irsend"

Definition at line 2367 of file ri-util.h.

◆ MPI_ISEND_FUNCTION_NAME [1/2]

#define MPI_ISEND_FUNCTION_NAME   "MPI_Isend"

Definition at line 2365 of file ri-util.h.

◆ MPI_ISEND_FUNCTION_NAME [2/2]

#define MPI_ISEND_FUNCTION_NAME   "MPI_Isend"

Definition at line 2365 of file ri-util.h.

◆ MPI_ISSEND_FUNCTION_NAME

#define MPI_ISSEND_FUNCTION_NAME   "MPI_Issend"

Definition at line 2366 of file ri-util.h.

◆ MPI_RECV_FUNCTION_NAME [1/2]

#define MPI_RECV_FUNCTION_NAME   "MPI_Recv"

Definition at line 2369 of file ri-util.h.

◆ MPI_RECV_FUNCTION_NAME [2/2]

#define MPI_RECV_FUNCTION_NAME   "MPI_Recv"

Definition at line 2369 of file ri-util.h.

◆ MPI_REQUEST

#define MPI_REQUEST   "MPI_Request"

Definition at line 2378 of file ri-util.h.

◆ MPI_RSEND_FUNCTION_NAME

#define MPI_RSEND_FUNCTION_NAME   "MPI_Rsend"

Definition at line 2363 of file ri-util.h.

◆ MPI_SEND_FUNCTION_NAME

#define MPI_SEND_FUNCTION_NAME   "MPI_Send"

Definition at line 2361 of file ri-util.h.

◆ MPI_SENDRECV_FUNCTION_NAME

#define MPI_SENDRECV_FUNCTION_NAME   "MPI_Sendrecv"

Definition at line 2373 of file ri-util.h.

◆ MPI_SSEND_FUNCTION_NAME

#define MPI_SSEND_FUNCTION_NAME   "MPI_Ssend"

Definition at line 2362 of file ri-util.h.

◆ MPI_STATUS

#define MPI_STATUS   "MPI_Status"

PI types.

Definition at line 2377 of file ri-util.h.

◆ MRAND48_FUNCTION_NAME

#define MRAND48_FUNCTION_NAME   "mrand48"

Definition at line 398 of file ri-util.h.

◆ MULTIPLY_OPERATOR_NAME

#define MULTIPLY_OPERATOR_NAME   "*"

Definition at line 125 of file ri-util.h.

◆ MULTIPLY_UPDATE_OPERATOR_NAME

#define MULTIPLY_UPDATE_OPERATOR_NAME   "*="

Definition at line 109 of file ri-util.h.

◆ MVBITS_OPERATOR_NAME

#define MVBITS_OPERATOR_NAME   "MVBITS"

Definition at line 316 of file ri-util.h.

◆ NAN_OPERATOR_NAME

#define NAN_OPERATOR_NAME   "nan"

Definition at line 744 of file ri-util.h.

◆ NANF_OPERATOR_NAME

#define NANF_OPERATOR_NAME   "nanf"

Definition at line 745 of file ri-util.h.

◆ NANL_OPERATOR_NAME

#define NANL_OPERATOR_NAME   "nanl"

Definition at line 746 of file ri-util.h.

◆ NANOSLEEP_FUNCTION_NAME [1/2]

#define NANOSLEEP_FUNCTION_NAME   "nanosleep"

Definition at line 1082 of file ri-util.h.

◆ NANOSLEEP_FUNCTION_NAME [2/2]

#define NANOSLEEP_FUNCTION_NAME   "nanosleep"

Definition at line 1082 of file ri-util.h.

◆ ne_expression

#define ne_expression (   e1,
  e2 
)     binary_intrinsic_expression(NON_EQUAL_OPERATOR_NAME, e1, e2)

Definition at line 1818 of file ri-util.h.

◆ NEARBYINT_OPERATOR_NAME

#define NEARBYINT_OPERATOR_NAME   "nearbyint"

Definition at line 711 of file ri-util.h.

◆ NEARBYINTF_OPERATOR_NAME

#define NEARBYINTF_OPERATOR_NAME   "nearbyintf"

Definition at line 712 of file ri-util.h.

◆ NEARBYINTL_OPERATOR_NAME

#define NEARBYINTL_OPERATOR_NAME   "nearbyintl"

Definition at line 713 of file ri-util.h.

◆ NEW_SUFFIX

#define NEW_SUFFIX   "N"

Definition at line 1885 of file ri-util.h.

◆ NEXTAFTER_OPERATOR_NAME [1/2]

#define NEXTAFTER_OPERATOR_NAME   "nextafter"

Definition at line 1198 of file ri-util.h.

◆ NEXTAFTER_OPERATOR_NAME [2/2]

#define NEXTAFTER_OPERATOR_NAME   "nextafter"

Definition at line 1198 of file ri-util.h.

◆ NEXTAFTERF_OPERATOR_NAME

#define NEXTAFTERF_OPERATOR_NAME   "nextafterf"

Definition at line 748 of file ri-util.h.

◆ NEXTAFTERL_OPERATOR_NAME

#define NEXTAFTERL_OPERATOR_NAME   "nextafterl"

Definition at line 749 of file ri-util.h.

◆ NEXTTOWARD_OPERATOR_NAME

#define NEXTTOWARD_OPERATOR_NAME   "nexttoward"

Definition at line 750 of file ri-util.h.

◆ NEXTTOWARDF_OPERATOR_NAME

#define NEXTTOWARDF_OPERATOR_NAME   "nexttowardf"

Definition at line 751 of file ri-util.h.

◆ NEXTTOWARDL_OPERATOR_NAME

#define NEXTTOWARDL_OPERATOR_NAME   "nexttowardl"

Definition at line 752 of file ri-util.h.

◆ NICE_FUNCTION_NAME

#define NICE_FUNCTION_NAME   "nice"

Definition at line 823 of file ri-util.h.

◆ NINT_CONVERSION_NAME

#define NINT_CONVERSION_NAME   "NINT"

Definition at line 247 of file ri-util.h.

◆ NON_EQUAL_OPERATOR_NAME

#define NON_EQUAL_OPERATOR_NAME   ".NE."

Definition at line 260 of file ri-util.h.

◆ NON_EQUIV_OPERATOR_NAME

#define NON_EQUIV_OPERATOR_NAME   ".NEQV."

Definition at line 262 of file ri-util.h.

◆ NORMALIZE_EXPRESSION

#define NORMALIZE_EXPRESSION (   e)
Value:
normalized NormalizeExpression(expression)
normalize.c
Definition: normalize.c:81
#define normalized_undefined
Definition: ri.h:1745
#define expression_normalized(x)
Definition: ri.h:1249

Definition at line 1746 of file ri-util.h.

◆ not_expression

#define not_expression (   e)     unary_intrinsic_expression(NOT_OPERATOR_NAME, e)

Definition at line 1812 of file ri-util.h.

◆ NOT_OPERATOR_NAME

#define NOT_OPERATOR_NAME   ".NOT."

Definition at line 259 of file ri-util.h.

◆ NRAND48_FUNCTION_NAME

#define NRAND48_FUNCTION_NAME   "nrand48"

Definition at line 399 of file ri-util.h.

◆ NULL_STATEMENT_INTRINSIC

#define NULL_STATEMENT_INTRINSIC   "NULL_STATEMENT_INTRINSIC"

Definition at line 94 of file ri-util.h.

◆ OMP_FOR_FUNCTION_NAME

#define OMP_FOR_FUNCTION_NAME   "for"

Definition at line 329 of file ri-util.h.

◆ OMP_IF_FUNCTION_NAME

#define OMP_IF_FUNCTION_NAME   "if"

OMP related function and opertor names.

Definition at line 327 of file ri-util.h.

◆ OMP_OMP_FUNCTION_NAME

#define OMP_OMP_FUNCTION_NAME   "omp"

Definition at line 328 of file ri-util.h.

◆ OMP_PARALLEL_FUNCTION_NAME

#define OMP_PARALLEL_FUNCTION_NAME   "parallel"

Definition at line 331 of file ri-util.h.

◆ OMP_PRIVATE_FUNCTION_NAME

#define OMP_PRIVATE_FUNCTION_NAME   "private"

Definition at line 330 of file ri-util.h.

◆ OMP_REDUCTION_FUNCTION_NAME

#define OMP_REDUCTION_FUNCTION_NAME   "reduction"

Definition at line 332 of file ri-util.h.

◆ ONE_OPERATOR_NAME

#define ONE_OPERATOR_NAME   "1"

Definition at line 266 of file ri-util.h.

◆ OPEN64_FUNCTION_NAME

#define OPEN64_FUNCTION_NAME   "open64"

Definition at line 1174 of file ri-util.h.

◆ OPEN_FUNCTION_NAME

#define OPEN_FUNCTION_NAME   "OPEN"

Definition at line 301 of file ri-util.h.

◆ or_expression

#define or_expression (   e1,
  e2 
)     binary_intrinsic_expression(OR_OPERATOR_NAME, e1, e2)

Definition at line 1814 of file ri-util.h.

◆ OR_OPERATOR_NAME

#define OR_OPERATOR_NAME   ".OR."

Definition at line 257 of file ri-util.h.

◆ ORDERING_NUMBER

#define ORDERING_NUMBER (   o)    (o>>16)

Definition at line 1743 of file ri-util.h.

◆ ORDERING_STATEMENT

#define ORDERING_STATEMENT (   o)    (o & 0xffff)

Definition at line 1744 of file ri-util.h.

◆ PATHCONF_FUNCTION_NAME

#define PATHCONF_FUNCTION_NAME   "pathconf"

Definition at line 825 of file ri-util.h.

◆ PAUSE_FUNCTION_NAME

#define PAUSE_FUNCTION_NAME   "PAUSE"

Definition at line 285 of file ri-util.h.

◆ PCLOSE_FUNCTION_NAME

#define PCLOSE_FUNCTION_NAME   "pclose"

Definition at line 993 of file ri-util.h.

◆ PERROR_FUNCTION_NAME

#define PERROR_FUNCTION_NAME   "perror"

Definition at line 970 of file ri-util.h.

◆ PIPE2_FUNCTION_NAME

#define PIPE2_FUNCTION_NAME   "pipe2"

Definition at line 798 of file ri-util.h.

◆ PIPE_FUNCTION_NAME

#define PIPE_FUNCTION_NAME   "pipe"

Definition at line 797 of file ri-util.h.

◆ PIPS_C_DIV_OPERATOR_NAME

#define PIPS_C_DIV_OPERATOR_NAME   "pips_div"

Definition at line 461 of file ri-util.h.

◆ PIPS_C_MAX_OPERATOR_NAME

#define PIPS_C_MAX_OPERATOR_NAME   "pips_max"

Definition at line 460 of file ri-util.h.

◆ PIPS_C_MIN_OPERATOR_NAME

#define PIPS_C_MIN_OPERATOR_NAME   "pips_min"

PIPS run-time support for C code generation.

The first argument is the number of effective arguments, the second argument is the first effective argument and other arguments are passed as varargs. For instance:

pips_min(5, 1, 2, 3, 4, 5);

Initially, the source code for these two operators is available in validation/Hyperplane/run_time.src/pips_run_time.c

Definition at line 459 of file ri-util.h.

◆ PIPS_IO_BARRIER_OPERATOR_NAME

#define PIPS_IO_BARRIER_OPERATOR_NAME   "__pips_io_barrier"

Definition at line 1260 of file ri-util.h.

◆ PIPS_MEMORY_BARRIER_OPERATOR_NAME

#define PIPS_MEMORY_BARRIER_OPERATOR_NAME   "__pips_memory_barrier"

special pips intrinsics with global effects

Definition at line 1259 of file ri-util.h.

◆ PLUS_C_OPERATOR_NAME

#define PLUS_C_OPERATOR_NAME   "+C" /**includes pointer arithmetic */

Definition at line 120 of file ri-util.h.

◆ PLUS_OPERATOR_NAME

#define PLUS_OPERATOR_NAME   "+"

Definition at line 119 of file ri-util.h.

◆ PLUS_UPDATE_OPERATOR_NAME

#define PLUS_UPDATE_OPERATOR_NAME   "+="

Definition at line 111 of file ri-util.h.

◆ POINT_TO_OPERATOR_NAME

#define POINT_TO_OPERATOR_NAME   "->"

Definition at line 100 of file ri-util.h.

◆ POPEN_FUNCTION_NAME

#define POPEN_FUNCTION_NAME   "popen"

Definition at line 988 of file ri-util.h.

◆ POSIX_MEMALIGN_FUNCTION_NAME

#define POSIX_MEMALIGN_FUNCTION_NAME   "posix_memalign"

Definition at line 442 of file ri-util.h.

◆ POST_DECREMENT_OPERATOR_NAME

#define POST_DECREMENT_OPERATOR_NAME   "post--"

Definition at line 106 of file ri-util.h.

◆ POST_INCREMENT_OPERATOR_NAME

#define POST_INCREMENT_OPERATOR_NAME   "post++"

Definition at line 105 of file ri-util.h.

◆ POW_OPERATOR_NAME

#define POW_OPERATOR_NAME   "pow"

Definition at line 686 of file ri-util.h.

◆ POWER_OPERATOR_NAME

#define POWER_OPERATOR_NAME   "**"

Definition at line 128 of file ri-util.h.

◆ POWF_OPERATOR_NAME

#define POWF_OPERATOR_NAME   "powf"

Definition at line 687 of file ri-util.h.

◆ POWL_OPERATOR_NAME

#define POWL_OPERATOR_NAME   "powl"

Definition at line 688 of file ri-util.h.

◆ PRE_DECREMENT_OPERATOR_NAME

#define PRE_DECREMENT_OPERATOR_NAME   "--pre"

Definition at line 108 of file ri-util.h.

◆ PRE_INCREMENT_OPERATOR_NAME

#define PRE_INCREMENT_OPERATOR_NAME   "++pre"

Definition at line 107 of file ri-util.h.

◆ PREAD64_FUNCTION_NAME

#define PREAD64_FUNCTION_NAME   "pread64"

Definition at line 796 of file ri-util.h.

◆ PREAD_FUNCTION_NAME

#define PREAD_FUNCTION_NAME   "pread"

Definition at line 794 of file ri-util.h.

◆ PRINT_FUNCTION_NAME

#define PRINT_FUNCTION_NAME   "PRINT"

Definition at line 299 of file ri-util.h.

◆ PRINTF_FUNCTION_NAME

#define PRINTF_FUNCTION_NAME   "printf"

include<stdio.h>

Definition at line 916 of file ri-util.h.

◆ PROCESSORS_SUFFIX

#define PROCESSORS_SUFFIX   "P"

Definition at line 1887 of file ri-util.h.

◆ PROFIL_FUNCTION_NAME

#define PROFIL_FUNCTION_NAME   "profil"

Definition at line 881 of file ri-util.h.

◆ PSELECT_FUNCTION_NAME

#define PSELECT_FUNCTION_NAME   "pselect"

Definition at line 1182 of file ri-util.h.

◆ PTSNAME_FUNCTION_NAME

#define PTSNAME_FUNCTION_NAME   "ptsname"

Definition at line 417 of file ri-util.h.

◆ PURE_SUFFIX

#define PURE_SUFFIX   "U"

Definition at line 1889 of file ri-util.h.

◆ PUTC_FUNCTION_NAME

#define PUTC_FUNCTION_NAME   "putc"

Definition at line 955 of file ri-util.h.

◆ PUTCHAR_FUNCTION_NAME

#define PUTCHAR_FUNCTION_NAME   "putchar"

Definition at line 957 of file ri-util.h.

◆ PUTENV_FUNCTION_NAME

#define PUTENV_FUNCTION_NAME   "putenv"

Definition at line 403 of file ri-util.h.

◆ PUTS_FUNCTION_NAME

#define PUTS_FUNCTION_NAME   "puts"

Definition at line 924 of file ri-util.h.

◆ PUTW_FUNCTION_NAME

#define PUTW_FUNCTION_NAME   "putw"

Definition at line 992 of file ri-util.h.

◆ PUTWC_FUNCTION_NAME

#define PUTWC_FUNCTION_NAME   "putwc"

Definition at line 1105 of file ri-util.h.

◆ PUTWCHAR_FUNCTION_NAME

#define PUTWCHAR_FUNCTION_NAME   "putwchar"

Definition at line 1106 of file ri-util.h.

◆ PWRITE_FUNCTION_NAME

#define PWRITE_FUNCTION_NAME   "pwrite"

Definition at line 795 of file ri-util.h.

◆ QECONVERT_OPERATOR_NAME

#define QECONVERT_OPERATOR_NAME   "qeconvert"

Definition at line 1225 of file ri-util.h.

◆ QECVT_FUNCTION_NAME

#define QECVT_FUNCTION_NAME   "qecvt"

Definition at line 424 of file ri-util.h.

◆ QFCONVERT_OPERATOR_NAME

#define QFCONVERT_OPERATOR_NAME   "qfconvert"

Definition at line 1226 of file ri-util.h.

◆ QFCVT_FUNCTION_NAME

#define QFCVT_FUNCTION_NAME   "qfcvt"

Definition at line 425 of file ri-util.h.

◆ QGCONVERT_OPERATOR_NAME

#define QGCONVERT_OPERATOR_NAME   "qgconvert"

Definition at line 1227 of file ri-util.h.

◆ QGCVT_FUNCTION_NAME

#define QGCVT_FUNCTION_NAME   "qgcvt"

Definition at line 426 of file ri-util.h.

◆ QSORT_FUNCTION_NAME

#define QSORT_FUNCTION_NAME   "qsort"

Definition at line 1034 of file ri-util.h.

◆ QUADRUPLE_TO_DECIMAL_OPERATOR_NAME

#define QUADRUPLE_TO_DECIMAL_OPERATOR_NAME   "quadruple_to_decimal"

Definition at line 1211 of file ri-util.h.

◆ RAISE_FUNCTION_NAME

#define RAISE_FUNCTION_NAME   "raise"

Definition at line 775 of file ri-util.h.

◆ RAND_EFFECTS_PACKAGE_NAME

#define RAND_EFFECTS_PACKAGE_NAME   "_RANDOM_EFFECTS"

package name for random routines

Definition at line 1992 of file ri-util.h.

◆ RAND_FUNCTION_NAME

#define RAND_FUNCTION_NAME   "rand"

Definition at line 1020 of file ri-util.h.

◆ RAND_GEN_EFFECTS_NAME

#define RAND_GEN_EFFECTS_NAME   "GEN_SEED"

variable name for random unit

Definition at line 1994 of file ri-util.h.

◆ RANDOM_FUNCTION_NAME

#define RANDOM_FUNCTION_NAME   "random"

Definition at line 444 of file ri-util.h.

◆ range_to_distance_p

#define range_to_distance_p (   e)    ((e) == range_to_distance)

Definition at line 2310 of file ri-util.h.

◆ range_to_nbiter_p

#define range_to_nbiter_p (   e)    ((e) == range_to_nbiter)

Definition at line 2311 of file ri-util.h.

◆ READ_FUNCTION_NAME

#define READ_FUNCTION_NAME   "READ"

Definition at line 305 of file ri-util.h.

◆ READLINK_FUNCTION_NAME

#define READLINK_FUNCTION_NAME   "readlink"

Definition at line 863 of file ri-util.h.

◆ READLINKAT_FUNCTION_NAME

#define READLINKAT_FUNCTION_NAME   "readlinkat"

Definition at line 865 of file ri-util.h.

◆ REAL_GENERIC_CONVERSION_NAME

#define REAL_GENERIC_CONVERSION_NAME   "REAL"

Definition at line 231 of file ri-util.h.

◆ REAL_MODULO_OPERATOR_NAME

#define REAL_MODULO_OPERATOR_NAME   "AMOD"

Definition at line 130 of file ri-util.h.

◆ REALIGN_SUFFIX

#define REALIGN_SUFFIX   "B"

Definition at line 1881 of file ri-util.h.

◆ REALLOC_FUNCTION_NAME

#define REALLOC_FUNCTION_NAME   "realloc"

Definition at line 1025 of file ri-util.h.

◆ REALPATH_FUNCTION_NAME

#define REALPATH_FUNCTION_NAME   "realpath"

Definition at line 418 of file ri-util.h.

◆ RECV_FUNCTION_NAME

#define RECV_FUNCTION_NAME   "recv"

Definition at line 2347 of file ri-util.h.

◆ REDISTRIBUTE_SUFFIX

#define REDISTRIBUTE_SUFFIX   "E"

Definition at line 1883 of file ri-util.h.

◆ REDUCTION_SUFFIX

#define REDUCTION_SUFFIX   "R"

Definition at line 1886 of file ri-util.h.

◆ REGIONS_MODULE_NAME

#define REGIONS_MODULE_NAME   "REGIONS-PACKAGE"

Already defined.

package name for region variables

Definition at line 1984 of file ri-util.h.

◆ REMAINDER_OPERATOR_NAME [1/2]

#define REMAINDER_OPERATOR_NAME   "remainder"

Definition at line 1199 of file ri-util.h.

◆ REMAINDER_OPERATOR_NAME [2/2]

#define REMAINDER_OPERATOR_NAME   "remainder"

Definition at line 1199 of file ri-util.h.

◆ REMAINDERF_OPERATOR_NAME

#define REMAINDERF_OPERATOR_NAME   "remainderf"

Definition at line 739 of file ri-util.h.

◆ REMAINDERL_OPERATOR_NAME

#define REMAINDERL_OPERATOR_NAME   "remainderl"

Definition at line 740 of file ri-util.h.

◆ REMOVE_FUNCTION_NAME

#define REMOVE_FUNCTION_NAME   "remove"

Definition at line 973 of file ri-util.h.

◆ RENAME_FUNCTION_NAME

#define RENAME_FUNCTION_NAME   "rename"

Definition at line 974 of file ri-util.h.

◆ REPEAT_VALUE_FUNCTION_NAME

#define REPEAT_VALUE_FUNCTION_NAME   "REPEAT-VALUE"

Definition at line 86 of file ri-util.h.

◆ REPEAT_VALUE_NAME

#define REPEAT_VALUE_NAME   "REPEAT-VALUE"

Definition at line 85 of file ri-util.h.

◆ RETURN_FUNCTION_NAME

#define RETURN_FUNCTION_NAME   "RETURN"

Definition at line 283 of file ri-util.h.

◆ REVOKE_FUNCTION_NAME

#define REVOKE_FUNCTION_NAME   "revoke"

Definition at line 880 of file ri-util.h.

◆ REWIND_FUNCTION_NAME

#define REWIND_FUNCTION_NAME   "REWIND"

Definition at line 300 of file ri-util.h.

◆ RIGHT_SHIFT_OPERATOR_NAME

#define RIGHT_SHIFT_OPERATOR_NAME   ">>"

Definition at line 182 of file ri-util.h.

◆ RIGHT_SHIFT_UPDATE_OPERATOR_NAME

#define RIGHT_SHIFT_UPDATE_OPERATOR_NAME   ">>="

Definition at line 114 of file ri-util.h.

◆ RINT_OPERATOR_NAME

#define RINT_OPERATOR_NAME   "rint"

Definition at line 714 of file ri-util.h.

◆ RINTF_OPERATOR_NAME

#define RINTF_OPERATOR_NAME   "rintf"

Definition at line 715 of file ri-util.h.

◆ RINTL_OPERATOR_NAME

#define RINTL_OPERATOR_NAME   "rintl"

Definition at line 716 of file ri-util.h.

◆ RMDIR_FUNCTION_NAME

#define RMDIR_FUNCTION_NAME   "rmdir"

Definition at line 868 of file ri-util.h.

◆ ROUND_OPERATOR_NAME

#define ROUND_OPERATOR_NAME   "round"

Definition at line 723 of file ri-util.h.

◆ ROUNDF_OPERATOR_NAME

#define ROUNDF_OPERATOR_NAME   "roundf"

Definition at line 724 of file ri-util.h.

◆ ROUNDL_OPERATOR_NAME

#define ROUNDL_OPERATOR_NAME   "roundl"

Definition at line 725 of file ri-util.h.

◆ SBRK_FUNCTION_NAME

#define SBRK_FUNCTION_NAME   "sbrk"

Definition at line 899 of file ri-util.h.

◆ SCALB_OPERATOR_NAME

#define SCALB_OPERATOR_NAME   "scalb"

Definition at line 673 of file ri-util.h.

◆ SCALBLN_OPERATOR_NAME

#define SCALBLN_OPERATOR_NAME   "scalbln"

Definition at line 674 of file ri-util.h.

◆ SCALBLNF_OPERATOR_NAME

#define SCALBLNF_OPERATOR_NAME   "scalblnf"

Definition at line 675 of file ri-util.h.

◆ SCALBLNL_OPERATOR_NAME

#define SCALBLNL_OPERATOR_NAME   "scalblnl"

Definition at line 676 of file ri-util.h.

◆ SCALBN_OPERATOR_NAME

#define SCALBN_OPERATOR_NAME   "scalbn"

Definition at line 670 of file ri-util.h.

◆ SCALBNF_OPERATOR_NAME

#define SCALBNF_OPERATOR_NAME   "scalbnf"

Definition at line 671 of file ri-util.h.

◆ SCALBNL_OPERATOR_NAME

#define SCALBNL_OPERATOR_NAME   "scalbnl"

Definition at line 672 of file ri-util.h.

◆ SCANF_FUNCTION_NAME

#define SCANF_FUNCTION_NAME   "scanf"

Definition at line 918 of file ri-util.h.

◆ SECOND_FUNCTION_NAME

#define SECOND_FUNCTION_NAME   "SECOND"

Definition at line 1230 of file ri-util.h.

◆ SECONVERT_OPERATOR_NAME

#define SECONVERT_OPERATOR_NAME   "seconvert"

Definition at line 1219 of file ri-util.h.

◆ SEED48_FUNCTION_NAME

#define SEED48_FUNCTION_NAME   "seed48"

Definition at line 400 of file ri-util.h.

◆ SELECT_FUNCTION_NAME

#define SELECT_FUNCTION_NAME   "select"

Definition at line 1181 of file ri-util.h.

◆ SEND_FUNCTION_NAME

#define SEND_FUNCTION_NAME   "send"

SPIRE API.

Definition at line 2346 of file ri-util.h.

◆ SETBOOL_SUFFIX

#define SETBOOL_SUFFIX   "4"

Definition at line 1900 of file ri-util.h.

◆ SETBUF_FUNCTION_NAME

#define SETBUF_FUNCTION_NAME   "setbuf"

Definition at line 979 of file ri-util.h.

◆ SETBUFFER_FUNCTION_NAME

#define SETBUFFER_FUNCTION_NAME   "setbuffer"

Definition at line 983 of file ri-util.h.

◆ SETDOMAINNAME_FUNCTION_NAME

#define SETDOMAINNAME_FUNCTION_NAME   "setdomainname"

Definition at line 878 of file ri-util.h.

◆ SETEGID_FUNCTION_NAME

#define SETEGID_FUNCTION_NAME   "setegid"

Definition at line 849 of file ri-util.h.

◆ SETEUID_FUNCTION_NAME

#define SETEUID_FUNCTION_NAME   "seteuid"

Definition at line 846 of file ri-util.h.

◆ SETGID_FUNCTION_NAME

#define SETGID_FUNCTION_NAME   "setgid"

Definition at line 847 of file ri-util.h.

◆ SETHOSTID_FUNCTION_NAME

#define SETHOSTID_FUNCTION_NAME   "sethostid"

Definition at line 876 of file ri-util.h.

◆ SETHOSTNAME_FUNCTION_NAME

#define SETHOSTNAME_FUNCTION_NAME   "sethostname"

Definition at line 875 of file ri-util.h.

◆ SETINT_SUFFIX

#define SETINT_SUFFIX   "5"

Definition at line 1901 of file ri-util.h.

◆ SETKEY_FUNCTION_NAME

#define SETKEY_FUNCTION_NAME   "setkey"

Definition at line 404 of file ri-util.h.

◆ SETLINEBUF_FUNCTION_NAME

#define SETLINEBUF_FUNCTION_NAME   "setlinebuf"

Definition at line 984 of file ri-util.h.

◆ SETLOCALE_FUNCTION_NAME

#define SETLOCALE_FUNCTION_NAME   "setlocale"

include <locale.h>

Definition at line 587 of file ri-util.h.

◆ SETLOGIN_FUNCTION_NAME

#define SETLOGIN_FUNCTION_NAME   "setlogin"

Definition at line 873 of file ri-util.h.

◆ SETPGID_FUNCTION_NAME

#define SETPGID_FUNCTION_NAME   "setpgid"

Definition at line 834 of file ri-util.h.

◆ SETPGRP_FUNCTION_NAME

#define SETPGRP_FUNCTION_NAME   "setpgrp"

Definition at line 835 of file ri-util.h.

◆ SETREGID_FUNCTION_NAME

#define SETREGID_FUNCTION_NAME   "setregid"

Definition at line 848 of file ri-util.h.

◆ SETRESGID_FUNCTION_NAME

#define SETRESGID_FUNCTION_NAME   "setresgid"

Definition at line 853 of file ri-util.h.

◆ SETRESUID_FUNCTION_NAME

#define SETRESUID_FUNCTION_NAME   "setresuid"

Definition at line 852 of file ri-util.h.

◆ SETREUID_FUNCTION_NAME

#define SETREUID_FUNCTION_NAME   "setreuid"

Definition at line 845 of file ri-util.h.

◆ SETSID_FUNCTION_NAME

#define SETSID_FUNCTION_NAME   "setsid"

Definition at line 836 of file ri-util.h.

◆ SETSTATE_FUNCTION_NAME

#define SETSTATE_FUNCTION_NAME   "setstate"

Definition at line 419 of file ri-util.h.

◆ SETUID_FUNCTION_NAME

#define SETUID_FUNCTION_NAME   "setuid"

Definition at line 844 of file ri-util.h.

◆ SETUSERSHELL_FUNCTION_NAME

#define SETUSERSHELL_FUNCTION_NAME   "setusershell"

Definition at line 885 of file ri-util.h.

◆ SETVBUF_FUNCTION_NAME

#define SETVBUF_FUNCTION_NAME   "setvbuf"

Definition at line 980 of file ri-util.h.

◆ SFCONVERT_OPERATOR_NAME

#define SFCONVERT_OPERATOR_NAME   "sfconvert"

Definition at line 1220 of file ri-util.h.

◆ SGCONVERT_OPERATOR_NAME

#define SGCONVERT_OPERATOR_NAME   "sgconvert"

Definition at line 1221 of file ri-util.h.

◆ SIGFPE_OPERATOR_NAME

#define SIGFPE_OPERATOR_NAME   "sigfpe"

Definition at line 1207 of file ri-util.h.

◆ SIGN_OPERATOR_NAME

#define SIGN_OPERATOR_NAME   "SIGN"

Definition at line 132 of file ri-util.h.

◆ SIGNAL_FUNCTION_NAME

#define SIGNAL_FUNCTION_NAME   "signal"

Definition at line 2348 of file ri-util.h.

◆ SIGNAL_OPERATOR_NAME

#define SIGNAL_OPERATOR_NAME   "signal"

signal.h

Definition at line 774 of file ri-util.h.

◆ SIGNBIT_OPERATOR_NAME

#define SIGNBIT_OPERATOR_NAME   "signbit"

Definition at line 598 of file ri-util.h.

◆ SIGNIFICAND_OPERATOR_NAME

#define SIGNIFICAND_OPERATOR_NAME   "significand"

Definition at line 1203 of file ri-util.h.

◆ SIN_OPERATOR_NAME

#define SIN_OPERATOR_NAME   "SIN"

Definition at line 157 of file ri-util.h.

◆ SINF_OPERATOR_NAME

#define SINF_OPERATOR_NAME   "sinf"

Definition at line 615 of file ri-util.h.

◆ SINGLE_TO_DECIMAL_OPERATOR_NAME

#define SINGLE_TO_DECIMAL_OPERATOR_NAME   "single_to_decimal"

Definition at line 1208 of file ri-util.h.

◆ SINH_OPERATOR_NAME

#define SINH_OPERATOR_NAME   "SINH"

Definition at line 175 of file ri-util.h.

◆ SINHF_OPERATOR_NAME

#define SINHF_OPERATOR_NAME   "sinhf"

Definition at line 633 of file ri-util.h.

◆ SINHL_OPERATOR_NAME

#define SINHL_OPERATOR_NAME   "sinhl"

Definition at line 634 of file ri-util.h.

◆ SINL_OPERATOR_NAME

#define SINL_OPERATOR_NAME   "sinl"

Definition at line 616 of file ri-util.h.

◆ SLEEP_FUNCTION_NAME

#define SLEEP_FUNCTION_NAME   "sleep"

Definition at line 799 of file ri-util.h.

◆ SNGL_GENERIC_CONVERSION_NAME

#define SNGL_GENERIC_CONVERSION_NAME   "SNGL"

Definition at line 234 of file ri-util.h.

◆ SNPRINTF_FUNCTION_NAME

#define SNPRINTF_FUNCTION_NAME   "snprintf"

Definition at line 934 of file ri-util.h.

◆ SPRINTF_FUNCTION_NAME

#define SPRINTF_FUNCTION_NAME   "sprintf"

Definition at line 951 of file ri-util.h.

◆ SQRT_OPERATOR_NAME

#define SQRT_OPERATOR_NAME   "SQRT"

Definition at line 141 of file ri-util.h.

◆ SQRTF_OPERATOR_NAME

#define SQRTF_OPERATOR_NAME   "sqrtf"

Definition at line 690 of file ri-util.h.

◆ SQRTL_OPERATOR_NAME

#define SQRTL_OPERATOR_NAME   "sqrtl"

Definition at line 691 of file ri-util.h.

◆ SRAND48_FUNCTION_NAME

#define SRAND48_FUNCTION_NAME   "srand48"

Definition at line 401 of file ri-util.h.

◆ SRAND_FUNCTION_NAME

#define SRAND_FUNCTION_NAME   "srand"

Definition at line 1021 of file ri-util.h.

◆ SRANDOM_FUNCTION_NAME

#define SRANDOM_FUNCTION_NAME   "srandom"

Definition at line 445 of file ri-util.h.

◆ SSCANF_FUNCTION_NAME

#define SSCANF_FUNCTION_NAME   "sscanf"

Definition at line 935 of file ri-util.h.

◆ STAR_SUFFIX

#define STAR_SUFFIX   "S"

Definition at line 1876 of file ri-util.h.

◆ STAT_FUNCTION_NAME

#define STAT_FUNCTION_NAME   "stat"

Definition at line 1183 of file ri-util.h.

◆ statement_block_p

#define statement_block_p (   stat)     (instruction_block_p(statement_instruction(stat)))

Definition at line 1786 of file ri-util.h.

◆ STATEMENT_NUMBER_UNDEFINED

#define STATEMENT_NUMBER_UNDEFINED   (-1)

default values

Definition at line 1728 of file ri-util.h.

◆ STATIC_INITIALIZATION_FUNCTION_NAME

#define STATIC_INITIALIZATION_FUNCTION_NAME   "STATIC-INITIALIZATION"

Definition at line 88 of file ri-util.h.

◆ STATIC_INITIALIZATION_NAME

#define STATIC_INITIALIZATION_NAME   "STATIC-INITIALIZATION"

Definition at line 87 of file ri-util.h.

◆ STDERR_FILENO

#define STDERR_FILENO   (2)

Definition at line 2034 of file ri-util.h.

◆ STDERR_LUN

#define STDERR_LUN   (0)

Standard unit numbers depend on the operating system.

Here are UNIX definitions.

Definition at line 2020 of file ri-util.h.

◆ STDERR_NAME

#define STDERR_NAME   "stderr"

Definition at line 2021 of file ri-util.h.

◆ STDIN_FILENO

#define STDIN_FILENO   (0)

ymbolic constants for the file descriptors belonging to the standard streams: unistd.h

Definition at line 2032 of file ri-util.h.

◆ STDIN_LUN

#define STDIN_LUN   (5)

Definition at line 2023 of file ri-util.h.

◆ STDIN_NAME

#define STDIN_NAME   "stdin"

Definition at line 2024 of file ri-util.h.

◆ STDOUT_FILENO

#define STDOUT_FILENO   (1)

Definition at line 2033 of file ri-util.h.

◆ STDOUT_LUN

#define STDOUT_LUN   (6)

Definition at line 2026 of file ri-util.h.

◆ STDOUT_NAME

#define STDOUT_NAME   "stdout"

Definition at line 2027 of file ri-util.h.

◆ STIME_FUNCTION_NAME

#define STIME_FUNCTION_NAME   "stime"

Definition at line 374 of file ri-util.h.

◆ STOP_FUNCTION_NAME

#define STOP_FUNCTION_NAME   "STOP"

Definition at line 284 of file ri-util.h.

◆ STRCAT_FUNCTION_NAME

#define STRCAT_FUNCTION_NAME   "strcat"

Definition at line 1056 of file ri-util.h.

◆ STRCHR_FUNCTION_NAME

#define STRCHR_FUNCTION_NAME   "strchr"

Definition at line 1064 of file ri-util.h.

◆ STRCMP_FUNCTION_NAME

#define STRCMP_FUNCTION_NAME   "strcmp"

Definition at line 1059 of file ri-util.h.

◆ STRCOLL_FUNCTION_NAME

#define STRCOLL_FUNCTION_NAME   "strcoll"

Definition at line 1060 of file ri-util.h.

◆ STRCPY_FUNCTION_NAME

#define STRCPY_FUNCTION_NAME   "strcpy"

Definition at line 1053 of file ri-util.h.

◆ STRCSPN_FUNCTION_NAME

#define STRCSPN_FUNCTION_NAME   "strcspn"

Definition at line 1065 of file ri-util.h.

◆ STRDUP_FUNCTION_NAME

#define STRDUP_FUNCTION_NAME   "strdup"

Definition at line 1054 of file ri-util.h.

◆ STRERROR_FUNCTION_NAME

#define STRERROR_FUNCTION_NAME   "strerror"

Definition at line 1073 of file ri-util.h.

◆ STRERROR_R_FUNCTION_NAME

#define STRERROR_R_FUNCTION_NAME   "strerror_r"

Definition at line 1074 of file ri-util.h.

◆ STRFTIME_FUNCTION_NAME

#define STRFTIME_FUNCTION_NAME   "strftime"

Definition at line 361 of file ri-util.h.

◆ STRFTIME_L_FUNCTION_NAME

#define STRFTIME_L_FUNCTION_NAME   "strftime_l"

Definition at line 363 of file ri-util.h.

◆ STRING_TO_DECIMAL_OPERATOR_NAME

#define STRING_TO_DECIMAL_OPERATOR_NAME   "string_to_decimal"

Definition at line 1216 of file ri-util.h.

◆ STRLEN_FUNCTION_NAME

#define STRLEN_FUNCTION_NAME   "strlen"

Definition at line 1075 of file ri-util.h.

◆ STRNCAT_FUNCTION_NAME

#define STRNCAT_FUNCTION_NAME   "strncat"

Definition at line 1057 of file ri-util.h.

◆ STRNCMP_FUNCTION_NAME

#define STRNCMP_FUNCTION_NAME   "strncmp"

Definition at line 1061 of file ri-util.h.

◆ STRNCPY_FUNCTION_NAME

#define STRNCPY_FUNCTION_NAME   "strncpy"

Definition at line 1055 of file ri-util.h.

◆ STRPBRK_FUNCTION_NAME

#define STRPBRK_FUNCTION_NAME   "strbprk"

Definition at line 1066 of file ri-util.h.

◆ STRPTIME_FUNCTION_NAME

#define STRPTIME_FUNCTION_NAME   "strptime"

Definition at line 362 of file ri-util.h.

◆ STRPTIME_L_FUNCTION_NAME

#define STRPTIME_L_FUNCTION_NAME   "strptime_l"

Definition at line 364 of file ri-util.h.

◆ STRRCHR_FUNCTION_NAME

#define STRRCHR_FUNCTION_NAME   "strrchr"

Definition at line 1067 of file ri-util.h.

◆ STRSPN_FUNCTION_NAME

#define STRSPN_FUNCTION_NAME   "strspn"

Definition at line 1068 of file ri-util.h.

◆ STRSTR_FUNCTION_NAME

#define STRSTR_FUNCTION_NAME   "strstr"

Definition at line 1069 of file ri-util.h.

◆ STRTOD_FUNCTION_NAME

#define STRTOD_FUNCTION_NAME   "strtod"

Definition at line 1013 of file ri-util.h.

◆ STRTOF_FUNCTION_NAME

#define STRTOF_FUNCTION_NAME   "strtof"

Definition at line 1014 of file ri-util.h.

◆ STRTOK_FUNCTION_NAME

#define STRTOK_FUNCTION_NAME   "strtok"

Definition at line 1070 of file ri-util.h.

◆ STRTOL_FUNCTION_NAME

#define STRTOL_FUNCTION_NAME   "strtol"

Definition at line 1016 of file ri-util.h.

◆ STRTOLD_FUNCTION_NAME

#define STRTOLD_FUNCTION_NAME   "strtold"

Definition at line 1015 of file ri-util.h.

◆ STRTOLL_FUNCTION_NAME

#define STRTOLL_FUNCTION_NAME   "strtoll"

Definition at line 1017 of file ri-util.h.

◆ STRTOUL_FUNCTION_NAME

#define STRTOUL_FUNCTION_NAME   "strtoul"

Definition at line 1018 of file ri-util.h.

◆ STRTOULL_FUNCTION_NAME

#define STRTOULL_FUNCTION_NAME   "strtoull"

Definition at line 1019 of file ri-util.h.

◆ STRXFRM_FUNCTION_NAME

#define STRXFRM_FUNCTION_NAME   "strxfrm"

Definition at line 1062 of file ri-util.h.

◆ SUBSTRING_FUNCTION_NAME

#define SUBSTRING_FUNCTION_NAME   "_SUBSTR"

Definition at line 294 of file ri-util.h.

◆ SWAB_FUNCTION_NAME [1/2]

#define SWAB_FUNCTION_NAME   "swab"

Definition at line 906 of file ri-util.h.

◆ SWAB_FUNCTION_NAME [2/2]

#define SWAB_FUNCTION_NAME   "swab"

Definition at line 906 of file ri-util.h.

◆ SWPRINTF_FUNCTION_NAME

#define SWPRINTF_FUNCTION_NAME   "swprintf"

Definition at line 1088 of file ri-util.h.

◆ SWSCANF_FUNCTION_NAME

#define SWSCANF_FUNCTION_NAME   "swscanf"

Definition at line 1089 of file ri-util.h.

◆ SYMLINK_FUNCTION_NAME

#define SYMLINK_FUNCTION_NAME   "symlink"

Definition at line 862 of file ri-util.h.

◆ SYMLINKAT_FUNCTION_NAME

#define SYMLINKAT_FUNCTION_NAME   "symlinkar"

Definition at line 864 of file ri-util.h.

◆ SYNCFS_FUNCTION_NAME

#define SYNCFS_FUNCTION_NAME   "syncfs"

Definition at line 890 of file ri-util.h.

◆ SYNCHRO_SUFFIX

#define SYNCHRO_SUFFIX   "1"

Definition at line 1897 of file ri-util.h.

◆ SYSCALL_FUNCTION_NAME

#define SYSCALL_FUNCTION_NAME   "syscall"

Definition at line 900 of file ri-util.h.

◆ SYSCONF_FUNCTION_NAME

#define SYSCONF_FUNCTION_NAME   "sysconf"

Definition at line 827 of file ri-util.h.

◆ SYSTEM_FUNCTION_NAME

#define SYSTEM_FUNCTION_NAME   "system"

Definition at line 1032 of file ri-util.h.

◆ TAN_OPERATOR_NAME

#define TAN_OPERATOR_NAME   "TAN"

Definition at line 165 of file ri-util.h.

◆ TANF_OPERATOR_NAME

#define TANF_OPERATOR_NAME   "tanf"

Definition at line 618 of file ri-util.h.

◆ TANH_OPERATOR_NAME

#define TANH_OPERATOR_NAME   "TANH"

Definition at line 179 of file ri-util.h.

◆ TANHF_OPERATOR_NAME

#define TANHF_OPERATOR_NAME   "tanhf"

Definition at line 636 of file ri-util.h.

◆ TANHL_OPERATOR_NAME

#define TANHL_OPERATOR_NAME   "tanhl"

Definition at line 637 of file ri-util.h.

◆ TANL_OPERATOR_NAME

#define TANL_OPERATOR_NAME   "tanl"

Definition at line 619 of file ri-util.h.

◆ TCGETPGRP_FUNCTION_NAME

#define TCGETPGRP_FUNCTION_NAME   "tcgetpgrp"

Definition at line 869 of file ri-util.h.

◆ TCSETPGRP_FUNCTION_NAME

#define TCSETPGRP_FUNCTION_NAME   "tcsetpgrp"

Definition at line 870 of file ri-util.h.

◆ TELL_SUFFIX

#define TELL_SUFFIX   "0"

suffixes for my own (FCD:-) directives.

these directives are used to instrument the code. must be used carefully. may be ignore with some properties.

Definition at line 1896 of file ri-util.h.

◆ TEMPLATE_SUFFIX

#define TEMPLATE_SUFFIX   "T"

Definition at line 1888 of file ri-util.h.

◆ TEMPNAM_FUNCTION_NAME

#define TEMPNAM_FUNCTION_NAME   "tempnam"

Definition at line 990 of file ri-util.h.

◆ test_to_instruction

#define test_to_instruction   make_instruction_test

Definition at line 1793 of file ri-util.h.

◆ test_to_statement

#define test_to_statement (   t)    instruction_to_statement(test_to_instruction(t))

Definition at line 1797 of file ri-util.h.

◆ TGAMMA_OPERATOR_NAME

#define TGAMMA_OPERATOR_NAME   "tgamma"

Definition at line 702 of file ri-util.h.

◆ TGAMMAF_OPERATOR_NAME

#define TGAMMAF_OPERATOR_NAME   "tgammaf"

Definition at line 703 of file ri-util.h.

◆ TGAMMAL_OPERATOR_NAME

#define TGAMMAL_OPERATOR_NAME   "tgammal"

Definition at line 704 of file ri-util.h.

◆ TIME_EFFECTS_BUFFER_NAME

#define TIME_EFFECTS_BUFFER_NAME   "KALI-BUFFER" /**Kali is the goddess of time in the Hindu mythology */

Definition at line 2016 of file ri-util.h.

◆ TIME_EFFECTS_PACKAGE_NAME

#define TIME_EFFECTS_PACKAGE_NAME   "__TIME_EFFECTS"

package name for time routines

Definition at line 1990 of file ri-util.h.

◆ TIME_EFFECTS_VARIABLE_NAME

#define TIME_EFFECTS_VARIABLE_NAME   "KALI" /**Kali is the goddess of time in the Hindu mythology */

variable holding time effects

Definition at line 2015 of file ri-util.h.

◆ TIME_FUNCTION_NAME [1/2]

#define TIME_FUNCTION_NAME   "time"

include<time.h>

Definition at line 1079 of file ri-util.h.

◆ TIME_FUNCTION_NAME [2/2]

#define TIME_FUNCTION_NAME   "time"

include<time.h>

Definition at line 1079 of file ri-util.h.

◆ TIMEGM_FUNCTION_NAME

#define TIMEGM_FUNCTION_NAME   "timegm"

Definition at line 375 of file ri-util.h.

◆ TIMELOCAL_FUNCTION_NAME

#define TIMELOCAL_FUNCTION_NAME   "timelocal"

Definition at line 376 of file ri-util.h.

◆ TIMEOFF_SUFFIX

#define TIMEOFF_SUFFIX   "3"

Definition at line 1899 of file ri-util.h.

◆ TIMEON_SUFFIX

#define TIMEON_SUFFIX   "2"

Definition at line 1898 of file ri-util.h.

◆ TIMER_CREATE_FUNCTION_NAME

#define TIMER_CREATE_FUNCTION_NAME   "timer_create"

Definition at line 384 of file ri-util.h.

◆ TIMER_DELETE_FUNCTION_NAME

#define TIMER_DELETE_FUNCTION_NAME   "timer_delete"

Definition at line 385 of file ri-util.h.

◆ TIMER_GETOVERRUN_FUNCTION_NAME

#define TIMER_GETOVERRUN_FUNCTION_NAME   "timer_getoverrun"

Definition at line 388 of file ri-util.h.

◆ TIMER_GETTIME_FUNCTION_NAME

#define TIMER_GETTIME_FUNCTION_NAME   "timer_gettime"

Definition at line 387 of file ri-util.h.

◆ TIMER_SETTIME_FUNCTION_NAME

#define TIMER_SETTIME_FUNCTION_NAME   "timer_settime"

Definition at line 386 of file ri-util.h.

◆ TMP_ENT

#define TMP_ENT   1

Constants for some ex-atomizer variable generation.

Definition at line 1850 of file ri-util.h.

◆ TMPFILE64_FUNCTION_NAME

#define TMPFILE64_FUNCTION_NAME   "tmpfile64"

Definition at line 998 of file ri-util.h.

◆ TMPFILE_FUNCTION_NAME

#define TMPFILE_FUNCTION_NAME   "tmpfile"

Definition at line 975 of file ri-util.h.

◆ TMPNAM_FUNCTION_NAME

#define TMPNAM_FUNCTION_NAME   "tmpnam"

Definition at line 976 of file ri-util.h.

◆ TOASCII_OPERATOR_NAME

#define TOASCII_OPERATOR_NAME   "toascii"

Definition at line 562 of file ri-util.h.

◆ TOLOWER_OPERATOR_NAME

#define TOLOWER_OPERATOR_NAME   "tolower"

Definition at line 557 of file ri-util.h.

◆ TOUPPER_OPERATOR_NAME

#define TOUPPER_OPERATOR_NAME   "toupper"

Definition at line 558 of file ri-util.h.

◆ TOWCTRANS_OPERATOR_NAME

#define TOWCTRANS_OPERATOR_NAME   "towctrans"

Definition at line 1165 of file ri-util.h.

◆ TOWLOWER_OPERATOR_NAME

#define TOWLOWER_OPERATOR_NAME   "towlower"

Definition at line 1163 of file ri-util.h.

◆ TOWUPPER_OPERATOR_NAME

#define TOWUPPER_OPERATOR_NAME   "towupper"

Definition at line 1164 of file ri-util.h.

◆ TRUE_OPERATOR_NAME

#define TRUE_OPERATOR_NAME   ".TRUE."

Definition at line 264 of file ri-util.h.

◆ TRUNC_OPERATOR_NAME

#define TRUNC_OPERATOR_NAME   "trunc"

Definition at line 732 of file ri-util.h.

◆ TRUNCATE64_FUNCTION_NAME

#define TRUNCATE64_FUNCTION_NAME   "truncate64"

Definition at line 895 of file ri-util.h.

◆ TRUNCATE_FUNCTION_NAME

#define TRUNCATE_FUNCTION_NAME   "truncate"

Definition at line 894 of file ri-util.h.

◆ TRUNCF_OPERATOR_NAME

#define TRUNCF_OPERATOR_NAME   "truncf"

Definition at line 733 of file ri-util.h.

◆ TRUNCL_OPERATOR_NAME

#define TRUNCL_OPERATOR_NAME   "truncl"

Definition at line 734 of file ri-util.h.

◆ TTYNAME_FUNCTION_NAME [1/2]

#define TTYNAME_FUNCTION_NAME   "ttyname"

Definition at line 856 of file ri-util.h.

◆ TTYNAME_FUNCTION_NAME [2/2]

#define TTYNAME_FUNCTION_NAME   "ttyname"

Definition at line 856 of file ri-util.h.

◆ TTYNAME_R_FUNCTION_NAME

#define TTYNAME_R_FUNCTION_NAME   "ttyname_r"

Definition at line 857 of file ri-util.h.

◆ TTYSLOT_FUNCTION_NAME [1/2]

#define TTYSLOT_FUNCTION_NAME   "ttyslot"

Definition at line 859 of file ri-util.h.

◆ TTYSLOT_FUNCTION_NAME [2/2]

#define TTYSLOT_FUNCTION_NAME   "ttyslot"

Definition at line 859 of file ri-util.h.

◆ TZSET_FUNCTION_NAME

#define TZSET_FUNCTION_NAME   "tzset"

Definition at line 373 of file ri-util.h.

◆ UALARM_FUNCTION_NAME

#define UALARM_FUNCTION_NAME   "ualarm"

Definition at line 800 of file ri-util.h.

◆ ULLTOSTR_FUNCTION_NAME

#define ULLTOSTR_FUNCTION_NAME   "ulltostr"

Definition at line 440 of file ri-util.h.

◆ unary_intrinsic_expression

#define unary_intrinsic_expression (   name,
 
)     call_to_expression(make_call(entity_intrinsic(name),CONS(EXPRESSION,e,NIL)))

Building quickly bool expressions, FC.

Definition at line 1805 of file ri-util.h.

◆ UNARY_MINUS_OPERATOR_NAME

#define UNARY_MINUS_OPERATOR_NAME   "--"

Definition at line 123 of file ri-util.h.

◆ UNARY_PLUS_OPERATOR_NAME

#define UNARY_PLUS_OPERATOR_NAME   "+unary"

Definition at line 124 of file ri-util.h.

◆ UNBOUNDED_DIMENSION_NAME

#define UNBOUNDED_DIMENSION_NAME   "UNBOUNDED-DIMENSION"

Definition at line 82 of file ri-util.h.

◆ UNDEFINED_RAM_OFFSET

#define UNDEFINED_RAM_OFFSET   (-2)

Definition at line 1731 of file ri-util.h.

◆ UNGETC_FUNCTION_NAME

#define UNGETC_FUNCTION_NAME   "ungetc"

Definition at line 958 of file ri-util.h.

◆ UNGETWC_FUNCTION_NAME

#define UNGETWC_FUNCTION_NAME   "ungetwc"

Definition at line 1107 of file ri-util.h.

◆ UNKNOWN_RAM_OFFSET

#define UNKNOWN_RAM_OFFSET   (-1)

Definition at line 1729 of file ri-util.h.

◆ UNLINK_FUNCTION_NAME

#define UNLINK_FUNCTION_NAME   "unlink"

Definition at line 866 of file ri-util.h.

◆ UNLINKAT_FUNCTION_NAME

#define UNLINKAT_FUNCTION_NAME   "unlinkat"

Definition at line 867 of file ri-util.h.

◆ UNLOCKPT_FUNCTION_NAME

#define UNLOCKPT_FUNCTION_NAME   "unlockpt"

Definition at line 421 of file ri-util.h.

◆ unstructured_control

#define unstructured_control   unstructured_entry

After the modification in Newgen: unstructured = entry:control x exit:control we have create a macro to transform automatically unstructured_control to unstructured_entry.

Definition at line 1931 of file ri-util.h.

◆ USLEEP_FUNCTION_NAME

#define USLEEP_FUNCTION_NAME   "usleep"

Definition at line 801 of file ri-util.h.

◆ VALLOC_FUNCTION_NAME

#define VALLOC_FUNCTION_NAME   "valloc"

Definition at line 422 of file ri-util.h.

◆ VERR_FUNCTION_NAME

#define VERR_FUNCTION_NAME   "verr"

Definition at line 351 of file ri-util.h.

◆ VERRX_FUNCTION_NAME

#define VERRX_FUNCTION_NAME   "verrx"

Definition at line 352 of file ri-util.h.

◆ VFORK_FUNCTION_NAME

#define VFORK_FUNCTION_NAME   "vfork"

Definition at line 855 of file ri-util.h.

◆ VFPRINTF_FUNCTION_NAME

#define VFPRINTF_FUNCTION_NAME   "vfprintf"

Definition at line 938 of file ri-util.h.

◆ VFSCANF_FUNCTION_NAME

#define VFSCANF_FUNCTION_NAME   "vfscanf"

Definition at line 939 of file ri-util.h.

◆ VFWPRINTF_FUNCTION_NAME

#define VFWPRINTF_FUNCTION_NAME   "vfwprintf"

Definition at line 1090 of file ri-util.h.

◆ VFWSCANF_FUNCTION_NAME

#define VFWSCANF_FUNCTION_NAME   "vfwscanf"

Definition at line 1091 of file ri-util.h.

◆ VHANGUP_FUNCTION_NAME

#define VHANGUP_FUNCTION_NAME   "vhangup"

Definition at line 879 of file ri-util.h.

◆ VPRINTF_FUNCTION_NAME

#define VPRINTF_FUNCTION_NAME   "vprintf"

Definition at line 942 of file ri-util.h.

◆ VSCANF_FUNCTION_NAME

#define VSCANF_FUNCTION_NAME   "vscanf"

Definition at line 943 of file ri-util.h.

◆ VSNPRINTF_FUNCTION_NAME

#define VSNPRINTF_FUNCTION_NAME   "vsnprintf"

Definition at line 949 of file ri-util.h.

◆ VSPRINTF_FUNCTION_NAME

#define VSPRINTF_FUNCTION_NAME   "vsprintf"

Definition at line 950 of file ri-util.h.

◆ VSSCANF_FUNCTION_NAME

#define VSSCANF_FUNCTION_NAME   "vsscanf"

Definition at line 946 of file ri-util.h.

◆ VSWPRINTF_FUNCTION_NAME

#define VSWPRINTF_FUNCTION_NAME   "vswprintf"

Definition at line 1092 of file ri-util.h.

◆ VSWSCANF_FUNCTION_NAME

#define VSWSCANF_FUNCTION_NAME   "vswscanf"

Definition at line 1093 of file ri-util.h.

◆ VWARN_FUNCTION_NAME

#define VWARN_FUNCTION_NAME   "vwarn"

Definition at line 353 of file ri-util.h.

◆ VWARNX_FUNCTION_NAME

#define VWARNX_FUNCTION_NAME   "vwarnx"

Definition at line 354 of file ri-util.h.

◆ VWPRINTF_FUNCTION_NAME

#define VWPRINTF_FUNCTION_NAME   "vwprintf"

Definition at line 1094 of file ri-util.h.

◆ VWSCANF_FUNCTION_NAME

#define VWSCANF_FUNCTION_NAME   "vwscanf"

Definition at line 1095 of file ri-util.h.

◆ WAIT_FUNCTION_NAME

#define WAIT_FUNCTION_NAME   "wait"

Definition at line 2349 of file ri-util.h.

◆ WARN_FUNCTION_NAME

#define WARN_FUNCTION_NAME   "warn"

Definition at line 349 of file ri-util.h.

◆ WARNX_FUNCTION_NAME

#define WARNX_FUNCTION_NAME   "warnx"

Definition at line 350 of file ri-util.h.

◆ WCRTOMB_FUNCTION_NAME

#define WCRTOMB_FUNCTION_NAME   "wcrtomb"

Definition at line 1142 of file ri-util.h.

◆ WCSCAT_FUNCTION_NAME

#define WCSCAT_FUNCTION_NAME   "wcscat"

Definition at line 1119 of file ri-util.h.

◆ WCSCHR_FUNCTION_NAME

#define WCSCHR_FUNCTION_NAME   "wcschr"

Definition at line 1126 of file ri-util.h.

◆ WCSCMP_FUNCTION_NAME

#define WCSCMP_FUNCTION_NAME   "wcscmp"

Definition at line 1121 of file ri-util.h.

◆ WCSCOLL_FUNCTION_NAME

#define WCSCOLL_FUNCTION_NAME   "wcscoll"

Definition at line 1122 of file ri-util.h.

◆ WCSCPY_FUNCTION_NAME

#define WCSCPY_FUNCTION_NAME   "wcscpy"

Definition at line 1115 of file ri-util.h.

◆ WCSCSPN_FUNCTION_NAME

#define WCSCSPN_FUNCTION_NAME   "wcscspn"

Definition at line 1127 of file ri-util.h.

◆ WCSFTIME_FUNCTION_NAME

#define WCSFTIME_FUNCTION_NAME   "wcsftime"

Definition at line 1136 of file ri-util.h.

◆ WCSLEN_FUNCTION_NAME

#define WCSLEN_FUNCTION_NAME   "wcslen"

Definition at line 1134 of file ri-util.h.

◆ WCSNCAT_FUNCTION_NAME

#define WCSNCAT_FUNCTION_NAME   "wcsncat"

Definition at line 1120 of file ri-util.h.

◆ WCSNCMP_FUNCTION_NAME

#define WCSNCMP_FUNCTION_NAME   "wcsncmp"

Definition at line 1123 of file ri-util.h.

◆ WCSNCPY_FUNCTION_NAME

#define WCSNCPY_FUNCTION_NAME   "wcsncpy"

Definition at line 1116 of file ri-util.h.

◆ WCSPBRK_FUNCTION_NAME

#define WCSPBRK_FUNCTION_NAME   "wcspbrk"

Definition at line 1128 of file ri-util.h.

◆ WCSRCHR_FUNCTION_NAME

#define WCSRCHR_FUNCTION_NAME   "wcsrchr"

Definition at line 1129 of file ri-util.h.

◆ WCSRTOMBS_FUNCTION_NAME

#define WCSRTOMBS_FUNCTION_NAME   "wcsrtombs"

Definition at line 1144 of file ri-util.h.

◆ WCSSPN_FUNCTION_NAME

#define WCSSPN_FUNCTION_NAME   "wcsspn"

Definition at line 1130 of file ri-util.h.

◆ WCSSTR_FUNCTION_NAME

#define WCSSTR_FUNCTION_NAME   "wcsstr"

Definition at line 1131 of file ri-util.h.

◆ WCSTOD_FUNCTION_NAME

#define WCSTOD_FUNCTION_NAME   "wcstod"

Definition at line 1108 of file ri-util.h.

◆ WCSTOF_FUNCTION_NAME

#define WCSTOF_FUNCTION_NAME   "wcstof"

Definition at line 1109 of file ri-util.h.

◆ WCSTOK_FUNCTION_NAME

#define WCSTOK_FUNCTION_NAME   "wcstok"

Definition at line 1132 of file ri-util.h.

◆ WCSTOL_FUNCTION_NAME

#define WCSTOL_FUNCTION_NAME   "wcstol"

Definition at line 1111 of file ri-util.h.

◆ WCSTOLD_FUNCTION_NAME

#define WCSTOLD_FUNCTION_NAME   "wcstold"

Definition at line 1110 of file ri-util.h.

◆ WCSTOLL_FUNCTION_NAME

#define WCSTOLL_FUNCTION_NAME   "wcstoll"

Definition at line 1112 of file ri-util.h.

◆ WCSTOMBS_FUNCTION_NAME

#define WCSTOMBS_FUNCTION_NAME   "wcstombs"

Definition at line 1045 of file ri-util.h.

◆ WCSTOUL_FUNCTION_NAME

#define WCSTOUL_FUNCTION_NAME   "wcstoul"

Definition at line 1113 of file ri-util.h.

◆ WCSTOULL_FUNCTION_NAME

#define WCSTOULL_FUNCTION_NAME   "wcstoull"

Definition at line 1114 of file ri-util.h.

◆ WCSXFRM_FUNCTION_NAME

#define WCSXFRM_FUNCTION_NAME   "wcsxfrm"

Definition at line 1124 of file ri-util.h.

◆ WCTOB_FUNCTION_NAME

#define WCTOB_FUNCTION_NAME   "wctob"

Definition at line 1138 of file ri-util.h.

◆ WCTOMB_FUNCTION_NAME

#define WCTOMB_FUNCTION_NAME   "wctomb"

Definition at line 1043 of file ri-util.h.

◆ WCTRANS_OPERATOR_NAME

#define WCTRANS_OPERATOR_NAME   "wctrans"

Definition at line 1166 of file ri-util.h.

◆ WCTYPE_OPERATOR_NAME

#define WCTYPE_OPERATOR_NAME   "wctype"

Definition at line 1162 of file ri-util.h.

◆ WMEMCHR_FUNCTION_NAME

#define WMEMCHR_FUNCTION_NAME   "wmemchr"

Definition at line 1133 of file ri-util.h.

◆ WMEMCMP_FUNCTION_NAME

#define WMEMCMP_FUNCTION_NAME   "wmemcmp"

Definition at line 1125 of file ri-util.h.

◆ WMEMCPY_FUNCTION_NAME

#define WMEMCPY_FUNCTION_NAME   "wmemcpy"

Definition at line 1117 of file ri-util.h.

◆ WMEMMOVE_FUNCTION_NAME

#define WMEMMOVE_FUNCTION_NAME   "wmemmove"

Definition at line 1118 of file ri-util.h.

◆ WMEMSET_FUNCTION_NAME

#define WMEMSET_FUNCTION_NAME   "wmemset"

Definition at line 1135 of file ri-util.h.

◆ WPRINTF_FUNCTION_NAME

#define WPRINTF_FUNCTION_NAME   "wprintf"

Definition at line 1096 of file ri-util.h.

◆ WRITE_FUNCTION_NAME

#define WRITE_FUNCTION_NAME   "WRITE"

Definition at line 298 of file ri-util.h.

◆ WSCANF_FUNCTION_NAME

#define WSCANF_FUNCTION_NAME   "wscanf"

Definition at line 1097 of file ri-util.h.

◆ Y0_OPERATOR_NAME

#define Y0_OPERATOR_NAME   "y0"

Definition at line 1194 of file ri-util.h.

◆ Y1_OPERATOR_NAME

#define Y1_OPERATOR_NAME   "y1"

Definition at line 1195 of file ri-util.h.

◆ YN_OPERATOR_NAME

#define YN_OPERATOR_NAME   "yn"

Definition at line 1196 of file ri-util.h.

◆ ZERO_OPERATOR_NAME

#define ZERO_OPERATOR_NAME   "0"

Definition at line 267 of file ri-util.h.

Typedef Documentation

◆ remove_a_control_from_a_list_and_relink_direction

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DEFAULT_ENTITY_KIND 
EFFECTS_PACKAGE 
ABSTRACT_LOCATION 
ENTITY_STACK_AREA 
ENTITY_HEAP_AREA 
ENTITY_DYNAMIC_AREA 
ENTITY_STATIC_AREA 
ENTITY_POINTER_DUMMY_TARGETS_AREA 
ENTITY_FORMAL_AREA 

Definition at line 2331 of file ri-util.h.

2332  {
2333  list (*f)(call,int,bool,list*);
2334  int prec;
2336 
2337 enum {
2338  DEFAULT_ENTITY_KIND = 0,
2339  EFFECTS_PACKAGE = 1,
2340  ABSTRACT_LOCATION = 2,
2341  ENTITY_STACK_AREA = 4,
void const char const char const int
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
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
@ EFFECTS_PACKAGE
Definition: ri-util.h:2333
@ ABSTRACT_LOCATION
Definition: ri-util.h:2334
@ DEFAULT_ENTITY_KIND
Definition: ri-util.h:2332
@ ENTITY_STACK_AREA
Definition: ri-util.h:2335
struct _newgen_struct_call_ * call
Definition: ri.h:63
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
for intrinsic registration

◆ if_clause_policy

that is all for ri-util-local.h

Enumerator
IGNORE_IF_POLICY 
AND_IF_POLICY 
OR_IF_POLICY 
IGNORE_IF_POLICY 
AND_IF_POLICY 
OR_IF_POLICY 

Definition at line 2319 of file ri-util.h.

2325  {

◆ range_to_expression_mode

Enumerator
range_to_distance 
range_to_nbiter 
range_to_distance 
range_to_nbiter 

Definition at line 2306 of file ri-util.h.

2312  {

◆ remove_a_control_from_a_list_and_relink_direction

For the control graph modifiers:

To specify the way that remove_a_control_from_a_list_and_relink acts:

Enumerator
source_is_predecessor_and_dest_is_successor 

Put some strange number to avoid random clash as much as possible...

source_is_successor_and_dest_is_predecessor 
source_is_predecessor_and_dest_is_successor 

Put some strange number to avoid random clash as much as possible...

source_is_successor_and_dest_is_predecessor 

Definition at line 1838 of file ri-util.h.

1839 {
1840  /* Put some strange number to avoid random clash as much as
1841  possible... */
1844  };
@ 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

Function Documentation

◆ abs_expression_p()

bool abs_expression_p ( expression  e)

Definition at line 1024 of file expression.c.

1026 {
1028 }
#define ABS_OPERATOR_NAME
bool operator_expression_p(expression e, string op_name)
Definition: expression.c:1087

References ABS_OPERATOR_NAME, and operator_expression_p().

+ Here is the call graph for this function:

◆ abstract_state_variable_p()

bool abstract_state_variable_p ( entity  v)

Definition at line 2572 of file entity.c.

2573 {
2574  bool abstract_state_p = gen_in_list_p(v, abstract_state_entities);
2575 
2576  return abstract_state_p;
2577 }
bool gen_in_list_p(const void *vo, const list lx)
tell whether vo belongs to lx
Definition: list.c:734
static list abstract_state_entities
FI: hidden variables added to take into account the side effects in the libc.
Definition: entity.c:2555

References abstract_state_entities, and gen_in_list_p().

Referenced by analyzable_scalar_entity_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ actual_label_replacement_p()

bool actual_label_replacement_p ( expression  eap)

Assumes that eap is a call.

Parameters
eapap

Definition at line 1811 of file variable.c.

1812 {
1813  bool replacement_p = false;
1814  if (expression_call_p(eap))
1815  {
1816  const char * ls = entity_user_name(call_function(syntax_call(expression_syntax(eap))));
1817  const char * p = ls+1;
1818 
1819  replacement_p = (strlen(ls) >= 4
1820  && *ls=='"' && *(ls+1)=='*' && *(ls+strlen(ls)-1)=='"');
1821 
1822  if(replacement_p) {
1823  for(p=ls+2; p<ls+strlen(ls)-1; p++) {
1824  if(*p<'0'||*p>'9') {
1825  replacement_p =false;
1826  break;
1827  }
1828  }
1829  }
1830  }
1831 
1832  return replacement_p;
1833 }
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
Definition: entity.c:487
bool expression_call_p(expression e)
Definition: expression.c:415
#define call_function(x)
Definition: ri.h:709
#define syntax_call(x)
Definition: ri.h:2736
#define expression_syntax(x)
Definition: ri.h:1247

References call_function, entity_user_name(), expression_call_p(), expression_syntax, and syntax_call.

Referenced by call_contains_alternate_returns_p(), and words_regular_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add_abstract_state_variable()

void add_abstract_state_variable ( entity  v)

This might happen when a workspace is closed and another one open or created within one session.

The package name of v could be checked... especially if package names are unified.

Definition at line 2558 of file entity.c.

2559 {
2561  /* This might happen when a workspace is closed and another one
2562  open or created within one session. */
2563  //pips_internal_error("Thread-safe entity \"%s\" redeclared", entity_name(v));
2564  ;
2565  }
2566  else {
2567  /* The package name of v could be checked... especially if package names are unified. */
2569  }
2570 }
#define ENTITY(x)
ENTITY.
Definition: ri.h:2755

References abstract_state_entities, CONS, ENTITY, gen_in_list_p(), gen_nconc(), and NIL.

Referenced by CreateHeapAbstractState(), CreateLogicalUnits(), CreateMemmoveAbstractState(), CreateRandomSeed(), and CreateTimeSeed().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add_any_variable_to_area()

int add_any_variable_to_area ( entity  a,
entity  v,
bool  is_fortran_p 
)

COMMONs are supposed to have the same layout in each routine

the local areas are StaticArea and DynamicArea in fortran

the areas are localStaticArea, localDynamicArea, moduleStaticArea, globalStaticArea in C; but we also mange the stack for variable of dependent types, the heap area to model dynamic allocation and the formal area to model the formal context in C.

FI: I have a (temporary?) problem with some stub functional variables generated by the points-to analysis. In fact, the should be declared as pointers to functions, not as functions. I also have problem with overloaded stubs...

Parameters
is_fortran_ps_fortran_p

Definition at line 1386 of file variable.c.

1387 {
1388  int OldOffset=-1;
1389  type ta = entity_type(a);
1390  area aa = type_area(ta);
1391 
1392  if(top_level_entity_p(a) && is_fortran_p ) {
1393  /* COMMONs are supposed to have the same layout in each routine */
1394  pips_internal_error("COMMONs should not be modified");
1395  }
1396  else {
1397  /* the local areas are StaticArea and DynamicArea in fortran */
1398  /* the areas are localStaticArea, localDynamicArea,
1399  moduleStaticArea, globalStaticArea in C; but we also mange the
1400  stack for variable of dependent types, the heap area to model
1401  dynamic allocation and the formal area to model the formal
1402  context in C. */
1403  int s = 0;
1404  OldOffset = area_size(aa);
1405  /* FI: I have a (temporary?) problem with some stub functional
1406  variables generated by the points-to analysis. In fact, the
1407  should be declared as pointers to functions, not as
1408  functions. I also have problem with overloaded stubs... */
1409  type uet = ultimate_type(entity_type(v));
1410  if(!type_variable_p(uet)
1411  || overloaded_type_p(uet)
1412  || !SizeOfArray(v, &s)) {
1413  if(is_fortran_p)
1414  return DYNAMIC_RAM_OFFSET;
1415  else {
1416  if(!gen_in_list_p(v, area_layout(aa)))
1417  area_layout(aa) = gen_nconc(area_layout(aa), CONS(ENTITY, v, NIL));
1418  }
1419  }
1420 
1421  if(is_fortran_p)
1422  {
1423  area_layout(aa) = gen_nconc(area_layout(aa), CONS(ENTITY, v, NIL));
1424  area_size(aa) = OldOffset+s;
1425  }
1426  else
1427  {
1428  if(!gen_in_list_p(v, area_layout(aa)))
1429  area_layout(aa) = gen_nconc(area_layout(aa), CONS(ENTITY, v, NIL));
1430  area_size(aa) = OldOffset+s;
1431  }
1432  }
1433  return(OldOffset);
1434 }
#define pips_internal_error
Definition: misc-local.h:149
#define DYNAMIC_RAM_OFFSET
FI: I would have assumed that it is used for the stack area, but I must be wrong.....
bool top_level_entity_p(entity e)
Check if the scope of entity e is global.
Definition: entity.c:1130
type ultimate_type(type)
Definition: type.c:3466
bool SizeOfArray(entity, int *)
This function computes the total size of a variable in bytes, ie.
Definition: size.c:87
bool overloaded_type_p(type)
Returns true if t is a variable type with a basic overloaded.
Definition: type.c:2666
#define area_size(x)
Definition: ri.h:544
#define area_layout(x)
Definition: ri.h:546
#define type_area(x)
Definition: ri.h:2946
#define type_variable_p(x)
Definition: ri.h:2947

References area_layout, area_size, CONS, DYNAMIC_RAM_OFFSET, ENTITY, entity_type, gen_in_list_p(), gen_nconc(), NIL, overloaded_type_p(), pips_internal_error, SizeOfArray(), top_level_entity_p(), type_area, type_variable_p, and ultimate_type().

Referenced by add_C_variable_to_area(), add_variable_to_area(), make_global_entity_from_local(), and make_scalar_integer_entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add_C_variable_to_area()

int add_C_variable_to_area ( entity  a,
entity  v 
)

Definition at line 1381 of file variable.c.

1382 {
1383  return(add_any_variable_to_area(a, v, false));
1384 }
int add_any_variable_to_area(entity a, entity v, bool is_fortran_p)
Definition: variable.c:1386

References add_any_variable_to_area().

Referenced by CCompilationUnitMemoryAllocations(), CModuleMemoryAllocation(), create_stub_entity(), entity_flow_or_context_sentitive_heap_location(), generic_make_entity_copy_with_new_name(), make_scalar_entity(), outliner_patch_parameters(), and step_parameter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add_expression_p()

bool add_expression_p ( expression  e)

Test if an expression is an addition.

Definition at line 986 of file expression.c.

986  {
989  ;
990 }
#define PLUS_OPERATOR_NAME
#define PLUS_C_OPERATOR_NAME

References operator_expression_p(), PLUS_C_OPERATOR_NAME, and PLUS_OPERATOR_NAME.

Referenced by incrementation_expression_to_increment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add_integer_to_expression()

expression add_integer_to_expression ( expression  exp,
int  val 
)
Returns
a new expression that adds the an expression with an integer
Parameters
e,theexpression to add
n,theinteger to add
Parameters
expxp
valal

Definition at line 2132 of file expression.c.

2132  {
2134 }
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
#define exp
Avoid some warnings from "gcc -Wshadow".
Definition: vasnprintf.c:207

References exp, int_to_expression(), make_op_exp(), and PLUS_OPERATOR_NAME.

Referenced by do_linearize_array_reference(), and region_to_minimal_dimensions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add_non_declared_reference_to_declaration()

void add_non_declared_reference_to_declaration ( reference  ref)

type t = entity_type(var);

Parameters
refef

Definition at line 142 of file module.c.

143 {
145  /* type t = entity_type(var); */
146 
148  {
150  code ce = value_code(val);
151  list decl = code_declarations (ce);
153  string name=strdup(concatenate(
156  entity_local_name(var),
157  NULL));
159  {
160  pips_debug(8, "ajout de la variable symbolique %s au module %s\n",
162 
163  ent = make_entity(name,
164  copy_type(entity_type(var)),
166  copy_value(entity_initial(var)));
167 
168  code_declarations(ce) = gen_nconc(decl,
169  CONS(ENTITY, ent, NIL));
170  }
171  }
172 }
type copy_type(type p)
TYPE.
Definition: ri.c:2655
value copy_value(value p)
VALUE.
Definition: ri.c:2784
storage copy_storage(storage p)
STORAGE.
Definition: ri.c:2228
static reference ref
Current stmt (an integer)
Definition: adg_read_paf.c:163
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
Definition: misc-local.h:145
#define MODULE_SEP_STRING
Definition: naming-local.h:30
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183
void * gen_find_tabulated(const char *, int)
Definition: tabulated.c:218
#define make_entity(n, t, s, i)
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
const char * module_local_name(entity e)
Returns the module local user name.
Definition: entity.c:582
bool variable_in_module_p2(entity v, entity m)
Definition: module.c:94
static entity checked_module
Definition: module.c:41
#define reference_variable(x)
Definition: ri.h:2326
#define code_declarations(x)
Definition: ri.h:784
#define entity_undefined
Definition: ri.h:2761
#define entity_name(x)
Definition: ri.h:2790
#define value_code(x)
Definition: ri.h:3067
#define entity_domain
newgen_syntax_domain_defined
Definition: ri.h:410
char * strdup()

References checked_module, code_declarations, concatenate(), CONS, copy_storage(), copy_type(), copy_value(), ENTITY, entity_domain, entity_initial, entity_local_name(), entity_name, entity_storage, entity_type, entity_undefined, gen_find_tabulated(), gen_nconc(), make_entity, module_local_name(), MODULE_SEP_STRING, NIL, pips_debug, ref, reference_variable, strdup(), value_code, and variable_in_module_p2().

Referenced by variable_declaration_coherency_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add_ordering_of_the_statement_to_current_mapping()

bool add_ordering_of_the_statement_to_current_mapping ( statement  stat)

Add the statement for its ordering, if any, in the hash-map.

Parameters
stattat

Definition at line 130 of file ordering.c.

131 {
132  pips_assert("ordering is defined",
134  hash_put(OrderingToStatement, (void *) statement_ordering(stat), (void *) stat);
135  return true;
136 }
void hash_put(hash_table htp, const void *key, const void *val)
This functions stores a couple (key,val) in the hash table pointed to by htp.
Definition: hash.c:364
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
Definition: misc-local.h:172
#define STATEMENT_ORDERING_UNDEFINED
mapping.h inclusion
Definition: newgen-local.h:35
static hash_table OrderingToStatement
a hash table to map orderings (integer) to statements (pointers) assumed to be valid for the current ...
Definition: ordering.c:58
#define statement_ordering(x)
Definition: ri.h:2454

References hash_put(), OrderingToStatement, pips_assert, statement_ordering, and STATEMENT_ORDERING_UNDEFINED.

+ Here is the call graph for this function:

◆ add_pragma_expr_to_statement()

void add_pragma_expr_to_statement ( statement  st,
list  l 
)

Add a pragma as a list of expression to a statement.

Returns
void
Parameters
st,thestatement on which we want to add a pragma
l,thelist of expression.

Make a new pragma:

Add the new pragma to the extension list:

extern string pragma_to_string(pragma);

string str = pragma_to_string (p);

if (str != string_undefined)

pips_debug (5, "pragma : %s added\n", str);

Parameters
stt

Definition at line 460 of file pragma.c.

460  {
462  /* Make a new pragma: */
464  p = make_pragma_expression(l);
466  /* Add the new pragma to the extension list: */
467  list el = extensions_extension(es);
468  el = gen_extension_cons(e, el);
469  extensions_extension(es) = el;
470  ifdebug (5) {
471  // This is debugging code. It creates a cycle between ri-util and prettyprint
472  /* extern string pragma_to_string(pragma); */
473  /* string str = pragma_to_string (p); */
474  /* if (str != string_undefined) */
475  /* pips_debug (5, "pragma : %s added\n", str); */
476  ;
477  }
478 }
list gen_extension_cons(extension p, list l)
Definition: ri.c:908
pragma make_pragma_expression(list _field_)
Definition: ri.c:1778
extension make_extension_pragma(pragma _field_)
Definition: ri.c:938
#define pragma_undefined
Definition: ri.h:1997
#define statement_extensions(x)
Definition: ri.h:2464
#define extensions_extension(x)
Definition: ri.h:1330
#define ifdebug(n)
Definition: sg.c:47

References extensions_extension, gen_extension_cons(), ifdebug, make_extension_pragma(), make_pragma_expression(), pragma_undefined, and statement_extensions.

Referenced by merge_on_outer(), omp_pragma_expr_for(), and omp_pragma_expr_for_reduction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add_pragma_str_to_statement()

void add_pragma_str_to_statement ( statement  st,
const char *  s,
bool  copy_flag 
)

Add a string as a pragma to a statement.

Returns
void
Parameters
st,thestatement on which we want to add a pragma
s,thepragma string.
copy_flag,tobe set to true to duplicate the string

Duplicate string if requested

dangerous !

Make a new pragma

Will be save as an extension attached to the statement's extension list

Parameters
stt
copy_flagopy_flag

Definition at line 425 of file pragma.c.

425  {
426  /* Duplicate string if requested */
427  string ps = copy_flag ? strdup(s) : (char*)s /* dangerous !*/;
428 
429  /* Make a new pragma */
430  pragma p = make_pragma_string(ps);
431 
432  /* Will be save as an extension attached to
433  * the statement's extension list
434  */
437  list el = extensions_extension(es);
438  el = gen_extension_cons(e, el);
439  extensions_extension(es) = el;
440 }
pragma make_pragma_string(string _field_)
Definition: ri.c:1775

References extensions_extension, gen_extension_cons(), make_extension_pragma(), make_pragma_string(), statement_extensions, and strdup().

Referenced by add_pragma(), add_pragma_strings_to_statement(), add_pragma_to_sequence(), add_shutdown_pragma_to_return(), add_to_stmt(), compile_omp(), do_computation_intensity(), do_loop_expansion_init(), gen_omp_parallel(), gen_omp_taskwait(), gen_synchronization(), get_statement_pragma_init(), get_statement_pragma_register(), get_statement_pragma_shutdown(), insert_endscop_after_stmt(), insert_endscop_before_stmt(), insert_endscop_in_sequence(), insert_optional_pragma(), new_step_directive(), and normalize_microcode_anotate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add_pragma_strings_to_statement()

void add_pragma_strings_to_statement ( statement  st,
list  l,
bool  copy_flag 
)

Add a list of strings as as many pragmas to a statement.

Parameters
st,thestatement on which we want to add a pragma
l,alist of pragma string(s)
copy_flag,tobe set to true to duplicate the string
Parameters
stt
copy_flagopy_flag

Definition at line 448 of file pragma.c.

448  {
449  FOREACH(STRING, p, l)
450  add_pragma_str_to_statement(st, p, copy_flag);
451 }
#define STRING(x)
Definition: genC.h:87
#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
void add_pragma_str_to_statement(statement st, const char *s, bool copy_flag)
Add a string as a pragma to a statement.
Definition: pragma.c:425

References add_pragma_str_to_statement(), FOREACH, and STRING.

+ Here is the call graph for this function:

◆ add_subscript_to_reference()

reference add_subscript_to_reference ( reference  r,
expression  s 
)

Add a last subscript expression s to a reference r.

The validity of the input reference is not checked. The validity of the output reference is not checked either.

Definition at line 224 of file expression.c.

225 {
227  CONS(EXPRESSION, s, NIL));
228  return r;
229 }
#define reference_indices(x)
Definition: ri.h:2328

References CONS, EXPRESSION, gen_nconc(), NIL, and reference_indices.

Referenced by substitute_struct_stub_in_transformer(), transformer_apply_field_assignments_or_equalities(), and transformer_apply_unknown_field_assignments_or_equalities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add_symbolic_constant_to_declaration()

void add_symbolic_constant_to_declaration ( call  c)

Definition at line 175 of file module.c.

176 {
179  code ce = value_code(val);
180  list decl = code_declarations (ce);
184  entity_local_name(call_function(c)), NULL));
185  if ((ent = gen_find_tabulated(name,entity_domain)) == entity_undefined) {
186  ifdebug(8)
187  (void) fprintf(stderr,"ajout de la variable symbolique %s au module %s\n",
190 
191  ent = make_entity( name,
195 
196  code_declarations(ce) = gen_nconc(decl,
197  CONS(ENTITY, ent, NIL));
198  }
199  }
200 }
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...

References call_function, checked_module, code_declarations, concatenate(), CONS, copy_storage(), copy_type(), copy_value(), ENTITY, entity_domain, entity_initial, entity_local_name(), entity_name, entity_storage, entity_type, entity_undefined, fprintf(), gen_find_tabulated(), gen_nconc(), ifdebug, make_entity, module_local_name(), MODULE_SEP_STRING, NIL, strdup(), value_code, and value_symbolic_p.

Referenced by variable_declaration_coherency_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add_thread_safe_variable()

void add_thread_safe_variable ( entity  v)

This might happen when a workspace is closed and another one open or created within one session.

The package name of v could be checked... especially if package names are unified.

Definition at line 2525 of file entity.c.

2526 {
2528  /* This might happen when a workspace is closed and another one
2529  open or created within one session. */
2530  //pips_internal_error("Thread-safe entity \"%s\" redeclared", entity_name(v));
2531  ;
2532  }
2533  else {
2534  /* The package name of v could be checked... especially if package names are unified. */
2536  }
2537 }
static list thread_safe_entities
FI: it is assumed that thread safe entities are invariant with respect to workspaces.
Definition: entity.c:2523

References CONS, ENTITY, gen_in_list_p(), gen_nconc(), NIL, and thread_safe_entities.

Referenced by CreateHeapAbstractState(), and CreateMemmoveAbstractState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add_variable_to_area()

◆ AddEntityToCurrentModule()

void AddEntityToCurrentModule ( entity  e)

Add a variable entity to the current module declarations.

There is no declaration local to a statement in Fortran:

Definition at line 260 of file variable.c.

260  {
261  entity module_e = get_current_module_entity();
262  /* There is no declaration local to a statement in Fortran: */
263  statement module_s = c_module_p(module_e) ? get_current_module_statement()
265 
266  AddLocalEntityToDeclarations(e, module_e, module_s);
267 }
statement get_current_module_statement(void)
Get the current module statement.
Definition: static.c:208
entity get_current_module_entity(void)
Get the entity of the current module.
Definition: static.c:85
void AddLocalEntityToDeclarations(entity e, entity module, statement s)
Add the variable entity e to the list of variables of the function module.
Definition: variable.c:233
bool c_module_p(entity m)
Test if a module "m" is written in C.
Definition: entity.c:2777
#define statement_undefined
Definition: ri.h:2419

References AddLocalEntityToDeclarations(), c_module_p(), get_current_module_entity(), get_current_module_statement(), and statement_undefined.

Referenced by atomize_this_expression(), comEngine_make_new_scalar_variable(), complexity_sigma(), create_counter(), create_new_ent_list(), do_atomize_call(), do_loop_expansion(), do_loop_nest_unswitching(), do_loop_unroll_with_prologue(), do_scalar_renaming_in_vertex(), do_split_structure_parameter(), do_symbolic_tiling(), do_terapix_argument_handler(), find_or_create_newInd(), fix_loop_index_sign(), generate_optimized_code_for_loop_nest(), generate_scalar_variables(), generate_scalar_variables_from_list(), hpfc_new_variable(), inline_expression_call(), loop_to_complexity(), make_loadsave_statement(), make_new_entity(), make_new_index_entity(), make_new_simd_vector_with_prefix(), make_shuffle_statement(), process_true_call_stat(), regenerate_toggles(), sesamify(), set_the_i(), simd_atomize_this_expression(), simd_loop_unroll(), simplify_subscript(), st_compute_ith_local_index(), terapix_loop_handler(), and terapix_optimize_accumulator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddEntityToCurrentModuleWithoutDeclaration()

void AddEntityToCurrentModuleWithoutDeclaration ( entity  e)

Add a variable entity to the current module declarations.

There is no declaration local to a statement in Fortran:

Definition at line 271 of file variable.c.

271  {
272  entity module_e = get_current_module_entity();
273  /* There is no declaration local to a statement in Fortran: */
274  statement module_s = c_module_p(module_e) ? get_current_module_statement()
276 
277  AddLocalEntityToDeclarationsOnly(e, module_e, module_s);
278 }
void AddLocalEntityToDeclarationsOnly(entity e, entity module, statement s)
Add the variable entity e to the list of variables of the function module.
Definition: variable.c:253

References AddLocalEntityToDeclarationsOnly(), c_module_p(), get_current_module_entity(), get_current_module_statement(), and statement_undefined.

+ Here is the call graph for this function:

◆ AddEntityToDeclarations()

void AddEntityToDeclarations ( entity  e,
entity  module 
)

END_EOLE.

Add a global variable e to the variable declarations of a module.

It does nothing if e is already in the list.

In the general case you should use AddLocalEntityToDeclarations() or AddEntityToCurrentModule() instead.

Since in C, variables should be added to the statement declarations too, only use this function for special stuff like compilation unit and special area delarations in the module bootstrapping.

Add the variable to the module declarations

Add the declaration only if not already here:

Parameters
moduleodule

Definition at line 108 of file variable.c.

108  {
109  pips_assert("module is fine",entity_consistent_p(module));
110  pips_assert("entity is fine",entity_consistent_p(e));
111  /* Add the variable to the module declarations */
112  list l =
114  /* Add the declaration only if not already here: */
117 }
bool entity_consistent_p(entity p)
Definition: ri.c:2530
#define gen_chunk_undefined_p(c)
Definition: genC.h:75
void * gen_find_eq(const void *item, const list seq)
Definition: list.c:422
static char * module
Definition: pips.c:74
code EntityCode(entity e)
this function checks that e has an initial value code.
Definition: entity.c:301

References code_declarations, CONS, ENTITY, entity_consistent_p(), EntityCode(), gen_chunk_undefined_p, gen_find_eq(), module, and pips_assert.

Referenced by add_entity_to_declarations(), AddCommonToModule(), AddEntityToHostAndNodeModules(), AddEntityToModule(), array_scalar_access_to_bank_communication(), array_scalar_access_to_compute_communication(), build_new_variable(), clone_variable_with_new_name(), create_bound_entity(), create_local_index(), create_local_index2(), create_new_common_variable(), create_private_integer_variable_for_new_module(), create_state_variable(), create_stub_entity(), declare_common_variables_in_module(), DeclareIntrinsic(), DeclareVariable(), entity_flow_or_context_sentitive_heap_location(), find_entity(), generic_make_entity_copy_with_new_name(), GenericAddLocalEntityToDeclarations(), gfc2pips_namespace(), init_c_areas(), init_c_implicit_variables(), init_host_and_node_entities(), InitAreas(), inline_expression_call(), insert_run_time_communications(), loop_strip_mine(), make_common_entity(), make_empty_module(), make_emulated_shared_variable(), make_new_local_variables(), MakeCommon(), MakeCurrentFunction(), MakeDerivedEntity(), MakeExternalFunction(), module_to_wp65_modules(), new_synonym(), reference_conversion_computation(), and ScanFormalParameters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddEntityToModule()

entity AddEntityToModule ( entity  e,
entity  module 
)

!!! caution, it may not be a module, but a common...

Parameters
moduleodule

Definition at line 3171 of file entity.c.

3172 {
3174  entity_local_name(e), e);
3175 
3176  pips_debug(7, "adding %s to module %s\n",
3177  entity_name(new), entity_name(module));
3178 
3179  if (entity_module_p(module))
3181 
3182  return new;
3183 }
bool entity_module_p(entity e)
Definition: entity.c:683
entity FindOrCreateEntityLikeModel(const char *package, const char *name, entity model)
hmmm...
Definition: entity.c:3136
void AddEntityToDeclarations(entity, entity)
END_EOLE.
Definition: variable.c:108

References AddEntityToDeclarations(), entity_local_name(), entity_module_p(), entity_name, FindOrCreateEntityLikeModel(), module, module_local_name(), and pips_debug.

Referenced by add_declaration_to_host_and_link(), AddCommonToModule(), AddEntityToHostAndNodeModules(), dimensions_to_dma(), and NormalizeCommonVariables().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddLocalEntityToDeclarations()

void AddLocalEntityToDeclarations ( entity  e,
entity  module,
statement  s 
)

Add the variable entity e to the list of variables of the function module.

For a C module, the variable is also added as local to the given statement s. A global variable to a module should be added to the global statement module (given by get_current_module_statement() for example. The consistency of the internal representation is maintained.

Parameters
evariable entity to add
moduleentity
sstatement where entity must be added. A new declaraton statement for e is added. It can be statement_undefined in the case of a Fortran module
Parameters
moduleodule

Definition at line 233 of file variable.c.

233  {
235 }
static void GenericAddLocalEntityToDeclarations(entity e, entity module, statement s, bool add_declaration_statement_p)
See the two user interfaces below.
Definition: variable.c:152

References GenericAddLocalEntityToDeclarations(), and module.

Referenced by AddEntityToCompilationUnit(), AddEntityToCurrentModule(), do_clone_entity(), do_group_constants_terapix(), do_kernelize(), do_split_structures(), effects_to_dma(), FixCReturnStatements(), generic_clone_variable_with_unique_name(), inline_expression_call(), make_new_simd_vector_with_prefix(), make_reduction_vector_entity(), mpi_initialize(), outliner_parameters(), outliner_scan(), redeclaration_enter_statement(), sac_make_new_variable(), statements_localize_declarations(), step_RT_set_local_declarations(), and terapix_loop_optimizer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddLocalEntityToDeclarationsOnly()

void AddLocalEntityToDeclarationsOnly ( entity  e,
entity  module,
statement  s 
)

Add the variable entity e to the list of variables of the function module.

For a C module, the variable is also added as local to the given statement s. A global variable to a module should be added to the global statement module (given by get_current_module_statement() for example. The consistency of the internal representation is not maintained, but this is useful for the controlizer.

Parameters
evariable entity to add
moduleentity
sstatement where entity must be added. No new declaration ststement is added. It can be statement_undefined in the case of a Fortran module
Parameters
moduleodule

Definition at line 253 of file variable.c.

253  {
255 }

References GenericAddLocalEntityToDeclarations(), and module.

Referenced by AddEntityToCurrentModuleWithoutDeclaration(), clean_up_sequences_rewrite(), copy_write_statement_with_cumulated_regions(), and generic_clone_variable_with_unique_name().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddPackageToName()

char* AddPackageToName ( string  p,
string  n 
)

This function concatenate a package name and a local name to produce a global entity name.

Previous comment: This function creates a fortran operator parameter, i.e. a zero dimension variable with an overloaded basic type.

Moved from bootstrap.c

Definition at line 2134 of file entity.c.

2136 {
2137  string ps;
2138  int l;
2139 
2140  l = strlen(p);
2141  ps = gen_strndup(p, l + 1 + strlen(n) +1);
2142 
2143  *(ps+l) = MODULE_SEP;
2144  *(ps+l+1) = '\0';
2145  strcat(ps, n);
2146 
2147  return(ps);
2148 }
#define MODULE_SEP
special characters to build entity names of various kinds
Definition: naming-local.h:27
string gen_strndup(string, size_t)
string.c
Definition: string.c:59

References gen_strndup(), and MODULE_SEP.

Referenced by CreateAbstractStateVariable(), CreateAreas(), CreateLogicalUnits(), and MakeIntrinsic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ adjust_goto_from_to()

void adjust_goto_from_to ( statement  s1,
statement  s2 
)

Adjust all the GOTOs pointing s1 to s2:

Parameters
s11
s22

Definition at line 282 of file clean_up_sequences.c.

284 {
285  if (s1 == s2)
286  // Nothing to do:
287  return;
288 
290  {
292  {
293  pips_assert("The GOTO should point to s1.\n",
294  instruction_goto(i) == s1);
295  instruction_goto(i) = s2;
296  pips_debug(6, "Adjusting GOTO from instruction %p -> statement %p to "
297  "statement %p.\n",
298  i, s1, s2);
299  }
300  }
301 }
hash_table statement_to_goto_table
clean_up_sequences.c
void * hash_get(const hash_table htp, const void *key)
this function retrieves in the hash table pointed to by htp the couple whose key is equal to key.
Definition: hash.c:449
bool hash_defined_p(const hash_table htp, const void *key)
true if key has e value in htp.
Definition: hash.c:484
#define instruction_goto(x)
Definition: ri.h:1526
s1
Definition: set.c:247

References FOREACH, hash_defined_p(), hash_get(), instruction_goto, pips_assert, pips_debug, s1, and statement_to_goto_table.

Referenced by clean_up_sequences_rewrite().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ allocatable_area_p()

bool allocatable_area_p ( entity  aire)
Parameters
aireire

Definition at line 64 of file area.c.

64  {
66 }
#define ALLOCATABLE_AREA_LOCAL_NAME
Definition: naming-local.h:73
#define same_string_p(s1, s2)

References ALLOCATABLE_AREA_LOCAL_NAME, module_local_name(), and same_string_p.

+ Here is the call graph for this function:

◆ any_function_to_return_value()

entity any_function_to_return_value ( entity  m)

Same as function_to_return_value(), but returns value_undefined when m is a C void function or a Fortran subroutine.

Definition at line 516 of file module.c.

517 {
518  return generic_function_to_return_value(m, false);
519 }
entity generic_function_to_return_value(entity m, bool safe_p)
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

References generic_function_to_return_value().

Referenced by filter_formal_out_context_according_to_formal_in_context(), points_to_cell_translation(), and points_to_set_block_projection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ area_equal_p()

bool area_equal_p ( area  a1,
area  a2 
)

layouts are independent ?

Parameters
a11
a22

Definition at line 733 of file type.c.

734 {
735  if(a1 == a2)
736  return true;
737  else if (a1 == area_undefined && a2 != area_undefined)
738  return false;
739  else if (a1 != area_undefined && a2 == area_undefined)
740  return false;
741  else
742  /* layouts are independent ? */
743  return (area_size(a1) == area_size(a2));
744 }
#define area_undefined
Definition: ri.h:520

References area_size, and area_undefined.

Referenced by generic_type_equal_p().

+ Here is the caller graph for this function:

◆ arguments_add_entity()

◆ arguments_difference()

cons* arguments_difference ( cons a1,
cons a2 
)

set difference: a1 - a2 ; similar to set intersection

should gen_nconc be used ?!? Or is it only useful to chain stuff at the end of a list?

Parameters
a11
a22

Definition at line 233 of file arguments.c.

236 {
237  cons * a = NIL;
238  MAPL(ca1, {
239  entity e1 = ENTITY(CAR(ca1));
240  if(!entity_is_argument_p(e1, a2))
241  /* should gen_nconc be used ?!? Or is it only useful to
242  chain stuff at the end of a list? */
243  a = CONS(ENTITY, e1, a);
244  },
245  a1);
246  return a;
247 }
#define CAR(pcons)
Get the value of the first element of a list.
Definition: newgen_list.h:92
#define MAPL(_map_list_cp, _code, _l)
Apply some code on the addresses of all the elements of a list.
Definition: newgen_list.h:203

References CAR, CONS, ENTITY, entity_is_argument_p(), MAPL, and NIL.

Referenced by dump_common_layout(), precondition_intra_to_inter(), print_C_common_layout(), print_common_layout(), recompute_loop_transformer(), region_exact_projection_along_parameters(), regions_transformer_apply(), statement_to_postcondition(), statement_to_total_precondition(), transformer_filter(), and transformer_list_multiple_closure_to_precondition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ arguments_equal_p()

bool arguments_equal_p ( list  a1,
list  a2 
)

Check the syntactic equality of lists a1 and a2.

To check the equality of a1 and a2 as sets, use argument intersection and a cardinal equality, assuming no entity occurs more than once in a1 or a2.

Parameters
a11
a22

Definition at line 139 of file arguments.c.

140 {
141  list ca1;
142  list ca2;
143 
144  for( ca1 = a1, ca2 = a2; !ENDP(ca1) && !ENDP(ca2); POP(ca1), POP(ca2))
145  if(ENTITY(CAR(ca1))!=ENTITY(CAR(ca2))) break;
146 
147  return ENDP(ca1) && ENDP(ca2);
148 }
#define ENDP(l)
Test if a list is empty.
Definition: newgen_list.h:66
#define POP(l)
Modify a list pointer to point on the next element of the list.
Definition: newgen_list.h:59

References CAR, ENDP, ENTITY, and POP.

◆ arguments_intersection()

list arguments_intersection ( list  a1,
list  a2 
)

Build a new list with all entities occuring in both a1 and a2.

should gen_nconc be used ?!? Or is it only useful to chain stuff at the end of a list?

Parameters
a11
a22

Definition at line 158 of file arguments.c.

159 {
160  list a = NIL;
161  FOREACH(ENTITY, e1, a1) {
162  if(entity_is_argument_p(e1, a2))
163  /* should gen_nconc be used ?!? Or is it only useful to
164  chain stuff at the end of a list? */
165  a = CONS(ENTITY, e1, a);
166  }
167 
168  return a;
169 }

References CONS, ENTITY, entity_is_argument_p(), FOREACH, and NIL.

Referenced by loop_fully_unrollable_p(), region_exact_projection_along_parameters(), and transformer_general_intersection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ arguments_rm_entity()

cons* arguments_rm_entity ( cons a,
entity  e 
)

Definition at line 94 of file arguments.c.

97 {
98  if(entity_is_argument_p(e, a)) {
99  gen_remove(&a, e);
100  }
101  else {
102  pips_internal_error("entity %s is not in a",
103  entity_name(e));
104  }
105 
106  return a;
107 }
void gen_remove(list *cpp, const void *o)
remove all occurences of item o from list *cpp, which is thus modified.
Definition: list.c:685

References entity_is_argument_p(), entity_name, gen_remove(), and pips_internal_error.

Referenced by reify_ghost_variable_entity(), and rm_live_loop_index().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ arguments_set_equal_p()

bool arguments_set_equal_p ( list  a1,
list  a2 
)

Set equality of lists a1 and a2.

Check that all entities in a1 also occur in a2 and vice-versa.

Might be faster to use the intersection and its cardinal...

This algorithm is correct if an entity can appear several times in a list.

Could be implemented with two calls to arguments_subset_p()

Parameters
a11
a22

Definition at line 181 of file arguments.c.

182 {
183  bool set_equal_p = true;
184 
185  FOREACH(ENTITY, e1, a1) {
186  if(!entity_is_argument_p(e1, a2)) {
187  set_equal_p = false;
188  break;
189  }
190  }
191  if(set_equal_p) {
192  FOREACH(ENTITY, e2, a2) {
193  if(!entity_is_argument_p(e2, a1)) {
194  set_equal_p = false;
195  break;
196  }
197  }
198  }
199 
200  return set_equal_p;
201 }
bool set_equal_p(const set, const set)
returns whether s1 == s2
Definition: set.c:316

References ENTITY, entity_is_argument_p(), FOREACH, and set_equal_p().

Referenced by transformer_combine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ arguments_subset_p()

bool arguments_subset_p ( list  a1,
list  a2 
)

Check if a1 is a subset of a2.

Parameters
a11
a22

Definition at line 204 of file arguments.c.

205 {
206  bool subset_p = true;
207 
208  FOREACH(ENTITY, e1, a1) {
209  if(!entity_is_argument_p(e1, a2)) {
210  subset_p = false;
211  break;
212  }
213  }
214 
215  return subset_p;
216 }

References ENTITY, entity_is_argument_p(), and FOREACH.

Referenced by transformer_list_multiple_closure_to_precondition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ arguments_union()

cons* arguments_union ( cons a1,
cons a2 
)

cons * arguments_union(cons * a1, cons * a2): returns a = union(a1, a2) where a1 and a2 are lists of entities.

A new list is allocated.

Entities in a1 have the same rank wrt a1 and a. Entities in a2 are likely to have different ranks wrt a and a2. This might imply a transformer renaming.

Parameters
a11
a22

Definition at line 116 of file arguments.c.

119 {
120  cons * a;
121 
122  if(a1==a2) {
123  a = (cons *) gen_copy_seq(a1);
124  }
125  else {
126  a = (cons *) gen_copy_seq(a1);
127  MAPL(ce, {a = arguments_add_entity(a, ENTITY(CAR(ce)));}, a2);
128  }
129 
130  return a;
131 }
cons * arguments_add_entity(cons *a, entity e)
Definition: arguments.c:85
list gen_copy_seq(list l)
Copy a list structure.
Definition: list.c:501

References arguments_add_entity(), CAR, ENTITY, gen_copy_seq(), and MAPL.

Referenced by add_index_bound_conditions(), dump_common_layout(), fortran_user_call_to_transformer(), print_C_common_layout(), print_common_layout(), and transformer_convex_hulls().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ arithmetic_intrinsic_p()

bool arithmetic_intrinsic_p ( entity  e)

true if e is an arithmetic instrinsic

Used to determine if a logical argument must be promoted to integer

FI: the arithmetic operator set is not fully defined. To be completed.

Definition at line 1702 of file entity.c.

1703 {
1715  NULL);
1716  }
1718  return true;
1719  else
1720  return false;
1721 }
bool set_belong_p(const set, const void *)
Definition: set.c:194
@ set_pointer
Definition: newgen_set.h:44
set set_add_elements(set, const set, const void *e,...)
Definition: set.c:171
#define set_undefined_p(s)
Definition: newgen_set.h:49
set set_make(set_type)
Create an empty set of any type but hash_private.
Definition: set.c:102
#define MINUS_OPERATOR_NAME
#define DIVIDE_OPERATOR_NAME
#define UNARY_MINUS_OPERATOR_NAME
#define UNARY_PLUS_OPERATOR_NAME
#define MINUS_C_OPERATOR_NAME
#define MULTIPLY_OPERATOR_NAME
static set arithmetic_functions_set
Definition: entity.c:165
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
Definition: entity.c:1292

References arithmetic_functions_set, DIVIDE_OPERATOR_NAME, entity_intrinsic(), MINUS_C_OPERATOR_NAME, MINUS_OPERATOR_NAME, MULTIPLY_OPERATOR_NAME, PLUS_C_OPERATOR_NAME, PLUS_OPERATOR_NAME, set_add_elements(), set_belong_p(), set_make(), set_pointer, set_undefined_p, UNARY_MINUS_OPERATOR_NAME, and UNARY_PLUS_OPERATOR_NAME.

Referenced by basic_of_intrinsic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ array_argument_p()

bool array_argument_p ( expression  e)

Definition at line 513 of file expression.c.

514 {
515  if (expression_reference_p(e))
516  {
519  if (array_entity_p(ent)) return true;
520  }
521  return false;
522 }
bool array_entity_p(entity e)
Definition: entity.c:793
bool expression_reference_p(expression e)
Test if an expression is a reference.
Definition: expression.c:528
reference expression_reference(expression e)
Short cut, meaningful only if expression_reference_p(e) holds.
Definition: expression.c:1832

References array_entity_p(), expression_reference(), expression_reference_p(), ref, and reference_variable.

Referenced by interprocedural_abc_call(), xml_Argument(), xml_AssignArgument(), xml_Call(), and xml_Transposition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ array_element_type_p()

bool array_element_type_p ( type  at,
type  et 
)

is "et" the type of an element of an array of type "at"?

Parameters
att
ett

Definition at line 684 of file type.c.

685 {
686  bool equal_p = false;
687 
688  if(array_type_p(at)) {
689  if(type_variable_p(et)) {
692  equal_p = basic_equal_p(ab, eb);
693  }
694  }
695 
696  return equal_p;
697 }
bool array_type_p(type t)
Definition: type.c:2942
bool basic_equal_p(basic b1, basic b2)
Definition: type.c:927
#define type_variable(x)
Definition: ri.h:2949
#define variable_basic(x)
Definition: ri.h:3120

References array_type_p(), basic_equal_p(), type_variable, type_variable_p, and variable_basic.

Referenced by expression_to_points_to_sources().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ array_entity_p()

◆ array_of_derived_type_p()

bool array_of_derived_type_p ( type  t)

Definition at line 3109 of file type.c.

3110 {
3112  && (variable_dimensions(type_variable(t)) != NIL));
3113 }
#define basic_derived_p(x)
Definition: ri.h:638
#define variable_dimensions(x)
Definition: ri.h:3122

References basic_derived_p, NIL, type_variable, type_variable_p, variable_basic, and variable_dimensions.

Referenced by array_of_struct_type_p().

+ Here is the caller graph for this function:

◆ array_of_pointers_type_p()

◆ array_of_struct_type_p()

◆ array_pointer_string_type_equal_p()

bool array_pointer_string_type_equal_p ( type  t1,
type  t2 
)

Assume that a pointer to type x is equal to a 1-D array of x.

And do not forget the PIPS "string" exception. Constants strings are given type void->string instead of char[n] or char *.

Convert t1

Convert t2

Parameters
t11
t22

Definition at line 658 of file type.c.

659 {
660  bool equal_p = true;
661  if(string_type_p(t1))
662  if(string_type_p(t2))
663  equal_p = type_equal_p(t1,t2);
664  else {
665  /* Convert t1 */
667  equal_p = array_pointer_type_equal_p(nt1, t2);
668  free_type(nt1);
669  }
670  else
671  if(string_type_p(t2)) {
672  /* Convert t2 */
674  equal_p = array_pointer_type_equal_p(t1, nt2);
675  free_type(nt2);
676  }
677  else
678  equal_p = array_pointer_type_equal_p(t1, t2);
679 
680  return equal_p;
681 }
void free_type(type p)
Definition: ri.c:2658
bool type_equal_p(type t1, type t2)
Definition: type.c:547
bool string_type_p(type t)
Definition: type.c:2854
type make_scalar_char_pointer_type()
Allocate a char * pointer type.
Definition: type.c:5227
bool array_pointer_type_equal_p(type t1, type t2)
assume that a pointer to type x is equal to a 1-D array of x
Definition: type.c:609

References array_pointer_type_equal_p(), free_type(), make_scalar_char_pointer_type(), string_type_p(), and type_equal_p().

Referenced by adapt_reference_to_type(), expression_to_points_to_cells(), filter_formal_context_according_to_actual_context(), new_filter_formal_context_according_to_actual_context(), points_to_translation_mapping_is_typed_p(), and points_to_translation_of_formal_parameters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ array_pointer_type_equal_p()

bool array_pointer_type_equal_p ( type  t1,
type  t2 
)

assume that a pointer to type x is equal to a 1-D array of x

Reduce the number of dimensions and try again

Parameters
t11
t22

Definition at line 609 of file type.c.

610 {
611  bool equal_p = true;
612  if(!type_equal_up_to_qualifiers_p(t1,t2)) {
613  if(pointer_type_p(t1) && array_type_p(t2)) {
614  type pt = type_to_pointed_type(t1);
615  if(type_void_p(pt)) {
616  // Conventionally, you should have an array of overloaded elements...
617  //array_element_type();
618  equal_p = false;
619  }
620  else {
621  // Generalization
623  equal_p = array_pointer_type_equal_p(pt, st);
624  free_type(st);
625  }
626  }
627  else if(pointer_type_p(t2) && array_type_p(t1)) {
628  type pt = type_to_pointed_type(t2);
629  if(type_void_p(pt)) {
630  // Conventionally, you should have an array of overloaded elements...
631  //array_element_type();
632  equal_p = false;
633  }
634  else {
635  // Generalization
637  equal_p = array_pointer_type_equal_p(pt, st);
638  free_type(st);
639  }
640  }
641  else if(array_type_p(t1) && array_type_p(t2)) {
642  /* Reduce the number of dimensions and try again */
643  type nt1 = array_type_projection(t1);
644  type nt2 = array_type_projection(t2);
645  equal_p = array_pointer_type_equal_p(nt1, nt2);
646  free_type(nt1), free_type(nt2);
647  }
648  else
649  equal_p = false;
650  }
651  return equal_p;
652 }
bool type_equal_up_to_qualifiers_p(type t1, type t2)
Definition: type.c:552
type type_to_pointed_type(type t)
returns t if t is not a pointer type, and the pointed type if t is a pointer type.
Definition: type.c:5265
type array_type_to_sub_array_type(type t)
Allocate a new type, the sub-array type of "t".
Definition: type.c:5718
type array_type_projection(type t)
T is assumed to be an array type.
Definition: type.c:596
bool pointer_type_p(type t)
Check for scalar pointers.
Definition: type.c:2993
#define type_void_p(x)
Definition: ri.h:2959

References array_pointer_type_equal_p(), array_type_p(), array_type_projection(), array_type_to_sub_array_type(), free_type(), pointer_type_p(), type_equal_up_to_qualifiers_p(), type_to_pointed_type(), and type_void_p.

Referenced by adapt_reference_to_type(), array_pointer_string_type_equal_p(), array_pointer_type_equal_p(), check_type_of_points_to_cells(), concrete_array_pointer_type_equal_p(), create_scalar_stub_sink_cell(), create_stub_entity(), declaration_statement_to_points_to(), expression_to_points_to_sources(), find_points_to_subscript_for_type(), offset_cell(), points_to_cell_types_compatibility(), points_to_reference_to_typed_index(), process_casted_sinks(), and process_casted_sources().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ array_reference_p()

bool array_reference_p ( reference  r)

predicates on references

two possible meanings:

  • the referenced variable is declared as an array
  • the reference is to an array element

This makes a difference in procedure calls and IO statements

The second interpretation is chosen.

Definition at line 1861 of file expression.c.

1862 {
1863  /* two possible meanings:
1864  * - the referenced variable is declared as an array
1865  * - the reference is to an array element
1866  *
1867  * This makes a difference in procedure calls and IO statements
1868  *
1869  * The second interpretation is chosen.
1870  */
1871 
1872  return reference_indices(r) != NIL;
1873 }

References NIL, and reference_indices.

Referenced by array_to_constant_paths(), bottom_up_abc_reference(), bottom_up_abc_reference_implied_do(), dmas_invert_p(), expression_in_array_subscript(), initial_code_abc_reference(), and top_down_abc_flt().

+ Here is the caller graph for this function:

◆ array_size()

int array_size ( entity  a)

Definition at line 195 of file size.c.

196 {
197  int s = 0;
198 
199  if(!SizeOfArray(a, &s)) {
200  pips_internal_error("Array \"%s\" with illegal varying array size",
201  entity_name(a));
202  }
203  return s;
204 }
bool SizeOfArray(entity e, int *s)
This function computes the total size of a variable in bytes, ie.
Definition: size.c:87

References entity_name, pips_internal_error, and SizeOfArray().

+ Here is the call graph for this function:

◆ array_type_dimension()

unsigned int array_type_dimension ( type  t)

Definition at line 2947 of file type.c.

2948 {
2949  int d = -1;
2950  if(type_variable_p(t))
2952  return d;
2953 }
size_t gen_length(const list l)
Definition: list.c:150

References gen_length(), int, type_variable, type_variable_p, and variable_dimensions.

Referenced by memory_dereferencing_p(), new_array_elements_backward_substitution_in_transformer(), new_array_elements_forward_substitution_in_transformer(), normalize_subscript_expression(), and recursive_store_independent_points_to_reference_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ array_type_p()

bool array_type_p ( type  t)

Definition at line 2942 of file type.c.

2943 {
2944  return (type_variable_p(t) && (variable_dimensions(type_variable(t)) != NIL));
2945 }

References NIL, type_variable, type_variable_p, and variable_dimensions.

Referenced by analyzed_entity_p(), analyzed_struct_type_p(), anywhere_source_to_sinks(), array_bounded_p(), array_element_type_p(), array_location_entity_of_module_p(), array_pointer_type_equal_p(), array_type_to_pointer_type(), array_type_to_sub_array_type(), binary_arithmetic_operator_to_post_pv(), binary_intrinsic_call_to_points_to_sinks(), C_type_to_pointed_type(), cell_must_point_to_nowhere_sink_in_set_p(), cell_points_to_non_null_sink_in_set_p(), cell_points_to_nowhere_sink_in_set_p(), cell_points_to_null_sink_in_set_p(), check_rhs_value_types(), check_type_of_points_to_cells(), compute_points_to_binded_set(), compute_points_to_gen_set(), create_advanced_stub_points_to(), create_scalar_stub_sink_cell(), declaration_statement_to_points_to(), dereferencing_subscript_to_points_to(), dereferencing_to_sinks(), do_array_to_pointer_type(), do_array_to_pointer_walk_call_and_patch(), do_brace_expression_to_statements(), do_gpu_qualify_pointers(), do_linearize_array_manage_callers(), do_linearize_prepatch_subscript(), do_linearize_prepatch_type(), entity_array_p(), entity_flow_or_context_sentitive_heap_location(), expression_to_points_to_cells(), expression_to_points_to_sinks_with_offset(), filter_formal_context_according_to_actual_context(), fixed_length_array_type_p(), formal_points_to_parameter(), formal_source_to_sinks(), generic_c_words_simplified_entity(), generic_points_to_cells_translation(), generic_reference_to_transformer(), generic_stub_source_to_sinks(), generic_substitute_formal_array_elements_in_transformer(), global_source_to_sinks(), initialization_list_to_statements(), internal_pointer_assignment_to_points_to(), intrinsic_call_to_type(), memory_dereferencing_p(), new_filter_formal_context_according_to_actual_context(), normalize_subscript_expression(), offset_cell(), outliner_patch_parameters(), perform_array_element_substitutions_in_transformer(), pointer_formal_parameter_to_stub_points_to(), pointer_source_to_sinks(), points_to_array_reference_p(), points_to_cell_types_compatibility(), points_to_cells_parameters(), points_to_expression_to_pointed_type(), points_to_function_projection(), points_to_translation_of_formal_parameters(), process_casted_sinks(), process_casted_sources(), recursive_cell_to_pointer_cells(), recursive_store_independent_points_to_reference_p(), reference_dereferencing_to_points_to(), reference_to_points_to_sinks(), source_to_sinks(), struct_assignment_to_points_to(), struct_variable_to_pointer_locations(), subscript_to_points_to_sinks(), substitute_struct_stub_in_transformer(), variable_length_array_type_p(), and words_points_to_reference().

◆ array_type_projection()

type array_type_projection ( type  t)

T is assumed to be an array type.

Get rid of the last dimension and allocate the new type.

Definition at line 596 of file type.c.

597 {
598  variable v = type_variable(t);
599  list dl = variable_dimensions(v);
600  list ndl = gen_full_copy_list(dl); // new dimension list
601  list lndl = gen_last(ndl); // last dimension
602  gen_list_and_not(&ndl, lndl); // the discarded element is freed
604  type nt = make_type_variable(nv);
605  return nt;
606 }
type make_type_variable(variable _field_)
Definition: ri.c:2715
basic copy_basic(basic p)
BASIC.
Definition: ri.c:104
variable make_variable(basic a1, list a2, list a3)
Definition: ri.c:2895
void gen_list_and_not(list *a, const list b)
Compute A = A inter non B:
Definition: list.c:963
list gen_last(list l)
Return the last element of a list.
Definition: list.c:578
list gen_full_copy_list(list l)
Copy a list structure with element copy.
Definition: list.c:535

References copy_basic(), gen_full_copy_list(), gen_last(), gen_list_and_not(), make_type_variable(), make_variable(), NIL, type_variable, variable_basic, and variable_dimensions.

Referenced by array_pointer_type_equal_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ array_type_to_element_type()

type array_type_to_element_type ( type  t)

returns the type of the elements of an array type, as a newly allocated type.

It is not clear if it should fail when the argument is not an array type, or if an undefined type should be returned.

The qualifiers are dropped.

Definition at line 5700 of file type.c.

5701 {
5702  type et = type_undefined;
5703  if(type_variable_p(t)) {
5704  variable v = type_variable(t);
5705  //list dl = variable_dimensions(v);
5706  basic b = variable_basic(v);
5708  }
5709  else
5710  pips_internal_error("Ill. arg.\n");
5711  return et;
5712 }
#define type_undefined
Definition: ri.h:2883

References copy_basic(), make_type_variable(), make_variable(), NIL, pips_internal_error, type_undefined, type_variable, type_variable_p, and variable_basic.

Referenced by analyzed_array_p(), analyzed_array_type_p(), check_rhs_value_types(), compute_points_to_binded_set(), expression_to_points_to_cells(), generic_substitute_formal_array_elements_in_transformer(), memory_dereferencing_p(), perform_array_element_substitutions_in_transformer(), points_to_cell_types_compatibility(), points_to_translation_of_struct_formal_parameter(), process_casted_sinks(), and recursive_store_independent_points_to_reference_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ array_type_to_pointer_type()

type array_type_to_pointer_type ( type  t)

Allocate a new type that is the type of an array constant.

For instance, int t[10] gives type int * to t, int t[10][20] gives type int (*)[20]

Definition at line 5739 of file type.c.

5740 {
5741  type et = type_undefined;
5742  if(array_type_p(t)) {
5744  et = type_to_pointer_type(sat);
5745  }
5746  else
5747  pips_internal_error("Ill. arg.\n");
5748  return et;
5749 }
type type_to_pointer_type(type t)
allocate a new type "pt" which includes directly "t".
Definition: type.c:5253

References array_type_p(), array_type_to_sub_array_type(), pips_internal_error, type_to_pointer_type(), and type_undefined.

+ Here is the call graph for this function:

◆ array_type_to_sub_array_type()

type array_type_to_sub_array_type ( type  t)

Allocate a new type, the sub-array type of "t".

It "t" is "int[10][20][30]", the sub-array type is "int[20][30]".

No sharing is created between argument "t" and result "et"

Definition at line 5718 of file type.c.

5719 {
5720  type et = type_undefined;
5721  if(array_type_p(t)) {
5722  variable v = type_variable(t);
5723  list dl = variable_dimensions(v);
5724  basic b = variable_basic(v);
5725  POP(dl);
5727  gen_full_copy_list(dl),
5728  NIL));
5729  }
5730  else
5731  pips_internal_error("Ill. arg.\n");
5732  return et;
5733 }

References array_type_p(), copy_basic(), gen_full_copy_list(), make_type_variable(), make_variable(), NIL, pips_internal_error, POP, type_undefined, type_variable, variable_basic, and variable_dimensions.

Referenced by array_pointer_type_equal_p(), array_type_to_pointer_type(), check_type_of_points_to_cells(), and intrinsic_call_to_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ array_with_numerical_bounds_p()

bool array_with_numerical_bounds_p ( entity  a)

bool array_with_numerical_bounds_p(entity a) input : an array entity output : true if all bounds of all dimensions are numerical false otherwise (adjustable arrays, formal parameters).

modifies : nothing comment :

Definition at line 1266 of file variable.c.

1267 {
1268  int nb_dim = NumberOfDimension(a);
1269  int d;
1270  bool numerical_bounds_p = true;
1271 
1272  for(d=1; d <= nb_dim && numerical_bounds_p; d++) {
1273  dimension dd = entity_ith_dimension(a, nb_dim);
1274  expression l = dimension_lower(dd);
1275  expression u = dimension_upper(dd);
1276 
1277  numerical_bounds_p = expression_with_constant_signed_integer_value_p(l)
1279  }
1280 
1281  return numerical_bounds_p;
1282 }
dimension entity_ith_dimension(entity e, int i)
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 expression_with_constant_signed_integer_value_p(expression e)
The expression may be complicated but all its leaves are constants or parameters.
Definition: expression.c:960
int NumberOfDimension(entity)
Definition: size.c:588
#define dimension_lower(x)
Definition: ri.h:980
#define dimension_upper(x)
Definition: ri.h:982

References dimension_lower, dimension_upper, entity_ith_dimension(), expression_with_constant_signed_integer_value_p(), and NumberOfDimension().

Referenced by MakeEquivAtom().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assignment_expression_p()

bool assignment_expression_p ( expression  e)

Test if an expression is an assignment operation.

Definition at line 979 of file expression.c.

979  {
981 }
#define ASSIGN_OPERATOR_NAME
Definition: ri-util-local.h:95

References ASSIGN_OPERATOR_NAME, and operator_expression_p().

Referenced by expression_verbose_reduction_p_and_return_increment(), and step_directive_basic_workchunk_index().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assumed_size_array_p()

bool assumed_size_array_p ( entity  e)

return true if e has an assumed-size array declarator (the upper bound of the last dimension is equal to * : REAL A(*) )

Definition at line 807 of file entity.c.

808 {
809  /* return true if e has an assumed-size array declarator
810  (the upper bound of the last dimension is equal to * : REAL A(*) )*/
811  if (entity_variable_p(e))
812  {
814  list l_dims = variable_dimensions(v);
815  if (l_dims != NIL)
816  {
817  int length = gen_length(l_dims);
818  dimension last_dim = find_ith_dimension(l_dims,length);
819  if (unbounded_dimension_p(last_dim))
820  return true;
821  }
822  }
823  return false;
824 }
#define entity_variable_p(e)
An entity_variable_p(e) may hide a typedef and hence a functional type.
bool unbounded_dimension_p(dimension dim)
bool unbounded_dimension_p(dim) input : a dimension of an array entity.
Definition: expression.c:1130
dimension find_ith_dimension(list, int)
This function returns the ith dimension of a list of dimensions.
Definition: type.c:5621

References entity_type, entity_variable_p, find_ith_dimension(), gen_length(), NIL, type_variable, unbounded_dimension_p(), and variable_dimensions.

Referenced by array_size_stride(), interprocedural_abc_call(), and unnormalized_array_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ backward_control_map_get_blocs()

void backward_control_map_get_blocs ( control  ,
cons **   
)

◆ base_to_entities()

list base_to_entities ( Pvecteur  b)

generate a Newgen list with all entities refered in vector b

Definition at line 250 of file arguments.c.

251 {
252  list el = NIL;
253  Pvecteur ev;
254 
255  for(ev = b; ev!=NULL; ev = ev->succ) {
256  entity e = (entity) vecteur_var(ev);
257  el = CONS(ENTITY, e, el);
258  }
259 
260  gen_nreverse(el);
261 
262  return el;
263 }
struct _newgen_struct_entity_ * entity
Definition: abc_private.h:14
list gen_nreverse(list cp)
reverse a list in place
Definition: list.c:304
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
Definition: vecteur-local.h:89
struct Svecteur * succ
Definition: vecteur-local.h:92
#define vecteur_var(v)

References CONS, ENTITY, gen_nreverse(), NIL, Svecteur::succ, and vecteur_var.

Referenced by transformer_intersect_range_with_domain().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ basic_concrete_type_leads_to_pointer_p()

bool basic_concrete_type_leads_to_pointer_p ( type  bct)

returns true when the input type successors may be pointers

the input type is supposed to be a basic_concrete_type

If the basic is a pointer type, return true;

witch

Parameters
bctct

Definition at line 3699 of file type.c.

3700 {
3701  bool res = false;
3702 
3703  switch (type_tag(bct))
3704  {
3705  case is_type_variable :
3706  {
3707  variable v = type_variable(bct);
3708  basic b = variable_basic(v);
3709 
3710  /* If the basic is a pointer type, return true;
3711  */
3712  if(basic_pointer_p(b))
3713  {
3714  res = true;
3715  }
3716  else if (basic_derived_p(b))
3717  {
3718  list l_fields = type_fields(entity_type(basic_derived(b)));
3719  while(!res && !ENDP(l_fields))
3720  {
3721  type current_type = entity_basic_concrete_type(ENTITY(CAR(l_fields)));
3722  // we call ourselves recursively
3723  res = basic_concrete_type_leads_to_pointer_p(current_type);
3724  POP(l_fields);
3725  }
3726  }
3727  else if (!basic_typedef_p(b))
3728  {
3729  res = false;
3730  }
3731  else
3732  {
3733  pips_internal_error("unexpected typedef basic");
3734  }
3735  break;
3736  }
3737  case is_type_void:
3738  {
3739  res = false;
3740  break;
3741  }
3742  default:
3743  {
3744  pips_internal_error("case not handled yet");
3745  }
3746  } /*switch */
3747  return res;
3748 }
list type_fields(type t)
Definition: type.c:3073
type entity_basic_concrete_type(entity e)
retrieves or computes and then returns the basic concrete type of an entity
Definition: type.c:3677
bool basic_concrete_type_leads_to_pointer_p(type bct)
returns true when the input type successors may be pointers
Definition: type.c:3699
#define basic_typedef_p(x)
Definition: ri.h:641
#define type_tag(x)
Definition: ri.h:2940
@ is_type_void
Definition: ri.h:2904
@ is_type_variable
Definition: ri.h:2900

References basic_concrete_type_leads_to_pointer_p(), basic_derived, basic_derived_p, basic_pointer_p, basic_typedef_p, CAR, ENDP, ENTITY, entity_basic_concrete_type(), entity_type, is_type_variable, is_type_void, pips_internal_error, POP, type_fields(), type_tag, type_variable, and variable_basic.

Referenced by assignment_to_post_pv(), basic_concrete_type_leads_to_pointer_p(), declaration_to_post_pv(), and sequence_to_post_pv().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ basic_equal_p()

◆ basic_maximum()

basic basic_maximum ( basic  fb1,
basic  fb2 
)

FI: I do not believe this is correct for all intrinsics!

Type checking problem for ? : with gcc...

NN: More cases are added for C. To be refined

bit is a lesser type

Are they really comparable?

How can we compare two pointer types? Equality? Comparison of the pointed types?

pips_internal_error("Comparison of two pointer types not implemented");

SG checks for equality, he doesn't understand the meaning of having a float as the basic maximum of two float* and cowardly refuses to fix the code

FI: not convincing. As in other places, assuming this is meaningful, it would be better to use a basic comparator, basic_greater_p(), which could return 1, -1 or 0 or ??? and deal with non comparable type.

How do you compare a structure or a union to another type? The only case which seems to make sense is equality.

Parameters
fb1b1
fb2b2

Definition at line 1816 of file type.c.

1817 {
1818  basic b = basic_undefined;
1819  basic b1 = basic_ultimate(fb1);
1820  basic b2 = basic_ultimate(fb2);
1821 
1822 
1823  if(basic_derived_p(fb1)) {
1824  entity e1 = basic_derived(fb1);
1825 
1826  if(entity_enum_p(e1)) {
1827  b1 = make_basic(is_basic_int, (void *) 4);
1828  b = basic_maximum(b1, fb2);
1829  free_basic(b1);
1830  return b;
1831  }
1832  else
1833  pips_internal_error("Unanalyzed derived basic b1");
1834  }
1835 
1836  if(basic_derived_p(fb2)) {
1837  entity e2 = basic_derived(fb2);
1838 
1839  if(entity_enum_p(e2)) {
1840  b2 = make_basic(is_basic_int, (void *) 4);
1841  b = basic_maximum(fb1, b2);
1842  free_basic(b2);
1843  return b;
1844  }
1845  else
1846  pips_internal_error("Unanalyzed derived basic b2");
1847  }
1848 
1849  /* FI: I do not believe this is correct for all intrinsics! */
1850 
1851  pips_debug(7, "Tags: tag exp1 = %d, tag exp2 = %d\n",
1852  basic_tag(b1), basic_tag(b2));
1853 
1854 
1855  if(basic_overloaded_p(b2)) {
1856  b = copy_basic(b2);
1857  }
1858  else {
1859  switch(basic_tag(b1)) {
1860 
1861  case is_basic_overloaded:
1862  b = copy_basic(b1);
1863  break;
1864 
1865  case is_basic_string:
1866  if(basic_string_p(b2)) {
1867  int s1 = SizeOfElements(b1);
1868  int s2 = SizeOfElements(b2);
1869 
1870  /* Type checking problem for ? : with gcc... */
1871  if(s1>s2)
1872  b = copy_basic(b1);
1873  else
1874  b = copy_basic(b2);
1875  }
1876  else
1878  break;
1879 
1880  case is_basic_logical:
1881  if(basic_logical_p(b2)) {
1882  _int s1 = basic_logical(b1);
1883  _int s2 = basic_logical(b2);
1884 
1885  b = make_basic(is_basic_logical,UUINT(s1>s2?s1:s2));
1886  }
1887  else if(basic_int_p(b2)) {
1888  b = copy_basic(b2);
1889  }
1890  else
1892  break;
1893 
1894  case is_basic_complex:
1896  _int s1 = SizeOfElements(b1);
1897  _int s2 = SizeOfElements(b2);
1898 
1899  b = make_basic(is_basic_complex, UUINT(s1>s2?s1:s2));
1900  }
1901  else
1903  break;
1904 
1905  case is_basic_float:
1906  if(basic_complex_p(b2)) {
1907  _int s1 = SizeOfElements(b1);
1908  _int s2 = SizeOfElements(b2);
1909 
1910  b = make_basic(is_basic_complex, UUINT(s1>s2?s1:s2));
1911  }
1912  else if(basic_float_p(b2) || basic_int_p(b2)) {
1913  _int s1 = SizeOfElements(b1);
1914  _int s2 = SizeOfElements(b2);
1915 
1916  b = make_basic(is_basic_float, UUINT(s1>s2?s1:s2));
1917  }
1918  else
1920  break;
1921 
1922  case is_basic_int:
1923  if(basic_complex_p(b2) || basic_float_p(b2)) {
1924  _int s1 = SizeOfElements(b1);
1925  _int s2 = SizeOfElements(b2);
1926 
1927  b = make_basic(basic_tag(b2), UUINT(s1>s2?s1:s2));
1928  }
1929  else if(basic_int_p(b2)) {
1930  _int s1 = SizeOfElements(b1);
1931  _int s2 = SizeOfElements(b2);
1932 
1933  b = make_basic(is_basic_int, UUINT(s1>s2?s1:s2));
1934  }
1935  else if(basic_logical_p(b2)) {
1936  b = copy_basic(b1);
1937  }
1938  else if(basic_pointer_p(b2)) {
1939  return copy_basic(b2);
1940  }
1941  else
1943  break;
1944  /* NN: More cases are added for C. To be refined */
1945  case is_basic_bit:
1946  if(basic_bit_p(b2)) {
1947  if(basic_bit(b1)>=basic_bit(b2))
1948  b = copy_basic(b1);
1949  else
1950  b = copy_basic(b2);
1951  }
1952  else
1953  /* bit is a lesser type */
1954  b = copy_basic(b2);
1955  break;
1956  case is_basic_pointer:
1957  {
1958  if(basic_int_p(b2) || basic_bit_p(b2))
1959  b = copy_basic(b1);
1960  else if(basic_float_p(b2) || basic_logical_p(b2) || basic_complex_p(b2)) {
1961  /* Are they really comparable? */
1962  b = copy_basic(b1);
1963  }
1964  else if(basic_overloaded_p(b2))
1965  b = copy_basic(b1);
1966  else if(basic_pointer_p(b2)) {
1967  /* How can we compare two pointer types? Equality? Comparison of the pointed types? */
1968  /* pips_internal_error("Comparison of two pointer types not implemented"); */
1969  type t1 = basic_pointer(b1);
1970  type t2 = basic_pointer(b2);
1971 
1972  if(type_variable_p(t1) && type_variable_p(t2)) {
1973  /* SG checks for equality, he doesn't understand the meaning of
1974  * having a float as the basic maximum of two float*
1975  * and cowardly refuses to fix the code */
1976  if(type_equal_p(t1,t2))
1977  b = copy_basic(b1);
1978  else {
1979  basic nb1 = variable_basic(type_variable(t1));
1980  basic nb2 = variable_basic(type_variable(t2));
1981 
1982 
1983  /* FI: not convincing. As in other places, assuming this
1984  is meaningful, it would be better to use a basic
1985  comparator, basic_greater_p(), which could return 1, -1
1986  or 0 or ??? and deal with non comparable type. */
1987  b = basic_maximum(nb1, nb2);
1988  }
1989 
1990  }
1991  else if (type_void_p(t1) && type_void_p(t2) )
1992  b = copy_basic(b1);
1993  else
1994  pips_internal_error("Comparison of two pointer types not meaningful");
1995  }
1996  else if(basic_derived_p(b2))
1997  pips_internal_error("Comparison between pointer and struct/union not implemented");
1998  else if(basic_typedef_p(b2))
1999  pips_internal_error("b2 cannot be a typedef basic");
2000  else
2001  pips_internal_error("unknown tag %d for basic b2", basic_tag(b2));
2002  break;
2003  }
2004  case is_basic_derived:
2005  /* How do you compare a structure or a union to another type?
2006  The only case which seems to make sense is equality. */
2007  pips_internal_error("Derived basic b1 it not comparable to another basic");
2008  break;
2009  case is_basic_typedef:
2010  pips_internal_error("b1 cannot be a typedef basic");
2011  break;
2012  default: pips_internal_error("Ill. basic tag %d", basic_tag(b1));
2013  }
2014  }
2015 
2016  return b;
2017 
2018  /*
2019  if( (t1 != is_basic_complex) && (t1 != is_basic_float) &&
2020  (t1 != is_basic_int) && (t2 != is_basic_complex) &&
2021  (t2 != is_basic_float) && (t2 != is_basic_int) )
2022  pips_internal_error("Bad basic tag for expression in numerical function");
2023 
2024  if(t1 == is_basic_complex)
2025  return(b1);
2026  if(t2 == is_basic_complex)
2027  return(b2);
2028  if(t1 == is_basic_float) {
2029  if( (t2 != is_basic_float) ||
2030  (basic_float(b1) == DOUBLE_PRECISION_SIZE) )
2031  return(b1);
2032  return(b2);
2033  }
2034  if(t2 == is_basic_float)
2035  return(b2);
2036  return(b1);
2037  */
2038 }
basic make_basic(enum basic_utype tag, void *val)
Definition: ri.c:155
void free_basic(basic p)
Definition: ri.c:107
#define UUINT(i)
Definition: newgen_types.h:99
intptr_t _int
_INT
Definition: newgen_types.h:53
#define UU
Definition: newgen_types.h:98
bool entity_enum_p(entity e)
Definition: entity.c:968
basic basic_maximum(basic fb1, basic fb2)
Definition: type.c:1816
basic basic_ultimate(basic b)
get the ultimate basic from a basic typedef
Definition: type.c:1806
_int SizeOfElements(basic)
This function returns the length in bytes of the Fortran or C type represented by a basic,...
Definition: size.c:297
@ is_basic_derived
Definition: ri.h:579
@ is_basic_string
Definition: ri.h:576
@ is_basic_float
Definition: ri.h:572
@ is_basic_bit
Definition: ri.h:577
@ is_basic_pointer
Definition: ri.h:578
@ is_basic_overloaded
Definition: ri.h:574
@ is_basic_int
Definition: ri.h:571
@ is_basic_logical
Definition: ri.h:573
@ is_basic_typedef
Definition: ri.h:580
@ is_basic_complex
Definition: ri.h:575
#define basic_pointer(x)
Definition: ri.h:637
#define basic_complex_p(x)
Definition: ri.h:626
#define basic_int_p(x)
Definition: ri.h:614
#define basic_tag(x)
Definition: ri.h:613
#define basic_undefined
Definition: ri.h:556
#define basic_logical(x)
Definition: ri.h:622
#define basic_bit(x)
Definition: ri.h:634
#define basic_bit_p(x)
Definition: ri.h:632
#define basic_float_p(x)
Definition: ri.h:617

References b1, b2, basic_bit, basic_bit_p, basic_complex_p, basic_derived, basic_derived_p, basic_float_p, basic_int_p, basic_logical, basic_logical_p, basic_maximum(), basic_overloaded_p, basic_pointer, basic_pointer_p, basic_string_p, basic_tag, basic_typedef_p, basic_ultimate(), basic_undefined, copy_basic(), entity_enum_p(), free_basic(), is_basic_bit, is_basic_complex, is_basic_derived, is_basic_float, is_basic_int, is_basic_logical, is_basic_overloaded, is_basic_pointer, is_basic_string, is_basic_typedef, make_basic(), pips_debug, pips_internal_error, s1, SizeOfElements(), type_equal_p(), type_variable, type_variable_p, type_void_p, UU, UUINT, and variable_basic.

Referenced by _expression_similar_p(), basic_maximum(), basic_of_expressions(), basic_of_intrinsic(), basic_union(), do_group_basics_maximum_reduce(), intrinsic_call_to_type(), and ppt_math().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ basic_of_any_expression()

basic basic_of_any_expression ( expression  exp,
bool  apply_p 
)
Parameters
expxp
apply_ppply_p

Definition at line 1364 of file type.c.

1365 {
1366  return some_basic_of_any_expression(exp, apply_p, true);
1367 }
basic some_basic_of_any_expression(expression exp, bool apply_p, bool ultimate_p)
basic basic_of_any_expression(expression exp, bool apply_p): Makes a basic of the same basic as the e...
Definition: type.c:1258

References exp, and some_basic_of_any_expression().

Referenced by basic_of_expression(), and some_basic_of_any_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ basic_of_any_reference()

basic basic_of_any_reference ( reference  r,
bool  apply_p,
bool  ultimate_p 
)

Retrieves the basic of a reference in a newly allocated basic object.

Parameters
rreference we want the basic of
Returns
allocated basic of the reference

When called from the parser, the entity type may not yet be stored in the field type. This happens when simplify_C_expression is called for initialization expressions which are grouped in one statement.

BC : if the variable has dimensions, then it's an array name which is converted into a pointer itself. And each dimension is converted into a pointer on the next one. (except in a few cases which should be handled in basic_of_call) to be verified or done

A reference to a function returns a pointer to a function of the very same time

Parameters
apply_ppply_p
ultimate_pltimate_p

Definition at line 1395 of file type.c.

1395  {
1396  basic b = basic_undefined;
1397  entity v = reference_variable(r);
1398  type vt = entity_type(v);
1399 
1400  /* When called from the parser, the entity type may not yet be
1401  stored in the field type. This happens when
1402  simplify_C_expression is called for initialization
1403  expressions which are grouped in one statement. */
1404  if(!type_undefined_p(vt)) {
1405  type exp_type = ultimate_p ? ultimate_type(vt) : copy_type(entity_type(v));
1406  list l_dim = NIL;
1407 
1408  if(apply_p) {
1409  if(!type_functional_p(exp_type))
1410  pips_internal_error("Bad reference type tag %d \"%s\"",
1411  type_tag(exp_type));
1412  else {
1413  type rt = functional_result(type_functional(exp_type));
1414  type urt = ultimate_p ? ultimate_type(rt) : copy_type(rt);
1415 
1416  if(type_variable_p(urt))
1418  else {
1419  pips_internal_error("Unexpected type tag %s", type_to_string(urt));
1420  }
1421  }
1422  } else {
1423  if(type_variable_p(exp_type)) {
1424  b = copy_basic(variable_basic(type_variable(exp_type)));
1425 
1426  /* BC : if the variable has dimensions, then it's an array name which is converted
1427  into a pointer itself. And each dimension is converted into a pointer on the next one.
1428  (except in a few cases which should be handled in basic_of_call)
1429  to be verified or done
1430  */
1431 
1432  for (l_dim = variable_dimensions(type_variable(exp_type)); !ENDP(l_dim); POP(l_dim)) {
1433  b
1435  }
1436  } else if(type_functional_p(exp_type)) {
1437  /* A reference to a function returns a pointer to a function of the very same time */
1438  b = make_basic_pointer(copy_type(exp_type));
1439  } else {
1440  pips_internal_error("Bad reference type tag %d \"%s\"",
1441  type_tag(exp_type), type_to_string(exp_type));
1442  }
1443  }
1445  reference_indices(r),
1446  ultimate_p);
1447  }
1448  return b;
1449 }
basic make_basic_pointer(type _field_)
Definition: ri.c:179
static basic basic_and_indices_to_basic(basic b, list indices, bool ultimate_p)
BEGIN_EOLE.
Definition: type.c:1209
string type_to_string(const type t)
type.c
Definition: type.c:51
type ultimate_type(type t)
Definition: type.c:3466
#define functional_result(x)
Definition: ri.h:1444
#define type_functional(x)
Definition: ri.h:2952
#define type_undefined_p(x)
Definition: ri.h:2884

References basic_and_indices_to_basic(), basic_undefined, copy_basic(), copy_type(), ENDP, entity_type, functional_result, make_basic_pointer(), make_type_variable(), make_variable(), NIL, pips_internal_error, POP, reference_indices, reference_variable, type_functional, type_functional_p, type_tag, type_to_string(), type_undefined_p, type_variable, type_variable_p, ultimate_type(), variable_basic, and variable_dimensions.

Referenced by basic_of_reference(), and some_basic_of_any_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ basic_of_call()

basic basic_of_call ( call  c,
bool  apply_p,
bool  ultimate_p 
)

basic basic_of_call(call c): returns the basic of the result given by the call "c".

If ultimate_p is true, replaced typdef'ed types by their definitions recursively. If not, preserve typedef'ed types.

WARNING: a new basic is allocated

b = make_basic(is_basic_overloaded, UU);

Never go there...

Parameters
apply_ppply_p
ultimate_pltimate_p

Definition at line 1469 of file type.c.

1470 {
1471  entity e = call_function(c);
1472  tag t = value_tag(entity_initial(e));
1473  basic b = basic_undefined;
1474 
1475  switch (t)
1476  {
1477  case is_value_code:
1478  b = copy_basic(basic_of_external(c));
1479  break;
1480  case is_value_intrinsic:
1481  b = basic_of_intrinsic(c, apply_p, ultimate_p);
1482  break;
1483  case is_value_symbolic:
1484  /* b = make_basic(is_basic_overloaded, UU); */
1485  b = copy_basic(basic_of_constant(c));
1486  break;
1487  case is_value_constant:
1488  b = copy_basic(basic_of_constant(c));
1489  break;
1490  case is_value_unknown:
1491  pips_debug(1, "function %s has no initial value.\n"
1492  " Maybe it has not been parsed yet.\n",
1493  entity_name(e));
1494  b = copy_basic(basic_of_external(c));
1495  break;
1496  default: pips_internal_error("unknown tag %d", t);
1497  /* Never go there... */
1498  }
1499  return b;
1500 }
int tag
TAG.
Definition: newgen_types.h:92
basic basic_of_external(call c)
basic basic_of_external(call c): returns the basic of the result given by the call to an external fun...
Definition: type.c:1509
basic basic_of_constant(call c)
basic basic_of_constant(call c): returns the basic of the call to a constant.
Definition: type.c:1763
basic basic_of_intrinsic(call c, bool apply_p, bool ultimate_p)
basic basic_of_intrinsic(call c): returns the basic of the result given by call to an intrinsic funct...
Definition: type.c:1555
#define value_tag(x)
Definition: ri.h:3064
@ is_value_intrinsic
Definition: ri.h:3034
@ is_value_unknown
Definition: ri.h:3035
@ is_value_constant
Definition: ri.h:3033
@ is_value_code
Definition: ri.h:3031
@ is_value_symbolic
Definition: ri.h:3032

References basic_of_constant(), basic_of_external(), basic_of_intrinsic(), basic_undefined, call_function, copy_basic(), entity_initial, entity_name, is_value_code, is_value_constant, is_value_intrinsic, is_value_symbolic, is_value_unknown, pips_debug, pips_internal_error, and value_tag.

Referenced by c_user_function_call_to_transformer(), commutative_call_p(), fortran_user_function_call_to_transformer(), some_basic_of_any_expression(), and type_this_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ basic_of_constant()

basic basic_of_constant ( call  c)

basic basic_of_constant(call c): returns the basic of the call to a constant.

WARNING: returns a pointer towards an existing data structure

Definition at line 1763 of file type.c.

1764 {
1765  type call_type, return_type;
1766 
1767  debug(7, "basic_of_constant", "Constant call\n");
1768 
1769  call_type = entity_type(call_function(c));
1770 
1771  if (type_tag(call_type) != is_type_functional)
1772  pips_internal_error("Bad call type tag");
1773 
1774  return_type = functional_result(type_functional(call_type));
1775 
1776  if (type_tag(return_type) != is_type_variable)
1777  pips_internal_error("Bad return call type tag");
1778 
1779  return(variable_basic(type_variable(return_type)));
1780 }
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
Definition: debug.c:189
@ is_type_functional
Definition: ri.h:2901

References call_function, debug(), entity_type, functional_result, is_type_functional, is_type_variable, pips_internal_error, type_functional, type_tag, type_variable, and variable_basic.

Referenced by basic_of_call(), and call_to_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ basic_of_expression()

basic basic_of_expression ( expression  exp)

basic basic_of_expression(expression exp): Makes a basic of the same basic as the expression "exp".

Indeed, "exp" will be assigned to a temporary variable, which will have the same declaration as "exp".

Does not work if the expression is a reference to a functional entity, as may be the case in a Fortran call or a C functional pointer initialization. For C, a pointer to a functional should be/is returned.

WARNING: a new basic object is allocated

PREFER (???) expression_basic

Parameters
expxp

Definition at line 1383 of file type.c.

1384 {
1385  return basic_of_any_expression(exp, false);
1386 }
basic basic_of_any_expression(expression exp, bool apply_p)
Definition: type.c:1364

References basic_of_any_expression(), and exp.

Referenced by _expression_similar_p(), add_formal_to_actual_bindings(), any_expression_to_transformer(), any_user_call_site_to_transformer(), assign_tmp_to_exp(), atomize_this_expression(), atomizer_of_external(), basic_of_expressions(), basic_of_intrinsic(), basic_union(), condition_to_transformer(), consecutive_expression_p(), do_atomize_call(), do_convert_to_standard_operators(), do_linearize_expression_is_pointer(), do_linearize_pointer_is_expression(), do_loop_expansion(), do_loop_nest_unswitching(), do_simplify_c_operator(), fortran_user_call_to_transformer(), get_optimal_opcode(), get_type_max_width(), integer_expression_p(), inv_call_flt(), logical_binary_function_to_transformer(), make_substitution(), MakeComplexConstantExpression(), MemberIdentifierToExpression(), outliner_extract_loop_bound(), partial_eval_minus_c_operator(), partial_eval_plus_c_operator(), precondition_minmax_of_expression(), reorder_pointer_expression(), simd_atomize_this_expression(), simd_fill_curArgType_call(), simplify_C_expression(), simplify_complex_expression(), simplify_expression(), simplify_subscript(), SizeOfArray(), some_basic_of_any_expression(), split_update_call(), store_initial_value(), transformer_add_any_relation_information(), update_functional_type_with_actual_arguments(), and words_infix_binary_op().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ basic_of_expressions()

basic basic_of_expressions ( list  expressions,
bool  skip_overloaded 
)
Parameters
expressionsxpressions
skip_overloadedkip_overloaded

Definition at line 2040 of file type.c.

2041 {
2042  if(ENDP(expressions)) return basic_undefined;
2043  else if(ENDP(CDR(expressions))) return basic_of_expression(EXPRESSION(CAR(expressions)));
2044  else {
2045  basic out = basic_of_expression(EXPRESSION(CAR(expressions)));
2046  FOREACH(EXPRESSION,exp,CDR(expressions)) {
2048  if(skip_overloaded && basic_overloaded_p(out)) {
2049  free_basic(out);
2050  out=b;
2051  }
2052  else if( skip_overloaded && basic_overloaded_p(b)) {
2053  free_basic(b);
2054  }
2055  else {
2056  basic tmp =basic_maximum(out,b);
2057  free_basic(b);
2058  free_basic(out);
2059  out=tmp;
2060  }
2061  }
2062  return out;
2063  }
2064 }
static FILE * out
Definition: alias_check.c:128
#define CDR(pcons)
Get the list less its first element.
Definition: newgen_list.h:111
basic basic_of_expression(expression exp)
basic basic_of_expression(expression exp): Makes a basic of the same basic as the expression "exp".
Definition: type.c:1383

References basic_maximum(), basic_of_expression(), basic_overloaded_p, basic_undefined, CAR, CDR, ENDP, exp, EXPRESSION, FOREACH, free_basic(), and out.

Referenced by get_vect_name_from_data(), and make_loadsave_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ basic_of_external()

basic basic_of_external ( call  c)

basic basic_of_external(call c): returns the basic of the result given by the call to an external function.

WARNING: returns a pointer

support calling a function pointer :)

pips_debug(7, "Returned type is %s\n", basic_to_string(b));

Definition at line 1509 of file type.c.

1510 {
1511  type return_type = type_undefined;
1512  entity f = call_function(c);
1513  basic b = basic_undefined;
1514  type call_type = entity_type(f);
1515 
1516 
1517  pips_debug(7, "External call to %s\n", entity_name(f));
1518 
1519  /* support calling a function pointer :) */
1520  type ut = ultimate_type(call_type);
1521  if(type_variable_p(ut) &&
1524 
1525  if (! type_functional_p(ut) )
1526  pips_internal_error("Bad call type tag");
1527 
1528  return_type = functional_result(type_functional(ut));
1529 
1530  if (!type_variable_p(return_type)) {
1531  if(type_void_p(return_type)) {
1532  pips_user_error("A subroutine or void returning function is used as an expression\n");
1533  }
1534  else {
1535  pips_internal_error("Bad return call type tag \"%s\"", type_to_string(return_type));
1536  }
1537  }
1538 
1539  b = (variable_basic(type_variable(return_type)));
1540 
1541  /* pips_debug(7, "Returned type is %s\n", basic_to_string(b)); */
1542 
1543  return b;
1544 }
#define pips_user_error
Definition: misc-local.h:147

References basic_pointer, basic_pointer_p, basic_undefined, call_function, entity_name, entity_type, f(), functional_result, pips_debug, pips_internal_error, pips_user_error, type_functional, type_functional_p, type_to_string(), type_undefined, type_variable, type_variable_p, type_void_p, ultimate_type(), and variable_basic.

Referenced by basic_of_call(), and call_to_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ basic_of_intrinsic()

basic basic_of_intrinsic ( call  c,
bool  apply_p,
bool  ultimate_p 
)

basic basic_of_intrinsic(call c): returns the basic of the result given by call to an intrinsic function.

This basic must be computed with the basic of the arguments of the intrinsic for overloaded operators. It should be able to accommodate more than two arguments as for generic min and max operators. ultimate_p controls the behavior when typedef'ed types are encountered: should they be replaced by their definitions or not?

WARNING: returns a newly allocated basic object

pips_debug(7, "Intrinsic call to intrinsic \"s" with a priori result type "s"
",

module_local_name(f),

basic_to_string(rb));

I don't know the type since there is no arguments ! Bug encountered with a FMT=* in a PRINT. RK, 21/02/1994 :

leave it overloaded

Too bad, this may happen in the parser

consider int a[12][13] is of type int (*)[13]

Too bad for "void"... SG: should not happen because dereferencing a void* is a mistake

consider int a[12][13] is of type int (*)[13]

This can also be a user error, but if the function is called from the parser, a CParserError() should be called: how to guess what to do?

ifdebug(8) {

pips_debug(8, "Point to case, e1 = ");

print_expression(e1);

pips_debug(8, " and e2 = ");

print_expression(e1);

pips_debug(8, "\n");

}

We should reconstruct a struct type or an array type...

returns the type of the left hand side

The value returned is the value of the last expression in the list.

The value returned is the value of the first expression in the list after the condition. The second expression is assumed to have the same value because the code is assumed correct.

This must be a pointer difference. Else, the parser would have used ENTITY_MINUS (see simplify_C_expression()).

logical variables can be used as integer arguments

pips_debug(7, "Intrinsic call to intrinsic \"s" with a posteriori result type "s"
",

module_local_name(f),

basic_to_string(rb));

Parameters
apply_ppply_p
ultimate_pltimate_p

Definition at line 1555 of file type.c.

1556 {
1557  entity f = call_function(c);
1559  pips_assert("not calling basic_of_intrinsic on something returning void",!type_void_p(rt));
1561 
1562  /* pips_debug(7, "Intrinsic call to intrinsic \"%s\" with a priori result type \"%s\"\n", */
1563  /* module_local_name(f), */
1564  /* basic_to_string(rb)); */
1565 
1566  if(basic_overloaded_p(rb)) {
1567  list args = call_arguments(c);
1568 
1569  if (ENDP(args)) {
1570  /* I don't know the type since there is no arguments !
1571  Bug encountered with a FMT=* in a PRINT.
1572  RK, 21/02/1994 : */
1573  /* leave it overloaded */
1574  ;
1575  }
1576  else if(ENTITY_ADDRESS_OF_P(f)) {
1577  //string s = entity_user_name(f);
1578  //bool b = ENTITY_ADDRESS_OF_P(f);
1579  expression e = EXPRESSION(CAR(args));
1580  basic eb = some_basic_of_any_expression(e, false, ultimate_p);
1581  // Forget multidimensional types
1583  make_variable(eb, NIL, NIL));
1584 
1585  //fprintf(stderr, "b=%d, s=%s\n", b, s);
1586  free_basic(rb);
1587  rb = make_basic(is_basic_pointer, et);
1588  }
1589  else if(ENTITY_DEREFERENCING_P(f)) {
1590  expression e = EXPRESSION(CAR(args));
1591  free_basic(rb);
1592  rb = basic_of_expression(e);
1593  if(basic_pointer_p(rb)) {
1594  type pt = type_undefined;
1595 
1596  if(ultimate_p && !type_undefined_p(basic_pointer(rb)))
1598  else
1599  pt = copy_type(basic_pointer(rb));
1600 
1601  pips_assert("The pointed type is consistent", type_consistent_p(pt));
1602  if(type_undefined_p(pt)) {
1603  /* Too bad, this may happen in the parser */
1604  free_basic(rb);
1605  rb = basic_undefined;
1606  }
1607  else if(type_variable_p(pt) && !apply_p) {
1608  free_basic(rb);
1609  variable v = type_variable(pt);
1610  if(ENDP(variable_dimensions(v)))
1611  rb = copy_basic(variable_basic(v));
1612  else {
1613  /* consider int a[12][13] is of type int (*)[13]*/
1614  rb = make_basic_pointer(
1616  make_variable(
1620  )
1621  )
1622  );
1623  }
1624  }
1625  else if(type_functional_p(pt)) {
1626  if(apply_p) {
1627  free_basic(rb);
1629  if(type_variable_p(rt))
1631  else {
1632  /* Too bad for "void"...
1633  * SG: should not happen because dereferencing a void* is a mistake */
1634  pips_internal_error("input code seems to derference a void* pointer ?");
1635  }
1636  }
1637  else {
1638  return rb;
1639  }
1640  }
1641  else {
1642  pips_internal_error("unhandled case");
1643  }
1644  }
1645  else {
1646  type et = call_to_type(c);
1647  if(ultimate_p) et=ultimate_type(et);
1648  if( type_variable_p(et) )
1649  {
1650  variable v=type_variable(et);
1651  free_basic(rb);
1652  if(ENDP(variable_dimensions(v)))
1653  rb = copy_basic(variable_basic(v));
1654  else {
1655  /* consider int a[12][13] is of type int (*)[13]*/
1656  rb = make_basic_pointer(
1658  make_variable(
1662  )
1663  )
1664  );
1665  }
1666  }
1667  if( !type_variable_p(et) ) {
1668 
1669  /* This can also be a user error, but if the function is
1670  called from the parser, a CParserError() should be called:
1671  how to guess what to do? */
1672  pips_internal_error("Dereferencing of a non-pointer, non array expression"
1673  "Please use gcc to check that your source code is legal\n");
1674  }
1675  if(ultimate_p) free_type(et);
1676  }
1677  }
1678  else if(ENTITY_POINT_TO_P(f)) {
1679  //pips_internal_error("Point to case not implemented yet");
1680  //expression e1 = EXPRESSION(CAR(args));
1681  expression e2 = EXPRESSION(CAR(CDR(args)));
1682  free_basic(rb);
1683  pips_assert("Two arguments for ENTITY_POINT_TO", gen_length(args)==2);
1684  // FI: to avoid cycles betwen librairies ri-util and prettyprint
1685  /* ifdebug(8) { */
1686  /* pips_debug(8, "Point to case, e1 = "); */
1687  /* print_expression(e1); */
1688  /* pips_debug(8, " and e2 = "); */
1689  /* print_expression(e1); */
1690  /* pips_debug(8, "\n"); */
1691  /* } */
1692  rb = basic_of_expression(e2);
1693  }
1694  else if(ENTITY_BRACE_INTRINSIC_P(f)) {
1695  /* We should reconstruct a struct type or an array type... */
1696  rb = make_basic_overloaded();
1697  }
1698  else if(ENTITY_ASSIGN_P(f)) {
1699  /* returns the type of the left hand side */
1700  rb = basic_of_expression(EXPRESSION(CAR(args)));
1701  }
1702  else if(ENTITY_FIELD_P(f)) {
1703  free_basic(rb);
1704  rb = basic_of_expression(EXPRESSION(CAR(CDR(args))));
1705  }
1706  else if(ENTITY_COMMA_P(f)) {
1707  /* The value returned is the value of the last expression in the list. */
1708  free_basic(rb);
1710  }
1711  else if(ENTITY_CONDITIONAL_P(f)) {
1712  /* The value returned is the value of the first expression in
1713  the list after the condition. The second expression is
1714  assumed to have the same value because the code is assumed
1715  correct. */
1716  free_basic(rb);
1717  rb = basic_of_expression(EXPRESSION(CAR(CDR(args))));
1718  }
1719  else if(ENTITY_MINUS_C_P(f)) {
1720  /* This must be a pointer difference. Else, the parser
1721  would have used ENTITY_MINUS (see
1722  simplify_C_expression()). */
1723  free_basic(rb);
1725  }
1726  else {
1727  free_basic(rb);
1728  // FI: within declaration initializations, rb may be
1729  // undefined because the expressions uses a variable that
1730  // has not yet been typed by the parser. See C_syntax/simplify01.c
1731  rb = basic_of_expression(EXPRESSION(CAR(args)));
1732 
1733  FOREACH(EXPRESSION, arg, CDR(args)){
1734  basic b = basic_of_expression(arg);
1735  basic new_rb = basic_maximum(rb, b);
1736 
1737  free_basic(rb);
1738  free_basic(b);
1739  rb = new_rb;
1740  }
1741  /* logical variables can be used as integer arguments */
1742  if(!basic_undefined_p(rb) && basic_logical_p(rb))
1743  if(arithmetic_intrinsic_p(f)) {
1744  free_basic(rb);
1746  }
1747  }
1748 
1749  }
1750 
1751  /* pips_debug(7, "Intrinsic call to intrinsic \"%s\" with a posteriori result type \"%s\"\n", */
1752  /* module_local_name(f), */
1753  /* basic_to_string(rb)); */
1754 
1755  return rb;
1756 }
basic make_basic_overloaded(void)
Definition: ri.c:167
basic make_basic_int(intptr_t _field_)
Definition: ri.c:158
bool type_consistent_p(type p)
Definition: ri.c:2664
type make_type(enum type_utype tag, void *val)
Definition: ri.c:2706
#define ENTITY_ASSIGN_P(e)
#define ENTITY_COMMA_P(e)
#define ENTITY_DEREFERENCING_P(e)
#define DEFAULT_INTEGER_TYPE_SIZE
#define ENTITY_POINT_TO_P(e)
#define ENTITY_BRACE_INTRINSIC_P(e)
C initialization expression.
#define ENTITY_CONDITIONAL_P(e)
#define ENTITY_FIELD_P(e)
C data structure and pointer management.
#define ENTITY_MINUS_C_P(e)
#define ENTITY_ADDRESS_OF_P(e)
bool arithmetic_intrinsic_p(entity e)
true if e is an arithmetic instrinsic
Definition: entity.c:1702
type call_to_type(call c)
Definition: type.c:2313
#define variable_qualifiers(x)
Definition: ri.h:3124
#define call_arguments(x)
Definition: ri.h:711

References arithmetic_intrinsic_p(), basic_logical_p, basic_maximum(), basic_of_expression(), basic_overloaded_p, basic_pointer, basic_pointer_p, basic_undefined, basic_undefined_p, call_arguments, call_function, call_to_type(), CAR, CDR, copy_basic(), copy_type(), DEFAULT_INTEGER_TYPE_SIZE, ENDP, ENTITY_ADDRESS_OF_P, ENTITY_ASSIGN_P, ENTITY_BRACE_INTRINSIC_P, ENTITY_COMMA_P, ENTITY_CONDITIONAL_P, ENTITY_DEREFERENCING_P, ENTITY_FIELD_P, ENTITY_MINUS_C_P, ENTITY_POINT_TO_P, entity_type, EXPRESSION, f(), FOREACH, free_basic(), free_type(), functional_result, gen_full_copy_list(), gen_last(), gen_length(), is_basic_pointer, is_type_variable, make_basic(), make_basic_int(), make_basic_overloaded(), make_basic_pointer(), make_type(), make_type_variable(), make_variable(), NIL, pips_assert, pips_internal_error, some_basic_of_any_expression(), type_consistent_p(), type_functional, type_functional_p, type_undefined, type_undefined_p, type_variable, type_variable_p, type_void_p, ultimate_type(), variable_basic, variable_dimensions, and variable_qualifiers.

Referenced by basic_of_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ basic_of_reference()

basic basic_of_reference ( reference  r)

Retrieves the basic of a reference in a newly allocated basic object.

Parameters
rreference we want the basic of
Returns
allocated basic of the reference

Definition at line 1459 of file type.c.

1459  {
1460  return basic_of_any_reference(r,false,true);
1461 }
basic basic_of_any_reference(reference r, bool apply_p, bool ultimate_p)
Retrieves the basic of a reference in a newly allocated basic object.
Definition: type.c:1395

References basic_of_any_reference().

Referenced by build_new_ref(), distance_between_expression(), generate_prelude(), generate_scalar_variables(), generate_scalar_variables_from_list(), get_sizeofexpression_for_region(), get_type_max_width(), make_reduction_vector_entity(), make_substitution(), match_expression(), my_build_new_ref(), process_true_call_stat(), rename_statement_reductions(), and variables_width_filter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ basic_supporting_entities()

list basic_supporting_entities ( list  sel,
set  vt,
basic  b 
)
Parameters
selel
vtt

Definition at line 4211 of file type.c.

4212 {
4213 
4214  ifdebug(8) {
4215  pips_debug(8, "Begin: ");
4216  print_entities(sel);
4217  fprintf(stderr, "\n\n");
4218  }
4219 
4220  if(basic_int_p(b) ||
4221  basic_float_p(b) ||
4222  basic_logical_p(b) ||
4223  basic_overloaded_p(b) ||
4224  basic_complex_p(b) ||
4225  basic_string_p(b))
4226  ;
4227  else if(basic_bit_p(b))
4228  sel = symbolic_supporting_entities(sel, vt, basic_bit(b));
4229  else if(basic_pointer_p(b))
4231  else if(basic_derived_p(b)) {
4232  //sel = CONS(ENTITY, basic_derived(b), sel);
4234  sel = gen_nconc(sel, CONS(ENTITY, basic_derived(b), NIL));
4235  }
4236  else if(basic_typedef_p(b)) {
4237  entity se = basic_typedef(b);
4238  //sel = CONS(ENTITY, se, sel);
4239  sel = recursive_type_supporting_entities(sel, vt, entity_type(se));
4240  sel = gen_nconc(sel, CONS(ENTITY, se, NIL));
4241  }
4242  else
4243  pips_internal_error("Unrecognized basic tag %d", basic_tag(b));
4244 
4245  ifdebug(8) {
4246  pips_debug(8, "End: ");
4247  print_entities(sel);
4248  fprintf(stderr, "\n\n");
4249  }
4250 
4251  return sel;
4252 }
void print_entities(list l)
Definition: entity.c:167
list symbolic_supporting_entities(list sel, set vt, symbolic s)
C version.
Definition: type.c:4206
list recursive_type_supporting_entities(list sel, set vt, type t)
Definition: type.c:4283
#define basic_typedef(x)
Definition: ri.h:643

References basic_bit, basic_bit_p, basic_complex_p, basic_derived, basic_derived_p, basic_float_p, basic_int_p, basic_logical_p, basic_overloaded_p, basic_pointer, basic_pointer_p, basic_string_p, basic_tag, basic_typedef, basic_typedef_p, CONS, ENTITY, entity_type, fprintf(), gen_nconc(), ifdebug, NIL, pips_debug, pips_internal_error, print_entities(), recursive_type_supporting_entities(), and symbolic_supporting_entities().

Referenced by variable_type_supporting_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ basic_supporting_references()

list basic_supporting_references ( list  srl,
basic  b 
)

ifdebug(9) {

pips_debug(8, "Begin: ");

print_references(srl);

fprintf(stderr, "\n");

}

ifdebug(9) {

pips_debug(8, "End: ");

print_references(srl);

fprintf(stderr, "\n");

}

Parameters
srlrl

Definition at line 4519 of file type.c.

4520 {
4521 
4522  // FI: to avoid cycles betwen librairies ri-util and prettyprint
4523  /* ifdebug(9) { */
4524  /* pips_debug(8, "Begin: "); */
4525  /* print_references(srl); */
4526  /* fprintf(stderr, "\n"); */
4527  /* } */
4528 
4529  if(basic_int_p(b) ||
4530  basic_float_p(b) ||
4531  basic_logical_p(b) ||
4532  basic_overloaded_p(b) ||
4533  basic_complex_p(b) ||
4534  basic_string_p(b))
4535  ;
4536  else if(basic_bit_p(b))
4538  else if(basic_pointer_p(b))
4540  else if(basic_derived_p(b)) {
4541  //srl = CONS(ENTITY, basic_derived(b), srl);
4543  }
4544  else if(basic_typedef_p(b)) {
4545  entity se = basic_typedef(b);
4546  //srl = CONS(ENTITY, se, srl);
4548  }
4549  else
4550  pips_internal_error("Unrecognized basic tag %d", basic_tag(b));
4551 
4552  // FI: to avoid cycles betwen librairies ri-util and prettyprint
4553  /* ifdebug(9) { */
4554  /* pips_debug(8, "End: "); */
4555  /* print_references(srl); */
4556  /* fprintf(stderr, "\n"); */
4557  /* } */
4558 
4559  return srl;
4560 }
static list recursive_type_supporting_references(list srl, type t)
Compute the list of references implied in the definition of a type.
Definition: type.c:4638
list symbolic_supporting_references(list srl, symbolic s)
Definition: type.c:4512

References basic_bit, basic_bit_p, basic_complex_p, basic_derived, basic_derived_p, basic_float_p, basic_int_p, basic_logical_p, basic_overloaded_p, basic_pointer, basic_pointer_p, basic_string_p, basic_tag, basic_typedef, basic_typedef_p, entity_type, pips_internal_error, recursive_type_supporting_references(), and symbolic_supporting_references().

Referenced by variable_type_supporting_references().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ basic_to_generic_conversion()

entity basic_to_generic_conversion ( basic  b)

returns the corresponding generic conversion entity, if any.

otherwise returns entity_undefined.

what about INTEGER*{2,4,8} ?

Definition at line 2758 of file type.c.

2759 {
2760  entity result;
2761 
2762  switch (basic_tag(b))
2763  {
2764  case is_basic_int:
2765  /* what about INTEGER*{2,4,8} ?
2766  */
2768  break;
2769  case is_basic_float:
2770  {
2771  if (basic_float(b)==4)
2773  else if (basic_float(b)==8)
2775  else
2776  result = entity_undefined;
2777  break;
2778  }
2779  case is_basic_complex:
2780  {
2781  if (basic_complex(b)==8)
2783  else if (basic_complex(b)==16)
2785  else
2786  result = entity_undefined;
2787  break;
2788  }
2789  default:
2790  result = entity_undefined;
2791  }
2792 
2793  return result;
2794 }
#define DBLE_GENERIC_CONVERSION_NAME
#define DCMPLX_GENERIC_CONVERSION_NAME
#define CMPLX_GENERIC_CONVERSION_NAME
#define INT_GENERIC_CONVERSION_NAME
generic conversion names.
#define REAL_GENERIC_CONVERSION_NAME
#define basic_float(x)
Definition: ri.h:619
#define basic_complex(x)
Definition: ri.h:628

References basic_complex, basic_float, basic_tag, CMPLX_GENERIC_CONVERSION_NAME, DBLE_GENERIC_CONVERSION_NAME, DCMPLX_GENERIC_CONVERSION_NAME, entity_intrinsic(), entity_undefined, INT_GENERIC_CONVERSION_NAME, is_basic_complex, is_basic_float, is_basic_int, and REAL_GENERIC_CONVERSION_NAME.

Referenced by make_substitution().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ basic_to_string()

string basic_to_string ( basic  b)

Warning! Do not modify this file that is automatically generated!

Modify src/Libs/ri-util/ri-util-local.h instead, to add your own modifications. header file built by cproto ri_util-local.h RI-UTIL Library: Functions dealing with and constants related to PIPS intermediate representation ri.newgen, that are NOT generated by NewGen Pvecteur is an external type for NewGen and the ri data structure and is not included in ri.h

It is included here to avoid changes in many PIPS modules which use ri-util

Idem for type Ppolynome (PB 25/07/90); FI: polynomials are not used in ri.newgen; they should not be mentionned here

Idem for type Psysteme (FI 3 November 1990)

New function call need to be defined to handle omp pragma as a standard PIPS expression. To be easily recognized, all the defined values are prefixed by "OMP_". FC 2015-07-20 yuk, temporary fix to avoid an include cycle ri-util <-> prettyprint

#include "prettyprint.h"

Warning! Do not modify this file that is automatically generated!

Pvecteur is an external type for NewGen and the ri data structure and is not included in ri.h

It is included here to avoid changes in many PIPS modules which use ri-util

Idem for type Ppolynome (PB 25/07/90); FI: polynomials are not used in ri.newgen; they should not be mentionned here

Idem for type Psysteme (FI 3 November 1990)

New function call need to be defined to handle omp pragma as a standard PIPS expression. To be easily recognized, all the defined values are prefixed by "OMP_". FC 2015-07-20 yuk, temporary fix to avoid an include cycle ri-util <-> prettyprint

#include "prettyprint.h"

Nga Nguyen, 19/09/2003: To not rewrite the same thing, I use the words_basic() function

Definition at line 87 of file type.c.

88 {
89  /* Nga Nguyen, 19/09/2003: To not rewrite the same thing, I use the words_basic() function*/
90  list pdl = NIL;
91  return list_to_string(words_basic(b, &pdl));
92  gen_free_list(pdl);
93 }
string list_to_string(list l)
Return the malloc()ed version of the concatenation of all the strings in the list.
Definition: args.c:74
void gen_free_list(list l)
free the spine of the list
Definition: list.c:327
list words_basic(basic obj, list *ppdl)
what about simple DOUBLE PRECISION, REAL, INTEGER...
Definition: declarations.c:323

Referenced by effect_indices_first_pointer_dimension_rank(), and r_cell_reference_to_type().

+ Here is the caller graph for this function:

◆ basic_type_p()

bool basic_type_p ( type  t)

Safer than the other implementation? bool pointer_type_p(type t) { bool is_pointer = false;.

if (!type_undefined_p(t) && type_variable_p(t)) { basic b = variable_basic(type_variable(t)); if (!basic_undefined_p(b) && basic_pointer_p(b)) { is_pointer = true; } } return is_pointer; } Here is the set of mapping functions, from the RI to C language types Returns true if t is one of the following types : void, char, short, int, long, float, double, signed, unsigned, and there is no array dimensions, of course

Definition at line 2912 of file type.c.

2913 {
2914  if (type_variable_p(t))
2915  {
2917  return ((variable_dimensions(type_variable(t)) == NIL) &&
2918  (basic_int_p(b) || basic_float_p(b) || basic_logical_p(b)
2920  || basic_bit_p(b)));
2921  }
2922  return (type_void_p(t) || type_unknown_p(t)) ;
2923 }
#define type_unknown_p(x)
Definition: ri.h:2956

References basic_bit_p, basic_complex_p, basic_float_p, basic_int_p, basic_logical_p, basic_overloaded_p, basic_string_p, NIL, type_unknown_p, type_variable, type_variable_p, type_void_p, variable_basic, and variable_dimensions.

Referenced by generic_c_words_simplified_entity().

+ Here is the caller graph for this function:

◆ basic_type_size()

int basic_type_size ( basic  b)

See also SizeOfElements()

pips_internal_error("undefined for type string");

Definition at line 1074 of file type.c.

1075 {
1076  int size = -1;
1077 
1078  switch(basic_tag(b)) {
1079  case is_basic_int: size = basic_int(b);
1080  break;
1081  case is_basic_float: size = basic_float(b);
1082  break;
1083  case is_basic_logical: size = basic_logical(b);
1084  break;
1085  case is_basic_overloaded:
1086  pips_internal_error("undefined for type overloaded");
1087  break;
1088  case is_basic_complex: size = basic_complex(b);
1089  break;
1090  case is_basic_string:
1091  /* pips_internal_error("undefined for type string"); */
1092  size = string_type_size(b);
1093  break;
1094  case is_basic_pointer:
1096  break;
1097  default: size = basic_int(b);
1098  pips_internal_error("ill. tag %d", basic_tag(b));
1099  break;
1100  }
1101 
1102  return size;
1103 }
#define DEFAULT_POINTER_TYPE_SIZE
int string_type_size(basic b)
Definition: type.c:1047
#define basic_int(x)
Definition: ri.h:616

References basic_complex, basic_float, basic_int, basic_logical, basic_tag, DEFAULT_POINTER_TYPE_SIZE, is_basic_complex, is_basic_float, is_basic_int, is_basic_logical, is_basic_overloaded, is_basic_pointer, is_basic_string, pips_internal_error, and string_type_size().

Referenced by change_basic_if_needed(), DeclareVariable(), get_c_full_name(), get_type_max_width(), loadstore_type_conversion_string(), MakeAtom(), MakeComplexConstant(), MakeComplexConstantExpression(), and match_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ basic_ultimate()

basic basic_ultimate ( basic  b)

get the ultimate basic from a basic typedef

Definition at line 1806 of file type.c.

1807 {
1808  if(basic_typedef_p(b)) {
1810  pips_assert("typedef really has a variable type", type_variable_p(t) );
1811  b = variable_basic(type_variable(t));
1812  }
1813  return b;
1814 }

References basic_typedef, basic_typedef_p, entity_type, pips_assert, type_variable, type_variable_p, ultimate_type(), and variable_basic.

Referenced by basic_maximum(), and make_new_scalar_variable_with_prefix().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ basic_union()

basic basic_union ( expression  exp1,
expression  exp2 
)

basic basic_union(expression exp1 exp2): returns the basic of the expression which has the most global basic.

Then, between "int" and "float", the most global is "float".

Note: there are two different "float" : DOUBLE PRECISION and REAL.

WARNING: a new basic data structure is allocated (because you cannot always find a proper data structure to return simply a pointer

Parameters
exp1xp1
exp2xp2

Definition at line 1792 of file type.c.

1793 {
1794  basic b1 = basic_of_expression(exp1);
1795  basic b2 = basic_of_expression(exp2);
1796  basic b = basic_maximum(b1, b2);
1797 
1798  free_basic(b1);
1799  free_basic(b2);
1800  return b;
1801 }

References b1, b2, basic_maximum(), basic_of_expression(), and free_basic().

+ Here is the call graph for this function:

◆ binary_to_normalized()

normalized binary_to_normalized ( list  la,
int  op 
)

initialized to please gcc

FI: the C operator is different from the Fortran operator for non-positive arguments.

FI: the C operator is different from the Fortran operator for non-positive arguments.

Parameters
laa
opp

Definition at line 320 of file normalize.c.

321 {
322  normalized ng;
323  normalized nd;
324  normalized n;
325  int val1;
326  int val2;
327  int val = 0; /* initialized to please gcc */
328 
329  pips_assert("binary_to_normalize", gen_length(la) == 2);
330 
332  if (normalized_complex_p(ng))
333  return(ng);
334 
336  if (normalized_complex_p(nd)) {
337  FreeNormalized(ng);
338  return(nd);
339  }
340 
341  if (EvalNormalized(nd, &val2) && EvalNormalized(ng, &val1)) {
342  bool succeed = true;
343 
344  FreeNormalized(nd);
345  FreeNormalized(ng);
346  switch(op) {
347  case MINIMUM:
348  val = MIN(val1, val2);
349  break;
350  case MAXIMUM:
351  val = MAX(val1, val2);
352  break;
353  case MOD:
354  /* FI: the C operator is different from the Fortran operator
355  * for non-positive arguments.
356  */
357  if(val2==0) {
358  user_error("binary_to_normalize",
359  "0 divide in modulo evaluation\n");
360  }
361  else {
362  val = val1%val2;
363  }
364  break;
365  case SLASH:
366  /* FI: the C operator is different from the Fortran operator
367  * for non-positive arguments.
368  */
369  if(val2==0) {
370  user_error("binary_to_normalize",
371  "0 divide\n");
372  }
373  else {
374  val = val1/val2;
375  }
376  break;
377  case POWER:
378  if(val2<0) {
379  succeed = false;
380  }
381  else {
382  val = ipow(val1,val2);
383  }
384  break;
385  default:
386  pips_internal_error("Unknown binary operator %d", op);
387  }
388  if(succeed) {
390  vect_new(TCST, val));
391  }
392  else {
394  }
395  }
396  else {
397  FreeNormalized(ng);
398  FreeNormalized(nd);
400  }
401  return n;
402 }
normalized make_normalized(enum normalized_utype tag, void *val)
Definition: ri.c:1447
#define MIN(x, y)
minimum and maximum if they are defined somewhere else, they are very likely to be defined the same w...
#define user_error(fn,...)
Definition: misc-local.h:265
#define POWER
Definition: operator.h:46
#define MAXIMUM
Definition: operator.h:50
#define MINIMUM
Definition: operator.h:49
#define MOD
Definition: operator.h:47
bool EvalNormalized(normalized n, int *pv)
Definition: normalize.c:404
static normalized _NormalizeExpression(expression e)
this function shouldn't be called.
Definition: normalize.c:76
void FreeNormalized(normalized n)
Definition: normalize.c:419
int ipow(int vg, int vd)
FI: such a function should exist in Linear/arithmetique.
Definition: eval.c:769
#define normalized_complex_p(x)
Definition: ri.h:1782
@ is_normalized_linear
Definition: ri.h:1760
@ is_normalized_complex
Definition: ri.h:1761
#define MAX(x, y)
Definition: string.c:110
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
Pvecteur vect_new(Variable var, Value coeff)
Pvecteur vect_new(Variable var,Value coeff): allocation d'un vecteur colineaire au vecteur de base va...
Definition: alloc.c:110
#define SLASH

References _NormalizeExpression(), CAR, CDR, EvalNormalized(), EXPRESSION, FreeNormalized(), gen_length(), ipow(), is_normalized_complex, is_normalized_linear, make_normalized(), MAX, MAXIMUM, MIN, MINIMUM, MOD, normalized_complex_p, pips_assert, pips_internal_error, POWER, SLASH, TCST, user_error, UU, and vect_new().

Referenced by NormalizeIntrinsic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bit_type_p()

bool bit_type_p ( type  t)

Definition at line 2843 of file type.c.

2844 {
2845  if (!type_undefined_p(t) && type_variable_p(t))
2846  {
2848  if (!basic_undefined_p(b) && basic_bit_p(b))
2849  return true;
2850  }
2851  return false;
2852 }

References basic_bit_p, basic_undefined_p, type_undefined_p, type_variable, type_variable_p, and variable_basic.

Referenced by generic_c_words_simplified_entity(), make_standard_integer_type(), make_standard_long_integer_type(), and UpdateDerivedEntity().

+ Here is the caller graph for this function:

◆ bool_to_expression()

expression bool_to_expression ( bool  b)

Definition at line 1238 of file expression.c.

1239 {
1240  return MakeNullaryCall
1242  is_basic_logical));
1243 }
entity MakeConstant(string name, tag bt)
Make a Fortran constant.
Definition: constant.c:351
#define FALSE_OPERATOR_NAME
#define TRUE_OPERATOR_NAME
expression MakeNullaryCall(entity f)
Creates a call expression to a function with zero arguments.
Definition: expression.c:331

References FALSE_OPERATOR_NAME, is_basic_logical, MakeConstant(), MakeNullaryCall(), and TRUE_OPERATOR_NAME.

Referenced by generate_all_liveness_but(), generate_dynamic_liveness_for_primary(), generate_prelude(), generate_remapping_guard(), and set_live_status().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bound_generation_compare_vector_component()

int bound_generation_compare_vector_component ( Pvecteur pv1,
Pvecteur pv2 
)

bound_generation.c

bound_generation.c

Used for sorting each constraint and in between constraints, hopefully

Parameters
pv1v1
pv2v2

Definition at line 40 of file bound_generation.c.

41 {
42  entity e1 = (entity) vecteur_var(*pv1);
43  entity e2 = (entity) vecteur_var(*pv2);
44  // FI: is "less" a well-chosen name?
45  // int less = strcmp(entity_local_name(e1), entity_local_name(e2));
46  int less;
47 
48  if(e1==NULL) {
49  if(e2==NULL)
50  less = 0;
51  else
52  less = -1;
53  }
54  else if(e2==NULL)
55  less = 1;
56  else
57  less = strcmp(entity_user_name(e1), entity_user_name(e2));
58 
59 #if 0
60  if(less==0) {
61  Value v1 = vecteur_val(*pv1);
62  Value v2 = vecteur_val(*pv2);
63  if(value_gt(v1,v2))
64  less = 1;
65  else if(value_lt(v1,v2))
66  less = -1;
67  else
68  /* To satisfy a later assert not so well designed */
69  less = pv1<pv2? 1 : -1;
70  }
71 #endif
72 
73  return less;
74 }
#define value_gt(v1, v2)
int Value
#define value_lt(v1, v2)
#define vecteur_val(v)

References entity_user_name(), value_gt, value_lt, vecteur_val, and vecteur_var.

Referenced by make_bound_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ brace_expression_p()

bool brace_expression_p ( expression  e)

Return bool indicating if expression e is a brace expression.

Definition at line 3384 of file expression.c.

3385 {
3386  if (expression_call_p(e))
3387  {
3390  return true;
3391  }
3392  return false;
3393 }

References call_function, ENTITY_BRACE_INTRINSIC_P, expression_call_p(), expression_syntax, f(), and syntax_call.

Referenced by brace_expression_to_statements(), brace_expression_to_updated_type(), c_brace_expression_string(), do_brace_expression_to_statements(), expression_is_C_rhs_p(), freia_extract_kernel(), st_brace_expression_as_string(), st_declaration_init(), this_entity_cdeclaration(), words_assign_op(), and words_variable_or_function().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ brace_expression_to_statements()

list brace_expression_to_statements ( entity  arr,
expression  e 
)

converts a brace expression used to initialize an array (not a struct yet) into a statement sequence

Parameters
arrrr

Definition at line 3480 of file expression.c.

3480  {
3481  pips_assert("is a brace expression\n",brace_expression_p(e));
3482  //SG: needs work to support structures
3483  // pips_assert("is an array\n",array_entity_p(arr));
3484  list curr_index = NIL;
3485  list out = do_brace_expression_to_statements(arr,e,curr_index);
3486  return out;
3487 }
static list do_brace_expression_to_statements(entity arr, expression e, list curr_indices)
helper for brace_expression_to_statements
Definition: expression.c:3396
bool brace_expression_p(expression e)
Return bool indicating if expression e is a brace expression.
Definition: expression.c:3384

References brace_expression_p(), do_brace_expression_to_statements(), NIL, out, and pips_assert.

Referenced by split_initializations_in_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ brace_expression_to_updated_type()

void brace_expression_to_updated_type ( entity  arr,
expression  e 
)

use a brace expression to update the type of array "arr" if the dimensions are implicit

Parameters
arrrr

Definition at line 3517 of file expression.c.

3517  {
3518  pips_assert("is a brace expression\n",brace_expression_p(e));
3519  //SG: needs work to support structures
3520  //pips_assert("is an array\n",array_entity_p(arr));
3521  // type t = entity_basic_concrete_type(arr);
3522  type t = entity_type(arr);
3523  variable v = type_variable(t);
3524  list dl = variable_dimensions(v);
3526 }
static void do_brace_expression_to_updated_type(entity arr, expression e, list dl)
helper for brace_expression_to_updated_type
Definition: expression.c:3493

References brace_expression_p(), do_brace_expression_to_updated_type(), entity_type, pips_assert, type_variable, and variable_dimensions.

Referenced by split_initializations_in_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ build_new_top_level_module_name()

string build_new_top_level_module_name ( const char *  prefix,
bool  prevent_suffix 
)

module.c

module.c

Parameters
prefixis the prefix string
prevent_suffixis a flag that prevent from adding a "_0" suffix if possible
Returns
the first module name (malloc'd string) of the form "<prefix>_<integer>" that do not correspond to an existing module with integer starting at 0
Parameters
prefixrefix
prevent_suffixrevent_suffix

Definition at line 55 of file module.c.

55  {
56  string name;
57  int version = 0;
58 
59  if(prevent_suffix) {
60  name = strdup(prefix);
61  }
62 
63  for(;;) {
64  if(!prevent_suffix || version!=0)
65  asprintf(&name, "%s_%d", prefix, version);
66 
68  break;
69 
70  free(name);
71  version++;
72  }
73 
74  return name;
75 }
void free(void *)
#define asprintf
Definition: misc-local.h:225
static const char * prefix
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
Definition: entity.c:1479

References asprintf, entity_undefined, free(), module_name_to_entity(), prefix, and strdup().

Referenced by build_outline_name(), create_new_module_entity(), gpu_ify_statement(), gpu_memory_apply(), outline_stmts_between_pragmas_in_sequence(), and scalopragma().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ C_initialization_expression_p()

bool C_initialization_expression_p ( expression  e)

Definition at line 4056 of file expression.c.

4057 {
4058  bool initialization_p = false;
4059  syntax s = expression_syntax(e);
4060  if(syntax_call_p(s)) {
4061  call c = syntax_call(s);
4062  entity f = call_function(c);
4064  initialization_p = true;
4065  }
4066  return initialization_p;
4067 }
#define syntax_call_p(x)
Definition: ri.h:2734

References call_function, ENTITY_BRACE_INTRINSIC_P, expression_syntax, f(), syntax_call, and syntax_call_p.

Referenced by struct_assignment_to_points_to(), and struct_initialization_expression_to_expressions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ c_language_module_p()

bool c_language_module_p ( entity  m)

Definition at line 447 of file module.c.

448 {
450 }
static bool x_language_module_p(entity m, unsigned int x)
Simplified versions of c_module_p() and fortran_module_p().
Definition: module.c:432
@ is_language_c
Definition: ri.h:1567

References is_language_c, and x_language_module_p().

Referenced by constraints_to_loop_bound(), data_to_prec_for_variables(), generic_reference_to_transformer(), make_bound_expression(), make_constraint_expression(), partial_eval_call(), and precondition_intra_to_inter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ c_module_p()

bool c_module_p ( entity  m)

Test if a module "m" is written in C.

value_code_p(m) is not checked: is this code robust? Why not an if/else if/ else and a unique return statement?

All intrinsics, including Fortran intrinsics, are considered written in C.

Temporary fix for the too many make_unknown_language()...

Definition at line 2777 of file entity.c.

2778 {
2779  bool c_p = false;
2780  value v = entity_initial(m);
2781 
2782  if(!value_undefined_p(v)) {
2783  if(value_intrinsic_p(v))
2784  return true;
2786  c_p = language_c_p(l);
2787  /* Temporary fix for the too many make_unknown_language()... */
2788  if(language_unknown_p(l))
2789  pips_internal_error("language should not be unknown");
2790  }
2791  else
2792  pips_internal_error("language should not be unknown");
2793 
2794  return c_p;
2795 }
#define value_undefined_p(x)
Definition: ri.h:3017
#define language_unknown_p(x)
Definition: ri.h:1600
#define value_intrinsic_p(x)
Definition: ri.h:3074
#define language_c_p(x)
Definition: ri.h:1594
#define code_language(x)
Definition: ri.h:792

References code_language, entity_initial, language_c_p, language_unknown_p, pips_internal_error, value_code, value_intrinsic_p, and value_undefined_p.

Referenced by AddEntityToCompilationUnit(), AddEntityToCurrentModule(), AddEntityToCurrentModuleWithoutDeclaration(), begin_omp_construct(), call_to_postcondition(), compilation_unit_of_module(), compile_mpi(), compute_region(), controlizer(), convex_regions_forward_translation(), distributer(), ensure_comment_consistency(), entities_maymust_conflict_p(), entity_from_user_name(), entity_module_unambiguous_user_name(), entity_more_or_less_minimal_name(), generic_make_entity_copy_with_new_name(), generic_module_name_to_transformers(), GenericAddLocalEntityToDeclarations(), gpu_ify_statement(), inline_expression_call(), internal_print_icfg(), linearize_array_generic(), live_in_paths_of_statement(), make_exec_statement_from_name(), make_return_statement(), make_scalar_entity(), module_name_to_input_file_name(), module_to_all_declarations(), module_to_value_mappings(), new_controlizer(), new_label_local_name(), outliner(), outliner_file(), outliner_independent(), outliner_independent_recursively(), parameter_passing_mode_p(), phi_free_contraints_to_expressions(), print_code_semantics(), references_may_conflict_p(), RemoveEntityFromCompilationUnit(), rice(), SafeMakeConstant(), statement_remove_useless_label(), update_referenced_entities(), user_call_to_transformer(), user_function_call_to_transformer(), variable_entities_may_conflict_p(), and variable_to_dimensions().

+ Here is the caller graph for this function:

◆ C_pointer_type_p()

bool C_pointer_type_p ( type  t)

Returns OK for "char[]" as well as for "char *".

And do not forget "string" for PIPS internal representation.

Does not take care of typedef. Use compute_basic_concrete_type() first is necessary.

Definition at line 3011 of file type.c.

3012 {
3013  bool pointer_p = false;
3014  if(type_variable_p(t)) {
3015  variable v = type_variable(t);
3016  list dl = variable_dimensions(v);
3017  basic b = variable_basic(v);
3018  pointer_p = (ENDP(dl) && basic_pointer_p(b))
3019  || (ENDP(dl) && basic_string_p(b))
3020  || ((int)gen_length(dl)==1 && unbounded_dimension_p(DIMENSION(CAR(dl))));
3021  }
3022  return pointer_p;
3023 }

References basic_pointer_p, basic_string_p, CAR, DIMENSION, ENDP, gen_length(), type_variable, type_variable_p, unbounded_dimension_p(), variable_basic, and variable_dimensions.

Referenced by formal_source_to_sinks(), intrinsic_call_to_points_to(), list_assignment_to_points_to(), points_to_cell_types_compatibility(), points_to_reference_to_typed_index(), reduce_cell_to_pointer_type(), and source_to_sinks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ C_type_to_pointed_type()

type C_type_to_pointed_type ( type  t)

returns a copy of t if t is not a pointer type, and the pointed type if t is a pointer type or.

Type definitions are replaced. If t is undefined, returns a type_undefined.

A new type is always allocated.

Definition at line 5288 of file type.c.

5289 {
5290  type upt = type_undefined;
5291 
5292  if(!type_undefined_p(t)) {
5293  type ut = ultimate_type(t);
5294  type pt = ut;
5295 
5296  if(pointer_type_p(ut))
5298  else if(array_type_p(ut)) {
5299  variable v = type_variable(t);
5300  list dl = variable_dimensions(v);
5301  basic b = variable_basic(v);
5302  if((int)gen_length(dl)==1 && unbounded_dimension_p(DIMENSION(CAR(dl)))) {
5304  }
5305  }
5306 
5307  if(!type_undefined_p(pt))
5308  upt = ultimate_type(pt);
5309  }
5310  return upt;
5311 }

References array_type_p(), basic_pointer, CAR, copy_basic(), copy_type(), DIMENSION, gen_length(), make_type_variable(), make_variable(), NIL, pointer_type_p(), type_undefined, type_undefined_p, type_variable, ultimate_type(), unbounded_dimension_p(), variable_basic, and variable_dimensions.

Referenced by create_stub_points_to(), and points_to_reference_to_typed_index().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cabs_expression_p()

bool cabs_expression_p ( expression  e)

Definition at line 1048 of file expression.c.

1050 {
1052 }
#define CABS_OPERATOR_NAME

References CABS_OPERATOR_NAME, and operator_expression_p().

+ Here is the call graph for this function:

◆ call_compatible_type()

type call_compatible_type ( type  t)

returns the type necessary to generate or check a call to an object of type t.

Does not allocate a new type. Previous function could be implemented with this one.

Definition at line 3791 of file type.c.

3792 {
3793  type compatible = t;
3794 
3795  pips_assert("t is a consistent type", type_consistent_p(t));
3796 
3797  if(!type_functional_p(t)) {
3798  if(type_variable_p(t)) {
3800 
3801  if(basic_pointer_p(b))
3802  compatible = call_compatible_type(basic_pointer(b));
3803  else if(basic_typedef_p(b)) {
3804  entity te = basic_typedef(b);
3805 
3806  compatible = call_compatible_type(entity_type(te));
3807  }
3808  else
3809  compatible = false;
3810  }
3811  else
3812  compatible = false;
3813  }
3814  pips_assert("compatible is a functional type", type_functional_p(compatible));
3815  pips_assert("compatible is a consistent type", type_consistent_p(compatible));
3816  return compatible;
3817 }
type call_compatible_type(type t)
returns the type necessary to generate or check a call to an object of type t.
Definition: type.c:3791

References basic_pointer, basic_pointer_p, basic_typedef, basic_typedef_p, call_compatible_type(), entity_type, pips_assert, type_consistent_p(), type_functional_p, type_variable, type_variable_p, and variable_basic.

Referenced by call_compatible_type(), check_C_function_type(), words_genuine_regular_call(), and words_regular_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ call_compatible_type_p()

bool call_compatible_type_p ( type  t)

end of basic_concrete_types

Is an object of type t compatible with a call?

Definition at line 3764 of file type.c.

3765 {
3766  bool compatible_p = true;
3767 
3768  if(!type_functional_p(t)) {
3769  if(type_variable_p(t)) {
3771 
3772  if(basic_pointer_p(b))
3773  compatible_p = call_compatible_type_p(basic_pointer(b));
3774  else if(basic_typedef_p(b)) {
3775  entity te = basic_typedef(b);
3776 
3777  compatible_p = call_compatible_type_p(entity_type(te));
3778  }
3779  else
3780  compatible_p = false;
3781  }
3782  else
3783  compatible_p = false;
3784  }
3785  return compatible_p;
3786 }
bool call_compatible_type_p(type t)
end of basic_concrete_types
Definition: type.c:3764

References basic_pointer, basic_pointer_p, basic_typedef, basic_typedef_p, call_compatible_type_p(), entity_type, type_functional_p, type_variable, type_variable_p, and variable_basic.

Referenced by call_compatible_type_p(), check_C_function_type(), and MakeFunctionExpression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ call_constant_p()

bool call_constant_p ( call  c)

bool call_constant_p(call c): Returns true if "c" is a call to a constant, that is, a constant number or a symbolic constant.

Definition at line 1965 of file expression.c.

1966 {
1968  return( (value_tag(cv) == is_value_constant) ||
1969  (value_tag(cv) == is_value_symbolic) );
1970 }

References call_function, entity_initial, is_value_constant, is_value_symbolic, and value_tag.

Referenced by logical_expression_to_transformer().

+ Here is the caller graph for this function:

◆ call_contains_alternate_returns_p()

bool call_contains_alternate_returns_p ( call  c)

Definition at line 1835 of file variable.c.

1836 {
1837  bool contains_p = false;
1838 
1840  if((contains_p = actual_label_replacement_p(arg)))
1841  break;
1842 
1843  return contains_p;
1844 }
bool actual_label_replacement_p(expression eap)
Assumes that eap is a call.
Definition: variable.c:1811

References actual_label_replacement_p(), call_arguments, EXPRESSION, and FOREACH.

Referenced by text_test().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ call_equal_p()

bool call_equal_p ( call  c1,
call  c2 
)
Parameters
c11
c22

Definition at line 1529 of file expression.c.

1530 {
1531  entity f1 = call_function(c1);
1532  entity f2 = call_function(c2);
1533  list args1 = call_arguments(c1);
1534  list args2 = call_arguments(c2);
1535 
1536  if(f1 != f2)
1537  return false;
1538 
1539  return gen_equals(args1,args2,(gen_eq_func_t)expression_equal_p);
1540 
1541  return true;
1542 }
bool gen_equals(const list l0, const list l1, gen_eq_func_t equals)
compares two lists using the functor given in parameters returns true if for all n,...
Definition: list.c:192
bool(* gen_eq_func_t)(const void *, const void *)
Definition: newgen_types.h:115
int f2(int off1, int off2, int w, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:1
bool expression_equal_p(expression e1, expression e2)
Syntactic equality e1==e2.
Definition: expression.c:1347

References call_arguments, call_function, expression_equal_p(), f2(), and gen_equals().

Referenced by syntax_equal_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ call_to_expression()

expression call_to_expression ( call  c)

Build an expression that call a function or procedure.

Parameters
cis the call

Definition at line 309 of file expression.c.

310 {
313 }
expression make_expression(syntax a1, normalized a2)
Definition: ri.c:886
syntax make_syntax(enum syntax_utype tag, void *val)
Definition: ri.c:2491
@ is_syntax_call
Definition: ri.h:2693

References is_syntax_call, make_expression(), make_syntax(), and normalized_undefined.

Referenced by add_exec_mmcd(), atom_cse_expression(), bound_to_statement(), call_nary_rwt(), call_to_transformer(), compute_constant(), do_point_to(), entity_to_expression(), expressions_to_operation(), float_to_expression(), freia_cleanup_status(), generate_compact(), generate_fifo_stat(), generate_mmcd_stat_from_ref(), get_fifoExp_from_ref(), gfc2pips_code2instruction_(), hwac_replace_statement(), if_different_pe_and_not_twin(), inline_statement_crawler(), int_to_expression(), inv_call_flt(), make_call_expression(), make_lInitStats(), make_loadsave_statement(), make_loop_step_stat(), make_lSwitchStats(), make_mmcd_load_store_stat(), make_read_write_fifo_stat(), make_send_receive_conversion(), make_step_inc_statement(), make_toggle_inc_statement(), make_transStat(), make_vecteur_expression(), MakeCaseStatement(), MakeForloopWithIndexDeclaration(), mpic_make_mpi_comm_rank(), mpic_make_mpi_comm_size(), mpic_make_mpi_finalize(), mpic_make_mpi_init(), mpic_make_mpi_irecv(), mpic_make_mpi_isend(), mpic_make_mpi_recv(), mpic_make_mpi_send(), new_local_image_variable(), pragma_build_if_condition(), pragma_if_as_expr(), process_innerStat1_proc(), replace_instruction_similar_to_pattern(), sesamify(), split_update_call(), and words_brace_op().

+ Here is the call graph for this function:

◆ call_to_functional_type()

type call_to_functional_type ( call  c,
bool  ultimate_p 
)

The function called can have a functional type, or a typedef type or a pointer type to a functional type.

FI: I'm not sure this is correctly implemented. I do not know if a new type is always allocated. I do not understand the semantics if ultimate is turned off.

assertion will fail anyway

must be a functional type

Parameters
ultimate_pltimate_p

Definition at line 3824 of file type.c.

3825 {
3826  entity f = call_function(c);
3827  type ft = entity_type(f);
3828  type rt = type_undefined;
3829 
3830  if(type_functional_p(ft))
3831  rt = entity_type(f);
3832  else if(type_variable_p(ft)) {
3833  basic ftb = variable_basic(type_variable(ft));
3834  if(basic_pointer_p(ftb)) {
3835  type pt = basic_pointer(ftb);
3836  rt = ultimate_p? ultimate_type(pt) : copy_type(pt);
3837  }
3838  else if(basic_typedef_p(ftb)) {
3839  entity te = basic_typedef(ftb);
3840  type ut = ultimate_type(entity_type(te));
3841 
3842  if(type_variable_p(ut)) {
3843  basic utb = variable_basic(type_variable(ut));
3844  if(basic_pointer_p(utb)) {
3845  type pt = basic_pointer(utb);
3846  rt = ultimate_p? ultimate_type(pt): copy_type(pt);
3847  }
3848  else
3849  /* assertion will fail anyway */
3850  free_type(ut);
3851  }
3852  else /* must be a functional type */
3853  rt = ut;
3854  }
3855  else {
3856  pips_internal_error("Basic for called function unknown");
3857  }
3858  }
3859  else
3860  pips_internal_error("Type for called function unknown");
3861 
3862  pips_assert("The typedef type is functional", type_functional_p(rt));
3863 
3864  return rt;
3865 }

References basic_pointer, basic_pointer_p, basic_typedef, basic_typedef_p, call_function, copy_type(), entity_type, f(), free_type(), pips_assert, pips_internal_error, type_functional_p, type_undefined, type_variable, type_variable_p, ultimate_type(), and variable_basic.

Referenced by MemberIdentifierToExpression(), and simplify_C_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ call_to_type()

type call_to_type ( call  c)

b = make_basic(is_basic_overloaded, UU);

Never go there...

Definition at line 2313 of file type.c.

2314 {
2315  entity e = call_function(c);
2316  type t = type_undefined;
2317 
2318  switch (value_tag(entity_initial(e)))
2319  {
2320  case is_value_code:
2323  NIL, NIL));
2324  break;
2325  case is_value_intrinsic:
2326  t = intrinsic_call_to_type(c);
2327  break;
2328  case is_value_symbolic:
2329  /* b = make_basic(is_basic_overloaded, UU); */
2332  NIL, NIL));
2333  break;
2334  case is_value_constant:
2337  NIL, NIL));
2338  break;
2339  case is_value_unknown:
2340  pips_debug(1, "function %s has no initial value.\n"
2341  " Maybe it has not been parsed yet.\n",
2342  entity_name(e));
2345  NIL, NIL));
2346  break;
2347  default: pips_internal_error("unknown tag %d", t);
2348  /* Never go there... */
2349  }
2350 
2351  return t;
2352 }
type intrinsic_call_to_type(call c)
END_EOLE.
Definition: type.c:2080

References basic_of_constant(), basic_of_external(), call_function, copy_basic(), entity_initial, entity_name, intrinsic_call_to_type(), is_type_variable, is_value_code, is_value_constant, is_value_intrinsic, is_value_symbolic, is_value_unknown, make_type(), make_variable(), NIL, pips_debug, pips_internal_error, type_undefined, and value_tag.

Referenced by basic_of_intrinsic(), and expression_to_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cast_equal_p()

bool cast_equal_p ( cast  c1,
cast  c2 
)
Parameters
c11
c22

Definition at line 1455 of file expression.c.

1456 {
1457  return
1458  type_equal_p(cast_type(c1), cast_type(c2)) &&
1460 }
bool type_equal_p(type, type)
Definition: type.c:547
#define cast_expression(x)
Definition: ri.h:747
#define cast_type(x)
Definition: ri.h:745

References cast_expression, cast_type, expression_equal_p(), and type_equal_p().

Referenced by syntax_equal_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CCleanLocalEntities()

void CCleanLocalEntities ( entity  function)

C language version.

Parameters
functionunction

Definition at line 146 of file clean.c.

147 {
148  GenericCleanLocalEntities(function, false);
149 }
void GenericCleanLocalEntities(entity function, bool fortran_p)
Definition: clean.c:123

References GenericCleanLocalEntities().

Referenced by MakeCurrentModule().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ char_star_constant_function_type_p()

bool char_star_constant_function_type_p ( type  t)

Beware of typedefs.

Beware of string_type_p()... Strictly speaking, string_type_p() should not be taken into acount.

Definition at line 5787 of file type.c.

5788 {
5789  bool char_star_p = false;
5790  if(type_functional_p(t)) {
5792  type rt = functional_result(f);
5793  char_star_p = char_star_type_p(rt) || string_type_p(rt);
5794  }
5795  return char_star_p;
5796 }
bool char_star_type_p(type t)
Beware of typedefs.
Definition: type.c:5774

References char_star_type_p(), f(), functional_result, string_type_p(), type_functional, and type_functional_p.

Referenced by check_type_of_points_to_cells(), expression_to_points_to_cells(), expression_to_points_to_sources(), new_recursive_filter_formal_context_according_to_actual_context(), offset_cell(), points_to_translation_mapping_is_typed_p(), and points_to_with_stripped_sink().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ char_star_type_p()

bool char_star_type_p ( type  t)

Beware of typedefs.

Definition at line 5774 of file type.c.

5775 {
5776  bool char_star_p = false;
5777  if(pointer_type_p(t)) {
5778  type pt = type_to_pointed_type(t);
5779  char_star_p = char_type_p(pt);
5780  }
5781  return char_star_p;
5782 }
bool char_type_p(type t)
return true whether ‘t’ is a char or an unsigned char
Definition: type.c:2877

References char_type_p(), pointer_type_p(), and type_to_pointed_type().

Referenced by char_star_constant_function_type_p(), declaration_statement_to_points_to(), expression_to_points_to_cells(), expression_to_points_to_sources(), and intrinsic_call_to_points_to().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ char_type_p()

bool char_type_p ( type  t)

return true whether ‘t’ is a char or an unsigned char

see words_basic()

Definition at line 2877 of file type.c.

2878 {
2879  bool is_char = false;
2880 
2881  if (!type_undefined_p(t) && type_variable_p(t)) {
2883  if (!basic_undefined_p(b) && basic_int_p(b)) {
2884  int i = basic_int(b);
2885  is_char = (i==1)||(i==11); /* see words_basic() */
2886  }
2887  }
2888  return is_char;
2889 }

References basic_int, basic_int_p, basic_undefined_p, type_undefined_p, type_variable, type_variable_p, and variable_basic.

Referenced by char_star_type_p(), check_type_of_points_to_cells(), points_to_translation_mapping_is_typed_p(), points_to_with_stripped_sink(), and SizeOfArray().

+ Here is the caller graph for this function:

◆ check_C_function_type()

bool check_C_function_type ( entity  f,
list  args 
)

Check that an effective parameter list is compatible with a function type.

Or improve the function type when it is not precise as with "extern int f()". This is (a bit/partially) redundant with undeclared function detection since undeclared functions are declared "extern int f()".

Use parms to improve the type of f, probably declared f() with no type information.

Should be very similar to call_to_functional_type().

ifdebug(8) {

text txt = c_text_entity(get_current_module_entity(), f, 0, NIL);

print_text(stderr, txt);

}

Must be a typedef or a pointer to a function. No need to refine the type

ifdebug(8) {

text txt = c_text_entity(get_current_module_entity(), f, 0, NIL);

pips_debug(8, "Type not updated for function \"s"
", entity_user_name(f));

print_text(stderr, txt);

}

Take care of the void case

Take care of the varargs case

Check type compatibility: find function in flint? type_equal_p() requires lots of extensions to handle C types. And you would probably need type conversion to concrete type.

Parameters
argsrgs

Definition at line 4716 of file type.c.

4717 {
4718  bool ok = true;
4719  type t = entity_type(f);
4720  type ct = call_compatible_type(t);
4722 
4723  pips_assert("f can be used to generate a call", call_compatible_type_p(t));
4724 
4725  if(ENDP(parms)) {
4726  if(ENDP(args))
4727  ;
4728  else {
4729  if(type_functional_p(t)) {
4730  /* Use parms to improve the type of f, probably declared f()
4731  with no type information. */
4732  /* Should be very similar to call_to_functional_type(). */
4733  list pl = NIL;
4734  MAP(EXPRESSION, e, {
4735  type et = expression_to_user_type(e);
4737  pl = gen_nconc(pl, CONS(PARAMETER, p, NIL));
4738  },
4739  args);
4741 
4745  }
4746 
4747  pips_user_warning("Type updated for function \"%s\"\n", entity_user_name(f));
4748  // FI: to avoid cycles betwen librairies ri-util and prettyprint
4749  /* ifdebug(8) { */
4750  /* text txt = c_text_entity(get_current_module_entity(), f, 0, NIL); */
4751  /* print_text(stderr, txt); */
4752  /* } */
4753  }
4754  else {
4755  /* Must be a typedef or a pointer to a function. No need to refine the type*/
4756  // FI: to avoid cycles betwen librairies ri-util and prettyprint
4757  /* ifdebug(8) { */
4758  /* text txt = c_text_entity(get_current_module_entity(), f, 0, NIL); */
4759  /* pips_debug(8, "Type not updated for function \"%s\"\n", entity_user_name(f)); */
4760  /* print_text(stderr, txt); */
4761  /* } */
4762  }
4763  }
4764  }
4765  else if(gen_length(args)!=gen_length(parms)) {
4766  /* Take care of the void case */
4767  if(gen_length(args)==0 && gen_length(parms)==1) {
4768  parameter p = PARAMETER(CAR(parms));
4769  type pt = parameter_type(p);
4770  ok = type_void_p(pt);
4771  }
4772  /* Take care of the varargs case*/
4773  else if(gen_length(parms) >= 2 && gen_length(args) > gen_length(parms)) {
4774  parameter lp = PARAMETER(CAR(gen_last(parms)));
4775  type pt = parameter_type(lp);
4776  ok = type_varargs_p(pt);
4777  }
4778  else
4779  ok = false;
4780  }
4781  else {
4782  /* Check type compatibility: find function in flint?
4783  type_equal_p() requires lots of extensions to handle C
4784  types. And you would probably need type conversion to concrete
4785  type.*/
4786  ;
4787  }
4788 
4789  return ok;
4790 }
parameter make_parameter(type a1, mode a2, dummy a3)
Definition: ri.c:1495
dummy make_dummy_unknown(void)
Definition: ri.c:617
mode make_mode_value(void)
Definition: ri.c:1353
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
Definition: newgen_list.h:226
#define pips_user_warning
Definition: misc-local.h:146
static hash_table pl
properties are stored in this hash table (string -> property) for fast accesses.
Definition: properties.c:783
type expression_to_user_type(expression e)
Preserve typedef'ed types when possible.
Definition: type.c:2645
#define parameter_type(x)
Definition: ri.h:1819
#define functional_parameters(x)
Definition: ri.h:1442
#define PARAMETER(x)
PARAMETER.
Definition: ri.h:1788
#define type_varargs_p(x)
Definition: ri.h:2953
static bool ok

References call_compatible_type(), call_compatible_type_p(), CAR, CONS, DEFAULT_INTEGER_TYPE_SIZE, ENDP, entity_type, entity_user_name(), EXPRESSION, expression_to_user_type(), f(), functional_parameters, functional_result, gen_last(), gen_length(), gen_nconc(), make_basic_int(), make_dummy_unknown(), make_mode_value(), make_parameter(), make_type_variable(), make_variable(), MAP, NIL, ok, PARAMETER, parameter_type, pips_assert, pips_user_warning, pl, type_functional, type_functional_p, type_unknown_p, type_varargs_p, and type_void_p.

Referenced by MakeFunctionExpression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ check_fortran_declaration_dependencies()

void check_fortran_declaration_dependencies ( list  ldecl)

declarations.c

declarations.c

Regeneration of declarations... #define LIST_SEPARATOR (is_fortran? ", " : ",")

Check that each declaration only depends on previous declarations

FOREACH(ENTITY, dv, dep) {

Formal parameters are put in ldecl right away when parsing the SUBROUTINE or FUNCTION statement. The placement of their actual declaration is unknown. They may depend on PARAMETERs declared later

Should be a ParserError() when called from ProcessEntries()...

Parameters
ldecldecl

Definition at line 47 of file declarations.c.

48 {
49  /* Check that each declaration only depends on previous declarations */
50  int r = 1;
51 
52  FOREACH(ENTITY, v, ldecl) {
53  type t = entity_type(v);
54 
55  if(type_variable_p(t)) {
57  list cdep = list_undefined;
58  storage vs = entity_storage(v);
59 
60  /* FOREACH(ENTITY, dv, dep) { */
61  for(cdep = dep; !ENDP(cdep); POP(cdep)) {
62  entity dv = ENTITY(CAR(cdep));
63  int dr = gen_position(dv, ldecl);
64  value dvv = entity_initial(dv);
65 
66  if(storage_formal_p(vs) && value_symbolic_p(dvv)) {
67  /* Formal parameters are put in ldecl right away when
68  parsing the SUBROUTINE or FUNCTION statement. The
69  placement of their actual declaration is unknown. They
70  may depend on PARAMETERs declared later */
71  ;
72  }
73  else if(dr>=r) {
74  if(entity_symbolic_p(dv))
75  pips_user_warning("Fortran declaration order may be violated. "
76  "Variable \"%s\" depends on parameter \"%s\""
77  " but is, at least partly, declared first.\n",
79  else if(entity_scalar_p(dv))
80  pips_user_warning("Fortran declaration order may be violated. "
81  "Variable \"%s\" depends on variable \"%s\" "
82  "but is, at least partly, declared first.\n",
84  else
85  /* Should be a ParserError() when called from ProcessEntries()... */
86  pips_user_error("Fortran declaration order violated. Variable \"%s\" "
87  "depends on variable \"%s\" but is declared first.\n",
89  }
90  }
91  gen_free_list(dep);
92  }
93  r++;
94  }
95 }
int gen_position(const void *item, const list l)
Element ranks are strictly positive as for first, second, and so on.
Definition: list.c:995
#define list_undefined
Undefined list definition :-)
Definition: newgen_list.h:69
#define entity_symbolic_p(e)
bool entity_scalar_p(entity)
The concrete type of e is a scalar type.
Definition: variable.c:1113
list fortran_type_supporting_entities(list, type)
Definition: type.c:4593
#define storage_formal_p(x)
Definition: ri.h:2522

References CAR, ENDP, ENTITY, entity_initial, entity_scalar_p(), entity_storage, entity_symbolic_p, entity_type, entity_user_name(), FOREACH, fortran_type_supporting_entities(), gen_free_list(), gen_position(), list_undefined, NIL, pips_user_error, pips_user_warning, POP, storage_formal_p, type_variable_p, and value_symbolic_p.

Referenced by text_entity_declaration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clean_all_normalized()

◆ clean_up_sequences()

bool clean_up_sequences ( statement  s)

Recursively clean up the statement sequences by fusing them if possible and by removing useless one.

Remove also empty blocs and useless continues.

Definition at line 704 of file clean_up_sequences.c.

705 {
706 
707  debug_on("CLEAN_UP_SEQUENCES_DEBUG_LEVEL");
709 
710  bool changed = clean_up_sequences_internal(s);
711 
713  debug_off();
714 
715  return changed;
716 }
bool clean_up_sequences_internal(statement s)
An entry point for internal usage, such as from take_out_the_exit_node_if_not_a_continue():
void initialize_clean_up_sequences_statistics(void)
void display_clean_up_sequences_statistics(void)
#define debug_on(env)
Definition: misc-local.h:157
#define debug_off()
Definition: misc-local.h:160

References clean_up_sequences_internal(), debug_off, debug_on, display_clean_up_sequences_statistics(), initialize_clean_up_sequences_statistics(), and STUB_ERROR.

Referenced by clear_labels(), control_graph(), delay_communications(), delay_communications_interprocedurally(), delay_load_communications(), delay_store_communications(), do_it(), do_symbolic_tiling(), flatten_code(), freia_compiler(), full_loop_unroll(), if_conv_init_statement(), invariant_code_motion(), new_atomizer(), normalize_microcode(), optimize_expressions(), simd_remove_reductions(), simdizer(), simdizer_init(), statement_split_initializations(), symbolic_tiling(), transform_a_for_loop_into_a_while_loop(), transform_a_for_loop_statement_into_a_while_loop(), and unspaghettify_or_restructure_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clean_up_sequences_internal()

bool clean_up_sequences_internal ( statement  s)

An entry point for internal usage, such as from take_out_the_exit_node_if_not_a_continue():

Definition at line 676 of file clean_up_sequences.c.

677 {
678  debug_on("CLEAN_UP_SEQUENCES_DEBUG_LEVEL");
679 
681 
682  cusq_context ctxt;
683  cusq_ctxt_init(s, &ctxt);
684 
685  gen_context_recurse(s, &ctxt,
687 
688  cusq_ctxt_reset(&ctxt);
690 
691  ifdebug(1) {
693  }
694  debug_off();
695 
696  return ctxt.changed;
697 }
bool statement_consistent_p(statement p)
Definition: ri.c:2195
static void clean_up_sequences_rewrite(statement s, cusq_context *p_ctxt)
void compute_statement_to_goto_table(statement s)
Since clean_up_sequences() is called before the controlizer, there may be some GOTO.
void discard_statement_to_goto_table(void)
Discard the statement_to_goto_table map:
static void cusq_ctxt_reset(cusq_context *p_ctxt)
static void cusq_ctxt_init(statement s, cusq_context *p_ctxt)
#define gen_context_recurse(start, ctxt, domain_number, flt, rwt)
Definition: genC.h:285
bool gen_true2(__attribute__((unused)) gen_chunk *u1, __attribute__((unused)) void *u2)
Definition: genClib.c:2785
#define statement_domain
newgen_sizeofexpression_domain_defined
Definition: ri.h:362
Clean up sequences context.

References cusq_context::changed, clean_up_sequences_rewrite(), compute_statement_to_goto_table(), cusq_ctxt_init(), cusq_ctxt_reset(), debug_off, debug_on, discard_statement_to_goto_table(), gen_context_recurse, gen_true2(), ifdebug, statement_consistent_p(), and statement_domain.

Referenced by clean_up_sequences(), and take_out_the_exit_node_if_not_a_continue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CleanLocalEntities()

void CleanLocalEntities ( entity  function)

Fortran version.

Parameters
functionunction

Definition at line 140 of file clean.c.

141 {
142  GenericCleanLocalEntities(function, true);
143 }

References GenericCleanLocalEntities().

Referenced by AbortEntries(), c_parser_error(), MakeCurrentFunction(), and ParserError().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clone_statement()

statement clone_statement ( statement  s,
clone_context  cc 
)

clone_statement.c

Parameters
ccc

Definition at line 437 of file clone_statement.c.

438 {
440  statement sout = do_clone_statement(s,cc,ht);
441  hash_table_free(ht);
442  return sout;
443 }
static statement do_clone_statement(statement s, clone_context cc, hash_table ht)
hash_table hash_table_make(hash_key_type key_type, size_t size)
Definition: hash.c:294
void hash_table_free(hash_table htp)
this function deletes a hash table that is no longer useful.
Definition: hash.c:327
@ hash_string
Definition: newgen_hash.h:32

References do_clone_statement(), hash_string, hash_table_free(), and hash_table_make().

Referenced by do_loop_expansion_init(), do_loop_nest_unswitching_purge(), do_loop_unroll_with_epilogue(), do_loop_unroll_with_prologue(), do_simdizer_auto_tile_generate_all_tests(), dowhile_to_while_walker(), full_loop_unroll(), and make_new_loop_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clone_variable_with_unique_name()

entity clone_variable_with_unique_name ( entity  old_variable,
statement  declaration_statement,
string  prefix,
string  suffix,
entity  module 
)

Clone a variable with a new user name.

Parameters
old_variableis the variable to clone
declaration_statementis the enclosing sequence (block) defining the scope where the new variable is visible. It must be a statement of kind sequence.
prefixis the prefix to prepend to the variable name
suffixis the suffix to append to the variable name
moduleis the entity of the module the variable will belong to

Is there is already a variable with this name, new names are tried with numerical suffixes.

Returns
the entity of the new variable. Its fields are copies from the old one. That means that there may be some aliasing since the old one and the new one have the same offset (in the sense of IR RAM) and that use-def chains and dependence graphs are going to be wrong.

The clone variable is added to the declaration list of "statement_declaration" and to the code declarations of module "module". A new declaration statement is inserted in the sequence of "declaration_statement". This maintains the consistency of PIPS internal representation for C and Fortran code.

Parameters
old_variableld_variable
declaration_statementeclaration_statement
prefixrefix
suffixuffix
moduleodule

Definition at line 562 of file variable.c.

566  {
568  declaration_statement,
569  prefix,
570  suffix,
571  module,
572  true);
573 }
static entity old_variable
void propagate_synonym(s, old, new) statement s; entity old, new;
Definition: dynamic.c:859
entity generic_clone_variable_with_unique_name(entity old_variable, statement declaration_statement, string prefix, string suffix, entity module, bool insert_p)
clone a variable with a new name.
Definition: variable.c:509

References generic_clone_variable_with_unique_name(), module, old_variable, and prefix.

Referenced by move_declaration_control_node_declarations_to_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ comma_expression_p()

bool comma_expression_p ( expression  e)

Definition at line 830 of file expression.c.

831 {
832  bool result = false;
833 
834  if (expression_call_p(e)) {
836  entity f = call_function(c);
837 
838  result = ENTITY_COMMA_P(f);
839  }
840 
841  return result;
842 }

References call_function, ENTITY_COMMA_P, expression_call_p(), expression_syntax, f(), and syntax_call.

Referenced by any_expression_to_transformer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ comment_string_p()

bool comment_string_p ( const  string)

Test if a string can be a Fortran 77 comment:

If a line begins with a non-space character, claims it may be a Fortran comment. Assume empty line are comments.

Parameters
stringomment

Definition at line 159 of file util.c.

160 {
161  char c = *comment;
162  /* If a line begins with a non-space character, claims it may be a
163  Fortran comment. Assume empty line are comments. */
164  return c != '\0' && c != ' ' && c != '\t';
165 }
static void comment(string_buffer code, spoc_hardware_type hw, dagvtx v, int stage, int side, bool flip)
Definition: freia_spoc.c:52

References comment().

Referenced by get_declaration_comments(), and get_end_of_header_comments().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ common_members_of_module()

list common_members_of_module ( entity  common,
entity  module,
bool  only_primary 
)

returns the list of entity to appear in the common declaration.

of entity

drop equivalenced that come hereafter...

Parameters
commonommon
moduleodule
only_primarynot the equivalenced...

Definition at line 1741 of file entity.c.

1744 {
1745  list result = NIL;
1746  int cumulated_offset = 0;
1747  pips_assert("entity is a common", entity_area_p(common));
1748 
1749  list ld = area_layout(type_area(entity_type(common)));
1751 
1752  for(; !ENDP(ld);ld = CDR(ld))
1753  {
1754  v = ENTITY(CAR(ld));
1755  storage s = entity_storage(v);
1756  ram r;
1757  pips_assert("storage ram", storage_ram_p(s));
1758  r = storage_ram(s);
1759  if (ram_function(r)==module)
1760  {
1761  int offset = ram_offset(r);
1762  int size = 0;
1763 
1764  if(heap_area_p(ram_section(r))) {
1765  size = 0;
1766  }
1767  else if(stack_area_p(ram_section(r))) {
1768  size = 0;
1769  }
1770  else {
1771  if(!SizeOfArray(v, &size)) {
1772  pips_internal_error("Varying size array \"%s\"", entity_name(v));
1773  }
1774  }
1775 
1776  if (cumulated_offset==offset || !only_primary)
1777  result = CONS(ENTITY, v, result);
1778  else
1779  break; /* drop equivalenced that come hereafter... */
1780 
1781  cumulated_offset+=size;
1782  }
1783  }
1784 
1785  return gen_nreverse(result);
1786 }
static Value offset
Definition: translation.c:283
bool entity_area_p(entity e)
Definition: area.c:149
bool stack_area_p(entity aire)
Definition: area.c:104
bool heap_area_p(entity aire)
Definition: area.c:86
#define storage_ram_p(x)
Definition: ri.h:2519
#define ram_section(x)
Definition: ri.h:2249
#define storage_ram(x)
Definition: ri.h:2521
#define ram_function(x)
Definition: ri.h:2247
#define ram_offset(x)
Definition: ri.h:2251

References area_layout, CAR, CDR, CONS, ENDP, ENTITY, entity_area_p(), entity_name, entity_storage, entity_type, entity_undefined, gen_nreverse(), heap_area_p(), module, NIL, offset, pips_assert, pips_internal_error, ram_function, ram_offset, ram_section, SizeOfArray(), stack_area_p(), storage_ram, storage_ram_p, and type_area.

Referenced by check_common_inclusion(), insert_common_declaration(), MakeEntryCommon(), print_common_layout(), sentence_area(), and text_common_declaration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ commutative_call_p()

bool commutative_call_p ( call  c)

Test if we are allowed to commute operations.

Parameters
[in]cis the operation call
Returns
true if we can commute operations

Note that floating point operations are commutative, but since they are not associative due to rounding error , in a chain of operations, we cannot commute them. Of course, we should test whether an operation is alone or not to see if we are in this case...

Definition at line 2661 of file entity.c.

2662 {
2663  entity op = call_function(c);
2664  bool commut_p = false;
2665  if (ENTITY_PLUS_P(op) || ENTITY_MULTIPLY_P(op) ||
2666  ENTITY_AND_P(op) || ENTITY_OR_P(op) || ENTITY_PLUS_C_P(op))
2667  {
2668  basic b = basic_of_call(c,false,true);
2669  switch(basic_tag(b))
2670  {
2671  case is_basic_float:
2672  case is_basic_complex:
2673  if (get_bool_property("RELAX_FLOAT_ASSOCIATIVITY"))
2674  commut_p = true;
2675  break;
2676  case is_basic_logical:
2677  case is_basic_overloaded:
2678  case is_basic_int:
2679  case is_basic_pointer:
2680  commut_p = true;
2681  break;
2682  default:
2683  pips_internal_error("unhandled case");
2684  }
2685  free_basic(b);
2686  }
2687  return commut_p;
2688 }
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
#define ENTITY_OR_P(e)
#define ENTITY_AND_P(e)
#define ENTITY_PLUS_P(e)
#define ENTITY_MULTIPLY_P(e)
#define ENTITY_PLUS_C_P(e)
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

References basic_of_call(), basic_tag, call_function, ENTITY_AND_P, ENTITY_MULTIPLY_P, ENTITY_OR_P, ENTITY_PLUS_C_P, ENTITY_PLUS_P, free_basic(), get_bool_property(), is_basic_complex, is_basic_float, is_basic_int, is_basic_logical, is_basic_overloaded, is_basic_pointer, and pips_internal_error.

Referenced by _expression_similar_p(), do_simdizer_init(), and reorder_pointer_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compare_entities()

int compare_entities ( const entity pe1,
const entity pe2 
)

Comparison function for qsort.

FI: Which sorting do you want?

Parameters
pe1e1
pe2e2

Definition at line 1328 of file entity.c.

1329 {
1330  int
1331  null_1 = (*pe1==(entity)NULL),
1332  null_2 = (*pe2==(entity)NULL);
1333 
1334  if (null_1 || null_2)
1335  // FI: I reverse the test to place the constant term at the end of
1336  //the vector so as to regenerate expressions with trailing
1337  //constant terms; for instance, I get J+1 instead of 1+J.
1338  // Of course, this impacts PIPS code generation
1339  //return(null_2-null_1);
1340  return(null_1-null_2);
1341  else {
1342  /* FI: Which sorting do you want? */
1343 
1344  //string s1 = entity_name_without_scope(*pe1);
1345  //string s2 = entity_name_without_scope(*pe2);
1346  //int c = strcmp(s1, s2);
1347  //
1348  //free(s1);
1349  //free(s2);
1350  //
1351  //return c;
1352  return strcmp(entity_name(*pe1), entity_name(*pe2));
1353  }
1354 }

References entity_name.

Referenced by compare_Pvecteur(), compile_reduction(), copy_from_statement(), copy_to_statement(), dagvtx_cmp_entity(), do_group_constants_terapix(), do_simdizer_init(), fprint_any_environment(), get_symbol_table(), inline_expression_call(), print_entity_task_buffers(), print_sesam_tasks_buffers_header(), promote_local_entities(), real_freia_scalar_rw_dep(), sort_entities_with_dep(), sort_list_of_entities(), statements_localize_declarations(), transfert_block(), transfert_loop(), transfert_statement(), and update_referenced_entities().

+ Here is the caller graph for this function:

◆ compare_Pvecteur()

int compare_Pvecteur ( Pvecteur pv1,
Pvecteur pv2 
)

comparison function for Pvecteur in pips, to be used by qsort.

Parameters
pv1v1
pv2v2

Definition at line 50 of file constraint.c.

51 {
52  return compare_entities((const entity*)&var_of(*pv1),
53  (const entity*)&var_of(*pv2));
54 }
int compare_entities(const entity *pe1, const entity *pe2)
Comparison function for qsort.
Definition: entity.c:1328
#define var_of(varval)

References compare_entities(), and var_of.

Referenced by constraints_to_loop_bound(), generate_io_collect_or_update(), generate_io_system(), and make_vecteur_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compatible_basic_p()

bool compatible_basic_p ( basic  b1,
basic  b2 
)

check if two basics are similar.

That is if they are equal modulo typedefs and modulo the precision. For instance, "int" and "unsigned int" and "long int" are all considered compatible.

Parameters
b11
b22

Definition at line 978 of file type.c.

979 {
980  return compare_basic_p(b1,b2, false);
981 }
static bool compare_basic_p(basic b1, basic b2, bool same_p)
Used to implement the next two functions.
Definition: type.c:933

References b1, b2, and compare_basic_p().

Referenced by c_user_function_call_to_transformer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compilation_unit_entity_p()

bool compilation_unit_entity_p ( entity  e)

Check if the given module entity is a compilation unit.

Definition at line 87 of file module.c.

87  {
88  if (e == entity_undefined) return false;
90 }
bool compilation_unit_p(const char *module_name)
The names of PIPS entities carry information about their nature.
Definition: entity_names.c:56

References compilation_unit_p(), entity_name, and entity_undefined.

Referenced by c_text_related_entities(), declaration_to_post_pv(), explicit_extern_entity_p(), extern_entity_p(), filtered_declaration_list(), find_enum_of_member(), FindOrCreateCurrentEntity(), generic_function_to_return_value(), linearize_array_generic(), module_entity_to_compilation_unit_entity(), and UpdateEntity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ complex_constant_expression_p()

bool complex_constant_expression_p ( expression  cce)
Parameters
ccece

Definition at line 416 of file constant.c.

417 {
418  bool is_complex_constant_p = false;
419  if(expression_call_p(cce)) {
421  const char* fn = entity_local_name(f);
422 
423  is_complex_constant_p = (strcmp(fn, IMPLIED_COMPLEX_NAME)==0
424  || strcmp(fn, IMPLIED_DCOMPLEX_NAME)==0);
425  }
426 
427  return is_complex_constant_p;
428 }
#define IMPLIED_DCOMPLEX_NAME
Definition: ri-util-local.h:89
#define IMPLIED_COMPLEX_NAME
Definition: ri-util-local.h:88

References call_function, entity_local_name(), expression_call_p(), expression_syntax, f(), IMPLIED_COMPLEX_NAME, IMPLIED_DCOMPLEX_NAME, and syntax_call.

Referenced by MakeDataValueSet().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ complex_to_expression()

expression complex_to_expression ( float  re,
float  im 
)
Parameters
ree
imm

Definition at line 1234 of file expression.c.

1235 {
1237 }
expression MakeComplexConstantExpression(expression r, expression i)
Definition: constant.c:397
expression float_to_expression(float c)
Definition: expression.c:1229

References float_to_expression(), and MakeComplexConstantExpression().

Referenced by make_0val_expression(), and make_1val_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compute_basic_concrete_type()

type compute_basic_concrete_type ( type  t)

computes a new type which is the basic concrete type of the input type (this new type is not stored in the entity_types_to_bctypes table).

Parameters
tis a type
Returns
: a new type in which typedefs have been expanded to reach a basic concrete type, except for struct, union, and enum because the inner types of the fields cannot be changed (they are entities).

pips_debug(8, "Begin with type \"s"
",

words_to_string(words_type(t, NIL, false)));

pips_debug(9, "of basic \"s"and number of dimensions d.
",

basic_to_string(bt),

(int) gen_length(lt));

pips_debug(8, "Ends with type \"s"
",

words_to_string(words_type(nt, NIL, false)));

ifdebug(9)

{

if(type_variable_p(nt))

{

variable nvt = type_variable(nt);

basic nbt = variable_basic(nvt);

list nlt = variable_dimensions(nvt);

pips_debug(9, "of basic \"s"and number of dimensions d.
",

basic_to_string(nbt),

(int) gen_length(nlt));

}

}

pips_assert("nt is not a typedef", type_variable_p(nt)? !basic_typedef_p(variable_basic(type_variable(nt))) : true);

Definition at line 3556 of file type.c.

3557 {
3558  type nt;
3559  debug_on("RI-UTIL_DEBUG_LEVEL");
3560 
3561  // FI: to avoid cycles betwen librairies ri-util and prettyprint
3562  /* pips_debug(8, "Begin with type \"%s\"\n", */
3563  /* words_to_string(words_type(t, NIL, false))); */
3564 
3565  switch (type_tag(t))
3566  {
3567  case is_type_variable:
3568  {
3569  variable vt = type_variable(t);
3570  basic bt = variable_basic(vt);
3571  list lt = variable_dimensions(vt);
3572 
3573  /* pips_debug(9, "of basic \"%s\"and number of dimensions %d.\n", */
3574  /* basic_to_string(bt), */
3575  /* (int) gen_length(lt)); */
3576 
3577  if(basic_typedef_p(bt))
3578  {
3579  entity e = basic_typedef(bt);
3581 
3582  pips_debug(9, "typedef : %s\n", type_to_string(st));
3583  if (type_variable_p(st))
3584  {
3585  nt = st;
3589  }
3590  else if (type_void_p(st))
3591  {
3592  if (ENDP(lt))
3593  nt = st;
3594  else
3595  {
3596  nt = copy_type(t);
3597  free_type(st);
3598  }
3599  }
3600  else if (type_struct_p(st) || type_union_p(st) || type_enum_p(st))
3601  {
3603  gen_full_copy_list(lt),
3605  free_type(st);
3606  }
3607  else
3608  {
3609  free_type(st);
3610  nt = copy_type(t);
3611  }
3612  }
3613  else if(basic_pointer_p(bt))
3614  {
3616 
3617  pips_debug(9, "pointer \n");
3618  nt = make_type_variable
3620  gen_full_copy_list(lt),
3622  }
3623  else
3624  {
3625  pips_debug(9, "other variable case \n");
3626  // Normalize the dimensions which may contain unevaluated
3627  // constant expressions
3628  // nt = copy_type(t);
3629  variable v = type_variable(t);
3630  list ql = variable_qualifiers(v);
3631  list nql = gen_full_copy_list(ql);
3632  list dl = variable_dimensions(v);
3634  basic b = variable_basic(v);
3635  basic nb = copy_basic(b);
3636  variable nv = make_variable(nb, ndl, nql);
3637  nt = make_type_variable(nv);
3638  }
3639  }
3640  break;
3641 
3642  default:
3643  nt = copy_type(t);
3644  }
3645 
3646  // FI: to avoid cycles betwen librairies ri-util and prettyprint
3647  /* pips_debug(8, "Ends with type \"%s\"\n", */
3648  /* words_to_string(words_type(nt, NIL, false))); */
3649  /* ifdebug(9) */
3650  /* { */
3651  /* if(type_variable_p(nt)) */
3652  /* { */
3653  /* variable nvt = type_variable(nt); */
3654  /* basic nbt = variable_basic(nvt); */
3655  /* list nlt = variable_dimensions(nvt); */
3656  /* pips_debug(9, "of basic \"%s\"and number of dimensions %d.\n", */
3657  /* basic_to_string(nbt), */
3658  /* (int) gen_length(nlt)); */
3659  /* } */
3660  /* } */
3661 
3662  /* pips_assert("nt is not a typedef",
3663  type_variable_p(nt)?
3664  !basic_typedef_p(variable_basic(type_variable(nt))) : true); */
3665  debug_off();
3666  return nt;
3667 }
basic make_basic_derived(entity _field_)
Definition: ri.c:182
list dimensions_to_normalized_dimensions(list dl)
evaluate constant expressions appearing in dimensions of list dl
Definition: type.c:3528
type compute_basic_concrete_type(type t)
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
#define type_enum_p(x)
Definition: ri.h:2968
#define type_union_p(x)
Definition: ri.h:2965

References basic_pointer, basic_pointer_p, basic_typedef, basic_typedef_p, compute_basic_concrete_type(), copy_basic(), copy_type(), debug_off, debug_on, dimensions_to_normalized_dimensions(), ENDP, entity_type, free_type(), gen_full_copy_list(), gen_nconc(), is_type_variable, make_basic_derived(), make_basic_pointer(), make_type_variable(), make_variable(), pips_debug, type_enum_p, type_struct_p, type_tag, type_to_string(), type_union_p, type_variable, type_variable_p, type_void_p, variable_basic, variable_dimensions, and variable_qualifiers.

Referenced by adapt_reference_to_type(), analyzed_type_p(), any_source_to_sinks(), any_user_call_site_to_transformer(), anywhere_source_to_sinks(), assignment_to_points_to(), c_return_to_transformer(), cast_to_points_to_sinks(), check_rhs_value_types(), check_type_of_points_to_cells(), compute_basic_concrete_type(), concrete_array_pointer_type_equal_p(), concrete_type_equal_p(), declaration_statement_to_points_to(), derived_formal_parameter_to_stub_points_to(), entity_basic_concrete_type(), entity_flow_or_context_sentitive_heap_location(), eval_linear_expression(), expression_to_concrete_type(), expression_to_points_to_cells(), expression_to_points_to_sources(), expression_to_transformer(), external_call_to_post_pv(), formal_source_to_sinks(), freed_list_to_points_to(), generic_function_to_return_value(), generic_substitute_formal_array_elements_in_transformer(), have_null_value_in_pointer_expression_p(), module_to_value_mappings(), offset_cell(), pointer_expression_to_transformer(), points_to_cell_to_concrete_type(), points_to_cell_types_compatibility(), points_to_expression_to_concrete_type(), points_to_expression_to_pointed_type(), points_to_function_projection(), points_to_reference_to_concrete_type(), points_to_source_to_translations(), points_to_translation_of_struct_formal_parameter(), process_casted_sinks(), reference_add_field_dimension(), sizeofexpression_to_points_to_sinks(), struct_initialization_to_points_to(), struct_reference_assignment_or_equality_to_transformer(), substitute_stubs_in_transformer(), types_compatible_for_effects_interprocedural_translation_p(), user_call_to_points_to_sinks(), and words_points_to_reference().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compute_statement_to_goto_table()

void compute_statement_to_goto_table ( statement  s)

Since clean_up_sequences() is called before the controlizer, there may be some GOTO.

GOTOs are in fact pointer to the target statement, hence when target statements are moved around, some GOTOs need to be updated. For this purpose, we build a list of GOTOs per target statement.

Definition at line 257 of file clean_up_sequences.c.

258 {
259  pips_assert("Map statement_to_goto_table should be uninitialized.\n",
260  statement_to_goto_table == NULL);
261 
264 }
bool statement_to_goto_table_flt(instruction i)
End: clean up sequences context.
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
Definition: genClib.c:2752
@ hash_pointer
Definition: newgen_hash.h:32
#define instruction_domain
newgen_functional_domain_defined
Definition: ri.h:202

References gen_null(), gen_recurse, hash_pointer, hash_table_make(), instruction_domain, pips_assert, statement_to_goto_table, and statement_to_goto_table_flt().

Referenced by clean_up_sequences_internal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ concat_new_entities()

list concat_new_entities ( list  l1,
list  l2 
)

returns l1 after elements of l2 but not of l1 have been appended to l1.

l2 is freed append all elements of l2 not in l1 to l1 and free l2

Parameters
l1list to append entities to
l2list from which the new entities come
Returns
l1 with extra new entities appended
Parameters
l11
l22

Definition at line 2236 of file entity.c.

2237 {
2238  list new_l2 = NIL;
2239  set s = set_make(set_pointer);
2240  set_assign_list(s, l1);
2241  FOREACH(ENTITY,e,l2) {
2242  if( ! set_belong_p(s,e) )
2243  new_l2=CONS(ENTITY,e,new_l2);
2244  }
2245  gen_free_list(l2);
2246  set_free(s);
2247  return gen_nconc(l1, gen_nreverse(new_l2));
2248 }
set set_assign_list(set, const list)
assigns a list contents to a set all duplicated elements are lost
Definition: set.c:474
void set_free(set)
Definition: set.c:332
FI: I do not understand why the type is duplicated at the set level.
Definition: set.c:59

References CONS, ENTITY, FOREACH, gen_free_list(), gen_nconc(), gen_nreverse(), NIL, set_assign_list(), set_belong_p(), set_free(), set_make(), and set_pointer.

+ Here is the call graph for this function:

◆ concrete_array_pointer_type_equal_p()

bool concrete_array_pointer_type_equal_p ( type  t1,
type  t2 
)

Same as above, but resolve typedefs first.

Parameters
t11
t22

Definition at line 700 of file type.c.

701 {
704  bool equal_p = array_pointer_type_equal_p(ct1, ct2);
705  // Basic concrete types are memoized in a hash-table.
706  // They should not be freed (see corresponding functions)
707  // free_type(ct1), free_type(ct2);
708  return equal_p;
709 }

References array_pointer_type_equal_p(), and compute_basic_concrete_type().

Referenced by type_compatible_with_points_to_cell_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ concrete_type_equal_p()

bool concrete_type_equal_p ( type  t1,
type  t2 
)

Expand typedefs before the type comparison.

Parameters
t11
t22

Definition at line 571 of file type.c.

572 {
575  bool equal_p = generic_type_equal_p(ct1, ct2, false, true, hash_table_undefined);
576  free_type(ct1), free_type(ct2);
577  return equal_p;
578 }
static bool generic_type_equal_p(type t1, type t2, bool strict_p, bool qualifier_p, hash_table structural_table)
Warning: the lengths of string basics are not checked!!! string_type_size() could be used but it is p...
Definition: type.c:483

References compute_basic_concrete_type(), free_type(), generic_type_equal_p(), and hash_table_undefined.

+ Here is the call graph for this function:

◆ const_variable_p()

bool const_variable_p ( entity  v)

Definition at line 1687 of file variable.c.

1688 {
1690 }
bool qualified_variable_p(entity v, unsigned int is_qualified)
The variable may turn out to be a function.
Definition: variable.c:1666
@ is_qualifier_const
Definition: ri.h:2127

References is_qualifier_const, and qualified_variable_p().

Referenced by EvalSyntax(), expression_constant(), extended_expression_constant_p(), global_source_to_sinks(), and reference_dependence_variable_check_and_add().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ constant_basic()

basic constant_basic ( entity  c)

Definition at line 633 of file constant.c.

634 {
636  return b;
637 }

References entity_type, functional_result, type_functional, type_variable, and variable_basic.

Referenced by constant_constraint_check(), and float_constant_to_double().

+ Here is the caller graph for this function:

◆ constant_expression_supporting_entities()

list constant_expression_supporting_entities ( list  sel,
set  vt,
expression  e 
)

C version.

Parameters
selel
vtt

Definition at line 4181 of file type.c.

4182 {
4183  return generic_constant_expression_supporting_entities(sel, vt, e, true);
4184 }
list generic_constant_expression_supporting_entities(list sel, set vt, expression e, bool language_c_p)
Definition: type.c:4058

References generic_constant_expression_supporting_entities().

Referenced by enum_supporting_entities(), and variable_type_supporting_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ constant_expression_supporting_references()

list constant_expression_supporting_references ( list  srl,
expression  e 
)

Only applicable to C expressions.

ifdebug(9) {

pips_debug(8, "Begin: ");

print_references(srl);

fprintf(stderr, "\n");

}

We need to know if we are dealing with C or Fortran code.

In C, f cannot be declared directly, we need its enum

But in Fortran, we are done

FI: suggested kludge: use a Fortran incompatible type for enum member. But currently they are four byte signed integer (c89) and this Fortran INTEGER type :-(

Could be guarded so as not to be added twice. Guard might be useless with because types are visited only once.

Forward the inner expression

do nothing for the time being...

ifdebug(9) {

pips_debug(8, "End: ");

print_references(srl);

fprintf(stderr, "\n");

}

Parameters
srlrl

Definition at line 4451 of file type.c.

4452 {
4453  syntax s = expression_syntax(e);
4454 
4455  // FI: to avoid cycles betwen librairies ri-util and prettyprint
4456  /* ifdebug(9) { */
4457  /* pips_debug(8, "Begin: "); */
4458  /* print_references(srl); */
4459  /* fprintf(stderr, "\n"); */
4460  /* } */
4461 
4462  if(syntax_call_p(s)) {
4463  call c = syntax_call(s);
4464  entity f = call_function(c);
4465 
4467  /* We need to know if we are dealing with C or Fortran code. */
4468  /* In C, f cannot be declared directly, we need its enum */
4469  /* But in Fortran, we are done */
4470  /* FI: suggested kludge: use a Fortran incompatible type for
4471  enum member. But currently they are four byte signed integer (c89)
4472  and this Fortran INTEGER type :-( */
4473 
4474  entity e_of_f = find_enum_of_member(f);
4475  //srl = CONS(ENTITY, e_of_f, srl);
4476  srl = enum_supporting_references(srl, e_of_f);
4477  }
4478 
4479  MAP(EXPRESSION, se, {
4481  }, call_arguments(c));
4482  }
4483  else if(syntax_reference_p(s)) {
4484  reference r = syntax_reference(s);
4485  list inds = reference_indices(r);
4486  /* Could be guarded so as not to be added twice. Guard might be
4487  useless with because types are visited only once. */
4488  srl = gen_nconc(srl, CONS(REFERENCE, r, NIL));
4489  MAP(EXPRESSION, se, {
4491  }, inds);
4492  }
4493  else if(syntax_cast_p(s)) {
4494  /* Forward the inner expression */
4497  } else {
4498  /* do nothing for the time being... */
4499  ;
4500  }
4501 
4502  // FI: to avoid cycles betwen librairies ri-util and prettyprint
4503  /* ifdebug(9) { */
4504  /* pips_debug(8, "End: "); */
4505  /* print_references(srl); */
4506  /* fprintf(stderr, "\n"); */
4507  /* } */
4508 
4509  return srl;
4510 }
entity find_enum_of_member(entity m)
Definition: entity.c:2713
list constant_expression_supporting_references(list srl, expression e)
Only applicable to C expressions.
Definition: type.c:4451
list enum_supporting_references(list srl, entity e)
Definition: type.c:4415
bool symbolic_constant_entity_p(entity)
BEGIN_EOLE.
Definition: variable.c:83
#define syntax_reference_p(x)
Definition: ri.h:2728
#define REFERENCE(x)
REFERENCE.
Definition: ri.h:2296
#define syntax_reference(x)
Definition: ri.h:2730
#define syntax_cast(x)
Definition: ri.h:2739
#define syntax_cast_p(x)
Definition: ri.h:2737

References call_arguments, call_function, cast_expression, CONS, constant_expression_supporting_references(), enum_supporting_references(), EXPRESSION, expression_syntax, f(), find_enum_of_member(), gen_nconc(), MAP, NIL, REFERENCE, reference_indices, symbolic_constant_entity_p(), syntax_call, syntax_call_p, syntax_cast, syntax_cast_p, syntax_reference, and syntax_reference_p.

Referenced by constant_expression_supporting_references(), enum_supporting_references(), symbolic_supporting_references(), and variable_type_supporting_references().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ constant_reference_to_normalized_constant_reference()

reference constant_reference_to_normalized_constant_reference ( reference  cr)

Allocate a new reference with evaluated subscripts.

For instance, return a[2] for a[10/2-3]

This function deals with all kinds of references, including the points-to references which use fields as subscripts.

There is an ambiguity for a[*] where * may be considered a constant in some passes of PIPS. However, it denotes a constant set of references and not a constant reference. The returned reference is undefined.

Parameters
crr

Definition at line 1068 of file eval.c.

1069 {
1071  list sl = reference_indices(cr);
1072  list nsl = NIL;
1073  bool constant_p = true;
1074  FOREACH(EXPRESSION, s, sl) {
1076  if(unbounded_expression_p(s)) {
1077  constant_p = false;
1078  break;
1079  }
1080  else if(expression_reference_p(s)) {
1081  // it must be a field
1082  ns = copy_expression(s);
1083  }
1084  else {
1085  intptr_t i;
1086  if(expression_integer_value(s, &i)) {
1087  ns = int_to_expression((int) i);
1088  }
1089  else
1090  pips_internal_error("Unexpected case\n.");
1091  }
1092  nsl = CONS(EXPRESSION, ns, nsl);
1093  }
1094  if(constant_p) {
1095  entity v = reference_variable(cr);
1096  ncr = make_reference(v, NIL);
1097  nsl = gen_nreverse(nsl);
1098  reference_indices(ncr) = nsl;
1099  }
1100  else {
1101  gen_full_free_list(nsl);
1102  }
1103  return ncr;
1104 }
expression copy_expression(expression p)
EXPRESSION.
Definition: ri.c:850
reference make_reference(entity a1, list a2)
Definition: ri.c:2083
void gen_full_free_list(list l)
Definition: genClib.c:1023
static bool constant_p(entity e)
This function return a bool indicating if related entity e represents a constant.
bool expression_integer_value(expression e, intptr_t *pval)
Definition: eval.c:792
bool unbounded_expression_p(expression e)
Definition: expression.c:4329
#define reference_undefined
Definition: ri.h:2302
#define expression_undefined
Definition: ri.h:1223
#define intptr_t
Definition: stdint.in.h:294

References CONS, constant_p(), copy_expression(), EXPRESSION, expression_integer_value(), expression_reference_p(), expression_undefined, FOREACH, gen_full_free_list(), gen_nreverse(), int_to_expression(), intptr_t, make_reference(), NIL, pips_internal_error, reference_indices, reference_undefined, reference_variable, and unbounded_expression_p().

Referenced by constant_memory_access_path_to_location_entity(), and make_location_entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ constant_string_entity_p()

bool constant_string_entity_p ( entity  e)

Definition at line 356 of file constant.c.

357 {
358  const char * eun = entity_user_name(e);
359  bool first_quote = eun[0]=='"';
360  bool last_quote = eun[strlen(eun)-1] == '"';
361  return first_quote && last_quote;
362 }

References entity_user_name().

Referenced by entities_maymust_conflict_p(), expression_string_constant_p(), filter_formal_context_according_to_actual_context(), new_filter_formal_context_according_to_actual_context(), and points_to_translation_mapping_is_typed_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ control_node_reorder()

void control_node_reorder ( control  ,
set   
)

◆ convert_bound_expression()

expression convert_bound_expression ( expression  e,
bool  upper_p,
bool  non_strict_p 
)

Replace a C expression used as FOR bound by a Fortran DO bound expression, taking into account the C comparison operator used.

Fi this test is too strong to preserve source code

The offset might not be plus or minus one, unless we know the index is an integer? Does it depend on the step value? More thought needed than available tonight (FI)

The offset might not be plus or minus one, unless we know the index is an integer? Does it depend on the step value? More thought needed than available tonight (FI)

May modify the source code a bit more than necessary, but avoids stupid expressions such as 64-1-1

This could be generalized to any affine expression. See for instance loop_bound02.c. But the source code is likely to be disturbed if the bound expression is regenerated from v after adding or subtracting 1 from its constant term.

Parameters
upper_ppper_p
non_strict_pon_strict_p

Definition at line 2968 of file expression.c.

2969 {
2971 
2972  if(non_strict_p) {
2973  b = copy_expression(e);
2974  }
2975  else {
2976  /* */
2977  intptr_t ib = 0;
2978  intptr_t nb = 0;
2979 
2980  /* Fi this test is too strong to preserve source code */
2981  if(false && expression_integer_value(e, &ib)) {
2982  /* The offset might not be plus or minus one, unless we know the
2983  index is an integer? Does it depend on the step value? More
2984  thought needed than available tonight (FI) */
2985  nb = upper_p? ib-1 : ib+1;
2986  b = int_to_expression(nb);
2987  }
2988  else if(expression_constant_p(e)) {
2989  /* The offset might not be plus or minus one, unless we know the
2990  index is an integer? Does it depend on the step value? More
2991  thought needed than available tonight (FI) */
2992  ib = expression_to_int(e);
2993  nb = upper_p? ib-1 : ib+1;
2994  b = int_to_expression(nb);
2995  }
2996  else if(NORMALIZE_EXPRESSION(e), expression_linear_p(e)) {
2997  /* May modify the source code a bit more than necessary, but
2998  avoids stupid expressions such as 64-1-1 */
3000  Pvecteur v = normalized_linear(n);
3001  /* This could be generalized to any affine expression. See for
3002  instance loop_bound02.c. But the source code is likely to be
3003  disturbed if the bound expression is regenerated from v after
3004  adding or subtracting 1 from its constant term. */
3005  if(vect_constant_p(v) || VECTEUR_NUL_P(v)) {
3006  Value c = vect_coeff(TCST, v);
3007  ib = (int) c;
3008  nb = upper_p? ib-1 : ib+1;
3009  b = int_to_expression(nb);
3010  }
3011  }
3012  if(expression_undefined_p(b)) {
3015 
3016  b = MakeBinaryCall(op, copy_expression(e), offset);
3017  }
3018  }
3019  return b;
3020 }
bool vect_constant_p(Pvecteur)
bool vect_constant_p(Pvecteur v): v contains only a constant term, may be zero
Definition: predicats.c:211
#define NORMALIZE_EXPRESSION(e)
bool expression_linear_p(expression e)
returns if e is already normalized and linear.
Definition: eval.c:951
bool expression_constant_p(expression exp)
================================================================
Definition: expression.c:2453
int expression_to_int(expression exp)
================================================================
Definition: expression.c:2205
expression MakeBinaryCall(entity f, expression eg, expression ed)
Creates a call expression to a function with 2 arguments.
Definition: expression.c:354
#define expression_undefined_p(x)
Definition: ri.h:1224
#define normalized_linear(x)
Definition: ri.h:1781
#define VECTEUR_NUL_P(v)
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...
Definition: unaires.c:228

References copy_expression(), entity_intrinsic(), expression_constant_p(), expression_integer_value(), expression_linear_p(), expression_normalized, expression_to_int(), expression_undefined, expression_undefined_p, int, int_to_expression(), intptr_t, MakeBinaryCall(), MINUS_OPERATOR_NAME, NORMALIZE_EXPRESSION, normalized_linear, offset, PLUS_OPERATOR_NAME, TCST, vect_coeff(), vect_constant_p(), and VECTEUR_NUL_P.

Referenced by condition_expression_to_final_bound().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateEntity()

entity CreateEntity ( const char *  package_name,
const char *  local_name 
)

BEGIN_EOLE.

  • please do not remove this line Lines between BEGIN_EOLE and END_EOLE tags are automatically included in the EOLE project (JZ - 11/98)
Parameters
package_nameackage_name
local_nameocal_name

Definition at line 1572 of file entity.c.

1573 {
1574  char * name;
1575  asprintf(&name,"%s"MODULE_SEP_STRING"%s",package_name, local_name);
1577  return e;
1578 }
const char * local_name(const char *s)
Does not take care of block scopes and returns a pointer.
Definition: entity_names.c:221
#define value_undefined
Definition: ri.h:3016
#define storage_undefined
Definition: ri.h:2476

References asprintf, local_name(), make_entity, MODULE_SEP_STRING, storage_undefined, type_undefined, and value_undefined.

Referenced by entity_all_module_locations(), and FindOrCreateEntity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateIntrinsic()

entity CreateIntrinsic ( string  name)

this function does not create an intrinsic function because they must all be created beforehand by the bootstrap phase (see bootstrap/bootstrap.c).

Parameters
nameame

Definition at line 1311 of file entity.c.

1312 {
1314  pips_assert("entity is defined", e!=entity_undefined );
1315  pips_assert("entity is intrinsic", intrinsic_entity_p(e));
1316  return(e);
1317 }
#define TOP_LEVEL_MODULE_NAME
Module containing the global variables in Fortran and C.
Definition: naming-local.h:101
entity FindOrCreateEntity(const char *package, const char *local_name)
Problem: A functional global entity may be referenced without parenthesis or CALL keyword in a functi...
Definition: entity.c:1586
bool intrinsic_entity_p(entity e)
Definition: entity.c:1272

References entity_undefined, FindOrCreateEntity(), intrinsic_entity_p(), pips_assert, and TOP_LEVEL_MODULE_NAME.

Referenced by add_loop_parallel_threshold(), bound_to_statement(), c_dim_string(), cast_constant(), convert_constant_from_double_to_dcomplex(), convert_constant_from_real_to_complex(), DeclarePointer(), dereference_expression(), dims_array_init(), do_brace_expression_to_statements(), FixCReturnStatements(), get_allocatable_data_expr(), get_cast_function_for_basic(), gfc2pips_array_ref2indices(), gfc2pips_buildCaseTest(), gfc2pips_code2instruction_(), gfc2pips_dumpSELECT(), gfc2pips_expr2expression(), gfc2pips_get_list_of_dimensions2(), gfc2pips_int2expression(), gfc2pips_real2expression(), gfc2pips_reduce_repeated_values(), gfc2pips_symbol2data_instruction(), make_address_of_expression(), make_assign_expression(), make_send_receive_conversion(), make_simple_Fortran_io_instruction(), make_unbounded_expression(), MakeArithmIfInst(), MakeAtom(), MakeBraceExpression(), MakeCommaExpression(), MakeDimension(), MakeImpliedDo(), MakeIoInstA(), MakeIoInstB(), MakeSimpleIoInst1(), MakeZeroOrOneArgCallInst(), merge_conditions(), omp_operator_entity(), pragma_build_if_condition(), pragma_if_as_expr(), pragma_omp_parallel_as_exprs(), pragma_omp_parallel_for_as_exprs(), pragma_private_as_expr_with_args(), recover_structured_while(), reduction_as_expr(), signed_constant_expression_p(), simplify_complex_expression(), split_complex_expression(), statement_has_omp_parallel_directive_p(), step_local_regionArray(), switch_generic_to_specific(), switch_specific_cmplx(), switch_specific_dcmplx(), words_dimension(), and words_substring_op().

+ Here is the call graph for this function:

◆ CSafeSizeOfArray()

int CSafeSizeOfArray ( entity  a)

BEGIN_EOLE.

  • please do not remove this line Lines between BEGIN_EOLE and END_EOLE tags are automatically included in the EOLE project (JZ - 11/98)

should be a pips_user_error() to avoid useless and dangerous results

Definition at line 225 of file size.c.

226 {
227  int s;
228 
229  if(!SizeOfArray(a, &s)) {
230  pips_user_warning("Varying size for array \"%s\"\n", entity_name(a));
231  /* should be a pips_user_error() to avoid useless and dangerous
232  results */
233  pips_user_warning("Not yet supported properly by PIPS\n");
234  }
235 
236  return s;
237 }

References entity_name, pips_user_warning, and SizeOfArray().

Referenced by ComputeAreaOffset(), SizeOfElements(), and type_memory_size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ current_offset_of_area()

int current_offset_of_area ( entity  a,
entity  v 
)

the local areas are StaticArea, DynamicArea, HeapArea, StackArea

Varying Length Arrays (VLA) in C or Fortran must be allocated in the stack area, where offsets are not computed in the same way.

Parameters
aarea
vscalar or array variable

Definition at line 174 of file area.c.

176 {
177  int OldOffset;
178  type ta = entity_type(a);
179  area aa = type_area(ta);
180 
181  /* the local areas are StaticArea, DynamicArea, HeapArea, StackArea */
182  OldOffset = area_size(aa);
183  int s;
184  if (!SizeOfArray(v, &s)) {
185  /* Varying Length Arrays (VLA) in C or Fortran must be allocated
186  * in the stack area, where offsets are not computed in the same
187  * way.
188  */
189  pips_internal_error("Ill. arg.: VLA");
190  }
191  else {
192  pips_assert("Offsets are not computed this way in stack areas.\n",
193  !stack_area_p(a));
194  area_size(aa) = OldOffset + s;
195  }
196 
197  area_layout(aa) = gen_nconc(area_layout(aa), CONS(ENTITY, v, NIL));
198  return OldOffset;
199 }

References area_layout, area_size, CONS, ENTITY, entity_type, gen_nconc(), NIL, pips_assert, pips_internal_error, SizeOfArray(), stack_area_p(), and type_area.

Referenced by ComputeAddresses(), GenericAddLocalEntityToDeclarations(), make_nlc_entity(), make_nsp_entity(), make_nub_entity(), replace_indices_region(), replace_indices_region_com(), and save_all_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cute_convex_union()

Psysteme cute_convex_union ( Psysteme  s1,
Psysteme  s2 
)

convex_hull.c

convex_hull.c

Parameters
s11
s22

Definition at line 41 of file convex_hull.c.

42 {
43  Psysteme s;
44 
45  ifdebug(9) {
46  pips_debug(9, "IN\nS1 and S2:\n");
49  }
50 
51  s = sc_cute_convex_hull(s1, s2);
52 
53  ifdebug(9) {
54  pips_debug(9, "S =\n");
56  pips_debug(9, "OUT\n");
57  }
58 
59  return s;
60 }
Psysteme sc_cute_convex_hull(Psysteme, Psysteme)
returns s1 v s2.
Definition: sc_enveloppe.c:369
void sc_fprint(FILE *fp, Psysteme ps, get_variable_name_t nom_var)
void sc_fprint(FILE * f, Psysteme ps, char * (*nom_var)()): cette fonction imprime dans le fichier po...
Definition: sc_io.c:220
char *(* get_variable_name_t)(Variable)
Definition: vecteur-local.h:62

References entity_local_name(), ifdebug, pips_debug, s1, sc_cute_convex_hull(), and sc_fprint().

Referenced by region_sc_convex_hull(), transformer_convex_hull(), and transformer_list_generic_transitive_closure().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dabs_expression_p()

bool dabs_expression_p ( expression  e)

Definition at line 1042 of file expression.c.

1044 {
1046 }
#define DABS_OPERATOR_NAME

References DABS_OPERATOR_NAME, and operator_expression_p().

+ Here is the call graph for this function:

◆ davinci_dump_all_expressions()

void davinci_dump_all_expressions ( FILE *  out,
statement  s 
)

dump all expressions in s to out.

Parameters
outut

Definition at line 2728 of file expression.c.

2729 {
2730  out_flt = out;
2732  out_flt = NULL;
2733 }
static FILE * out_flt
Definition: expression.c:2719
static bool expr_flt(expression e)
Definition: expression.c:2720

References expr_flt(), expression_domain, gen_null(), gen_recurse, out, and out_flt.

Referenced by davinci_dump_expressions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ davinci_dump_expression()

void davinci_dump_expression ( FILE *  out,
expression  e 
)

dump expression e in file out as a davinci graph.

Parameters
outut

Definition at line 2710 of file expression.c.

2711 {
2713  fprintf(out, "[\n");
2715  fprintf(out, "]\n\n");
2717 }
static hash_table seen
static function to store whether a module has been seen during the recursive generation of the daVinc...
Definition: graph.c:85
static bool davinci_dump_expression_rc(FILE *out, expression e, hash_table seen)
Definition: expression.c:2637

References davinci_dump_expression_rc(), fprintf(), hash_pointer, hash_table_free(), hash_table_make(), out, and seen.

Referenced by expr_flt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dead_fcd_directive_p()

bool dead_fcd_directive_p ( entity  f)

Definition at line 74 of file hpfc.c.

75 {
76  return top_level_entity_p(f) &&
78 }
#define DEAD_SUFFIX
#define HPF_PREFIX
moved here because needed by syntax:-(

References DEAD_SUFFIX, entity_local_name(), f(), HPF_PREFIX, same_string_p, and top_level_entity_p().

Referenced by continue_propagation_p(), and hpf_compile_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ declarable_type_p()

bool declarable_type_p ( type  t,
list  pdl 
)

Are all types necessary to define fully type "t" listed in list "pdl"?

This function is used by the prettyprinter to decide if a derived type can be fully defined or if its definition should wait.

Parameters
pdldl

Definition at line 4361 of file type.c.

4362 {
4363  list stl = type_supporting_entities(NIL, t);
4364  bool declarable_p = true;
4365 
4366  FOREACH(ENTITY, e, stl) {
4367  if(typedef_entity_p(e)) {
4368  if(!gen_in_list_p(e, pdl)) {
4369  declarable_p = false;
4370  break;
4371  }
4372  }
4373  }
4374  return declarable_p;
4375 }
bool typedef_entity_p(entity e)
Definition: entity.c:1902
list type_supporting_entities(list sel, type t)
Definition: type.c:4347

References ENTITY, FOREACH, gen_in_list_p(), NIL, type_supporting_entities(), and typedef_entity_p().

Referenced by c_text_related_entities(), and generic_c_words_simplified_entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ declaration_supporting_references()

list declaration_supporting_references ( list  dl)

Find all references in the declaration list.

FI: for efficiency, the type cache used in type_supporting_references() should be moved up here

FI: we should also look up the initial values

Parameters
dll

Definition at line 392 of file module.c.

393 {
394  list srl = NIL;
395 
396  /* FI: for efficiency, the type cache used in
397  type_supporting_references() should be moved up here */
398  FOREACH(ENTITY, v,dl)
399  {
400  if( ! entity_special_area_p(v))
401  {
402  type t = entity_type(v);
403  /* FI: we should also look up the initial values */
404  srl = type_supporting_references(srl, t);
405  }
406  }
407 
408  return srl;
409 }
bool entity_special_area_p(entity e)
Definition: area.c:154
list type_supporting_references(list, type)
Definition: type.c:4700

References ENTITY, entity_special_area_p(), entity_type, FOREACH, NIL, and type_supporting_references().

Referenced by UseFormalArguments().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ declare_new_typedef()

void declare_new_typedef ( const  string)
Parameters
stringn

Definition at line 283 of file static.c.

284 {
285  hash_put(keyword_typedef_table, strdup(tn), (const void *) ((long long int) token_named_type));
286 }
static int token_named_type
Definition: static.c:254
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

References hash_put(), keyword_typedef_table, strdup(), and token_named_type.

Referenced by AddEntityToCompilationUnit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ default_complex_type_p()

bool default_complex_type_p ( type  t)

Definition at line 3246 of file type.c.

3247 {
3248  bool default_complex_p = false;
3249  if(!type_undefined_p(t) && type_variable_p(t)) {
3250  variable v = type_variable(t);
3251  basic b = variable_basic(v);
3252  if(basic_complex_p(b)) {
3253  int s = basic_int(b);
3254 
3255  default_complex_p = ENDP(variable_dimensions(v))
3256  && ENDP(variable_qualifiers(v))
3257  && s == DEFAULT_COMPLEX_TYPE_SIZE;
3258  }
3259  }
3260  return default_complex_p;
3261 }
#define DEFAULT_COMPLEX_TYPE_SIZE

References basic_complex_p, basic_int, DEFAULT_COMPLEX_TYPE_SIZE, ENDP, type_undefined_p, type_variable, type_variable_p, variable_basic, variable_dimensions, and variable_qualifiers.

◆ DefaultLengthOfBasic()

int DefaultLengthOfBasic ( tag  t)

constant.c

constant.c

Definition at line 44 of file constant.c.

45 {
46  int e=-1;
47 
48  switch (t) {
50  e = 0;
51  break;
52  case is_basic_int:
54  break;
55  case is_basic_float:
57  break;
58  case is_basic_logical:
60  break;
61  case is_basic_complex:
63  break;
64  case is_basic_string:
66  break;
67  default:
68  pips_internal_error("case default");
69  break;
70  }
71 
72  return(e);
73 }
#define DEFAULT_LOGICAL_TYPE_SIZE
#define DEFAULT_REAL_TYPE_SIZE
The standard C integer types are represented as follow char = 1 short_int = 2 int = 4 long_int = 6 lo...
#define DEFAULT_CHARACTER_TYPE_SIZE
Default type sizes.

References DEFAULT_CHARACTER_TYPE_SIZE, DEFAULT_COMPLEX_TYPE_SIZE, DEFAULT_INTEGER_TYPE_SIZE, DEFAULT_LOGICAL_TYPE_SIZE, DEFAULT_REAL_TYPE_SIZE, is_basic_complex, is_basic_float, is_basic_int, is_basic_logical, is_basic_overloaded, is_basic_string, and pips_internal_error.

Referenced by InitImplicit(), MakeFortranType(), and SafeMakeConstant().

+ Here is the caller graph for this function:

◆ delete_statement_enclosing_loops()

void delete_statement_enclosing_loops ( statement  )

◆ dependence_of_dependent_type()

list dependence_of_dependent_type ( type  t)

similar to dependent_type_p but return a list of reference on which the type depend.

/param t type to analyze /return list of reference on which the type t depend so this list only contains elements as: i,x,n, a[0], a[1], ... and not n+m, 2*n, ... the reference present in this list as to be freed by the caller with gen_full_free_list for instance

Definition at line 5942 of file type.c.

5943 {
5944  list dep = NIL;
5945  if(type_variable_p(t)) {
5946  variable v = type_variable(t);
5947  list dl = variable_dimensions(v);
5948 
5949  FOREACH(DIMENSION, d, dl) {
5950  expression l = dimension_lower(d);
5951  expression u = dimension_upper(d);
5952  //The test is redundant with the gen_recurse
5953  //if(!extended_expression_constant_p(l))
5955 
5956  //The test is redundant with the gen_recurse
5957  //if(!extended_expression_constant_p(u))
5959  }
5960 
5961  basic b = variable_basic(v);
5963  dep = gen_append(dep, ldb);
5964  gen_free_list(ldb);
5965  ldb=NIL;
5966  }
5967 
5968  return dep;
5969 }
list gen_append(list l1, const list l2)
Definition: list.c:471
static list dependence_of_dependent_basic(basic b)
Definition: type.c:5907
static void reference_dependence_variable_check_and_add(reference ref, list *dependence_list)
Definition: type.c:5898
#define reference_domain
newgen_range_domain_defined
Definition: ri.h:338

References dependence_of_dependent_basic(), DIMENSION, dimension_lower, dimension_upper, FOREACH, gen_append(), gen_context_recurse, gen_free_list(), gen_true2(), NIL, reference_dependence_variable_check_and_add(), reference_domain, type_variable, type_variable_p, variable_basic, and variable_dimensions.

Referenced by dependence_of_dependent_basic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dependent_type_p()

bool dependent_type_p ( type  t)

A type is dependent in many ways according to definitions given in Wikipedia.

Dependent types lead to many issues both theoretical and practical. The semantics of predicate type_equal_p() should be precised.

Here, for practical purposes, we need to know if the storage space required to store a value of a C type is constant and known at compile-time, or if it depends on the environment and the store and must be computed at run-time.

By this definition, functional types are always constant because functions are stored as pointer to functions in C. So in C as in Fortran, only varying dimensions can lead to dependent types. Such variables are called variable-length array (VLA). So this function might be called vla_type_p().

Some VLA are easy to implement and very convenient for the programmer. They have been included very early in Fortran extensions. Hence they have been handled in PIPS for a very long time and are allocated in the STACK_AREA, the DYNAMIC_AREA and Fortran commons being reserved for non variable-length variables.

They were introduced in C99 but relegated to conditional feature in C11 (I kind of remember, due to Microsoft lobbying). Because declarations can be placed anywhere in post C99 code, the implementation of VLA maybe costly. The dimensions must be evaluated and then alignment and packing are performed in situ by the gcc implementation, as well as stack management. For non-VLA variables, gcc seems to perform a pass similar to the flatten code pass or to the clone_statement() function and move all declarations at the begining of the current function (alpha-renaming). So the frame allocation is performed statically, apparently using more space than necessary because variables with disjoint scopes are allocated simultaneously. These implementation issues have been explored by Nelson Lossing.

This predicate is used by passes to check that declarations can be moved/rescheduled (flatten_code, loop_unroll, full_loop_unroll...).

Definition at line 5849 of file type.c.

5850 {
5851  bool dependent_p = false;
5852  if(type_variable_p(t)) {
5853  variable v = type_variable(t);
5854  list dl = variable_dimensions(v);
5855  FOREACH(DIMENSION, d, dl) {
5856  expression l = dimension_lower(d);
5857  expression u = dimension_upper(d);
5860  dependent_p = true;
5861  break;
5862  }
5863  }
5864  if(!dependent_p) {
5865  basic b = variable_basic(v);
5866  dependent_p = dependent_basic_p(b);
5867  }
5868  }
5869  return dependent_p;
5870 }
bool extended_expression_constant_p(expression exp)
Returns true if the value of the expression does not depend syntactically on the current store.
Definition: expression.c:2461
static bool dependent_basic_p(basic b)
Definition: type.c:5872

References dependent_basic_p(), DIMENSION, dimension_lower, dimension_upper, extended_expression_constant_p(), FOREACH, type_variable, type_variable_p, variable_basic, and variable_dimensions.

Referenced by dependent_basic_p(), flatten_code(), and unroll().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dereference_expression()

expression dereference_expression ( expression  e)

generate a newly allocated expression for *(e)

Definition at line 3934 of file expression.c.

3935 {
3936  if (expression_call_p(e))
3937  {
3938  call c = expression_call(e);
3939  if (ENTITY_ADDRESS_OF_P(call_function(c))) // e is "&x"
3940  {
3941  pips_assert("one arg to address operator (&)",
3942  gen_length(call_arguments(c))==1);
3943 
3944  // result is simply "x"
3946  }
3947  }
3948 
3949  // result is "*e"
3951  copy_expression(e));
3952 }
#define DEREFERENCING_OPERATOR_NAME
Definition: ri-util-local.h:93
entity CreateIntrinsic(string name)
this function does not create an intrinsic function because they must all be created beforehand by th...
Definition: entity.c:1311
call expression_call(expression e)
Definition: expression.c:445
expression MakeUnaryCall(entity f, expression a)
Creates a call expression to a function with one argument.
Definition: expression.c:342

References call_arguments, call_function, CAR, copy_expression(), CreateIntrinsic(), DEREFERENCING_OPERATOR_NAME, ENTITY_ADDRESS_OF_P, EXPRESSION, expression_call(), expression_call_p(), gen_length(), MakeUnaryCall(), and pips_assert.

Referenced by switch_vertex_to_assign().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ derived_entity_p()

bool derived_entity_p ( entity  e)

Definition at line 1048 of file entity.c.

1049 {
1050  return entity_struct_p(e) || entity_union_p(e) || entity_enum_p(e);
1051 }
bool entity_struct_p(entity e)
Is entity e the entity corresponding to a struct declaration?
Definition: entity.c:1002
bool entity_union_p(entity e)
Is entity e an entity representing the union declaration?
Definition: entity.c:1038

References entity_enum_p(), entity_struct_p(), and entity_union_p().

Referenced by add_prettyprint_control_list_to_declaration_statement(), c_text_related_entities(), filtered_declaration_list(), get_symbol_table(), and UpdateEntities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ derived_type_fields()

list derived_type_fields ( type  t)
Parameters
tis the entity_type of a basic_derived
Returns
the list of fields of the input type

Definition at line 5354 of file type.c.

5355 {
5356  list l=NIL;
5357 
5358  switch (type_tag(t))
5359  {
5360  case is_type_struct:
5361  l = type_struct(t);
5362  break;
5363  case is_type_union:
5364  l = type_union(t);
5365  break;
5366  case is_type_enum:
5367  l = type_enum(t);
5368  break;
5369  default:
5370  pips_assert("input type is a struct union, or enum\n",
5371  type_struct_p(t) || type_union_p(t) || type_enum_p(t) );
5372  }
5373  return l;
5374 }
#define type_struct(x)
Definition: ri.h:2964
#define type_enum(x)
Definition: ri.h:2970
@ is_type_enum
Definition: ri.h:2907
@ is_type_union
Definition: ri.h:2906
@ is_type_struct
Definition: ri.h:2905
#define type_union(x)
Definition: ri.h:2967

References is_type_enum, is_type_struct, is_type_union, NIL, pips_assert, type_enum, type_enum_p, type_struct, type_struct_p, type_tag, type_union, and type_union_p.

Referenced by derived_type_to_fields(), effect_indices_first_pointer_dimension_rank(), and generic_type_equal_p().

+ Here is the caller graph for this function:

◆ derived_type_p()

bool derived_type_p ( type  t)

Returns true if t is of type struct, union or enum.

Need to distinguish with the case struct/union/enum in type in RI, these are the definitions of the struct/union/enum themselve, not a variable of this type.

Example : struct foo var;

Note: arrays of struct are not considered derived types

Definition at line 3104 of file type.c.

3105 {
3107  && (variable_dimensions(type_variable(t)) == NIL));
3108 }

References basic_derived_p, NIL, type_variable, type_variable_p, variable_basic, and variable_dimensions.

Referenced by any_user_call_site_to_transformer(), c_text_entities(), ensure_comment_consistency(), enum_type_p(), generic_c_words_simplified_entity(), struct_type_p(), and union_type_p().

+ Here is the caller graph for this function:

◆ derived_type_to_fields()

list derived_type_to_fields ( type  t)
Parameters
tis a type of kind "variable" with a basic of kind "derived"
Returns
the list of fields of the input type

Definition at line 5381 of file type.c.

5382 {
5383  list l = NIL;
5384  variable v = type_variable(t);
5385  basic b = variable_basic(v);
5386  if(basic_derived_p(b)) {
5387  entity est = basic_derived(b);
5388  type st = entity_type(est);
5389  l = derived_type_fields(st);
5390  }
5391  else
5392  pips_internal_error("Called with an improper argument.\n");
5393  return l;
5394 }
list derived_type_fields(type t)
Definition: type.c:5354

References basic_derived, basic_derived_p, derived_type_fields(), entity_type, NIL, pips_internal_error, type_variable, and variable_basic.

Referenced by any_source_to_sinks(), and struct_variable_to_fields().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dimension_dup()

dimension dimension_dup ( dimension  d)

Definition at line 1159 of file type.c.

1160 {
1164 }
dimension make_dimension(expression a1, expression a2, list a3)
Definition: ri.c:565
#define dimension_qualifiers(x)
Definition: ri.h:984

References copy_expression(), dimension_lower, dimension_qualifiers, dimension_upper, gen_full_copy_list(), and make_dimension().

Referenced by ldimensions_dup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dimension_equal_p()

bool dimension_equal_p ( dimension  d1,
dimension  d2 
)

same values

Parameters
d11
d22

Definition at line 747 of file type.c.

748 {
749  return /* same values */
752 }

References dimension_lower, dimension_upper, and expression_equal_p().

Referenced by dimensions_equal_p(), and generic_variable_equal_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dimension_size()

int dimension_size ( dimension  d)

this function computes the size of a dimension.

Definition at line 491 of file size.c.

492 {
493  expression sod= SizeOfDimension(d);
494  intptr_t i;
495  if(expression_integer_value(sod,&i))
496  free_expression(sod);
497  else
498  pips_internal_error("dimension is not constant, use SizeOfDimension instead");
499  return i;
500 }
void free_expression(expression p)
Definition: ri.c:853
expression SizeOfDimension(dimension d)
Definition: size.c:503

References expression_integer_value(), free_expression(), intptr_t, pips_internal_error, and SizeOfDimension().

Referenced by ComputeNewSizeOfIthDimension(), loadstore_type_conversion_string(), make_emulated_shared_variable(), normalize_microcode_anotate(), reference_offset(), template_ranges_to_processors_ranges(), and type_memory_size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dimensions_equal_p()

bool dimensions_equal_p ( list  dims1,
list  dims2 
)
Parameters
dims1ims1
dims2ims2

Definition at line 754 of file type.c.

754  {
755  return gen_equals(dims1,dims2,(gen_eq_func_t)dimension_equal_p);
756 }
bool dimension_equal_p(dimension d1, dimension d2)
Definition: type.c:747

References dimension_equal_p(), and gen_equals().

Referenced by generic_variable_equal_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dimensions_to_normalized_dimensions()

list dimensions_to_normalized_dimensions ( list  dl)

evaluate constant expressions appearing in dimensions of list dl

Related function: constant_reference_to_normalized_constant_reference()

Parameters
dll

Definition at line 3528 of file type.c.

3529 {
3530  list ndl = NIL;
3531  FOREACH(DIMENSION, d, dl) {
3532  expression l = dimension_lower(d);
3534  expression u = dimension_upper(d);
3536  list ql = dimension_qualifiers(d);
3537  list nql = gen_full_copy_list(ql);
3538  dimension nd = make_dimension(nl, nu, nql);
3539  ndl = CONS(DIMENSION, nd, ndl);
3540  }
3541  ndl = gen_nreverse(ndl);
3542  return ndl;
3543 }
expression normalize_integer_constant_expression(expression e)
Allocate a new expression equivalent to e, but constant expressions are evaluated.
Definition: eval.c:1112

References CONS, DIMENSION, dimension_lower, dimension_qualifiers, dimension_upper, FOREACH, gen_full_copy_list(), gen_nreverse(), make_dimension(), NIL, and normalize_integer_constant_expression().

Referenced by compute_basic_concrete_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ discard_module_declaration_text()

void discard_module_declaration_text ( entity  a_module)

Discard the decls_text string of the module code to make the prettyprinter ignoring the textual declaration and remake all from the declarations without touching the corresponding property (PRETTYPRINT_ALL_DECLARATIONS).

RK, 31/05/1994.

Parameters
a_module_module

Definition at line 1696 of file variable.c.

1697 {
1698  code c = entity_code(a_module);
1699  string s = code_decls_text(c);
1700 
1701  free(s);
1702  code_decls_text(c) = strdup("");
1703 }
code entity_code(entity e)
Definition: entity.c:1098
#define code_decls_text(x)
Definition: ri.h:786

References code_decls_text, entity_code(), free(), and strdup().

Referenced by add_entity_to_declarations(), atomizer(), and linearize_array_generic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ discard_statement_to_goto_table()

void discard_statement_to_goto_table ( void  )

Discard the statement_to_goto_table map:

Definition at line 269 of file clean_up_sequences.c.

270 {
271  HASH_MAP(k, v, {
272  // Discard every GOTO list:
273  gen_free_list((list) v);
277 }
#define HASH_MAP(k, v, code, ht)
Definition: newgen_hash.h:60

References gen_free_list(), HASH_MAP, hash_table_free(), and statement_to_goto_table.

Referenced by clean_up_sequences_internal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ display_clean_up_sequences_statistics()

void display_clean_up_sequences_statistics ( void  )

Definition at line 62 of file clean_up_sequences.c.

63 {
64  if (get_bool_property("CLEAN_UP_SEQUENCES_DISPLAY_STATISTICS")
65  &&
69  user_log("Statistics about cleaning up sequences:\n");
71  user_log("\t%d empty sequence%s or useless CONTINUE removed.\n",
73  clean_up_empty_block_removed==1? "" : "s");
75  user_log("\t%d %s been fused.\n",
77  clean_up_fused_sequences==1? "sequence has" : "sequences have");
79  user_log("\t%d sequence%s of only 1 statement have been removed.\n",
81  clean_up_1_statement_sequence==1? "" : "s");
82  }
83 }
void user_log(const char *format,...)
Definition: message.c:234
static int clean_up_fused_sequences
static int clean_up_1_statement_sequence
static int clean_up_empty_block_removed
Clean up the sequences and their contents by fusing them or removing useless continues or empty instr...

References clean_up_1_statement_sequence, clean_up_empty_block_removed, clean_up_fused_sequences, get_bool_property(), and user_log().

Referenced by clean_up_sequences().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ divide_expression_p()

bool divide_expression_p ( expression  e)

Definition at line 1012 of file expression.c.

1014 {
1016 }

References DIVIDE_OPERATOR_NAME, and operator_expression_p().

+ Here is the call graph for this function:

◆ do_get_declared_entities()

bool do_get_declared_entities ( statement  s,
set  declared_entities 
)

Helper for get_declared_entities() Add all locally declared entity to the set given in argument.

Parameters
declared_entitieseclared_entities

Definition at line 3074 of file entity.c.

3074  {
3076  set_add_element(declared_entities,declared_entities,e);
3077  }
3078  return true;
3079 }
set set_add_element(set, const set, const void *)
Definition: set.c:152
#define statement_declarations(x)
Definition: ri.h:2460

References FOREACH, set_add_element(), and statement_declarations.

Referenced by get_declared_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dummy_parameter_entity_p()

bool dummy_parameter_entity_p ( entity  p)

is p a dummy parameter?

Definition at line 1941 of file entity.c.

1942 {
1943  string pn = entity_name(p);
1944  string dummy = strstr(pn, DUMMY_PARAMETER_PREFIX);
1945  bool is_dummy = (pn==dummy);
1946 
1947  pips_debug(9, "pn=\"%s\", dummy=\"%s\"\n", pn, dummy);
1948 
1949  return is_dummy;
1950 }
int dummy
A dummy file, to prevent empty libraries from breaking builds.
Definition: dummy.c:41
#define DUMMY_PARAMETER_PREFIX
For dmmmy parameters in functions declarations.
Definition: naming-local.h:93

References DUMMY_PARAMETER_PREFIX, entity_name, and pips_debug.

Referenced by add_implicit_interprocedural_write_effects(), module_formal_parameters(), RemoveDummyArguments(), SubstituteDummyParameters(), UpdateEntity(), UpdateEntity2(), UseFormalArguments(), and variable_to_abstract_location().

+ Here is the caller graph for this function:

◆ dump_arguments()

void dump_arguments ( cons args)

entity_name is a macro, hence the code replication

Parameters
argsrgs

Definition at line 69 of file arguments.c.

71 {
72  if(ENDP(args))
73  (void) fprintf(stderr, "(nil)\n");
74  else {
75  MAPL(c, {entity e = ENTITY(CAR(c));
76  (void) fprintf(stderr,
77  c==args ? "%s" : ", %s",
79  "entity_undefined" : entity_name(e));},
80  args);
81  (void) putc('\n',stderr);
82  }
83 }

References CAR, ENDP, ENTITY, entity_name, entity_undefined, fprintf(), and MAPL.

Referenced by dump_live_loop_indices(), EndOfProcedure(), MakeEntry(), precondition_intra_to_inter(), ProcessEntry(), transformer_filter(), TranslateEntryFormals(), and variable_in_module_p2().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dump_functional()

void dump_functional ( functional  f,
string_buffer  result 
)

FI: we could do nothing or put "void". I choose to put "void" to give more information about the internal representation.

NL

NL

NL

An argument can be functional, but not (yet) a result.

Parameters
resultesult

Definition at line 581 of file declarations.c.

582 {
583  type tr = functional_result(f);
584  bool first = true;
585 
587  {
588  type ta = parameter_type(p);
589 
590  if (first)
591  first = false;
592  else
593  string_buffer_append(result, " x ");
594 
595  pips_assert("Argument type is variable or varags:variable or functional or void",
596  type_variable_p(ta)
598  || type_functional_p(ta)
599  || type_void_p(ta));
600 
601  if (type_variable_p(ta)) {
602  variable v = type_variable(ta);
603  basic b = variable_basic(v);
606  string_buffer_append(result, "(");
607  dump_functional(f,result);
608  string_buffer_append(result, ") *");
609  }
610  else {
612  int ndims = gen_length(variable_dimensions(v));
613  for (int i = 0; i < ndims; i++)
614  string_buffer_append(result, "[]");
615  }
616  }
617  else if(type_functional_p(ta)) {
618  functional fa = type_functional(ta);
619 
620  string_buffer_append(result, "(");
621  dump_functional(fa, result);
622  string_buffer_append(result, ")");
623  }
624  else if(type_varargs_p(ta)) {
625  string_buffer_append(result, concatenate(type_to_string(ta),":",NULL));
626  ta = type_varargs(ta);
627  string_buffer_append(result,
629  }
630  else if(type_void_p(ta)) {
631  /* FI: we could do nothing or put "void". I choose to put "void"
632  to give more information about the internal
633  representation. */
635  }
636  }
637 
639  string_buffer_append(result, concatenate("()",NULL));
640  }
641 
642  string_buffer_append(result, concatenate(" -> ",NULL));
643 
644  if(type_variable_p(tr))
645  string_buffer_append(result,
647  /*,NL*/,NULL));
648  else if(type_void_p(tr))
649  string_buffer_append(result, concatenate(type_to_string(tr)/*,NL*/,NULL));
650  else if(type_unknown_p(tr)){
651  string_buffer_append(result, concatenate(type_to_string(tr)/*,NL*/,NULL));
652  }
653  else if(type_varargs_p(tr)) {
654  string_buffer_append(result,
655  concatenate(type_to_string(tr),":",
657  }
658  else
659  /* An argument can be functional, but not (yet) a result. */
660  pips_internal_error("Ill. type %d", type_tag(tr));
661 }
void string_buffer_append(string_buffer, const string)
append string s (if non empty) to string buffer sb, the duplication is done if needed according to th...
string basic_to_string(basic)
Definition: type.c:87
void dump_functional(functional f, string_buffer result)
Definition: declarations.c:581
string type_to_string(const type)
type.c
Definition: type.c:51
#define type_varargs(x)
Definition: ri.h:2955

References basic_pointer, basic_pointer_p, basic_to_string(), concatenate(), ENDP, f(), FOREACH, functional_parameters, functional_result, gen_length(), parameter_type, pips_assert, pips_internal_error, string_buffer_append(), type_functional, type_functional_p, type_tag, type_to_string(), type_unknown_p, type_varargs, type_varargs_p, type_variable, type_variable_p, type_void_p, variable_basic, and variable_dimensions.

Referenced by get_symbol_table(), and words_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dup_arguments()

cons* dup_arguments ( cons args)

should be a macro later, but keep debugging in mind!

Parameters
argsrgs

Definition at line 225 of file arguments.c.

227 {
228  /* should be a macro later, but keep debugging in mind! */
229  return gen_copy_seq(args);
230 }

References gen_copy_seq().

Referenced by recompute_loop_transformer(), transformer_equality_fix_point(), and transformer_general_intersection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dynamic_area_p()

bool dynamic_area_p ( entity  aire)
Parameters
aireire

Definition at line 68 of file area.c.

69 {
70 #ifndef NDEBUG
72  pips_assert("entity_kind is consistent", result == ( (entity_kind(aire) & ENTITY_DYNAMIC_AREA) == ENTITY_DYNAMIC_AREA));
73 #endif
74  return entity_kind(aire) & ENTITY_DYNAMIC_AREA;
75 }
#define DYNAMIC_AREA_LOCAL_NAME
Definition: naming-local.h:69
@ ENTITY_DYNAMIC_AREA
#define entity_kind(x)
Definition: ri.h:2798

References DYNAMIC_AREA_LOCAL_NAME, ENTITY_DYNAMIC_AREA, entity_kind, module_local_name(), pips_assert, and same_string_p.

Referenced by AnalyzeData(), common_regions_forward_translation(), compute_region_variables(), entity_dynamic_p(), entity_locations_max(), entity_special_area_p(), fix_storage(), new_add_any_variable_to_area(), region_dynamic_var_elim(), regions_dynamic_elim(), sentence_area(), text_entity_declaration(), variable_dynamic_p(), and variable_to_abstract_location().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ effect_basic_depth()

int effect_basic_depth ( basic  b)

Definition at line 4985 of file type.c.

4986 {
4987  int d = 0;
4988 
4989  switch(basic_tag(b)) {
4990  case is_basic_int:
4991  case is_basic_float:
4992  case is_basic_logical:
4993  case is_basic_overloaded:
4994  case is_basic_complex:
4995  case is_basic_string:
4996  case is_basic_bit:
4997  break;
4998  case is_basic_pointer:
4999  {
5000  d = effect_type_depth(basic_pointer(b))+1;
5001  break;
5002  }
5003  case is_basic_derived:
5004  {
5005  entity e = basic_derived(b);
5006  type t = entity_type(e);
5007  d = type_depth(t);
5008  break;
5009  }
5010  case is_basic_typedef:
5011  {
5012  entity e = basic_typedef(b);
5013  type t = entity_type(e);
5014 
5015  d = type_depth(t);
5016  break;
5017  }
5018  default:
5019  pips_internal_error("Unexpected basic tag %d", basic_tag(b));
5020  }
5021 
5022  return d;
5023 }
size_t type_depth(type t)
Number of steps to access the lowest leave of type t without dereferencing.
Definition: type.c:4880
int effect_type_depth(type t)
Number of steps to access the lowest leave of type t.
Definition: type.c:4948

References basic_derived, basic_pointer, basic_tag, basic_typedef, effect_type_depth(), entity_type, is_basic_bit, is_basic_complex, is_basic_derived, is_basic_float, is_basic_int, is_basic_logical, is_basic_overloaded, is_basic_pointer, is_basic_string, is_basic_typedef, pips_internal_error, and type_depth().

Referenced by effect_type_depth().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ effect_type_depth()

int effect_type_depth ( type  t)

Number of steps to access the lowest leave of type t.

Number of dimensions for an array. One for a struct or an union field, plus its dimension. The difference with type_depth is that it does not stop recursing when encountering a pointer, and that a pointer is considered as having dimension 1. (BC)

This is equivalent to type_depth when property POINTS_TO_STRICT_POINTER_TYPES is set to false (FI).

Definition at line 4948 of file type.c.

4949 {
4950  int d = 0;
4951 
4952  if(type_variable_p(t)) {
4953  variable v = type_variable(t);
4954 
4956  }
4957  else if(type_void_p(t))
4958  d = 0;
4959  else if(type_varargs_p(t))
4960  d = 0;
4961  else if(type_struct_p(t)) {
4962  list fl = type_struct(t);
4963  d = 0;
4964  FOREACH(ENTITY, e, fl) {
4965  int i = type_depth(entity_type(e));
4966  d = d>i?d:i;
4967  }
4968  d++;
4969  }
4970  else if(type_union_p(t)) {
4971  list fl = type_union(t);
4972  d = 0;
4973  FOREACH(ENTITY, e, fl) {
4974  int i = type_depth(entity_type(e));
4975  d = d>i?d:i;
4976  }
4977  d++;
4978  }
4979  else if(type_enum_p(t))
4980  d = 0;
4981 
4982  return d;
4983 }
int effect_basic_depth(basic b)
Definition: type.c:4985

References effect_basic_depth(), ENTITY, entity_type, FOREACH, gen_length(), type_depth(), type_enum_p, type_struct, type_struct_p, type_union, type_union_p, type_varargs_p, type_variable, type_variable_p, type_void_p, variable_basic, and variable_dimensions.

Referenced by effect_basic_depth().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ effects_package_entity_p()

bool effects_package_entity_p ( entity  e)

checks if an entity is an IO_EFFECTS_PACKAGE_NAME, a MALLOC_EFFECTS_NAME or a RAND_EFFECTS_PACKAGE_NAME entity.

These entities are used to model some internal effects of standard libraries and they do not conflict with other entities.

Definition at line 1181 of file entity.c.

1182 {
1183 #ifndef NDEBUG
1184  bool result = rand_effects_entity_p(e)
1187  || time_effect_entity_p(e)
1188  || io_entity_p(e);
1189  pips_assert("entity kind is consistent", result == ((entity_kind(e) & EFFECTS_PACKAGE) == EFFECTS_PACKAGE));
1190 #endif
1191  return entity_kind(e) & EFFECTS_PACKAGE;
1192 }
@ EFFECTS_PACKAGE
bool malloc_effect_entity_p(entity e)
Definition: entity.c:1158
bool rand_effects_entity_p(entity e)
Definition: entity.c:1152
bool io_entity_p(entity e)
Several implicit entities are declared to define the implicit effects of IO statements.
Definition: entity.c:1139
bool time_effect_entity_p(entity e)
Definition: entity.c:1170
bool memmove_effect_entity_p(entity e)
Definition: entity.c:1165

References EFFECTS_PACKAGE, entity_kind, io_entity_p(), malloc_effect_entity_p(), memmove_effect_entity_p(), pips_assert, rand_effects_entity_p(), and time_effect_entity_p().

Referenced by analyzed_reference_p(), copy_n_statement(), copy_write_statement(), copy_write_statement_with_cumulated_regions(), create_values_for_simple_effect(), cumul_and_update_effects_of_statement(), entities_maymust_conflict_p(), generic_apply_effects_to_transformer(), module_to_value_mappings(), references_may_conflict_p(), xml_Chain_Graph(), xml_Compute_and_Need(), xml_GlobalVariables(), xml_TaskParameters(), and xml_Type_Entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ element_number()

int element_number ( basic  b,
list  ld 
)

END_EOLE.

this function computes the number of elements of a variable. ld is the list of dimensions of the variable

Parameters
ldd

Definition at line 391 of file size.c.

392 {
393  int en = 0;
394 
395  if(!NumberOfElements(b, ld, &en)) {
396  pips_internal_error("Probably varying size array");
397  }
398 
399  return en;
400 }
bool NumberOfElements(basic b, list ld, int *n)
Definition: size.c:403

References NumberOfElements(), and pips_internal_error.

Referenced by compile_one_reduction(), max_size_of_processors(), and processor_loop().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ empty_extensions()

extensions empty_extensions ( void  )

extension.c

Returns
an empty extensions

Definition at line 43 of file extension.c.

43  {
44  return make_extensions (NIL);
45 }
extensions make_extensions(list a)
Definition: ri.c:983

References make_extensions(), and NIL.

Referenced by add_exec_mmcd(), begin_omp_construct(), C_MakeReturnStatement(), cluster_stage_spire(), communications_construction(), compact_list(), controlize_distribution(), controlize_list(), controlizer(), copy_n_statement(), ctx_set_statement_work_on(), do_clone_statement(), edge_cost_polynome(), enclose_in_a_parallel_loop(), for_to_do_loop_conversion(), gather_and_remove_all_format_statements_rewrite(), gen_if_rank(), gen_mpi_send_recv(), gen_recv_communications(), gen_send_communications(), generate_code(), generate_code_loop(), generic_insert_statement(), gfc2pips_code2instruction(), gfc2pips_code2instruction__TOP(), gfc2pips_dumpSELECT(), hierarchical_com(), init_new_df_source(), insert_before_current_statement(), insert_rwt(), instruction_to_statement(), io_filter(), loop_expansion(), make_binary_call_statement(), make_call_statement(), make_forloop_statement(), make_global_common_and_initialize(), make_goto_instruction(), make_loop_statement(), make_loop_step_stat(), make_loopPattern(), make_loopStat1(), make_scalar_communication_module(), make_start_ru_module(), make_statement_operator(), make_test_statement(), make_transStat(), make_whileloop_statement(), MakeBlock(), MakeForloop(), MakeGotoStatement(), makeloopbody(), MakeNewLabelledStatement(), MakeStatement(), mpi_initialize(), new_df_sink_ins(), outliner_call(), ProcessEntry(), simd_insert_statement(), statement_convert_to_statement_with_sequence_of_intruction(), statement_filter(), task_time_polynome(), update_statement_instruction(), and usual_loop_tiling().

+ Here is the call graph for this function:

◆ empty_extensions_p()

bool empty_extensions_p ( extensions  es)
Returns
true if the extensions field is empty
Parameters
esthe extensions to test
Parameters
ess

Definition at line 50 of file extension.c.

50  {
51  return (extensions_extension (es) == NIL);
52 }

References extensions_extension, and NIL.

Referenced by close_extensions(), compact_list(), controlize_list(), empty_statement_or_labelless_continue_p(), extensions_to_string(), and for_to_while_loop_conversion().

+ Here is the caller graph for this function:

◆ empty_scope()

string empty_scope ( void  )

Functions used to manage the block scoping in conjunction with ContextStack and yco ntext.

Definition at line 498 of file entity.c.

498 { return strdup("");}

References strdup().

Referenced by CreateDefaultContext(), FindOrCreateCurrentEntity(), and local_name_to_scope().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ empty_scope_p()

bool empty_scope_p ( string  s)

Definition at line 500 of file entity.c.

500 {return strcmp(s, "")==0;}

Referenced by UpdateEntity().

+ Here is the caller graph for this function:

◆ empty_static_area_p()

bool empty_static_area_p ( entity  e)

Definition at line 201 of file area.c.

202 {
203  if (!static_area_p(e)) return false;
204  return ENDP(area_layout(type_area(entity_type(e))));
205 }
bool static_area_p(entity aire)
Definition: area.c:77

References area_layout, ENDP, entity_type, static_area_p(), and type_area.

Referenced by text_entity_declaration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enclosing_loops_map_undefined_p()

bool enclosing_loops_map_undefined_p ( void  )

◆ entities_p()

bool entities_p ( list  el)

Make sure that an list is an homogeneous list of entities.

Parameters
ell

Definition at line 2580 of file entity.c.

2581 {
2582  bool success_p = true;
2583 
2584  FOREACH(ENTITY, e, el) {
2585  if(!check_entity(e)) {
2586  success_p = false;
2587  break;
2588  }
2589  }
2590  return success_p;
2591 }
entity check_entity(entity p)
Definition: ri.c:2527

References check_entity(), ENTITY, and FOREACH.

+ Here is the call graph for this function:

◆ entities_to_expressions()

list entities_to_expressions ( list  l_ent)

build a list of expressions from a list of entities

Returns
the list of expression
Parameters
l_ent,thelist of entities

FI: should have been placed in expression.c

FI: no check on arguments, robustness is doubtful; see entity_to_expression()

FI: somebody complaining about the PIPS code structuration in files and libraries might have added to the confusion?

Parameters
l_ent_ent

Definition at line 2703 of file entity.c.

2703  {
2704  list l_exp = NIL;
2705  FOREACH(ENTITY,e,l_ent) {
2706  l_exp = CONS(EXPRESSION, entity_to_expression(e), l_exp);
2707  }
2708  l_exp = gen_nreverse(l_exp);
2709  return(l_exp);
2710 }
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
Definition: expression.c:165

References CONS, ENTITY, entity_to_expression(), EXPRESSION, FOREACH, gen_nreverse(), and NIL.

Referenced by generate_copy_loop_nest(), lhs_subs_in_ins(), my_lhs_subs_in_ins(), and pragma_private_as_expr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_allocatable_p()

bool entity_allocatable_p ( entity  e)

allocatable.c

allocatable.c

Definition at line 72 of file allocatable.c.

72  {
73  type t = entity_type(e);
74  if(!type_variable_p(t)) {
75  return false;
76  }
77  variable v = type_variable(t);
79  return false;
80  }
81  entity allocatable_struct = basic_derived(variable_basic(v));
82 
83  if(!same_stringn_p(entity_local_name(allocatable_struct),
85  sizeof(STRUCT_PREFIX ALLOCATABLE_PREFIX)-1)) {
86  return false;
87  }
88 
89  return true;
90 }
#define same_stringn_p(a, b, c)
Definition: misc-local.h:199
#define STRUCT_PREFIX
Definition: naming-local.h:56
#define ALLOCATABLE_PREFIX

References ALLOCATABLE_PREFIX, basic_derived, basic_derived_p, entity_local_name(), entity_type, same_stringn_p, STRUCT_PREFIX, type_variable, type_variable_p, and variable_basic.

Referenced by expression_allocatable_data_access_p(), get_allocatable_data_entity(), get_allocatable_data_expr(), and gfc2pips_expr2expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_and_common_name()

const char* entity_and_common_name ( entity  e)

See next function!

Definition at line 654 of file entity.c.

655 {
657  string name ;
658  pips_assert("some current entity", !entity_undefined_p(m));
659 
662 
663  return name +sizeof(COMMON_PREFIX) -1;
664 }
#define COMMON_PREFIX
Definition: naming-local.h:34
#define entity_undefined_p(x)
Definition: ri.h:2762

References COMMON_PREFIX, concatenate(), entity_local_name(), entity_name, entity_storage, entity_undefined_p, get_current_module_entity(), MODULE_SEP_STRING, NIL, pips_assert, ram_section, and storage_ram.

Referenced by compare_effect_reference_in_common(), and effect_words_reference().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_area_p()

bool entity_area_p ( entity  e)

Definition at line 149 of file area.c.

150 {
151  return !type_undefined_p(entity_type(e)) && type_area_p(entity_type(e));//static_area_p(e) || dynamic_area_p(e) || heap_area_p(e) || stack_area_p(e);
152 }
#define type_area_p(x)
Definition: ri.h:2944

References entity_type, type_area_p, and type_undefined_p.

Referenced by check_common_inclusion(), common_members_of_module(), entity_special_area_p(), inline_expression_call(), normalize_microcode(), and wipeout_entity().

+ Here is the caller graph for this function:

◆ entity_array_p()

◆ entity_atomic_reference_p()

bool entity_atomic_reference_p ( entity  e)

Any reference r such that reference_variable(r)==e accesses all bytes (or bits) allocated to variable e.

In other words, any write of e is a kill. At least, if the reference indices are NIL in the case of pointers.

The Newgen type of e must be "variable".

FI: This function is much too naive because array dimensions may be hidden anywhere in a chain of typdef types. It might be much better to use type_depth() or to write a more specific function. Well, for some unknown reason, type_depth is not the answer.

Kludge to work in case the dimension is part of the typedef or part of the type.

if(ENDP(variable_dimensions(uvt)) && ENDP(variable_dimensions(vt))) {

The property is not true for overloaded, string, derived (typedef is impossible here)

Definition at line 1163 of file variable.c.

1164 {
1165  type t = entity_type(e);
1166  //variable vt = type_variable(t);
1167  type ut = ultimate_type(entity_type(e));
1168  variable uvt = type_variable(ut);
1169  bool atomic_p = false;
1170 
1171  pips_assert("entity e is a variable", type_variable_p(ut));
1172 
1173  /* Kludge to work in case the dimension is part of the typedef or
1174  part of the type. */
1175  /* if(ENDP(variable_dimensions(uvt)) &&
1176  ENDP(variable_dimensions(vt))) {*/
1177  if(type_depth(t)==0) {
1178  /* The property is not true for overloaded, string, derived
1179  (typedef is impossible here) */
1180  basic ubt = variable_basic(uvt);
1181  atomic_p = basic_int_p(ubt) || basic_float_p(ubt) || basic_logical_p(ubt)
1182  || basic_complex_p(ubt) || basic_bit_p(ubt) || basic_pointer_p(ubt);
1183  }
1184 
1185  return atomic_p;
1186 }
size_t type_depth(type)
Number of steps to access the lowest leave of type t without dereferencing.
Definition: type.c:4880

References basic_bit_p, basic_complex_p, basic_float_p, basic_int_p, basic_logical_p, basic_pointer_p, entity_type, pips_assert, type_depth(), type_variable, type_variable_p, ultimate_type(), and variable_basic.

Referenced by impact_check_in_path(), and TestCoupleOfReferences().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_basic()

basic entity_basic ( entity  e)

return the basic associated to entity e if it's a function/variable/constant basic_undefined otherwise

Definition at line 1380 of file entity.c.

1381 {
1382  if (e != entity_undefined) {
1383  type t = entity_type(e);
1384 
1385  if (type_functional_p(t))
1387  if (type_variable_p(t))
1388  return (variable_basic(type_variable(t)));
1389  }
1390  return (basic_undefined);
1391 }

References basic_undefined, entity_type, entity_undefined, functional_result, type_functional, type_functional_p, type_variable, type_variable_p, and variable_basic.

Referenced by add_declaration_to_declaration_statement_p(), c_user_function_call_to_transformer(), call_to_complexity(), check_this_loop(), compile_one_reduction(), constant_entity_to_float(), constant_to_transformer(), convert_constant(), create_new_ent_list(), do_clone_entity(), do_group_basics_maximum(), do_group_basics_maximum_reduce(), do_outliner_smart_replacment(), do_scalar_renaming_in_vertex(), do_split_structure(), do_terapix_argument_handler(), entity_basic_p(), expression_basic(), find_or_create_newInd(), fsr_reference_flt(), generate_code_loop(), generate_parallel_body(), generate_read_of_ref_for_all(), generate_read_of_ref_for_computer(), generate_update_distributed_value_from_host(), hpfc_buffer_entity(), inline_expression_call(), is_string_constant(), make_special_value(), make_test_condition(), outliner_smart_references_computation(), promote_local_entities(), pvm_what_option_expression(), reduction_parameters(), sac_commenter(), sentence_basic_declaration(), simplification_conversion(), simplify_complex_entity(), st_generate_packing(), statements_localize_declarations(), switch_basic_type_to_overloaded(), this_entity_cdeclaration(), type_this_entity_if_needed(), type_this_expression(), verify_array_element(), verify_array_variable(), and verify_scalar_variable().

+ Here is the caller graph for this function:

◆ entity_basic_concrete_type()

type entity_basic_concrete_type ( entity  e)

retrieves or computes and then returns the basic concrete type of an entity

Parameters
eis the input entity
Returns
the basic concrete type of e stored in the entity_types_to_bctypes table.

@beware don't free this type, it will be freed by pipsmake when resetting the table.

Definition at line 3677 of file type.c.

3678 {
3679  debug_on("RI-UTIL_DEBUG_LEVEL");
3680  pips_assert("types_to_bctypes must be defined", !hash_table_undefined_p(entity_types_to_bctypes));
3681  type t = entity_type(e);
3682  type bct = (type) hash_get(entity_types_to_bctypes, (void *) t);
3683 
3684  if (type_undefined_p(bct))
3685  {
3686  bct = compute_basic_concrete_type(t);
3688  }
3689  debug_off();
3690  return bct;
3691 }
struct _newgen_struct_type_ * type
#define hash_table_undefined_p(h)
Definition: newgen_hash.h:50
static hash_table entity_types_to_bctypes
Definition: type.c:3496

References compute_basic_concrete_type(), debug_off, debug_on, entity_type, entity_types_to_bctypes, hash_get(), hash_put(), hash_table_undefined_p, pips_assert, and type_undefined_p.

Referenced by abstract_locations_max(), add_inter_or_intraprocedural_field_entities(), add_intraprocedural_value_entities(), add_type_information(), analyzable_scalar_entity_p(), analyzed_array_p(), analyzed_basic_p(), analyzed_entity_p(), analyzed_struct_p(), analyzed_struct_type_p(), any_source_to_sinks(), any_user_call_site_to_transformer(), array_location_entity_of_module_p(), assign_rhs_to_reflhs_to_transformer(), basic_concrete_type_leads_to_pointer_p(), basic_concrete_types_compatible_for_effects_interprocedural_translation_p(), binary_intrinsic_call_to_points_to_sinks(), c_convex_effects_on_actual_parameter_forward_translation(), c_return_to_transformer(), cell_reference_to_type(), complete_points_to_reference_with_fixed_subscripts(), compute_points_to_binded_set(), compute_points_to_gen_set(), create_stub_entity(), declaration_statement_to_points_to(), declaration_to_post_pv(), dereferencing_subscript_to_points_to(), dereferencing_to_points_to(), dimensions_to_transformer(), effect_indices_first_pointer_dimension_rank(), effect_reference_first_pointer_dimension_rank(), entities_maymust_conflict_p(), entity_non_pointer_scalar_p(), expression_to_points_to(), FILE_star_effect_reference_p(), formal_source_to_sinks(), generic_function_to_return_value(), generic_make_entity_copy_with_new_name(), generic_points_to_cell_to_useful_pointer_cells(), generic_points_to_cells_translation(), generic_reference_to_transformer(), generic_substitute_formal_array_elements_in_transformer(), global_source_to_sinks(), memory_dereferencing_p(), module_initial_parameter_pv(), module_to_value_mappings(), new_recursive_filter_formal_context_according_to_actual_context(), offset_cell(), perform_array_element_substitutions_in_transformer(), pointer_reference_to_expression(), pointer_source_to_sinks(), points_to_array_reference_p(), points_to_array_reference_to_type(), points_to_cells_parameters(), points_to_function_projection(), points_to_set_block_projection(), points_to_translation_of_formal_parameters(), points_to_translation_of_struct_formal_parameter(), r_cell_reference_to_type(), recursive_cell_to_pointer_cells(), recursive_store_independent_points_to_reference_p(), reference_add_field_dimension(), reference_complete_with_zero_subscripts(), reference_condition_to_points_to(), reference_dereferencing_to_points_to(), reference_to_complexity(), reference_to_points_to(), reference_to_points_to_sinks(), reference_to_points_to_translations(), reference_to_type(), sequence_to_post_pv(), source_to_sinks(), split_initializations_in_statement(), store_independent_effect_p(), store_independent_points_to_reference_p(), struct_assignment_to_points_to(), struct_variable_to_fields(), substitute_struct_stub_in_transformer(), substitute_stubs_in_transformer(), substitute_stubs_in_transformer_with_translation_binding(), transformer_apply_field_assignments_or_equalities(), transformer_apply_unknown_field_assignments_or_equalities(), user_call_to_points_to(), user_call_to_points_to_sinks(), variable_to_abstract_location(), variable_to_pointer_locations(), and words_points_to_reference().

+ Here is the call graph for this function:

◆ entity_basic_concrete_types_init()

void entity_basic_concrete_types_init ( void  )

Definition at line 3507 of file type.c.

3508 {
3509  pips_assert("types_to_bctypes must be undefined", hash_table_undefined_p(entity_types_to_bctypes));
3511 }
#define BCTYPES_TABLE_INIT_SIZE
basic_concrete_types
Definition: type.c:3495

References BCTYPES_TABLE_INIT_SIZE, entity_types_to_bctypes, hash_pointer, hash_table_make(), hash_table_undefined_p, and pips_assert.

Referenced by set_current_phase_context().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_basic_concrete_types_reset()

void entity_basic_concrete_types_reset ( void  )

First, free all basic concrete types

Definition at line 3513 of file type.c.

3514 {
3515  /* First, free all basic concrete types */
3517  {
3518  free_type(t4);
3519  }
3522 }
#define HASH_FOREACH(key_type, k, value_type, v, ht)
Definition: newgen_hash.h:71

References entity_types_to_bctypes, free_type(), HASH_FOREACH, hash_table_free(), and hash_table_undefined.

Referenced by reset_current_phase_context().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_basic_p()

bool entity_basic_p ( entity  e,
enum  basic_utype 
)

return true if the basic associated with entity e matchs the passed tag

Definition at line 1405 of file entity.c.

1406 {
1407  return basic_tag(entity_basic(e)) == basictag;
1408 }
basic entity_basic(entity e)
return the basic associated to entity e if it's a function/variable/constant basic_undefined otherwis...
Definition: entity.c:1380

References basic_tag, and entity_basic().

Referenced by find_or_create_scalar_entity(), and find_or_create_typed_entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_blockdata_p()

bool entity_blockdata_p ( entity  e)

Definition at line 712 of file entity.c.

713 {
714  return entity_module_p(e) &&
715  strspn(entity_local_name(e), BLOCKDATA_PREFIX)==1;
716 }
#define BLOCKDATA_PREFIX
Definition: naming-local.h:35

References BLOCKDATA_PREFIX, entity_local_name(), and entity_module_p().

Referenced by AddVariableToCommon(), AnalyzeData(), entity_subroutine_p(), fix_storage(), initialize_and_verify_common_variable(), MakeExternalFunction(), sentence_head(), and sentence_tail().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_code()

◆ entity_common_p()

bool entity_common_p ( entity  e)

??????

Definition at line 718 of file entity.c.

719 {
720  return entity_module_p(e) && /* ?????? */
721  strspn(entity_local_name(e), COMMON_PREFIX)==1;
722 }

References COMMON_PREFIX, entity_local_name(), and entity_module_p().

Referenced by make_common_entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_continue_p()

bool entity_continue_p ( entity  f)

Definition at line 1731 of file entity.c.

1732 {
1733  return same_entity_p(f, get_continue_entity());
1734 }
bool same_entity_p(entity e1, entity e2)
predicates on entities
Definition: entity.c:1321
entity get_continue_entity()
true if continue.
Definition: entity.c:1726

References f(), get_continue_entity(), and same_entity_p().

Referenced by declaration_statement_p(), and only_io_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_empty_label()

entity entity_empty_label ( void  )

FI: it is difficult to memoize entity_empty_label because its value is changed when the symbol table is written and re-read from disk; Remi's memoizing scheme was fine as long as the entity table lasted as long as one run of pips, i.e. is not adequate for wpips

static entity empty = entity_undefined;

Definition at line 1105 of file entity.c.

1106 {
1107  /* FI: it is difficult to memoize entity_empty_label because its value is changed
1108  * when the symbol table is written and re-read from disk; Remi's memoizing
1109  * scheme was fine as long as the entity table lasted as long as one run of
1110  * pips, i.e. is not adequate for wpips
1111  */
1112  /* static entity empty = entity_undefined; */
1113  entity empty;
1114 
1118  NULL), entity_domain);
1119  pips_assert("The empty label is defined", empty != entity_undefined );
1120 
1121  return empty;
1122 }
#define EMPTY_LABEL_NAME
Its value is "@", the label prefix followed by nothing.
Definition: naming-local.h:96
@ empty
b1 < bj -> h1/hj = empty
Definition: union-local.h:64

References concatenate(), empty, EMPTY_LABEL_NAME, entity_domain, entity_undefined, gen_find_tabulated(), MODULE_SEP_STRING, pips_assert, and TOP_LEVEL_MODULE_NAME.

Referenced by __attribute__(), add_exec_mmcd(), add_test(), begin_omp_construct(), bound_generation(), build_first_comb(), build_third_comb(), C_MakeReturnStatement(), clean_statement_label(), clear_label(), cluster_stage_spire(), code_generation(), com_call(), comEngine_distribute_code(), compact_list(), controlize_distribution(), controlize_list(), controlizer(), copy_n_statement(), distribute_code(), do_clone_label(), do_group_constants_terapix(), do_loop_expansion_init(), do_loop_to_while_loop(), do_loop_unroll_with_epilogue(), do_loop_unroll_with_prologue(), do_symbolic_tiling(), enclose_in_a_parallel_loop(), fix_sequence_statement_attributes(), for_to_do_loop_conversion(), forloop_test(), full_spaghettify_module(), gather_and_remove_all_format_statements_rewrite(), gen_mpi_send_recv(), gen_omp_taskwait(), generate_code(), generate_code_loop(), generate_copy_loop_nest(), generate_full_copy(), generate_guarded_statement(), generate_loop_workchunk(), generic_insert_statement(), GenericAddLocalEntityToDeclarations(), gfc2pips_code2get_label(), gfc2pips_code2get_label2(), gfc2pips_code2get_label3(), gfc2pips_code2get_label4(), gfc2pips_code2instruction__TOP(), Hierarchical_tiling(), hpf_compile_loop(), insert_before_current_statement(), insert_endscop_after_stmt(), insert_endscop_before_stmt(), insert_endscop_in_sequence(), insert_rwt(), instruction_to_statement(), io_filter(), isolate_code_portion(), loop_normalize_of_loop(), loop_strip_mine(), loop_test(), make_binary_call_statement(), make_body_from_loop(), make_call_statement(), make_communication_statement(), make_condition_from_forloop(), make_condition_from_loop(), make_condition_from_test(), make_condition_from_whileloop(), make_exit_from_forloop(), make_exit_from_loop(), make_exit_from_test(), make_exit_from_whileloop(), make_forloop_statement(), make_fsm_from_statement(), make_global_common_and_initialize(), make_initialization_from_loop(), make_loop_skeleton(), make_loop_statement(), make_loop_step_stat(), make_loopPattern(), make_loopStat1(), make_movements_loop_body_wp65(), make_new_loop_statement(), make_plain_continue_statement(), make_scalar_communication_module(), make_start_ru_module(), make_state_variable_assignement_statement(), make_statement_operator(), make_test_statement(), make_transition_statement(), make_transStat(), make_undefined_list(), make_whileloop_statement(), MakeAssignInst(), MakeBlock(), MakeCaseStatement(), MakeDefaultStatement(), MakeForloop(), MakeGotoStatement(), MakeIoInstA(), MakeLoopAs(), makeloopbody(), MakeNewLabelledStatement(), Overlap_Analysis(), parallel_tiling(), ProcessEntry(), put_a_comment_on_a_statement(), re_do_it(), recover_structured_while(), ReuseLabelledStatement(), sa_do_it(), simd_insert_statement(), srwt(), statement_convert_to_statement_with_sequence_of_intruction(), statement_filter(), statement_remove_useless_label(), statement_to_label(), substitute_and_create(), systeme_to_loop_nest(), take_out_the_entry_node_of_the_unstructured(), Tiling2_buffer(), Tiling_buffer_allocation(), tiling_transformation(), update_statement_instruction(), usual_loop_tiling(), and whileloop_test().

+ Here is the call graph for this function:

◆ entity_empty_label_p()

◆ entity_enum_member_p()

bool entity_enum_member_p ( entity  e)

SG: not all entities seem to have this field defined if not defined, assume it's not an enum, although i am unsure of the validity of this:

pips_assert("Value of e is defined", !value_undefined_p(ev));

Definition at line 980 of file entity.c.

981 {
982  value ev = entity_initial(e);
983  /* SG: not all entities seem to have this field defined if not
984  * defined, assume it's not an enum, although i am unsure of the
985  * validity of this:
986  *
987  * pips_assert("Value of e is defined", !value_undefined_p(ev));
988  */
989  return !value_undefined_p(ev) && value_symbolic_p(ev);
990 }

References entity_initial, value_symbolic_p, and value_undefined_p.

Referenced by inline_expression_call(), and outliner_independent_recursively().

+ Here is the caller graph for this function:

◆ entity_enum_p()

bool entity_enum_p ( entity  e)

Base the predicate on the entity name as for struct and union.

Definition at line 968 of file entity.c.

969 {
970  /* Base the predicate on the entity name as for struct and union.*/
971  //return type_enum_p(entity_type(e));
972  const char* ln = entity_local_name(e);
973  string ns = strrchr(ln, BLOCK_SEP_CHAR);
974  bool struct_p = (ns==NULL && *ln==ENUM_PREFIX_CHAR)
975  || (ns!=NULL && *(ns+1)==ENUM_PREFIX_CHAR)
976  || (strstr(entity_name(e),ENUM_PREFIX DUMMY_ENUM_PREFIX)!=NULL);
977  return struct_p;
978 }
#define ENUM_PREFIX_CHAR
Definition: naming-local.h:61
#define BLOCK_SEP_CHAR
Definition: naming-local.h:51
#define DUMMY_ENUM_PREFIX
For enum and struct and union without names (see c_syntax/cyacc.y)
Definition: naming-local.h:86
#define ENUM_PREFIX
Definition: naming-local.h:60

References BLOCK_SEP_CHAR, DUMMY_ENUM_PREFIX, entity_local_name(), entity_name, ENUM_PREFIX, and ENUM_PREFIX_CHAR.

Referenced by basic_maximum(), derived_entity_p(), do_clone_entity(), entity_enum_variable_p(), filtered_declaration_list(), find_enum_of_member(), and get_symbol_table().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_enum_variable_p()

bool entity_enum_variable_p ( entity  e)

Definition at line 992 of file entity.c.

References basic_derived, basic_derived_p, basic_undefined, basic_undefined_p, entity_enum_p(), entity_type, type_variable, type_variable_p, ultimate_type(), and variable_basic.

Referenced by NormalizeReference().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_equivalence_p()

bool entity_equivalence_p ( entity  e)

checks if an entity is an equivalent

Parameters
eentity to check
Returns
true if entity is an equivalent

Definition at line 2194 of file entity.c.

2195 {
2196  return storage_ram_p(entity_storage(e))
2198 }
#define ram_shared(x)
Definition: ri.h:2253

References ENDP, entity_storage, ram_shared, storage_ram, and storage_ram_p.

◆ entity_f95module_p()

bool entity_f95module_p ( entity  e)

Definition at line 707 of file entity.c.

707  {
708  return entity_module_p(e) &&
709  strspn(entity_local_name(e), F95MODULE_PREFIX)==1;
710 }
#define F95MODULE_PREFIX
Definition: naming-local.h:36

References entity_local_name(), entity_module_p(), and F95MODULE_PREFIX.

Referenced by sentence_head(), and sentence_tail().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_f95use_p()

bool entity_f95use_p ( entity  e)

Definition at line 694 of file entity.c.

695 {
696  const char* name = entity_name(e);
697  return strncmp(name,F95_USE_LOCAL_NAME,strlen(F95_USE_LOCAL_NAME)) == 0;
698 }
#define F95_USE_LOCAL_NAME
constant names
Definition: naming-local.h:67

References entity_name, and F95_USE_LOCAL_NAME.

Referenced by text_entity_declaration().

+ Here is the caller graph for this function:

◆ entity_field_p()

bool entity_field_p ( entity  e)

e is the field of a structure

Definition at line 857 of file entity.c.

858 {
859  const char* eln = entity_local_name(e);
860  bool field_p = false;
861 
862  if(*eln!='\'' && *eln!='"') {
863  const char* pos = strrchr(eln, MEMBER_SEP_CHAR);
864 
865  field_p = pos!=NULL;
866  }
867 
868  return field_p;
869 }
#define MEMBER_SEP_CHAR
Definition: naming-local.h:54

References entity_local_name(), and MEMBER_SEP_CHAR.

Referenced by c_convex_effects_on_actual_parameter_forward_translation(), constant_points_to_indices_p(), distance_between_entity(), do_atomize_call(), do_brace_expression_to_statements(), effect_words_reference(), entity_for_value_mapping_p(), entity_more_or_less_minimal_name(), extended_regions_must_convex_hull(), field_expression_p(), field_reference_expression_p(), get_dma_dimension(), get_sizeofexpression_for_region(), inline_expression_call(), isolate_patch_reference(), make_declarations_statement(), outliner_independent_recursively(), points_to_indices_to_subscript_indices(), points_to_indices_to_unbounded_indices(), points_to_reference_to_type(), proper_to_summary_simple_effect(), r_cell_reference_to_type(), reference_equal_p(), reference_to_field_disambiguator(), references_must_conflict_p(), safe_expression_to_transformer(), simple_reference_to_convex_reference_conversion(), store_independent_points_to_indices_p(), variable_references_may_conflict_p(), and variable_to_dimensions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_field_rank()

int entity_field_rank ( entity  f)

f is a field of a structure or of an union: what is its rank?

FI: positions are counted from 1 on; do we want to subtract 1?

Definition at line 940 of file entity.c.

941 {
942  int rank = -1;
944  type st = entity_type(su);
945  list fl = list_undefined;
946 
947  if(type_struct_p(st))
948  fl = type_struct(st);
949  else if(type_union_p(st))
950  fl = type_union(st);
951  else
952  pips_internal_error("Unexpected type tag %d", type_tag(st));
953 
954  pips_assert("st is a struct or union type",
955  type_struct_p(st) || type_union_p(st));
956 
957  /* FI: positions are counted from 1 on; do we want to subtract 1? */
958  rank = gen_position((void *) f, fl);
959 
960  if(rank==0) {
961  pips_internal_error("Field \"\%s\" is not part of its %s \"\%s\"",
962  entity_name(f), type_struct_p(st)?"structure":"union" , entity_name(su));
963  }
964 
965  return rank;
966 }
static entity rank
entity entity_field_to_entity_struct_or_union(entity f)
Definition: entity.c:925

References entity_field_to_entity_struct_or_union(), entity_name, entity_type, f(), gen_position(), list_undefined, pips_assert, pips_internal_error, rank, type_struct, type_struct_p, type_tag, type_union, and type_union_p.

Referenced by reference_to_field_disambiguator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_field_to_entity_struct()

entity entity_field_to_entity_struct ( entity  f)

To be able to breakpoint effectively

Definition at line 905 of file entity.c.

906 {
908 
909  /* To be able to breakpoint effectively */
910  if(entity_undefined_p(s))
911  pips_assert("entity s is defined", !entity_undefined_p(s));
912  return s;
913 }
#define STRUCT_PREFIX_CHAR
Definition: naming-local.h:57
static entity entity_field_to_entity(entity f, char prefix)
f is a field of a structure: what is its structure?
Definition: entity.c:879

References entity_field_to_entity(), entity_undefined_p, f(), pips_assert, and STRUCT_PREFIX_CHAR.

Referenced by offset_of_struct(), and same_struct_entity_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_field_to_entity_struct_or_union()

entity entity_field_to_entity_struct_or_union ( entity  f)

To be able to breakpoint effectively

Definition at line 925 of file entity.c.

926 {
928 
929  if(entity_undefined_p(su))
931 
932  /* To be able to breakpoint effectively */
933  if(entity_undefined_p(su))
934  pips_assert("entity s is defined", !entity_undefined_p(su));
935 
936  return su;
937 }
#define UNION_PREFIX_CHAR
Definition: naming-local.h:59

References entity_field_to_entity(), entity_undefined_p, f(), pips_assert, STRUCT_PREFIX_CHAR, and UNION_PREFIX_CHAR.

Referenced by entity_field_rank(), inline_expression_call(), and outliner_independent_recursively().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_field_to_entity_union()

entity entity_field_to_entity_union ( entity  f)

To be able to breakpoint effectively

Definition at line 915 of file entity.c.

916 {
918 
919  /* To be able to breakpoint effectively */
920  if(entity_undefined_p(u))
921  pips_assert("entity s is defined", !entity_undefined_p(u));
922  return u;
923 }

References entity_field_to_entity(), entity_undefined_p, f(), pips_assert, and UNION_PREFIX_CHAR.

+ Here is the call graph for this function:

◆ entity_formal_p()

bool entity_formal_p ( entity  p)

◆ entity_function_p()

◆ entity_global_name()

string entity_global_name ( entity  e)

◆ entity_in_common_p()

bool entity_in_common_p ( entity  e)

Definition at line 1082 of file entity.c.

1083 {
1084  storage s = entity_storage(e);
1085 
1086  return(storage_ram_p(s) &&
1088 }

References entity_special_area_p(), entity_storage, ram_section, storage_ram, and storage_ram_p.

Referenced by compare_effect_reference_in_common(), debug_ref_rwt(), effect_words_reference(), entity_hpf_number(), hpfc_main_entity(), NormalizeCommonVariables(), and STATIC_LIST_OF_HPF_OBJECTS().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_in_formal_area_p()

bool entity_in_formal_area_p ( entity  e)

Formal parameters do not use the standard ram storage.

However, a formal area is used for points-to stubs

Definition at line 3196 of file entity.c.

3197 {
3198  bool in_p = false;
3199  storage s = entity_storage(e);
3200  if(storage_ram_p(s)) {
3201  ram r = storage_ram(s);
3202  entity a = ram_section(r);
3203  in_p = formal_area_p(a);
3204  }
3205  return in_p;
3206 }
bool formal_area_p(entity aire)
Definition: area.c:95

References entity_storage, formal_area_p(), ram_section, storage_ram, and storage_ram_p.

Referenced by transformer_general_consistency_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_in_list_p()

bool entity_in_list_p ( entity  ent,
list  ent_l 
)

look for ent in ent_l

Parameters
ententity to find
ent_llist to scan
Returns
true if ent belongs to ent_l
Parameters
entnt
ent_lnt_l

Definition at line 2221 of file entity.c.

2222 {
2223  return !gen_chunk_undefined_p(gen_find_eq(ent,ent_l));
2224 }

References gen_chunk_undefined_p, and gen_find_eq().

Referenced by array_bound_check_instrumentation(), copy_write_statement(), copy_write_statement_with_cumulated_regions(), entity_to_declaring_statement_aux(), full_loop_unroll(), initialize_and_verify_common_variable(), and prepare_context().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_integer_scalar_p()

bool entity_integer_scalar_p ( entity  e)

for variables (like I), not constants (like 1)! use integer_constant_p() for constants

The integer type may be signed or unsigned.

Definition at line 1130 of file variable.c.

1131 {
1132  return(entity_scalar_p(e) &&
1134 }
bool entity_scalar_p(entity e)
The concrete type of e is a scalar type.
Definition: variable.c:1113

References basic_int_p, entity_scalar_p(), entity_type, type_variable, ultimate_type(), and variable_basic.

Referenced by entity_to_formal_integer_parameters(), evaluate_var_to_complexity(), expression_int_scalar(), hpfc_overlap_kill_unused_scalars_rewrite(), loop_variant_list(), normalize_reference(), NormalizeReference(), sc_entity_to_formal_integer_parameters(), and scalar_written_in_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_intrinsic()

entity entity_intrinsic ( const char *  name)

FI: I do not understand this function name (see next one!).

It seems to me that any common or user function or user subroutine would be returned. FI: assert condition made stronger (18 December 1998)

Parameters
nameame

Definition at line 1292 of file entity.c.

1293 {
1296  name,
1297  NULL),
1298  entity_domain);
1299 
1300  pips_assert("entity_intrinsic", e != entity_undefined
1301  && intrinsic_entity_p(e));
1302  return(e);
1303 }

References concatenate(), entity_domain, entity_undefined, gen_find_tabulated(), intrinsic_entity_p(), MODULE_SEP_STRING, pips_assert, and TOP_LEVEL_MODULE_NAME.

Referenced by add_exec_mmcd(), add_pvm_init_and_end(), alloc_instrumentation(), any_basic_update_operation_to_transformer(), any_basic_update_to_transformer_list(), arithmetic_intrinsic_p(), array_scalar_access_to_bank_communication(), basic_to_generic_conversion(), basic_update_reflhs_with_rhs_to_transformer(), binary_to_nary(), bound_to_statement(), buffer_full_condition(), build_flag_assign(), build_flag_test(), build_global_time_test_with_exp(), build_local_time_test(), c_reference(), call_flt(), call_STEP_subroutine3(), clean_statement(), compile_master(), compute_final_index_value(), compute_region(), constraint_to_bound(), constraints_to_loop_bound(), convert_bound_expression(), convert_pointer_to_array(), convert_pointer_to_array_aux(), copy_write_statement_with_cumulated_regions(), ctx_generate_new_statement_cluster_dependant(), derived_formal_parameter_to_stub_points_to(), dimensions_to_dma(), do_array_expansion(), do_array_to_pointer_walk_call_and_patch(), do_array_to_pointer_walk_expression(), do_check_isolate_statement_preconditions_on_call(), do_convert_to_c_operator(), do_convert_to_standard_operators(), do_isolate_statement_preconditions_satisified_p(), do_linearize_array_manage_callers(), do_linearize_pointer_is_expression(), do_loop_expansion(), do_loop_to_for_loop(), do_loop_to_while_loop(), do_loop_unroll_with_epilogue(), do_loop_unroll_with_prologue(), do_outliner_smart_replacment(), do_simplify_c_operator(), do_solve_hardware_constraints_on_nb_proc(), do_split_structure(), do_terapix_argument_handler(), do_terapix_loop_optimizer(), do_terapix_remove_divide(), do_terapix_warmup_patching(), expr_compute_local_index(), expression_list_to_conjonction(), expression_plusplus(), fcs_call_flt(), fix_if_condition(), forloop_test(), free_guards(), gen_if_rank(), generate_bminus(), Generate_C_ReturnStatement(), generate_compact(), generate_fifo_stat(), generate_mmcd_stat_from_ref(), generate_monome(), get_bounds_expression(), get_expression_addr(), get_fifoExp_from_ref(), gfc2pips_expr2expression(), guard_expanded_statement(), heap_intrinsic_to_post_pv(), hpfc_add_2(), hpfc_add_n(), hpfc_compile(), if_conv_init_statement(), incrementation_expression_to_increment(), initialization_list_to_statements(), initialize_array_variable(), inline_expression_call(), instruction_selection(), int_to_expression(), inv_call_flt(), inverse_operator_of(), io_intrinsic_p(), isolate_patch_reference(), loop_annotate(), loop_inc(), loop_strip_mine(), loop_test(), make_array_communication_statement(), make_assign_instruction(), make_binary_call_statement(), make_body_from_loop(), make_bound_expression(), make_call_statement(), make_condition_from_loop(), make_constraint_expression(), make_continue_instruction(), make_expression_with_state_variable(), make_factor_expression(), make_fields_assignment_instruction(), make_guard_expression(), make_increment_instruction(), make_increment_statement(), make_init_time(), make_lInitStats(), make_loadsave_statement(), make_loop_step_stat(), make_lSwitchStats(), make_max_expression(), make_min_expression(), make_mmcd_load_store_stat(), make_scalar_communication_module(), make_send_receive_conversion(), make_simple_Fortran_io_instruction(), make_start_ru_module(), make_state_variable_assignement_statement(), make_step_inc_statement(), make_toggle_inc_statement(), make_transStat(), make_vecteur_expression(), MakeAssignInst(), MakeAtom(), MakeCaseStatement(), MakeForloop(), makeTransfertSizeExpression(), MakeWhileDoInst(), merge_expressions(), mpic_make_generic_mpi_receive_call(), mpic_make_generic_mpi_send_call(), mpic_make_mpi_comm_rank(), mpic_make_mpi_comm_size(), mpic_make_mpi_finalize(), mpic_make_mpi_init(), normalize_microcode(), optimize_simplify_nary_patterns(), outliner_extract_loop_bound(), outliner_patch_parameters(), outliner_smart_references_computation(), partial_eval_binary_operator_old(), partial_eval_mult_operator(), partial_eval_plus_or_minus_operator(), phi_free_contraints_to_expressions(), process_innerStat1_proc(), Psysteme_to_expression(), Psysteme_to_loop_nest(), re_do_it(), reduction_operator_entity(), reference_filter(), regenerate_call(), regenerate_expression(), region_to_address(), region_to_minimal_dimensions(), remove_unread_variable(), rename_op(), replace_field_by_reference_walker(), replace_reductions_in_statement(), replace_subscript(), scalopify(), sesamify(), set_resources_for_module(), simdizer_auto_tile(), simplify_C_expression(), split_update_call(), st_make_nice_test(), st_send_to_computer_if_necessary(), statement_insertion_fix_access(), statement_phi_function_p(), string_to_expression(), switch_nary_to_binary(), terapix_loop_optimizer(), terapix_normalize_tests(), top_down_abc_not_exact_case(), try_reorder_expression_call(), typedef_formal_parameter_to_stub_points_to(), unsugared_loop_inc(), unsugared_loop_test(), update_indices_for_local_computation(), update_operator_to_regular_operator(), update_range(), update_test_condition(), variable_to_dimensions(), verify_array_variable(), and whileloop_test().

+ Here is the call graph for this function:

◆ entity_is_argument_p()

bool entity_is_argument_p ( entity  e,
cons args 
)
Parameters
argsrgs

Definition at line 150 of file arguments.c.

153 {
154  return gen_find_eq(e, args) != chunk_undefined;
155 }
#define chunk_undefined
obsolete
Definition: genC.h:79

References chunk_undefined, and gen_find_eq().

Referenced by add_type_information(), any_assign_operation_to_transformer(), any_scalar_assign_to_transformer_list(), any_scalar_assign_to_transformer_without_effect(), arguments_add_entity(), arguments_difference(), arguments_intersection(), arguments_rm_entity(), arguments_set_equal_p(), arguments_subset_p(), assigned_expression_to_transformer(), assigned_expression_to_transformer_list(), call_instruction_to_communications(), ComputeAddresses(), do_kernelize(), filter_transformer(), find_field_in_field_list(), FindOrCreateCurrentEntity(), fortran_user_call_to_transformer(), generic_apply_effect_to_transformer(), ghost_variable_entity_p(), IsEffectiveFormalParameterP(), live_loop_index_p(), loop_nest_movement_generation(), loop_nest_to_local_variables(), MakeEntry(), module_to_all_declarations(), redeclaration_enter_statement(), reify_ghost_variable_entity(), safe_transformer_projection(), SafeFindOrCreateEntity(), SaveEntity(), substitute_scalar_stub_in_transformer(), substitute_stubs_in_transformer_with_translation_binding(), transformer_combine(), transformer_convex_hulls(), transformer_general_consistency_p(), transformer_list_generic_transitive_closure(), transformer_list_preserved_variables(), transformer_list_safe_variables_projection(), transformer_list_with_effect(), translate_global_value(), variable_in_module_p(), and variable_in_module_p2().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_ith_bounds()

expression entity_ith_bounds ( entity  e,
int  i 
)

FIND_MODULE returns entity.

Argument is module_name This function should be replaced by local_name_to_top_level_entity() ntity FindEntity(_module(name) string name; { string full_name = concatenate(TOP_LEVEL_MODULE_NAME, MODULE_SEP_STRING, name, NULL); entity e = gen_find_tabulated(full_name, entity_domain);

return(e); } END_EOLE returns a range expression containing e's i-th bounds

Definition at line 1626 of file entity.c.

1627 {
1628  dimension d = entity_ith_dimension(e, i);
1632  int_to_expression(1)));
1634 }
range make_range(expression a1, expression a2, expression a3)
Definition: ri.c:2041
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
@ is_syntax_range
Definition: ri.h:2692

References copy_expression(), dimension_lower, dimension_upper, entity_ith_dimension(), int_to_expression(), is_syntax_range, make_expression(), make_range(), make_syntax(), and normalized_undefined.

+ Here is the call graph for this function:

◆ entity_ith_dimension()

dimension entity_ith_dimension ( entity  e,
int  i 
)

Another semantics would be: is this reference r to e a kill for e? In general, this cannot be answered at the entity level only (see previous function) and the reference itself must be passed as an argument.

FI: I'm not sure of the best location for this function in ri-util (no file reference.c).

Definition at line 1228 of file variable.c.

1229 {
1230  cons *pd;
1231  type t = entity_type(e);
1232 
1233  pips_assert("entity_ith_dimension", type_variable_p(t));
1234 
1236 
1237  while (pd != NIL && --i > 0)
1238  pd = CDR(pd);
1239 
1240  pips_assert("entity_ith_dimension", pd != NIL);
1241 
1242  return(DIMENSION(CAR(pd)));
1243 }

References CAR, CDR, DIMENSION, entity_type, NIL, pips_assert, type_variable, type_variable_p, and variable_dimensions.

Referenced by array_with_numerical_bounds_p(), create_init_common_param_for_arrays(), declaration_with_overlaps(), entity_ith_bounds(), entity_unbounded_p(), expr_compute_local_index(), get_entity_dimensions(), get_ith_dim_new_declaration(), hpfc_compute_distribute_constraints(), and hpfc_compute_unicity_constraints().

+ Here is the caller graph for this function:

◆ entity_label_p()

bool entity_label_p ( entity  e)

Definition at line 678 of file entity.c.

679 {
680  return type_statement_p(entity_type(e));
681 }
#define type_statement_p(x)
Definition: ri.h:2941

References entity_type, and type_statement_p.

Referenced by find_implicit_goto(), is_label_statement(), and type_this_call().

+ Here is the caller graph for this function:

◆ entity_list_p()

bool entity_list_p ( list  el)

Checks that el only contains entity.

Parameters
ell

Definition at line 1411 of file entity.c.

1412 {
1413  bool pure = true;
1414 
1415  FOREACH(ENTITY, e, el)
1416  {
1417  static entity le = entity_undefined;
1418  pips_debug(10, "Entity e in list is \"%s\"\n", safe_entity_name(e));
1420  pips_debug(8, "Last entity le in list is \"%s\"\n", safe_entity_name(le));
1421  pure = false;
1422  break;
1423  }
1424  le = e;
1425  }
1426  return pure;
1427 }
string safe_entity_name(entity e)
predicates and functions for entities
Definition: entity.c:433
#define entity_domain_number(x)
Definition: ri.h:2788

References ENTITY, entity_domain, entity_domain_number, entity_undefined, FOREACH, pips_debug, and safe_entity_name().

Referenced by AddToExterns(), CheckExternList(), FindOrCreateCurrentEntity(), get_symbol_table(), and module_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_list_to_base()

Pbase entity_list_to_base ( list  l)

Definition at line 2860 of file entity.c.

2862 {
2863  list l2 = gen_nreverse(gen_copy_seq(l));
2864  Pbase result = BASE_NULLE;
2865  FOREACH(ENTITY, e, l2)
2866  {
2867  Pbase new = (Pbase) vect_new((Variable) e, VALUE_ONE);
2868  new->succ = result;
2869  result = new;
2870  }
2871 
2872  gen_free_list(l2);
2873  return(result);
2874 }
#define VALUE_ONE
struct Svecteur * Pbase
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
#define BASE_NULLE
MACROS SUR LES BASES.

References BASE_NULLE, ENTITY, FOREACH, gen_copy_seq(), gen_free_list(), gen_nreverse(), Svecteur::succ, VALUE_ONE, and vect_new().

Referenced by generate_remapping_code(), hpfc_algorithm_row_echelon(), hpfc_algorithm_tiling(), and verify_array_variable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_local_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 that it was pertinent to remove the special care of constants there.

So I added something here, to deal with the "null" entity which codes the constant. FC 28/11/94. SG: should return a const pointer

Definition at line 453 of file entity.c.

454 {
455  const char* null_name = "null";
456  pips_assert("entity is defined", !entity_undefined_p(e));
457  pips_assert("constant term or entity",
458  e==NULL || entity_domain_number(e)==entity_domain);
459  return e==NULL ? null_name : local_name(entity_name(e));
460 }

References entity_domain, entity_domain_number, entity_name, entity_undefined_p, local_name(), and pips_assert.

Referenced by abc_with_allocation_size(), abstract_locations_max(), add_array_dimension_bound_test(), add_call_to_callees(), add_conflicts(), add_constraint_on_x(), add_formal_to_actual_bindings(), add_loop_index_exit_value(), add_new_module_from_text(), add_non_declared_reference_to_declaration(), add_or_kill_equivalenced_variables(), add_parameter_variable_to_module(), add_private_variable_to_module(), add_reduction(), add_symbolic_constant_to_declaration(), add_synonym_values(), AddCommonToModule(), AddEntityToModule(), AddEntityToModuleCompilationUnit(), address_of_value_entity_p(), AddToCalledModules(), AddVariableToCommon(), adg_fprint_psysteme(), adg_fprint_sc_pvecteur(), adg_get_integer_entity(), adg_print_graph(), adg_rename_entities(), align_indices_p(), AnalyzeData(), anonymous_type_p(), any_assign_operation_to_transformer(), any_expression_to_transformer(), any_scalar_assign_to_transformer_list(), any_scalar_assign_to_transformer_without_effect(), any_use_statement(), arguments_are_something(), atinit(), atomizer_of_loop(), atomizer_of_test(), better_elim_var_with_eg(), binary_arithmetic_operator_to_post_pv(), binary_to_nary(), boolean_intrinsic_call_condition_to_points_to(), bottom_up_abc_base_reference_implied_do(), bottom_up_abc_reference(), bound_distribution(), bound_generation(), bound_parameter_name(), build_list_of_min(), build_new_ref(), build_sc_machine(), build_sc_with_several_uniform_ref(), build_third_comb(), build_written_list(), c_call(), c_entity_local_name(), c_io_function_to_post_pv(), c_return_to_transformer(), c_statement(), c_text_related_entities(), c_user_function_call_to_transformer(), call_instruction_to_communications(), call_rwt(), call_to_post_pv(), call_to_wp65_code(), CCompilationUnitMemoryAllocations(), check_io_list(), check_one_common(), check_range_wrt_precondition(), check_simple(), check_the_reference(), check_this_loop(), CheckLeftHandSide(), clean_distributed_io_system(), clean_shared_io_system(), CleanUpEntity(), common_variable_in_module_scope_p(), comp_regions_of_instruction(), comp_regions_of_loop(), comparable_entity_in_list_p(), compare_coeff(), complex_constant_expression_p(), compute_distribution_context(), compute_distribution_controlization_context(), compute_iteration_domain(), compute_points_to_kill_set(), compute_regions_union(), ComputeAddresses(), constant_to_transformer(), constraint_distribution(), constraint_to_bound(), constraints_to_loop_bound(), contexts_mapping_of_nest(), controlize_distribution(), convert_constant_from_double_to_real(), convert_constant_from_int_to_double(), convert_constant_from_int_to_real(), convert_constant_from_real_to_double(), convert_constant_from_real_to_int(), copy_from_call(), copy_from_statement(), copy_to_call(), copy_to_statement(), create_HRE_module(), create_init_common_param_for_arrays(), create_init_common_param_for_processors(), create_init_common_param_for_templates(), create_local_index(), create_local_index2(), create_new_ent_list(), create_scalar_stub_sink_cell(), create_stub_entity(), create_tile_basis(), CreateReturnEntity(), cute_convex_union(), dag_append_freia_call(), dag_normalize(), dagvtx_copy_list_dot(), dataflows_on_reference(), davinci_dump_expression_rc(), dead_fcd_directive_p(), declare_common_variables_in_module(), DeclarePointer(), DeclareVariable(), default_common_hook(), defs_elim_of_statement(), directive_filter(), distribution_format(), do_check_isolate_statement_preconditions_on_call(), do_gpu_qualify_pointers(), dprint(), dump_common_layout(), ecrit_coeff1(), ecrit_commentaire2(), ecrit_une_var(), ecrit_une_var_neg(), edge_weight(), effect_indices_first_pointer_dimension_rank(), egalite_debug(), entity_all_locations_p(), entity_all_module_heap_locations_typed(), entity_all_module_locations(), entity_all_module_locations_p(), entity_all_module_xxx_locations(), entity_all_module_xxx_locations_p(), entity_all_xxx_locations_p(), entity_allocatable_p(), entity_and_common_name(), entity_blockdata_p(), entity_common_p(), entity_empty_label_p(), entity_enum_p(), entity_f95module_p(), entity_field_p(), entity_flow_or_context_sentitive_heap_location_p(), entity_freia_api_p(), entity_heap_location_p(), entity_hpf_number(), entity_in_module(), entity_locations_max(), entity_module_unambiguous_user_name(), entity_more_or_less_minimal_name(), entity_struct_p(), entity_stub_sink_p(), entity_typed_anywhere_locations_p(), entity_typed_nowhere_locations_p(), entity_union_p(), entity_xml_parameter_p(), eov_add_entity_to_eliminate(), equiv_class_debug(), equivalent_entity_compare(), eval_var(), EvalConstant(), expand_call(), expression_equal_in_context_p(), expression_implied_do_p(), expression_int_scalar(), expression_less_than_in_context(), expression_list_directed_p(), expression_null_p(), expression_reference_number(), expression_to_float(), expression_to_int(), expression_to_polynome(), expression_to_post_pv(), external_call_to_post_pv(), external_value_name(), extract_lambda_list(), extract_stat_lunk(), fcd_directive_p(), fcs_count(), fill_HRE_module(), find_entity(), find_implicit_equation(), find_implicit_goto(), find_iteration_domain(), find_loop_with_name(), find_or_create_emulated_shared_variable(), find_or_create_newInd(), fix_sequence_statement_attributes(), fix_storage(), flatten_code(), for_to_do_loop_conversion(), formal_label_replacement_p(), fortran_library_entity_p(), fortran_user_call_to_transformer(), fortran_user_function_call_to_transformer(), fprint_bdt(), fprint_bdt_with_stat(), fprint_call(), fprint_coef_list(), fprint_entity_list(), fprint_message(), fprint_psysteme(), fprint_sc_pvecteur(), fprint_vv(), fprint_wp65_hash_tables(), freia_allocate_new_images_if_needed(), freia_cleanup_sequence_rec(), freia_data2d_field(), freia_image_variable_p(), freia_is_transpose_call(), freia_reduction_variable(), freia_spoc_pipeline(), fsi_seq_flt(), generate_all_liveness_but(), generate_code_loop(), generate_dynamic_liveness_for_primary(), generate_io_statements_for_shared_arrays(), generate_one_message(), generate_remapping_code(), generate_scalar_variables(), generate_scalar_variables_from_list(), generate_wiring(), GENERATION(), generic_c_words_simplified_entity(), generic_equality_to_transformer(), generic_function_to_return_value(), generic_stub_source_to_sinks(), GenericCleanEntities(), get_common_param_name(), get_controlized_statement_comment(), get_dynamic_variable_name(), get_externalized_function_param_name(), get_externalized_function_private_param_name(), get_function_common_name(), get_function_id_name(), get_in_param_id_name(), get_m_coef(), get_nlc_number(), get_number_of_ins(), get_operator_id(), get_out_param_id_name(), get_ppt(), get_receive_param_module_name(), get_ref_var_param_name(), get_send_param_module_name(), get_special_prettyprint_for_operator(), gfc2pips_add_to_callees(), gfc2pips_computeAdressesOfArea(), gfc2pips_generate_parameters_list(), gfc2pips_namespace(), gfc2pips_vars_(), global_intermediate_value_p(), global_old_value_p(), gpips_main(), handle_set_directive(), heap_cell_p(), heap_effect(), heap_effect_p(), heap_intrinsic_to_post_pv(), host_section_p(), hpf_directive_entity_p(), hpfc_intrinsic_like_function(), hpfc_io_like_function(), impact_check_two_scalar_variables_in_path(), implicit_type_p(), ImplicitType(), implied_do_reference_number(), inegalite_debug(), init_c_implicit_variables(), inline_expression_call(), inlining_regenerate_labels(), insert_check_alias_before_statement(), insert_impact_description_as_comment(), insert_one_type_declaration(), insert_test_before_statement(), interprocedural_abc_arrays(), interprocedural_abc_call(), interprocedural_mapping(), intrinsic_to_post_pv(), inv_call_flt(), io_comp_regions(), io_filter(), io_loop_nest_p(), Is_Associative_Commutative(), is_index_coeff_p(), is_mu_coeff_p(), is_mu_stat_in_sc(), IsBinaryOperator(), IsNaryOperator(), IsUnaryOperator(), lexicographic_order_p(), load_summary_transformer(), local_intermediate_value_entity_p(), local_old_value_entity_p(), local_temporary_value_entity_p(), local_tile_constraints(), look_for_the_best_counter(), loop_bounds_to_tile_bounds(), loop_iteration_domaine_to_sc(), loop_nest_movement_generation(), loop_nest_to_local_variables(), loop_nest_to_wp65_code(), loop_to_complexity(), make_array_communication_module(), make_array_communication_statement(), make_base_phi_variables(), make_bounds(), make_communication_statement(), make_context_of_loop(), make_emulated_shared_variable(), make_filtered_dg_or_dvdg(), make_global_common_and_initialize(), make_global_entity_from_local(), make_host_and_node_modules(), make_layout_statement(), make_load_blocks(), make_movement_scalar_wp65(), make_movements_loop_body_wp65(), make_new_entity(), make_new_local_variables(), make_new_simd_vector_with_prefix(), make_nlc_entity(), make_nsp_entity(), make_nub_entity(), make_return_statement(), make_scanning_over_one_tile(), make_scanning_over_tiles(), make_shared_statement(), make_start_ru_module(), make_statement_copy_i(), make_store_blocks(), make_tile_constraints(), MakeAssignInst(), MakeAtom(), MakeComplexConstant(), MakeCurrentFunction(), MakeCurrentModule(), MakeEntry(), MakeEntryCommon(), MakeEquivAtom(), MakeFormalParameter(), MakeIoInstA(), MakeParameter(), MakeReturn(), MakeStatement(), MakeVariableStatic(), malloc_arg_to_type(), maybe_unroll_while_rwt(), module_codefilename(), module_entitiesfilename(), module_fortranfilename(), module_name_to_preconditions(), module_name_to_total_preconditions(), module_par_codefilename(), module_par_fortranfilename(), module_pp_fortranfilename(), module_predicat_fortranfilename(), module_resource_name(), module_to_all_declarations(), module_to_callees(), module_to_dynamic_area(), module_to_heap_area(), module_to_value_mappings(), module_to_wp65_modules(), movement_computation(), my_build_new_ref(), nary_operator_p(), new_elim_var_with_eg(), new_local_image_variable(), new_synonym(), normal_expression_of_statement(), normal_loop_p(), nowhere_source_to_sinks(), null_source_to_sinks(), oi_call_rwt(), old_value_entity_p(), only_minor_statements_in_between(), operator_expression_p(), outliner_independent_recursively(), parametric_transformer_empty_p(), partial_eval_binary_operator(), partial_eval_binary_operator_old(), pip_solve_min_with_big(), pips_main(), pips_region_user_name(), place_holder_variable_p(), plc_elim_var_with_eg(), plc_fprint_proto(), plc_make_distance(), points_to_cell_translation(), points_to_compare_cells(), points_to_compare_ptr_cell(), points_to_reference_to_typed_index(), pragma_omp_p(), pragma_PRAGMA_DISTRIBUTED_p(), prepare_reindexing(), prettyprint_dependence_graph(), prettyprint_dependence_graph_view(), print_any_transformer(), print_common_layout(), print_fullname_base(), print_list_of_entities(), print_op_schedule(), print_or_dump_points_to(), print_points_to_cells(), print_reference_list(), process_static_initialization(), process_true_call_stat(), process_value_list(), propagation_on_remapping_graph(), proper_comp_regions_of_intrinsic(), pu_variable_name(), pu_vect_fprint(), put_variables_in_ordered_lists(), read_statement_with_write_effect_on_array_subscript(), readable_value_name(), realign_directive_p(), recursive_rename_types(), redistribute_directive_p(), ref_found_p(), ref_in_implied_do(), reference_conflicting_test_and_update(), reference_list_print(), reference_written_p(), referencenodeclfilter(), references_for_regions(), region_dynamic_var_elim(), region_entity_variable_to_new_declare_entity(), regions_transformer_apply(), related_effect(), related_images_p(), relation_to_transformer(), remapping_file_name(), remove_ghost_variable_entities(), remove_variables_from_system(), remove_variables_if_possible(), rename_directive_p(), rename_loop_index(), rename_reference(), rename_statement_declarations(), RenameFunctionEntity(), replicate_declaration(), retype_formal_parameters(), rewrite_modulo_expression(), rice_loop(), rice_update_dependence_graph(), sa_print_ins(), safe_load_primary_entity(), SafeLocalToGlobal(), same_entity_lname_p(), SaveChains(), SaveEntity(), sc_image_computation(), sc_proj_on_di(), sc_projection_optim_along_vecteur_ofl(), sc_syst_debug(), scalar_postlude(), sctc_call_rwt(), sentence_area(), sentence_basic_declaration(), sentence_data(), sentence_external(), sentence_f95use_declaration(), sentence_goto(), sentence_symbolic(), separate_variables(), separate_variables_2(), set_dimensions_of_local_variable_family(), simd_load_call_p(), simd_replace_parameters(), simd_store_call_p(), simd_work_call_p(), simple_addition_to_transformer(), simplify_C_expression(), simplify_relational_expression(), sio_call_flt(), sizeof_value_entity_p(), skip_cast_and_addop_expression(), sort_unknowns(), spire_distributed_unstructured_to_structured(), st_call(), st_declaration(), st_entity_local_name(), st_one_message(), statement_flatten_declarations(), statement_remove_omp_clauses(), statement_to_label(), statement_with_at_most_one_expression_integer(), statement_with_at_most_one_integer_or_character(), statement_without_argument(), static_controlize_call(), store_a_lower(), store_an_upper(), store_initial_value(), subarray_shift_assignment_p(), substitute_unbounded_call(), SubstituteDummyParameters(), swis_call_flt(), switch_generic_to_specific(), terapix_renamed_entity_p(), TestDiVariables(), text_entity_declaration(), text_equivalence_class(), text_equivalences(), text_loop(), text_loop_cmf(), text_loop_craft(), text_loop_default(), text_whileloop(), this_entity_xmldeclaration(), tile_hyperplane_constraints(), tile_membership(), tile_membership_constraints(), tiling_transformation(), tpips_init(), tpips_main(), transfert_statement(), transformer_add_integer_relation_information(), transformer_add_loop_index_incrementation(), transformer_combine(), transformer_general_consistency_p(), transformer_internal_consistency_p(), transformer_normalize(), translate_global_value(), translate_IO_ref(), translate_to_module_frame(), TranslateEntryFormals(), type_this_call(), type_this_entity_if_needed(), type_this_instruction(), type_to_named_type(), typing_arguments_of_user_function(), typing_buffer_inout(), typing_function_argument_type_to_return_type(), typing_implied_do(), typing_of_assign(), unary_minus_operation_to_transformer(), unbounded_dimension_p(), unbounded_entity_p(), undefined_pointer_value_entity_p(), update_called_modules(), update_functional_type_with_actual_arguments(), update_map(), update_operation_to_transformer(), update_operator_to_post_pv(), update_range(), update_runtime_for_remapping(), update_summary_precondition(), update_written_variables(), UpdateEntity(), UpdateEntity2(), UseFormalArguments(), user_call_to_points_to_sinks(), variable_in_declaration_module_p(), variable_list_update(), variable_to_abstract_location(), vect_debug(), verify_used_before_set_call(), what_operator(), where_to_perform_operation(), words_assign_op(), words_basic(), words_cmf_loop_range(), words_common_variable(), words_entity_list(), words_infix_binary_op(), words_infix_nary_op(), words_intrinsic_call(), words_intrinsic_precedence(), words_io_control(), words_io_inst(), words_loop_list(), words_loop_range(), words_nullary_op_c(), words_nullary_op_fortran(), words_omp_red(), words_parameters(), words_postfix_unary_op(), words_prefix_unary_op(), words_range(), words_regular_call(), words_stat_io_inst(), words_subscript_range(), wpips_main(), xml_Chain_Graph(), xml_Compute_and_Need(), xml_entity_local_name(), xml_loop_from_loop(), and xml_loop_from_sequence().

+ Here is the call graph for this function:

◆ entity_local_variable_p()

bool entity_local_variable_p ( entity  var,
entity  module 
)

Check if a variable "var" is local to a module "module".

A variable is local to a module:

  • if it has been allocated in one of the module areas such as STATIC, DYNAMIC,...
  • if it is a formal parameter passed by value, that is a C scalar formal parameter; note that a scalar can be a structure or a union.

it might be better to check the parameter passing mode itself, via the module type

Parameters
varar
moduleodule

Definition at line 3104 of file entity.c.

3104  {
3105  bool local = false;
3106 
3107  if(storage_ram_p(entity_storage(var))) {
3108  ram r = storage_ram(entity_storage(var));
3109  if(same_entity_p(module, ram_function(r))) {
3110  entity section = ram_section(r);
3112  local=true;
3113  }
3114  }
3115  } else if( storage_formal_p(entity_storage(var))) {
3116  /* it might be better to check the parameter passing mode itself,
3117  via the module type */
3118  bool fortran_p = fortran_module_p(module);
3119  bool scalar_p = entity_scalar_p(var);
3120 
3122  if(!fortran_p && scalar_p && same_entity_p(module, formal_function(r))) {
3123  local=true;
3124  }
3125  }
3126  pips_debug(4,"Looked if variable %s is local to function %s, result is %d\n",
3127  entity_name(var), entity_name(module), local);
3128  return local;
3129 }
bool fortran_module_p(entity m)
Test if a module is in Fortran.
Definition: entity.c:2799
const char * entity_module_name(entity e)
See comments about module_name().
Definition: entity.c:1092
#define storage_formal(x)
Definition: ri.h:2524
#define formal_function(x)
Definition: ri.h:1406

References entity_module_name(), entity_name, entity_scalar_p(), entity_storage, entity_user_name(), formal_function, fortran_module_p(), module, pips_debug, ram_function, ram_section, same_entity_p(), same_string_p, storage_formal, storage_formal_p, storage_ram, and storage_ram_p.

Referenced by do_check_isolate_statement_preconditions_on_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_main_module_p()

◆ entity_memory_size()

int entity_memory_size ( entity  dt)

dt is assumed to be a derived type: struct, union, and maybe enum

Parameters
dtt

Definition at line 239 of file size.c.

240 {
241  /* dt is assumed to be a derived type: struct, union, and maybe enum */
242  type t = ultimate_type(entity_type(dt));
243  int s = type_memory_size(t);
244 
245  return s;
246 }
int type_memory_size(type t)
Definition: size.c:248

References entity_type, type_memory_size(), and ultimate_type().

Referenced by reductions_rewrite(), and SizeOfElements().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_module_name()

const char* entity_module_name ( entity  e)

See comments about module_name().

Its result is transient and must be strduped.

Definition at line 1092 of file entity.c.

1093 {
1094  return module_name(entity_name(e));
1095 }
const char * module_name(const char *s)
Return the module part of an entity name.
Definition: entity_names.c:296

References entity_name, and module_name().

Referenced by abstract_locations_max(), array_location_entity_of_module_p(), array_need_bound_check_p(), cell_reference_compare(), check_one_common(), clean_distributed_io_system(), clean_shared_io_system(), CleanUpEntity(), common_region_translation(), constant_memory_access_path_to_location_name(), create_stub_entity(), do_terapix_argument_handler(), dprint(), dump_common_layout(), effect_on_non_local_variable_p(), entity_all_locations_p(), entity_all_xxx_locations_p(), entity_any_module_p(), entity_hpfc_dummy_p(), entity_local_variable_p(), entity_more_or_less_minimal_name(), entity_name_without_scope(), entity_to_module_entity(), eov_add_entity_to_eliminate(), expression_reference_number(), FixCInternalLabels(), function_return_value_p(), Generate_C_ReturnLabel(), generic_make_entity_copy_with_new_name(), global_intermediate_value_p(), global_new_value_to_global_old_value(), global_old_value_p(), global_variable_p(), initialize_and_verify_common_variable(), inline_expression_call(), insert_common_declaration(), interprocedural_abc_arrays(), local_entity_of_current_function_p(), local_entity_of_module_p(), location_entity_of_module_p(), make_location_entity(), make_new_index_entity(), make_statement_copy_i(), new_synonym(), opgen_may_module(), opgen_must_module(), precondition_intra_to_inter(), print_C_common_layout(), print_common_layout(), print_fullname_base(), print_or_dump_points_to(), print_points_to_cells(), reference_to_address_entity(), remapping_file_name(), remove_variable_entity(), replicate_declaration(), return_value_p(), set_current_function(), split_initializations_in_statement(), static_global_variable_p(), top_level_entity_p(), transformer_general_consistency_p(), translate_global_value(), translate_to_module_frame(), undefined_pointer_value_entity_p(), UpdateFormalStorages(), used_before_set(), variable_in_module_p(), and variable_in_module_p2().

+ Here is the call graph for this function:

◆ entity_module_p()

bool entity_module_p ( entity  e)

Functional typedef also have value code ...

Definition at line 683 of file entity.c.

684 {
685  if(typedef_entity_p(e))
686  /* Functional typedef also have value code ... */
687  return false;
688  else {
689  value v = entity_initial(e);
690  return v!=value_undefined && value_code_p(v);
691  }
692 }

References entity_initial, typedef_entity_p(), value_code_p, and value_undefined.

Referenced by add_common_variables_to_hash_table(), add_formal_parameters_to_hash_table(), add_formal_to_actual_bindings(), add_module_call_site_precondition(), add_parameter_variable_to_module(), add_private_variable_to_module(), AddEntityToModule(), c_text_related_entities(), compute_SENDRECV_regions(), current_module(), entity_blockdata_p(), entity_common_p(), entity_f95module_p(), entity_function_p(), entity_main_module_p(), entity_subroutine_p(), entity_to_formal_integer_parameters(), entity_to_module_entity(), expression_to_transformer(), find_ith_parameter(), formal_and_actual_parameters_association(), fprint_any_environment(), functional_call_p(), get_module_precondition(), get_referenced_entities_filtered(), get_symbol_table(), global_parallelization(), in_regions_of_external(), interactive_loop_transformation(), ith_parameter_p(), language_module_p(), load_body_effects(), load_module_intraprocedural_effects(), load_summary_effects(), load_summary_precondition(), load_summary_reductions(), load_summary_total_postcondition(), load_summary_transformer(), module_formal_parameters(), module_to_formal_analyzable_parameters(), module_to_value_mappings(), pr_call_flt(), print_module_name_to_toposorts(), pure_function_p(), put_summary(), regions_of_external(), remove_common_variables_from_hash_table(), remove_formal_parameters_from_hash_table(), remove_variable_entity(), replace_formal_parameters_by_real_ones(), sc_entity_to_formal_integer_parameters(), set_current_module_entity(), step_translate_and_map_step_regions(), text_initializations(), translate_reductions(), update_summary_precondition(), update_user_common_layouts(), user_call_to_transformer(), and verify_used_before_set_call().

+ Here is the call graph for this function:

◆ entity_name_or_TCST()

const char* entity_name_or_TCST ( entity  e)

Return a name valid for sorting variables in vectors and constraint systems.

Returns
the name or "TCST" if the entity is null.

Definition at line 627 of file entity.c.

628 {
629  if (e != NULL)
630  return entity_name(e);
631  else
632  return "TCST";
633 }

References entity_name.

Referenced by make_bound_expression(), and vect_change_base().

+ Here is the caller graph for this function:

◆ entity_name_without_scope()

string entity_name_without_scope ( entity  e)

allocates a new string

Definition at line 543 of file entity.c.

544 {
545  string en = entity_name(e);
546  const char* mn = entity_module_name(e);
547  string ns = strrchr(en, BLOCK_SEP_CHAR);
548  string enws = string_undefined;
549 
550  if(ns==NULL)
551  enws = strdup(en);
552  else
553  enws = strdup(concatenate(mn, MODULE_SEP_STRING, ns+1, NULL));
554 
555  pips_debug(9, "entity name = \"%s\", without scope: \"%s\"\n",
556  en, enws);
557 
558  return enws;
559 }
#define string_undefined
Definition: newgen_types.h:40

References BLOCK_SEP_CHAR, concatenate(), entity_module_name(), entity_name, MODULE_SEP_STRING, pips_debug, strdup(), and string_undefined.

+ Here is the call graph for this function:

◆ entity_non_pointer_scalar_p()

bool entity_non_pointer_scalar_p ( entity  e)
Returns
true if the entity is a scalar but not a pointer, false otherwise. (takes care of typedefs).

The property is not true for overloaded, string, derived

Definition at line 1193 of file variable.c.

1194 {
1195  bool atomic_p = false;
1197  if(type_variable_p(ct)) {
1198  variable vt = type_variable(ct);
1199 
1200  //pips_assert("entity e is a variable", type_variable_p(ct));
1201  //entity can be a functional in C too
1202 
1203  if(ENDP(variable_dimensions(vt)))
1204  {
1205  /* The property is not true for overloaded, string, derived
1206  */
1207  basic bt = variable_basic(vt);
1208  atomic_p = basic_int_p(bt) || basic_float_p(bt) || basic_logical_p(bt)
1209  || basic_complex_p(bt) || basic_bit_p(bt);
1210  }
1211 
1212  }
1213  return atomic_p;
1214 }
type entity_basic_concrete_type(entity)
retrieves or computes and then returns the basic concrete type of an entity
Definition: type.c:3677

References basic_bit_p, basic_complex_p, basic_float_p, basic_int_p, basic_logical_p, ENDP, entity_basic_concrete_type(), type_variable, type_variable_p, variable_basic, and variable_dimensions.

+ Here is the call graph for this function:

◆ entity_not_constant_or_intrinsic_p()

bool entity_not_constant_or_intrinsic_p ( entity  e)

Default entity filter for get_referenced_entities()

It filters out constants and intrinsics

It should have been named entity_neither_constant_nor_intrinsic_p()...

Definition at line 3050 of file entity.c.

3050  {
3051  return !entity_constant_p(e) && ! intrinsic_entity_p(e);
3052 }
#define entity_constant_p(e)

References entity_constant_p, and intrinsic_entity_p().

Referenced by do_group_statement_constant_prune(), entity_for_value_mapping_p(), entity_not_undefined_nor_constant_nor_intrinsic_p(), get_referenced_entities(), skip_constants_intrinsics_members(), and wipeout_entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_pointer_p()

◆ entity_qualifiers()

list entity_qualifiers ( entity  e)

return the qualifiers associated to entity e if it's a variable NIL otherwise

Definition at line 1394 of file entity.c.

1395 {
1396  if (e != entity_undefined) {
1397  type t = entity_type(e);
1398  if (type_variable_p(t))
1399  return (variable_qualifiers(type_variable(t)));
1400  }
1401  return NIL;
1402 }

References entity_type, entity_undefined, NIL, type_variable, type_variable_p, and variable_qualifiers.

Referenced by add_declaration_to_declaration_statement_p(), c_text_related_entities(), and split_initializations_in_statement().

+ Here is the caller graph for this function:

◆ entity_register_p()

bool entity_register_p ( entity  e)
Returns
whether entity is a "register" variable

See also entity_volatile_variable_p()

Definition at line 766 of file entity.c.

767 {
768  if (entity_variable_p(e))
769  {
771  if (qualifier_register_p(q))
772  return true;
773  }
774  return false;
775 }
#define qualifier_register_p(x)
Definition: ri.h:2185

References entity_type, entity_variable_p, FOREACH, qualifier_register_p, type_variable, and variable_qualifiers.

Referenced by entities_maymust_conflict_p(), reference_to_complexity(), and set_register_qualifier().

+ Here is the caller graph for this function:

◆ entity_return_label_p()

bool entity_return_label_p ( entity  e)

Definition at line 673 of file entity.c.

674 {
675  return return_label_p(entity_name(e));
676 }
bool return_label_p(const char *s)
Definition: entity_names.c:272

References entity_name, and return_label_p().

Referenced by safe_print_statement(), srwt(), statement_does_return(), and update_statement_instruction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_scalar_p()

bool entity_scalar_p ( entity  e)

The concrete type of e is a scalar type.

The programmer cannot index this variable.

Note: variable e may appear indexed somewhere in the PIPS internal representation if this is linked to some semantics.

Definition at line 1113 of file variable.c.

1114 {
1115  bool return_value = false;
1116 
1117  type t = ultimate_type(entity_type(e));
1118  if(type_variable_p(t)) {
1119  return_value = ENDP(variable_dimensions(type_variable(t)))
1120  && ! pointer_type_p(t);
1121  }
1122  return return_value;
1123 }
bool pointer_type_p(type)
Check for scalar pointers.
Definition: type.c:2993

References ENDP, entity_type, pointer_type_p(), type_variable, type_variable_p, ultimate_type(), and variable_dimensions.

Referenced by address_of_scalar(), alias_check_in_caller(), alias_check_in_module(), AnalyzeData(), append_declaration_sc_if_exact_without_constraints(), array_bound_check_instrumentation(), assign_tmp_to_exp(), atomizer_of_loop(), call_STEP_subroutine3(), check_fortran_declaration_dependencies(), comp_regions_of_read(), comp_regions_of_write(), create_step_regions(), dimensions_to_dma(), do_clone_entity(), do_group_constants_terapix(), do_group_count_elements_reduce(), do_scalar_renaming(), do_split_structure(), effects_to_dma(), entities_maymust_conflict_p(), entity_integer_scalar_p(), entity_local_variable_p(), expression_reference_number(), expression_to_polynome(), find_or_create_scalar_entity(), find_tmp_of_exp(), generate_call_init_regionArray(), generic_effects_maymust_read_or_write_scalar_entity_p(), get_entity_step_commsize(), heap_intrinsic_to_post_pv(), icm_loop_rwt(), InitCompDesc(), initialize_and_verify_common_variable(), initialize_and_verify_local_variable(), inline_expression_call(), insert_initialization(), make_fields_assignment_instruction(), normalize_microcode(), other_cool_enough_for_a_last_substitution(), points_to_reference_to_type(), process_static_initialization(), promote_local_entities(), reference_scalar_p(), region_translation(), remove_unread_variables(), set_add_scalars(), simd_vector_entity_p(), simplify_dg(), store_expression(), store_initial_value(), text_comp_regions(), verify_used_before_set_expression(), and verify_used_before_set_statement_flt().

+ Here is the call graph for this function:

◆ entity_special_area_p()

bool entity_special_area_p ( entity  e)

Definition at line 154 of file area.c.

155 {
156  return entity_area_p(e) &&
158 }
bool dynamic_area_p(entity aire)
Definition: area.c:68
bool pointer_dummy_targets_area_p(entity aire)
Definition: area.c:113

References dynamic_area_p(), entity_area_p(), heap_area_p(), pointer_dummy_targets_area_p(), stack_area_p(), and static_area_p().

Referenced by declaration_supporting_references(), entity_in_common_p(), formal_variable_add_aliases(), init_host_and_node_entities(), regions_dynamic_elim(), text_entity_declaration(), text_equivalences(), update_common_layout(), update_user_common_layouts(), and variable_in_common_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_static_variable_p()

bool entity_static_variable_p ( entity  e)

return true if the entity is declared with the keyword static

Definition at line 1146 of file variable.c.

1146  {
1147  storage s = entity_storage(e);
1149 }

References entity_storage, ram_section, static_area_p(), storage_ram, and storage_ram_p.

Referenced by cumul_and_update_effects_of_statement(), declaration_to_post_pv(), do_scalar_renaming(), module_to_value_mappings(), move_declaration_control_node_declarations_to_statement(), redeclaration_enter_statement(), split_initializations_in_statement(), xml_Chain_Graph(), xml_Compute_and_Need(), and xml_Region_Parameter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_struct_p()

bool entity_struct_p ( entity  e)

Is entity e the entity corresponding to a struct declaration?

Note the difference with entity_array_p()

Definition at line 1002 of file entity.c.

1003 {
1004  const char* ln = entity_local_name(e);
1005  string ns = strrchr(ln, BLOCK_SEP_CHAR);
1006  bool struct_p = (ns==NULL && *ln==STRUCT_PREFIX_CHAR)
1007  || (ns!=NULL && *(ns+1)==STRUCT_PREFIX_CHAR)
1008  || (strstr(entity_name(e),STRUCT_PREFIX DUMMY_STRUCT_PREFIX)!=NULL);
1009  return struct_p;
1010 }
#define DUMMY_STRUCT_PREFIX
Definition: naming-local.h:87

References BLOCK_SEP_CHAR, DUMMY_STRUCT_PREFIX, entity_local_name(), entity_name, STRUCT_PREFIX, and STRUCT_PREFIX_CHAR.

Referenced by derived_entity_p(), do_clone_entity(), filtered_declaration_list(), get_symbol_table(), type_struct_variable_p(), type_used_in_type_declarations_p(), and wipeout_entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_subroutine_p()

bool entity_subroutine_p ( entity  e)

???

Definition at line 737 of file entity.c.

738 {
739  return entity_module_p(e) &&
740  !entity_main_module_p(e) &&
741  !entity_blockdata_p(e) && /* ??? */
742  !entity_function_p(e);
743 }
bool entity_main_module_p(entity e)
Definition: entity.c:700
bool entity_function_p(entity e)
Definition: entity.c:724
bool entity_blockdata_p(entity e)
Definition: entity.c:712

References entity_blockdata_p(), entity_function_p(), entity_main_module_p(), and entity_module_p().

Referenced by c_head(), call_selection(), do_inlining(), interface_code_string(), run_inlining(), search_1r_function_call(), xml_Arguments(), xml_Call(), and xml_Chain_Graph().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_to_expression()

expression entity_to_expression ( entity  e)

if v is a constant, returns a constant call.

if v is a variable, returns a reference to v.

should be a scalar variable!

Definition at line 165 of file expression.c.

166 {
167  if(entity_symbolic_p(e))
168  return call_to_expression(make_call(e, NIL));
169  else if (entity_constant_p(e))
170  return call_to_expression(make_call(e, NIL));
171  else /* should be a scalar variable! */
173 }
expression reference_to_expression(reference r)
Definition: expression.c:196
expression call_to_expression(call c)
Build an expression that call a function or procedure.
Definition: expression.c:309

References call_to_expression(), entity_constant_p, entity_symbolic_p, make_call(), make_reference(), NIL, and reference_to_expression().

Referenced by add_actual_return_code(), add_exec_mmcd(), add_index_out_effect_proc(), add_pragma_to_sequence(), adg_dataflowgraph_with_extremities(), adg_enrichir(), adg_rename_entities(), any_basic_update_operation_to_transformer(), any_update_to_transformer_list(), atom_cse_expression(), buffer_full_condition(), build_call_STEP_AllToAll(), build_call_STEP_init_regionArray(), build_call_STEP_set_recvregions(), build_call_STEP_set_sendregions(), c_convex_effects_on_actual_parameter_forward_translation(), C_MakeReturnStatement(), call_STEP_subroutine(), call_STEP_subroutine3(), comEngine_generate_procCode(), compile_master(), compile_one_reduction(), compile_reduction(), compute_HRE_memory_mapping(), compute_points_to_binded_set(), compute_region(), controlize_distribution(), ctx_generate_new_statement_cluster_dependant(), declaration_statement_to_points_to(), declaration_to_post_pv(), define_node_processor_id(), derived_formal_parameter_to_stub_points_to(), dimensions_to_dma(), distribute_code(), do_array_to_pointer_walk_expression(), do_atomize_call(), do_brace_expression_to_statements(), do_clone_statement(), do_gather_all_expressions(), do_group_constants_terapix(), do_loop_expansion(), do_loop_nest_unswitching(), do_loop_to_for_loop(), do_loop_to_while_loop(), do_loop_unroll_with_epilogue(), do_loop_unroll_with_prologue(), do_outliner_smart_replacment(), do_point_to(), do_scalar_renaming_in_successors(), do_solve_hardware_constraints_on_volume(), do_split_structure(), do_symbolic_tiling(), do_terapix_argument_handler(), entities_to_expressions(), entities_to_expressions2(), expression_multiply_sizeof_to_transformer(), find_or_create_allocatable_struct(), fix_loop_index_sign(), for_to_do_loop_conversion(), freia_add_image_arguments(), freia_copy_image(), full_loop_unroll(), fusion(), fusion_buffer(), gen_if_rank(), Generate_C_ReturnStatement(), generate_call_compute_loopslices(), generate_call_get_commsize(), generate_call_get_rank(), generate_call_get_rank_loopbounds(), generate_call_get_workchunk_loopbounds(), generate_call_set_regionarray(), generate_code_loop(), generate_exec_statement(), generate_fifo_stat(), generate_fifo_stat2(), generate_ind_fifo_stat2(), generate_load_statement(), generate_loop_workchunk(), generate_mmcd_stat_from_ref(), generate_optimized_code_for_loop_nest(), generate_parallel_body(), generate_return_code_checks(), generate_save_statement(), generate_subarray_shift(), get_allocatable_data_expr(), get_fifoExp_from_ref(), get_indExp_from_ref(), gfc2pips_int2expression(), gfc2pips_logical2expression(), gfc2pips_real2expression(), gfc2pips_symbol2data_instruction(), hpfc_add_n(), hpfc_broadcast_buffers(), hpfc_broadcast_if_necessary(), hpfc_buffer_reference(), hpfc_compute_lid(), hpfc_gen_n_vars_expr(), hpfc_generate_message(), hpfc_hmessage(), hpfc_initsend(), hpfc_lazy_buffer_packing(), hpfc_lazy_guard(), hpfc_message(), hpfc_translate_call_with_distributed_args(), if_different_pe_and_not_twin(), image_free(), initialize_scalar_variable(), inline_expression_call(), inline_return_crawler(), inline_split_declarations(), insert_check_alias_before_statement(), intrinsic_call_to_points_to(), isolate_patch_reference(), loop_bound_evaluation_to_transformer(), loop_flt(), loop_rewrite(), loop_strip_mine(), loopbounds_substitution(), make_array_communication_statement(), make_assignement_statement(), make_body_from_loop(), make_C_print_statement(), make_communication_statement(), make_condition_from_loop(), make_dma_transfert(), make_exec_mmcd(), make_expression_with_state_variable(), make_factor_expression(), make_fields_assignment_instruction(), make_guard_expression(), make_increment_statement(), make_init_newInd_stat(), make_initialization_from_loop(), make_lInitStats(), make_loop_nest_for_overlap(), make_loop_step_stat(), make_loopStat1(), make_lSwitchStats(), make_mmcd_load_store_stat(), make_mmcd_stats_from_ref(), make_read_loopbody(), make_scalar_communication_module(), make_scanning_over_tiles(), make_send_receive_conversion(), make_set_rc_statement(), make_shuffle_statement(), make_start_ru_module(), make_state_variable_assignement_statement(), make_step_inc_statement(), make_temporary_scalar_entity(), make_toggle_inc_statement(), make_toggle_init_statement(), make_toggle_mmcd(), make_transStat(), MakeAssignedGotoInst(), MakeAssignedOrComputedGotoInst(), MakeDoInst(), modulo_to_transformer(), monome_to_expression(), move_declaration_control_node_declarations_to_statement(), mpi_initialize(), mpic_make_mpi_comm_rank(), mpic_make_mpi_comm_size(), mpic_make_mpi_finalize(), mpic_make_mpi_init(), mpic_make_mpi_irecv(), mpic_make_mpi_isend(), mpic_make_mpi_recv(), mpic_make_mpi_send(), mppa_compile_dag(), mppa_helper_args_params(), mylid_ne_lid(), new_local_image_variable(), normalize_microcode(), outliner_extract_loop_bound(), outliner_parameters(), outliner_patch_parameters(), perform_array_element_substitutions_in_transformer(), pointer_values_remove_var(), process_innerStat1_proc(), process_opt_replace(), Pvecteur_to_assign_statement(), reference_add_field_dimension(), reference_to_points_to(), regenerate_toggles(), region_to_address(), regions_to_loops(), rename_statement_declarations(), replace_field_by_reference_walker(), replace_indices_region(), replace_indices_region_com(), sc_delimiter(), scalar_to_array(), scalopify(), sequence_to_post_pv(), sesamify(), set_aipo_call(), simd_atomize_this_expression(), simd_loop_unroll(), simple_reference_add_field_dimension(), simplify_subscript(), split_complex_expression(), split_initializations_in_statement(), st_generate_packing(), statement_compute_bounds(), step_symbolic_expression(), string_to_expression(), struct_initialization_to_points_to(), struct_variable_to_pointer_locations(), struct_variable_to_pointer_subscripts(), substitute_struct_stub_in_transformer(), systeme_to_loop_nest(), terapix_loop_handler(), transformer_apply_field_assignments_or_equalities(), transformer_apply_unknown_field_assignments_or_equalities(), translate_to_module_frame(), typedef_formal_parameter_to_stub_points_to(), unsugared_loop_header(), unsugared_loop_inc(), unsugared_loop_test(), update_indices_for_local_computation(), update_reflhs_with_rhs_to_transformer(), usual_loop_tiling(), and verify_scalar_variable().

+ Here is the call graph for this function:

◆ entity_to_module_entity()

entity entity_to_module_entity ( entity  e)

Find the enclosing module of an entity.

If an entity is a module, return e. If the entity is a top-level entity, return e. FI: I'm surprised this function does not exist already

Definition at line 2053 of file entity.c.

2054 {
2056 
2057  if(top_level_entity_p(e))
2058  m = e;
2059  else if(entity_module_p(e))
2060  m = e;
2061  else {
2062  const char* mn = entity_module_name(e);
2063  m = module_name_to_entity(mn);
2064  }
2065 
2066  pips_assert("entity m is defined", !entity_undefined_p(m));
2067  pips_assert("entity m is a module or top_level_entity", entity_module_p(m)||top_level_entity_p(e) );
2068 
2069  return m;
2070 }

References entity_module_name(), entity_module_p(), entity_undefined, entity_undefined_p, module_name_to_entity(), pips_assert, and top_level_entity_p().

Referenced by compute_points_to_gen_set(), find_enum_of_member(), make_global_entity_from_local(), move_declaration_control_node_declarations_to_statement(), and points_to_cell_translation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_unbounded_p()

bool entity_unbounded_p ( entity  e)

bool entity_unbounded_p(entity e) input : an array entity output : true if the last dimension of the array is unbounded (*), false otherwise.

modifies : nothing comment :

Definition at line 1252 of file variable.c.

1253 {
1254  int nb_dim = NumberOfDimension(e);
1255 
1256  return(unbounded_dimension_p(entity_ith_dimension(e, nb_dim)));
1257 }

References entity_ith_dimension(), NumberOfDimension(), and unbounded_dimension_p().

+ Here is the call graph for this function:

◆ entity_union_p()

bool entity_union_p ( entity  e)

Is entity e an entity representing the union declaration?

See entity_struct_p(), but different from entity_array_p()

Definition at line 1038 of file entity.c.

1039 {
1040  const char* ln = entity_local_name(e);
1041  string ns = strrchr(ln, BLOCK_SEP_CHAR);
1042  bool union_p = (ns==NULL && *ln==UNION_PREFIX_CHAR)
1043  || (ns!=NULL && *(ns+1)==UNION_PREFIX_CHAR)
1044  || (strstr(entity_name(e),UNION_PREFIX DUMMY_UNION_PREFIX)!=NULL);
1045  return union_p;
1046 }
#define UNION_PREFIX
Definition: naming-local.h:58
#define DUMMY_UNION_PREFIX
Definition: naming-local.h:88

References BLOCK_SEP_CHAR, DUMMY_UNION_PREFIX, entity_local_name(), entity_name, UNION_PREFIX, and UNION_PREFIX_CHAR.

Referenced by derived_entity_p(), do_clone_entity(), filtered_declaration_list(), get_symbol_table(), type_union_variable_p(), type_used_in_type_declarations_p(), and wipeout_entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_used_in_declarations_p()

bool entity_used_in_declarations_p ( entity  e,
list  ldecl 
)

check if e is used to declare one of the entities in entity list ldecl

Parameters
eentity to check
ldecllist of entities whose declaration may use e
Returns
true if e appears in one of the declaration in ldecl
Parameters
ldecldecl

Definition at line 2258 of file entity.c.

2259 {
2260  bool found_p = false;
2261 
2262  FOREACH(ENTITY, d, ldecl) {
2263  type dt = entity_type(d);
2264  list sel = type_supporting_entities(NIL, dt);
2265 
2266  if(gen_in_list_p(e, sel)) {
2267  pips_debug(8, "entity \"%s\" is used to declare entity \"%s\"\n",
2268  entity_name(e), entity_name(d));
2269  found_p = true;
2270  gen_free_list(sel);
2271  break;
2272  }
2273  else {
2274  gen_free_list(sel);
2275  }
2276  }
2277 
2278  return found_p;
2279 }
list type_supporting_entities(list, type)
Definition: type.c:4347

References ENTITY, entity_name, entity_type, FOREACH, gen_free_list(), gen_in_list_p(), NIL, pips_debug, and type_supporting_entities().

+ Here is the call graph for this function:

◆ entity_user_name()

const char* entity_user_name ( entity  e)

Since entity_local_name may contain PIPS special characters such as prefixes (label, common, struct, union, typedef, ...), this entity_user_name function is created to return the initial entity/variable name, as viewed by the user in his code.

In addition, all possible seperators (file, module, block, member) are taken into account.

Function strstr locates the occurence of the last special character which can appear just before the initial name, so the order of test is important.

01/08/2003 Nga Nguyen -

Returns
pointer to the the user name (not newly allocated!)

Definition at line 487 of file entity.c.

488 {
489  string gn = entity_name(e);
490  const char* un = global_name_to_user_name(gn);
491  return un;
492 }
const char * global_name_to_user_name(const char *global_name)
functions on strings for entity names
Definition: entity_names.c:136

References entity_name, and global_name_to_user_name().

Referenced by actual_label_replacement_p(), add_address_of_value(), add_pragma_to_sequence(), add_prettyprint_control_list_to_declaration_statement(), AddEntityToCompilationUnit(), AddToDeclarations(), AddToExterns(), aliased_translation_p(), any_assign_operation_to_transformer(), any_expression_to_transformer(), any_scalar_assign_to_transformer_list(), any_scalar_assign_to_transformer_without_effect(), any_user_call_site_to_transformer(), array_location_entity_of_module_p(), bound_generation_compare_vector_component(), C_loop_range(), c_parser_error(), c_text_related_entities(), call_to_transformer(), callnodeclfilter(), can_terapixify_call_p(), CCompilationUnitMemoryAllocations(), cell_reference_compare(), check_C_function_type(), check_fortran_declaration_dependencies(), check_loop_distribution_feasability(), clean_statement_label(), clean_up_sequences_rewrite(), compilation_unit_text(), compute_points_to_binded_set(), constant_string_entity_p(), create_pointer_to_array_stub_points_to(), create_scalar_stub_sink_cell(), create_stub_entity(), CreateReturnEntity(), declaration_statement_to_points_to(), declaration_to_post_pv(), dereferencing_to_sinks(), do_check_isolate_statement_preconditions_on_call(), do_reduction_detection(), do_scalar_renaming_in_vertex(), do_slightly_rename_entities(), do_solve_hardware_constraints_on_nb_proc(), do_solve_hardware_constraints_on_volume(), do_terapix_argument_handler(), dump_common_layout(), effect_indices_first_pointer_dimension_rank(), effects_to_dma(), ensure_comment_consistency(), entities_maymust_conflict_p(), entities_type_and_name(), entity_dot_name(), entity_from_user_name(), entity_local_variable_p(), entity_module_unambiguous_user_name(), entity_more_or_less_minimal_name(), entity_sesam_buffer_p(), eov_add_entity_to_eliminate(), expression_allocatable_data_access_p(), expression_string_constant(), expression_to_float(), extended_source_to_sinks(), FILE_star_effect_reference_p(), find_field_in_field_list(), FindOrCreateCurrentEntity(), FindParameterEntity(), fix_loop_index_sign(), flag_loop(), flatten_code(), freed_list_to_points_to(), freia_alloc_call_p(), freia_stmt_free_p(), freia_terapix_call(), function_return_value_p(), gcd_and_constant_dependence_test(), generate_starpu_pragma(), generic_basic_equal_p(), generic_c_words_simplified_entity(), generic_clone_variable_with_unique_name(), generic_field_list_names_equal_p(), generic_function_to_return_value(), get_externalized_function_param_name(), get_externalized_function_private_param_name(), get_next_task_name(), get_statement_pragma_register(), global_source_to_sinks(), gpu_ify_statement(), gpu_xml_dump(), guess_potential_reduction(), has_similar_entity(), implicit_c_variable_p(), init_c_implicit_variables(), inline_calls(), inline_expression_call(), inline_statement_crawler(), intrinsic_call_to_points_to(), is_freia_this_call(), loadstore_type_conversion_string(), location_entity_of_module_p(), loop_rwt(), make_available_scalar(), make_bottom_up_abc_tests(), make_statement_copy_i(), MakeCurrentModule(), MakeFunctionExpression(), MakeParameterList(), MemberDerivedIdentifierToExpression(), module_initial_parameter_pv(), move_declaration_control_node_declarations_to_statement(), native_call_p(), new_array_element_backward_substitution_in_transformer(), normalize_microcode(), normalize_microcode_anotate(), NormalizeReference(), offset_cell(), offset_points_to_cell(), operator_neutral_element(), outliner_compilation_unit(), outliner_file(), outliner_independent_recursively(), outliner_parameters(), outliner_smart_references_computation(), parallel_tiling(), perform_array_element_substitutions_in_transformer(), pips_user_value_name(), pointer_arithmetic_to_points_to(), points_to_set_block_projection(), prepare_context(), print_call_precondition(), print_entity_task_buffers(), print_sesam_tasks_buffers_header(), promote_local_entities(), recursive_functional_type_supporting_entities(), redeclaration_enter_statement(), reference_add_field_dimension(), RenameFunctionEntity(), replace_sender_entity_by_receiver_entity_in_reference(), replicate_declaration(), return_value_p(), sac_aligned_entity_p(), sac_expression_reduction_p(), same_field_entity_p(), sentence_head(), sentence_tail(), sesam_buffer_to_server_entity(), sesam_task_label_p(), simd_vector_entity_p(), simplify_C_expression(), solve_name_clashes(), source_to_sinks(), split_initializations_in_statement(), statement_flatten_declarations(), statements_localize_declarations(), step_directives_init(), step_directives_save(), step_local_RT_Integer(), step_parameter(), step_translate_and_map_step_regions(), step_update_comm(), string_parameter_p(), string_to_entity(), stub_text(), substitute_scalar_stub_in_transformer(), SubstituteDummyParameters(), task_to_string(), TestCoupleOfReferences(), text_loop_default(), type_to_named_type(), unique_entity_name_p(), update_functional_type_result(), update_sesam_tasks_buffers(), UpdateEntity2(), UseFormalArguments(), user_call_to_points_to_interprocedural(), user_call_to_points_to_interprocedural_binding_set(), words_basic(), words_declaration(), words_enum(), words_goto_label(), words_omp_red(), words_points_to_reference(), Words_Reference(), words_reference(), words_regular_call(), words_variable_or_function(), xml_Application(), xml_Argument(), xml_Array(), xml_AssignArgument(), xml_Call(), xml_Chain_Graph(), xml_Compute_and_Need(), xml_declarations(), xml_Full_Type(), xml_loop(), xml_Loop(), xml_ParameterUseToArrayBound(), xml_Pattern_Paving(), xml_print_parameter(), xml_reference(), xml_Region_Parameter(), xml_Scalar(), xml_TaskParameter(), xml_tiling(), xml_Transposition(), and xml_Type_Entity().

+ Here is the call graph for this function:

◆ entity_variable_length_array_p()

bool entity_variable_length_array_p ( entity  e)

Definition at line 798 of file entity.c.

798  {
799  bool return_val = false;
800  if (entity_variable_p(e)) {
802  }
803  return return_val;
804 }
bool variable_length_array_type_p(type)
Is this equivalent to dependent_type_p()?
Definition: type.c:2972

References entity_type, entity_variable_p, ultimate_type(), and variable_length_array_type_p().

Referenced by do_convert_this_array_to_pointer_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ entity_volatile_variable_p()

bool entity_volatile_variable_p ( entity  v)
Returns
whether entity is a "volatile" variable

See also entity_register_p()

Definition at line 1637 of file variable.c.

1638 {
1639  type t = entity_type(v);
1640  pips_assert("the entity must have type variable", type_variable_p(t));
1641 
1643 }
bool volatile_variable_p(variable v)
Definition: variable.c:1649

References entity_type, pips_assert, type_variable, type_variable_p, and volatile_variable_p().

+ Here is the call graph for this function:

◆ EntityCode()

code EntityCode ( entity  e)

this function checks that e has an initial value code.

if yes returns it, otherwise aborts.

Definition at line 301 of file entity.c.

302 {
303  value ve = entity_initial(e);
304  pips_assert("EntityCode", value_tag(ve) == is_value_code);
305  return(value_code(ve));
306 }

References entity_initial, is_value_code, pips_assert, value_code, and value_tag.

Referenced by AddEntityToDeclarations(), append_data_current_stmt_buffer_to_declarations(), check_first_statement(), ComputeAddresses(), EndOfProcedure(), gfc2pips_computeAdressesOfArea(), gfc2pips_namespace(), gfc2pips_shiftAdressesOfArea(), outliner_file(), and outliner_independent_recursively().

+ Here is the caller graph for this function:

◆ enum_supporting_entities()

list enum_supporting_entities ( list  sel,
set  vt,
entity  e 
)
Parameters
selel
vtt

Definition at line 4025 of file type.c.

4026 {
4027  type t = entity_type(e);
4028  list ml = type_enum(t);
4029  list cm = list_undefined;
4030 
4031  pips_assert("type is of enum kind", type_enum_p(t));
4032 
4033  ifdebug(8) {
4034  pips_debug(8, "Begin: ");
4035  print_entities(sel);
4036  fprintf(stderr, "\n\n");
4037  }
4038 
4039  for(cm = ml; !ENDP(cm); POP(cm)) {
4040  entity m = ENTITY(CAR(cm));
4041  value v = entity_initial(m);
4042  symbolic s = value_symbolic(v);
4043 
4044  pips_assert("m is an enum member", value_symbolic_p(v));
4045 
4047  }
4048 
4049  ifdebug(8) {
4050  pips_debug(8, "End: ");
4051  print_entities(sel);
4052  fprintf(stderr, "\n\n");
4053  }
4054 
4055  return sel;
4056 }
list constant_expression_supporting_entities(list sel, set vt, expression e)
C version.
Definition: type.c:4181
#define value_symbolic(x)
Definition: ri.h:3070
#define symbolic_expression(x)
Definition: ri.h:2597

References CAR, constant_expression_supporting_entities(), ENDP, ENTITY, entity_initial, entity_type, fprintf(), ifdebug, list_undefined, pips_assert, pips_debug, POP, print_entities(), symbolic_expression, type_enum, type_enum_p, value_symbolic, and value_symbolic_p.

Referenced by generic_constant_expression_supporting_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enum_supporting_references()

list enum_supporting_references ( list  srl,
entity  e 
)

ifdebug(9) {

pips_debug(8, "Begin: ");

print_references(srl);

fprintf(stderr, "\n");

}

ifdebug(9) {

pips_debug(8, "End: ");

print_references(srl);

fprintf(stderr, "\n");

}

Parameters
srlrl

Definition at line 4415 of file type.c.

4416 {
4417  type t = entity_type(e);
4418  list ml = type_enum(t);
4419  list cm = list_undefined;
4420 
4421  pips_assert("type is of enum kind", type_enum_p(t));
4422 
4423  // FI: to avoid cycles betwen librairies ri-util and prettyprint
4424  /* ifdebug(9) { */
4425  /* pips_debug(8, "Begin: "); */
4426  /* print_references(srl); */
4427  /* fprintf(stderr, "\n"); */
4428  /* } */
4429 
4430  for(cm = ml; !ENDP(cm); POP(cm)) {
4431  entity m = ENTITY(CAR(cm));
4432  value v = entity_initial(m);
4433  symbolic s = value_symbolic(v);
4434 
4435  pips_assert("m is an enum member", value_symbolic_p(v));
4436 
4438  }
4439 
4440  // FI: to avoid cycles betwen librairies ri-util and prettyprint
4441  /* ifdebug(9) { */
4442  /* pips_debug(8, "End: "); */
4443  /* print_references(srl); */
4444  /* fprintf(stderr, "\n"); */
4445  /* } */
4446 
4447  return srl;
4448 }

References CAR, constant_expression_supporting_references(), ENDP, ENTITY, entity_initial, entity_type, list_undefined, pips_assert, POP, symbolic_expression, type_enum, type_enum_p, value_symbolic, and value_symbolic_p.

Referenced by constant_expression_supporting_references().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enum_type_p()

bool enum_type_p ( type  t)

Returns true if t is of type derived and if the derived type is a enum.

Example : enum foo var;

FI: Could be unified with the prevous two functions, struct_type_p() and union_type_p()

Note: different from type_enum_p

Definition at line 3172 of file type.c.

3173 {
3174  bool enum_p = false;
3175  if(derived_type_p(t)) {
3177  entity dte = basic_derived(b);
3178  type dt = entity_type(dte);
3179  enum_p = type_enum_p(dt);
3180  }
3181  return enum_p;
3182 }
bool derived_type_p(type t)
Returns true if t is of type struct, union or enum.
Definition: type.c:3104

References basic_derived, derived_type_p(), entity_type, type_enum_p, type_variable, and variable_basic.

Referenced by rename_variable_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ error_reset_current_module_entity()

void error_reset_current_module_entity ( void  )

To be called by an error management routine only.

Definition at line 109 of file static.c.

110 {
113 }
void reset_current_module_declarations()
Definition: static.c:136
static entity current_module_entity
static variables and related access functions concerning the current module
Definition: static.c:49

References current_module_entity, entity_undefined, and reset_current_module_declarations().

Referenced by c_parser_error(), ParserError(), and reset_static_phase_variables().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ error_reset_current_module_statement()

void error_reset_current_module_statement ( void  )

To be called by an error management routine only.

Definition at line 234 of file static.c.

235 {
239 }
static statement current_module_statement
used to retrieve the intraprocedural effects of the current module
Definition: static.c:153
static statement stacked_current_module_statement
Definition: static.c:154

References current_module_statement, reset_current_module_declarations(), stacked_current_module_statement, and statement_undefined.

Referenced by AbortEntries(), and reset_static_phase_variables().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EvalBinaryOp()

value EvalBinaryOp ( int  t,
list  la 
)

t defines the operator and la is a list to two sub-expressions.

Integer and floatint point constants are evaluated.

FI: lazy...

OK for Fortran Logical? Int value or logical value?

Parameters
laa

Definition at line 385 of file eval.c.

386 {
387  value v;
388  long long int i_arg_l = 0, i_arg_r = 0;
389  double f_arg_l, f_arg_r;
390  bool int_p = true;
391 
392  pips_assert("non empty list", la != NIL);
393 
394  v = EvalExpression(EXPRESSION(CAR(la)));
396  i_arg_l = constant_int(value_constant(v));
397  f_arg_l = i_arg_l;
398  free_value(v);
399  }
400  else if (value_constant_p(v) && constant_float_p(value_constant(v))) {
401  int_p = false;
402  f_arg_l = constant_float(value_constant(v));
403  }
404  else
405  return v;
406 
407  la = CDR(la);
408 
409  pips_assert("non empty list", la != NIL);
410  v = EvalExpression(EXPRESSION(CAR(la)));
411 
413  i_arg_r = constant_int(value_constant(v));
414  f_arg_r = i_arg_r;
415  }
416  else if (value_constant_p(v) && constant_float_p(value_constant(v))) {
417  f_arg_r = constant_float(value_constant(v));
418  int_p = false;
419  }
420  else
421  return v;
422 
423  switch (t) {
424  case MINUS:
425  if(int_p)
426  constant_int(value_constant(v)) = i_arg_l-i_arg_r;
427  else
428  constant_float(value_constant(v)) = i_arg_l-i_arg_r;
429  break;
430  case PLUS:
431  if(int_p)
432  constant_int(value_constant(v)) = i_arg_l+i_arg_r;
433  else
434  constant_float(value_constant(v)) = f_arg_l+f_arg_r;
435  break;
436  case STAR:
437  if(int_p)
438  constant_int(value_constant(v)) = i_arg_l*i_arg_r;
439  else
440  constant_float(value_constant(v)) = f_arg_l*f_arg_r;
441  break;
442  case SLASH:
443  if(int_p) {
444  if (i_arg_r != 0)
445  constant_int(value_constant(v)) = i_arg_l/i_arg_r;
446  else {
447  pips_user_error("[EvalBinaryOp] zero divide\n");
448  }
449  }
450  else {
451  if (f_arg_r != 0)
452  constant_float(value_constant(v)) = f_arg_l/f_arg_r;
453  else {
454  pips_user_error("[EvalBinaryOp] zero divide\n");
455  }
456  }
457  break;
458  case MOD:
459  if(int_p) {
460  if (i_arg_r != 0)
461  constant_int(value_constant(v)) = i_arg_l%i_arg_r;
462  else {
463  pips_user_error("[EvalBinaryOp] zero divide\n");
464  }
465  }
466  else {
467  if (f_arg_r != 0) {
468  free_value(v);
470  }
471  else {
472  pips_user_error("[EvalBinaryOp] zero divide\n");
473  }
474  }
475  break;
476  case POWER:
477  if(int_p) {
478  if (i_arg_r >= 0)
479  constant_int(value_constant(v)) = ipow(i_arg_l,i_arg_r);
480  else {
481  free_value(v);
483  }
484  }
485  else {
486  /* FI: lazy... */
487  free_value(v);
489  }
490  break;
491  /*
492  * Logical operators should return logical values...
493  */
494  case EQ:
495  if(int_p)
496  constant_int(value_constant(v)) = i_arg_l==i_arg_r;
497  else
498  constant_int(value_constant(v)) = f_arg_l==f_arg_r;
499  break;
500  case NE:
501  if(int_p)
502  constant_int(value_constant(v)) = i_arg_l!=i_arg_r;
503  else
504  constant_int(value_constant(v)) = f_arg_l!=f_arg_r;
505  break;
506  case EQV:
507  if(int_p)
508  constant_int(value_constant(v)) = i_arg_l==i_arg_r;
509  else
510  constant_int(value_constant(v)) = f_arg_l==f_arg_r;
511  break;
512  case NEQV:
513  if(int_p)
514  constant_int(value_constant(v)) = i_arg_l!=i_arg_r;
515  else
516  constant_int(value_constant(v)) = f_arg_l!=f_arg_r;
517  break;
518  case GT:
519  if(int_p)
520  constant_int(value_constant(v)) = i_arg_l>i_arg_r;
521  else
522  constant_int(value_constant(v)) = f_arg_l>f_arg_r;
523  break;
524  case LT:
525  if(int_p)
526  constant_int(value_constant(v)) = i_arg_l<i_arg_r;
527  else
528  constant_int(value_constant(v)) = f_arg_l<f_arg_r;
529  break;
530  case GE:
531  if(int_p)
532  constant_int(value_constant(v)) = i_arg_l>=i_arg_r;
533  else
534  constant_int(value_constant(v)) = f_arg_l>=f_arg_r;
535  break;
536  /* OK for Fortran Logical? Int value or logical value? */
537  case OR:
538  if(int_p)
539  constant_int(value_constant(v)) = (i_arg_l!=0)||(i_arg_r!=0);
540  else
541  constant_int(value_constant(v)) = (f_arg_l!=0)||(f_arg_r!=0);
542  break;
543  case AND:
544  if(int_p)
545  constant_int(value_constant(v)) = (i_arg_l!=0)&&(i_arg_r!=0);
546  else
547  constant_int(value_constant(v)) = (f_arg_l!=0)&&(f_arg_r!=0);
548  break;
549  case BITWISE_OR:
550  if(int_p)
551  constant_int(value_constant(v)) = i_arg_l|i_arg_r;
552  else
553  pips_user_error("Bitwise or cannot have floating point arguments\n");
554  break;
555  case BITWISE_AND:
556  if(int_p)
557  constant_int(value_constant(v)) = i_arg_l&i_arg_r;
558  else
559  pips_user_error("Bitwise and cannot have floating point arguments\n");
560  break;
561  case BITWISE_XOR:
562  if(int_p)
563  constant_int(value_constant(v)) = i_arg_l^i_arg_r;
564  else
565  pips_user_error("Bitwise xor cannot have floating point arguments\n");
566  break;
567  case LEFT_SHIFT:
568  if(int_p)
569  constant_int(value_constant(v)) = i_arg_l<<i_arg_r;
570  else {
571  free_value(v);
573  }
574  break;
575  case RIGHT_SHIFT:
576  if(int_p)
577  constant_int(value_constant(v)) = i_arg_l>>i_arg_r;
578  else {
579  free_value(v);
581  }
582  break;
583  default:
584  free_value(v);
586  }
587 
588  return(v);
589 }
value make_value(enum value_utype tag, void *val)
Definition: ri.c:2832
void free_value(value p)
Definition: ri.c:2787
#define OR
Definition: genspec.h:89
#define STAR
Definition: genspec.h:91
#define AND
Definition: genspec.h:88
#define BITWISE_XOR
Definition: operator.h:54
#define LEFT_SHIFT
Definition: operator.h:56
#define GE
Definition: operator.h:34
#define RIGHT_SHIFT
Definition: operator.h:55
#define MINUS
Definition: operator.h:42
#define NE
Definition: operator.h:38
#define NEQV
Definition: operator.h:39
#define BITWISE_AND
Definition: operator.h:52
#define LT
Definition: operator.h:37
#define BITWISE_OR
Definition: operator.h:53
#define GT
Definition: operator.h:35
#define EQ
Definition: operator.h:32
#define EQV
Definition: operator.h:33
value EvalExpression(expression e)
Evaluate statically an expression.
Definition: eval.c:108
#define value_constant(x)
Definition: ri.h:3073
#define constant_float_p(x)
Definition: ri.h:851
#define constant_int(x)
Definition: ri.h:850
#define constant_int_p(x)
Definition: ri.h:848
#define constant_float(x)
Definition: ri.h:853
#define PLUS
Definition: sc_gram.c:200

References AND, BITWISE_AND, BITWISE_OR, BITWISE_XOR, CAR, CDR, constant_float, constant_float_p, constant_int, constant_int_p, EQ, EQV, EvalExpression(), EXPRESSION, free_value(), GE, GT, ipow(), is_value_unknown, LEFT_SHIFT, LT, make_value(), MINUS, MOD, NE, NEQV, NIL, OR, pips_assert, pips_user_error, PLUS, POWER, RIGHT_SHIFT, SLASH, STAR, value_constant, and value_constant_p.

Referenced by EvalIntrinsic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EvalCall()

value EvalCall ( call  c)

only calls to constant, symbolic or intrinsic functions might be evaluated.

recall that intrinsic functions are not known.

SG: it may be better not to evaluate symbolic and keep their symbolic name

it might be an intrinsic function

it might be an intrinsic function

Definition at line 170 of file eval.c.

171 {
172  value vout, vin;
173  entity f;
174 
175  f = call_function(c);
176  vin = entity_initial(f);
177 
178  if (value_undefined_p(vin))
179  pips_internal_error("undefined value for %s", entity_name(f));
180 
181  switch (value_tag(vin)) {
182  case is_value_intrinsic:
183  vout = EvalIntrinsic(f, call_arguments(c));
184  break;
185  case is_value_constant:
186  vout = EvalConstant((value_constant(vin)));
187  break;
188  case is_value_symbolic:
189  /* SG: it may be better not to evaluate symbolic and keep their symbolic name */
190  if(get_bool_property("EVAL_SYMBOLIC_CONSTANT"))
192  else
193  vout = make_value_unknown();
194  break;
195  case is_value_unknown:
196  /* it might be an intrinsic function */
197  vout = EvalIntrinsic(f, call_arguments(c));
198  break;
199  case is_value_code:
200  vout = make_value_unknown();
201  break;
202  default:
203  pips_internal_error("Unexpected default case.");
204  vout = value_undefined;
205  }
206 
207  return vout;
208 }
value make_value_unknown(void)
Definition: ri.c:2847
value EvalConstant(constant c)
Constant c is returned as field of value v.
Definition: eval.c:235
value EvalIntrinsic(entity e, list la)
This function tries to evaluate a call to an intrinsic function.
Definition: eval.c:290
#define symbolic_constant(x)
Definition: ri.h:2599

References call_arguments, call_function, entity_initial, entity_name, EvalConstant(), EvalIntrinsic(), f(), get_bool_property(), is_value_code, is_value_constant, is_value_intrinsic, is_value_symbolic, is_value_unknown, make_value_unknown(), ParserError(), pips_internal_error, symbolic_constant, value_constant, value_symbolic, value_tag, value_undefined, and value_undefined_p.

Referenced by EvalSyntax().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EvalConditionalOp()

value EvalConditionalOp ( list  la)
Parameters
laa

Definition at line 309 of file eval.c.

310 {
311  value vout, v1, v2, v3;
312  _int arg1 = 0, arg2 = 0, arg3 = 0;
313  bool failed = false;
314 
315  pips_assert("Three arguments", gen_length(la)==3);
316 
317  v1 = EvalExpression(EXPRESSION(CAR(la)));
319  arg1 = constant_int(value_constant(v1));
320  else
321  failed = true;
322 
323  v2 = EvalExpression(EXPRESSION(CAR(CDR(la))));
325  arg2 = constant_int(value_constant(v2));
326  else
327  failed = true;
328 
329  v3 = EvalExpression(EXPRESSION(CAR(CDR(CDR(la)))));
331  arg3 = constant_int(value_constant(v3));
332  else
333  failed = true;
334 
335  if(failed)
337  else
339  make_constant(is_constant_int, (void *) (arg1? arg2: arg3)));
340 
341  free_value(v1);
342  free_value(v2);
343  free_value(v3);
344 
345  return vout;
346 }
constant make_constant(enum constant_utype tag, void *val)
Definition: ri.c:406
@ is_constant_int
Definition: ri.h:817

References CAR, CDR, constant_int, constant_int_p, EvalExpression(), EXPRESSION, free_value(), gen_length(), is_constant_int, is_value_constant, is_value_unknown, make_constant(), make_value(), NIL, pips_assert, value_constant, and value_constant_p.

Referenced by EvalIntrinsic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EvalConstant()

value EvalConstant ( constant  c)

Constant c is returned as field of value v.

Definition at line 235 of file eval.c.

236 {
238 
239  if(constant_int_p(c)) {
242  (void*) constant_int(c)));
243  }
244  else if(constant_float_p(c)) {
246  NULL);
248  v = make_value(is_value_constant, nc);
249  }
250  else if(constant_call_p(c)) {
251  entity e = constant_call(c);
252  type t = entity_type(e);
253  if(type_functional_p(t)) {
255  t = functional_result(f);
256  }
257  if(scalar_integer_type_p(t)) {
258  long long int val;
259  sscanf(entity_local_name(e), "%lld", &val);
262  (void*) val));
263  }
264  else if(float_type_p(t)) {
265  double val;
266  sscanf(entity_local_name(e), "%lg", &val);
268  NULL);
269  constant_float(nc) = val;
270  v = make_value(is_value_constant, nc);
271  }
272  else
275  }
276  else
279  return v;
280 }
bool scalar_integer_type_p(type)
Definition: type.c:3276
bool float_type_p(type)
Definition: type.c:3263
@ is_constant_litteral
Definition: ri.h:820
@ is_constant_float
Definition: ri.h:818
#define constant_call_p(x)
Definition: ri.h:860
#define constant_call(x)
Definition: ri.h:862

References constant_call, constant_call_p, constant_float, constant_float_p, constant_int, constant_int_p, entity_local_name(), entity_type, f(), float_type_p(), functional_result, is_constant_float, is_constant_int, is_constant_litteral, is_value_constant, make_constant(), make_value(), NIL, scalar_integer_type_p(), type_functional, type_functional_p, and value_undefined.

Referenced by EvalCall().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EvalExpression()

value EvalExpression ( expression  e)

cproto-generated files

eval.c

cproto-generated files

If the expression can be evaluated regardless of the store and regardless of the target machine, and if the expression type is integer or float, return a constant value. Else, return a value unknown.

To accept dependencies on target architecture, set the property "EVAL_SIZEOF" to true.

A new value is always allocated.

If you are not interested in the object value, but simply to the integer value of a constant expression, see expression_integer_value().

This function is not fully implemented. It does not take care of logical (apparently) and string expressions. Some intrinsic operators are not evaluated. Floating point expressions are not as well covered as integer expression.

It is not clear if the evaluation of floating point expressions should be considered target dependent (e.g. for GPU code) or if the IEEE floating point standard is considered strongly enforced.

If information about the store used to evaluate the expression, i.e. preconditions, use precondition_minmax_of_expression()

The algorithm is built on a recursive analysis of the expression structure. Lower level functions are called until basic atoms are reached. The success of basic atom evaluation depend on the atom type:

reference: right now, the evaluation fails because we do not compute predicates on variables, unless the variable type is qualified by const.

call: a call to a user function is not evaluated. a call to an intrinsic function is successfully evaluated if arguments can be evaluated. a call to a constant function is evaluated if its basic type is integer.

range: a range is not evaluated.

cproto-generated files

This file contains a set of functions to evaluate integer constant expressions. The algorithm is built on a recursive analysis of the expression structure. Lower level functions are called until basic atoms are reached. The succes of basic atom evaluation depend on the atom type:

reference: right now, the evaluation fails because we do not compute predicates on variables.

call: a call to a user function is not evaluated. a call to an intrinsic function is successfully evaluated if arguments can be evaluated. a call to a constant function is evaluated if its basic type is integer.

range: a range is not evaluated.

Definition at line 108 of file eval.c.

109 {
110  return EvalSyntax(expression_syntax(e));
111 }
value EvalSyntax(syntax s)
Definition: eval.c:113

References EvalSyntax(), and expression_syntax.

Referenced by cell_is_xxx_p(), EvalBinaryOp(), EvalConditionalOp(), EvalNaryOp(), EvalSyntax(), EvalUnaryOp(), expression_integer_value(), ExpressionToInt(), extended_integer_constant_expression_p(), extended_integer_constant_expression_p_to_int(), InitializeEnumMemberValues(), MakeDataValueSet(), MakeValueSymbolic(), offset_array_reference(), offset_points_to_cell(), reference_to_points_to_translations(), reference_to_type(), simplified_reference(), subscript_expressions_to_constant_subscript_expressions(), xml_Argument(), xml_AssignArgument(), xml_expression(), and xml_Transposition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EvalIntrinsic()

value EvalIntrinsic ( entity  e,
list  la 
)

This function tries to evaluate a call to an intrinsic function.

right now, we only try to evaluate unary and binary intrinsic functions, ie. Fortran operators.

e is the intrinsic function.

la is the list of arguments.

Parameters
laa

Definition at line 290 of file eval.c.

291 {
292  value v;
293  int token;
294 
295  if ((token = IsUnaryOperator(e)) > 0)
296  v = EvalUnaryOp(token, la);
297  else if ((token = IsBinaryOperator(e)) > 0)
298  v = EvalBinaryOp(token, la);
299  else if ((token = IsNaryOperator(e)) > 0)
300  v = EvalNaryOp(token, la);
301  else if (ENTITY_CONDITIONAL_P(e))
302  v = EvalConditionalOp(la);
303  else
305 
306  return(v);
307 }
int IsUnaryOperator(entity e)
Definition: eval.c:632
value EvalNaryOp(int t, list la)
Definition: eval.c:591
value EvalBinaryOp(int t, list la)
t defines the operator and la is a list to two sub-expressions.
Definition: eval.c:385
value EvalConditionalOp(list la)
Definition: eval.c:309
int IsNaryOperator(entity e)
Definition: eval.c:746
value EvalUnaryOp(int t, list la)
Definition: eval.c:349
int IsBinaryOperator(entity e)
FI: These string constants are defined in ri-util.h and the tokens in ri-util/operator....
Definition: eval.c:660

References ENTITY_CONDITIONAL_P, EvalBinaryOp(), EvalConditionalOp(), EvalNaryOp(), EvalUnaryOp(), is_value_unknown, IsBinaryOperator(), IsNaryOperator(), IsUnaryOperator(), make_value(), and NIL.

Referenced by EvalCall().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EvalNaryOp()

value EvalNaryOp ( int  t,
list  la 
)

2 operands at least are needed

Parameters
laa

Definition at line 591 of file eval.c.

592 {
595  int new_arg = 0;
596  bool first_arg_p = true;
597 
598  /* 2 operands at least are needed */
599  assert(la != NIL && CDR(la) != NIL);
600 
601  MAP(EXPRESSION, e, {
602  v = EvalExpression(e);
604  new_arg = constant_int(value_constant(v));
605  if (first_arg_p) {
606  first_arg_p = false;
607  w = v;
608  }
609  else {
610  switch(t) {
611  case MAXIMUM:
613  new_arg);
614  break;
615  case MINIMUM:
617  new_arg);
618  break;
619  default:
620  return v;
621  }
622  free_value(v);
623  }
624  }
625  else
626  return(v);
627  }, la);
628 
629  return(w);
630 }
#define assert(ex)
Definition: newgen_assert.h:41

References assert, CDR, constant_int, constant_int_p, EvalExpression(), EXPRESSION, free_value(), MAP, MAX, MAXIMUM, MIN, MINIMUM, NIL, value_constant, value_constant_p, and value_undefined.

Referenced by EvalIntrinsic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EvalNormalized()

bool EvalNormalized ( normalized  n,
int pv 
)
Parameters
pvv

Definition at line 404 of file normalize.c.

407 {
408  if (normalized_linear_p(n)) {
410  if (vect_size(v) == 1 && var_of(v) == TCST) {
411  *pv = VALUE_TO_INT(val_of(v));
412  return(true);
413  }
414  }
415 
416  return(false);
417 }
#define VALUE_TO_INT(val)
int vect_size(Pvecteur v)
package vecteur - reductions
Definition: reductions.c:47
#define normalized_linear_p(x)
Definition: ri.h:1779
#define val_of(varval)
struct Svecteur * Pvecteur

References normalized_linear, normalized_linear_p, TCST, val_of, VALUE_TO_INT, var_of, and vect_size().

Referenced by binary_to_normalized(), loop_increment_value(), NormalizeIntrinsic(), and words_numerical_dimension().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EvalSizeofexpression()

value EvalSizeofexpression ( sizeofexpression  soe)
Parameters
soeoe

Definition at line 210 of file eval.c.

211 {
212  type t = type_undefined;
214  _int i;
215 
218 
219  t = expression_to_type(e);
220  }
221  else {
222  t = sizeofexpression_type(soe);
223  }
224 
225  i = type_memory_size(t);
227 
229  free_type(t);
230 
231  return v;
232 }
value make_value_constant(constant _field_)
Definition: ri.c:2841
constant make_constant_int(intptr_t _field_)
Definition: ri.c:409
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
int type_memory_size(type)
Definition: size.c:248
#define sizeofexpression_type(x)
Definition: ri.h:2406
#define sizeofexpression_expression(x)
Definition: ri.h:2409
#define sizeofexpression_expression_p(x)
Definition: ri.h:2407

References expression_to_type(), free_type(), make_constant_int(), make_value_constant(), sizeofexpression_expression, sizeofexpression_expression_p, sizeofexpression_type, type_memory_size(), type_undefined, and value_undefined.

Referenced by EvalSyntax(), expression_constant(), expression_to_int(), and integer_expression_to_transformer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EvalSyntax()

value EvalSyntax ( syntax  s)

Is it a reference to a const variable?

SG: sizeof is architecture dependant, it is better not to evaluate it by default

Definition at line 113 of file eval.c.

114 {
116 
117  switch (syntax_tag(s)) {
118  case is_syntax_reference: {
119  /* Is it a reference to a const variable? */
121  entity var = reference_variable(r);
122  if(const_variable_p(var)) {
123  value i = entity_initial(var);
124  if(value_constant_p(i))
125  v = copy_value(entity_initial(var));
126  else if(value_expression_p(i)) {
128  v = EvalExpression(ie);
129  }
130  else
131  v = make_value_unknown();
132  }
133  else
134  v = make_value_unknown();
135  break;
136  }
137  case is_syntax_range:
138  v = make_value_unknown();
139  break;
140  case is_syntax_call:
141  v = EvalCall((syntax_call(s)));
142  break;
143  case is_syntax_cast:
144  v = make_value_unknown();
145  break;
147  /* SG: sizeof is architecture dependant, it is better not to
148  evaluate it by default */
149  if(get_bool_property("EVAL_SIZEOF"))
151  else
152  v = make_value_unknown();
153  break;
154  case is_syntax_subscript:
156  case is_syntax_va_arg:
157  v = make_value_unknown();
158  break;
159  default:
160  pips_internal_error("Unexpected syntax tag %d\n", syntax_tag(s));
161  abort();
162  }
163 
164  return v;
165 }
#define abort()
Definition: misc-local.h:53
value EvalCall(call c)
only calls to constant, symbolic or intrinsic functions might be evaluated.
Definition: eval.c:170
value EvalSizeofexpression(sizeofexpression soe)
Definition: eval.c:210
bool const_variable_p(entity)
Definition: variable.c:1687
#define syntax_tag(x)
Definition: ri.h:2727
@ is_syntax_application
Definition: ri.h:2697
@ is_syntax_cast
Definition: ri.h:2694
@ is_syntax_va_arg
Definition: ri.h:2698
@ is_syntax_reference
Definition: ri.h:2691
@ is_syntax_sizeofexpression
Definition: ri.h:2695
@ is_syntax_subscript
Definition: ri.h:2696
#define syntax_sizeofexpression(x)
Definition: ri.h:2742
#define value_expression_p(x)
Definition: ri.h:3080
#define value_expression(x)
Definition: ri.h:3082

References abort, const_variable_p(), copy_value(), entity_initial, EvalCall(), EvalExpression(), EvalSizeofexpression(), get_bool_property(), is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, make_value_unknown(), ParserError(), pips_internal_error, reference_variable, syntax_call, syntax_reference, syntax_sizeofexpression, syntax_tag, value_constant_p, value_expression, value_expression_p, and value_undefined.

Referenced by EvalExpression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EvalUnaryOp()

value EvalUnaryOp ( int  t,
list  la 
)
Parameters
laa

Definition at line 349 of file eval.c.

350 {
351  value vout, v;
352  int arg;
353 
354  assert(la != NIL);
355  v = EvalExpression(EXPRESSION(CAR(la)));
357  arg = constant_int(value_constant(v));
358  else
359  return(v);
360 
361  if (t == MINUS) {
362  constant_int(value_constant(v)) = -arg;
363  vout = v;
364  }
365  else if (t == PLUS) {
366  constant_int(value_constant(v)) = arg;
367  vout = v;
368  }
369  else if (t == NOT) {
370  constant_int(value_constant(v)) = arg!=0;
371  vout = v;
372  }
373  else {
374  free_value(v);
376  }
377 
378  return(vout);
379 }
#define NOT
Definition: operator.h:40

References assert, CAR, constant_int, constant_int_p, EvalExpression(), EXPRESSION, free_value(), is_value_unknown, make_value(), MINUS, NIL, NOT, PLUS, value_constant, and value_constant_p.

Referenced by EvalIntrinsic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ explicit_extern_entity_p()

bool explicit_extern_entity_p ( entity  module,
entity  e 
)

There are two cases for "extern"

  • The current module is a compilation unit and the entity is in the ram_shared list of the ram storage of the compilation unit.
  • The current module is a normal function and the entity has a global scope: this is not an explicit extern declaration.
Parameters
moduleodule

Definition at line 2016 of file entity.c.

2017 {
2018  /* There are two cases for "extern"
2019 
2020  - The current module is a compilation unit and the entity is in
2021  the ram_shared list of the ram storage of the compilation unit.
2022 
2023  - The current module is a normal function and the entity has a
2024  global scope: this is not an explicit extern declaration.
2025  */
2028 }
bool compilation_unit_entity_p(entity e)
Check if the given module entity is a compilation unit.
Definition: module.c:87
#define code_externs(x)
Definition: ri.h:790

References code_externs, compilation_unit_entity_p(), entity_initial, gen_in_list_p(), module, and value_code.

+ Here is the call graph for this function:

◆ expression_address_of_p()

bool expression_address_of_p ( expression  e)

Definition at line 420 of file expression.c.

421 {
422  bool address_p = false;
423  syntax s = expression_syntax(e);
424  if(syntax_call_p(s)) {
425  call c = syntax_call(s);
426  entity f = call_function(c);
428  address_p = true;
429  }
430  return address_p;
431 }

References call_function, ENTITY_ADDRESS_OF_P, expression_syntax, f(), syntax_call, and syntax_call_p.

Referenced by freia_reduction_variable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_allocatable_data_access_p()

bool expression_allocatable_data_access_p ( expression  e)

Check if an expression is a reference to an allocatable array.

Definition at line 95 of file allocatable.c.

95  {
96  // This must be a call
97  if(!expression_call_p(e)) {
98  return false;
99  }
100 
101  entity field_call = call_function(expression_call(e));
102  list args_list = call_arguments(expression_call(e));
103 
104  // This must be a call to "." and we must have args
105  if(!ENTITY_FIELD_P(field_call) || ENDP(args_list)) {
106  return false;
107  }
108 
109  // Check that we deal with an allocatable
110  expression allocatable_exp = CAR(args_list).e;
111  entity allocatable =
112  reference_variable(expression_reference(allocatable_exp));
113  if(!entity_allocatable_p(allocatable)) {
114  return false;
115  } else {
116  pips_assert("Allocatable shouldn't have any indices !",
117  ENDP(reference_indices(expression_reference(allocatable_exp))));
118  }
119 
120  // Check that it is the data field
121  expression field_exp = CAR(CDR(args_list)).e;
122  pips_assert("Allocatable field shouldn't have any indices !",
124  entity field = reference_variable(expression_reference(field_exp));
130  strlen(ALLOCATABLE_UBOUND_PREFIX))) {
131  return false;
132  }
133 
134  return true;
135 }
#define ALLOCATABLE_UBOUND_PREFIX
#define ALLOCATABLE_LBOUND_PREFIX
bool entity_allocatable_p(entity e)
Check if an entity is an allocatable.
Definition: allocatable.c:72

References ALLOCATABLE_LBOUND_PREFIX, ALLOCATABLE_UBOUND_PREFIX, call_arguments, call_function, CAR, CDR, ENDP, entity_allocatable_p(), ENTITY_FIELD_P, entity_user_name(), expression_call(), expression_call_p(), expression_reference(), pips_assert, reference_indices, reference_variable, and same_stringn_p.

Referenced by ensure_comment_consistency().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_application()

application expression_application ( expression  e)

Definition at line 485 of file expression.c.

486 {
488 }
#define syntax_application(x)
Definition: ri.h:2748

References expression_syntax, and syntax_application.

Referenced by expression_to_transformer().

+ Here is the caller graph for this function:

◆ expression_application_p()

bool expression_application_p ( expression  e)

Duplicate bool expression_subscript_p(expression e) { return(syntax_subscript_p(expression_syntax(e))); }.

subscript expression_subscript(expression e) { return(syntax_subscript(expression_syntax(e))); }

Definition at line 480 of file expression.c.

481 {
483 }
#define syntax_application_p(x)
Definition: ri.h:2746

References expression_syntax, and syntax_application_p.

Referenced by expression_to_transformer().

+ Here is the caller graph for this function:

◆ expression_basic()

basic expression_basic ( expression  expr)

should be int

How to void a memory leak? Where can we find a basic int? A static variable?

Parameters
exprxpr

Definition at line 1115 of file type.c.

1116 {
1117  syntax the_syntax=expression_syntax(expr);
1118  basic b = basic_undefined;
1119 
1120  switch(syntax_tag(the_syntax))
1121  {
1122  case is_syntax_reference:
1124  break;
1125  case is_syntax_range:
1126  /* should be int */
1127  b = expression_basic(range_lower(syntax_range(the_syntax)));
1128  break;
1129  case is_syntax_call:
1130  /*
1131  * here is a little problem with pips... every intrinsics are
1132  * overloaded, what is not exactly what is desired...
1133  */
1134  return(entity_basic(call_function(syntax_call(the_syntax))));
1135  break;
1136  case is_syntax_cast:
1137  {
1138  cast c = syntax_cast(the_syntax);
1139  type t = cast_type(c);
1140  type ut = ultimate_type(t);
1141  b = variable_basic(type_variable(ut));
1142  pips_assert("Type is \"variable\"", type_variable_p(ut));
1143  break;
1144  }
1146  {
1147  /* How to void a memory leak? Where can we find a basic int? A static variable? */
1148  b = make_basic(is_basic_int, (void *) 4);
1149  break;
1150  }
1151  default:
1152  pips_internal_error("unexpected syntax tag");
1153  break;
1154  }
1155 
1156  return b;
1157 }
basic expression_basic(expression expr)
Definition: type.c:1115
#define syntax_range(x)
Definition: ri.h:2733
#define range_lower(x)
Definition: ri.h:2288

References basic_undefined, call_function, cast_type, entity_basic(), expression_basic(), expression_syntax, is_basic_int, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, make_basic(), pips_assert, pips_internal_error, range_lower, reference_variable, syntax_call, syntax_cast, syntax_range, syntax_reference, syntax_tag, type_variable, type_variable_p, ultimate_type(), and variable_basic.

Referenced by can_terapixify_expression_p(), change_basic_if_needed(), expression_basic(), suggest_basic_for_expression(), and words_nullary_op_c().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_brace_p()

bool expression_brace_p ( expression  e)

predicates and short cut accessors on expressions

Definition at line 407 of file expression.c.

407  {
408  if(expression_call_p(e)) {
409  call c = expression_call(e);
411  }
412  return false;
413 }

References call_function, ENTITY_BRACE_INTRINSIC_P, expression_call(), and expression_call_p().

Referenced by do_convert_this_array_to_pointer_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_call()

call expression_call ( expression  e)

Definition at line 445 of file expression.c.

446 {
447  return(syntax_call(expression_syntax(e)));
448 }

References expression_syntax, and syntax_call.

Referenced by address_of_scalar(), any_expression_to_transformer(), atomize_call(), atomize_call_filter(), atomize_call_statement(), atomize_this_expression(), cleanup_subscript_pre(), compact_phi_functions(), compute_points_to_binded_set(), copy_from_statement(), copy_to_statement(), dereference_expression(), distance_between_expression(), do_array_to_pointer_patch_call_expression(), do_brace_expression_to_statements(), do_brace_expression_to_updated_type(), do_expression_reduction(), do_group_constant_entity(), do_linearize_array_init(), do_linearize_array_manage_callers(), do_linearize_prepatch_subscript(), do_linearize_remove_dereferencment_walker(), do_loop_nest_unswitching(), do_reduction_detection(), do_reduction_propagation(), do_simplify_constant_address_expression(), do_split_structure(), do_split_structure_return_hook_walker(), expr_cse_flt(), expression_allocatable_data_access_p(), expression_brace_p(), expression_equal_or_opposite_p(), expression_field_p(), expression_minmax_p(), expression_opposite_p(), expression_string_constant(), expression_string_constant_p(), expression_to_transformer(), filter_variables_in_pragma_expr(), find_entities_to_wrap(), for_to_do_loop_conversion(), freia_alloc_stat_p(), freia_reduction_variable(), get_complement_expression(), guess_late_read_effect_on_entity(), guess_loop_increment(), guess_loop_increment_walker(), guess_loop_lower_bound(), initialization_list_to_statements(), make_address_of_expression(), make_loadsave_statement(), make_send_receive_conversion(), pragma_omp_merge_expr(), pragma_omp_p(), pragma_PRAGMA_DISTRIBUTED_p(), reference_filter(), remove_expression_from_comma_list(), remove_simple_scalar_pointers(), remove_unread_variable(), reorder_pointer_expression(), replace_entity_by_expression_expression_walker(), replace_instruction_similar_to_pattern(), rssp_ref(), simplify_complex_expression(), simplify_minmax_expression(), skip_field_and_cast_expression(), statement_has_omp_parallel_directive_p(), statement_phi_function_p(), statement_remove_omp_clauses(), terapix_loop_optimizer(), terapix_normalize_tests(), terapixify_loops(), two_addresses_code_generator(), two_addresses_code_generator_split_p(), user_function_call_to_transformer(), and zero_expression_p().

◆ expression_call_p()

bool expression_call_p ( expression  e)

Definition at line 415 of file expression.c.

416 {
417  return(syntax_call_p(expression_syntax(e)));
418 }

References expression_syntax, and syntax_call_p.

Referenced by actual_label_replacement_p(), address_of_scalar(), alloc_instrumentation(), any_expression_to_transformer(), atomize_call(), atomize_call_filter(), atomize_call_statement(), atomize_this_expression(), brace_expression_p(), c_brace_expression_p(), change_basic_if_needed(), cleanup_subscript_pre(), comma_expression_p(), complex_constant_expression_p(), compute_points_to_binded_set(), condition_to_transformer(), controlize_statement(), copy_from_statement(), copy_to_statement(), dereference_expression(), do_array_to_pointer_patch_call_expression(), do_expression_reduction(), do_group_constant_entity(), do_linearize_array_init(), do_linearize_array_manage_callers(), do_linearize_prepatch_subscript(), do_linearize_remove_dereferencment_walker(), do_reduction_detection(), do_reduction_propagation(), do_simplify_constant_address_expression(), expr_flt(), expression_allocatable_data_access_p(), expression_brace_p(), expression_field_p(), expression_implied_do_p(), expression_list_directed_p(), expression_minmax_p(), expression_reference_number(), expression_string_constant_p(), expression_to_int(), expression_to_transformer(), expression_try_find_size(), find_entities_to_wrap(), find_implicit_goto(), find_target_position(), freia_alloc_stat_p(), get_complement_expression(), guess_late_read_effect_on_entity(), guess_loop_increment(), guess_loop_increment_walker(), guess_loop_lower_bound(), initialization_list_to_statements(), inline_expression(), interprocedural_abc_expression(), is_this_op(), logical_operator_expression_p(), make_address_of_expression(), MakeReturn(), number_of_initial_values(), number_of_operators_flt(), parser_macro_expansion(), pragma_omp_p(), pragma_PRAGMA_DISTRIBUTED_p(), process_static_initialization(), reference_filter(), regenerate_call(), relational_expression_p(), remove_expression_from_comma_list(), remove_unread_variable(), reorder_pointer_expression(), replace_entity_by_expression_expression_walker(), replace_subscript(), rssp_ref(), sentence_data_statement(), simplify_complex_expression(), SizeOfArray(), statement_has_omp_parallel_directive_p(), statement_phi_function_p(), statement_remove_omp_clauses(), store_initial_value(), switch_specific_cmplx(), switch_specific_dcmplx(), terapix_loop_optimizer(), terapix_normalize_tests(), terapixify_loops(), two_addresses_code_generator(), two_addresses_code_generator_split_p(), words_assign_op(), words_dimension(), words_infix_binary_op(), words_infix_nary_op(), words_regular_call(), words_subexpression(), and zero_expression_p().

◆ expression_cast()

cast expression_cast ( expression  e)

Definition at line 455 of file expression.c.

456 {
457  return(syntax_cast(expression_syntax(e)));
458 }

References expression_syntax, and syntax_cast.

Referenced by condition_to_transformer(), expression_null_p(), expression_to_transformer(), MakeCaseStatement(), and words_subexpression().

+ Here is the caller graph for this function:

◆ expression_cast_p()

bool expression_cast_p ( expression  e)

Definition at line 450 of file expression.c.

451 {
452  return(syntax_cast_p(expression_syntax(e)));
453 }

References expression_syntax, and syntax_cast_p.

Referenced by condition_to_transformer(), expression_null_p(), expression_to_transformer(), MakeCaseStatement(), and words_subexpression().

+ Here is the caller graph for this function:

◆ expression_constant()

constant expression_constant ( expression  exp)

This function returns a "constant" object if the expression is a constant such as 10, -11 or 2.345 or "foo".

Expressions such as "5+0" or "sizeof(int)" or "m", with m defined as "const int m = 2;" or "M" with M defined as PARAMETER do not qualify. However their value is constant, i.e. store independent, and can be evaluated using EvalExpression().

FI: difficult to make a decision here. We may have a constant expression that cannot be evaluated as a constant statically by PIPS. What is the semantics of expression_constant_p()?

&& get_bool_property("EVAL_SIZEOF")

Too bad we need a function located in eval.c ...

Might be a reference to a scalar constant.

Parameters
expxp

Definition at line 2347 of file expression.c.

2348 {
2350  if(syntax_call_p(s))
2351  {
2354  switch(value_tag(v))
2355  {
2356  case is_value_constant:
2357  return value_constant(v);
2358  case is_value_intrinsic: {
2359  entity op = call_function(c);
2362  }
2363  default:
2364  ;
2365  }
2366  }
2367  else if(false && syntax_sizeofexpression_p(s)) {
2369  /* FI: difficult to make a decision here. We may have a constant
2370  expression that cannot be evaluated as a constant statically by
2371  PIPS. What is the semantics of expression_constant_p()? */
2372  if(sizeofexpression_type_p(soe) /* && get_bool_property("EVAL_SIZEOF")*/ ) {
2373  /* Too bad we need a function located in eval.c ... */
2374  value v = EvalSizeofexpression(soe);
2375  if(value_constant_p(v)) { // Should always be true...
2376  constant c = value_constant(v);
2378  free_value(v);
2379  return c;
2380  }
2381  }
2382  }
2383  else if(false && syntax_reference_p(s)) {
2384  /* Might be a reference to a scalar constant. */
2385  reference r = syntax_reference(s);
2386  entity v = reference_variable(r);
2387  if(const_variable_p(v)) {
2388  value val = entity_initial(v);
2389  if(value_constant_p(val)) {
2391  return c;
2392  }
2393  }
2394  }
2395  return constant_undefined;
2396 }
constant copy_constant(constant p)
CONSTANT.
Definition: ri.c:359
#define ENTITY_UNARY_MINUS_P(e)
#define ENTITY_UNARY_PLUS_P(e)
#define binary_call_lhs(c)
constant expression_constant(expression exp)
This function returns a "constant" object if the expression is a constant such as 10,...
Definition: expression.c:2347
#define syntax_sizeofexpression_p(x)
Definition: ri.h:2740
#define sizeofexpression_type_p(x)
Definition: ri.h:2404
#define constant_undefined
Definition: ri.h:802

References binary_call_lhs, call_function, const_variable_p(), constant_undefined, copy_constant(), entity_initial, ENTITY_UNARY_MINUS_P, ENTITY_UNARY_PLUS_P, EvalSizeofexpression(), exp, expression_syntax, free_value(), is_value_constant, is_value_intrinsic, reference_variable, sizeofexpression_type_p, syntax_call, syntax_call_p, syntax_reference, syntax_reference_p, syntax_sizeofexpression, syntax_sizeofexpression_p, value_constant, value_constant_p, and value_tag.

Referenced by expression_constant_p(), and words_dimension().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_constant_p()

bool expression_constant_p ( expression  exp)

================================================================

Overlap Management Module for HPFC Fabien Coelho, August 1993.

HPFC module by Fabien COELHO.

bool expression_constant_p(expression exp) Returns true if "exp" is an (integer) constant value.

Note : A negativePositive constant can be represented with a call to the unary minus/plus intrinsic function upon a positive value.

See below extended_expression_constant_p() for a more general function.

Parameters
expxp

Definition at line 2453 of file expression.c.

2454 {
2456 }
#define constant_undefined_p(x)
Definition: ri.h:803

Referenced by convert_bound_expression(), expression_equal_integer_p(), expression_null_p(), expression_string_constant_p(), expression_to_float(), expression_to_int(), expression_to_polynome(), have_null_value_in_pointer_expression_p(), references_do_not_conflict_p(), simplify_C_expression(), size_of_actual_array(), and subscript_value_stride().

+ Here is the caller graph for this function:

◆ expression_equal_in_list_p()

bool expression_equal_in_list_p ( expression  e,
list  le 
)

This function returns true, if there exists an expression equal in the list false, otherwise.

Parameters
lee

Definition at line 566 of file expression.c.

567 {
568  MAP(EXPRESSION, f, if (expression_equal_p(e,f)) return true, le);
569  return false;
570 }

References EXPRESSION, expression_equal_p(), f(), and MAP.

Referenced by pragma_omp_merge_expr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_equal_integer_p()

◆ expression_equal_or_opposite_p()

bool expression_equal_or_opposite_p ( expression  e1,
expression  e2 
)

e1==e2 or -e1==e2 or e1==-e2 syntactically

Parameters
e11
e22

Definition at line 1366 of file expression.c.

1367 {
1368  bool equal_or_opposite_p = false;
1369  if(expression_equal_p(e1,e2)) {
1370  equal_or_opposite_p = true;
1371  }
1373  call c1 = expression_call(e1);
1375  equal_or_opposite_p = expression_equal_p(e11, e2);
1376  }
1378  call c2 = expression_call(e2);
1380  equal_or_opposite_p = expression_equal_p(e1, e22);
1381  }
1382  return equal_or_opposite_p;
1383 }
#define unary_intrinsic_expression(name, e)
Building quickly bool expressions, FC.

References call_arguments, CAR, EXPRESSION, expression_call(), expression_equal_p(), unary_intrinsic_expression, and UNARY_MINUS_OPERATOR_NAME.

+ Here is the call graph for this function:

◆ expression_equal_p()

bool expression_equal_p ( expression  e1,
expression  e2 
)

Syntactic equality e1==e2.

Add expression_undefined tests to avoid segmentation fault

let's assume that every expression has a correct syntax component

Parameters
e11
e22

Definition at line 1347 of file expression.c.

1348 {
1349  syntax s1, s2;
1350 
1351  /* Add expression_undefined tests to avoid segmentation fault */
1352 
1354  return true;
1356  return false;
1357 
1358  /* let's assume that every expression has a correct syntax component */
1359  s1 = expression_syntax(e1);
1360  s2 = expression_syntax(e2);
1361 
1362  return syntax_equal_p(s1, s2);
1363 }
bool syntax_equal_p(syntax s1, syntax s2)
Definition: expression.c:1462

References expression_syntax, expression_undefined_p, s1, and syntax_equal_p().

Referenced by bitwise_xor_to_transformer(), bottom_up_abc_base_reference_implied_do(), call_equal_p(), cast_equal_p(), compact_phi_functions(), compatible_points_to_subscripts_p(), convex_cell_reference_preceding_p(), dimension_equal_p(), do_expressions_to_vector(), effect_comparable_p(), effect_may_union(), effect_must_union(), expr_rwt(), expression_eq_in_list_p(), expression_equal_in_list_p(), expression_equal_or_opposite_p(), expression_flt(), expression_lists_equal_p(), expression_opposite_p(), find_equal_expression_not_in_list(), forward_substitute_array_location_in_transformer(), generic_basic_equal_p(), integer_multiply_to_transformer(), lexpression_equal_p(), loop_rewrite(), lrange_larger_p(), make_permutations_indexes(), make_simd_statement(), opkill_may_vreference(), opkill_must_vreference(), partial_eval_plus_or_minus_operator(), points_to_reference_included_p(), range_equal_p(), reference_equal_p(), reference_to_points_to_translations(), references_must_conflict_p(), same_alignment_in_list_p(), same_alignment_p(), same_distribute_p(), same_distribution_p(), same_expression_p(), similarity(), simple_cell_reference_preceding_p(), simple_cells_inclusion_p(), simple_cells_intersection_p(), simple_pv_may_union(), simple_pv_must_union(), sizeofexpression_equal_p(), subscript_equal_p(), switch_vertex_to_assign(), terapix_loop_optimizer(), terapixify_loops(), two_addresses_code_generator(), and update_vector_to_expressions().

+ Here is the call graph for this function:

◆ expression_field_p()

bool expression_field_p ( expression  e)

The expression is of kind "s.a", where "s" is a struct and a "a" field.

Definition at line 491 of file expression.c.

492 {
493  return expression_call_p(e)
495 }

References call_function, ENTITY_FIELD_P, expression_call(), and expression_call_p().

Referenced by adapt_reference_to_type(), distance_between_expression(), expression_reference_or_field_p(), make_loadsave_statement(), replace_subscript(), and skip_field_and_cast_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_implied_do_p()

bool expression_implied_do_p ( expression  )

◆ expression_integer_constant_p()

bool expression_integer_constant_p ( expression  e)

I hope a short evaluation is made by the compiler

Definition at line 2417 of file expression.c.

2419 {
2420  syntax s = expression_syntax(e);
2422 
2423  if ((n!=normalized_undefined) && (normalized_linear_p(n)))
2424  {
2425  Pvecteur v = normalized_linear(n);
2426  int s = vect_size(v);
2427 
2428  if (s==0) return(true);
2429  if (s>1) return(false);
2430  return((s==1) && value_notzero_p(vect_coeff(TCST,v)));
2431  }
2432  else
2433  if (syntax_call_p(s))
2434  {
2435  call c = syntax_call(s);
2437 
2438  /* I hope a short evaluation is made by the compiler */
2439  return((value_constant_p(v)) && (constant_int_p(value_constant(v))));
2440  }
2441 
2442  return(false);
2443 }
#define value_notzero_p(val)

References call_function, constant_int_p, entity_initial, expression_normalized, expression_syntax, normalized_linear, normalized_linear_p, normalized_undefined, syntax_call, syntax_call_p, TCST, value_constant, value_constant_p, value_notzero_p, vect_coeff(), and vect_size().

Referenced by array_access_to_array_ranges(), do_solve_hardware_constraints_on_volume(), generate_optimized_code_for_loop_nest(), hpfc_decision(), loop_flt(), and points_to_reference_to_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_integer_value()

bool expression_integer_value ( expression  e,
intptr_t pval 
)
Parameters
pvalval

Definition at line 792 of file eval.c.

793 {
794  bool is_int = false;
795  value v = EvalExpression(e);
796 
798  *pval = constant_int(value_constant(v));
799  is_int = true;
800  }
801 
802  free_value(v);
803  return is_int;
804 }
#define is_int
Definition: run-time.c:574

References constant_int, constant_int_p, EvalExpression(), free_value(), is_int, value_constant, and value_constant_p.

Referenced by array_references_may_conflict_p(), c_dim_string(), c_reference(), cell_reference_compare(), comparable_statements_on_distance_p(), compare_statements_on_distance_to_origin(), conflict_is_a_real_conflict_p(), consecutive_expression_p(), constant_image_p(), constant_reference_to_normalized_constant_reference(), convert_bound_expression(), copy_image_p(), dag_normalize(), declarations_to_dimensions(), dimension_size(), do_group_statement_constant(), do_isolate_statement_preconditions_satisified_p(), do_loop_unroll(), do_loop_unroll_with_prologue(), do_simdizer_init(), do_solve_hardware_constraints_on_volume(), expression_negative_integer_value_p(), fcs_call_flt(), freia_convolution_width_height(), freia_extract_kernel(), full_loop_unroll(), HpfcExpressionToInt(), loop_fully_unrollable_p(), loop_nest_to_offset(), make_condition_from_loop(), make_op_exp(), make_send_receive_conversion(), make_transStat(), MakeCaseStatement(), MakeDimension(), negative_expression_p(), normalize_integer_constant_expression(), NumberOfElements(), old_effects_conflict_p(), points_to_cell_update_last_subscript(), positive_expression_p(), range_count(), region_to_minimal_dimensions(), simd_loop_unroll(), size_of_dimension(), SizeOfIthDimension(), st_dimension_bound_as_string(), st_dimension_reference_as_string(), st_loop(), subscripted_field_list_to_type(), symbolic_tiling_valid_p(), terapix_loop_optimizer(), terapixify_loops(), update_range(), ValueSizeOfDimension(), variable_references_may_conflict_p(), variable_to_string(), words_dimension(), xml_Argument(), xml_AssignArgument(), xml_Bounds(), xml_Bounds_and_Stride(), xml_declarations(), and xml_dim_string().

+ Here is the call graph for this function:

◆ expression_intrinsic_operation_p()

bool expression_intrinsic_operation_p ( expression  exp)

bool expression_intrinsic_operation_p(expression exp): Returns true if "exp" is an expression with a call to an intrinsic operation.

Parameters
expxp

Definition at line 1949 of file expression.c.

1950 {
1951  entity e;
1952  syntax syn = expression_syntax(exp);
1953 
1954  if (syntax_tag(syn) != is_syntax_call)
1955  return (false);
1956 
1957  e = call_function(syntax_call(syn));
1958 
1960 }

References call_function, entity_initial, exp, expression_syntax, is_syntax_call, is_value_intrinsic, syntax_call, syntax_tag, and value_tag.

Referenced by atomizer_of_test().

+ Here is the caller graph for this function:

◆ expression_is_C_rhs_p()

bool expression_is_C_rhs_p ( expression  exp)

Not all expressions can be used as right-hand side (rhs) in C assignments.

PIPS expressions used to encode initializations such as

"{ 1, 2, 3}"

in

"int k[] = { 1, 2, 3 };" cannot be used as rhs.

There are probably many more cases, especially with Fortran-specific expressions, e.g. IO expressions. But we do not have a way to know if an intrinsic is a Fortran or a C or a shared intrinsic. The information is not carried by PIPS internal representation and hence not initialized in bootstrap.

Note: this test is too restrictive as the condition depends on the type of the lhs. A struct can be assigned a brace expression. So a type argument should be passed to make such decisions.

"s = { 1, 2, 3};" is ok if s is a struct with three integer compatible fields.

Parameters
expxp

Definition at line 2582 of file expression.c.

2583 {
2584  bool is_rhs_p = false;
2585 
2586  is_rhs_p = !brace_expression_p(exp);
2587 
2588  return is_rhs_p;
2589 }

References brace_expression_p(), and exp.

Referenced by redeclaration_enter_statement(), and split_initializations_in_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_is_constant_p()

bool expression_is_constant_p ( expression  e)

BEGIN_EOLE.

  • please do not remove this line Lines between BEGIN_EOLE and END_EOLE tags are automatically included in the EOLE project (JZ - 11/98) whether the given function is a constant expression, whatever the type. FI -> JZ: unsigned numerical constant expression?

Definition at line 666 of file constant.c.

667 {
668  syntax s = expression_syntax(e);
669 
670  return syntax_call_p(s) ?
672 
673 }
#define false
Definition: newgen_types.h:80

References call_function, entity_constant_p, expression_syntax, false, syntax_call, and syntax_call_p.

Referenced by gfc2pips_reduce_repeated_values(), handle_set_directive(), and points_to_indices_to_unbounded_indices().

+ Here is the caller graph for this function:

◆ expression_linear_p()

bool expression_linear_p ( expression  e)

returns if e is already normalized and linear.

FI: should be moved into expression.c. Treacherous because the normalization is assumed to have occured earlier.

Definition at line 951 of file eval.c.

952 {
955 }
#define normalized_undefined_p(x)
Definition: ri.h:1746

References expression_normalized, normalized_linear_p, and normalized_undefined_p.

Referenced by convert_bound_expression(), expression_flt(), reference_filter(), and substitute_and_create().

+ Here is the caller graph for this function:

◆ expression_list_directed_p()

bool expression_list_directed_p ( expression  )

◆ expression_list_to_binary_operator_call()

expression expression_list_to_binary_operator_call ( list  l,
entity  op 
)
Parameters
opp

Definition at line 1917 of file expression.c.

1918 {
1919  int
1920  len = gen_length(l);
1921  expression
1922  result = expression_undefined;
1923 
1924  pips_assert("list_to_binary_operator_call", len!=0);
1925 
1926  result = EXPRESSION(CAR(l));
1927 
1928  MAPL(ce,
1929  {
1930  result = MakeBinaryCall(op, EXPRESSION(CAR(ce)), result);
1931  },
1932  CDR(l));
1933 
1934  return(result);
1935 }

References CAR, CDR, EXPRESSION, expression_undefined, gen_length(), MakeBinaryCall(), MAPL, and pips_assert.

Referenced by compute_region(), expression_list_to_conjonction(), and top_down_abc_not_exact_case().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_list_to_conjonction()

expression expression_list_to_conjonction ( list  l)

Definition at line 1937 of file expression.c.

1938 {
1939  int len = gen_length(l);
1941  return(len==0?
1942  MakeNullaryCall(entity_intrinsic(".TRUE.")):
1944 }
#define AND_OPERATOR_NAME
FI: intrinsics are defined at a third place after bootstrap and effects! I guess the name should be d...
expression expression_list_to_binary_operator_call(list l, entity op)
Definition: expression.c:1917

References AND_OPERATOR_NAME, entity_intrinsic(), expression_list_to_binary_operator_call(), gen_length(), and MakeNullaryCall().

Referenced by alias_check_scalar_and_array_variables_in_caller(), alias_check_scalar_and_array_variables_in_module(), alias_check_two_array_variables_in_caller(), alias_check_two_array_variables_in_module(), alias_check_two_scalar_variables_in_caller(), alias_check_two_scalar_variables_in_module(), make_guard_expression(), and Psysteme_to_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_lists_equal_p()

bool expression_lists_equal_p ( list  l1,
list  l2 
)
Parameters
l11
l22

Definition at line 1405 of file expression.c.

1406 {
1407  bool equal_p = true;
1408  list cl1 = l1, cl2 = l2;
1409  while(!ENDP(cl1) && !ENDP(cl2)) {
1410  expression e1 = EXPRESSION(CAR(cl1));
1411  expression e2 = EXPRESSION(CAR(cl2));
1412  if(!expression_equal_p(e1, e2)) {
1413  equal_p = false;
1414  break;
1415  }
1416  POP(cl1), POP(cl2);
1417  }
1418  if(equal_p)
1419  equal_p = ENDP(cl1) && ENDP(cl2);
1420  return equal_p;
1421 }

References CAR, ENDP, EXPRESSION, expression_equal_p(), and POP.

Referenced by reference_to_points_to_translations().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_minmax_p()

bool expression_minmax_p ( expression  e)
Returns
true if expression e is a min or a max

Definition at line 3882 of file expression.c.

3883 {
3884  if(expression_call_p(e))
3885  {
3887  return ENTITY_MIN_P(op) || ENTITY_MAX_P(op);
3888  }
3889  return false;
3890 }
#define ENTITY_MAX_P(e)
#define ENTITY_MIN_P(e)

References call_function, ENTITY_MAX_P, ENTITY_MIN_P, expression_call(), and expression_call_p().

Referenced by do_loop_nest_unswitching(), region_to_minimal_dimensions(), and simplify_minmax_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_mult()

expression expression_mult ( expression  ex)
Parameters
exx

Definition at line 156 of file expression.c.

157 {
158  pips_internal_error("not implemented");
159  return ex;
160 }

References pips_internal_error.

◆ expression_negative_integer_value_p()

bool expression_negative_integer_value_p ( expression  e)

Return true iff the expression has an integer value known statically and this value is negative.

All leaves of the expression tree must be constant integer.

If preconditions are available, a more general expression can be evaluated using precondition_minmax_of_expression().

Definition at line 814 of file eval.c.

814  {
815  intptr_t v;
816  return expression_integer_value(e, &v) && (v < 0);
817 }

References expression_integer_value(), and intptr_t.

+ Here is the call graph for this function:

◆ expression_normalize_subscripts()

void expression_normalize_subscripts ( expression  e)

To be used for initialization expressions.

Definition at line 4465 of file expression.c.

4466 {
4468 }
void normalize_subscript_expression(expression e)
Normalization of subscript in expressions.
Definition: expression.c:4407

References expression_domain, gen_recurse, gen_true(), and normalize_subscript_expression().

+ Here is the call graph for this function:

◆ expression_null_p()

bool expression_null_p ( expression  exp)

returns true if the expression is equal to zero or NULL (even if there is a cast before such as in (void *) 0).

Parameters
expxp

Definition at line 2611 of file expression.c.

2612 {
2613  bool null_p = false;
2614  if (expression_cast_p(exp))
2616  else if (expression_reference_p(exp))
2617  {
2619  }
2620  else
2621  {
2623  null_p = (expression_to_int(exp) == 0);
2624  }
2625  return null_p;
2626 }
bool expression_cast_p(expression e)
Definition: expression.c:450
bool expression_null_p(expression exp)
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
cast expression_cast(expression e)
Definition: expression.c:455
entity expression_variable(expression e)
Definition: expression.c:532

References cast_expression, entity_local_name(), exp, expression_cast(), expression_cast_p(), expression_constant_p(), expression_reference_p(), expression_to_int(), expression_variable(), and same_string_p.

Referenced by equal_condition_to_points_to(), freeable_points_to_cells(), have_null_value_in_pointer_expression_p(), non_equal_condition_to_points_to(), and pointer_expression_to_transformer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_one_p()

bool expression_one_p ( expression  exp)
Parameters
expxp

Definition at line 2591 of file expression.c.

2592 {
2593  bool one_p = false;
2594 
2598 
2599  if(value_constant_p(v)) {
2600  constant c = value_constant(v);
2601  one_p = constant_int_p(c) && (constant_int(c)==1);
2602  }
2603  }
2604  return one_p;
2605 }

References call_function, constant_int, constant_int_p, entity_initial, exp, expression_syntax, syntax_call, syntax_call_p, value_constant, and value_constant_p.

Referenced by ensure_comment_consistency().

+ Here is the caller graph for this function:

◆ expression_opposite_p()

bool expression_opposite_p ( expression  e1,
expression  e2 
)

e1+e2==0, i.e.

-e1==e2 or e1==-e2 syntactically

Parameters
e11
e22

Definition at line 1386 of file expression.c.

1387 {
1388  bool opposite_p = false;
1389 
1390  if(unary_minus_expression_p(e1)) {
1391  call c1 = expression_call(e1);
1393  opposite_p = expression_equal_p(e11, e2);
1394  }
1395  else if(unary_minus_expression_p(e2)) {
1396  call c2 = expression_call(e2);
1398  opposite_p = expression_equal_p(e1, e22);
1399  }
1400  return opposite_p;
1401 }
bool unary_minus_expression_p(expression e)
Definition: expression.c:1030

References call_arguments, CAR, EXPRESSION, expression_call(), expression_equal_p(), and unary_minus_expression_p().

Referenced by integer_multiply_to_transformer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_pointer_p()

bool expression_pointer_p ( expression  e)

we get the type of the expression by calling expression_to_type() which allocates a new one.

Then we call ultimate_type() to have the final type. Finally we test if it's a pointer by using pointer_type_p().

Definition at line 506 of file expression.c.

506  {
507  type et = expression_to_type(e);
508  type t = ultimate_type(et);
509  return pointer_type_p(t);
510 
511 }

References expression_to_type(), pointer_type_p(), and ultimate_type().

Referenced by atom_cse_expression(), cse_call_flt(), derived_formal_parameter_to_stub_points_to(), do_terapix_pointer_initialized_from_a_mask_p(), glc_call(), points_to_cells_pointer_arguments(), and typedef_formal_parameter_to_stub_points_to().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_range()

range expression_range ( expression  e)

Definition at line 1853 of file expression.c.

1854 {
1855  pips_assert("is a range", expression_range_p(e));
1856  return syntax_range(expression_syntax(e));
1857 }
bool expression_range_p(expression e)
Definition: expression.c:1848

References expression_range_p(), expression_syntax, pips_assert, and syntax_range.

+ Here is the call graph for this function:

◆ expression_range_p()

bool expression_range_p ( expression  e)

Definition at line 1848 of file expression.c.

1849 {
1850  return syntax_range_p(expression_syntax(e));
1851 }
#define syntax_range_p(x)
Definition: ri.h:2731

References expression_syntax, and syntax_range_p.

Referenced by expression_range(), and generic_atomic_points_to_reference_p().

+ Here is the caller graph for this function:

◆ expression_reference()

reference expression_reference ( expression  e)

Short cut, meaningful only if expression_reference_p(e) holds.

Definition at line 1832 of file expression.c.

1833 {
1834  pips_assert("e is a reference\n",expression_reference_p(e));
1836 }

References expression_reference_p(), expression_syntax, pips_assert, and syntax_reference.

Referenced by add_aliases_for_current_call_site(), address_of_scalar(), array_argument_p(), array_elements_substitution_in_transformer(), array_must_fully_written_by_regions_p(), array_to_constant_paths(), assignment_to_points_to(), atomize_call(), c_convex_effects_on_actual_parameter_forward_translation(), call_count_flt(), call_flt(), call_rwt(), comEngine_replace_reference_in_stat_rwt(), compact_phi_functions(), complete_points_to_reference_with_fixed_subscripts(), compute_points_to_binded_set(), convert_pointer_to_array_aux(), da_process_list(), dereferencing_to_points_to(), distance_between_expression(), do_array_to_pointer_walk_call_and_patch(), do_array_to_pointer_walk_expression(), do_atomize_call(), do_brace_expression_to_statements(), do_expression_reduction(), do_grouping_filter_out_self(), do_grouping_replace_reference_by_expression_walker(), do_linearize_prepatch_subscript(), do_linearize_remove_dereferencment_walker(), do_reduction_atomization(), do_reduction_detection(), do_reduction_propagation(), do_split_structure_return_hook_walker(), do_terapix_pointer_initialized_from_a_mask_p(), entity_used_in_calls_walker(), expression_allocatable_data_access_p(), expression_equal_in_context_p(), expression_reference_number(), expression_to_transformer(), expression_try_find_string_size(), expression_verbose_reduction_p_and_return_increment(), extended_regions_must_convex_hull(), field_expression_p(), FindDefinitionsOf_rewrite(), flint_cons_actual_argument(), freia_shuffle_move_forward(), full_copy_p(), generate_deducables(), get_complement_expression(), get_dma_dimension(), get_sizeofexpression_for_region(), glc_call(), guess_loop_increment_walker(), guess_loop_lower_bound(), guess_write_effect_on_entity_walker(), interprocedural_abc_call(), invalidate_expressions_in_statement(), isolate_patch_reference(), list_of_same_or_equivalence_arguments(), loadstore_type_conversion_string(), make_loadsave_statement(), make_send_receive_conversion(), new_array_elements_backward_substitution_in_transformer(), new_array_elements_forward_substitution_in_transformer(), offset_in_caller(), outliner_patch_parameters(), partial_eval_update_operators(), perform_substitution_in_assign(), points_to_array_reference_p(), points_to_array_reference_to_type(), points_to_cells_pointer_arguments(), points_to_indices_to_subscript_indices(), points_to_indices_to_unbounded_indices(), process_static_initialization(), process_true_call_stat(), put_variables_in_ordered_lists(), recursive_store_independent_points_to_reference_p(), reference_argument_number(), reference_filter(), reference_to_field_disambiguator(), references_must_conflict_p(), region_to_address(), remove_unread_variable(), replace_entities_expression_walker(), replace_entity_by_expression_expression_walker(), replace_field_by_reference_walker(), rssp_ref(), sac_aligned_expression_p(), sac_expression_reduction_p(), safe_expression_to_transformer(), same_or_equivalence_argument_add_aliases(), same_section_common_variable_in_list_p(), same_section_formal_variable_in_list_p(), seq_rwt(), simd_trace_call(), simple_reference_to_convex_reference_conversion(), simplify_complex_expression(), split_complex_expression(), statement_insertion_fix_access_in_callers(), subscripted_field_list_to_type(), substitute_image_in_statement(), sww_seq_rwt(), terapix_loop_handler(), update_functional_type_with_actual_arguments(), variable_to_dimensions(), and verify_array_element().

+ Here is the call graph for this function:

◆ expression_reference_p()

bool expression_reference_p ( expression  e)

Test if an expression is a reference.

Definition at line 528 of file expression.c.

528  {
530 }

References expression_syntax, and syntax_reference_p.

Referenced by add_aliases_for_current_call_site(), address_of_scalar(), alloc_instrumentation(), array_argument_p(), array_elements_substitution_in_transformer(), array_indices_check(), array_must_fully_written_by_regions_p(), assign_operation_to_transformer(), assignment_to_points_to(), atomize_call(), atomize_call_statement(), atomize_condition(), c_convex_effects_on_actual_parameter_forward_translation(), call_count_flt(), call_flt(), cleanup_subscript(), comEngine_replace_reference_in_stat_rwt(), compact_phi_functions(), compute_points_to_binded_set(), constant_reference_to_normalized_constant_reference(), continue_propagation_p(), controlize_statement(), convert_pointer_to_array_aux(), cstr_args_check(), dereferencing_to_points_to(), distance_between_expression(), do_array_to_pointer_walk_call_and_patch(), do_array_to_pointer_walk_expression(), do_atomize_call(), do_brace_expression_to_statements(), do_expression_reduction(), do_grouping_filter_out_self(), do_grouping_replace_reference_by_expression_walker(), do_linearize_pointer_is_expression(), do_linearize_prepatch_subscript(), do_linearize_remove_dereferencment_walker(), do_reduction_atomization(), do_reduction_propagation(), do_split_structure_return_hook_walker(), do_terapix_loop_optimizer(), entity_used_in_calls_walker(), expr_flt(), expr_rwt(), expression_equal_in_context_p(), expression_null_p(), expression_number_for_index(), expression_reference(), expression_reference_number(), expression_reference_or_field_p(), expression_simple_nondist_p(), expression_to_transformer(), expression_try_find_size(), expression_verbose_reduction_p_and_return_increment(), extended_regions_must_convex_hull(), field_expression_p(), flint_cons_actual_argument(), freia_extract_kernel(), freia_shuffle_move_forward(), full_copy_p(), get_complement_expression(), get_dma_dimension(), get_sizeofexpression_for_region(), glc_call(), guess_loop_increment_walker(), guess_loop_lower_bound(), guess_write_effect_on_entity_walker(), hpfc_overlap_kill_unused_scalars_rewrite(), interprocedural_mapping(), intrinsic_call_to_points_to(), invalidate_expressions_in_statement(), is_expression_reference_to_entity_p(), isolate_patch_reference(), list_of_same_or_equivalence_arguments(), loadstore_type_conversion_string(), make_loadsave_statement(), new_array_elements_backward_substitution_in_transformer(), new_array_elements_forward_substitution_in_transformer(), outliner_patch_parameters(), parser_macro_expansion(), partial_eval_call(), partial_eval_update_operators(), points_to_cells_pointer_arguments(), points_to_indices_to_array_index_number(), points_to_indices_to_subscript_indices(), points_to_indices_to_unbounded_indices(), process_static_initialization(), process_true_call_stat(), proper_to_summary_simple_effect(), reference_argument_number(), reference_filter(), reference_to_field_disambiguator(), reference_to_type(), references_aligned_p(), references_must_conflict_p(), regenerate_call(), region_to_address(), remove_unread_variable(), replace_entities_expression_walker(), replace_entity_by_expression_expression_walker(), replace_field_by_reference_walker(), rssp_ref(), sac_aligned_expression_p(), sac_expression_reduction_p(), safe_expression_to_transformer(), same_section_common_variable_in_list_p(), same_section_formal_variable_in_list_p(), seq_rwt(), simple_reference_to_convex_reference_conversion(), simplify_complex_expression(), statement_insertion_fix_access_in_callers(), subarray_shift_assignment_p(), subscripted_field_list_to_type(), substitute_image_in_statement(), sww_seq_rwt(), terapix_loop_handler(), update_functional_type_with_actual_arguments(), update_operation_to_transformer(), variable_references_may_conflict_p(), and variable_to_dimensions().

◆ expression_similar_get_context_p()

bool expression_similar_get_context_p ( expression  target,
expression  pattern,
hash_table symbol_table 
)

similar to expression_similar_p but the hash_map containing the crossref value is retured for further use

Parameters
targetexpression to compare
patternexpression serving as pattern
symbol_tablepointer to unallocated hash_map, in the end it will contain a set of pair (original syntax reference name, substituted syntax element). Must be freed, but only if expressions are similar
Returns
true if expressions are similar
Parameters
targetarget
patternattern
symbol_tableymbol_table

Definition at line 3339 of file expression.c.

3340 {
3342  bool similar = _expression_similar_p(target,pattern,*symbol_table);
3343  if( !similar) hash_table_free(*symbol_table);
3344  return similar;
3345 }
#define HASH_DEFAULT_SIZE
Definition: newgen_hash.h:26
bool symbol_table(const char *)
To replace c_symbol_table() and fortran_symbol_table() because the information about the language is ...
Definition: symbol_table.c:673
static bool _expression_similar_p(expression target, expression pattern, hash_table symbols)
perform the real similarity comparaison between two expressions target is matched against pattern,...
Definition: expression.c:3180

References _expression_similar_p(), HASH_DEFAULT_SIZE, hash_string, hash_table_free(), hash_table_make(), and symbol_table().

Referenced by replace_expression_similar_to_pattern().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_similar_p()

bool expression_similar_p ( expression  target,
expression  pattern 
)

compare if two expressions are similar that is can we exchange target and pattern by substituing variables examples: 1+2 ~ a+b a+b !~ a+2 1+b ~ 1+c

Parameters
targetexpression that sould match with pattern
patternthe pattern to match
Returns
true if expressions are similar
Parameters
targetarget
patternattern

Definition at line 3360 of file expression.c.

3361 {
3363  bool similar = _expression_similar_p(target,pattern,symbol_table);
3365  return similar;
3366 }

References _expression_similar_p(), HASH_DEFAULT_SIZE, hash_pointer, hash_table_free(), hash_table_make(), and symbol_table().

+ Here is the call graph for this function:

◆ expression_sizeofexpression()

sizeofexpression expression_sizeofexpression ( expression  e)

Definition at line 465 of file expression.c.

466 {
468 }

References expression_syntax, and syntax_sizeofexpression.

Referenced by expression_to_transformer().

+ Here is the caller graph for this function:

◆ expression_sizeofexpression_p()

bool expression_sizeofexpression_p ( expression  e)

Definition at line 460 of file expression.c.

461 {
463 }

References expression_syntax, and syntax_sizeofexpression_p.

Referenced by expression_to_transformer().

+ Here is the caller graph for this function:

◆ expression_string_constant()

char* expression_string_constant ( expression  exp)

returns a newly allocated string!

Parameters
expxp

Definition at line 2409 of file expression.c.

2409  {
2410  pips_assert("is a string constant", expression_string_constant_p(exp));
2411  call c = expression_call(exp);
2412  entity operator = call_function(c);
2413  const char * eun = entity_user_name(operator);
2414  return strndup(eun+1,strlen(eun)-2);
2415 }
bool expression_string_constant_p(expression exp)
Definition: expression.c:2398
char * strndup(char const *s, size_t n)
A replacement function, for systems that lack strndup.
Definition: strndup.c:26

References call_function, entity_user_name(), exp, expression_call(), expression_string_constant_p(), pips_assert, and strndup().

Referenced by do_simplify_constant_address_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_string_constant_p()

bool expression_string_constant_p ( expression  exp)
Parameters
expxp

Definition at line 2398 of file expression.c.

2398  {
2399  bool constant_p = false;
2401  call c = expression_call(exp);
2402  entity operator = call_function(c);
2404  }
2405  return constant_p;
2406 }
bool constant_string_entity_p(entity e)
Definition: constant.c:356

References call_function, constant_p(), constant_string_entity_p(), exp, expression_call(), expression_call_p(), and expression_constant_p().

Referenced by compute_points_to_binded_set(), do_simplify_constant_address_expression(), and expression_string_constant().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_subscript()

subscript expression_subscript ( expression  e)

Definition at line 1843 of file expression.c.

1844 {
1845  pips_assert("is a subscript\n",expression_subscript_p(e));
1847 }
bool expression_subscript_p(expression e)
Definition: expression.c:1838
#define syntax_subscript(x)
Definition: ri.h:2745

References expression_subscript_p(), expression_syntax, pips_assert, and syntax_subscript.

Referenced by expression_to_transformer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_subscript_p()

bool expression_subscript_p ( expression  e)

Definition at line 1838 of file expression.c.

1838  {
1840 }
#define syntax_subscript_p(x)
Definition: ri.h:2743

References expression_syntax, and syntax_subscript_p.

Referenced by expression_subscript(), and expression_to_transformer().

+ Here is the caller graph for this function:

◆ expression_to_affine()

Pvecteur expression_to_affine ( expression  e)

As long as VECTEUR_UNDEFINED is not different from VECTEUR_NUL this routine cannot be used safely; either 0 will be considered not linear or every non linear expression will be equal to 0

should it also perform the conversion from variable entities to new value entities?

Definition at line 461 of file normalize.c.

462 {
463  normalized n;
464  Pvecteur v;
465 
466  /* As long as VECTEUR_UNDEFINED is not different from VECTEUR_NUL
467  this routine cannot be used safely; either 0 will be considered
468  not linear or every non linear expression will be equal to 0 */
469 
470  /* should it also perform the conversion from variable entities
471  to new value entities? */
472 
474  n = _NormalizeExpression(e);
475  else
476  n = expression_normalized(e);
477 
478  if(normalized_linear_p(n))
480  else
481  v = VECTEUR_UNDEFINED;
482 
483  return v;
484 }
#define VECTEUR_UNDEFINED
Pvecteur vect_dup(Pvecteur v_in)
Pvecteur vect_dup(Pvecteur v_in): duplication du vecteur v_in; allocation de et copie dans v_out;.
Definition: alloc.c:51

References _NormalizeExpression(), expression_normalized, normalized_linear, normalized_linear_p, normalized_undefined, vect_dup(), and VECTEUR_UNDEFINED.

Referenced by transformer_add_loop_index_incrementation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_to_concrete_type()

type expression_to_concrete_type ( expression  e)

A new type is allocated.

Definition at line 3751 of file type.c.

3752 {
3753  type t = expression_to_type(e);
3755  return ct;
3756 }
type expression_to_type(expression exp)
For an array declared as int a[10][20], the type returned for a[i] is int [20].
Definition: type.c:2486

References compute_basic_concrete_type(), and expression_to_type().

Referenced by normalize_subscript_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_to_dereferencing_expression()

expression expression_to_dereferencing_expression ( expression  e)

Reuse expression e to build expression *(e) without cheking the legality of the construct.

Definition at line 4051 of file expression.c.

4052 {
4054 }

References DEREFERENCING_OPERATOR_NAME, and unary_intrinsic_expression.

◆ expression_to_entity()

entity expression_to_entity ( expression  e)

just returns the entity of an expression, or entity_undefined

The entity returned is either the function called or the variable referenced

SG: moved here from hpfc Warning: This function certainly needs to be reviewed, maybe just testing the size of arguments (call), or the size of index (reference) may be sufficient as a first step. If their sizes are != 0, it may not return what we expect (for instance "-3" will return UNARY_MINUS_OPERATOR_NAME "--"). But expression_to_entity is called by many functions and I worry about the side effects on them.

Definition at line 3140 of file expression.c.

3141 {
3142  syntax s = expression_syntax(e);
3143 
3144  switch (syntax_tag(s))
3145  {
3146  case is_syntax_call:
3147  return call_function(syntax_call(s));
3148  case is_syntax_reference:
3150  case is_syntax_range:
3151  case is_syntax_cast:
3153  case is_syntax_subscript:
3154  case is_syntax_application:
3155  case is_syntax_va_arg:
3156  default:
3157  return entity_undefined;
3158  }
3159 }

References call_function, entity_undefined, expression_syntax, is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, reference_variable, syntax_call, syntax_reference, and syntax_tag.

Referenced by address_of_entity_p(), continue_propagation_p(), copy_write_statement_with_cumulated_regions(), dagvtx_copy_list_dot(), do_check_isolate_statement_preconditions_on_call(), do_group_statement_constant(), do_isolate_statement_preconditions_satisified_p(), do_simdizer_init(), do_solve_hardware_constraints_on_nb_proc(), do_terapix_loop_optimizer(), effect_field_dimension_entity(), expressions_to_entities(), filter_variables_in_pragma_expr(), find_receiver_cluster(), fis_call_flt(), freia_cleanup_sequence_rec(), freia_extract_params(), freia_is_transpose_call(), gen_mpi_send_recv(), get_assigned_variable(), get_reference_assignments(), handle_align_and_realign_directive(), handle_prescriptive_directive(), hpf_compile_call(), hpfc_translate_call_with_distributed_args(), is_expression_in_list(), is_expression_omp_for_p(), is_expression_omp_if_p(), is_expression_omp_omp_p(), is_expression_omp_parallel_p(), is_expression_omp_private_p(), is_expression_omp_reduction_p(), lUpdateExpr_but_distributed(), make_loadsave_statement(), make_send_receive_conversion(), make_simd_statement(), mpi_recv_ctx(), mpi_send_ctx(), new_dynamic(), new_fake_function(), new_io_function(), new_processor(), new_pure_function(), new_system_with_only_live_variable(), new_template(), oi_call_rwt(), outliner_smart_references_computation(), partial_eval_binary_operator(), region_to_minimal_dimensions(), remove_from_effective_parameters(), step_directive_basic_workchunk_index(), terapix_loop_optimizer(), terapixify_loops(), test_rewrite(), and update_overlaps_in_caller().

◆ expression_to_float()

float expression_to_float ( expression  exp)

Same as above for floating point constants.

Its calls must be guarded by expression_constant_p()

Parameters
expxp

Definition at line 2305 of file expression.c.

2306 {
2307  float rv = 0;
2308 
2309  pips_debug( 7, "doing\n");
2310  if(expression_constant_p(exp)) {
2312  switch(value_tag(entity_initial(call_function(c)))) {
2313  case is_value_constant: {
2314  rv = atof(entity_user_name(call_function(c)));
2315  break;
2316  }
2317  case is_value_intrinsic: {
2318  entity op = call_function(c);
2319  if(ENTITY_UNARY_MINUS_P(op))
2320  rv = 0 - expression_to_float(binary_call_lhs(c));
2321  else if(ENTITY_UNARY_PLUS_P(op))
2323  else
2324  pips_internal_error("Unexpected intrinsic \"%s\"\n",
2325  entity_local_name(op));
2326  break;
2327  }
2328  default:
2329  pips_internal_error("expression is not a constant"
2330  " according to expression_constant_p()");
2331  }
2332  }
2333  else
2334  pips_internal_error("expression is not a constant"
2335  " according to expression_constant_p()");
2336  return(rv);
2337 }
float expression_to_float(expression exp)
Same as above for floating point constants.
Definition: expression.c:2305

References binary_call_lhs, call_function, entity_initial, entity_local_name(), ENTITY_UNARY_MINUS_P, ENTITY_UNARY_PLUS_P, entity_user_name(), exp, expression_constant_p(), expression_syntax, is_value_constant, is_value_intrinsic, pips_debug, pips_internal_error, syntax_call, and value_tag.

Referenced by do_solve_hardware_constraints_on_volume(), and expression_to_polynome().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_to_int()

int expression_to_int ( expression  exp)

================================================================

int expression_to_int(expression exp): returns the integer value of "exp" when "exp" is programming language constant or a Fortran symbolic constant.

Note: "exp" is supposed to contain an integer value which means that the function expression_constant_p() has returned true with "exp" as argument.

This implies that if "exp" is not a "value_constant", it must be a "value_intrinsic". In that case it is an unary minus operation upon an expression for which the function expression_constant_p() returns true (see its comment).

SG: improvement: the integer value of a extended_integer_constant_expression_p is computed too, for instance 0+5 or 6+3.

FI: I am not sure it is an improvement, at best it is an extension; it looks more like a change of semantics (see above comments and expression_constant_p()); other functions exist to evaluate a constant expression... The extension should be useless as this function should not be called unless guarded by a test with expression_constant_p()... The same is true for the extension related to symbolic constants.

For an extended static expression evaluation, see EvalExpression(). See also extended_expression_constant_p() for more comments about what is called a "constant" expression.

For a cleaner implementation of this function, as it was originally intended, see below expression_to_float().

use the normalize field first: this is Serge Guelton's improvement...

Not good for user source code preservation...

This is the initial code

pips_internal_error("expression %s is not an integer constant.\n",

expression_to_string(exp));

Could be improved checking dependent and not dependent types...

pips_internal_error("expression %s is not an integer constant\n",

expression_to_string(exp));

This is another useless extension

Is it an integer "parameter" in Fortran, that is symbolic constants?

Should this be generalized to C const qualified variables?

I have doubt about this piece of code since the call is supposedly guarded by expression_constant_p()

pips_internal_error("expression %s is not an integer constant\n",

expression_to_string(exp));

pips_internal_error("expression %s is not an integer constant"

" in the sense of expression_constant_p()\n",

expression_to_string(exp));

Parameters
expxp

Definition at line 2205 of file expression.c.

2206 {
2207  int rv = 0;
2208  pips_debug(7, "doing\n");
2209 
2210  /* use the normalize field first: this is Serge Guelton's improvement... */
2211  /* Not good for user source code preservation... */
2214  if(normalized_linear_p(n)) {
2215  Pvecteur pv = normalized_linear(n);
2216  if(vect_constant_p(pv))
2217  return (int)vect_coeff(TCST, pv);
2218  }
2219 
2220  /* This is the initial code */
2221  if(expression_constant_p(exp)) {
2223  if(syntax_call_p(s)) { // A nullary call is assumed
2224  call c = syntax_call(s);
2225  switch(value_tag(entity_initial(call_function(c)))) {
2226  case is_value_constant: {
2228  break;
2229  }
2230  case is_value_intrinsic: {
2231  entity op = call_function(c);
2232  if(ENTITY_UNARY_MINUS_P(op))
2233  rv = 0 - expression_to_int(binary_call_lhs(c));
2234  else if(ENTITY_UNARY_PLUS_P(op))
2236  else
2237  pips_internal_error("Unexpected intrinsic \"%s\"\n",
2238  entity_local_name(op));
2239  break;
2240  }
2241  default:
2242  /* pips_internal_error("expression %s is not an integer constant.\n", */
2243  /* expression_to_string(exp)); */
2244  pips_internal_error("expression is not an integer constant.\n");
2245  }
2246  }
2247  else if(false && syntax_sizeofexpression(s)) {
2249  // FI: do we want to guard this evaluation with EVAL_SIZEOF?
2250  // This should be part of eval.c
2251  value v = EvalSizeofexpression(soe);
2252  if(value_constant_p(v)) { // Should always be true... but for dependent types
2253  rv = constant_int(value_constant(v));
2254  }
2255  else {
2256  /* Could be improved checking dependent and not dependent types...*/
2257  // FI: to avoid cycles between librairies ri-util and prettyprint
2258  /* pips_internal_error("expression %s is not an integer constant\n", */
2259  /* expression_to_string(exp)); */
2260  pips_internal_error("expression is not an integer constant.\n");
2261  }
2262  free_value(v);
2263  }
2264  }
2265  /* This is another useless extension */
2266  else if(expression_call_p(exp)) {
2267  /* Is it an integer "parameter" in Fortran, that is symbolic constants?
2268  *
2269  * Should this be generalized to C const qualified variables?
2270  *
2271  * I have doubt about this piece of code since the call is
2272  * supposedly guarded by expression_constant_p()
2273  */
2275  value v = entity_initial(p);
2276 
2279  }
2280  else {
2281  // FI: to avoid cycles between librairies ri-util and prettyprint
2282  /* pips_internal_error("expression %s is not an integer constant\n", */
2283  /* expression_to_string(exp)); */
2284  pips_internal_error("expression is not an integer constant\n");
2285  }
2286  }
2287  else {
2288  // FI: to avoid cycles between librairies ri-util and prettyprint
2289  /* pips_internal_error("expression %s is not an integer constant" */
2290  /* " in the sense of expression_constant_p()\n", */
2291  /* expression_to_string(exp)); */
2292  pips_internal_error("expression is not an integer constant"
2293  " in the sense of expression_constant_p()\n");
2294  }
2295 
2296  return(rv);
2297 }

References binary_call_lhs, call_function, constant_int, constant_int_p, entity_initial, entity_local_name(), ENTITY_UNARY_MINUS_P, ENTITY_UNARY_PLUS_P, EvalSizeofexpression(), exp, expression_call_p(), expression_constant_p(), expression_normalized, expression_syntax, free_value(), is_value_constant, is_value_intrinsic, NORMALIZE_EXPRESSION, normalized_linear, normalized_linear_p, pips_debug, pips_internal_error, symbolic_constant, syntax_call, syntax_call_p, syntax_sizeofexpression, TCST, value_constant, value_constant_p, value_symbolic, value_symbolic_p, value_tag, vect_coeff(), and vect_constant_p().

Referenced by adg_get_conjonctions(), analyze_expression(), array_indices_check(), array_size_stride(), compute_final_index_value(), convert_bound_expression(), effect_field_dimension_entity(), equal_must_vreference(), expression_equal_integer_p(), expression_null_p(), expression_plusplus(), expression_try_find_size(), find_target_position(), formal_variable_add_aliases(), incrementation_expression_to_increment(), loop_annotate(), loop_normalize_of_loop(), make_max_exp(), make_send_receive_conversion(), MakeEquivAtom(), opkill_may_vreference(), opkill_must_vreference(), points_to_compare_cell(), points_to_compare_cells(), points_to_compare_location(), points_to_compare_ptr_cell(), rational_op_exp(), references_do_not_conflict_p(), sentence_data_statement(), size_of_actual_array(), size_of_dummy_array(), subscript_value(), subscript_value_stride(), system_new_var_subst(), valuer(), and words_dimension().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_to_polynome()

Ppolynome expression_to_polynome ( expression  exp)

===========================================================================

Ppolynome expression_to_polynome(expression exp): translates "exp" into a polynome. This transformation is feasible if "exp" contains only scalars and the four classical operations (+, -, *, /).

The translation is done straightforwardly and recursively.

it returns a POLYNOME_UNDEFINED if the conversion failed

This the resulting polynome

Two cases : _ a constant _ a "real" call, ie an intrinsic or external function

We should have a real null polynome : 0*TCST^1 AL, AC 04 11 93 else { Pmonome pm = (Pmonome) malloc(sizeof(Smonome)); monome_coeff(pm) = 0; monome_term(pm) = vect_new(TCST, 1); pp_new = monome_to_new_polynome(pm); }

The call must be one of the four classical operations: +, - (unary or binary), *, /

This call has one (unary minus) or two (binary plus, minus, multiply or divide) arguments, no less and no more.

arg1 + arg2

-arg2 + arg1

arg1 * arg2

arg1 / arg2

(ENTITY_UNARY_MINUS_P(op_ent)) : -arg1

Parameters
expxp

Definition at line 3650 of file expression.c.

3651 {
3652  Ppolynome pp_new=POLYNOME_UNDEFINED; /* This the resulting polynome */
3654 
3655  switch(syntax_tag(sy))
3656  {
3657  case is_syntax_reference:
3658  {
3659  reference r = syntax_reference(sy);
3660  entity en = reference_variable(r);
3661 
3663  pp_new = make_polynome(1.0, (Variable) en, (Value) 1);
3664  break;
3665  }
3666  case is_syntax_call:
3667  {
3668  /* Two cases : _ a constant
3669  * _ a "real" call, ie an intrinsic or external function
3670  */
3671  if (expression_constant_p(exp)) {
3672  float etof = expression_to_float(exp);
3673  pp_new = make_polynome( etof,
3675  /* We should have a real null polynome : 0*TCST^1 AL, AC 04 11 93
3676  *else {
3677  * Pmonome pm = (Pmonome) malloc(sizeof(Smonome));
3678  * monome_coeff(pm) = 0;
3679  * monome_term(pm) = vect_new(TCST, 1);
3680  * pp_new = monome_to_new_polynome(pm);
3681  *}
3682  */
3683  }
3684  else
3685  {
3686  int cl;
3687  expression arg1, arg2 = expression_undefined;
3688  entity op_ent = call_function(syntax_call(sy));
3689 
3690  /* The call must be one of the four classical operations:
3691  * +, - (unary or binary), *, /
3692  */
3693  if(ENTITY_FIVE_OPERATION_P(op_ent))
3694  {
3695  /* This call has one (unary minus) or two (binary plus, minus,
3696  * multiply or divide) arguments, no less and no more.
3697  */
3699  if( (cl != 2) && (cl != 1) )
3700  pips_internal_error("%s call with %d argument(s)",
3701  entity_local_name(op_ent), cl);
3702 
3703  arg1 = EXPRESSION(CAR(call_arguments(syntax_call(sy))));
3704  if(cl == 2)
3705  arg2 = EXPRESSION(CAR(CDR(call_arguments(syntax_call(sy)))));
3706 
3707  if (ENTITY_PLUS_P(op_ent)||ENTITY_PLUS_C_P(op_ent)) /* arg1 + arg2 */
3708  {
3709  pp_new = expression_to_polynome(arg1);
3710  if(!POLYNOME_UNDEFINED_P(pp_new))
3711  polynome_add(&pp_new, expression_to_polynome(arg2));
3712  }
3713  else if(ENTITY_MINUS_P(op_ent)||ENTITY_MINUS_C_P(op_ent)) /* -arg2 + arg1 */
3714  {
3715  pp_new = expression_to_polynome(arg2);
3716  if(!POLYNOME_UNDEFINED_P(pp_new)) {
3717  polynome_negate(&pp_new);
3718  Ppolynome parg1 = expression_to_polynome(arg1);
3719  if(!POLYNOME_UNDEFINED_P(parg1))
3720  polynome_add(&pp_new, parg1);
3721  else {
3722  polynome_rm(&pp_new);
3723  pp_new=POLYNOME_UNDEFINED;
3724  }
3725  }
3726  }
3727  else if(ENTITY_MULTIPLY_P(op_ent)) /* arg1 * arg2 */ {
3728  Ppolynome p1 = expression_to_polynome(arg1);
3729  if(!POLYNOME_UNDEFINED_P(p1)) {
3730  Ppolynome p2 = expression_to_polynome(arg2);
3731  if(!POLYNOME_UNDEFINED_P(p2)) {
3732  pp_new = polynome_mult(p1,p2);
3733  }
3734  }
3735  }
3736  else if(ENTITY_DIVIDE_P(op_ent)) /* arg1 / arg2 */ {
3737  Ppolynome p1 = expression_to_polynome(arg1);
3738  if(!POLYNOME_UNDEFINED_P(p1)) {
3739  Ppolynome p2 = expression_to_polynome(arg2);
3740  if(!POLYNOME_UNDEFINED_P(p2)) {
3741  pp_new = polynome_div(p1,p2);
3742  }
3743  }
3744  }
3745  else /* (ENTITY_UNARY_MINUS_P(op_ent)) : -arg1 */
3746  {
3747  pp_new = expression_to_polynome(arg1);
3748  if(!POLYNOME_UNDEFINED_P(pp_new)) {
3749  polynome_negate(&pp_new);
3750  }
3751  }
3752  }
3753  }
3754 
3755  break;
3756  }
3757  default :
3758  {
3759  pp_new=POLYNOME_UNDEFINED;
3760  }
3761  }
3762  return(pp_new);
3763 }
Ppolynome make_polynome(float coeff, Variable var, Value expo)
Ppolynome make_polynome(float coeff, Variable var, Value expo) PRIVATE allocates space for,...
Definition: pnome-alloc.c:100
void polynome_rm(Ppolynome *ppp)
void polynome_rm(Ppolynome* ppp) frees space occupied by polynomial *ppp returns *ppp pointing to POL...
Definition: pnome-alloc.c:170
Ppolynome polynome_div(Ppolynome pp1, Ppolynome pp2)
Ppolynome polynome_div(Ppolynome pp1, Ppolynome pp2) returns p = pp1 / pp2.
Definition: pnome-bin.c:381
Ppolynome polynome_mult(Ppolynome pp1, Ppolynome pp2)
Ppolynome polynome_mult(Ppolynome pp1, Ppolynome pp2) returns pp1 * pp2.
Definition: pnome-bin.c:287
void polynome_add(Ppolynome *ppp, Ppolynome pp2)
void polynome_add(Ppolynome* ppp, Ppolynome pp2) (*ppp) = (*ppp) + pp2.
Definition: pnome-bin.c:171
void polynome_negate(Ppolynome *ppp)
void polynome_negate(Ppolynome *ppp); changes sign of polynomial *ppp.
Definition: pnome-unaires.c:45
#define POLYNOME_UNDEFINED
#define POLYNOME_UNDEFINED_P(pp)
#define ENTITY_DIVIDE_P(e)
#define ENTITY_FIVE_OPERATION_P(e)
#define ENTITY_MINUS_P(e)
bool entity_pointer_p(entity e)
Definition: entity.c:745
Ppolynome expression_to_polynome(expression exp)
===========================================================================
Definition: expression.c:3650

References call_arguments, call_function, CAR, CDR, ENDP, ENTITY_DIVIDE_P, ENTITY_FIVE_OPERATION_P, entity_local_name(), ENTITY_MINUS_C_P, ENTITY_MINUS_P, ENTITY_MULTIPLY_P, ENTITY_PLUS_C_P, ENTITY_PLUS_P, entity_pointer_p(), entity_scalar_p(), entity_undefined, exp, EXPRESSION, expression_constant_p(), expression_syntax, expression_to_float(), expression_undefined, gen_length(), is_syntax_call, is_syntax_reference, make_polynome(), pips_internal_error, polynome_add(), polynome_div(), polynome_mult(), polynome_negate(), polynome_rm(), POLYNOME_UNDEFINED, POLYNOME_UNDEFINED_P, reference_indices, reference_variable, syntax_call, syntax_reference, and syntax_tag.

Referenced by edge_cost_polynome(), include_trans_in_poly(), plc_make_distance(), search_scc_bdt(), simplify_expression(), and size_of_regions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_to_reference()

reference expression_to_reference ( expression  e)

Definition at line 212 of file expression.c.

213 {
214  syntax s = expression_syntax(e);
215  message_assert("reference", syntax_reference_p(s));
216  return syntax_reference(s);
217 }
#define message_assert(msg, ex)
Definition: newgen_assert.h:47

References expression_syntax, message_assert, syntax_reference, and syntax_reference_p.

Referenced by continue_propagation_p(), handle_align_and_realign_directive(), and handle_distribute_and_redistribute_directive().

+ Here is the caller graph for this function:

◆ expression_to_reference_list()

list expression_to_reference_list ( expression  e,
list  lr 
)

conversion of an expression into a list of references; references are appended to list lr as they are encountered; array references are added before their index expressions are scanned;

references to functions and constants (which are encoded as null-ary functions) are not recorded

Parameters
lrr

Definition at line 1263 of file expression.c.

1264 {
1265  syntax s = expression_syntax(e);
1266  lr = syntax_to_reference_list(s, lr);
1267  return lr;
1268 }
list syntax_to_reference_list(syntax s, list lr)
Definition: expression.c:1270

References expression_syntax, and syntax_to_reference_list().

Referenced by array_indice_in_list_p(), check_loop_distribution_feasability(), effect_interference(), effects_interfere_p(), guess_late_read_effect_on_entity(), loop_nest_to_local_variables(), self_initialization_p(), syntax_to_reference_list(), and verify_used_before_set_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_to_type()

type expression_to_type ( expression  exp)

For an array declared as int a[10][20], the type returned for a[i] is int [20].

gcc claims it is int (*)[10], that is a pointer to an array of 10 elements.

Parameters
expis an expression
Returns
a new allocated type which is the ntype of the expression in which typedef's are replaced by combination of basic types.

does not cover references to functions ...

Could be more elaborated with array types for array expressions

ifdebug(9){

pips_debug(6, "begins with expression :");

print_expression(exp);

fprintf(stderr, "\n");

}

Well, let's assume range are well formed...

current type

current basic

current dimensions

Warning : qualifiers are set to NIL, because I do not see the need for something else for the moment. BC.

Never go there...

pips_debug(9, "returns with %s\n", words_to_string(words_type(t, NIL, false)));

Parameters
expxp

Definition at line 2486 of file type.c.

2487 {
2488  debug_on("RI-UTIL_DEBUG_LEVEL");
2489  /* does not cover references to functions ...*/
2490  /* Could be more elaborated with array types for array expressions */
2491  type t = type_undefined;
2492 
2493  syntax s_exp = expression_syntax(exp);
2494 
2495  // FI: to avoid cycles betwen librairies ri-util and prettyprint
2496  /* ifdebug(9){ */
2497  /* pips_debug(6, "begins with expression :"); */
2498  /* print_expression(exp); */
2499  /* fprintf(stderr, "\n"); */
2500  /* } */
2501 
2502  switch(syntax_tag(s_exp))
2503  {
2504  case is_syntax_reference:
2505  {
2506  pips_debug(9, "reference case \n");
2507  t = reference_to_type(syntax_reference(s_exp));
2508  break;
2509  }
2510  case is_syntax_call:
2511  {
2512  pips_debug(9, "call case \n");
2513  t = call_to_type(syntax_call(s_exp));
2514  break;
2515  }
2516  case is_syntax_range:
2517  {
2518  pips_debug(9, "range case \n");
2519  /* Well, let's assume range are well formed... */
2521  break;
2522  }
2523  case is_syntax_cast:
2524  {
2525  pips_debug(9, "cast case \n");
2526  t = copy_type(cast_type(syntax_cast(s_exp)));
2527  if (!type_void_p(t) && type_tag(t) != is_type_variable)
2528  pips_internal_error("Bad reference type tag %d",type_tag(t));
2529  break;
2530  }
2532  {
2533  /*
2534  sizeofexpression se = syntax_sizeofexpression(s_exp);
2535  pips_debug(9, "size of case \n");
2536  if (sizeofexpression_type_p(se))
2537  {
2538  t = copy_type(sizeofexpression_type(se));
2539  if (type_tag(t) != is_type_variable)
2540  pips_internal_error("Bad reference type tag %d",type_tag(t));
2541  }
2542  else
2543  {
2544  t = expression_to_type(sizeofexpression_expression(se));
2545  }*/
2547  break;
2548  }
2549  case is_syntax_subscript:
2550  {
2551  /* current type */
2553  /* current basic */
2555  /* current dimensions */
2557  list l_inds = subscript_indices(syntax_subscript(s_exp));
2558 
2559  pips_debug(9, "subscript case \n");
2560 
2561  while (!ENDP(l_inds))
2562  {
2563  if(!ENDP(cd))
2564  {
2565  POP(cd);
2566  }
2567  else
2568  {
2569  pips_assert("reference has too many indices : pointer expected\n", basic_pointer_p(cb));
2570  ct = basic_pointer(cb);
2571  if( type_variable_p(ct) ) {
2572  cb = variable_basic(type_variable(ct));
2574  }
2575  else {
2576  abort();
2577  pips_internal_error("unhandled case");
2578  }
2579  }
2580  POP(l_inds);
2581  }
2582 
2583  /* Warning : qualifiers are set to NIL, because I do not see
2584  the need for something else for the moment. BC.
2585  */
2588  gen_full_copy_list(cd),
2589  NIL));
2590  break;
2591  }
2592  case is_syntax_application:
2593  {
2594  pips_debug(9, "application case \n");
2596  break;
2597  }
2598  case is_syntax_va_arg:
2599  {
2600  pips_debug(9, "va_arg case\n");
2601  list vararg_list = syntax_va_arg(s_exp);
2602  sizeofexpression soe = SIZEOFEXPRESSION(CAR(CDR(vararg_list)));
2603 
2604  t = copy_type(sizeofexpression_type(soe));
2605  break;
2606  }
2607 
2608  default:
2609  pips_internal_error("Bad syntax tag %d", syntax_tag(s_exp));
2610  /* Never go there... */
2611  }
2612 
2613  // FI: to avoid cycles betwen librairies ri-util and prettyprint
2614  /* pips_debug(9, "returns with %s\n", words_to_string(words_type(t, NIL, false))); */
2615  debug_off();
2616  return t;
2617 }
type reference_to_type(reference ref)
Definition: type.c:2354
#define SIZEOFEXPRESSION(x)
SIZEOFEXPRESSION.
Definition: ri.h:2364
#define syntax_va_arg(x)
Definition: ri.h:2751
#define subscript_indices(x)
Definition: ri.h:2563
#define subscript_array(x)
Definition: ri.h:2561
#define application_function(x)
Definition: ri.h:508

References abort, application_function, basic_pointer, basic_pointer_p, call_to_type(), CAR, cast_type, CDR, copy_basic(), copy_type(), debug_off, debug_on, DEFAULT_POINTER_TYPE_SIZE, ENDP, exp, expression_syntax, expression_to_type(), gen_full_copy_list(), is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, is_type_variable, make_basic_int(), make_type(), make_type_variable(), make_variable(), NIL, pips_assert, pips_debug, pips_internal_error, POP, range_lower, reference_to_type(), SIZEOFEXPRESSION, sizeofexpression_type, subscript_array, subscript_indices, syntax_application, syntax_call, syntax_cast, syntax_range, syntax_reference, syntax_subscript, syntax_tag, syntax_va_arg, type_tag, type_undefined, type_variable, type_variable_p, type_void_p, variable_basic, and variable_dimensions.

Referenced by any_user_call_site_to_transformer(), application_to_points_to_sinks(), assignment_to_post_pv(), binary_arithmetic_operator_to_post_pv(), c_convex_effects_on_actual_parameter_forward_translation(), c_convex_effects_on_formal_parameter_backward_translation(), declaration_statement_to_points_to(), dereferencing_subscript_to_points_to(), do_linearize_array_manage_callers(), equal_condition_to_points_to(), eval_linear_expression(), EvalSizeofexpression(), expression_pointer_p(), expression_to_concrete_type(), expression_to_points_to_cells(), expression_to_points_to_sinks_with_offset(), expression_to_transformer(), expression_to_type(), expression_to_uncasted_type(), extended_expression_constant_p(), generic_abs_to_transformer(), generic_substitute_formal_array_elements_in_transformer(), integer_expression_and_precondition_to_integer_interval(), integer_expression_to_transformer(), intrinsic_call_to_points_to(), intrinsic_call_to_type(), malloc_arg_to_type(), MemberIdentifierToExpression(), non_equal_condition_to_points_to(), NormalizeCast(), null_equal_condition_to_points_to(), null_non_equal_condition_to_points_to(), order_condition_to_points_to(), pointer_expression_to_transformer(), points_to_expression_to_type(), points_to_reference_update_final_subscripts(), ppt_math(), rename_op(), struct_reference_assignment_or_equality_to_transformer(), transformer_add_condition_information_updown(), unary_arithmetic_operator_to_post_pv(), and update_operator_to_post_pv().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_to_uncasted_type()

type expression_to_uncasted_type ( expression  exp)

If the expression is casted, return its type before cast.

ifdebug(6){

pips_debug(6, "begins with expression :");

print_expression(exp);

pips_debug(6, "\n");

}

Parameters
expxp

Definition at line 2620 of file type.c.

2621 {
2622  type t = type_undefined;
2623  syntax s_exp = expression_syntax(exp);
2624 
2625  // FI: to avoid cycles betwen librairies ri-util and prettyprint
2626  /* ifdebug(6){ */
2627  /* pips_debug(6, "begins with expression :"); */
2628  /* print_expression(exp); */
2629  /* pips_debug(6, "\n"); */
2630  /* } */
2631 
2632  if(syntax_cast_p(s_exp)) {
2633  expression sub_exp = cast_expression(syntax_cast(s_exp));
2634 
2635  t = expression_to_uncasted_type(sub_exp);
2636  }
2637  else {
2638  t = expression_to_type(exp);
2639  }
2640 
2641  return t;
2642 }
type expression_to_uncasted_type(expression exp)
If the expression is casted, return its type before cast.
Definition: type.c:2620

References cast_expression, exp, expression_syntax, expression_to_type(), expression_to_uncasted_type(), syntax_cast, syntax_cast_p, and type_undefined.

Referenced by expression_to_uncasted_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_to_user_type()

type expression_to_user_type ( expression  e)

Preserve typedef'ed types when possible.

does not cover references to functions ...

Could be more elaborated with array types for array expressions

Definition at line 2645 of file type.c.

2646 {
2647  /* does not cover references to functions ...*/
2648  /* Could be more elaborated with array types for array expressions */
2649  type t = type_undefined;
2650  basic b = some_basic_of_any_expression(e, false, false);
2651  variable v = make_variable(b, NIL, NIL);
2652 
2653  t = make_type(is_type_variable, v);
2654 
2655  return t;
2656 }

References is_type_variable, make_type(), make_variable(), NIL, some_basic_of_any_expression(), and type_undefined.

Referenced by callnodeclfilter(), check_C_function_type(), and freia_create_helper_function().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expression_variable()

entity expression_variable ( expression  e)

Assume e is a reference expression: expression_reference_p(e)==true

Definition at line 532 of file expression.c.

533 {
534  /* Assume e is a reference expression:
535  expression_reference_p(e)==true */
537 }

References expression_syntax, reference_variable, and syntax_reference.

Referenced by expression_null_p(), find_entities_to_wrap(), freia_extract_kernel(), freia_reduction_variable(), maybe_unroll_while_rwt(), proper_to_summary_simple_effect(), seq_rwt(), and variable_references_may_conflict_p().

+ Here is the caller graph for this function:

◆ expression_verbose_reduction_p_and_return_increment()

expression expression_verbose_reduction_p_and_return_increment ( expression  ,
bool(expression  
)

◆ expression_with_constant_signed_integer_value_p()

bool expression_with_constant_signed_integer_value_p ( expression  e)

The expression may be complicated but all its leaves are constants or parameters.

It evaluates to a signed integer constant. I am too lazy to fully implement it as I should and I only take care of affine expressions (Francois).

No vecteur_constant_p() in linear library?

Definition at line 960 of file expression.c.

962 {
964  bool constant_p = false;
965 
966  if(normalized_linear_p(ne)) {
967  Pvecteur ve = normalized_linear(ne);
968  /* No vecteur_constant_p() in linear library? */
970  || (term_cst(ve) && VECTEUR_UNDEFINED_P(vecteur_succ(ve)));
971  }
972 
973  return constant_p;
974 }
#define vecteur_succ(v)
#define term_cst(varval)
#define VECTEUR_UNDEFINED_P(v)

References constant_p(), NORMALIZE_EXPRESSION, normalized_linear, normalized_linear_p, term_cst, VECTEUR_NUL_P, vecteur_succ, and VECTEUR_UNDEFINED_P.

Referenced by array_with_numerical_bounds_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expressions_to_entities()

list expressions_to_entities ( list  expressions)

map expression_to_entity on expressions

Parameters
expressionsxpressions

Definition at line 3161 of file expression.c.

3162 {
3163  list entities = NIL;
3164  FOREACH(EXPRESSION,exp,expressions)
3166  return gen_nreverse(entities);
3167 }
entity expression_to_entity(expression e)
just returns the entity of an expression, or entity_undefined
Definition: expression.c:3140

References CONS, ENTITY, exp, EXPRESSION, expression_to_entity(), FOREACH, gen_nreverse(), and NIL.

Referenced by do_array_expansion(), do_solve_hardware_constraints_on_nb_proc(), generate_full_copy(), handle_independent_directive(), handle_reduction_directive(), rectangularization_region(), and statement_insertion_fix_access().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ expressions_to_operation()

expression expressions_to_operation ( const list  l_exprs,
entity  op 
)

take a list of expression and apply a binary operator between all of them and return it as an expression

Returns
the operations as an expression
Parameters
l_exprs,thelist of expressions to compute with the operator
op,thebinary operator to apply
Parameters
l_exprs_exprs
opp

Definition at line 3544 of file expression.c.

3544  {
3546  if ((l_exprs != NIL) && (op != entity_undefined)){
3547  list l_src = l_exprs;
3548  result = EXPRESSION (CAR (l_src));
3549  POP(l_src);
3550  FOREACH (EXPRESSION, ex, l_src) {
3551  list args = gen_expression_cons (result, NIL);
3552  args = gen_expression_cons (ex, args);
3553  call c = make_call (op, args);
3554  result = call_to_expression (c);
3555  }
3556  }
3557  return result;
3558 }
list gen_expression_cons(expression p, list l)
Definition: ri.c:866

References call_to_expression(), CAR, entity_undefined, EXPRESSION, expression_undefined, FOREACH, gen_expression_cons(), make_call(), NIL, and POP.

Referenced by add_loop_parallel_threshold(), make_send_receive_conversion(), and merge_conditions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ExpressionToInt()

int ExpressionToInt ( expression  e)

this function computes the value of an integer constant expression and returns it to the calling function.

it aborts if the expression is not constant.

See expression_integer_value() to check before aborting

Definition at line 562 of file size.c.

563 {
564  value v;
565  constant c;
566  int i = -1;
567 
568  v = EvalExpression(e);
569 
570  if (value_constant_p(v)) {
571  c = value_constant(v);
572  if (constant_int_p(c)) {
573  i = constant_int(c);
574  }
575  else {
576  pips_internal_error("integer constant expected");
577  }
578  }
579  else {
580  pips_internal_error("constant expected\n");
581  }
582 
583  free_value(v);
584  return i;
585 }

References constant_int, constant_int_p, EvalExpression(), free_value(), pips_internal_error, value_constant, and value_constant_p.

Referenced by get_entity_dimensions(), OffsetOfReference(), SizeOfRange(), and ValueOfIthLowerBound().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ extended_expression_constant_p()

bool extended_expression_constant_p ( expression  exp)

Returns true if the value of the expression does not depend syntactically on the current store.

Returns false when this has not been proved.

The only constant references in PIPS internal representation are references to functions and to declared constants.

Check that all arguments are constant

Certainly true for Fortran. Quid for C?

does not make much sense... for a function!

Let's be conservative

There might be another case of constant expressions: all that are casted to void... Usage?

This should be a constant, except for dependent types.

Parameters
expxp

Definition at line 2461 of file expression.c.

2462 {
2464  bool constant_p = false;
2465 
2466  switch(syntax_tag(s)) {
2467  case is_syntax_reference: {
2468  /* The only constant references in PIPS internal representation
2469  are references to functions and to declared constants. */
2470  reference r = syntax_reference(s);
2471  entity v = reference_variable(r);
2472  type t = ultimate_type(entity_type(v));
2473 
2475  break;
2476  }
2477  case is_syntax_range: {
2478  range r = syntax_range(s);
2479  expression lb = range_lower(r);
2480  expression ub = range_upper(r);
2481  expression inc = range_increment(r);
2482 
2486  break;
2487  }
2488  case is_syntax_call: {
2489  call c = syntax_call(s);
2490  entity f = call_function(c);
2491  value v = entity_initial(f);
2492  switch(value_tag(v)) {
2493  case is_value_constant:
2494  constant_p = true;
2495  break;
2496  case is_value_intrinsic: {
2497  /* Check that all arguments are constant */
2498  list args = call_arguments(c);
2499  constant_p = true;
2500  FOREACH(EXPRESSION, sub_exp, args) {
2502  }
2503  break;
2504  }
2505  case is_value_symbolic:
2506  /* Certainly true for Fortran. Quid for C? */
2507  constant_p = true;
2508  break;
2509  case is_value_expression: {
2510  /* does not make much sense... for a function! */
2511  expression sub_exp = value_expression(v);
2513  break;
2514  }
2515  case is_value_unknown:
2516  case is_value_code:
2517  default:
2518  /* Let's be conservative */
2519  constant_p = false;
2520  }
2521  break;
2522  }
2523  case is_syntax_cast: {
2524  /* There might be another case of constant expressions: all that
2525  are casted to void... Usage? */
2526  cast c = syntax_cast(s);
2527  expression sub_exp = cast_expression(c);
2529  break;
2530  }
2532  /* This should be a constant, except for dependent types. */
2534  type t = type_undefined;
2535  if(sizeofexpression_type_p(soe))
2536  t = copy_type(sizeofexpression_type(soe));
2537  else {
2539  t = expression_to_type(se);
2540  }
2541  // constant_p = !dependent_type_p(t);
2543  free_type(t);
2544  break;
2545  }
2546  case is_syntax_subscript:
2547  break;
2548  case is_syntax_application:
2549  break;
2550  case is_syntax_va_arg:
2551  break;
2552  default:
2553  pips_internal_error("Unexpected syntax tag %d", syntax_tag(s));
2554  }
2555  return constant_p;
2556 }
#define range_upper(x)
Definition: ri.h:2290
@ is_value_expression
Definition: ri.h:3036
#define range_increment(x)
Definition: ri.h:2292

References call_arguments, call_function, cast_expression, const_variable_p(), constant_p(), copy_type(), entity_initial, entity_type, exp, EXPRESSION, expression_syntax, expression_to_type(), f(), FOREACH, free_type(), is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, is_value_code, is_value_constant, is_value_expression, is_value_intrinsic, is_value_symbolic, is_value_unknown, pips_internal_error, range_increment, range_lower, range_upper, reference_variable, sizeofexpression_expression, sizeofexpression_type, sizeofexpression_type_p, syntax_call, syntax_cast, syntax_range, syntax_reference, syntax_sizeofexpression, syntax_tag, type_functional_p, type_undefined, ultimate_type(), value_expression, value_tag, and variable_length_array_type_p().

Referenced by dependent_type_p(), do_simdizer_init(), do_terapix_remove_divide(), redeclaration_enter_statement(), references_must_conflict_p(), and variable_length_array_type_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ extended_integer_constant_expression_p()

bool extended_integer_constant_expression_p ( expression  e)

More extensive than next function.

Definition at line 858 of file expression.c.

859 {
860  value v = EvalExpression(e);
861  bool ice_p = false;
862 
863  if(value_constant_p(v)) {
864  constant c = value_constant(v);
865 
866  ice_p = constant_int_p(c);
867  }
868  free_value(v);
869  return ice_p;
870 }

References constant_int_p, EvalExpression(), free_value(), value_constant, and value_constant_p.

Referenced by constant_points_to_indices_p(), effect_to_store_independent(), incrementation_expression_to_increment(), opgen_may_vreference(), points_to_indices_to_subscript_indices(), proper_to_summary_simple_effect(), reference_to_points_to_translations(), reference_with_constant_indices_p(), reference_with_store_independent_indices(), reference_with_unbounded_indices_p(), and store_independent_points_to_indices_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ extended_integer_constant_expression_p_to_int()

bool extended_integer_constant_expression_p_to_int ( expression  e,
int result 
)
Parameters
resultesult

Definition at line 874 of file expression.c.

875 {
876  value v = EvalExpression(e);
877  bool ice_p = false;
878 
879  if(value_constant_p(v)) {
880  constant c = value_constant(v);
881 
882  ice_p = constant_int_p(c);
883  if (ice_p) *result = constant_int(c);
884  }
885  free_value(v);
886  return ice_p;
887 }

References constant_int, constant_int_p, EvalExpression(), free_value(), value_constant, and value_constant_p.

Referenced by perform_array_element_substitutions_in_transformer(), range_contains_at_least_one_point_p(), and range_contains_nothing_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ extern_entity_p()

bool extern_entity_p ( entity  module,
entity  e 
)

There are two cases for "extern"

  • The current module is a compilation unit and the entity is in the ram_shared list of the ram storage of the compilation unit.
  • The current module is a normal function and the entity has a global scope.

bool isbelong = true; list ld = entity_declarations(m); ifdebug(1) { pips_assert("e is visible in module",gen_in_list_p(e,ld)); pips_assert("module is a module or compilation unit",entity_module_p(m)||compilation_unit_entity_p(m)); pips_assert("e is either variable or function", variable_entity_p(e),functional_entity_p(e)); } if(variable_entity_p(e)) { if (compilation_unit_entity_p(m){ return(strstr(entity_name(e), } else { return(strstr(entity_name(e),TOP_LEVEL_MODULE_NAME) != NULL); } } else return(static_module_name_p(e));

return ((compilation_unit_entity_p(module) && gen_in_list_p(e,ram_shared(storage_ram(entity_storage(module))))) ||(!compilation_unit_entity_p(module) && (strstr(entity_name(e),TOP_LEVEL_MODULE_NAME) != NULL)));

Parameters
moduleodule

Definition at line 1977 of file entity.c.

1978 {
1979  /* There are two cases for "extern"
1980 
1981  - The current module is a compilation unit and the entity is in
1982  the ram_shared list of the ram storage of the compilation unit.
1983 
1984  - The current module is a normal function and the entity has a
1985  global scope.
1986 */
1987  // Check if e belongs to module
1988  /* bool isbelong = true;
1989  list ld = entity_declarations(m);
1990  //ifdebug(1) {
1991  pips_assert("e is visible in module",gen_in_list_p(e,ld));
1992  // pips_assert("module is a module or compilation unit",entity_module_p(m)||compilation_unit_entity_p(m));
1993  pips_assert("e is either variable or function", variable_entity_p(e),functional_entity_p(e));
1994  //}
1995  if(variable_entity_p(e))
1996  //{
1997  if (compilation_unit_entity_p(m){
1998  // return(strstr(entity_name(e),
1999  //}
2000  //else
2001  {
2002  //return(strstr(entity_name(e),TOP_LEVEL_MODULE_NAME) != NULL);
2003  //}
2004  //}
2005  //else
2006  //return(static_module_name_p(e));
2007  */
2008  /* return ((compilation_unit_entity_p(module) && gen_in_list_p(e,ram_shared(storage_ram(entity_storage(module)))))
2009  ||(!compilation_unit_entity_p(module) && (strstr(entity_name(e),TOP_LEVEL_MODULE_NAME) != NULL)));
2010  */
2012  ||(!compilation_unit_entity_p(module) && (strstr(entity_name(e),TOP_LEVEL_MODULE_NAME) != NULL)));
2013 
2014 }

References code_externs, compilation_unit_entity_p(), entity_initial, entity_name, gen_in_list_p(), module, TOP_LEVEL_MODULE_NAME, and value_code.

Referenced by inline_expression_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ extract_references_from_declarations()

list extract_references_from_declarations ( list  decls)

FI: this function has not yet been extended for C types!!!

Parameters
declsecls

Definition at line 2834 of file entity.c.

2835 {
2836  list arrays = NIL;
2837  deux_listes lref = { NIL, NIL };
2838 
2839  FOREACH(ENTITY,e,decls) {
2840  type t = entity_type(e);
2841 
2843  arrays = CONS(VARIABLE,type_variable(t), arrays);
2844  }
2845 
2846  FOREACH(VARIABLE,v,arrays)
2847  {
2848  list ldim = variable_dimensions(v);
2849  while (!ENDP(ldim))
2850  {
2851  dimension d = DIMENSION(CAR(ldim));
2853  ldim=CDR(ldim);
2854  }
2855  }
2856  gen_free_list(lref.le);
2857 
2858  return(lref.lr);
2859 }
static void make_uniq_reference_list(reference r, deux_listes *l)
Definition: entity.c:2818
#define VARIABLE(x)
VARIABLE.
Definition: ri.h:3089
list lr
Definition: entity.c:2816
list le
Definition: entity.c:2816

References CAR, CDR, CONS, DIMENSION, ENDP, ENTITY, entity_type, FOREACH, gen_context_recurse, gen_free_list(), gen_true2(), deux_listes::le, deux_listes::lr, make_uniq_reference_list(), NIL, reference_domain, type_variable, type_variable_p, VARIABLE, and variable_dimensions.

Referenced by UpdateEntity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ false_expression_p()

bool false_expression_p ( expression  e)

Definition at line 1118 of file expression.c.

1119 {
1121 }

References FALSE_OPERATOR_NAME, and operator_expression_p().

+ Here is the call graph for this function:

◆ fcd_directive_p()

bool fcd_directive_p ( entity  f)

Definition at line 90 of file hpfc.c.

91 {
92  return top_level_entity_p(f) &&
94 }
bool fcd_directive_string_p(const char *s)
Definition: hpfc.c:80

References entity_local_name(), f(), fcd_directive_string_p(), and top_level_entity_p().

+ Here is the call graph for this function:

◆ fcd_directive_string_p()

bool fcd_directive_string_p ( const char *  s)

Definition at line 80 of file hpfc.c.

81 {
88 }
#define TIMEON_SUFFIX
#define SYNCHRO_SUFFIX
#define HOSTSECTION_SUFFIX
#define TIMEOFF_SUFFIX
#define TELL_SUFFIX
suffixes for my own (FCD:-) directives.

References DEAD_SUFFIX, HOSTSECTION_SUFFIX, HPF_PREFIX, same_string_p, SYNCHRO_SUFFIX, TELL_SUFFIX, TIMEOFF_SUFFIX, and TIMEON_SUFFIX.

Referenced by fcd_directive_p(), and keep_directive_in_code_p().

+ Here is the caller graph for this function:

◆ field_expression_p()

bool field_expression_p ( expression  e)

The expression is of kind "a", where "a" is a field of some struct "s".

Definition at line 498 of file expression.c.

499 {
500  return expression_reference_p(e)
502 }
bool entity_field_p(entity e)
e is the field of a structure
Definition: entity.c:857

References entity_field_p(), expression_reference(), expression_reference_p(), and reference_variable.

Referenced by complete_points_to_reference_with_fixed_subscripts(), opkill_may_vreference(), and reference_with_constant_indices_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FILE_star_type_p()

bool FILE_star_type_p ( type  t)

Definition at line 3046 of file type.c.

3047 {
3048  bool res = false;
3049  if (type_variable_p(t))
3050  {
3052  if (basic_pointer_p(b))
3053  {
3054  t = basic_pointer(b);
3055  if (type_variable_p(t))
3056  {
3058  if (basic_derived_p(b))
3059  {
3060  entity te = basic_derived(b);
3061  if (strstr(entity_name(te), "_IO_FILE") != NULL)
3062  {
3063  res = true;
3064  }
3065  }
3066  }
3067  }
3068  }
3069  return res;
3070 }

References basic_derived, basic_derived_p, basic_pointer, basic_pointer_p, entity_name, type_variable, type_variable_p, and variable_basic.

◆ filter_variables_in_pragma_expr()

list filter_variables_in_pragma_expr ( list  l_expr,
list  to_filter 
)

filter out a pragma (expression list) removing all requested variables @params l_expr is the list of expressions to filter @params to_filter is the list of entities to remove from l_pragma

ifdebug(5) {

pips_debug(5,"Handling expression : ");

print_expression(expr);

}

Parameters
l_expr_expr
to_filtero_filter

Definition at line 256 of file pragma.c.

257  {
258 
259  // If all variable in exp are removed, we remove the expr from the list
260  list expr_to_remove = NIL;
261 
262  FOREACH (EXPRESSION, expr, l_expr) {
263  // Get the list of arguments, to filter out
264  call c = expression_call(expr);
265  list args = call_arguments (c);
266 
267  // The list where we will record arg to remove from args
268  list entity_to_remove = NIL;
269 
270  // FI: to avoid cycles between librairies ri-util and prettyprint
271  /* ifdebug(5) { */
272  /* pips_debug(5,"Handling expression : "); */
273  /* print_expression(expr); */
274  /* } */
275  if(is_expression_omp_private_p(expr)) {
276  // Handle private omp clause
277  // Lookup each requested entities
278  FOREACH(ENTITY, e, to_filter)
279  {
280  FOREACH (EXPRESSION, exp, args)
281  {
282  pips_debug(6,"Matching %s against %s\n",entity_name(e),
284  if(expression_to_entity(exp) == e) {
285  entity_to_remove = gen_expression_cons(exp, entity_to_remove);
286  break;
287  }
288  }
289  }
290  FOREACH(EXPRESSION,exp,entity_to_remove)
291  {
293  }
294  if(ENDP(call_arguments(c))) {
295  expr_to_remove = gen_expression_cons(expr, expr_to_remove);
296  }
297  } else if(is_expression_omp_if_p(expr)) {
298  // FIXME : todo, merge with previous case ?
299  } else if(is_expression_omp_reduction_p(expr)) {
300  // FIXME : shouldn't be a problem ! (handled before)
301  } else if(is_expression_omp_omp_p(expr) || is_expression_omp_for_p(expr)
302  || is_expression_omp_parallel_p(expr)) {
303  // FIXME : is there anything to do here ?
304  } else {
305  pips_debug(0,"Unsupported case : ");
306  // FI: to avoid cycles between librairies ri-util and prettyprint
307  // print_expression(expr);
308  pips_internal_error("We don't know how to handle this omp clause !");
309  }
310  }
311  //Remove expression that are now empty
312  FOREACH(EXPRESSION,expr,expr_to_remove) {
313  gen_remove(&l_expr, expr);
314  }
315 
316  return l_expr;
317 }
static bool is_expression_omp_omp_p(expression exp)
Definition: pragma.c:73
static bool is_expression_omp_parallel_p(expression exp)
Definition: pragma.c:83
static bool is_expression_omp_reduction_p(expression exp)
Definition: pragma.c:68
static bool is_expression_omp_for_p(expression exp)
Definition: pragma.c:78
static bool is_expression_omp_private_p(expression exp)
Definition: pragma.c:58
static bool is_expression_omp_if_p(expression exp)
Definition: pragma.c:63

References call_arguments, ENDP, ENTITY, entity_name, exp, EXPRESSION, expression_call(), expression_to_entity(), FOREACH, gen_expression_cons(), gen_remove(), is_expression_omp_for_p(), is_expression_omp_if_p(), is_expression_omp_omp_p(), is_expression_omp_parallel_p(), is_expression_omp_private_p(), is_expression_omp_reduction_p(), NIL, pips_debug, and pips_internal_error.

Referenced by merge_on_outer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ find_enum_of_member()

entity find_enum_of_member ( entity  m)

if m was declared in the compilation unit cu and used elsewhere, cu may not be parsed yet.

Not good in general, but should work for compilation units...

No, it does not...

Definition at line 2713 of file entity.c.

2714 {
2717  list sdl = list_undefined;
2718  list fdl = list_undefined;
2719 
2720  if(compilation_unit_entity_p(mod)) {
2721  /* if m was declared in the compilation unit cu and used elsewhere, cu may not be parsed yet. */
2722  sdl = NIL;
2723  }
2724  else {
2725  /* Not good in general, but should work for compilation units... */
2726  /* No, it does not... */
2727  sdl = entity_declarations(mod);
2728  }
2729  fdl = gen_nconc(gen_copy_seq(dl), gen_copy_seq(sdl));
2730 
2731  entity ee = entity_undefined;
2732 
2733  ifdebug(8) {
2734  pips_debug(8, "Declarations for enclosing module \"\%s\": \"", entity_name(mod));
2735  print_entities(dl);
2736  //print_entities(sdl);
2737  fprintf(stderr, "\"\n");
2738  }
2739 
2740  FOREACH(ENTITY, e,fdl) {
2741  if(entity_enum_p(e)) {
2742  list ml = type_enum(entity_type(e));
2743 
2744  pips_debug(8, "Checking enum \"\%s\"\n", entity_name(e));
2745 
2746  if(gen_in_list_p((void *) m, ml)) {
2747  ee = e;
2748  break;
2749  }
2750  ifdebug(8) {
2751  if(entity_undefined_p(ee)) {
2752  pips_debug(8, "Member \"\%s\" not found in enum \"\%s\"\n",
2753  entity_name(m), entity_name(e));
2754  }
2755  else {
2756  pips_debug(8, "Member \"\%s\" found in enum \"\%s\"\n",
2757  entity_name(m), entity_name(e));
2758  }
2759  }
2760  }
2761  }
2762 
2763  pips_assert("enum entity is found", !entity_undefined_p(ee));
2764  gen_free_list(fdl);
2765 
2766  return ee;
2767 }
#define entity_declarations(e)
MISC: newgen shorthands.
entity entity_to_module_entity(entity e)
Find the enclosing module of an entity.
Definition: entity.c:2053

References code_declarations, compilation_unit_entity_p(), ENTITY, entity_declarations, entity_enum_p(), entity_initial, entity_name, entity_to_module_entity(), entity_type, entity_undefined, entity_undefined_p, FOREACH, fprintf(), gen_copy_seq(), gen_free_list(), gen_in_list_p(), gen_nconc(), ifdebug, list_undefined, NIL, pips_assert, pips_debug, print_entities(), type_enum, and value_code.

Referenced by constant_expression_supporting_references(), and generic_constant_expression_supporting_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ find_field_in_field_list()

entity find_field_in_field_list ( entity  f,
list  fl 
)

To deal with fields declared in different C files.

It is assumed that f and fl belong to the same derived type, be it a struct, a union or an enum.

Parameters
fll

Definition at line 5401 of file type.c.

5402 {
5403  entity nf = entity_undefined;
5404  if(entity_is_argument_p(f, fl))
5405  nf = f;
5406  else {
5407  string fn = (string) entity_user_name(f);
5408  FOREACH(ENTITY, of, fl) {
5409  string ofn = (string) entity_user_name(of);
5410  if(same_string_p(fn, ofn)) {
5411  nf = of;
5412  break;
5413  }
5414  }
5415  }
5416  return nf;
5417 }
char * string
STRING.
Definition: newgen_types.h:39

References ENTITY, entity_is_argument_p(), entity_undefined, entity_user_name(), f(), FOREACH, and same_string_p.

Referenced by reference_add_field_dimension().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ find_ith_argument()

expression find_ith_argument ( list  args,
int  n 
)

◆ find_ith_dimension()

dimension find_ith_dimension ( list  dims,
int  n 
)

This function returns the ith dimension of a list of dimensions.

Parameters
dimsims

Definition at line 5621 of file type.c.

5622 {
5623  int i;
5624  pips_assert("find_ith_dimension", n > 0);
5625  for(i=1; i<n && !ENDP(dims); i++, POP(dims))
5626  ;
5627  if(i==n && !ENDP(dims))
5628  return DIMENSION(CAR(dims));
5629  return dimension_undefined;
5630 }
#define dimension_undefined
Definition: ri.h:955

References CAR, DIMENSION, dimension_undefined, ENDP, pips_assert, and POP.

Referenced by array_size_stride(), assumed_size_array_p(), bottom_up_abc_base_reference_implied_do(), bottom_up_abc_reference(), pointer_type_array_p(), same_dimension_p(), size_of_actual_array(), size_of_dummy_array(), subscript_value(), subscript_value_stride(), top_down_abc_dimension(), and xml_Pattern_Paving().

+ Here is the caller graph for this function:

◆ find_ith_expression()

expression find_ith_expression ( list  le,
int  r 
)

find_ith_expression() is obsolet; use find_ith_argument() instead

the first element is one

two local variables, useless but for debugging

Parameters
lee

Definition at line 1161 of file expression.c.

1162 {
1163  /* the first element is one */
1164  /* two local variables, useless but for debugging */
1165  list cle;
1166  int i;
1167 
1168  pips_assert("find_ith_expression", r > 0);
1169 
1170  for(i=r, cle=le ; i>1 && !ENDP(cle); i--, POP(cle))
1171  ;
1172 
1173  if(ENDP(cle))
1174  pips_internal_error("not enough elements in expresion list");
1175 
1176  return EXPRESSION(CAR(cle));
1177 }

References CAR, ENDP, EXPRESSION, pips_assert, pips_internal_error, and POP.

Referenced by set_dimensions_of_local_variable_family().

+ Here is the caller graph for this function:

◆ find_ith_formal_parameter()

entity find_ith_formal_parameter ( entity  the_fnct,
int  rank 
)

This function gives back the ith formal parameter, which is found in the declarations of a call or a subroutine.

Parameters
the_fncthe_fnct
rankank

Definition at line 1863 of file entity.c.

1864 {
1865  list ldecl = code_declarations(value_code(entity_initial(the_fnct)));
1867 
1868  while (ldecl != NULL)
1869  {
1870  current = ENTITY(CAR(ldecl));
1871  ldecl = CDR(ldecl);
1873  return current;
1874  }
1875 
1876  pips_internal_error("cannot find the %d dummy argument of %s",
1877  rank, entity_name(the_fnct));
1878 
1879  return entity_undefined;
1880 }
#define declaration_formal_p(E)
Definition: entity.c:1857
#define entity_to_offset(E)
Definition: entity.c:1858
static size_t current
Definition: string.c:115

References CAR, CDR, code_declarations, current, declaration_formal_p, ENTITY, entity_initial, entity_name, entity_to_offset, entity_undefined, pips_internal_error, rank, and value_code.

Referenced by add_aliases_for_current_call_site(), check_call_one_mode(), compare_formal_parameters(), interprocedural_mapping(), real_regions_forward_translation(), same_or_equivalence_argument_add_aliases(), xml_Arguments(), xml_FormalVariables(), xml_ParameterUseToArrayBound(), and xml_TaskParameters().

+ Here is the caller graph for this function:

◆ find_ith_parameter()

entity find_ith_parameter ( entity  e,
int  i 
)

Definition at line 93 of file util.c.

94 {
96 
97  if (! entity_module_p(e)) {
98  pips_internal_error("entity %s is not a module",
99  entity_name(e));
100  }
101  while (pv != NIL) {
102  entity v = ENTITY(CAR(pv));
103  type tv = entity_type(v);
104  storage sv = entity_storage(v);
105  // FI: locations.c should be part of ri-util or a large entity library
106  value val = entity_initial(v); // To check location entities
107 
108  // FI: the initial value of formal parameters may be value_undefined...
109  // See Semantics-New/block01.c, formal parameter i of multiply
110  if (type_variable_p(tv)
111  && storage_formal_p(sv)
112  && (value_undefined_p(val) || !value_reference_p(val))) {
113  if (formal_offset(storage_formal(sv)) == i) {
114  return(v);
115  }
116  }
117 
118  pv = CDR(pv);
119  }
120 
121  return(entity_undefined);
122 }
#define formal_offset(x)
Definition: ri.h:1408
#define value_reference_p(x)
Definition: ri.h:3083

References CAR, CDR, code_declarations, ENTITY, entity_initial, entity_module_p(), entity_name, entity_storage, entity_type, entity_undefined, formal_offset, NIL, pips_internal_error, storage_formal, storage_formal_p, type_variable_p, value_code, value_reference_p, and value_undefined_p.

Referenced by add_bound_arguments(), any_user_call_site_to_transformer(), compute_points_to_binded_set(), drop_distributed_arguments(), generic_substitute_formal_array_elements_in_transformer(), gpu_xml_dump(), hpfc_call_with_distributed_args_p(), hpfc_translate_call_with_distributed_args(), outliner_file(), RemoveDummyArguments(), update_overlaps_in_caller(), and words_parameters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ find_label_entity()

entity find_label_entity ( const char *  module_name,
const char *  label_local_name 
)

util.c

util.c

Some functions could be moved to non-generic files such as entity.c. To deal with labels

Parameters
module_nameodule_name
label_local_nameabel_local_name

Definition at line 43 of file util.c.

44 {
47 
48  pips_debug(5, "searched entity: %s\n", full);
49  void * found = gen_find_tabulated(full, entity_domain);
50  return (entity) (gen_chunk_undefined_p(found) ? entity_undefined : found);
51 }
#define LABEL_PREFIX
Definition: naming-local.h:31
const char * label_local_name(entity e)
END_EOLE.
Definition: entity.c:604
@ full
Definition: union-local.h:65

References concatenate(), entity_domain, entity_undefined, full, gen_chunk_undefined_p, gen_find_tabulated(), label_local_name(), LABEL_PREFIX, module_name(), MODULE_SEP_STRING, and pips_debug.

Referenced by find_statement_from_label_name(), full_unroll(), get_loop_execution_parallel(), inlining_regenerate_labels(), interactive_loop_transformation(), kernelize(), label_string_defined_in_current_module_p(), label_string_defined_in_statement_p(), loop_auto_unroll(), loop_expansion(), loop_expansion_init(), loop_pragma(), module_loops(), print_loopnest_dependence_cone(), set_loop_execution_parallel(), simdizer_auto_tile(), strip_mine(), symbolic_tiling(), unroll(), and words_regular_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ find_or_create_scalar_entity()

entity find_or_create_scalar_entity ( const char *  name,
const char *  module_name,
tag  base 
)

Looks for an entity which should be a scalar of the specified basic.

If found, returns it, else one is created.

If the entity is not a scalar, it aborts.

Parameters
nameame
module_nameodule_name
basease

Definition at line 1025 of file variable.c.

1026 {
1028  string nom = concatenate(module_name, MODULE_SEP_STRING, name, NULL);
1029 
1031  {
1032  pips_assert("find_or_create_scalar_entity",
1033  (entity_scalar_p(e) && entity_basic_p(e, base)));
1034 
1035  return(e);
1036  }
1037 
1038  return(make_scalar_entity(name, module_name, MakeBasic(base)));
1039 }
bdt base
Current expression.
Definition: bdt_read_paf.c:100
entity make_scalar_entity(const char *name, const char *module_name, basic base)
entity make_scalar_entity(name, module_name, base)
Definition: variable.c:331
bool entity_basic_p(entity e, enum basic_utype basictag)
return true if the basic associated with entity e matchs the passed tag
Definition: entity.c:1405
basic MakeBasic(int)
END_EOLE.
Definition: type.c:128

References base, concatenate(), entity_basic_p(), entity_domain, entity_scalar_p(), entity_undefined, gen_find_tabulated(), make_scalar_entity(), MakeBasic(), module_name(), MODULE_SEP_STRING, and pips_assert.

Referenced by create_state_variable(), get_ith_dummy(), make_host_and_node_modules(), and region_entity_variable_to_new_declare_entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ find_or_create_typed_entity()

entity find_or_create_typed_entity ( string  name,
const char *  module_name,
tag  base 
)

Looks for an entity of the specified basic.

If found, returns it, else one is created.

Parameters
nameame
module_nameodule_name
basease

Definition at line 1046 of file variable.c.

1050 {
1052  string nom = concatenate(module_name, MODULE_SEP_STRING, name, NULL);
1053 
1055  {
1056  pips_assert("type is okay", entity_basic_p(e, base));
1057 
1058  return(e);
1059  }
1060 
1061  return(make_scalar_entity(name, module_name, MakeBasic(base)));
1062 }

References base, concatenate(), entity_basic_p(), entity_domain, entity_undefined, gen_find_tabulated(), make_scalar_entity(), MakeBasic(), module_name(), MODULE_SEP_STRING, and pips_assert.

Referenced by argument_bound_entity(), and hpfc_init_run_time_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindEntity()

entity FindEntity ( const char *  package,
const char *  name 
)

Retrieve an entity from its package/module name and its local name.

Returns
the entity if found, else entity_undefined
Parameters
packageackage
nameame

Definition at line 1503 of file entity.c.

1503  {
1506  name,
1507  NULL ),
1508  entity_domain );
1509 }
static char * package
The package name in which functions will be defined.
Definition: genLisp.c:59

References concatenate(), entity_domain, gen_find_tabulated(), MODULE_SEP_STRING, and package.

Referenced by abstract_locations_max(), add_entity_to_declarations(), add_new_compilation_unit(), add_new_module_from_text(), alloc_instrumentation(), c_return_to_transformer(), c_user_function_call_to_transformer(), clean_up_sequences_rewrite(), create_private_integer_variable_for_new_module(), create_private_variable_for_new_module(), CreateAbstractStateVariable(), CreateLogicalUnits(), cstr_args_check(), do_split_structure(), entity_all_module_locations(), entity_in_module(), entity_locations_max(), entity_more_or_less_minimal_name(), find_or_create_allocatable_struct(), FindEntityFromLocalName(), FindEntityFromUserName(), FindOrCreateEntity(), FindOrMakeDefaultIntrinsic(), FindOrMakeIntrinsic(), fortran_user_function_call_to_transformer(), generate_compact(), generic_function_to_return_value(), generic_make_entity_copy_with_new_name(), GenericAddLocalEntityToDeclarations(), get_typedefed_array(), GetFullyDefinedReturnCodeVariable(), GetReturnCodeVariable(), gfc2pips_symbol2entity(), heap_effect(), inline_expression_call(), intrinsic_name_p(), io_comp_regions(), local_name_to_top_level_entity(), make_array_entity(), make_C_print_statement(), make_check_io_statement(), make_data_field(), make_emulated_shared_variable(), make_get_rc_statement(), make_global_entity_from_local(), make_new_entity(), make_new_local_variables(), make_return_statement(), make_scalar_entity(), make_scalar_integer_entity(), make_stderr_variable(), MakeCurrentFunction(), MakeDataStatement(), MakeDataValueSet(), MakeIoFileArray(), module_to_dynamic_area(), module_to_heap_area(), mpi_make_ctx(), NameToCommon(), new_label_local_name(), new_synonym(), outliner_independent(), rename_op(), RenameFunctionEntity(), replace_expression_similar_to_pattern(), replace_indices_region(), replace_indices_region_com(), retype_formal_parameters(), SafeFindOrCreateEntity(), sesam_buffer_to_server_entity(), set_rc_function(), set_std_static_entities(), sprintf_check_expression(), std_file_entity_to_pointed_file_entity(), string_to_entity(), and UpdateEntity2().

+ Here is the call graph for this function:

◆ FindEntityFromUserName()

entity FindEntityFromUserName ( const char *  package,
const char *  name 
)
Parameters
packageackage
nameame

Definition at line 1520 of file entity.c.

1520  {
1521  entity e = FindEntity(package, name);
1522  if ( entity_undefined_p(e) ) {
1525  name,
1526  NULL ),
1527  entity_domain );
1528  }
1529  if ( entity_undefined_p(e) ) {
1532  name,
1533  NULL ),
1534  entity_domain );
1535  }
1536  return e;
1537 }
#define BLOCK_SEP_STRING
Scope separator.
Definition: naming-local.h:50
entity FindEntity(const char *package, const char *name)
Retrieve an entity from its package/module name and its local name.
Definition: entity.c:1503

References BLOCK_SEP_STRING, concatenate(), entity_domain, entity_undefined_p, FindEntity(), gen_find_tabulated(), MODULE_SEP_STRING, and package.

Referenced by normalize_microcode_anotate(), sesam_buffer_to_server_entity(), and terapix_optimize_accumulator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindIthDimension()

dimension FindIthDimension ( entity  e,
int  i 
)

Definition at line 1180 of file type.c.

1181 {
1182  cons * pc;
1183 
1184  if (!type_variable_p(entity_type(e)))
1185  pips_internal_error("not a variable");
1186 
1187  if (i <= 0)
1188  pips_internal_error("invalid dimension");
1189 
1191 
1192  while (pc != NULL && --i > 0)
1193  pc = CDR(pc);
1194 
1195  if (pc == NULL)
1196  pips_internal_error("not enough dimensions");
1197 
1198  return(DIMENSION(CAR(pc)));
1199 }

References CAR, CDR, DIMENSION, entity_type, pips_internal_error, type_variable, type_variable_p, and variable_dimensions.

Referenced by array_ranges_to_template_ranges(), complementary_range(), compute_receive_content(), create_init_common_param_for_arrays(), create_parameters_h(), expr_compute_local_index(), generate_one_message(), make_guard_expression(), processor_number(), same_alignment_p(), template_cell_local_mapping(), and template_ranges_to_processors_ranges().

+ Here is the caller graph for this function:

◆ FindOrCreateEntity()

entity FindOrCreateEntity ( const char *  package,
const char *  local_name 
)

Problem: A functional global entity may be referenced without parenthesis or CALL keyword in a function or subroutine call.

See SafeFindOrCreateEntity().

Parameters
packagepackage name
local_nameentity name

Definition at line 1586 of file entity.c.

1588 {
1589  entity e;
1592  }
1593  return e;
1594 }
entity CreateEntity(const char *package_name, const char *local_name)
BEGIN_EOLE.
Definition: entity.c:1572

References CreateEntity(), entity_undefined_p, FindEntity(), local_name(), and package.

Referenced by AddVariableToCommon(), adg_get_integer_entity(), adg_rename_entities(), cast_STEP_ARG(), CheckLeftHandSide(), CleanUpEntity(), create_pointer_to_array_stub_points_to(), create_stub_entity(), create_stub_points_to(), CreateEntityFromLocalNameAndPrefix(), CreateIntrinsic(), CreateReturnEntity(), entity_all_module_xxx_locations(), entity_all_module_xxx_locations_typed(), entity_all_xxx_locations(), entity_all_xxx_locations_typed(), entity_flow_or_context_sentitive_heap_location(), entity_null_locations(), expression_try_find_size(), FindOrCreateCurrentEntity(), FindOrCreateTopLevelEntity(), FixCInternalLabels(), freia_data2d_field(), get_current_compilation_unit_entity(), get_top_level_entity(), get_typedefed_array(), get_use_entities_list(), GetReturnCodeVariable(), gfc2pips_char2entity(), gfc2pips_expr2entity(), gfc2pips_expr2expression(), gfc2pips_exprIO3(), gfc2pips_getTypesDeclared(), gfc2pips_namespace(), gfc2pips_parameters(), gfc2pips_symbol2data_instruction(), gfc2pips_symbol2entity(), gfc2pips_symbol2top_entity(), gfc2pips_vars_(), IdentifierToExpression(), init_c_areas(), init_c_implicit_variables(), InitAreas(), inline_expression_call(), inlining_regenerate_labels(), make_C_or_Fortran_constant_entity(), make_empty_module(), make_get_rc_statement(), make_global_entity_from_local(), make_label(), make_movements_loop_body_wp65(), make_new_common(), make_new_simd_vector_with_prefix(), make_nlc_entity(), make_nsp_entity(), make_nub_entity(), make_predefined_C_entities(), make_stderr_variable(), MakeCLabel(), MakeCompilationUnitEntity(), MakeCurrentFunction(), MakeEntryCommon(), MakeIoFileArray(), MakeLabel(), MakeParameterList(), MakeStorageRam(), MakeTopLevelEntity(), module_initial_parameter_pv(), mpi_initialize(), mpi_make_ctx(), mpi_type_mpi_comm(), mpi_type_mpi_request(), mpi_type_mpi_status(), NameToCommon(), NameToFunctionalEntity(), outliner_parameters(), overlap_redefine_expression(), phrase_comEngine_distributor(), phrase_distributor(), phrase_distributor_control_code(), reference_to_address_entity(), RenameFunctionEntity(), SafeLocalToGlobal(), safescale_distributor(), same_or_equivalence_argument_add_aliases(), set_internal_static_entities(), set_rc_function(), simd_replace_parameters(), std_file_entity_to_pointed_file_entity(), step_local_RT_Integer(), step_parameter(), string_to_entity_list(), SubstituteDummyParameters(), TranslateEntryFormals(), UpdateEntity2(), and UseFormalArguments().

+ Here is the call graph for this function:

◆ FindOrCreateEntityLikeModel()

entity FindOrCreateEntityLikeModel ( const char *  package,
const char *  name,
entity  model 
)

hmmm...

Parameters
packageackage
nameame
modelodel

Definition at line 3136 of file entity.c.

3140 {
3141  string new_name = concatenate(package, MODULE_SEP_STRING, name, NULL);
3142  entity new = gen_find_tabulated(new_name, entity_domain);
3143  area tmp_area = area_undefined;
3144 
3145  pips_debug(8, "entity %s to be made after %s\n",
3146  new_name, entity_name(model));
3147 
3148  ifdebug(9)
3149  pips_assert("consistent model", entity_consistent_p(model));
3150 
3151  return(!entity_undefined_p(new) ? new :
3152  make_entity(copy_string(new_name),
3153  /*
3154  * ??? some bug in copy_type disable the possibility
3155  * of copying area for instance...
3156  *
3157  * moreover I do not wish to copy the layout list
3158  * for commons.
3159  */
3160  (!type_area_p(entity_type(model)) ?
3161  copy_type(entity_type(model)) :
3163  (tmp_area = type_area(entity_type(model)),
3164  make_area(area_size(tmp_area), NIL)))),
3165  copy_storage(entity_storage(model)),
3166  copy_value(entity_initial(model))));
3167 }
area make_area(intptr_t a1, list a2)
Definition: ri.c:98
#define copy_string(s)
Definition: newgen_types.h:42
@ is_type_area
Definition: ri.h:2899
return(s1)

References area_size, area_undefined, concatenate(), copy_storage(), copy_string, copy_type(), copy_value(), entity_consistent_p(), entity_domain, entity_initial, entity_name, entity_storage, entity_type, entity_undefined_p, gen_find_tabulated(), ifdebug, is_type_area, make_area(), make_entity, make_type(), MODULE_SEP_STRING, NIL, package, pips_assert, pips_debug, type_area, and type_area_p.

Referenced by AddCommonToModule(), AddEntityToModule(), and new_synonym().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindOrCreateTopLevelEntity()

entity FindOrCreateTopLevelEntity ( const char *  name)

Return a top-level entity.

Parameters
nameof the entity to find/construct
Returns
the entity
Parameters
nameame

Definition at line 1603 of file entity.c.

1604 {
1606 }

References FindOrCreateEntity(), and TOP_LEVEL_MODULE_NAME.

Referenced by add_entity_to_declarations(), binary_intrinsic_call_to_points_to_sinks(), find_or_create_allocatable_struct(), intrinsic_call_to_points_to(), make_bound(), make_data_field(), make_strlen_expression(), set_internal_static_entities(), and std_file_entity_to_pointed_file_entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fixed_length_array_type_p()

bool fixed_length_array_type_p ( type  t)

Definition at line 2987 of file type.c.

2988 {
2989  return array_type_p(t) && !variable_length_array_type_p(t);
2990 }
bool variable_length_array_type_p(type t)
Is this equivalent to dependent_type_p()?
Definition: type.c:2972

References array_type_p(), and variable_length_array_type_p().

Referenced by do_linearize_array_manage_callers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ flatten_block_if_necessary()

void flatten_block_if_necessary ( instruction  i)

Flatten an instruction block if necessary.

Detects sequences of sequences and reorder as one sequence.

Some memory leaks. Should not be used. Use the functions from control instead.

This function cannot be used for C code as local declarations are discarded without warnings.

Definition at line 259 of file instruction.c.

260 {
261  if (instruction_block_p(i))
262  {
263  list ls = NIL;
266  if (instruction_block_p(ib))
267  ls = gen_nconc(ls, instruction_block(ib));
268  else
269  ls = gen_nconc(ls, CONS(STATEMENT, s, NIL));
270  }
272  instruction_block(i) = ls;
273  }
274 }
#define instruction_block_p(i)
#define instruction_block(i)
#define statement_instruction(x)
Definition: ri.h:2458
#define STATEMENT(x)
STATEMENT.
Definition: ri.h:2413

References CONS, FOREACH, gen_free_list(), gen_nconc(), instruction_block, instruction_block_p, NIL, STATEMENT, and statement_instruction.

+ Here is the call graph for this function:

◆ float_constant_p()

bool float_constant_p ( entity  ent)

ent can be either a numerical or a symbolic float constant

In the initial internal representation, only integer constants were distinguished

Parameters
entnt

Definition at line 487 of file constant.c.

488 {
489  bool yes_p = false;
490  type t = entity_type(ent);
491 
492  if( type_functional_p(t))
493  if(value_constant_p(entity_initial(ent))) {
495  yes_p = true;
497  /* In the initial internal representation, only integer
498  constants were distinguished */
500  type rt = functional_result(f); // ultimate type should not be
501  // useful for constants
502  // generated by a parser
503  yes_p = float_type_p(rt);
504  }
505  }
506 
507  return yes_p;
508 }

References constant_call_p, constant_float_p, entity_initial, entity_type, f(), float_type_p(), functional_result, type_functional, type_functional_p, value_constant, and value_constant_p.

Referenced by constant_to_transformer(), and simplify_float_constraint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ float_constant_to_double()

double float_constant_to_double ( entity  c)

Definition at line 639 of file constant.c.

640 {
641  double d = 0.0;
642  int i = 0;
643 
644  pips_assert("entity is constant", entity_constant_p(c));
645  pips_assert("constant is float", basic_float_p(constant_basic(c)));
646 
647  i = sscanf(module_local_name(c), "%lf", &d);
648  if(i!=1)
649  i = sscanf(module_local_name(c), "%le", &d);
650  if(i!=1)
651  i = sscanf(module_local_name(c), "%lg", &d);
652  if(i!=1)
653  pips_internal_error("No adequate format for float constant");
654 
655  return d;
656 }
basic constant_basic(entity c)
Definition: constant.c:633

References basic_float_p, constant_basic(), entity_constant_p, module_local_name(), pips_assert, and pips_internal_error.

Referenced by constant_constraint_check(), constant_to_transformer(), and simplify_float_constraint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ float_to_entity()

entity float_to_entity ( float  c)

Definition at line 430 of file constant.c.

431 {
432  string num;
433  // FI: non-significant zeroes are printed in num...
434  asprintf(&num, "%f", c);
435  // FI: the period may be skipped when the value is integer and
436  //then, for some unknown reason, semantics interprets this as an
437  //integer value, maybe because of constant = ... + float:int +...
438  //asprintf(&num, "%g", c);
439 
440  // Remove trailing zeroes.
441  string tz = num+strlen(num)-1;
442  while(*tz=='0') {
443  *tz = '\000';
444  tz--;
445  }
446 
448 
449  free(num);
450  return e;
451 }
static int num
Definition: bourdoncle.c:137

References asprintf, free(), is_basic_float, MakeConstant(), and num.

Referenced by float_to_expression(), simplify_float_constraint(), and string_to_entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ float_to_expression()

expression float_to_expression ( float  c)

Definition at line 1229 of file expression.c.

1230 {
1231  entity e = float_to_entity(c);
1232  return call_to_expression(make_call(e,NIL));
1233 }
entity float_to_entity(float c)
Definition: constant.c:430

References call_to_expression(), float_to_entity(), make_call(), and NIL.

Referenced by complex_to_expression(), make_0val_expression(), make_1val_expression(), monome_to_expression(), and set_the_i().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ float_type_p()

bool float_type_p ( type  t)

Definition at line 3263 of file type.c.

3264 {
3265  bool float_p = false;
3266  if(!type_undefined_p(t) && type_variable_p(t)) {
3267  variable v = type_variable(t);
3268  basic b = variable_basic(v);
3269  if(basic_float_p(b)) {
3270  float_p = true;
3271  }
3272  }
3273  return float_p;
3274 }

References basic_float_p, type_undefined_p, type_variable, type_variable_p, and variable_basic.

Referenced by EvalConstant(), float_constant_p(), MakeParameter(), and simplify_float_constraint().

+ Here is the caller graph for this function:

◆ formal_area_p()

bool formal_area_p ( entity  aire)
Parameters
aireire

Definition at line 95 of file area.c.

96 {
97 #ifndef NDEBUG
99  pips_assert("entity_kind is consistent", result == ( (entity_kind(aire) & ENTITY_FORMAL_AREA) == ENTITY_FORMAL_AREA));
100 #endif
101  return entity_kind(aire) & ENTITY_FORMAL_AREA;
102 }
#define FORMAL_AREA_LOCAL_NAME
Definition: naming-local.h:76
@ ENTITY_FORMAL_AREA

References ENTITY_FORMAL_AREA, entity_kind, FORMAL_AREA_LOCAL_NAME, module_local_name(), pips_assert, and same_string_p.

Referenced by entity_in_formal_area_p(), entity_stub_sink_p(), formal_context_variable_p(), and variable_to_abstract_location().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ formal_context_variable_p()

bool formal_context_variable_p ( entity  v)

Such pseudo-variables are generated by the points-to analysis.

See also entity_in_formal_area_p()

Definition at line 1535 of file variable.c.

1536 {
1537  bool formal_p = false;
1538  storage s = entity_storage(v);
1539  if(storage_ram_p(s)) {
1540  ram r = storage_ram(s);
1541  entity s = ram_section(r);
1542  formal_p = formal_area_p(s);
1543  }
1544  return formal_p;
1545 }

References entity_storage, formal_area_p(), ram_section, storage_ram, and storage_ram_p.

Referenced by create_values_for_simple_effect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ formal_label_replacement_p()

bool formal_label_replacement_p ( entity  fp)

string lsp = "FORMAL_RETURN_LABEL_";

Parameters
fpp

Definition at line 1797 of file variable.c.

1798 {
1799  bool replacement_p = false;
1800 
1801  const char* fpn = entity_local_name(fp);
1802  const char* lsp = get_string_property("PARSER_FORMAL_LABEL_SUBSTITUTE_PREFIX");
1803  /* string lsp = "FORMAL_RETURN_LABEL_"; */
1804 
1805  replacement_p = (strstr(fpn, lsp)==fpn);
1806 
1807  return replacement_p;
1808 }
char * get_string_property(const char *)

References entity_local_name(), and get_string_property().

Referenced by DeclareVariable(), MakeFormalParameter(), text_entity_declaration(), and words_parameters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ formal_parameter_p()

bool formal_parameter_p ( entity  v)

Definition at line 1489 of file variable.c.

1490 {
1491  storage s = entity_storage(v);
1492  bool formal_p = storage_formal_p(s);
1493 
1494  return formal_p;
1495 }

References entity_storage, and storage_formal_p.

Referenced by alias_propagation(), array_bound_check_instrumentation(), compute_points_to_gen_set(), compute_points_to_kill_set(), create_pointer_to_array_stub_points_to(), create_stub_entity(), dag_compute_outputs(), do_array_expansion(), do_check_isolate_statement_preconditions_on_call(), do_gpu_qualify_pointers(), do_slightly_rename_entities(), do_split_structure(), do_split_structure_return_hook(), entity_formal_p(), entity_may_conflict_with_a_formal_parameter_p(), entity_to_declaring_statement(), expand_points_to_domain(), formal_parameter_points_to_cell_p(), freia_cleanup_sequence_rec(), generic_points_to_cells_translation(), generic_transformer_intra_to_inter(), init_dynamic_check_list(), init_points_to_analysis(), initialization_list_to_statements(), initialize_dynamic_check_list(), inline_expression_call(), interprocedural_abc_call(), make_loadsave_statement(), MakeEquivAtom(), new_local_image_variable(), normalize_microcode(), offset_in_caller(), points_to_cells_parameters(), points_to_function_projection(), points_to_set_block_projection(), potential_out_effects_p(), promote_local_entities(), reference_to_points_to(), retype_formal_parameters(), source_to_sinks(), split_structures(), statement_insertion_fix_access(), statements_localize_declarations(), terapix_suitable_loop_bound_walker(), update_unstructured_declarations(), UpdateEntity(), used_before_set(), variable_to_abstract_location(), verify_formal_and_common_variables(), and wipeout_entity().

◆ fortran95_language_module_p()

bool fortran95_language_module_p ( entity  m)

Definition at line 457 of file module.c.

458 {
460 }
@ is_language_fortran95
Definition: ri.h:1568

References is_language_fortran95, and x_language_module_p().

Referenced by data_to_prec_for_variables().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fortran_constant_expression_supporting_entities()

list fortran_constant_expression_supporting_entities ( list  sel,
expression  e 
)

Fortran version.

Parameters
selel

Definition at line 4187 of file type.c.

4188 {
4189  set vt = set_make(set_pointer);
4190 
4191  sel = generic_constant_expression_supporting_entities(sel, vt, e, false);
4192 
4193  set_free(vt);
4194 
4195  return sel;
4196 }

References generic_constant_expression_supporting_entities(), set_free(), set_make(), and set_pointer.

Referenced by fortran_type_supporting_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fortran_language_module_p()

bool fortran_language_module_p ( entity  m)

Definition at line 452 of file module.c.

453 {
455 }
@ is_language_fortran
Definition: ri.h:1566

References is_language_fortran, and x_language_module_p().

Referenced by arguments_are_something(), data_to_prec_for_variables(), partial_eval_call(), and precondition_intra_to_inter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fortran_module_p()

bool fortran_module_p ( entity  m)

Test if a module is in Fortran.

Could be better factored in with C case

If this alternative did not exist, the source code should be moved to ri-util

Definition at line 2799 of file entity.c.

2800 {
2801  bool fortran_p = false;
2802  value v = entity_initial(m);
2803  if(!value_undefined_p(v)) {
2804  if(value_intrinsic_p(v))
2805  return true;
2806  fortran_p = language_fortran_p(code_language(value_code(v)));
2807  }
2808  else {
2809  /* If this alternative did not exist, the source code should be
2810  moved to ri-util*/
2811  pips_internal_error("Module language should not be unknown.\n");
2812  }
2813  return fortran_p;
2814 }
#define language_fortran_p(x)
Definition: ri.h:1591

References code_language, entity_initial, language_fortran_p, pips_internal_error, value_code, value_intrinsic_p, and value_undefined_p.

Referenced by begin_omp_construct(), bound_to_statement(), call_STEP_subroutine3(), cast_STEP_ARG(), compile_omp(), convex_regions_forward_translation(), create_module_with_statement(), dimensions_to_dma(), do_linearize_array_reference(), do_linearize_type(), do_recompile_module(), emit_message_and_stop(), end_omp_construct(), ensure_comment_consistency(), entity_clean_declarations(), entity_from_user_name(), entity_local_variable_p(), gcd_and_constant_dependence_test(), generate_variable_with_unique_name_to_module(), generic_print_xml_application(), get_current_step_directive(), get_expression_addr(), get_module_name_directive_suffix(), internal_print_icfg(), linearize_array_generic(), loop_normalize_of_loop(), make_any_print_statement(), make_bottom_up_abc_tests(), make_global_entity_from_local(), make_increment_statement(), make_loadsave_statement(), make_new_scalar_variable_with_prefix(), make_scalar_integer_entity(), outline(), outliner_compilation_unit(), outliner_file(), outliner_independent(), outliner_parameters(), outliner_scan(), region_to_address(), region_to_minimal_dimensions(), sequence_rewrite(), simd_memory_packing(), statement_filter(), step_compile(), step_compile_analysed_module(), step_compile_generated_module(), step_directive_parser(), step_directive_print(), step_local_regionArray(), step_parameter(), and text_summary_complexity().

◆ fortran_string_compare()

int fortran_string_compare ( string  fs1,
string  fs2 
)

expression.c

expression.c

as of 3.1 and 6.3.5 of the Fortran 77 standard, the character order is not fully specified. It states:

  • A < B < C ... < Z
  • 0 < 1 < 2 ... < 9
  • blank < 0
  • blank < A
  • 9 < A OR Z < 0 since these rules are ascii compatible, we'll take ascii. in practice, this may be implementation dependent?
Parameters
fs1constant fortran string (entity name is fine)
fs2constant fortran string (entity name is fine)
Returns
-n 0 +n depending on < == >, n first differing char.

skip headers, trailers...

collating sequence comparison.

equal string header case.

Parameters
fs1s1
fs2s2

Definition at line 101 of file expression.c.

102 {
103  int l1, l2, i, c = 0;
104  string s1, s2;
105 
106  /* skip headers, trailers... */
108  s2 = actual_fortran_string_to_compare(fs2, &l2);
109 
110  /* collating sequence comparison. */
111  for (i=0; c==0 && i<l1 && i<l2; i++)
112  {
113  if (s1[i] < s2[i]) c = -i-1;
114  if (s1[i] > s2[i]) c = i+1;
115  }
116 
117  /* equal string header case. */
118  if (c==0 && l1!=l2)
119  c = (l1<l2)? -l1-1: l2+1;
120 
121  return c;
122 }
static string actual_fortran_string_to_compare(string fs, int *plength)
quite lazy...
Definition: expression.c:54

References actual_fortran_string_to_compare(), and s1.

Referenced by constant_constraint_check().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fortran_type_supporting_entities()

list fortran_type_supporting_entities ( list  srl,
type  t 
)

ifdebug(9) {

pips_debug(8, "Begin: ");

print_references(srl);

fprintf(stderr, "\n");

}

In Fortran, dependencies are due to the dimension expressions.

ifdebug(9) {

pips_debug(8, "End: ");

print_references(srl);

fprintf(stderr, "\n");

}

Parameters
srlrl

Definition at line 4593 of file type.c.

4594 {
4595  // FI: to avoid cycles betwen librairies ri-util and prettyprint
4596  /* ifdebug(9) { */
4597  /* pips_debug(8, "Begin: "); */
4598  /* print_references(srl); */
4599  /* fprintf(stderr, "\n"); */
4600  /* } */
4601 
4602  if(type_functional_p(t))
4603  ;
4604  else if(type_variable_p(t)) {
4605  /* In Fortran, dependencies are due to the dimension expressions.*/
4606  variable v = type_variable(t);
4607  list dims = variable_dimensions(v);
4608 
4609  FOREACH(DIMENSION, d, dims) {
4610  expression l = dimension_lower(d);
4611  expression u = dimension_upper(d);
4614  }
4615  }
4616  else if(type_void_p(t))
4617  ;
4618  else
4619  pips_internal_error("Unexpected Fortran type with tag %d", type_tag(t));
4620 
4621  // FI: to avoid cycles betwen librairies ri-util and prettyprint
4622  /* ifdebug(9) { */
4623  /* pips_debug(8, "End: "); */
4624  /* print_references(srl); */
4625  /* fprintf(stderr, "\n"); */
4626  /* } */
4627 
4628  return srl;
4629 }
list fortran_constant_expression_supporting_entities(list sel, expression e)
Fortran version.
Definition: type.c:4187

References DIMENSION, dimension_lower, dimension_upper, FOREACH, fortran_constant_expression_supporting_entities(), pips_internal_error, type_functional_p, type_tag, type_variable, type_variable_p, type_void_p, and variable_dimensions.

Referenced by check_fortran_declaration_dependencies().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ forward_control_map_get_blocs()

void forward_control_map_get_blocs ( control  ,
cons **   
)

◆ fprint_any_environment()

void fprint_any_environment ( FILE *  fd,
entity  m,
bool  is_fortran 
)

rank of formal parameter

return variable

To simplify validation, at the expense of some information about the parsing process.

In C, no return entity is created (yet). See MakeCurrentModule().

List of implicitly and explicitly declared variables, functions and areas

List of external variables and functions and areas

Formal parameters

Return variable

Structure of each area/common

Parameters
fdd
is_fortrans_fortran

Definition at line 297 of file declarations.c.

298 {
300  int nth = 0; /* rank of formal parameter */
301  entity rv = entity_undefined; /* return variable */
302 
303  pips_assert("fprint_environment", entity_module_p(m));
304 
305  /* To simplify validation, at the expense of some information about
306  the parsing process. */
308 
309  (void) fprintf(fd, "\nDeclarations for module %s with type ",
310  module_local_name(m));
312  (void) fprintf(fd, "\n\n");
313 
314  /* In C, no return entity is created (yet). See MakeCurrentModule(). */
315  pips_assert("A module storage is ROM or return",
318 
319  /* List of implicitly and explicitly declared variables,
320  functions and areas */
321 
322  (void) fprintf(fd, "%s\n", ENDP(decls)?
323  "* empty declaration list *\n\n": "Variable list:\n\n");
324 
325  MAP(ENTITY, e, {
326  type t = entity_type(e);
327 
328  fprintf(fd, "Declared entity %s\twith type %s ", entity_name(e), type_to_string(t));
329 
330  if(type_variable_p(t))
332  else if(type_functional_p(t)) {
334  }
335  else if(type_area_p(t)) {
336  (void) fprintf(fd, "with size %td\n", area_size(type_area(t)));
337  }
338  else
339  (void) fprintf(fd, "\n");
340  },
341  decls);
342 
343  if(!is_fortran) {
345  /* List of external variables and functions and areas */
346 
348 
349  (void) fprintf(fd, "%s\n", ENDP(edecls)?
350  "* empty external declaration list *\n\n": "External variable list:\n\n");
351 
352  MAP(ENTITY, e, {
353  type t = entity_type(e);
354 
355  fprintf(fd, "Declared entity %s\twith type %s ", entity_name(e), type_to_string(t));
356 
357  if(type_variable_p(t))
359  else if(type_functional_p(t)) {
361  }
362  else if(type_area_p(t)) {
363  (void) fprintf(fd, "with size %td\n", area_size(type_area(t)));
364  }
365  else
366  (void) fprintf(fd, "\n");
367  },
368  edecls);
369  gen_free_list(edecls);
370  }
371 
372  /* Formal parameters */
373  nth = 0;
374  MAP(ENTITY, v, {
375  storage vs = entity_storage(v);
376 
377  pips_assert("All storages are defined", !storage_undefined_p(vs));
378 
379  if(storage_formal_p(vs)) {
380  nth++;
381  if(nth==1) {
382  (void) fprintf(fd, "\nLayouts for formal parameters:\n\n");
383  }
384  (void) fprintf(fd,
385  "\tVariable %s,\toffset = %td\n",
387  }
388  else if(storage_return_p(vs)) {
389  pips_assert("No more than one return variable", entity_undefined_p(rv));
390  rv = v;
391  }
392  }, decls);
393 
394  /* Return variable */
395  if(!entity_undefined_p(rv))
396  {
397  int asize;
398  if (!SizeOfArray(rv, &asize))
399  asize = -1;
400  fprintf(fd,
401  "\nLayout for return variable:\n\n"
402  "\tVariable %s,\tsize = %d\n", entity_name(rv), asize);
403  }
404 
405  /* Structure of each area/common */
406  if(!ENDP(decls)) {
407  (void) fprintf(fd, "\nLayouts for areas (commons):\n\n");
408  }
409 
410  MAP(ENTITY, e, {
411  if(type_area_p(entity_type(e))) {
412  if(is_fortran)
413  print_common_layout(fd, e, false);
414  else
415  print_C_common_layout(fd, e, false);
416  }
417  },
418  decls);
419 
420  (void) fprintf(fd, "End of declarations for module %s\n\n",
421  module_local_name(m));
422 
423  gen_free_list(decls);
424 }
void gen_sort_list(list l, gen_cmp_func_t compare)
Sorts a list of gen_chunks in place, to avoid allocations...
Definition: list.c:796
int(* gen_cmp_func_t)(const void *, const void *)
Definition: newgen_types.h:114
void print_common_layout(FILE *fd, entity c, bool debug_p)
Definition: area.c:207
void print_C_common_layout(FILE *fd, entity c, bool debug_p)
Definition: declarations.c:129
void fprint_functional(FILE *fd, functional f)
This function is called from c_parse() via ResetCurrentModule() and fprint_environment()
Definition: declarations.c:227
#define storage_rom_p(x)
Definition: ri.h:2525
#define storage_return_p(x)
Definition: ri.h:2516
#define storage_undefined_p(x)
Definition: ri.h:2477

References area_size, basic_to_string(), code_declarations, code_externs, compare_entities(), ENDP, ENTITY, entity_initial, entity_module_p(), entity_name, entity_storage, entity_type, entity_undefined, entity_undefined_p, formal_offset, fprint_functional(), fprintf(), gen_copy_seq(), gen_free_list(), gen_sort_list(), MAP, module_local_name(), pips_assert, print_C_common_layout(), print_common_layout(), SizeOfArray(), storage_formal, storage_formal_p, storage_return_p, storage_rom_p, storage_undefined_p, type_area, type_area_p, type_functional, type_functional_p, type_to_string(), type_variable, type_variable_p, value_code, and variable_basic.

Referenced by fprint_C_environment(), and fprint_environment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fprint_C_environment()

void fprint_C_environment ( FILE *  fd,
entity  m 
)
Parameters
fdd

Definition at line 292 of file declarations.c.

293 {
294  fprint_any_environment(fd, m, false);
295 }
void fprint_any_environment(FILE *fd, entity m, bool is_fortran)
Definition: declarations.c:297

References fprint_any_environment().

Referenced by ResetCurrentCompilationUnitEntity(), and ResetCurrentModule().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fprint_entity_list()

void fprint_entity_list ( FILE *  fp,
list  l 
)

void fprint_entity_list(FILE *fp,list l): prints a list of entities on file fp.

Parameters
fpp

Definition at line 3188 of file entity.c.

3189 {
3190  for( ; l != NIL; l = CDR(l))
3191  fprintf(fp, "%s, ", entity_local_name(ENTITY(CAR(l))));
3192 }

◆ fprint_environment()

void fprint_environment ( FILE *  fd,
entity  m 
)
Parameters
fdd

Definition at line 287 of file declarations.c.

288 {
289  fprint_any_environment(fd, m, true);
290 }

References fprint_any_environment().

Referenced by EndOfProcedure(), make_array_communication_module(), make_scalar_communication_module(), make_start_ru_module(), make_wait_ru_module(), ProcessEntry(), and store_new_module().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fprint_functional()

void fprint_functional ( FILE *  fd,
functional  f 
)

This function is called from c_parse() via ResetCurrentModule() and fprint_environment()

(void) fprintf(fd, " %s:", type_to_string(ta));

Well, seems to occur for C compilation units, instead of void...

An argument can be functional, but not (yet) a result.

Parameters
fdd

Definition at line 227 of file declarations.c.

228 {
229  type tr = functional_result(f);
230  int count = 0;
231 
233  type ta = parameter_type(p);
234 
235  pips_assert("Argument type is variable or varags:variable or functional or void",
236  type_variable_p(ta)
238  || type_functional_p(ta)
239  || type_void_p(ta));
240 
241  if(count>0)
242  (void) fprintf(fd, " x ");
243  count++;
244 
245  if(type_functional_p(ta)) {
246  functional fa = type_functional(ta);
247  /* (void) fprintf(fd, " %s:", type_to_string(ta)); */
248  (void) fprintf(fd, "(");
249  fprint_functional(fd, fa);
250  (void) fprintf(fd, ")");
251  }
252  else if(type_void_p(ta)) {
253  (void) fprintf(fd, "(");
254  (void) fprintf(fd, ")");
255  }
256  else {
257  if(type_varargs_p(ta)) {
258  (void) fprintf(fd, " %s:", type_to_string(ta));
259  ta = type_varargs(ta);
260  }
261  (void) fprintf(fd, "%s", basic_to_string(variable_basic(type_variable(ta))));
262  }
263  }
264 
266  (void) fprintf(fd, " ()");
267  }
268  (void) fprintf(fd, " -> ");
269 
270  if(type_variable_p(tr))
271  (void) fprintf(fd, " %s\n", basic_to_string(variable_basic(type_variable(tr))));
272  else if(type_void_p(tr))
273  (void) fprintf(fd, " %s\n", type_to_string(tr));
274  else if(type_unknown_p(tr)){
275  /* Well, seems to occur for C compilation units, instead of void... */
276  (void) fprintf(fd, " %s\n", type_to_string(tr));
277  }
278  else if(type_varargs_p(tr)) {
279  (void) fprintf(fd, " %s:%s", type_to_string(tr),
281  }
282  else
283  /* An argument can be functional, but not (yet) a result. */
284  pips_internal_error("Ill. type %d", type_tag(tr));
285 }
static int count
Definition: SDG.c:519

References basic_to_string(), count, ENDP, f(), FOREACH, fprintf(), functional_parameters, functional_result, PARAMETER, parameter_type, pips_assert, pips_internal_error, type_functional, type_functional_p, type_tag, type_to_string(), type_unknown_p, type_varargs, type_varargs_p, type_variable, type_variable_p, type_void_p, and variable_basic.

Referenced by DeclareVariable(), fprint_any_environment(), and UpdateFunctionalType().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ free_arguments()

void free_arguments ( cons args)

should be a macro later, but keep debugging in mind!

Parameters
argsrgs

Definition at line 218 of file arguments.c.

220 {
221  /* should be a macro later, but keep debugging in mind! */
222  gen_free_list(args);
223 }

References gen_free_list().

Referenced by add_formal_to_actual_bindings(), atom_cse_expression(), formal_and_actual_parameters_association(), fortran_user_call_to_transformer(), move_transformer(), reset_live_loop_indices(), test_to_transformer(), test_to_transformer_list(), transformer_combine(), transformer_filter(), and transformer_normalize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ free_enclosing_loops_map()

void free_enclosing_loops_map ( void  )

Referenced by clean_enclosing_loops().

+ Here is the caller graph for this function:

◆ free_expression_normalized()

void free_expression_normalized ( expression  e)

Definition at line 432 of file normalize.c.

434 {
436 
438  FreeNormalized(n);
440  }
441 }

References expression_normalized, FreeNormalized(), and normalized_undefined.

Referenced by unnormalize_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ free_expressions()

void free_expressions ( list  el)

Free a list of expressions.

Parameters
ell

Definition at line 4084 of file expression.c.

4085 {
4086  FOREACH(EXPRESSION,e, el)
4087  free_expression(e);
4088 }

References EXPRESSION, FOREACH, and free_expression().

Referenced by user_call_to_points_to_sinks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ free_keyword_typedef_table()

void free_keyword_typedef_table ( void  )

Definition at line 275 of file static.c.

276 {
279  // No need to reset this value. It is a constant defined by Bison.
280  // token_named_type = -1;
281 }

References hash_table_free(), hash_table_undefined, and keyword_typedef_table.

Referenced by csplit_error_handler(), and csplit_reset().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ free_statement_global_stack()

void free_statement_global_stack ( void  )

Definition at line 358 of file static.c.

359 {
362 }
#define stack_undefined
Definition: newgen_stack.h:55
void stack_free(stack *)
type, bucket_size, policy
Definition: stack.c:292
static stack statement_global_stack
Definition: static.c:316

References stack_free(), stack_undefined, and statement_global_stack.

Referenced by generic_module_name_to_transformers(), generic_points_to_analysis(), generic_print_xml_application(), initial_precondition(), live_out_paths_from_caller_to_callee(), make_statement_global_stack(), module_name_to_preconditions(), partial_eval(), program_precondition(), and summary_precondition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FreeNormalized()

void FreeNormalized ( normalized  n)

FI: theoretically, free_normalized() performs the next three lines...

gen_free(n);

Definition at line 419 of file normalize.c.

421 {
422  /* FI: theoretically, free_normalized() performs the next three lines... */
423  if (normalized_linear_p(n)) {
425  normalized_linear_(n) = NULL;
426  }
427 
428  free_normalized(n);
429  /* gen_free(n); */
430 }
void free_normalized(normalized p)
Definition: ri.c:1407
#define normalized_linear_(x)
Definition: ri.h:1780
void vect_rm(Pvecteur v)
void vect_rm(Pvecteur v): desallocation des couples de v;
Definition: alloc.c:78

References free_normalized(), normalized_linear, normalized_linear_, normalized_linear_p, and vect_rm().

Referenced by binary_to_normalized(), free_expression_normalized(), and NormalizeIntrinsic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ function_return_value_p()

bool function_return_value_p ( entity  v,
entity  f 
)

Is entity v the return value of function f?

Definition at line 529 of file module.c.

530 {
531  bool return_p = strcmp(entity_module_name(v), entity_user_name(v))==0
532  && strcmp(entity_module_name(v), entity_user_name(f))==0;
533  return return_p;
534 }

References entity_module_name(), entity_user_name(), and f().

+ Here is the call graph for this function:

◆ function_to_return_value()

entity function_to_return_value ( entity  m)

Returns the entity rv that carries the value returned by module m, when m is not a C void function or a Fortran subroutine.

rv is supposed to be allocated early by the parser.

Definition at line 509 of file module.c.

510 {
511  return generic_function_to_return_value(m, true);
512 }

References generic_function_to_return_value().

Referenced by C_MakeReturnStatement(), Generate_C_ReturnStatement(), intrinsic_call_to_points_to(), module_to_value_mappings(), points_to_function_projection(), user_call_to_points_to_sinks(), and words_goto_label().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ functional_equal_p()

bool functional_equal_p ( functional  f1,
functional  f2 
)
Parameters
f11
f22

Definition at line 1011 of file type.c.

1012 {
1013  return generic_functional_equal_p(f1, f2, true, true, false);
1014 }
bool generic_functional_equal_p(functional f1, functional f2, bool strict_p, bool qualifier_p, hash_table structural_table)
Definition: type.c:983

References f2(), and generic_functional_equal_p().

+ Here is the call graph for this function:

◆ functional_type_supporting_entities()

list functional_type_supporting_entities ( list  sel,
functional  f 
)
Parameters
selel

Definition at line 4014 of file type.c.

4015 {
4016  set vt = set_make(set_pointer);
4017 
4019 
4020  set_free(vt);
4021 
4022  return sel;
4023 }
list recursive_functional_type_supporting_entities(list sel, set vt, functional f)
Definition: type.c:3977

References f(), recursive_functional_type_supporting_entities(), set_free(), set_make(), and set_pointer.

Referenced by compilation_unit_text().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ functional_type_supporting_references()

list functional_type_supporting_references ( list  srl,
functional  f 
)

ifdebug(9) {

pips_debug(8, "Begin: ");

print_references(srl);

fprintf(stderr, "\n");

}

ifdebug(9) {

pips_debug(8, "End: ");

print_references(srl);

fprintf(stderr, "\n");

}

Parameters
srlrl

Definition at line 4390 of file type.c.

4391 {
4392  // FI: to avoid cycles betwen librairies ri-util and prettyprint
4393  /* ifdebug(9) { */
4394  /* pips_debug(8, "Begin: "); */
4395  /* print_references(srl); */
4396  /* fprintf(stderr, "\n"); */
4397  /* } */
4398 
4399  MAP(PARAMETER, p,
4402 
4404 
4405  // FI: to avoid cycles betwen librairies ri-util and prettyprint
4406  /* ifdebug(9) { */
4407  /* pips_debug(8, "End: "); */
4408  /* print_references(srl); */
4409  /* fprintf(stderr, "\n"); */
4410  /* } */
4411 
4412  return srl;
4413 }

References f(), functional_parameters, functional_result, MAP, PARAMETER, parameter_type, and recursive_type_supporting_references().

Referenced by recursive_type_supporting_references().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ functional_type_supporting_types()

list functional_type_supporting_types ( functional  f)

FI: I'm not sure this function is of any use.

Definition at line 5059 of file type.c.

5060 {
5061  set vt = set_make(set_pointer);
5062  list stl = NIL;
5063 
5065 
5066  set_free(vt);
5067 
5068  return stl;
5069 }
static list recursive_functional_type_supporting_types(list stl, set vt, functional f)
Definition: type.c:5036

References f(), NIL, recursive_functional_type_supporting_types(), set_free(), set_make(), and set_pointer.

+ Here is the call graph for this function:

◆ generate_pseudo_formal_variable_for_formal_label()

entity generate_pseudo_formal_variable_for_formal_label ( const char *  p,
int  l 
)

string lsp = "FORMAL_RETURN_LABEL_";

let's assume that there are fewer than 999 formal label arguments

Generate a variable of type CHARACTER*(*). See gram.y, "lg_fortran_type:". It is postponed to MakeFormalParameter

fs may already exists if a ParserError occured or if an edit of the source file occured

Not so sure because CleanUpEntities() is called later, not before. This function is cvalled by the parser before the module declaration rule is reduced.

Too bad for the memory leaks: they should not occur frequently

Too early because the current_module_entity is not yet fully defined.

AddEntityToDeclarations(fs, get_current_module_entity());

Definition at line 1744 of file variable.c.

1745 {
1746  entity fs = entity_undefined;
1747  const char* lsp = get_string_property("PARSER_FORMAL_LABEL_SUBSTITUTE_PREFIX");
1748  /* string lsp = "FORMAL_RETURN_LABEL_"; */
1749  /* let's assume that there are fewer than 999 formal label arguments */
1750  char buffer[4];
1751  string sn = &buffer[0];
1752  string full_name = string_undefined;
1753 
1754  pips_assert("No more than 999 alternate returns", 0 <= l && l < 999);
1755 
1756  sprintf(buffer, "%d", l);
1757 
1758  /* Generate a variable of type CHARACTER*(*). See gram.y,
1759  "lg_fortran_type:". It is postponed to MakeFormalParameter */
1760  full_name = strdup(concatenate(p, MODULE_SEP_STRING, lsp, sn, NULL));
1762  fs = make_entity(full_name,
1765  value_undefined);
1766  }
1767  else {
1768  /* fs may already exists if a ParserError occured or if an edit of the
1769  source file occured */
1770  free(full_name);
1772 
1773  /* Not so sure because CleanUpEntities() is called later, not
1774  before. This function is cvalled by the parser before the module
1775  declaration rule is reduced. */
1776  /*
1777  pips_assert("The type, storage and value are undefined\n",
1778  type_undefined_p(entity_type(fs))
1779  && storage_undefined_p(entity_storage(fs))
1780  && value_undefined_p(entity_initial(fs)));
1781  */
1782  /* Too bad for the memory leaks: they should not occur frequently */
1786  }
1787 
1788  /* Too early because the current_module_entity is not yet fully defined. */
1789  /* AddEntityToDeclarations(fs, get_current_module_entity()); */
1790 
1791  pips_debug(8, "Generated replacement for formal return label: %s\n",
1792  entity_name(fs));
1793 
1794  return fs;
1795 }
#define full_name(dir, name)
Definition: compile.c:414
static string buffer
Definition: string.c:113

References buffer, concatenate(), entity_domain, entity_initial, entity_name, entity_storage, entity_type, entity_undefined, free(), full_name, gen_find_tabulated(), get_string_property(), make_entity, MODULE_SEP_STRING, pips_assert, pips_debug, storage_undefined, strdup(), string_undefined, type_undefined, and value_undefined.

+ Here is the call graph for this function:

◆ generate_string_for_alternate_return_argument()

expression generate_string_for_alternate_return_argument ( string  i)

Definition at line 1721 of file variable.c.

1722 {
1724  char buffer[9];
1725 
1726  pips_assert("A label cannot be more than 5 character long", strlen(i)<=5);
1727  buffer[0]='"';
1728  buffer[1]='*';
1729  buffer[2]=0;
1730 
1731  strcat(&buffer[0], i);
1732 
1733  buffer[strlen(i)+2]='"';
1734  buffer[strlen(i)+3]=0;
1735 
1737 
1738  return e;
1739 }
expression MakeCharacterConstantExpression(string s)
END_EOLE.
Definition: constant.c:573

References buffer, expression_undefined, MakeCharacterConstantExpression(), pips_assert, and strdup().

+ Here is the call graph for this function:

◆ generate_variable_with_unique_name_to_module()

entity generate_variable_with_unique_name_to_module ( const char *  seed_name,
const char *  prefix,
const char *  suffix,
entity  module 
)

Generate a new variable name from a seed name to a module.

Parameters
seed_nameis the main name of the variable name to generate
prefixis the prefix to prepend to the variable name
suffixis the suffix to append to the variable name
moduleis the entity of the module the variable will belong to

Is there is already a variable with this name, a new one is tried with some numerical suffixes.

Returns
the entity of the new variable. Its fields are to be filled later before use.

First try a basic name without numeric suffix:

Free the old name since it was already used:

And try a new one with a number suffix:

Parameters
seed_nameeed_name
prefixrefix
suffixuffix
moduleodule

Definition at line 460 of file variable.c.

463  {
464  const char* format = fortran_module_p(module) ?
465  "%s "MODULE_SEP_STRING "%s%s%s":
466  "%s "MODULE_SEP_STRING "0" BLOCK_SEP_STRING "%s%s%s";
467 
468  const char* format_num = fortran_module_p(module) ?
469  "%s "MODULE_SEP_STRING "%s%s%s%d":
470  "%s "MODULE_SEP_STRING "0" BLOCK_SEP_STRING "%s%s%s%d";
471 
472  const char* module_name = module_local_name(module);
473  string variable_name;
474  int number = 0;
475 
476  /* First try a basic name without numeric suffix: */
477  asprintf(&variable_name, format, module_name, prefix, seed_name, suffix);
479  {
480  /* Free the old name since it was already used: */
482  /* And try a new one with a number suffix: */
483  asprintf(&variable_name, format_num, module_name, prefix, seed_name, suffix, number++);
484  };
485 
490  return e;
491 }
static bool unique_entity_name_p(const char *name, entity in_module)
Handling of entity as program variables (see also entity.c for generic entities)
Definition: variable.c:49
char * variable_name(Variable v)
polynome_ri.c
Definition: polynome_ri.c:73

References asprintf, BLOCK_SEP_STRING, fortran_module_p(), free(), make_entity, module, module_local_name(), module_name(), MODULE_SEP_STRING, prefix, storage_undefined, type_undefined, unique_entity_name_p(), value_undefined, and variable_name().

Referenced by generic_clone_variable_with_unique_name().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generic_basic_equal_p()

bool generic_basic_equal_p ( basic  b1,
basic  b2,
bool  strict_p,
bool  qualifier_p,
hash_table  structural_table 
)

assertion: b1 and b2 are defined and have the same tag (see previous tests)

FI: there are two definition of equality, one more strict via the expression, and one more practical via the constant. But the constant is not always defined. And the Newgen declaration of symbolic looks wrong with "float:int"...

Do we want string types to be equal only if lengths are equal? I do not think so

could be a star or an expression; a value_equal_p() is needed!

just to avoid a warning

Parameters
b11
b22
strict_ptrict_p
qualifier_pualifier_p
structural_tabletructural_table

Definition at line 824 of file type.c.

825 {
826  if(b1 == b2)
827  return true;
828  else if (b1 == basic_undefined && b2 != basic_undefined)
829  return false;
830  else if (b1 != basic_undefined && b2 == basic_undefined)
831  return false;
832  else if (basic_tag(b1) != basic_tag(b2)) {
833  if(strict_p)
834  return false;
835  else
836  return same_basic_p(b1, b2);
837  }
838 
839  /* assertion: b1 and b2 are defined and have the same tag
840  (see previous tests) */
841 
842  switch(basic_tag(b1)) {
843  case is_basic_int:
844  return basic_int(b1) == basic_int(b2);
845  case is_basic_float:
846  return basic_float(b1) == basic_float(b2);
847  case is_basic_logical:
848  return basic_logical(b1) == basic_logical(b2);
849  case is_basic_overloaded:
850  return true;
851  case is_basic_complex:
852  return basic_complex(b1) == basic_complex(b2);
853  case is_basic_bit: {
854  symbolic s1 = basic_bit(b1);
855  symbolic s2 = basic_bit(b2);
856 
857  /* FI: there are two definition of equality, one more strict via
858  the expression, and one more practical via the constant. But
859  the constant is not always defined. And the Newgen declaration
860  of symbolic looks wrong with "float:int"... */
861 
864  return expression_equal_p(e1, e2);
865  }
866  case is_basic_pointer:
867  {
868  type t1 = basic_pointer(b1);
869  type t2 = basic_pointer(b2);
870  return generic_type_equal_p(t1, t2, strict_p, qualifier_p, structural_table);
871  //return (type_void_p(t1) && type_void_p(t2)) ||
872  // (type_variable_p(t1) && type_variable_p(t2) &&
873  // generic_basic_equal_p(variable_basic(type_variable(t1)),
874  // variable_basic(type_variable(t2)),
875  // strict_p, qualifier_p, structural_table));
876  }
877  case is_basic_derived:
878  {
879  entity e1 = basic_derived(b1);
880  entity e2 = basic_derived(b2);
881  bool equal_p = true;
882 
883  // FI: THIS IS MORE COMPLICATED THAN A POINTER COMPARISON...
884  // qualifier_p should be provided...
885  if(e1!=e2)
886  equal_p = generic_type_equal_p(entity_type(e1), entity_type(e2), strict_p, qualifier_p, structural_table);
887  return equal_p;
888  }
889  case is_basic_string:
890  /* Do we want string types to be equal only if lengths are equal?
891  * I do not think so
892  */
893  /*
894  pips_internal_error("string type comparison not implemented");
895  */
896  /* could be a star or an expression; a value_equal_p() is needed! */
897  return true;
898  case is_basic_typedef: {
899  // FI: just like fields, the same typedef can be defined in
900  // different files by different entities; it would be easier with
901  // concrete types
902 
903  // It is not clear how strict_p should be used...
904  entity nt1 = basic_typedef(b1);
905  entity nt2 = basic_typedef(b2);
906  if(same_entity_p(nt1, nt2))
907  return true;
908  else {
909  string nt1n = (string) entity_user_name(nt1);
910  string nt2n = (string) entity_user_name(nt2);
911  if(same_string_p(nt1n, nt2n)) {
912  type nt1t = entity_type(nt1);
913  type nt2t = entity_type(nt2);
914  return generic_type_equal_p(nt1t, nt2t, strict_p, qualifier_p, structural_table);
915  }
916  else
917  return false;
918  }
919  //return basic_typedef_p(b2)
920  // && same_entity_p(basic_typedef(b1),basic_typedef(b2));
921  }
922  default: pips_internal_error("unexpected tag %d", basic_tag(b1));
923  }
924  return false; /* just to avoid a warning */
925 }
bool same_basic_p(basic b1, basic b2)
check if two basics are similar.
Definition: type.c:969

References b1, b2, basic_bit, basic_complex, basic_derived, basic_float, basic_int, basic_logical, basic_pointer, basic_tag, basic_typedef, basic_undefined, entity_type, entity_user_name(), expression_equal_p(), generic_type_equal_p(), is_basic_bit, is_basic_complex, is_basic_derived, is_basic_float, is_basic_int, is_basic_logical, is_basic_overloaded, is_basic_pointer, is_basic_string, is_basic_typedef, pips_internal_error, s1, same_basic_p(), same_entity_p(), same_string_p, and symbolic_expression.

Referenced by basic_equal_p(), and generic_variable_equal_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generic_clone_variable_with_unique_name()

entity generic_clone_variable_with_unique_name ( entity  old_variable,
statement  declaration_statement,
string  prefix,
string  suffix,
entity  module,
bool  insert_p 
)

clone a variable with a new name.

The new variable is added in the different declaration lists.

Parameters
insert_pIf true, for C code, a new declaration statement is inserted in "declaration_statement" to maintain the internal representation consistency. Else, no new declaration statement is inserted and the internal representation is no longer consistent for C code.
Returns
the new cloned entity

See useful interface below

Clone the attributes of the old variable into the new one:

Parameters
old_variableld_variable
declaration_statementeclaration_statement
prefixrefix
suffixuffix
moduleodule
insert_pnsert_p

Definition at line 509 of file variable.c.

514  {
515  const char * seed_name = entity_user_name(old_variable);
517  prefix,
518  suffix,
519  module);
520 
521  /* Clone the attributes of the old variable into the new one: */
525 
526  if(insert_p)
527  AddLocalEntityToDeclarations(new_variable, module, declaration_statement);
528  else
529  AddLocalEntityToDeclarationsOnly(new_variable, module, declaration_statement);
530 
531  return new_variable;
532 }
static entity new_variable
entity to be replaced, the primary?
Definition: dynamic.c:860
entity generate_variable_with_unique_name_to_module(const char *seed_name, const char *prefix, const char *suffix, entity module)
Generate a new variable name from a seed name to a module.
Definition: variable.c:460

References AddLocalEntityToDeclarations(), AddLocalEntityToDeclarationsOnly(), copy_storage(), copy_type(), copy_value(), entity_initial, entity_storage, entity_type, entity_user_name(), generate_variable_with_unique_name_to_module(), module, new_variable, old_variable, and prefix.

Referenced by clone_variable_with_unique_name(), and move_declaration_control_node_declarations_to_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generic_constant_expression_supporting_entities()

list generic_constant_expression_supporting_entities ( list  sel,
set  vt,
expression  e,
bool  language_c_p 
)

In C, f cannot be declared directly, we need its enum

In Fortran, symbolic constant are declared directly, but the may depend on other symbolic constants

Could be guarded so as not to be added twice. Guard might be useless with because types are visited only once.

do nothing

Parameters
selel
vtt
language_c_panguage_c_p

Definition at line 4058 of file type.c.

4059 {
4060  syntax s = expression_syntax(e);
4061 
4062  ifdebug(8) {
4063  pips_debug(8, "Begin: ");
4064  print_entities(sel);
4065  fprintf(stderr, "\n\n");
4066  }
4067 
4068  if(syntax_call_p(s)) {
4069  call c = syntax_call(s);
4070  entity f = call_function(c);
4071 
4073  if(language_c_p) {
4074  /* In C, f cannot be declared directly, we need its enum */
4075  entity e_of_f = find_enum_of_member(f);
4076  //sel = CONS(ENTITY, e_of_f, sel);
4077  sel = enum_supporting_entities(sel, vt, e_of_f);
4078  sel = gen_nconc(sel, CONS(ENTITY, e_of_f, NIL));
4079  }
4080  else {
4081  /* In Fortran, symbolic constant are declared directly, but
4082  the may depend on other symbolic constants */
4083  value v = entity_initial(f);
4084  symbolic s = value_symbolic(v);
4085 
4086  //sel = CONS(ENTITY, f, sel);
4088  sel = gen_nconc(sel, CONS(ENTITY, f, NIL));
4089  }
4090  }
4091 
4092  FOREACH(EXPRESSION, se, call_arguments(c)) {
4094  }
4095  }
4096  else if(syntax_reference_p(s)) {
4097  reference r = syntax_reference(s);
4098  entity v = reference_variable(r);
4099  list inds = reference_indices(r);
4100  /* Could be guarded so as not to be added twice. Guard might be
4101  useless with because types are visited only once. */
4102  //sel = gen_nconc(sel, CONS(ENTITY, v, NIL));
4103  FOREACH(EXPRESSION, se, inds) {
4105  }
4106  sel = gen_nconc(sel, CONS(ENTITY, v, NIL));
4107  }
4108  else if(syntax_range_p(s)) {
4109  range r = syntax_range(s);
4110  expression l = range_lower(r);
4111  expression u = range_upper(r);
4112  expression i = range_increment(r);
4116  }
4117  else if(syntax_cast_p(s)) {
4118  cast c = syntax_cast(s);
4119  type t = cast_type(c);
4120  expression e = cast_expression(c);
4121  sel = recursive_type_supporting_entities(sel, vt, t);
4123  }
4124  else if(syntax_sizeofexpression_p(s)) {
4126  if(sizeofexpression_type_p(soe)) {
4127  type t = sizeofexpression_type(soe);
4128  sel = recursive_type_supporting_entities(sel, vt, t);
4129  }
4130  else {
4133  }
4134  }
4135  else if(syntax_subscript_p(s)) {
4136  subscript ss = syntax_subscript(s);
4137  expression a = subscript_array(ss);
4138  list inds = subscript_indices(ss);
4139  FOREACH(EXPRESSION, se, inds) {
4141  }
4143  }
4144  else if(syntax_application_p(s)) {
4147  list inds = application_arguments(as);
4148  FOREACH(EXPRESSION, se, inds) {
4150  }
4152  }
4153  else if(syntax_va_arg_p(s)) {
4154  list soel = syntax_va_arg(s);
4155  FOREACH(SIZEOFEXPRESSION, soe, soel) {
4156  if(sizeofexpression_type_p(soe)) {
4157  type t = sizeofexpression_type(soe);
4158  sel = recursive_type_supporting_entities(sel, vt, t);
4159  }
4160  else {
4163  }
4164  }
4165  }
4166  else {
4167  /* do nothing */
4168  ;
4169  }
4170 
4171  ifdebug(8) {
4172  pips_debug(8, "End: ");
4173  print_entities(sel);
4174  fprintf(stderr, "\n\n");
4175  }
4176 
4177  return sel;
4178 }
list enum_supporting_entities(list sel, set vt, entity e)
Definition: type.c:4025
list generic_symbolic_supporting_entities(list sel, set vt, symbolic s, bool language_c_p)
Definition: type.c:4198
#define syntax_va_arg_p(x)
Definition: ri.h:2749
#define application_arguments(x)
Definition: ri.h:510

References application_arguments, application_function, call_arguments, call_function, cast_expression, cast_type, CONS, ENTITY, entity_initial, enum_supporting_entities(), EXPRESSION, expression_syntax, f(), find_enum_of_member(), FOREACH, fprintf(), gen_nconc(), generic_constant_expression_supporting_entities(), generic_symbolic_supporting_entities(), ifdebug, language_c_p, NIL, pips_debug, print_entities(), range_increment, range_lower, range_upper, recursive_type_supporting_entities(), reference_indices, reference_variable, SIZEOFEXPRESSION, sizeofexpression_expression, sizeofexpression_type, sizeofexpression_type_p, subscript_array, subscript_indices, symbolic_constant_entity_p(), syntax_application, syntax_application_p, syntax_call, syntax_call_p, syntax_cast, syntax_cast_p, syntax_range, syntax_range_p, syntax_reference, syntax_reference_p, syntax_sizeofexpression, syntax_sizeofexpression_p, syntax_subscript, syntax_subscript_p, syntax_va_arg, syntax_va_arg_p, and value_symbolic.

Referenced by constant_expression_supporting_entities(), fortran_constant_expression_supporting_entities(), generic_constant_expression_supporting_entities(), and generic_symbolic_supporting_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generic_function_to_return_value()

entity generic_function_to_return_value ( entity  m,
bool  safe_p 
)

Returns the entity rv that carries the value returned by module m, when m is not a C void function or a Fortran subroutine.

If safe_p, abort if the function is void. Otherwise, return an undefined_entity.

rv is supposed to be allocated early by the parser.

Parameters
safe_pafe_p

Definition at line 469 of file module.c.

470 {
474  if(safe_p)
475  pips_user_error("A return value is requested for compilation unit"
476  " \"%s\".\n", entity_user_name(m));
477  else
478  rv = entity_undefined;
479  }
480  else if(type_functional_p(ft)) {
483  if(type_void_p(r)) {
484  if(safe_p)
485  pips_user_error("A return value is used for void function \"%s\".\n",
486  entity_user_name(m));
487  else
488  rv = entity_undefined;
489  }
490  else {
491  const char* mn = entity_local_name(m);
492  rv = FindEntity(mn, mn);
493 
494  pips_assert("rv is defined", entity_defined_p(rv));
495  }
496  }
497  else
498  pips_internal_error("Return value requested for non-functional object"
499  " \"%s\".\n", entity_user_name(m));
500 
501  return rv;
502 }
bool entity_defined_p(entity p)
Definition: ri.c:2534
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

References compilation_unit_entity_p(), compute_basic_concrete_type(), entity_basic_concrete_type(), entity_defined_p(), entity_local_name(), entity_undefined, entity_user_name(), f(), FindEntity(), functional_result, pips_assert, pips_internal_error, pips_user_error, type_functional, type_functional_p, and type_void_p.

Referenced by any_function_to_return_value(), and function_to_return_value().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generic_functional_equal_p()

bool generic_functional_equal_p ( functional  f1,
functional  f2,
bool  strict_p,
bool  qualifier_p,
hash_table  structural_table 
)
Parameters
f11
f22
strict_ptrict_p
qualifier_pualifier_p
structural_tabletructural_table

Definition at line 983 of file type.c.

985 {
986  if(f1 == f2)
987  return true;
988  else if (f1 == functional_undefined && f2 != functional_undefined)
989  return false;
990  else if (f1 != functional_undefined && f2 == functional_undefined)
991  return false;
992  else {
993  list lp1 = functional_parameters(f1);
995 
996  if(gen_length(lp1) != gen_length(lp2))
997  return false;
998 
999  for( ; !ENDP(lp1); POP(lp1), POP(lp2)) {
1000  parameter p1 = PARAMETER(CAR(lp1));
1001  parameter p2 = PARAMETER(CAR(lp2));
1002 
1003  if(!generic_parameter_equal_p(p1, p2, strict_p, qualifier_p, structural_table))
1004  return false;
1005  }
1006 
1007  return generic_type_equal_p(functional_result(f1), functional_result(f2), strict_p, qualifier_p, structural_table);
1008  }
1009 }
bool generic_parameter_equal_p(parameter p1, parameter p2, bool strict_p, bool qualifier_p, hash_table structural_table)
Definition: type.c:1016
#define functional_undefined
Definition: ri.h:1418

References CAR, ENDP, f2(), functional_parameters, functional_result, functional_undefined, gen_length(), generic_parameter_equal_p(), generic_type_equal_p(), PARAMETER, and POP.

Referenced by functional_equal_p(), and generic_type_equal_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generic_parameter_equal_p()

bool generic_parameter_equal_p ( parameter  p1,
parameter  p2,
bool  strict_p,
bool  qualifier_p,
hash_table  structural_table 
)
Parameters
p11
p22
strict_ptrict_p
qualifier_pualifier_p
structural_tabletructural_table

Definition at line 1016 of file type.c.

1018 {
1019  if(p1 == p2)
1020  return true;
1021  else if (p1 == parameter_undefined && p2 != parameter_undefined)
1022  return false;
1023  else if (p1 != parameter_undefined && p2 == parameter_undefined)
1024  return false;
1025  else
1026  return generic_type_equal_p(parameter_type(p1), parameter_type(p2), strict_p, qualifier_p, structural_table)
1028 }
bool mode_equal_p(mode m1, mode m2)
Definition: type.c:1035
#define parameter_undefined
Definition: ri.h:1794
#define parameter_mode(x)
Definition: ri.h:1821

References generic_type_equal_p(), mode_equal_p(), parameter_mode, parameter_type, and parameter_undefined.

Referenced by generic_functional_equal_p(), and parameter_equal_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generic_reference_add_fixed_subscripts()

void generic_reference_add_fixed_subscripts ( reference  r,
type  t,
bool  zero_p 
)

Add a set of zero subscripts to a reference "r" by side effect.

Used when array names or partial array references have to to converted to the first array element.

Parameters
zero_pero_p

Definition at line 236 of file expression.c.

237 {
238  pips_assert("type is of kind variable", type_variable_p(t));
239  variable v = type_variable(t);
240  //list rsl = reference_indices(r);
241 
242  // FI: this assert makes sense within the ri-util framework but is
243  // too strong for the kind of references used in effects-util
244  // pips_assert("scalar type", ENDP(reference_indices(r)));
245 
246  list dl = variable_dimensions(v);
247  //
248  //pips_assert("Reference r is correct", gen_length(dl)>=gen_length(rsl));
249  //
250  //FOREACH(EXPRESSION, rs, rsl)
251  // POP(dl);
252  list sl = NIL; // subscript list
253  FOREACH(DIMENSION, d, dl) {
255  // reference_indices(r) = CONS(EXPRESSION, s, reference_indices(r));
256  sl = CONS(EXPRESSION, s, sl);
257  }
259 }
expression make_unbounded_expression()
Definition: expression.c:4339

References CONS, DIMENSION, EXPRESSION, FOREACH, gen_nconc(), int_to_expression(), make_unbounded_expression(), NIL, pips_assert, reference_indices, type_variable, type_variable_p, and variable_dimensions.

Referenced by reference_add_unbounded_subscripts(), and reference_add_zero_subscripts().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generic_symbolic_supporting_entities()

list generic_symbolic_supporting_entities ( list  sel,
set  vt,
symbolic  s,
bool  language_c_p 
)
Parameters
selel
vtt
language_c_panguage_c_p

Definition at line 4198 of file type.c.

4199 {
4202  return sel;
4203 }

References generic_constant_expression_supporting_entities(), language_c_p, and symbolic_expression.

Referenced by generic_constant_expression_supporting_entities(), and symbolic_supporting_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ generic_variable_equal_p()

bool generic_variable_equal_p ( variable  v1,
variable  v2,
bool  strict_p,
bool  qualifier_p,
hash_table  structural_table 
)

must check basic, dimension and qualifiers

The decomposed condition is much easier to debug than the global predicate.

dimensions should be checked, but it's hard: the only Fortran requirement is that the space allocated in the callers is bigger than the space used in the callee; stars represent any strictly positive integer; we do not know if v1 is the caller type or the callee type; I do not know what should be done; FI

FI: I return false because the exact test should never be useful in the parser; 1 February 1994

FC: I need this in the prettyprinter...

Parameters
v11
v22
strict_ptrict_p
qualifier_pualifier_p
structural_tabletructural_table

Definition at line 762 of file type.c.

763 {
764  if(v1 == v2)
765  return true;
766  else if (v1 == variable_undefined && v2 != variable_undefined)
767  return false;
768  else if (v1 != variable_undefined && v2 == variable_undefined)
769  return false;
770  else {
771  /* must check basic, dimension and qualifiers
772  *
773  * The decomposed condition is much easier to debug than the
774  * global predicate.
775  */
776  bool equal_p = false;
777  bool beq_p = generic_basic_equal_p(variable_basic(v1), variable_basic(v2), strict_p, qualifier_p, structural_table);
778  if(beq_p) {
780  if(deq_p)
781  equal_p = (!qualifier_p || qualifiers_equal_p(variable_qualifiers(v1), variable_qualifiers(v2)));
782  }
783  return equal_p;
784  //generic_basic_equal_p(variable_basic(v1), variable_basic(v2), strict_p, qualifier_p, structural_table)
785  //&& dimensions_equal_p(variable_dimensions(v1), variable_dimensions(v2))
786  //&& (!qualifier_p || qualifiers_equal_p(variable_qualifiers(v1), variable_qualifiers(v2))) ;
787 
788  // FI: the next lines seem to be dead code
789  list ld1 = variable_dimensions(v1);
790  list ld2 = variable_dimensions(v2);
791 
792  if(ld1==NIL && ld2==NIL)
793  return true;
794  else
795  {
796  /* dimensions should be checked, but it's hard: the only
797  Fortran requirement is that the space allocated in
798  the callers is bigger than the space used in the
799  callee; stars represent any strictly positive integer;
800  we do not know if v1 is the caller type or the callee type;
801  I do not know what should be done; FI */
802  /* FI: I return false because the exact test should never be useful
803  in the parser; 1 February 1994 */
804  /* FC: I need this in the prettyprinter... */
805  int l1 = gen_length(ld1), l2 = gen_length(ld2);
806  if (l1!=l2)
807  return false;
808  for (; ld1; POP(ld1), POP(ld2))
809  {
810  dimension d1 = DIMENSION(CAR(ld1)), d2 = DIMENSION(CAR(ld2));
811  if (!dimension_equal_p(d1, d2))
812  return false;
813  }
814  }
815  }
816  return true;
817 }
bool qualifiers_equal_p(list dims1, list dims2)
Definition: type.c:758
bool dimensions_equal_p(list dims1, list dims2)
Definition: type.c:754
#define variable_undefined
Definition: ri.h:3095

References CAR, DIMENSION, dimension_equal_p(), dimensions_equal_p(), gen_length(), generic_basic_equal_p(), NIL, POP, qualifiers_equal_p(), variable_basic, variable_dimensions, variable_qualifiers, and variable_undefined.

Referenced by generic_type_equal_p(), and variable_equal_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GenericCleanEntities()

void GenericCleanEntities ( list  el,
entity  function,
bool  fortran_p 
)

clean.c

clean.c

FI: A memory leak is better than a dangling pointer?

My explanation: CleanLocalEntities is called by MakeCurrentFunction when the begin_inst rule is reduced; by that time, the module entity and its formal parameters have already been parsed and allocated... but they are not yet fully initialized; thus the gen_full_free is a killer while the undefinitions are ok.

en_full_free_list(function_local_entities);

In C, parameter typing may have already occured and the return entity may be already defined. They must be preserved.

free_type(entity_type(e));

free_storage(entity_storage(e));

free_value(entity_initial(e));

In C, the entity must be removed from the declarations and from the symbol table

Parameters
ell
functionunction
fortran_portran_p

Definition at line 63 of file clean.c.

64 {
65  /* FI: A memory leak is better than a dangling pointer? */
66  /* My explanation: CleanLocalEntities is called by MakeCurrentFunction when
67  * the begin_inst rule is reduced; by that time, the module entity and its
68  * formal parameters have already been parsed and allocated... but they
69  * are not yet fully initialized; thus the gen_full_free is a killer while
70  * the undefinitions are ok.
71  */
72  /*gen_full_free_list(function_local_entities);*/
73 
74  list pe = list_undefined;
75 
76  for(pe=el; !ENDP(pe); POP(pe)) {
77  entity e = ENTITY(CAR(pe));
78  storage s = entity_storage(e);
79 
80  pips_debug(8, "Clean up %s?\n", entity_local_name(e));
81 
82  if(!storage_undefined_p(s) && storage_ram_p(s)) {
83  entity sec = ram_section(storage_ram(s));
84  type t = entity_type(sec);
85  if(!type_undefined_p(t)) {
86  pips_assert("t is an area", type_area_p(t));
88  }
89  }
90 
91  /* In C, parameter typing may have already occured and the return
92  entity may be already defined. They must be preserved. */
93  if(fortran_p
97  pips_debug(8, "Clean up %s? YES\n", entity_local_name(e));
98  if(!type_undefined_p(entity_type(e))) {
99  /* free_type(entity_type(e)); */
101  }
103  /* free_storage(entity_storage(e)); */
105  }
107  /* free_value(entity_initial(e)); */
109  }
110  if(!fortran_p) {
111  /* In C, the entity must be removed from the declarations and
112  from the symbol table */
114  free_entity(e);
115  }
116  }
117  else {
118  pips_debug(8, "Clean up %s? NO\n", entity_local_name(e));
119  }
120  }
121 }
void free_entity(entity p)
Definition: ri.c:2524

References area_layout, CAR, code_declarations, ENDP, ENTITY, entity_initial, entity_local_name(), entity_storage, entity_type, free_entity(), gen_remove(), list_undefined, pips_assert, pips_debug, POP, ram_section, storage_formal_p, storage_ram, storage_ram_p, storage_return_p, storage_undefined, storage_undefined_p, type_area, type_area_p, type_undefined, type_undefined_p, value_code, value_undefined, and value_undefined_p.

Referenced by clean_up_points_to_stubs(), and GenericCleanLocalEntities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GenericCleanLocalEntities()

void GenericCleanLocalEntities ( entity  function,
bool  fortran_p 
)
Parameters
functionunction
fortran_portran_p

Definition at line 123 of file clean.c.

124 {
125  list function_local_entities = NIL;
126  //list pe = NIL;
127 
128  set_current_function(function);
129 
130  function_local_entities =
132  entity_domain);
133 
134  GenericCleanEntities(function_local_entities, function, fortran_p);
135 
136  gen_free_list(function_local_entities);
137 }
void GenericCleanEntities(list el, entity function, bool fortran_p)
Useful when the user edit a source file and parse it again or when a program transformation is perfor...
Definition: clean.c:63
static void set_current_function(entity function)
Definition: clean.c:42
static bool local_entity_of_current_function_p(entity e)
Definition: clean.c:53
list gen_filter_tabulated(bool(*)(gen_chunk *), int)
returns the list of entities with this caracteristics.
Definition: tabulated.c:144

References entity_domain, gen_filter_tabulated(), gen_free_list(), GenericCleanEntities(), local_entity_of_current_function_p(), NIL, and set_current_function().

Referenced by CCleanLocalEntities(), and CleanLocalEntities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_allocatable_data_entity()

entity get_allocatable_data_entity ( entity  e)

Get the entity inside the struct corresponding to the array, mostly for correct prettyprint.

Definition at line 157 of file allocatable.c.

157  {
158  pips_assert("Entity isn't an allocatable", entity_allocatable_p(e));
159 
160  // Get the data field inside the allocatable struct
162  entity allocatable_struct = basic_derived(variable_basic(v));
163  entity data_field = CAR(type_struct(entity_type(allocatable_struct))).e;
164  return data_field;
165 }

References basic_derived, CAR, entity_allocatable_p(), entity_type, pips_assert, type_struct, type_variable, and variable_basic.

Referenced by get_allocatable_data_expr(), and text_entity_declaration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_allocatable_data_expr()

expression get_allocatable_data_expr ( entity  e)

This function produce an expression that is an access to the array inside the allocatable structure.

Definition at line 141 of file allocatable.c.

141  {
142  pips_assert("Entity isn't an allocatable", entity_allocatable_p(e));
143 
144  entity data_field = get_allocatable_data_entity(e);
145 
146  // Construct the expression e.data
149  entity_to_expression(data_field));
150 
151 }
#define FIELD_OPERATOR_NAME
Definition: ri-util-local.h:91
entity get_allocatable_data_entity(entity e)
Get the entity inside the struct corresponding to the array, mostly for correct prettyprint.
Definition: allocatable.c:157

References CreateIntrinsic(), entity_allocatable_p(), entity_to_expression(), FIELD_OPERATOR_NAME, get_allocatable_data_entity(), MakeBinaryCall(), and pips_assert.

Referenced by gfc2pips_expr2expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_common_members()

list get_common_members ( entity  ,
entity  ,
bool   
)

◆ get_continue_entity()

entity get_continue_entity ( void  )

true if continue.

See also macro ENTITY_CONTINUE_P

Definition at line 1726 of file entity.c.

1727 {
1729  return continue_ent;
1730 }
static entity continue_ent
continue statement
Definition: entity.c:62
void set_internal_static_entities()
beware: cannot be called on creating the database
Definition: entity.c:92

References continue_ent, and set_internal_static_entities().

Referenced by entity_continue_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_current_statement_from_statement_global_stack()

statement get_current_statement_from_statement_global_stack ( void  )

Definition at line 344 of file static.c.

345 {
349  return st;
350 }
struct _newgen_struct_statement_ * statement
Definition: cloning.h:21
bool stack_empty_p(const stack)
void * stack_head(const stack)
returns the item on top of stack s
Definition: stack.c:420

References stack_empty_p(), stack_head(), statement_global_stack, and statement_undefined.

Referenced by c_user_call_to_transformer(), call_to_transformer(), points_to_context_statement_line_number(), semantics_expression_to_points_to_sinks(), semantics_expression_to_points_to_sources(), and semantics_user_warning_alist().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_declaration_comments()

sentence get_declaration_comments ( entity  module)

Get all the declaration comments, that are comments from the PROGRAM, FUNCTION,...

stuff up to the end of the declarations:

Get the textual header:

Now, gather all the comments:

Add it to the extracted_comments:

There is no newline, so this is the last comment line:

Build a string that holds the comment:

Have a look to next line if any...

Parameters
moduleodule

Definition at line 275 of file module.c.

276 {
277  string comment;
278  string old_extracted_comments;
279  string extracted_comments = strdup("");
280  /* Get the textual header: */
281  string the_comments = code_decls_text(entity_code(module));
282 
283  comment = get_end_of_header_comments(the_comments);
284  /* Now, gather all the comments: */
285  for(;;) {
286  string next_line;
287  if (*comment == '\0')
288  break;
289  next_line = strchr(comment, '\n');
290  if (comment_string_p(comment)) {
291  string the_comment;
292  /* Add it to the extracted_comments: */
293  if (next_line == NULL)
294  /* There is no newline, so this is the last
295  comment line: */
296  the_comment = strdup(comment);
297  else {
298  /* Build a string that holds the comment: */
299  the_comment = (string) malloc(next_line - comment + 2);
300  (void) strncpy(the_comment, comment, next_line - comment + 1);
301  the_comment[next_line - comment + 1] = '\0';
302  }
303  old_extracted_comments = extracted_comments;
304  extracted_comments = strdup(concatenate(old_extracted_comments,
305  the_comment,
306  NULL));
307  free(old_extracted_comments);
308  free(the_comment);
309  }
310  /* Have a look to next line if any... */
311  if (next_line == NULL)
312  break;
313  comment = next_line + 1;
314  }
315 
316  return make_sentence(is_sentence_formatted, extracted_comments);
317 }
sentence make_sentence(enum sentence_utype tag, void *val)
Definition: text.c:59
void * malloc(YYSIZE_T)
static string get_end_of_header_comments(string the_comments)
Look for the end of header comments:
Definition: module.c:224
bool comment_string_p(const string)
Test if a string can be a Fortran 77 comment:
Definition: util.c:159
@ is_sentence_formatted
Definition: text.h:57

References code_decls_text, comment(), comment_string_p(), concatenate(), entity_code(), free(), get_end_of_header_comments(), is_sentence_formatted, make_sentence(), malloc(), module, and strdup().

Referenced by ensure_comment_consistency().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_declared_entities()

set get_declared_entities ( void *  elem)

retrieves the set of entities declared in elem

Returns
set of referenced entities
Parameters
elemlem

Definition at line 3086 of file entity.c.

3086  {
3087  set the_set = set_make(set_pointer);
3089  return the_set;
3090 }
void gen_null2(__attribute__((unused)) void *u1, __attribute__((unused)) void *u2)
idem with 2 args, to please overpeaky compiler checks
Definition: genClib.c:2758
bool do_get_declared_entities(statement s, set declared_entities)
Helper for get_declared_entities() Add all locally declared entity to the set given in argument.
Definition: entity.c:3074

References do_get_declared_entities(), gen_context_recurse, gen_null2(), set_make(), set_pointer, and statement_domain.

+ Here is the call graph for this function:

◆ get_enclosing_loops_map()

statement_mapping get_enclosing_loops_map ( void  )

Referenced by clean_enclosing_loops().

+ Here is the caller graph for this function:

◆ get_header_comments()

sentence get_header_comments ( entity  module)

Get the header comments (before PROGRAM, FUNCTION,...) from the text declaration:

Get the textual header:

Keep room for the trailing '\0':

Parameters
moduleodule

Definition at line 254 of file module.c.

255 {
256  int length;
257  string end_of_comment;
258  string extracted_comment;
259  /* Get the textual header: */
260  string the_comments = code_decls_text(entity_code(module));
261 
262  end_of_comment = get_end_of_header_comments(the_comments);
263  /* Keep room for the trailing '\0': */
264  length = end_of_comment - the_comments;
265  extracted_comment = (string) malloc(length + 1);
266  (void) strncpy(extracted_comment, the_comments, length);
267  extracted_comment[length] = '\0';
268  return make_sentence(is_sentence_formatted, extracted_comment);
269 }

References code_decls_text, entity_code(), get_end_of_header_comments(), is_sentence_formatted, make_sentence(), malloc(), and module.

Referenced by ensure_comment_consistency().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_ith_dummy()

entity get_ith_dummy ( string  prefix,
string  suffix,
int  i 
)

Returns a numbered entity the name of which is suffix + number, the module of which is prefix.

Used by some macros to return dummy and primed variables for system of constraints.

moved to ri-util from hpfc on BC's request. FC 08/09/95

Parameters
prefixrefix
suffixuffix

Definition at line 1711 of file variable.c.

1712 {
1713  char buffer[100];
1714  assert(i>=1 && i<=7);
1715  (void) sprintf(buffer, "%s%d", suffix, i);
1716 
1718 }
entity find_or_create_scalar_entity(const char *name, const char *module_name, tag base)
Looks for an entity which should be a scalar of the specified basic.
Definition: variable.c:1025

References assert, buffer, find_or_create_scalar_entity(), is_basic_int, and prefix.

Referenced by compute_entity_to_declaration_constraints().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_referenced_entities()

set get_referenced_entities ( void *  elem)

retrieves the set of entities used in elem beware that this entities may be formal parameters, functions etc so consider filter this set depending on your need, using get_referenced_entities_filtered

Parameters
elemelement to check (any gen_recursifiable type is allowded)
Returns
set of referenced entities
Parameters
elemlem

Definition at line 3063 of file entity.c.

3064 {
3065  return get_referenced_entities_filtered(elem,(bool (*)(void*))gen_true,
3067 
3068 }
bool entity_not_constant_or_intrinsic_p(entity e)
Default entity filter for get_referenced_entities()
Definition: entity.c:3050
set get_referenced_entities_filtered(void *elem, bool(*chunk_filter)(void *), bool(*entity_filter)(entity))
Same as get_referenced_entities, but will only consider entities that fulfills entity_filter and will...
Definition: entity.c:2982

References entity_not_constant_or_intrinsic_p(), gen_true(), and get_referenced_entities_filtered().

Referenced by C_loop_range(), check_private_variables_call_walker(), do_group_statement_constant_filter(), do_loop_expansion(), do_loop_nest_unswitching(), do_remove_redundant_communications_in_anyloop(), do_terapix_pointer_initialized_from_a_mask_p(), do_terapix_warmup(), entity_generate_missing_declarations(), fix_loop_index_sign(), for_to_do_loop_conversion(), gather_local_indices(), get_loop_locals_and_remove_walker(), get_private_entities(), guard_expanded_statement_if_needed(), inline_expression_call(), promote_local_entities(), prune_non_constant(), solve_name_clashes(), statements_conflict_p(), terapix_loop_handler(), terapix_loop_optimizer(), terapixify_loop_purge(), and terapixify_loops().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_referenced_entities_filtered()

set get_referenced_entities_filtered ( void *  elem,
bool(*)(void *)  chunk_filter,
bool(*)(entity entity_filter 
)

Same as get_referenced_entities, but will only consider entities that fulfills entity_filter and will only enter consider entities directly involved in object matching chunk_filter \/!\ if you strip out statements, it will not consider declared entities, but it will consider their initial value.

if elem is an entity it self, add it

gather entities from elem

gather all entities referenced by referenced entities

not merged with earlier test to avoid infinite recursion

Parameters
elemlem

Definition at line 2982 of file entity.c.

2984 {
2985  set referenced_entities = set_make(set_pointer);
2986  if(!gen_chunk_undefined_p(elem)) {
2988  referenced_entities,
2989  chunk_filter,
2990  entity_filter
2991  };
2992 
2993  /* if elem is an entity it self, add it */
2994  if(INSTANCE_OF(entity,(gen_chunkp)elem)) {
2995  entity e = (entity)elem;
2996  if(!entity_module_p(e)) {
2997  if(chunk_filter(entity_type(e)))
3001  NULL);
3002  if(!value_undefined_p(entity_initial(e)) && // struct fields have undefined initial
3003  chunk_filter(entity_initial(e)))
3009  NULL);
3010  }
3011  }
3012  else {
3013  /* gather entities from elem */
3014  gen_context_multi_recurse(elem,&p,
3020  NULL);
3021  }
3022 
3023  /* gather all entities referenced by referenced entities */
3024  list ltmp = set_to_list(referenced_entities);
3025  FOREACH(ENTITY,e,ltmp) {
3026  if(e!=elem) {
3027  set tmp = get_referenced_entities_filtered(e,chunk_filter,entity_filter);
3028  set_union(referenced_entities,referenced_entities,tmp);
3029  set_free(tmp);
3030  }
3031  }
3032  gen_free_list(ltmp);
3033 
3034  /* not merged with earlier test to avoid infinite recursion */
3035  if(INSTANCE_OF(entity,(gen_chunkp)elem)) {
3036  entity e = (entity)elem;
3037  set_add_element(referenced_entities,referenced_entities,e);
3038  }
3039  }
3040 
3041  return referenced_entities;
3042 }
void gen_context_multi_recurse(void *o, void *context,...)
Multi-recursion with context function visitor.
Definition: genClib.c:3373
list set_to_list(const set)
create a list from a set the set is not freed
Definition: set.c:436
set set_union(set, const set, const set)
Definition: set.c:211
#define INSTANCE_OF(type, value)
polymorhism thanks to newgen !
static void do_get_referenced_entities_on_loop(loop l, get_referenced_entities_t *p)
helper looking in a loop for referenced entities
Definition: entity.c:2917
static void do_get_referenced_entities_on_statement(statement s, get_referenced_entities_t *p)
helper looking in a statement declaration for referenced entities
Definition: entity.c:2956
static void do_get_referenced_entities_on_reference(reference r, get_referenced_entities_t *p)
helper looking in a reference r for referenced entities
Definition: entity.c:2895
static void do_get_referenced_entities_on_area(area a, get_referenced_entities_t *p)
helper looking in an area for referenced entities
Definition: entity.c:2948
static void do_get_referenced_entities_on_ram(ram r, get_referenced_entities_t *p)
helper looking in a ram for referenced entities
Definition: entity.c:2939
static void do_get_referenced_entities_on_call(call c, get_referenced_entities_t *p)
helper looking in a call for referenced entities
Definition: entity.c:2906
#define loop_domain
newgen_language_domain_defined
Definition: ri.h:218
#define area_domain
newgen_application_domain_defined
Definition: ri.h:34
#define ram_domain
newgen_qualifier_domain_defined
Definition: ri.h:322
#define call_domain
newgen_callees_domain_defined
Definition: ri.h:58
A gen_chunk is used to store every object.
Definition: genC.h:58

References area_domain, call_domain, do_get_referenced_entities_on_area(), do_get_referenced_entities_on_call(), do_get_referenced_entities_on_loop(), do_get_referenced_entities_on_ram(), do_get_referenced_entities_on_reference(), do_get_referenced_entities_on_statement(), ENTITY, entity_initial, entity_module_p(), entity_type, FOREACH, gen_chunk_undefined_p, gen_context_multi_recurse(), gen_free_list(), gen_true(), INSTANCE_OF, loop_domain, ram_domain, reference_domain, set_add_element(), set_free(), set_make(), set_pointer, set_to_list(), set_union(), statement_domain, and value_undefined_p.

Referenced by do_get_referenced_entities_on_statement(), do_group_statement_constant_prune(), get_referenced_entities(), module_to_value_mappings(), outliner_independent_recursively(), outliner_statements_referenced_entities(), sort_entities_with_dep(), and statement_clean_declarations_helper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_stderr_entity()

entity get_stderr_entity ( void  )

Definition at line 1220 of file entity.c.

1221 {
1223  return stderr_ent;
1224 }
void set_std_static_entities()
beware: cannot be called on creating the database
Definition: entity.c:80
static entity stderr_ent
Definition: entity.c:73

References set_std_static_entities(), and stderr_ent.

Referenced by stderr_entity_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_stdin_entity()

entity get_stdin_entity ( void  )

Definition at line 1197 of file entity.c.

1198 {
1200  return stdin_ent;
1201 }
static entity stdin_ent
stdio files entities
Definition: entity.c:71

References set_std_static_entities(), and stdin_ent.

Referenced by stdin_entity_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_stdout_entity()

entity get_stdout_entity ( void  )

Definition at line 1209 of file entity.c.

1210 {
1212  return stdout_ent;
1213 }
static entity stdout_ent
Definition: entity.c:72

References set_std_static_entities(), and stdout_ent.

Referenced by stdout_entity_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ global_name_to_entity()

entity global_name_to_entity ( const char *  name)

Find an entity, if it exists, from its global name, a.k.a.

its entity name.

Let's avoid Newgen interface, gen_find_tabulated(), in PIPS passes.

Parameters
nameame

Definition at line 1516 of file entity.c.

1516  {
1517  return gen_find_tabulated(name, entity_domain );
1518 }

References entity_domain, and gen_find_tabulated().

+ Here is the call graph for this function:

◆ global_variable_p()

bool global_variable_p ( entity  v)

Is v a global variable such as "int i;".

This is OK for C, but Fortran deals with commons.

Definition at line 1510 of file variable.c.

1511 {
1512  // static global variables are decared in a compilation unit
1513  bool global_variable_p =
1514  (strcmp(entity_module_name(v), TOP_LEVEL_MODULE_NAME)==0);
1515 
1516  return global_variable_p;
1517 }
bool global_variable_p(entity v)
Is v a global variable such as "int i;".
Definition: variable.c:1510

References entity_module_name(), global_variable_p(), and TOP_LEVEL_MODULE_NAME.

Referenced by create_values_for_simple_effect(), filter_formal_context_according_to_actual_context(), generic_transformer_intra_to_inter(), global_variable_p(), and new_filter_formal_context_according_to_actual_context().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ heap_area_p()

◆ hpf_directive_entity_p()

bool hpf_directive_entity_p ( entity  e)

Definition at line 56 of file hpfc.c.

57 {
58  return top_level_entity_p(e) &&
60 }
bool hpf_directive_string_p(const char *s)
recognize an hpf directive special entity.
Definition: hpfc.c:51

References entity_local_name(), hpf_directive_string_p(), and top_level_entity_p().

Referenced by directive_filter(), distribution_format(), hpfc_call_with_distributed_args_p(), hpfc_compile(), and hpfc_directives_handler().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hpf_directive_string_p()

bool hpf_directive_string_p ( const char *  s)

hpfc.c

hpfc.c

(the prefix of which is HPF_PREFIX, as a convention) both functions are available, based on the name and on the entity.

Definition at line 51 of file hpfc.c.

52 {
53  return strncmp(HPF_PREFIX, s, strlen(HPF_PREFIX))==0;
54 }

References HPF_PREFIX.

Referenced by EndOfProcedure(), hpf_directive_entity_p(), and hpfc_filter().

+ Here is the caller graph for this function:

◆ iabs_expression_p()

bool iabs_expression_p ( expression  e)

Definition at line 1036 of file expression.c.

1038 {
1040 }
#define IABS_OPERATOR_NAME

References IABS_OPERATOR_NAME, and operator_expression_p().

+ Here is the call graph for this function:

◆ implicit_c_variable_p()

bool implicit_c_variable_p ( entity  v)

Definition at line 1877 of file variable.c.

1878 {
1879  const char * vn = entity_user_name(v);
1880 
1881 
1882  // return string_equal_p(vn, IMPLICIT_VARIABLE_NAME_1)
1883  //|| string_equal_p(vn, IMPLICIT_VARIABLE_NAME_2);
1884 
1885  return strcmp(vn, IMPLICIT_VARIABLE_NAME_1) == 0
1886  || strcmp(vn, IMPLICIT_VARIABLE_NAME_2) == 0;
1887 
1888 }
#define IMPLICIT_VARIABLE_NAME_1
Implicit variable names for C.
#define IMPLICIT_VARIABLE_NAME_2

References entity_user_name(), IMPLICIT_VARIABLE_NAME_1, and IMPLICIT_VARIABLE_NAME_2.

Referenced by c_text_entities(), inline_expression_call(), and solve_name_clashes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initialize_clean_up_sequences_statistics()

void initialize_clean_up_sequences_statistics ( void  )

Definition at line 54 of file clean_up_sequences.c.

References clean_up_1_statement_sequence, clean_up_empty_block_removed, and clean_up_fused_sequences.

Referenced by clean_up_sequences().

+ Here is the caller graph for this function:

◆ instruction_identification()

string instruction_identification ( instruction  i)

Return a constant string representing symbolically the instruction type.

Does not work for undefined instructions: core dump.

Returns
a constant string such as "WHILE LOOP" for a "while()" or "do while()" loop and so on.

Definition at line 284 of file instruction.c.

285 {
286  string instrstring = NULL;
287 
288  switch (instruction_tag(i))
289  {
290  case is_instruction_loop:
291  instrstring="DO LOOP";
292  break;
294  instrstring="WHILE LOOP";
295  break;
296  case is_instruction_test:
297  instrstring="TEST";
298  break;
299  case is_instruction_goto:
300  instrstring="GOTO";
301  break;
302  case is_instruction_call:
303  {if (instruction_continue_p(i))
304  instrstring="CONTINUE";
305  else if (return_instruction_p(i))
306  instrstring="RETURN";
307  else if (instruction_stop_p(i))
308  instrstring="STOP";
309  else if (instruction_format_p(i))
310  instrstring="FORMAT";
311  else if (instruction_assign_p(i))
312  instrstring="ASSIGN";
313  else {
314  instrstring="CALL";
315  }
316  break;
317  }
319  instrstring="BLOCK";
320  break;
322  instrstring="UNSTRUCTURED";
323  break;
325  instrstring="FOR LOOP";
326  break;
328  instrstring="EXPRESSION";
329  break;
330  default: pips_internal_error("ill. instruction tag %d",
331  instruction_tag(i));
332  }
333 
334  return instrstring;
335 }
bool instruction_assign_p(instruction i)
Test if an instruction is an assignment.
Definition: instruction.c:164
bool instruction_stop_p(instruction i)
Test if an instruction is a Fortran STOP.
Definition: instruction.c:214
bool instruction_format_p(instruction i)
Test if an instruction is a Fortran FORMAT.
Definition: instruction.c:222
bool instruction_continue_p(instruction i)
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 i)
Test if an instruction is a C or Fortran "return".
Definition: instruction.c:185
#define is_instruction_block
soft block->sequence transition
@ is_instruction_goto
Definition: ri.h:1473
@ is_instruction_unstructured
Definition: ri.h:1475
@ is_instruction_whileloop
Definition: ri.h:1472
@ is_instruction_expression
Definition: ri.h:1478
@ is_instruction_test
Definition: ri.h:1470
@ is_instruction_call
Definition: ri.h:1474
@ is_instruction_forloop
Definition: ri.h:1477
@ is_instruction_loop
Definition: ri.h:1471
#define instruction_tag(x)
Definition: ri.h:1511

References instruction_assign_p(), instruction_continue_p(), instruction_format_p(), instruction_stop_p(), instruction_tag, is_instruction_block, is_instruction_call, is_instruction_expression, is_instruction_forloop, is_instruction_goto, is_instruction_loop, is_instruction_test, is_instruction_unstructured, is_instruction_whileloop, pips_internal_error, and return_instruction_p().

Referenced by external_statement_identification(), LinkInstToCurrentBlock(), MakeNewLabelledStatement(), MakeStatement(), safe_instruction_identification(), statement_identification(), and statement_to_postcondition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ int_to_entity()

entity int_to_entity ( _int  c)

Definition at line 453 of file constant.c.

454 {
455  pips_assert("no negative integer entity in pips",c>=0);
456  string num;
457  asprintf(&num, "%d", (int) c);
459  free(num);
460  return e;
461 }

References asprintf, free(), is_basic_int, MakeConstant(), num, and pips_assert.

Referenced by int_to_expression(), partial_eval_syntax(), string_to_entity(), substitute_unbounded_call(), and zero_expression_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ int_to_expression()

expression int_to_expression ( _int  i)

transform an int into an expression and generate the corresponding entity if necessary; it is not clear if strdup() is always/sometimes necessary and if a memory leak occurs; wait till syntax/expression.c is merged with ri-util/expression.c

Negative constants do not seem to be included in PIPS internal representation.

special hook for VALUE_MIN: the problem is that VALUE_MIN cannot be represented in the IR because -VALUE_MIN does not fit into and _int, so we replace it by VALUE_MIN -1, which is still big ...

Definition at line 1188 of file expression.c.

1189 {
1190  bool negative_p = i<0;
1191  /* special hook for VALUE_MIN:
1192  the problem is that VALUE_MIN cannot be represented in the IR because
1193  -VALUE_MIN does not fit into and _int, so we replace it by VALUE_MIN -1,
1194  which is still big ... */
1195  if(negative_p)
1196  while(i==-i) { // ie while we have an integer overflow
1197  ++i;
1198  }
1199  // it is unclear whether to call abs/labs/llabs...
1200  entity e = int_to_entity(negative_p? -i: i);
1202  if(negative_p)
1204  return exp;
1205 }
entity int_to_entity(_int c)
Definition: constant.c:453

References call_to_expression(), entity_intrinsic(), exp, int_to_entity(), make_call(), MakeUnaryCall(), NIL, and UNARY_MINUS_OPERATOR_NAME.

Referenced by abc_with_allocation_size(), add_initialization_expression(), add_integer_to_expression(), add_prettyprint_control_list_to_declaration_statement(), add_reduction(), ajoute_constante(), ajoute_new_var(), alias_check(), alias_check_array_and_scalar_variable_in_caller_flt(), alias_check_array_and_scalar_variable_in_module_flt(), alias_check_array_variable_in_caller_flt(), alias_check_array_variable_in_module_flt(), alias_check_scalar_and_array_variables_in_caller(), alias_check_scalar_and_array_variables_in_module(), analyze_expression(), any_basic_update_operation_to_transformer(), any_basic_update_to_transformer_list(), array_access_to_array_ranges(), array_as_template(), array_indices_check(), array_indices_communication(), array_ranges_to_template_ranges(), array_scalar_access_to_bank_communication(), array_scalar_access_to_compute_communication(), array_size_stride(), basic_update_reflhs_with_rhs_to_transformer(), bdt_save_int(), bdt_save_pred(), bottom_up_abc_expression_implied_do(), bound_generation(), bound_to_statement(), bounds_of_expression(), build_bdt_null(), build_call_STEP_init_regionArray(), build_first_comb(), build_flag_assign(), build_flag_test(), build_local_time_test(), build_third_comb(), c_convex_effects_on_actual_parameter_forward_translation(), c_dim_string(), C_loop_range(), c_text_entity(), call_nary_rwt(), check_loop_distribution_feasability(), code_generation(), comEngine_generate_procCode(), compile_master(), compile_one_reduction(), compile_reduction(), complementary_range(), complete_points_to_reference_with_fixed_subscripts(), complex_bound_generation(), compute_final_index_value(), compute_receive_content(), compute_receive_domain(), constant_image_p(), constant_reference_to_normalized_constant_reference(), constraints_to_loop_bound(), contraintes_to_expression(), convert_bound_expression(), create_counter(), create_externalized_function_common(), create_pointer_to_array_stub_points_to(), create_stub_points_to(), CreateLogicalUnits(), cstr_args_check(), ctx_generate_new_statement_cluster_dependant(), dag_normalize(), dag_simplify(), DeclarePointer(), define_node_processor_id(), dimension_to_range(), distance_between_entity(), distance_between_expression(), do_brace_expression_to_statements(), do_brace_expression_to_updated_type(), do_gather_all_expressions(), do_group_constants_terapix(), do_group_count_elements(), do_group_count_elements_reduce(), do_isolate_statement_preconditions_satisified_p(), do_linearize_array_reference(), do_linearize_prepatch(), do_linearize_prepatch_subscript(), do_linearize_prepatch_type(), do_linearize_type(), do_loop_expansion(), do_loop_expansion_init(), do_loop_unroll_with_epilogue(), do_loop_unroll_with_prologue(), do_simdizer_auto_tile_int_to_list(), do_solve_hardware_constraints_on_nb_proc(), do_solve_hardware_constraints_on_volume(), do_symbolic_tiling(), do_terapix_remove_divide(), dynamic_alias_check_flt(), ecrit_une_var(), ecrit_une_var_neg(), edge_cost_polynome(), effects_to_dma(), enclose_in_a_parallel_loop(), entity_ith_bounds(), expand_call(), expr_compute_local_index(), expression_plusplus(), expression_try_find_size(), expression_try_find_string_size(), extract_the_align(), fix_if_condition(), flow_sensitive_malloc_to_points_to_sinks(), free_guards(), full_loop_unroll(), fusion(), fusion_buffer(), gen_mpi_send_recv(), generate_call_get_workchunk_loopbounds(), generate_call_set_regionarray(), generate_code(), generate_compact(), generate_copy_loop_nest(), generate_fifo_stat(), generate_full_copy(), generate_ind_fifo_stat2(), generate_io_wp65_code(), generate_loop_workchunk(), generate_mmcd_stat_from_ref(), generate_monome(), generate_one_message(), generate_prelude(), generate_remapping_guard(), generate_stat_from_ref_list_proc(), generate_stat_from_ref_list_proc_list(), generate_subarray_shift(), GenerateReturn(), generic_effect_find_aliases_with_simple_pointer_values(), generic_reference_add_fixed_subscripts(), get_complement_expression(), get_fifo_from_ref(), get_indExp_from_ref(), get_sizeofexpression_for_region(), gfc2pips_array_ref2indices(), gfc2pips_code2instruction_(), gfc2pips_get_list_of_dimensions2(), gfc2pips_int2dimension(), gfc2pips_vars_(), heap_intrinsic_to_post_pv(), Hierarchical_tiling(), hpfc_add_2(), hpfc_add_n(), hpfc_broadcast_buffers(), hpfc_buffer_initialization(), hpfc_compute_lid(), hpfc_init_run_time_entities(), if_different_pe_and_not_twin(), impact_check(), incrementation_expression_to_increment(), initialization_list_to_statements(), InitializeEnumMemberValues(), inline_statement_crawler(), interprocedural_abc_arrays(), intrinsic_call_to_points_to(), live_mapping_expression(), loop_annotate(), loop_flt(), loop_nest_to_wp65_code(), loop_normalize_of_loop(), loop_strip_mine(), lower_bound_generation(), make_0val_expression(), make_1val_expression(), make_abc_count_statement(), make_array_bounds(), make_bound_expression(), make_bounds(), make_c_stop_statement(), make_condition_from_loop(), make_constraint_expression(), make_datum_movement(), make_emulated_shared_variable(), make_exec_mmcd(), make_exit_statement(), make_expression_with_state_variable(), make_factor_expression(), make_global_common_and_initialize(), make_guard_expression(), make_increment_instruction(), make_increment_statement(), make_init_newInd_stat(), make_lInitStats(), make_list_of_constant(), make_list_of_flags(), make_loadsave_statement(), make_loop_skeleton(), make_lSwitchStats(), make_max_exp(), make_maxval_expression(), make_minval_expression(), make_mmcd_load_store_stat(), make_movement_scalar_wp65(), make_movements_loop_body_wp65(), make_mypos_expression(), make_new_simd_vector_with_prefix(), make_op_exp(), make_rational_exp(), make_reduction_vector_entity(), make_reindex(), make_scanning_over_one_tile(), make_scanning_over_tiles(), make_send_receive_conversion(), make_set_rc_statement(), make_shuffle_statement(), make_special_value(), make_state_variable_assignement_statement(), make_step_inc_statement(), make_toggle_inc_statement(), make_toggle_init_statement(), make_toggle_mmcd(), make_transStat(), make_unbounded_dimensions(), make_vecteur_expression(), make_zero_expression(), MakeArithmIfInst(), MakeAssignedOrComputedGotoInst(), MakeAtom(), MakeDataValueSet(), MakeDimension(), MakeForloop(), MakeIoFileArray(), MakeIoInstA(), MakeWhileDoInst(), malloc_arg_to_type(), merge_lists(), module_initial_parameter_pv(), monome_to_expression(), mpic_make_args_mpi_send_or_receiv(), ndf_normalized_test(), new_local_image_variable(), NewDeclarationOfDistributedArray(), normalize_integer_constant_expression(), normalize_test_leaves(), NormalizeOneTemplateDistribution(), offset_array_reference(), offset_in_caller(), offset_of_struct(), offset_points_to_cell(), original_malloc_to_abstract_location(), outliner_extract_loop_bound(), outliner_patch_parameters(), outliner_smart_references_computation(), overlap_redefine_expression(), parallel_tiling(), perform_array_element_substitutions_in_transformer(), phi_free_contraints_to_expressions(), points_to_cell_types_compatibility(), points_to_cell_update_last_subscript(), polynome_to_expression(), pragma_build_if_condition(), predicate_to_expression(), prepare_array_bounds(), prgm_mapping(), promote_statement(), propagate_constant_image(), psystem_to_expression(), ram_variable_add_aliases(), range_to_expression(), rational_op_exp(), rational_sol_edit(), re_do_it(), reference_add_field_dimension(), reference_add_zero_subscript(), reference_complete_with_zero_subscripts(), reference_filter(), reference_offset(), reference_to_points_to_sinks(), reference_to_points_to_translations(), regenerate_expression(), region_to_address(), region_to_minimal_dimensions(), rename_reduction_ref_walker(), replace_reductions_in_statement(), safe_static_domain_bound(), same_or_equivalence_argument_add_aliases(), save_int(), save_pred(), sc_delimiter(), sc_opposite_exp_of_conjunction(), sesamify(), set_array_status_to_target(), set_dimensions_of_local_variable_family(), shape_one_message(), simdizer_auto_tile(), simplified_reference(), simplify_complex_entity(), simplify_complex_expression(), simplify_dimension(), simplify_relational_expression(), size_of_actual_array(), size_of_dummy_array(), size_of_regions(), SizeOfDimension(), SizeOfDimensions(), split_complex_expression(), sprintf_check_expression(), st_compute_current_computer(), st_compute_current_owners(), st_compute_neighbour(), statement_compute_bounds(), step_local_loopSlices(), step_local_regionArray(), step_parameter(), storage_ram_offset(), subscript_expressions_to_constant_subscript_expressions(), subscript_value(), subscript_value_stride(), substitute_and_create(), substitute_struct_stub_in_transformer(), systeme_to_loop_nest(), template_ranges_to_processors_ranges(), test_bound_generation(), Tiling2_buffer(), Tiling_buffer_allocation(), tiling_transformation(), top_down_abc_dimension(), type_to_array_type(), unary_into_binary_ref(), unary_intrinsic_call_to_points_to_sinks(), update_indices_for_local_computation(), update_operator_to_post_pv(), update_range(), upper_bound_generation(), usual_loop_tiling(), Value_to_expression(), variable_initial_expression(), variable_to_dimensions(), verify_array_element(), verify_array_variable(), verify_scalar_variable(), and words_dimension().

+ Here is the call graph for this function:

◆ integer_constant_expression_p()

bool integer_constant_expression_p ( expression  e)

positive integer constant expression: call to a positive constant or to a sum of positive integer constant expressions (much too restrictive, but enough for the source codes submitted to PIPS up to now).

Likely to fail and need further extension if subtraction and multiplication are used as probably allowed by C standard.

NormalizeExpression() could be used instead, as it is in fact to compute the value of the expression.

Use previous function instead of this one, and -1 will be a constant...

Definition at line 903 of file expression.c.

905 {
906  syntax s = expression_syntax(e);
907  bool ice = false;
908 
909  if(syntax_call_p(s)) {
910  call c = syntax_call(s);
911  entity cst = call_function(c);
912  list args = call_arguments(c);
913  int i;
914 
915  if(integer_constant_p(cst, &i)) {
916  ice = true;
917  }
918  else if(integer_symbolic_constant_p(cst, &i)) {
919  ice = true;
920  }
921  else if(ENTITY_PLUS_P(cst)||ENTITY_PLUS_C_P(cst)) {
922  expression e1 = EXPRESSION(CAR(args));
923  expression e2 = EXPRESSION(CAR(CDR(args)));
924 
926  }
927  }
928 
929  return ice;
930 }
bool integer_constant_p(entity ent, int *int_p)
Returns the double value associated to a PIPS constant.
Definition: constant.c:542
bool integer_symbolic_constant_p(entity ent, int *int_p)
(*int_p) gets integer constant if any
Definition: constant.c:556
bool integer_constant_expression_p(expression e)
positive integer constant expression: call to a positive constant or to a sum of positive integer con...
Definition: expression.c:903

References call_arguments, call_function, CAR, CDR, ENTITY_PLUS_C_P, ENTITY_PLUS_P, EXPRESSION, expression_syntax, integer_constant_p(), integer_symbolic_constant_p(), syntax_call, and syntax_call_p.

Referenced by full_define_p(), get_final_offset(), integer_constant_expression_value(), integer_divide_to_transformer(), integer_right_shift_to_transformer(), make_send_receive_conversion(), sentence_data_statement(), signed_integer_constant_expression_p(), and test_working_false().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ integer_constant_expression_value()

int integer_constant_expression_value ( expression  e)

Definition at line 1545 of file expression.c.

1546 {
1547  pips_assert("is constant", integer_constant_expression_p(e));
1549 }
int signed_integer_constant_expression_value(expression e)
Definition: expression.c:1551

References integer_constant_expression_p(), pips_assert, and signed_integer_constant_expression_value().

Referenced by c_text_related_entities(), full_define_p(), get_final_offset(), integer_divide_to_transformer(), and integer_right_shift_to_transformer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ integer_constant_name_p()

bool integer_constant_name_p ( string  name)
Parameters
nameame

Definition at line 83 of file constant.c.

84 {
85  return strlen(name)==strspn(name, INTEGER_CONSTANT_NAME_CHARS);
86 }
#define INTEGER_CONSTANT_NAME_CHARS
BEGIN_EOLE.
Definition: constant.c:80

References INTEGER_CONSTANT_NAME_CHARS.

◆ integer_constant_p()

bool integer_constant_p ( entity  ent,
int int_p 
)

Returns the double value associated to a PIPS constant.

A simpler function alreay exists... and is better for litteral constants... BEGIN_EOLE

  • please do not remove this line Lines between BEGIN_EOLE and END_EOLE tags are automatically included in the EOLE project (JZ - 11/98) (*int_p) gets integer constant if any
Parameters
entnt
int_pnt_p

Definition at line 542 of file constant.c.

543 {
548  return(true);
549  }
550  else
551  return(false);
552 }
#define constant_tag(x)
Definition: ri.h:847

References constant_int, constant_tag, entity_initial, entity_type, is_constant_int, is_type_functional, is_value_constant, type_tag, value_constant, and value_tag.

Referenced by constant_to_transformer(), integer_constant_expression_p(), logical_expression_to_transformer(), partial_eval_call(), and verify_formal_and_common_variables().

+ Here is the caller graph for this function:

◆ integer_expression_p()

bool integer_expression_p ( expression  e)

Definition at line 601 of file expression.c.

602 {
603  basic b = basic_of_expression(e);
604  bool integer_p = basic_int_p(b);
605 
606  free_basic(b);
607  return integer_p;
608 }
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

References basic_int_p, basic_of_expression(), and free_basic().

Referenced by fix_if_condition(), and points_to_cell_to_upper_bound_points_to_cells().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ integer_scalar_entity_p()

bool integer_scalar_entity_p ( entity  e)

integer_scalar_entity_p() is obsolete; use entity_integer_scalar_p()

Definition at line 1137 of file variable.c.

1138 {
1139  type ct = ultimate_type(entity_type(e));
1140  return type_variable_p(entity_type(e)) &&
1143 }

References basic_int_p, entity_type, NIL, type_variable, type_variable_p, ultimate_type(), variable_basic, and variable_dimensions.

Referenced by allocate_module_value_mappings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ integer_symbolic_constant_p()

bool integer_symbolic_constant_p ( entity  ent,
int int_p 
)

(*int_p) gets integer constant if any

Parameters
entnt
int_pnt_p

Definition at line 556 of file constant.c.

557 {
562  return(true);
563  }
564  else
565  return(false);
566 }

References constant_int, constant_tag, entity_initial, entity_type, is_constant_int, is_type_functional, is_value_symbolic, symbolic_constant, type_tag, value_symbolic, and value_tag.

Referenced by integer_constant_expression_p(), and partial_eval_call().

+ Here is the caller graph for this function:

◆ integer_type_p()

bool integer_type_p ( type  t)

Definition at line 3298 of file type.c.

3299 {
3300  bool int_p = false;
3301  if(!type_undefined_p(t) && type_variable_p(t)) {
3302  variable v = type_variable(t);
3303  basic b = variable_basic(v);
3304  int_p = basic_int_p(b);
3305  }
3306  return int_p;
3307 }

References basic_int_p, type_undefined_p, type_variable, type_variable_p, and variable_basic.

Referenced by declaration_statement_to_points_to(), eval_linear_expression(), and generic_abs_to_transformer().

+ Here is the caller graph for this function:

◆ intrinsic_call_to_type()

type intrinsic_call_to_type ( call  c)

END_EOLE.

Returns
the (newly allocated) type of the result given by call to an intrinsic function.

This type must be computed with the basic of the arguments of the intrinsic for overloaded operators. It should be able to accomodate more than two arguments as for generic min and max operators.

the result

pips_debug(9, "Intrinsic call to intrinsic \"s" with a priori result type "s"
",

module_local_name(f),

words_to_string(words_type(rt, NIL, false)));

I don't know the type since there is no arguments ! Bug encountered with a FMT=* in a PRINT. RK, 21/02/1994 :

leave it overloaded

isn't expression_to_type expected to return a bct? well, there are cases (casts) which are not clear on this point... BC.

isn't it dangerous?, an ultimate_type can be an entity type!

ifdebug(9)

{

pips_debug(8, "Point to case, e1 = ");

print_expression(e1);

pips_debug(8, " and e2 = ");

print_expression(e2);

pips_debug(8, "\n");

}

We should reconstruct a struct type or an array type...

returns the type of the left hand side

The value returned is the value of the last expression in the list.

let us assume that the two last arguments have the same type : basic_maximum does not preserve types enough (see Effects/lhs01.c, expression *(i>2?&i:&j) ). BC.

pips_user_warning("Non matching pointed types in pointer arithmetic expression %s - %s\n",

expression_to_string(exp1), expression_to_string(exp2));

current type of expression is type of first argument, except if it is an array, e.g. "fifi+3" after declaration "int fifi[3];"

we need to check the variable dimensions

re-use an existing function. we do not take into account variable dimensions here. It may not be correct. but it's not worse than the previously existing version of expression_to_type

current type is still valid

pips_debug(9, "Intrinsic call to intrinsic \"s" "

"with a posteriori result type \"s"
",

module_local_name(f),

words_to_string(words_type(t, NIL, false)));

Definition at line 2080 of file type.c.

2081 {
2082 
2083  entity f = call_function(c);
2084  list args = call_arguments(c);
2085  type t = type_undefined; /* the result */
2087 
2088  if(type_void_p(rt)) {
2089  t = copy_type(rt);
2090  }
2091  else if(type_variable_p(rt)) {
2093 
2094  // FI: to avoid cycles between librairies ri-util and prettyprint
2095  /* pips_debug(9, "Intrinsic call to intrinsic \"%s\" with a priori result type \"%s\"\n", */
2096  /* module_local_name(f), */
2097  /* words_to_string(words_type(rt, NIL, false))); */
2098 
2099  if(basic_overloaded_p(rb))
2100  {
2101 
2102  if (ENDP(args))
2103  {
2104  /* I don't know the type since there is no arguments !
2105  Bug encountered with a FMT=* in a PRINT.
2106  RK, 21/02/1994 : */
2107  /* leave it overloaded */
2108  t = copy_type(rt);
2109  }
2110  else if(ENTITY_ADDRESS_OF_P(f))
2111  {
2112  expression e = EXPRESSION(CAR(args));
2113  t = expression_to_type(e);
2116  NIL, NIL ));
2117 
2118  }
2119  else if(ENTITY_DEREFERENCING_P(f))
2120  {
2121  expression e = EXPRESSION(CAR(args));
2122  type ct = ultimate_type(expression_to_type(e)); /* isn't expression_to_type expected to return a bct?
2123  well, there are cases (casts) which are not clear on this point... BC. */
2124 
2125  if (type_variable_p(ct))
2126  {
2127  variable cv = type_variable(ct);
2128  basic cb = variable_basic(cv);
2129  list cd = variable_dimensions(cv);
2130  if( ENDP(cd)) {
2131  if(basic_pointer_p(cb))
2132  {
2134  pips_assert("The pointed type is consistent",
2135  type_consistent_p(t));
2136  free_type(ct); /* isn't it dangerous?, an ultimate_type can be an entity type! */
2137  }
2138  else if(basic_string_p(cb))
2139  {
2141  }
2142  else
2143  {
2144  pips_assert("Dereferencing of a non-pointer expression : it must be an array\n", !ENDP(cd));
2145  }
2146  }
2147  else {
2148  variable_dimensions(cv) = CDR(cd);
2149  cd->cdr = NIL;
2150  gen_full_free_list(cd);
2151  t = ct;
2152  }
2153  }
2154  else
2155  {
2156  pips_internal_error("dereferencing of a non-variable : not handled yet");
2157  }
2158  }
2159  else if(ENTITY_POINT_TO_P(f) || ENTITY_FIELD_P(f))
2160  {
2161  //expression e1 = EXPRESSION(CAR(args));
2162  expression e2 = EXPRESSION(CAR(CDR(args)));
2163 
2164  pips_assert("Two arguments for POINT_TO or FIELD \n",
2165  gen_length(args)==2);
2166 
2167  // FI: to avoid cycles betwen librairies ri-util and prettyprint
2168  /* ifdebug(9) */
2169  /* { */
2170  /* pips_debug(8, "Point to case, e1 = "); */
2171  /* print_expression(e1); */
2172  /* pips_debug(8, " and e2 = "); */
2173  /* print_expression(e2); */
2174  /* pips_debug(8, "\n"); */
2175  /* } */
2176  t = expression_to_type(e2);
2177  }
2178  else if(ENTITY_BRACE_INTRINSIC_P(f))
2179  {
2180  /* We should reconstruct a struct type or an array type... */
2182  NIL,NIL));
2183  }
2184  else if(ENTITY_ASSIGN_P(f))
2185  {
2186  /* returns the type of the left hand side */
2187  t = expression_to_type(EXPRESSION(CAR(args)));
2188  }
2189  else if(ENTITY_COMMA_P(f))
2190  {
2191  /* The value returned is the value of the last expression in the list. */
2192 
2194  }
2195  else if( ENTITY_CONDITIONAL_P(f))
2196  {
2197  /* let us assume that the two last arguments have the same
2198  type : basic_maximum does not preserve types enough
2199  (see Effects/lhs01.c, expression *(i>2?&i:&j) ). BC.
2200  */
2201  t = expression_to_type(EXPRESSION(CAR(CDR(args))));
2202  }
2203  else
2204  {
2205  bool minus_c_pointer_arithmetic = false;
2206 
2207  // special case for minus operator when first argument is a pointer type
2208  if (ENTITY_MINUS_C_P(f) )
2209  {
2210  expression exp1 = EXPRESSION(CAR(args));
2211  expression exp2 = EXPRESSION(CAR(CDR(args)));
2212  type t1 = expression_to_type(exp1);
2213  type t2 = expression_to_type(exp2);
2214 
2215  if (pointer_type_p(t1))
2216  {
2217  if (pointer_type_p(t2))
2218  {
2219  type pt1 = pointed_type(t1);
2220  type pt2 = pointed_type(t2);
2221  if (!type_equal_p(pt1, pt2))
2222  {
2223  // user application should not pass compilation by a standard compiler
2224  // should we also trigger an error here?
2225  // FI: to avoid cycles between librairies ri-util and prettyprint
2226  /* pips_user_warning("Non matching pointed types in pointer arithmetic expression %s - %s\n", */
2227  /* expression_to_string(exp1), expression_to_string(exp2)); */
2228  pips_user_warning("Non matching pointed types in pointer arithmetic expressions.\n");
2229  }
2230  // result is of type ptrdiff_t (ISO/IEC 9899:TC3)
2232  NIL,NIL));
2233 
2234 
2235  }
2236  else
2237  {
2238  t = copy_type(t1);
2239  }
2240  minus_c_pointer_arithmetic = true;
2241  free_type(t1); free_type(t2);
2242  }
2243  }
2244 
2245  if (! minus_c_pointer_arithmetic )
2246  {
2247  /* current type of expression is type of first
2248  argument, except if it is an array, e.g. "fifi+3"
2249  after declaration "int fifi[3];" */
2250  type ct = expression_to_type(EXPRESSION(CAR(args)));
2251 
2252  if(array_type_p(ct)) {
2254  type nct = type_to_pointer_type(sct);
2255  free_type(ct);
2256  ct = nct;
2257  }
2258 
2259  FOREACH(EXPRESSION, arg, CDR(args)) {
2260  type nt = expression_to_type(arg);
2263 
2266 
2267  /* we need to check the variable dimensions */
2268  if (gen_length(nd) == gen_length(cd))
2269  {
2270  /* re-use an existing function. we do not take into
2271  account variable dimensions here. It may not be correct.
2272  but it's not worse than the previously existing version
2273  of expression_to_type
2274  */
2275  pips_debug(9,"same number of dimensions\n");
2276  basic b = basic_maximum(cb, nb);
2277  free_type(ct);
2278  free_type(nt);
2280  }
2281  else
2282  {
2283  pips_debug(9,"different number of dimensions\n");
2284  pips_assert("pointer arithmetic with array name, first element must be the address expression",
2285  gen_length(cd) > gen_length(nd));
2286  /* current type is still valid */
2287  free_type(nt);
2288  }
2289 
2290 
2291  }
2292  t = ct;
2293  }
2294  }
2295  }
2296  else {
2297  t = copy_type(rt);
2298  }
2299  }
2300  else
2301  pips_internal_error("Unexpected return type.");
2302 
2303  // FI: to avoid cycles between librairies ri-util and prettyprint
2304  /* pips_debug(9, "Intrinsic call to intrinsic \"%s\" " */
2305  /* "with a posteriori result type \"%s\"\n", */
2306  /* module_local_name(f), */
2307  /* words_to_string(words_type(t, NIL, false))); */
2308 
2309  return t;
2310 }
type pointed_type(type t)
returns the type pointed by the input type if it is a pointer or an array of pointers
Definition: type.c:3035
struct cons * cdr
The pointer to the next element.
Definition: newgen_list.h:43

References array_type_p(), array_type_to_sub_array_type(), basic_maximum(), basic_overloaded_p, basic_pointer, basic_pointer_p, basic_string_p, call_arguments, call_function, CAR, cons::cdr, CDR, copy_type(), DEFAULT_CHARACTER_TYPE_SIZE, DEFAULT_POINTER_TYPE_SIZE, ENDP, ENTITY_ADDRESS_OF_P, ENTITY_ASSIGN_P, ENTITY_BRACE_INTRINSIC_P, ENTITY_COMMA_P, ENTITY_CONDITIONAL_P, ENTITY_DEREFERENCING_P, ENTITY_FIELD_P, ENTITY_MINUS_C_P, ENTITY_POINT_TO_P, entity_type, EXPRESSION, expression_to_type(), f(), FOREACH, free_type(), functional_result, gen_full_copy_list(), gen_full_free_list(), gen_last(), gen_length(), is_basic_pointer, is_type_variable, make_basic(), make_basic_int(), make_basic_overloaded(), make_type(), make_type_variable(), make_variable(), NIL, pips_assert, pips_debug, pips_internal_error, pips_user_warning, pointed_type(), pointer_type_p(), type_consistent_p(), type_equal_p(), type_functional, type_to_pointer_type(), type_undefined, type_variable, type_variable_p, type_void_p, ultimate_type(), variable_basic, and variable_dimensions.

Referenced by call_to_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ intrinsic_entity_p()

◆ intrinsic_name_p()

bool intrinsic_name_p ( const char *  local_name)
Parameters
local_nameocal_name

Definition at line 1282 of file entity.c.

1282  {
1284  return !entity_undefined_p(e) && intrinsic_entity_p(e);
1285 }

References entity_undefined_p, FindEntity(), intrinsic_entity_p(), local_name(), and TOP_LEVEL_MODULE_NAME.

+ Here is the call graph for this function:

◆ io_entity_p()

bool io_entity_p ( entity  e)

Several implicit entities are declared to define the implicit effects of IO statements.

Definition at line 1139 of file entity.c.

1140 {
1142  return (same_entity_p(e, luns_ent) || same_entity_p(e, io_ptr_ent)
1144 }
static entity io_error_luns_ent
Definition: entity.c:59
static entity io_ptr_ent
Definition: entity.c:57
static entity io_eof_ent
Definition: entity.c:58
static entity luns_ent
Definition: entity.c:56

References io_eof_ent, io_error_luns_ent, io_ptr_ent, luns_ent, same_entity_p(), and set_internal_static_entities().

Referenced by check_io_statement_p(), com_call(), common_region_translation(), effects_package_entity_p(), and text_test().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ io_intrinsic_p()

bool io_intrinsic_p ( entity  e)

rue is a statement s is an io intrinsic

ool statement_contains_io_intrinsic_call_p(statement s) { IoElementDescriptor *pid = IoElementDescriptorTable; bool found = false;

while ((pid->name != NULL) && (!found)) { if (strcmp(pid->name, s) == 0) { found = true; return true; } } return false; } true if e is an io instrinsic

ortran

Definition at line 1655 of file entity.c.

1656 {
1675 
1676  /*Fortran*/
1678  //entity_intrinsic(PRINT_FUNCTION_NAME),
1688  NULL);
1689  }
1691  return true;
1692  else
1693  return false;
1694 }
#define GETS_FUNCTION_NAME
#define VFPRINTF_FUNCTION_NAME
#define SCANF_FUNCTION_NAME
#define READ_FUNCTION_NAME
#define ENDFILE_FUNCTION_NAME
#define BUFFERIN_FUNCTION_NAME
#define SSCANF_FUNCTION_NAME
#define ISOC99_SSCANF_USER_FUNCTION_NAME
#define FOPEN_FUNCTION_NAME
#define BACKSPACE_FUNCTION_NAME
#define ISOC99_SSCANF_FUNCTION_NAME
#define ISOC99_SCANF_FUNCTION_NAME
#define VFSCANF_FUNCTION_NAME
#define REWIND_FUNCTION_NAME
#define FPRINTF_FUNCTION_NAME
#define OPEN_FUNCTION_NAME
#define SNPRINTF_FUNCTION_NAME
#define WRITE_FUNCTION_NAME
#define CLOSE_FUNCTION_NAME
#define FORMAT_FUNCTION_NAME
#define INQUIRE_FUNCTION_NAME
#define PUTS_FUNCTION_NAME
#define ISOC99_SCANF_USER_FUNCTION_NAME
#define PRINTF_FUNCTION_NAME
include<stdio.h>
#define FCLOSE_FUNCTION_NAME
static set io_functions_set
Definition: entity.c:164

References BACKSPACE_FUNCTION_NAME, BUFFERIN_FUNCTION_NAME, CLOSE_FUNCTION_NAME, ENDFILE_FUNCTION_NAME, entity_intrinsic(), FCLOSE_FUNCTION_NAME, FOPEN_FUNCTION_NAME, FORMAT_FUNCTION_NAME, FPRINTF_FUNCTION_NAME, GETS_FUNCTION_NAME, INQUIRE_FUNCTION_NAME, io_functions_set, ISOC99_SCANF_FUNCTION_NAME, ISOC99_SCANF_USER_FUNCTION_NAME, ISOC99_SSCANF_FUNCTION_NAME, ISOC99_SSCANF_USER_FUNCTION_NAME, OPEN_FUNCTION_NAME, PRINTF_FUNCTION_NAME, PUTS_FUNCTION_NAME, READ_FUNCTION_NAME, REWIND_FUNCTION_NAME, SCANF_FUNCTION_NAME, set_add_elements(), set_belong_p(), set_make(), set_pointer, set_undefined_p, SNPRINTF_FUNCTION_NAME, SSCANF_FUNCTION_NAME, VFPRINTF_FUNCTION_NAME, VFSCANF_FUNCTION_NAME, and WRITE_FUNCTION_NAME.

Referenced by cse_atom_call_flt(), icm_atom_call_flt(), only_io_call(), static_controlize_statement(), and xml_Arguments().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ io_luns_entity_p()

bool io_luns_entity_p ( entity  e)

Definition at line 1146 of file entity.c.

1147 {
1149  return (same_entity_p(e, luns_ent));
1150 }

References luns_ent, same_entity_p(), and set_internal_static_entities().

Referenced by io_effect_entity_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ipow()

int ipow ( int  vg,
int  vd 
)

FI: such a function should exist in Linear/arithmetique.

FI: should it return a long long int?

FI: see arithmetique library

Parameters
vgg
vdd

Definition at line 769 of file eval.c.

770 {
771  int i = 1;
772 
773  assert(vd >= 0);
774 
775  while (vd-- > 0)
776  i *= vg;
777 
778  return(i);
779 }

References assert, and pips_assert.

Referenced by binary_to_normalized(), EvalBinaryOp(), and partial_eval_power_operator().

+ Here is the caller graph for this function:

◆ is_c_keyword_typedef()

_int is_c_keyword_typedef ( char *  s)

This function checks if s is a C keyword or typedef name and returns the token number thanks to the hash-table keyword_typedef_table.

It returns an integer number corresponding to the keyword.

It returns 0 if s is not a keyword/typedef name

Definition at line 297 of file static.c.

298 {
300  return ((char *) i == HASH_UNDEFINED_VALUE) ? 0: i;
301 }
#define HASH_UNDEFINED_VALUE
value returned by hash_get() when the key is not found; could also be called HASH_KEY_NOT_FOUND,...
Definition: newgen_hash.h:56

References hash_get(), HASH_UNDEFINED_VALUE, and keyword_typedef_table.

Referenced by is_c_parser_keyword_typedef(), and is_c_preprocessor_keyword_typedef().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_expression_reference_to_entity_p()

bool is_expression_reference_to_entity_p ( expression  e,
entity  v 
)

Test if an expression is a reference to a given variable entity.

Definition at line 541 of file expression.c.

542 {
543  bool is_e_reference_to_v = false;
544 
545  if(expression_reference_p(e)) {
547 
548  is_e_reference_to_v = (reference_variable(r)==v);
549  }
550  return is_e_reference_to_v;
551 }

References expression_reference_p(), expression_syntax, reference_variable, and syntax_reference.

Referenced by incrementation_expression_to_increment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_inferior_basic()

bool is_inferior_basic ( basic  b1,
basic  b2 
)

bool is_inferior_basic(basic1, basic2) return true if basic1 is less complex than basic2 ex: int is less complex than float*4, float*4 is less complex than float*8, ...

  • overloaded is inferior to any basic.
  • logical is inferior to any other but overloaded.
  • string is inferior to any other but overloaded and logical. Used to decide that the sum of an int and a float is a floating-point addition (for ex.)
Parameters
b11
b22

Definition at line 2687 of file type.c.

2689 {
2690  if ( b1 == basic_undefined )
2691  pips_internal_error("first basic_undefined");
2692  else if ( b2 == basic_undefined )
2693  pips_internal_error("second basic_undefined");
2694 
2695  if (basic_overloaded_p(b1))
2696  return (true);
2697  else if (basic_overloaded_p(b2))
2698  return (false);
2699  else if (basic_logical_p(b1))
2700  return (true);
2701  else if (basic_logical_p(b2))
2702  return (false);
2703  else if (basic_string_p(b1))
2704  return (true);
2705  else if (basic_string_p(b2))
2706  return (false);
2707  else if (basic_int_p(b1)) {
2708  if (basic_int_p(b2))
2709  return (basic_int(b1) <= basic_int(b2));
2710  else
2711  return (true);
2712  }
2713  else if (basic_float_p(b1)) {
2714  if (basic_int_p(b2))
2715  return (false);
2716  else if (basic_float_p(b2))
2717  return (basic_float(b1) <= basic_float(b2));
2718  else
2719  return (true);
2720  }
2721  else if (basic_complex_p(b1)) {
2722  if (basic_int_p(b2) || basic_float_p(b2))
2723  return (false);
2724  else if (basic_complex_p(b2))
2725  return (basic_complex(b1) <= basic_complex(b2));
2726  else
2727  return (true);
2728  }
2729  else
2730  pips_internal_error("Case never occurs.");
2731  return (true);
2732 }

References b1, b2, basic_complex, basic_complex_p, basic_float, basic_float_p, basic_int, basic_int_p, basic_logical_p, basic_overloaded_p, basic_string_p, basic_undefined, and pips_internal_error.

Referenced by arguments_to_complexity(), basic_union_arguments(), indices_to_complexity(), intrinsic_cost(), and typing_power_operator().

+ Here is the caller graph for this function:

◆ IsBinaryOperator()

int IsBinaryOperator ( entity  e)

FI: These string constants are defined in ri-util.h and the tokens in ri-util/operator.h.

Definition at line 660 of file eval.c.

661 {
662  int token;
663  const char* n = entity_local_name(e);
664 
667  token = MINUS;
668  else if (same_string_p(n, PLUS_OPERATOR_NAME)
670  token = PLUS;
672  token = STAR;
673  else if (same_string_p(n, DIVIDE_OPERATOR_NAME))
674  token = SLASH;
675  else if (same_string_p(n, POWER_OPERATOR_NAME))
676  token = POWER;
679  token = MOD;
682  token = EQ;
685  token = NE;
688  token = EQV;
689  else if (same_string_p(n, EQUIV_OPERATOR_NAME))
690  token = NEQV;
693  token = GT;
696  token = LT;
699  token = GE;
702  token = LE;
703  else if (same_string_p(n, OR_OPERATOR_NAME)
705  token = OR;
706  else if (same_string_p(n, AND_OPERATOR_NAME)
708  token = AND;
710  token = BITWISE_AND;
712  token = BITWISE_OR;
714  token = BITWISE_XOR;
716  token = LEFT_SHIFT;
718  token = RIGHT_SHIFT;
719 
720  else if (same_string_p(n, ASSIGN_OPERATOR_NAME)) // C operators
721  token = ASSIGN;
723  token = MULTIPLY_UPDATE;
725  token = DIVIDE_UPDATE;
727  token = PLUS_UPDATE;
729  token = MINUS_UPDATE;
731  token = LEFT_SHIFT_UPDATE;
733  token = RIGHT_SHIFT_UPDATE;
735  token = BITWISE_OR_UPDATE;
736 
739  token = CAST_OP;
740  else
741  token = -1;
742 
743  return(token);
744 }
#define LEFT_SHIFT_UPDATE
Definition: operator.h:67
#define CAST_OP
Definition: operator.h:51
#define ASSIGN
Definition: operator.h:58
#define RIGHT_SHIFT_UPDATE
Definition: operator.h:68
#define BITWISE_OR_UPDATE
Definition: operator.h:69
#define PLUS_UPDATE
Definition: operator.h:65
#define MINUS_UPDATE
Definition: operator.h:66
#define LE
Definition: operator.h:36
#define MULTIPLY_UPDATE
Definition: operator.h:63
#define DIVIDE_UPDATE
Definition: operator.h:64
#define BITWISE_OR_OPERATOR_NAME
#define POWER_OPERATOR_NAME
#define BITWISE_XOR_OPERATOR_NAME
#define C_LESS_OR_EQUAL_OPERATOR_NAME
#define C_AND_OPERATOR_NAME
#define GREATER_THAN_OPERATOR_NAME
#define C_GREATER_OR_EQUAL_OPERATOR_NAME
#define BITWISE_OR_UPDATE_OPERATOR_NAME
#define C_MODULO_OPERATOR_NAME
#define LESS_THAN_OPERATOR_NAME
#define EQUIV_OPERATOR_NAME
#define DIVIDE_UPDATE_OPERATOR_NAME
#define EQUAL_OPERATOR_NAME
#define C_NON_EQUAL_OPERATOR_NAME
#define LEFT_SHIFT_UPDATE_OPERATOR_NAME
#define MULTIPLY_UPDATE_OPERATOR_NAME
#define LEFT_SHIFT_OPERATOR_NAME
#define MINUS_UPDATE_OPERATOR_NAME
#define RIGHT_SHIFT_UPDATE_OPERATOR_NAME
#define C_LESS_THAN_OPERATOR_NAME
#define GREATER_OR_EQUAL_OPERATOR_NAME
#define PLUS_UPDATE_OPERATOR_NAME
#define LESS_OR_EQUAL_OPERATOR_NAME
#define C_OR_OPERATOR_NAME
#define BITWISE_AND_OPERATOR_NAME
#define RIGHT_SHIFT_OPERATOR_NAME
#define OR_OPERATOR_NAME
#define NON_EQUAL_OPERATOR_NAME
#define C_EQUAL_OPERATOR_NAME
#define MODULO_OPERATOR_NAME

References AND, AND_OPERATOR_NAME, ASSIGN, ASSIGN_OPERATOR_NAME, BITWISE_AND, BITWISE_AND_OPERATOR_NAME, BITWISE_OR, BITWISE_OR_OPERATOR_NAME, BITWISE_OR_UPDATE, BITWISE_OR_UPDATE_OPERATOR_NAME, BITWISE_XOR, BITWISE_XOR_OPERATOR_NAME, C_AND_OPERATOR_NAME, C_EQUAL_OPERATOR_NAME, C_GREATER_OR_EQUAL_OPERATOR_NAME, C_LESS_OR_EQUAL_OPERATOR_NAME, C_LESS_THAN_OPERATOR_NAME, C_MODULO_OPERATOR_NAME, C_NON_EQUAL_OPERATOR_NAME, C_OR_OPERATOR_NAME, CAST_OP, DIVIDE_OPERATOR_NAME, DIVIDE_UPDATE, DIVIDE_UPDATE_OPERATOR_NAME, entity_local_name(), EQ, EQUAL_OPERATOR_NAME, EQUIV_OPERATOR_NAME, EQV, GE, GREATER_OR_EQUAL_OPERATOR_NAME, GREATER_THAN_OPERATOR_NAME, GT, IMPLIED_COMPLEX_NAME, IMPLIED_DCOMPLEX_NAME, LE, LEFT_SHIFT, LEFT_SHIFT_OPERATOR_NAME, LEFT_SHIFT_UPDATE, LEFT_SHIFT_UPDATE_OPERATOR_NAME, LESS_OR_EQUAL_OPERATOR_NAME, LESS_THAN_OPERATOR_NAME, LT, MINUS, MINUS_C_OPERATOR_NAME, MINUS_OPERATOR_NAME, MINUS_UPDATE, MINUS_UPDATE_OPERATOR_NAME, MOD, MODULO_OPERATOR_NAME, MULTIPLY_OPERATOR_NAME, MULTIPLY_UPDATE, MULTIPLY_UPDATE_OPERATOR_NAME, NE, NEQV, NON_EQUAL_OPERATOR_NAME, OR, OR_OPERATOR_NAME, PLUS, PLUS_C_OPERATOR_NAME, PLUS_OPERATOR_NAME, PLUS_UPDATE, PLUS_UPDATE_OPERATOR_NAME, POWER, POWER_OPERATOR_NAME, RIGHT_SHIFT, RIGHT_SHIFT_OPERATOR_NAME, RIGHT_SHIFT_UPDATE, RIGHT_SHIFT_UPDATE_OPERATOR_NAME, same_string_p, SLASH, STAR, TK_AND, TK_EQ, TK_EQV, TK_GE, TK_GT, TK_LE, TK_LT, TK_MINUS, TK_NE, TK_NEQV, TK_OR, TK_PLUS, TK_POWER, TK_SLASH, and TK_STAR.

Referenced by EvalIntrinsic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsNaryOperator()

int IsNaryOperator ( entity  e)

Definition at line 746 of file eval.c.

747 {
748  int token;
749 
750  if (strcmp(entity_local_name(e), MIN0_OPERATOR_NAME) == 0)
751  token = MINIMUM;
752  else if (strcmp(entity_local_name(e), MAX0_OPERATOR_NAME) == 0)
753  token = MAXIMUM;
754  else if (strcmp(entity_local_name(e), MIN_OPERATOR_NAME) == 0)
755  token = MINIMUM;
756  else if (strcmp(entity_local_name(e), MAX_OPERATOR_NAME) == 0)
757  token = MAXIMUM;
758  else
759  token = -1;
760 
761  return token;
762 }
#define MAX_OPERATOR_NAME
#define MAX0_OPERATOR_NAME
#define MIN0_OPERATOR_NAME
#define MIN_OPERATOR_NAME

References entity_local_name(), MAX0_OPERATOR_NAME, MAX_OPERATOR_NAME, MAXIMUM, MIN0_OPERATOR_NAME, MIN_OPERATOR_NAME, and MINIMUM.

Referenced by EvalIntrinsic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsUnaryOperator()

int IsUnaryOperator ( entity  e)

Definition at line 632 of file eval.c.

633 {
634  int token;
635  const char* n = entity_local_name(e);
636 
638  token = MINUS;
640  token = PLUS;
641  else if (same_string_p(n, NOT_OPERATOR_NAME)
643  token = NOT;
645  token = POST_INCREMENT;
647  token = POST_DECREMENT;
649  token = PRE_INCREMENT;
651  token = PRE_DECREMENT;
652  else
653  token = -1;
654 
655  return(token);
656 }
#define POST_DECREMENT
Definition: operator.h:60
#define PRE_INCREMENT
Definition: operator.h:61
#define POST_INCREMENT
Definition: operator.h:59
#define PRE_DECREMENT
Definition: operator.h:62
#define POST_DECREMENT_OPERATOR_NAME
Definition: ri-util-local.h:98
#define C_NOT_OPERATOR_NAME
#define PRE_DECREMENT_OPERATOR_NAME
#define PRE_INCREMENT_OPERATOR_NAME
Definition: ri-util-local.h:99
#define POST_INCREMENT_OPERATOR_NAME
Definition: ri-util-local.h:97
#define NOT_OPERATOR_NAME

References C_NOT_OPERATOR_NAME, entity_local_name(), MINUS, NOT, NOT_OPERATOR_NAME, PLUS, POST_DECREMENT, POST_DECREMENT_OPERATOR_NAME, POST_INCREMENT, POST_INCREMENT_OPERATOR_NAME, PRE_DECREMENT, PRE_DECREMENT_OPERATOR_NAME, PRE_INCREMENT, PRE_INCREMENT_OPERATOR_NAME, same_string_p, TK_MINUS, TK_NOT, UNARY_MINUS_OPERATOR_NAME, and UNARY_PLUS_OPERATOR_NAME.

Referenced by EvalIntrinsic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ith_parameter_p()

bool ith_parameter_p ( entity  f,
entity  v,
int  i 
)

returns true if v is the ith formal parameter of function f

Definition at line 125 of file util.c.

126 {
127  type tv = entity_type(v);
128  storage sv = entity_storage(v);
129 
130  if (! entity_module_p(f)) {
131  pips_internal_error("[ith_parameter_p] %s is not a module\n", entity_name(f));
132  }
133 
134  if (type_variable_p(tv) && storage_formal_p(sv)) {
135  formal fv = storage_formal(sv);
136  return(formal_function(fv) == f && formal_offset(fv) == i);
137  }
138 
139  return(false);
140 }

References entity_module_p(), entity_name, entity_storage, entity_type, f(), formal_function, formal_offset, pips_internal_error, storage_formal, storage_formal_p, and type_variable_p.

Referenced by add_parameter_aliases_for_this_call_site(), and formal_regions_backward_translation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ keep_directive_in_code_p()

bool keep_directive_in_code_p ( const char *  s)

whether an entity must be kept in the code.

if so, a maybe fake source code must be supplied, and the directive will be kept in the callee list. not kept if some property tells not to...

!(same_string_p(s, HPF_PREFIX TELL_SUFFIX) && get_bool_property(FCD_IGNORE_PREFIX "TELL"))

Definition at line 101 of file hpfc.c.

102 {
103  return fcd_directive_string_p(s) &&
105  get_bool_property(FCD_IGNORE_PREFIX "SYNCHRO")) &&
110  /* !(same_string_p(s, HPF_PREFIX TELL_SUFFIX) &&
111  get_bool_property(FCD_IGNORE_PREFIX "TELL")) */
112 }
#define FCD_IGNORE_PREFIX
property prefix for ignoring FCD directives TIME, SYNCHRO and SET exists.

References fcd_directive_string_p(), FCD_IGNORE_PREFIX, get_bool_property(), HPF_PREFIX, same_string_p, SYNCHRO_SUFFIX, TIMEOFF_SUFFIX, and TIMEON_SUFFIX.

Referenced by directive_filter(), and EndOfProcedure().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ label_defined_in_current_module_p()

bool label_defined_in_current_module_p ( entity  l)

Definition at line 399 of file entity.c.

400 {
402  bool defined_p = label_defined_in_statement_p(l, s);
403 
404  return defined_p;
405 }
bool label_defined_in_statement_p(entity l, statement s)
Definition: entity.c:388

References get_current_module_statement(), and label_defined_in_statement_p().

+ Here is the call graph for this function:

◆ label_defined_in_statement_p()

bool label_defined_in_statement_p ( entity  l,
statement  s 
)

Definition at line 388 of file entity.c.

389 {
392 
395 
397 }
static bool label_defined_in_statement
Definition: entity.c:377
static entity label_searched_in_statement
Definition: entity.c:378
static bool check_statement_for_label(statement s)
Definition: entity.c:380

References check_statement_for_label(), entity_undefined, gen_null(), gen_recurse, label_defined_in_statement, label_searched_in_statement, and statement_domain.

Referenced by label_defined_in_current_module_p(), label_string_defined_in_current_module_p(), and label_string_defined_in_statement_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ label_local_name()

◆ label_name_conflict_with_labels()

bool label_name_conflict_with_labels ( const char *  n,
list  ll 
)
Parameters
lll

Definition at line 610 of file entity.c.

611 {
612  bool conflict_p = false;
613  if(!empty_label_p(n)) {
614  FOREACH(ENTITY, l, ll) {
615  if(strcmp(label_local_name(l), n) == 0)
616  conflict_p = true;
617  }
618  }
619  return conflict_p;
620 }

References empty_label_p(), ENTITY, FOREACH, and label_local_name().

Referenced by FixCInternalLabels().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ label_string_defined_in_current_module_p()

bool label_string_defined_in_current_module_p ( string  ls)
Parameters
lss

Definition at line 407 of file entity.c.

408 {
410  pips_assert("entity defined",!entity_undefined_p(l));
412  bool defined_p = label_defined_in_statement_p(l, s);
413 
414  return defined_p;
415 }
const char * get_current_module_name(void)
Get the name of the current module.
Definition: static.c:121
entity find_label_entity(const char *, const char *)
util.c
Definition: util.c:43

References entity_undefined_p, find_label_entity(), get_current_module_name(), get_current_module_statement(), label_defined_in_statement_p(), and pips_assert.

Referenced by words_regular_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ label_string_defined_in_statement_p()

bool label_string_defined_in_statement_p ( string  ls,
statement  s 
)
Parameters
lss

Definition at line 417 of file entity.c.

418 {
420 
421  bool defined_p = label_defined_in_statement_p(l, s);
422 
423  return defined_p;
424 }

References find_label_entity(), get_current_module_name(), and label_defined_in_statement_p().

+ Here is the call graph for this function:

◆ ldimensions_dup()

list ldimensions_dup ( list  l)

Definition at line 1166 of file type.c.

1167 {
1168  list result = NIL ;
1169 
1170  MAPL(cd,
1171  {
1172  result = CONS(DIMENSION, dimension_dup(DIMENSION(CAR(cd))),
1173  result);
1174  },
1175  l);
1176 
1177  return(gen_nreverse(result));
1178 }
dimension dimension_dup(dimension d)
Definition: type.c:1159

References CAR, CONS, DIMENSION, dimension_dup(), gen_nreverse(), MAPL, and NIL.

Referenced by type_variable_dup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lexicographic_order_p()

bool lexicographic_order_p ( entity  var1,
entity  var2 
)

true if var1 <= var2

TCST is before anything else

else there are two entities

Parameters
var1ar1
var2ar2

Definition at line 1365 of file entity.c.

1366 {
1367  /* TCST is before anything else
1368  */
1369  if ((Variable) var1==TCST) return(true);
1370  if ((Variable) var2==TCST) return(false);
1371 
1372  /* else there are two entities
1373  */
1374 
1375  return(strcmp(entity_local_name(var1), entity_local_name(var2))<=0);
1376 }

References entity_local_name(), and TCST.

+ Here is the call graph for this function:

◆ load_statement_enclosing_loops()

◆ local_assign_expression()

void local_assign_expression ( expression  caller,
expression  field 
)

replace expression caller by expression field , where field is contained by caller

Parameters
calleraller
fieldield

Definition at line 3571 of file expression.c.

3572 {
3573  syntax s = expression_syntax(field) ;
3575  free_syntax(expression_syntax(caller));
3576  expression_syntax(caller)=s;
3578 }
void free_syntax(syntax p)
Definition: ri.c:2445
#define syntax_undefined
Definition: ri.h:2676

References expression_normalized, expression_syntax, free_normalized(), free_syntax(), and syntax_undefined.

Referenced by simplify_minmax_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ local_entity_of_module_p()

bool local_entity_of_module_p ( entity  e,
entity  module 
)

This test shows that "e" has been declared in "module".

Well, "e" may not be declared in "module". For instance, "e" may be a value of a variable declared in "module".

This does not show in Fortran that e is a variable with effects local to the module because e can be allocated in a common. Variables with local effects are allocated either in the static or the dynamic or the stack area.

Variables with effects lost on return are allocated either in the dynamic or stack areas. Effects on static variables may or not escape.

Of course, this predicate returns false for some variables declared in "module", extern variables for instance.

Parameters
moduleodule

Definition at line 1069 of file entity.c.

1070 {
1071  bool
1072  result = same_string_p(entity_module_name(e),
1074 
1075  debug(6, "local_entity_of_module_p",
1076  "%s %s %s\n",
1077  entity_name(e), result ? "in" : "not in", entity_name(module));
1078 
1079  return(result);
1080 }

References debug(), entity_module_name(), entity_name, module, module_local_name(), and same_string_p.

Referenced by AddCommonToModule(), array_bound_check_instrumentation(), do_linearize_prepatch(), do_scalar_renaming(), fix_loop_index_sign(), precondition_intra_to_inter(), promote_local_entities(), and simplify_dg().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ local_name_to_scope()

string local_name_to_scope ( const char *  ln)

allocates a new string

Parameters
lnn

Definition at line 563 of file entity.c.

564 {
565  string ns = strrchr(ln, BLOCK_SEP_CHAR);
566  string s = string_undefined;
567 
568  if(ns==NULL)
569  s = empty_scope();
570  else
571  s = strndup(ln, ns-ln+1);
572 
573  pips_debug(8, "local name = \"%s\", scope: \"%s\"\n",
574  ln, s);
575 
576  return s;
577 }
string empty_scope()
Functions used to manage the block scoping in conjunction with ContextStack and yco ntext.
Definition: entity.c:498

References BLOCK_SEP_CHAR, empty_scope(), pips_debug, string_undefined, and strndup().

Referenced by eov_add_entity_to_eliminate(), flatten_code(), make_statement_copy_i(), RenameFunctionEntity(), replicate_declaration(), and statement_flatten_declarations().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ local_name_to_top_level_entity()

entity local_name_to_top_level_entity ( const char *  n)

This function try to find a top-level entity from a local name.

@description Because of static C function, the entity returned is not always a top-level entity.

Returns
the entity if found, else entity_undefined

Extension with C: the scope of a module can be its compilation unit if this is a static module, not only TOP-LEVEL.

Definition at line 1450 of file entity.c.

1451 {
1453 
1454  /* Extension with C: the scope of a module can be its compilation unit if this is
1455  a static module, not only TOP-LEVEL. */
1456 
1457  if (static_module_name_p(n)) {
1458  string cun = strdup(n);
1459  string sep = strchr(cun, FILE_SEP);
1460  *(sep+1) = '\0';
1461  module = FindEntity(cun,n);
1462  free(cun);
1463  }
1464  else
1465  {
1466  for(int i=0; i<PREFIXES_SIZE && entity_undefined_p(module); i++)
1469  entity_domain);
1470  }
1471 
1472  return module;
1473 }
bool static_module_name_p(const char *name)
Check if the given name is a static module name.
Definition: entity_names.c:122
#define FILE_SEP
Definition: naming-local.h:39
static string prefixes[]
Definition: entity.c:1433
#define PREFIXES_SIZE
this function maps a local name, for instance P, to the corresponding TOP-LEVEL entity,...
Definition: entity.c:1432

References concatenate(), entity_domain, entity_undefined, entity_undefined_p, FILE_SEP, FindEntity(), free(), gen_find_tabulated(), module, MODULE_SEP_STRING, prefixes, PREFIXES_SIZE, static_module_name_p(), strdup(), and TOP_LEVEL_MODULE_NAME.

Referenced by add_new_module_from_text(), alias_check(), alias_classes(), alias_lists(), alias_pairs(), alias_propagation(), alias_propagation_callers(), aliases_text(), array_bound_check_bottom_up(), array_bound_check_instrumentation(), array_bound_check_interprocedural(), array_bound_check_top_down(), array_dfg(), atomizer(), build_real_resources(), chains(), common_is_visible_p(), comp_regions(), compute_constant(), continuation_conditions(), cumulated_reductions(), dag_normalize(), distributer(), do_it(), do_point_to(), filter_proper_effects(), flinter(), forward_substitute(), freia_copy_image(), freia_create_helper_function(), freia_ok(), freia_trpx_compile_one_dag(), generate_starpu_pragma(), get_any_comp_regions_text(), get_continuation_condition_text(), get_main(), GetFullyDefinedReturnCodeVariable(), global_parallelization(), gpu_promote_sequential(), guard_elimination(), hpfc_common(), ikernel_load_store(), image_free(), impact_check(), initialize_and_verify_common_variable(), insert_common_declaration(), insert_new_declarations(), instruction_selection(), internal_print_icfg(), invariant_code_motion(), kernel_data_mapping(), loop_statistics(), lower_bound_generation(), main(), make_array_entity(), make_div_expression(), make_global_entity_from_local(), make_movements_loop_body_wp65(), make_scalar_entity(), make_scalar_integer_entity(), make_scanning_over_tiles(), make_start_ru_module(), MakeComplexConstantExpression(), MakeEntryCommon(), missing_file_initializer(), module_entity_to_compilation_unit_entity(), module_name_to_entity(), module_to_callees(), mpi_task_generation(), mppa_call_helper(), new_local_image_variable(), old_array_bound_check_instrumentation(), opencl_compile_mergeable_dag(), opencl_generate_special_kernel_ops(), optimize_expressions(), partial_eval(), pocc_prettyprinter(), pragma_outliner(), prgm_mapping(), print_any_reductions(), print_code_points_to(), print_code_static_control(), print_dependence_or_chains_graph(), print_dot_dependence_or_chains_graph(), print_filtered_dg_or_dvdg(), print_loopnest_dependence_cone(), print_module_name_to_toposorts(), print_parallelizedCMF_code(), print_parallelizedCRAFT_code(), print_statement_of_module(), process_reduced_loops(), proper_reductions(), put_summary(), regions_to_loops(), reindexing(), remove_ghost_variable_entities(), remove_module_entity(), remove_variable_entity(), restructure_control(), rice(), rice_dependence_graph(), rstream_interface(), SaveEntity(), sc_delimiter(), scalopify(), scheduling(), sctc_call_rwt(), sesamify(), set_aipo_call(), set_resources_for_module(), single_assign(), spaghettify(), static_controlize(), step_analyse(), step_compile(), step_compile_analysed_module(), step_compile_generated_module(), step_parser(), string_to_user_modules(), summary_reductions(), switch_vertex_to_assign(), taskify(), test_bound_generation(), tiling_sequence(), transformer_add_any_relation_information(), unspaghettify(), UpdateFormalStorages(), upper_bound_generation(), used_before_set(), and wrap_kernel_argument().

+ Here is the call graph for this function:

◆ logical_constant_p()

bool logical_constant_p ( entity  ent)

In the initial internal representation, only integer constants were distinguished

Parameters
entnt

Definition at line 463 of file constant.c.

464 {
465  bool yes_p = false;
466  type t = entity_type(ent);
467 
468  if( type_functional_p(t))
469  if(value_constant_p(entity_initial(ent))) {
471  yes_p = true;
473  /* In the initial internal representation, only integer
474  constants were distinguished */
476  type rt = functional_result(f); // ultimate type should not be
477  // useful for constants
478  // generated by a parser
479  yes_p = logical_type_p(rt);
480  }
481  }
482 
483  return yes_p;
484 }
bool logical_type_p(type)
Definition: type.c:2865
#define constant_logical_p(x)
Definition: ri.h:854

References constant_call_p, constant_logical_p, entity_initial, entity_type, f(), functional_result, logical_type_p(), type_functional, type_functional_p, value_constant, and value_constant_p.

Referenced by logical_expression_to_transformer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ logical_expression_p()

bool logical_expression_p ( expression  e)

A logical expression is either one of the following:

  • a logical constant
  • the symbolic name of a logical constant
  • a logical variable name
  • a logical array element name
  • a logical function reference
  • a relational expression (.LT.,.LE.,.EQ.,.NE.,.GT.,.GE.)
  • is formed by combining together one or more of the above entities using parentheses and the logical operators .NOT.,.AND.,.OR.,.EQV.,.NEQV.

NN: In fact, I didn't use the PIPS function : basic_of_expression because of 2 reasons :

  • the function basic_of_intrinsic use the macro : ENTITY_LOGICAL_OPERATOR_P which is not like the Fortran Standard definition (the above comments)
  • the case where an expression is a range is not considered here for a logical expression

The case of symbolic name of a logical constant is not treated here

Definition at line 610 of file expression.c.

611 {
612  /* A logical expression is either one of the following:
613  * - a logical constant
614  * - the symbolic name of a logical constant
615  * - a logical variable name
616  * - a logical array element name
617  * - a logical function reference
618  * - a relational expression (.LT.,.LE.,.EQ.,.NE.,.GT.,.GE.)
619  * - is formed by combining together one or more of the above
620  * entities using parentheses and the logical operators
621  * .NOT.,.AND.,.OR.,.EQV.,.NEQV. */
622 
623  /* NN: In fact, I didn't use the PIPS function : basic_of_expression because of 2 reasons :
624  * - the function basic_of_intrinsic use the macro : ENTITY_LOGICAL_OPERATOR_P
625  * which is not like the Fortran Standard definition (the above comments)
626  * - the case where an expression is a range is not considered here for a
627  * logical expression */
628 
629  syntax s = expression_syntax(e);
630  basic b;
631  entity func;
632 
633  pips_debug(2, "\n");
634 
635  switch(syntax_tag(s)) {
636  case is_syntax_reference:
637  {
639  if (basic_logical_p(b))
640  return true;
641  return false;
642  }
643  case is_syntax_call:
644  {
649  return true;
652  if (basic_logical_p(b)) return true;
653 
654  /* The case of symbolic name of a logical constant is not treated here */
655 
656  return false;
657  }
658  case is_syntax_range:
659  return false;
660  default: pips_internal_error("Bad syntax tag");
661  return false;
662  }
663 
664  debug(2, "logical expression", " ends\n");
665 }
bool logical_operator_expression_p(expression e)
C xor is missing.
Definition: expression.c:573
bool relational_expression_p(expression e)
Definition: expression.c:587

References basic_logical_p, call_function, debug(), entity_type, expression_syntax, FALSE_OPERATOR_NAME, functional_result, is_syntax_call, is_syntax_range, is_syntax_reference, logical_operator_expression_p(), operator_expression_p(), pips_debug, pips_internal_error, reference_variable, relational_expression_p(), syntax_call, syntax_reference, syntax_tag, TRUE_OPERATOR_NAME, type_functional, type_variable, and variable_basic.

Referenced by fix_if_condition(), and MakeWhileDoInst().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ logical_operator_expression_p()

bool logical_operator_expression_p ( expression  e)

C xor is missing.

Logical operators are : .NOT.,.AND.,.OR.,.EQV.,.NEQV.

Definition at line 573 of file expression.c.

574 {
575  /* Logical operators are : .NOT.,.AND.,.OR.,.EQV.,.NEQV.*/
576  if (expression_call_p(e))
577  {
579  if (ENTITY_AND_P(op) || ENTITY_OR_P(op) || ENTITY_NOT_P(op) ||
581  return true;
582  return false;
583  }
584  return false;
585 }
#define ENTITY_NOT_P(e)
#define ENTITY_NON_EQUIV_P(e)
#define ENTITY_EQUIV_P(e)

References call_function, ENTITY_AND_P, ENTITY_EQUIV_P, ENTITY_NON_EQUIV_P, ENTITY_NOT_P, ENTITY_OR_P, expression_call_p(), expression_syntax, and syntax_call.

Referenced by logical_expression_p(), number_of_operators_flt(), and simplify_boolean_expression_with_precondition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ logical_type_p()

bool logical_type_p ( type  t)

Definition at line 2865 of file type.c.

2866 {
2867  if (!type_undefined_p(t) && type_variable_p(t))
2868  {
2870  if (!basic_undefined_p(b) && basic_logical_p(b))
2871  return true;
2872  }
2873  return false;
2874 }

References basic_logical_p, basic_undefined_p, type_undefined_p, type_variable, type_variable_p, and variable_basic.

Referenced by logical_constant_p().

+ Here is the caller graph for this function:

◆ long_type_p()

bool long_type_p ( type  t)

Definition at line 2831 of file type.c.

2832 {
2833  if (type_variable_p(t))
2834  {
2836  if (basic_int_p(b))
2838  return true;
2839  }
2840  return false;
2841 }
#define DEFAULT_LONG_INTEGER_TYPE_SIZE

References basic_int, basic_int_p, DEFAULT_LONG_INTEGER_TYPE_SIZE, type_variable, type_variable_p, and variable_basic.

Referenced by make_standard_long_integer_type().

+ Here is the caller graph for this function:

◆ make_address_of_expression()

expression make_address_of_expression ( expression  e)

generate a newly allocated expression for &(e)

Definition at line 3956 of file expression.c.

3957 {
3958  if (expression_call_p(e))
3959  {
3960  call c = expression_call(e);
3961  if (ENTITY_DEREFERENCING_P(call_function(c))) // e is "*x"
3962  {
3963  pips_assert("one arg to address operator (&)",
3964  gen_length(call_arguments(c))==1);
3965 
3966  // result is simply "x"
3968  }
3969  }
3970 
3971  // result is "*e"
3973  copy_expression(e));
3974 }
#define ADDRESS_OF_OPERATOR_NAME

References ADDRESS_OF_OPERATOR_NAME, call_arguments, call_function, CAR, copy_expression(), CreateIntrinsic(), ENTITY_DEREFERENCING_P, EXPRESSION, expression_call(), expression_call_p(), gen_length(), MakeUnaryCall(), and pips_assert.

Referenced by declaration_to_post_pv(), gen_mpi_send_recv(), make_send_receive_conversion(), mpi_initialize(), mpic_make_args_mpi_send_or_receiv(), mpic_make_mpi_comm_rank(), mpic_make_mpi_comm_size(), and mpic_make_mpi_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_assign_expression()

expression make_assign_expression ( expression  lhs,
expression  rhs 
)

Make an assign expression, since in C the assignment is a side effect operator.

Useful in for-loops.

Parameters
lhsmust be a reference
rhsis the expression to assign
Returns
the expression "lhs = rhs"

RK: this assert should be relaxed to deal with *p and so on. pips_assert("Need a reference as lhs", expression_reference_p(lhs));

Parameters
lhshs
rhshs

Definition at line 390 of file expression.c.

391  {
392  /* RK: this assert should be relaxed to deal with *p and so on.
393  pips_assert("Need a reference as lhs", expression_reference_p(lhs)); */
395 }

References ASSIGN_OPERATOR_NAME, CreateIntrinsic(), and MakeBinaryCall().

Referenced by do_loop_nest_unswitching(), and do_loop_to_for_loop().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_bound_expression()

void make_bound_expression ( Variable  index,
Pbase  base,
Psysteme  sc,
expression lower,
expression upper 
)

void make_bound_expression(variable index, Pbase base, Psysteme sc, expression *lower, expression *upper)

build the expressions "lower" and "upper" for the lower and upper bounds of variable "index". Variable "index" must appear in "base" and have lower and upper bounds in "sc"

Beware of degenerated cases where constraints are reduced to equations because the upper and lower bounds are identical.

The constraints are sorted according to the lexicographic order using bound_generation_compare_vector_component().

see also constraints_to_loop_bound (in conversion system_to_code.c)

compute the rank d of the index in the basis

The constraints should be lexicographically sorted to avoid secondary variations in linear

search constraints referencing "index" among inequalities and create the list of expressions for lower and upper bounds

found

ifdebug(7) {

fprintf(stderr, "\n expression after :");

print_expression(ex);

}

add the expression to the list of lower bounds or to the list of upper bounds

search equation constraints referencing "index" and create the list of expressions for lower and upper bounds. We may have to generate useless loops with only one iteration.

found

ifdebug(7) {

fprintf(stderr, "\n expression after :");

print_expression(ex);

}

add the expression to the list of lower bounds and to the list of upper bounds

Reverse the expression order

build expressions for the lower and upper bounds

To avoid clash with Fortran intrinsics

pips_min and pips_max are supposed to be part of PIPS run-time. They are varargs and their first argument is the count of arguments

and memory leak... (cons lost)

idem...

print_expression(*lower);

print_expression(*upper);

Parameters
indexndex
basease
scc
lowerower
upperpper

Definition at line 91 of file bound_generation.c.

96 {
97  Pcontrainte pc;
98  cons *ll = NIL;
99  cons *lu = NIL;
100 
101  expression ex;
102  entity min, max;
103 
104  int i;
105  int rank_index ;
106 
107  /* compute the rank d of the index in the basis */
108  rank_index =
111 
112  pips_debug(7, "index :%s\n", entity_name_or_TCST(index));
113  pips_debug(8, "rank_index = %d\n", rank_index);
114 
115  /* The constraints should be lexicographically sorted to avoid
116  secondary variations in linear */
117  // contrainte_vect_sort(ll, bound_generation_compare_vector_component);
118  ifdebug(7) {
119  fprintf(stderr, "Constraints before sorting:\n");
120  sc_dump(sc);
121  }
123  ifdebug(7) {
124  fprintf(stderr, "Constraints after sorting:\n");
125  sc_dump(sc);
126  }
127 
128  /* search constraints referencing "index" among inequalities and
129  create the list of expressions for lower and upper bounds */
130  for (pc=sc->inegalites; pc!=NULL; pc=pc->succ) {
131  i = level_contrainte(pc, base);
132  pips_debug(8,"level: %d\n",i);
133  if (ABS(i)==rank_index){ /* found */
134  ifdebug(7) {
135  (void) fprintf(stderr, "\n constraint before :");
136  contrainte_fprint(stderr, pc, true,
138  }
139  ex = make_constraint_expression(pc->vecteur, (Variable) index);
140  // FI: to avoid cycles betwen librairies ri-util and prettyprint
141  /* ifdebug(7) { */
142  /* fprintf(stderr, "\n expression after :"); */
143  /* print_expression(ex); */
144  /* } */
145  /* add the expression to the list of lower bounds
146  or to the list of upper bounds*/
147  if (i>0)
148  lu = CONS(EXPRESSION, ex, lu);
149  else
150  ll = CONS(EXPRESSION, ex, ll);
151  }
152  }
153 
154  /* search equation constraints referencing "index" and create the
155  list of expressions for lower and upper bounds. We may have to
156  generate useless loops with only one iteration. */
157  for (pc=sc->egalites; pc!=NULL; pc=pc->succ) {
158  i = level_contrainte(pc, base);
159  pips_debug(8,"level: %d\n",i);
160  if (ABS(i)==rank_index){ /* found */
161  ifdebug(7) {
162  (void) fprintf(stderr, "\n constraint before :");
163  contrainte_fprint(stderr, pc, true,
165  }
166  if(i>0) {
167  Pvecteur mv = vect_copy(pc->vecteur);
168  mv = vect_multiply(mv, VALUE_MONE);
169  ex = make_constraint_expression(mv, (Variable) index);
170  vect_rm(mv);
171  }
172  else
173  ex = make_constraint_expression(pc->vecteur, (Variable) index);
174  // FI: to avoid cycles betwen librairies ri-util and prettyprint
175  /* ifdebug(7) { */
176  /* fprintf(stderr, "\n expression after :"); */
177  /* print_expression(ex); */
178  /* } */
179 
180  /* add the expression to the list of lower bounds
181  and to the list of upper bounds*/
182  lu = CONS(EXPRESSION, ex, lu);
183  ll = CONS(EXPRESSION, ex, ll);
184  }
185  }
186 
187  /* Reverse the expression order */
188  ll = gen_nreverse(ll);
189  lu = gen_nreverse(lu);
190 
191  /* build expressions for the lower and upper bounds */
193  /* To avoid clash with Fortran intrinsics */
194  /* pips_min and pips_max are supposed to be part of PIPS
195  run-time. They are varargs and their first argument is the
196  count of arguments */
199  }
200  else { // Fortran case
203  }
204 
205  pips_assert("entities for min and max are found",
207 
208  if (gen_length(ll) > 1) {
210  int c = gen_length(ll);
212  ll = CONS(EXPRESSION, ce, ll);
213  }
215  make_call(max,ll)),
217  }
218  else {
219  *lower = EXPRESSION(CAR(ll)); /* and memory leak... (cons lost) */
220  gen_free_list(ll);
221  }
222 
223  if (gen_length(lu) > 1 ) {
225  int c = gen_length(lu);
227  lu = CONS(EXPRESSION, ce, lu);
228  }
230  make_call(min,lu)),
232  }
233  else {
234  *upper = EXPRESSION(CAR(lu)); /* idem... */
235  gen_free_list(lu);
236  }
237 
238  ifdebug(7) {
239  pips_debug(9, "returning: \n");
240  // FI: to avoid cycles betwen librairies ri-util and prettyprint
241  /* print_expression(*lower); */
242  /* print_expression(*upper); */
243  }
244 }
#define VALUE_MONE
#define ABS(x)
was: #define value_mult(v,w) value_direct_multiply(v,w) #define value_product(v,w) value_direct_produ...
int base_find_variable_rank(Pbase b, Variable v, char *(*variable_name)(Variable))
int base_find_variable_rank(Pbase b, Variable v, char * (*variable_name)()): returns variable v's ran...
Definition: base.c:194
int level_contrainte(Pcontrainte, Pbase)
int level_contrainte(Pcontrainte pc, Pbase base_index) compute the level (rank) of the constraint pc ...
Definition: unaires.c:292
void contrainte_fprint(FILE *, Pcontrainte, bool, char *(*)(Variable))
io.c
#define min(a, b)
#define max(a, b)
#define PIPS_C_MAX_OPERATOR_NAME
#define PIPS_C_MIN_OPERATOR_NAME
PIPS run-time support for C code generation.
int bound_generation_compare_vector_component(Pvecteur *pv1, Pvecteur *pv2)
Generation of bound expressions from constraint systems of the Linear library.
const char * entity_name_or_TCST(entity e)
Return a name valid for sorting variables in vectors and constraint systems.
Definition: entity.c:627
expression make_constraint_expression(Pvecteur v, Variable index)
Make an expression from a constraint v for a given index.
Definition: expression.c:1748
bool c_language_module_p(entity m)
Definition: module.c:447
void sc_dump(Psysteme sc)
void sc_dump(Psysteme sc): dump to stderr
Definition: sc_io.c:142
void sc_lexicographic_sort(Psysteme sc, int(*compare)(Pvecteur *, Pvecteur *))
Minimize first the lexico-graphic weight of each constraint according to the comparison function "com...
Definition: sc_unaires.c:206
Pvecteur vect_multiply(Pvecteur v, Value x)
Pvecteur vect_multiply(Pvecteur v, Value x): multiplication du vecteur v par le scalaire x,...
Definition: scalaires.c:123
Pvecteur vecteur
struct Scontrainte * succ
Pcontrainte inegalites
Definition: sc-local.h:71
Pcontrainte egalites
Definition: sc-local.h:70
Pbase vect_copy(Pvecteur b)
direct duplication.
Definition: alloc.c:240

References ABS, base, base_find_variable_rank(), bound_generation_compare_vector_component(), c_language_module_p(), CAR, CONS, contrainte_fprint(), Ssysteme::egalites, entity_intrinsic(), entity_name_or_TCST(), entity_undefined, EXPRESSION, fprintf(), gen_free_list(), gen_length(), gen_nreverse(), get_current_module_entity(), ifdebug, Ssysteme::inegalites, int_to_expression(), is_syntax_call, level_contrainte(), make_call(), make_constraint_expression(), make_expression(), make_syntax(), max, MAX_OPERATOR_NAME, min, MIN_OPERATOR_NAME, NIL, normalized_undefined, pips_assert, PIPS_C_MAX_OPERATOR_NAME, PIPS_C_MIN_OPERATOR_NAME, pips_debug, sc_dump(), sc_lexicographic_sort(), Scontrainte::succ, VALUE_MONE, vect_copy(), vect_multiply(), vect_rm(), and Scontrainte::vecteur.

Referenced by code_generation(), hyperplane(), make_scanning_over_one_tile(), make_scanning_over_tiles(), parallel_tiling(), tiling_transformation(), and unimodular().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_C_or_Fortran_constant_entity()

entity make_C_or_Fortran_constant_entity ( const char *  name,
tag  bt,
size_t  size,
bool  is_fortran,
bool(*)(const char *, const char *)  error_manager 
)

This function creates a constant.

a constant is represented in our internal representation by a function. Its name is the name of the constant, its type is a functional that gives the type of the constant, its storage is rom.

Its initial value is the value of the constant. In case of integer constant, the actual value is stored (as an integer) in constant_int. values of other constants have to be computed with the name, if necessary.

name is the name of the constant 12, 123E10, '3I12', 015 (C octal constant), 0x1ae; (C hexadecimal), 890L (C long constant) ... Initial and final quotes are included in the names of string constants.

basic is the basic type of the constant: int, float, ...

Character constants are typed as int.

Drop the two quotes, but add space for '\0' in C

See all hexadecimal constant as unsigned on 64 bits, elses 0xffffffff generates an overflow, not a -1 (see C-syntax/constants03.c

ld, long; zd, size_t; td, ptrdiff_t

Since the value is stored in a NewGen int that has the size of a pointer, verify is is OK to store it. In should not assume this...

Check conversion errors and make the constant

SG :this ensure everything is ok on 32 bits

Parameters
nameame
btt
sizeize
is_fortrans_fortran

Definition at line 148 of file constant.c.

154 {
155  entity e;
156 
158 
159  if (entity_type(e) == type_undefined) {
162  basic be = basic_undefined;
163 
164  if (bt == is_basic_string) {
165  /* Drop the two quotes, but add space for '\0' in C */
168  (void*) (strlen(name)-2+1-is_fortran))))));
169  }
170  else {
171  be = make_basic(bt, (void*) size);
172  }
173 
175 
176  if (bt == is_basic_int && (size==4 || size==8)) { // int constant
177  //string unsigned int suffix = "uU";
178  //string long int suffix = "lL";
179  bool usuffix = (strchr(name, 'U') != NULL) || (strchr(name, 'u') != NULL);
180  bool lsuffix = (strchr(name, 'L') != NULL) || (strchr(name, 'l') != NULL);
181  int basis = is_fortran? 10 : 0;
182  char * error_string = string_undefined;
183  long long int l = 0;
184  int error_number = 0;
185  //int (* conversion)(string, string *, int);
186 
187  //pips_debug(8, "unsigned int suffix = %s, strspn = %d\n",
188  // unsignedintsuffix, usuffix);
189 
190  /* See all hexadecimal constant as unsigned on 64 bits, elses
191  0xffffffff generates an overflow, not a -1 (see C-syntax/constants03.c */
192  if(strstr(name,"0x")==name) {
193  usuffix = true;
194  lsuffix = true;
195  }
196  /*
197  if(usuffix)
198  if(lsuffix)
199  conversion = (int (*)(string, string *, int)) strtoull;
200  else
201  conversion = (int (*)(string, string *, int)) strtoul;
202  else
203  if(lsuffix)
204  conversion = (int (*)(string, string *, int)) strtoll;
205  else
206  conversion = (int (*)(string, string *, int)) strtol;
207  */
208 
209  errno = 0;
210  if(usuffix)
211  if(lsuffix)
212  l = strtoull(name, &error_string, basis);
213  else
214  l = strtoul(name, &error_string, basis);
215  else
216  if(lsuffix)
217  l = strtoll(name, &error_string, basis);
218  else
219  l = strtol(name, &error_string, basis);
220  error_number = errno;
221  /* %ld, long; %zd, size_t; %td, ptrdiff_t */
222  pips_debug(8, "value = %lld, errno=%d\n", l, error_number);
223  errno = 0;
224 
225  /* Since the value is stored in a NewGen int that has the size of a
226  pointer, verify is is OK to store it. In should not assume
227  this... */
228  if(size==4) { // 32 bit target machine
229  // Well, no problem...
230  }
231  else if(size==8) {
232  pips_assert("pointers have the right size", sizeof(void *)==8);
233  }
234  else
235  pips_internal_error("Unexpected number of bytes for an integer variable");
236 
237  pips_assert("Integer constants are internally stored on 4 or 8 bytes",
238  size==4 || size==8);
239  /* Check conversion errors and make the constant */
240  if(error_number==EINVAL) {
241  pips_user_warning("Integer constant '%s' cannot be converted in %d bytes (%s)\n",
242  name, size, error_string);
243  (*error_manager)(__FUNCTION__,
244  "Integer constant conversion error.\n");
245  }
246  else if(error_number==ERANGE) {
247  pips_user_warning("Overflow, Integer constant '%s' cannot be stored in %d bytes\n",
248  name, size);
249  (*error_manager)(__FUNCTION__,
250  "Integer constant too large for internal representation.\n");
251  }
252  else if(error_number!=0 && (l == LONG_MAX || l == LONG_MIN)) {
253  pips_internal_error("Conversion error for integer constant string");
254  }
255  else if(*error_string!='\0' && strspn(error_string, "LlUu")!=strlen(error_string)) {
256  pips_internal_error("Illegal characters found in integer constant string");
257  }
258  else if(name==error_string) {
259  pips_internal_error("No digit found in integer constant string.\n");
260  }
261 
262  /* SG :this ensure everything is ok on 32 bits */
263  if(l != (long long int)(intptr_t)l)
264  {
265  pips_user_warning("some data lost in conversion, %lli is not representatble in pips \n",l);
266  l = ~(intptr_t)0;
267  }
268  ce = make_constant_int( (intptr_t)l);
269  }
270  else if(bt == is_basic_int && size==1) {
271  // Character constant
272  _int i = TK_CHARCON_to__int(name);
273  // fprintf(stderr,"make integer constant:name=%s\n",name);
274  ce = make_constant(is_constant_int, (void*) i);
275  }
276  else {
278  }
279 
283  }
284  return(e);
285 }
functional make_functional(list a1, type a2)
Definition: ri.c:1109
storage make_storage_rom(void)
Definition: ri.c:2285
_int TK_CHARCON_to__int(const char *name)
Definition: constant.c:88
type MakeTypeVariable(basic, cons *)
BEGIN_EOLE.
Definition: type.c:116
@ is_constant_call
Definition: ri.h:821

References basic_undefined, constant_undefined, entity_initial, entity_storage, entity_type, FindOrCreateEntity(), functional_undefined, intptr_t, is_basic_int, is_basic_string, is_constant_call, is_constant_int, is_type_functional, is_value_constant, make_basic(), make_constant(), make_constant_int(), make_functional(), make_storage_rom(), make_type(), make_value(), MakeTypeVariable(), NIL, pips_assert, pips_debug, pips_internal_error, pips_user_warning, string_undefined, TK_CHARCON_to__int(), TOP_LEVEL_MODULE_NAME, and type_undefined.

Referenced by make_C_constant_entity(), make_constant_entity(), make_Fortran_constant_entity(), and SafeMakeConstant().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_call_expression()

expression make_call_expression ( entity  e,
list  l 
)

◆ make_char_array_type()

type make_char_array_type ( int  n)

Two options: a string of n characters or an array of n char, i.e. int.

Definition at line 5213 of file type.c.

5214 {
5215  /* Two options: a string of n characters or an array of n char,
5216  i.e. int. */
5217  constant c = make_constant_int(n);
5218  value val = make_value_constant(c);
5219  basic b = make_basic_string(val);
5220  variable var = make_variable(b, NIL, NIL);
5221  type t = make_type_variable(var);
5222 
5223  return t;
5224 }
basic make_basic_string(value _field_)
Definition: ri.c:173

References make_basic_string(), make_constant_int(), make_type_variable(), make_value_constant(), make_variable(), and NIL.

Referenced by init_c_implicit_variables().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_constant_entity()

entity make_constant_entity ( string  name,
tag  bt,
size_t  size 
)

For historical reason, call the Fortran version.

It is used in bootstrap, instrumentation, ri-util/constant.c, semantics and task_parallelization.

It is assumed that no errors can be detected, or it would be a PIPS internal error.

Parameters
nameame
btt
sizeize

Definition at line 301 of file constant.c.

304 {
305  return make_C_or_Fortran_constant_entity(name, bt, size, true, NULL);
306 }
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 *))
This function creates a constant.
Definition: constant.c:148

References make_C_or_Fortran_constant_entity().

Referenced by cast_constant(), cluster_stage_spire(), constant_to_transformer(), convert_constant_from_double_to_dcomplex(), convert_constant_from_double_to_real(), convert_constant_from_int_to_double(), convert_constant_from_int_to_real(), convert_constant_from_real_to_complex(), convert_constant_from_real_to_double(), convert_constant_from_real_to_int(), edge_cost_polynome(), gen_mpi_send_recv(), make_com_loopbody(), make_special_value(), make_test_condition(), MakeComplexConstant(), mpi_finalize(), mpi_initialize(), mpi_recv_ctx(), mpi_send_ctx(), read_new_entities_from_eole(), simplification_conversion(), and task_time_polynome().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_constraint_expression()

expression make_constraint_expression ( Pvecteur  v,
Variable  index 
)

Make an expression from a constraint v for a given index.

For example: for a constraint of index I : aI + linear_expr(J,K,TCST) <=0

Returns
the new expression for I that is -expr_linear(J,K,TCST)/a

earch the couple (var,val) where var is equal to index and extract it

If the vector wihout the index is the vector null, we have simply index = 0:

If the coefficient for the index is positive, inverse all the vector since the index goes at the other side of "=":

If coeff is negative, correct the future division rounding (by -coeff) by adding (coeff - 1) to the vector first:

If the vector is simply coeff.index=c, directly generate and return c/coeff:

Generate an expression from the linear vector:

If coeff > 1, divide all the expression by coeff:

FI->YY: before generating a division, you should test if it could not be performed statically; you have to check if ex1 is not a constant expression, which is fairly easy since you still have its linear form, pv

build expressions for the lower and upper bounds

Parameters
indexndex

Definition at line 1748 of file expression.c.

1749 {
1750  Pvecteur pv;
1751  expression ex1, ex2, ex;
1752  entity div;
1753  Value coeff;
1754 
1755  /*search the couple (var,val) where var is equal to index and extract it */
1756  pv = vect_dup(v);
1757  coeff = vect_coeff(index, pv);
1758  vect_erase_var(&pv, index);
1759 
1760  if (VECTEUR_NUL_P(pv))
1761  /* If the vector wihout the index is the vector null, we have simply
1762  index = 0: */
1763  return int_to_expression(0);
1764 
1765  /* If the coefficient for the index is positive, inverse all the
1766  vector since the index goes at the other side of "=": */
1767  if (value_pos_p(coeff))
1768  vect_chg_sgn(pv);
1769  else {
1770  /* If coeff is negative, correct the future division rounding (by
1771  -coeff) by adding (coeff - 1) to the vector first: */
1772  value_absolute(coeff);
1773  vect_add_elem(&pv, TCST, value_minus(coeff, VALUE_ONE));
1774  }
1775 
1776  if(vect_size(pv) == 1 && vecteur_var(pv) == TCST) {
1777  /* If the vector is simply coeff.index=c, directly generate and
1778  return c/coeff: */
1779  vecteur_val(pv) = value_pdiv(vecteur_val(pv), coeff);
1780  return make_vecteur_expression(pv);
1781  }
1782 
1783  /* Generate an expression from the linear vector: */
1784  ex1 = make_vecteur_expression(pv);
1785 
1786  if (value_gt(coeff, VALUE_ONE)) {
1787  /* If coeff > 1, divide all the expression by coeff: */
1788  /* FI->YY: before generating a division, you should test if it could
1789  not be performed statically; you have to check if ex1 is not a
1790  constant expression, which is fairly easy since you still have
1791  its linear form, pv */
1792  /* build expressions for the lower and upper bounds */
1793  if( c_language_module_p(get_current_module_entity()) && !get_bool_property("PRETTYPRINT_DIV_INTRINSICS"))
1795  else // Fortran case and C intrinsics requested
1796  div = gen_find_tabulated("TOP-LEVEL:/",entity_domain);
1797  pips_assert("Division operator not found", div != entity_undefined);
1798 
1799  ex2 = int_to_expression(VALUE_TO_INT(coeff));
1801  make_call(div,
1802  CONS(EXPRESSION,ex1,
1803  CONS(EXPRESSION,
1804  ex2,NIL)))),
1806  return(ex);
1807  }
1808  else
1809  return(ex1);
1810 }
#define value_pos_p(val)
#define value_minus(v1, v2)
#define value_absolute(ref)
#define value_pdiv(v1, v2)
#define PIPS_C_DIV_OPERATOR_NAME
expression make_vecteur_expression(Pvecteur pv)
make expression for vector (Pvecteur)
Definition: expression.c:1650
void vect_chg_sgn(Pvecteur v)
void vect_chg_sgn(Pvecteur v): multiplie v par -1
Definition: scalaires.c:151
void vect_erase_var(Pvecteur *ppv, Variable v)
void vect_erase_var(Pvecteur * ppv, Variable v): projection du vecteur *ppv selon la direction v (i....
Definition: unaires.c:106
void vect_add_elem(Pvecteur *pvect, Variable var, Value val)
void vect_add_elem(Pvecteur * pvect, Variable var, Value val): addition d'un vecteur colineaire au ve...
Definition: unaires.c:72

References c_language_module_p(), CONS, entity_domain, entity_intrinsic(), entity_undefined, EXPRESSION, gen_find_tabulated(), get_bool_property(), get_current_module_entity(), int_to_expression(), is_syntax_call, make_call(), make_expression(), make_syntax(), make_vecteur_expression(), NIL, normalized_undefined, pips_assert, PIPS_C_DIV_OPERATOR_NAME, TCST, value_absolute, value_gt, value_minus, VALUE_ONE, value_pdiv, value_pos_p, VALUE_TO_INT, vect_add_elem(), vect_chg_sgn(), vect_coeff(), vect_dup(), vect_erase_var(), vect_size(), VECTEUR_NUL_P, vecteur_val, and vecteur_var.

Referenced by make_bound_expression(), and make_contrainte_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_contrainte_expression()

expression make_contrainte_expression ( Pcontrainte  pc,
Variable  index 
)

A wrapper around make_constraint_expression() for compatibility.

Simply call the function on the vector in the constrain system:

Parameters
pcc
indexndex

Definition at line 1815 of file expression.c.

1815  {
1816  /* Simply call the function on the vector in the constrain system: */
1817  return make_constraint_expression(pc->vecteur, index);
1818 }

References make_constraint_expression(), and Scontrainte::vecteur.

Referenced by free_guards().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_derived_entity()

entity make_derived_entity ( const char *  name,
const char *  module_name,
type  t 
)
Parameters
nameame
module_nameodule_name

Definition at line 378 of file variable.c.

381 {
382  string full_name;
383  entity e;
384 
385  full_name =
387 
388  pips_debug(8, "name %s\n", full_name);
389 
390  message_assert("not already defined",
392 
395 
396  entity_type(e) = copy_type(t);
397 
399 
401 
402  return(e);
403 }

References concatenate(), copy_type(), entity_domain, entity_initial, entity_storage, entity_type, entity_undefined, full_name, gen_find_tabulated(), make_entity, make_storage_rom(), make_value_unknown(), message_assert, module_name(), MODULE_SEP_STRING, pips_debug, storage_undefined, strdup(), type_undefined, and value_undefined.

Referenced by make_new_derived_entity_with_prefix().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_empty_blockdata()

entity make_empty_blockdata ( const char *  name,
language  l 
)
Parameters
nameame

Definition at line 290 of file entity.c.

291 {
293  BLOCKDATA_PREFIX, name, NULL);
295 }
type make_type_void(list _field_)
Definition: ri.c:2727
entity make_empty_module(const char *full_name, type r, language l)
The source language is not specified.
Definition: entity.c:197

References BLOCKDATA_PREFIX, concatenate(), full_name, make_empty_module(), make_type_void(), MODULE_SEP_STRING, NIL, and TOP_LEVEL_MODULE_NAME.

Referenced by gfc2pips_symbol2entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_empty_f95module()

entity make_empty_f95module ( const char *  name,
language  l 
)
Parameters
nameame

Definition at line 275 of file entity.c.

276 {
277  pips_assert("Module are only defined in Fortran95",language_fortran95_p(l));
279  MODULE_SEP_STRING, F95MODULE_PREFIX, name, NULL);
281 }
#define language_fortran95_p(x)
Definition: ri.h:1597

References concatenate(), F95MODULE_PREFIX, full_name, language_fortran95_p, make_empty_module(), make_type_void(), MODULE_SEP_STRING, NIL, pips_assert, and TOP_LEVEL_MODULE_NAME.

Referenced by gfc2pips_symbol2entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_empty_function()

entity make_empty_function ( const char *  name,
type  r,
language  l 
)
Parameters
nameame

Definition at line 283 of file entity.c.

284 {
286  MODULE_SEP_STRING, name, NULL);
287  return make_empty_module(full_name, r,l);
288 }

References concatenate(), full_name, make_empty_module(), MODULE_SEP_STRING, and TOP_LEVEL_MODULE_NAME.

Referenced by atomic_function_of_operation(), freia_create_helper_function(), gfc2pips_symbol2entity(), MakeEntityFunction(), and MakeRunTimeSupportFunction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_empty_module()

entity make_empty_module ( const char *  full_name,
type  r,
language  l 
)

The source language is not specified.

Might not work with C because of module_local_name. Also, the compilation unit is undefined.

It might be necessary to declare the four areas in code_declarations.

See also InitAreas() and init_c_areas(), which use global variables and hence cannot be used outside of the parsers. Beware of the consistency between this function and those two.

See also MakeCurrentFunction(), which is part of the Fortran parser.

FC: added to allow reintrance in HPFC

Parameters
full_nameull_name

Definition at line 197 of file entity.c.

199 {
200  const char* name;
203 
204  /* FC: added to allow reintrance in HPFC */
205  if (e!=entity_undefined)
206  {
207  pips_debug(1,"module %s already exists, returning it\n", full_name);
208  return e;
209  }
210 
211  pips_assert("undefined", e == entity_undefined);
212 
213  e = make_entity
214  (strdup(full_name),
216  make_functional(NIL, r)),
220  l)));
221 
222  name = module_local_name(e);
229 
236 
243 
250 
252  entity_type(PointerArea) = make_type_area(make_area(0, NIL));
253  entity_storage(PointerArea) = make_storage_rom();
254  entity_initial(PointerArea) = make_value_unknown();
256  AddEntityToDeclarations(PointerArea, e);
257 
258  return(e);
259 }
value make_value_code(code _field_)
Definition: ri.c:2835
type make_type_functional(functional _field_)
Definition: ri.c:2718
type make_type_area(area _field_)
Definition: ri.c:2712
code make_code(list a1, string a2, sequence a3, list a4, language a5)
Definition: ri.c:353
sequence make_sequence(list a)
Definition: ri.c:2125
entity DynamicArea
These global variables are declared in ri-util/util.c.
Definition: area.c:57
entity HeapArea
Definition: area.c:59
entity StaticArea
Definition: area.c:58
entity StackArea
Definition: area.c:60
#define STACK_AREA_LOCAL_NAME
Definition: naming-local.h:72
#define POINTER_DUMMY_TARGETS_AREA_LOCAL_NAME
Definition: naming-local.h:77
#define STATIC_AREA_LOCAL_NAME
Definition: naming-local.h:70
@ ENTITY_POINTER_DUMMY_TARGETS_AREA
@ ENTITY_STATIC_AREA
@ ABSTRACT_LOCATION
@ ENTITY_STACK_AREA

References ABSTRACT_LOCATION, AddEntityToDeclarations(), DYNAMIC_AREA_LOCAL_NAME, DynamicArea, entity_domain, ENTITY_DYNAMIC_AREA, ENTITY_HEAP_AREA, entity_initial, entity_kind, ENTITY_POINTER_DUMMY_TARGETS_AREA, ENTITY_STACK_AREA, ENTITY_STATIC_AREA, entity_storage, entity_type, entity_undefined, FindOrCreateEntity(), full_name, gen_find_tabulated(), HEAP_AREA_LOCAL_NAME, HeapArea, make_area(), make_code(), make_entity, make_functional(), make_sequence(), make_storage_rom(), make_type_area(), make_type_functional(), make_value_code(), make_value_unknown(), module_local_name(), NIL, pips_assert, pips_debug, POINTER_DUMMY_TARGETS_AREA_LOCAL_NAME, STACK_AREA_LOCAL_NAME, StackArea, STATIC_AREA_LOCAL_NAME, StaticArea, and strdup().

Referenced by make_empty_blockdata(), make_empty_f95module(), make_empty_function(), make_empty_program(), and make_empty_subroutine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_empty_program()

entity make_empty_program ( const char *  name,
language  l 
)
Parameters
nameame

Definition at line 261 of file entity.c.

262 {
264  MODULE_SEP_STRING MAIN_PREFIX, name, NULL);
266 }
#define MAIN_PREFIX
Definition: naming-local.h:32

References concatenate(), full_name, MAIN_PREFIX, make_empty_module(), make_type_void(), MODULE_SEP_STRING, NIL, and TOP_LEVEL_MODULE_NAME.

Referenced by gfc2pips_symbol2entity(), hpfc_init(), and make_complexity_unknown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_empty_subroutine()

◆ make_enclosing_loops_map()

void make_enclosing_loops_map ( void  )

◆ make_entity_copy()

entity make_entity_copy ( entity  e)

Create a copy of an entity, with (almost) identical type, storage and initial value if move_initialization_p is false, but with a slightly different name as entities are uniquely known by their names, and a different offset if the storage is ram (still to be done).

Entity e must be defined or the function core dumps.

Depending on its storage, the new entity might have to be inserted in code_declarations (done) and the memory allocation recomputed (not done).

Depending on the language, the new entity might have to be inserted in statement declarations. This is left up to the user of this function.

For C, name collisions with the compilation unit are not checked here. They are unlikely, but should be checked by the caller.

/param e entity to copy

Returns
the new entity.

Definition at line 2433 of file entity.c.

2434 {
2436  entity_name(e),
2437  false,
2438  true);
2439 }
static entity generic_make_entity_copy_with_new_name(entity e, string global_new_name, bool systematically_add_suffix, bool move_initialization_p)
Create a copy of an entity, with (almost) identical type, storage and initial value if move_initializ...
Definition: entity.c:2341

References entity_name, and generic_make_entity_copy_with_new_name().

Referenced by make_shuffle_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_entity_copy_with_new_name()

entity make_entity_copy_with_new_name ( entity  e,
string  global_new_name,
bool  move_initialization_p 
)

Create a copy of an entity, with (almost) identical type, storage and initial value if move_initialization_p is false, but with a slightly different name as entities are uniquely known by their names, and a different offset if the storage is ram (still to be done).

Entity e must be defined or the function core dumps.

Depending on its storage, the new entity might have to be inserted in code_declarations (done) and the memory allocation recomputed (not done).

Depending on the language, the new entity might have to be inserted in statement declarations. This is left up to the user of this function.

For C, name collisions with the compilation unit are not checked here. They are unlikely, but should be checked by the caller.

/param e entity to copy /param global_new_name new name wished /param move_initialization_p if true, also copy the initial value

Returns
the new entity.
Parameters
global_new_namelobal_new_name
move_initialization_pove_initialization_p

Definition at line 2463 of file entity.c.

2466 {
2468  global_new_name,
2469  false,
2470  move_initialization_p);
2471 }

References generic_make_entity_copy_with_new_name().

Referenced by clean_up_sequences_rewrite(), do_split_structure(), do_terapix_argument_handler(), outliner_patch_parameters(), recursive_rename_types(), redeclaration_enter_statement(), replace_indices_region(), replace_indices_region_com(), replicate_declaration(), and terapix_loop_handler().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_entity_copy_with_new_name_and_suffix()

entity make_entity_copy_with_new_name_and_suffix ( entity  e,
string  global_new_name,
bool  move_initialization_p 
)

Create a copy of an entity, with (almost) identical type, storage and initial value if move_initialization_p is false, but with a slightly different name as entities are uniquely known by their names, and a different offset if the storage is ram (still to be done).

Entity e must be defined or the function core dumps.

Depending on its storage, the new entity might have to be inserted in code_declarations (done) and the memory allocation recomputed (not done).

Depending on the language, the new entity might have to be inserted in statement declarations. This is left up to the user of this function.

For C, name collisions with the compilation unit are not checked here. They are unlikely, but should be checked by the caller.

/param e entity to copy /param global_new_name new name wished /param move_initialization_p if true, also copy the initial value

Returns
the new entity.
Parameters
global_new_namelobal_new_name
move_initialization_pove_initialization_p

Definition at line 2495 of file entity.c.

2498 {
2500  global_new_name,
2501  true,
2502  move_initialization_p);
2503 }

References generic_make_entity_copy_with_new_name().

Referenced by clean_up_sequences_rewrite().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_entity_expression()

expression make_entity_expression ( entity  e,
cons inds 
)
Parameters
indsnds

Definition at line 176 of file expression.c.

177 {
179  if( entity_constant_p(e) )
180  {
182  }
183  else
184  {
185  reference r = make_reference(e, inds);
186  s = make_syntax_reference(r);
187  }
188  return syntax_to_expression(s);
189 }
syntax make_syntax_call(call _field_)
Definition: ri.c:2500
syntax make_syntax_reference(reference _field_)
Definition: ri.c:2494
expression syntax_to_expression(syntax s)
generates an expression from a syntax
Definition: expression.c:3581

References entity_constant_p, make_call(), make_reference(), make_syntax_call(), make_syntax_reference(), NIL, syntax_to_expression(), and syntax_undefined.

Referenced by alloc_instrumentation(), assign_tmp_to_exp(), atomizer_of_external(), build_flag_assign(), build_flag_test(), build_global_time_test_with_exp(), build_local_time_test(), build_third_comb(), cstr_args_check(), distribute_code(), edge_cost_polynome(), expression_try_find_size(), find_tmp_of_exp(), gen_mpi_send_recv(), get_sp_of_call_p(), loop_header(), loop_inc(), loop_normalize_of_loop(), loop_test(), make_array_communication_statement(), make_com_loopbody(), make_communication_statement(), make_increment_instruction(), make_init_time(), make_loadsave_statement(), make_send_receive_conversion(), make_start_ru_module(), mpi_finalize(), mpi_initialize(), mpic_make_args_mpi_send_or_receiv(), mpic_make_mpi_comm_rank(), mpic_make_mpi_comm_size(), mpic_make_mpi_init(), put_source_ind(), sprintf_check_expression(), and task_time_polynome().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_factor_expression()

expression make_factor_expression ( int  coeff,
entity  vari 
)

Some functions to generate expressions from vectors and constraint systems.

expression make_factor_expression(int coeff, entity vari) make the expression "coeff*vari" where vari is an entity.

a constant only

Parameters
coeffoeff
variari

Definition at line 1631 of file expression.c.

1632 {
1633  expression e1, e2, e3;
1634 
1635  e1 = int_to_expression(coeff);
1636  if (vari==NULL)
1637  return(e1); /* a constant only */
1638  else {
1639  e2 = entity_to_expression(vari);
1640  if (coeff == 1) return(e2);
1641  else {
1643  return (e3);
1644  }
1645  }
1646 }

References entity_intrinsic(), entity_to_expression(), int_to_expression(), MakeBinaryCall(), and MULTIPLY_OPERATOR_NAME.

Referenced by ecrit_une_var(), icm_loop_rwt(), and make_vecteur_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_false_expression()

expression make_false_expression ( void  )

Definition at line 1108 of file expression.c.

1109 {
1111 }
expression make_call_expression(entity e, list l)
Build an expression that call an function entity with an argument list.
Definition: expression.c:321

References FALSE_OPERATOR_NAME, is_basic_logical, make_call_expression(), MakeConstant(), and NIL.

Referenced by simplify_boolean_expression_with_precondition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_global_entity_from_local()

entity make_global_entity_from_local ( entity  local)
Parameters
localocal

Definition at line 281 of file variable.c.

281  {
282  const char* seed = entity_local_name(local);
283  int counter=0;
284  entity new = entity_undefined;
285  string eln= strdup(seed);
287  asprintf(&eln,"%s%d",seed,counter++);
288  }
290  free(eln);
291  entity_type(new)=copy_type(entity_type(local));
296  return new;
297 }
ram make_ram(entity a1, entity a2, intptr_t a3, list a4)
Definition: ri.c:1999
storage make_storage_ram(ram _field_)
Definition: ri.c:2279
entity local_name_to_top_level_entity(const char *n)
This function try to find a top-level entity from a local name.
Definition: entity.c:1450

References add_any_variable_to_area(), asprintf, copy_type(), copy_value(), DYNAMIC_AREA_LOCAL_NAME, entity_initial, entity_local_name(), entity_storage, entity_to_module_entity(), entity_type, entity_undefined, entity_undefined_p, f(), FindEntity(), FindOrCreateEntity(), fortran_module_p(), free(), local_name_to_top_level_entity(), make_ram(), make_storage_ram(), NIL, strdup(), and TOP_LEVEL_MODULE_NAME.

Referenced by inline_expression_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_integer_constant_entity()

entity make_integer_constant_entity ( _int  c)

entity make_integer_constant_entity(int c) make entity for integer constant c

WARNING : the basic integer size is fixed to sizeof(_int)

64 bits numbers are printed in decimal in 20 digits, so with - and \0 32 is enough.

make entity for the constant c

Definition at line 1345 of file variable.c.

1345  {
1346  entity ce;
1347  /* 64 bits numbers are printed in decimal in 20 digits, so with - and \0
1348  32 is enough. */
1349  char num[32];
1350  string cn;
1351 
1352  sprintf(num, "%td", c);
1355  if (ce==entity_undefined) { /* make entity for the constant c */
1356  functional cf =
1359  make_variable(make_basic(is_basic_int, (void*)sizeof(int)),
1360  NIL,NIL)));
1361  type ct = make_type(is_type_functional, cf);
1362  ce = make_entity(strdup(cn), ct, make_storage_rom(),
1364  make_constant(is_constant_int, (void*)c)));
1365  }
1366  return(ce);
1367 }

References concatenate(), entity_domain, entity_undefined, gen_find_tabulated(), is_basic_int, is_constant_int, is_type_functional, is_type_variable, is_value_constant, make_basic(), make_constant(), make_entity, make_functional(), make_storage_rom(), make_type(), make_value(), make_variable(), MODULE_SEP_STRING, NIL, num, strdup(), and TOP_LEVEL_MODULE_NAME.

Referenced by add_pragma_to_sequence(), operator_neutral_element(), regions_to_loops(), remove_simple_scalar_pointers(), scalar_to_array(), and verify_used_before_set_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_keyword_typedef_table()

hash_table make_keyword_typedef_table ( int  tk)
Parameters
tkk

Definition at line 256 of file static.c.

257 {
258  token_named_type = tk;
260  return keyword_typedef_table;
261 }

References hash_string, hash_table_make(), keyword_typedef_table, and token_named_type.

Referenced by parser_init_keyword_typedef_table(), and preprocessor_init_keyword_typedef_table().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_label()

entity make_label ( const char *  module_name,
const char *  local_name 
)
Parameters
module_nameodule_name
local_nameocal_name

Definition at line 308 of file entity.c.

309 {
311  if( type_undefined_p(entity_type(l)) ) {
315  }
316  return l;
317 }
constant make_constant_litteral(void)
Definition: ri.c:418
type MakeTypeStatement(void)
Definition: type.c:92

References entity_initial, entity_storage, entity_type, FindOrCreateEntity(), local_name(), make_constant_litteral(), make_storage_rom(), make_value_constant(), MakeTypeStatement(), module_name(), and type_undefined_p.

Referenced by Generate_C_ReturnLabel(), gfc2pips_int2label(), make_new_label(), and make_return_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_lin_op_exp()

expression make_lin_op_exp ( entity  op_ent,
expression  exp1,
expression  exp2 
)

================================================================

expression make_lin_op_exp(entity op_ent, expression exp1 exp2): returns the expression resulting of the linear operation (ie. + or -) "op_ent" between two integer linear expressions "exp1" and "exp2".

This function uses the linear library for manipulating Pvecteurs. exp1 and exp2 are freed

Pvecteur_to_expression() is a function that rebuilds an expression from a Pvecteur.

Parameters
op_entp_ent
exp1xp1
exp2xp2

Definition at line 2147 of file expression.c.

2148 {
2149  Pvecteur V1, V2, newV = VECTEUR_NUL;
2150 
2151  debug( 7, "make_lin_op_exp", "doing\n");
2154  pips_internal_error( "expressions MUST be linear and normalized");
2155 
2158 
2159  if (ENTITY_PLUS_P(op_ent))
2160  newV = vect_add(V1, V2);
2161  else if (ENTITY_MINUS_P(op_ent))
2162  newV = vect_substract(V1, V2);
2163  else
2164  pips_internal_error("operation must be : + or -");
2165  free_expression(exp1);
2166  free_expression(exp2);
2167 
2168  return(Pvecteur_to_expression(newV));
2169 }
expression Pvecteur_to_expression(Pvecteur vect)
AP, sep 25th 95 : some usefull functions moved from static_controlize/utils.c.
Definition: expression.c:1825
#define VECTEUR_NUL
DEFINITION DU VECTEUR NUL.
Pvecteur vect_add(Pvecteur v1, Pvecteur v2)
package vecteur - operations binaires
Definition: binaires.c:53
Pvecteur vect_substract(Pvecteur v1, Pvecteur v2)
Pvecteur vect_substract(Pvecteur v1, Pvecteur v2): allocation d'un vecteur v dont la valeur est la di...
Definition: binaires.c:75

References debug(), ENTITY_MINUS_P, ENTITY_PLUS_P, expression_normalized, free_expression(), normalized_complex_p, normalized_linear, pips_internal_error, Pvecteur_to_expression(), vect_add(), vect_substract(), and VECTEUR_NUL.

Referenced by make_op_exp(), and rational_op_exp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_list_of_constant()

list make_list_of_constant ( int  val,
int  number 
)

of expression

the length of the created list

Parameters
valal
numberthe constant value

Definition at line 3369 of file expression.c.

3371 {
3372  list l=NIL;
3373 
3374  pips_assert("valid number", number>=0);
3375  for(; number; number--)
3376  l = CONS(EXPRESSION, int_to_expression(val), l);
3377 
3378  return l;
3379 }

References CONS, EXPRESSION, int_to_expression(), NIL, and pips_assert.

Referenced by hpfc_compute_lid(), st_compute_current_computer(), st_compute_current_owners(), and translate_to_module_frame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_loop_label()

entity make_loop_label ( int  ,
entity   
)

◆ make_max_expression()

expression make_max_expression ( expression  e1,
expression  e2,
enum  language_utype 
)
Parameters
e11
e22

Definition at line 1579 of file expression.c.

1580 {
1581  expression new_exp = expression_undefined;
1582  if (lang == is_language_c)
1583  {
1585  copy_expression(e1),
1586  copy_expression(e2));
1588  comp_exp,
1589  e2,
1590  e1);
1591  }
1592  else
1593  {
1595  e1,e2);
1596  }
1597  return new_exp;
1598 }
#define CONDITIONAL_OPERATOR_NAME
expression MakeTernaryCall(entity f, expression e1, expression e2, expression e3)
Creates a call expression to a function with 3 arguments.
Definition: expression.c:367

References C_LESS_THAN_OPERATOR_NAME, CONDITIONAL_OPERATOR_NAME, copy_expression(), entity_intrinsic(), expression_undefined, is_language_c, MakeBinaryCall(), MakeTernaryCall(), and MAX_OPERATOR_NAME.

Referenced by loop_annotate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_min_expression()

expression make_min_expression ( expression  e1,
expression  e2,
enum  language_utype 
)
Parameters
e11
e22

Definition at line 1600 of file expression.c.

1601 {
1602  expression new_exp = expression_undefined;
1603  if (lang == is_language_c)
1604  {
1606  copy_expression(e1),
1607  copy_expression(e2));
1609  comp_exp,
1610  e1,
1611  e2);
1612  }
1613  else
1614  {
1616  e1,e2);
1617  }
1618  return new_exp;
1619 }

References C_LESS_THAN_OPERATOR_NAME, CONDITIONAL_OPERATOR_NAME, copy_expression(), entity_intrinsic(), expression_undefined, is_language_c, MakeBinaryCall(), MakeTernaryCall(), and MIN_OPERATOR_NAME.

Referenced by loop_annotate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_new_array_variable()

entity make_new_array_variable ( entity  module,
basic  b,
list  dimensions 
)
Parameters
moduleodule
dimensionsimensions

Definition at line 793 of file variable.c.

793  {
794  return make_new_array_variable_with_prefix("", module,b,dimensions);
795 }
entity make_new_array_variable_with_prefix(const char *prefix, entity module, basic b, list dimensions)
J'ai ameliore la fonction make_new_scalar_variable_with_prefix
Definition: variable.c:785

References make_new_array_variable_with_prefix(), and module.

Referenced by effects_to_dma().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_new_array_variable_with_prefix()

entity make_new_array_variable_with_prefix ( const char *  prefix,
entity  module,
basic  b,
list  dimensions 
)

J'ai ameliore la fonction make_new_scalar_variable_with_prefix

afin de l'etendre a des tableau

Parameters
prefixrefix
moduleodule
dimensionsimensions

Definition at line 785 of file variable.c.

786 {
787  const char* module_name = module_local_name(module);
788  entity e;
789  e = make_array_entity(prefix, module_name, b, dimensions);
790  return e;
791 }
static entity make_array_entity(const char *name, const char *module_name, basic base, list dimensions)
Create an array entity.
Definition: variable.c:752

References make_array_entity(), module, module_local_name(), module_name(), and prefix.

Referenced by do_clone_entity(), do_group_constants_terapix(), inline_expression_call(), internal_make_new_array_variable(), make_new_array_variable(), make_reduction_vector_entity(), outliner_smart_references_computation(), and promote_local_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_new_common()

entity make_new_common ( string  name,
entity  mod 
)

This function creates a common for a given name in a given module.

This is an entity with the following fields : Example: SUBROUTINE SUB1 COMMON /FOO/ W1,V1

name = top_level:~name (TOP-LEVEL:~FOO) type = area with size = 8 [2*8], layout = NIL [SUB1:W,SUB1:V] storage = ram with function = module (TOP-LEVEL:SUB1) (first occurence ? SUB2,SUB3,..) section = TOP-LEVEL:~FOO (recursive ???) offset = undefined shared = NIL initial = unknown

The area size and area layout must be updated each time when a common variable is added to this common

Parameters
nameame
modod

Definition at line 1806 of file entity.c.

1807 {
1808  string common_global_name = strdup(concatenate(TOP_LEVEL_MODULE_NAME,
1810  COMMON_PREFIX,name,NULL));
1811  type common_type = make_type(is_type_area, make_area(8, NIL));
1812  entity StaticArea =
1814  storage common_storage = make_storage(is_storage_ram,
1815  (make_ram(mod,StaticArea, 0, NIL)));
1816  value common_value =
1819  make_sequence(NIL),
1820  NIL,
1822 
1823  return make_entity(common_global_name,
1824  common_type,
1825  common_storage,
1826  common_value);
1827 }
language make_language_fortran(void)
Definition: ri.c:1250
storage make_storage(enum storage_utype tag, void *val)
Definition: ri.c:2273
@ is_storage_ram
Definition: ri.h:2492

References COMMON_PREFIX, concatenate(), FindOrCreateEntity(), is_storage_ram, is_type_area, make_area(), make_code(), make_entity, make_language_fortran(), make_ram(), make_sequence(), make_storage(), make_type(), make_value_code(), MODULE_SEP_STRING, NIL, STATIC_AREA_LOCAL_NAME, StaticArea, strdup(), string_undefined, and TOP_LEVEL_MODULE_NAME.

Referenced by create_externalized_function_common(), gfc2pips_namespace(), and make_global_common_and_initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_new_derived_entity_with_prefix()

entity make_new_derived_entity_with_prefix ( const char *  prefix,
entity  module,
type  t 
)

derived from make_new_scalar_variable_with_prefix

declare the entity at the highest scope

Find the first matching non-already existent variable name:

Free the already allocated name in the previous iteration that was conflicting:

Use a default type-dependent variable name since the programmer gave none:

Parameters
prefixrefix
moduleodule

Definition at line 685 of file variable.c.

688 {
689  const char* module_name = module_local_name(module);
690  string ep = strdup(prefix);
691  entity e;
692  char * variable_name = NULL;
693  int number = 0;
694  bool empty_prefix = (strlen(prefix) == 0);
695  /* declare the entity at the highest scope */
696  const string format = "0" BLOCK_SEP_STRING "%s%d";
697 
698  /* Find the first matching non-already existent variable name: */
699  do {
700  if (variable_name != NULL)
701  /* Free the already allocated name in the previous iteration that
702  was conflicting: */
704 
705  if (empty_prefix) {
706  /* Use a default type-dependent variable name since the programmer
707  gave none: */
708  switch(type_tag(t)) {
709  case is_type_struct:
712  break;
713  case is_type_union:
716  break;
717  case is_type_enum:
720  break;
721  default:
722  pips_internal_error("unexpected type kind: %d",
723  type_tag(t));
724  break;
725  }
726  }
727  else
728  asprintf(&variable_name, format, ep, number++);
729  }
731 
732  pips_debug(9, "var %s, tag %d\n", variable_name, type_tag(t));
733 
736  free(ep);
737 
738  return e;
739 }
#define DEFAULT_DERIVED_ENUM_PREFIX
Definition: variable.c:441
static int unique_float_number
Definition: variable.c:415
static int unique_integer_number
Definition: variable.c:414
entity make_derived_entity(const char *name, const char *module_name, type t)
Definition: variable.c:378
static int unique_logical_number
Definition: variable.c:416
#define DEFAULT_DERIVED_UNION_PREFIX
Definition: variable.c:440
#define DEFAULT_DERIVED_STRUCT_PREFIX
Definition: variable.c:439

References asprintf, BLOCK_SEP_STRING, DEFAULT_DERIVED_ENUM_PREFIX, DEFAULT_DERIVED_STRUCT_PREFIX, DEFAULT_DERIVED_UNION_PREFIX, free(), is_type_enum, is_type_struct, is_type_union, make_derived_entity(), module, module_local_name(), module_name(), pips_debug, pips_internal_error, prefix, strdup(), type_tag, unique_entity_name_p(), unique_float_number, unique_integer_number, unique_logical_number, and variable_name().

Referenced by do_clone_entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_new_entity()

entity make_new_entity ( basic  ba,
int  kind 
)

The first letter of the local name depends on the basic: int --> I real --> F (float single precision) others --> O

The three following letters are whether "TMP", for temporaries or "AUX" for auxiliary variables.

The first part of the full name is the concatenation of the define constant ATOMIZER_MODULE_NAME and the local name of the module entity.

ATOMIZER_MODULE_NAME discarded : it is a bug ! RK, 31/05/1994. name = strdup(concatenate(ATOMIZER_MODULE_NAME, entity_local_name(mod_ent), MODULE_SEP_STRING, prefix, num, (char *) NULL));

Create a true dynamic variable. RK, 31/05/1994 :

Is the following useless :

The new entity is stored in the list of entities of the same type.

Parameters
baa
kindind

Definition at line 898 of file variable.c.

899 {
900  entity new_ent, mod_ent;
901  // prefix+1 (line#820) must hold 3 characters
902  char prefix[5], *name;
903  int number = 0;
905 
906  /* The first letter of the local name depends on the basic:
907  * int --> I
908  * real --> F (float single precision)
909  * others --> O
910  */
911  switch(basic_tag(ba))
912  {
913  case is_basic_int: { (void) sprintf(prefix, "I"); break;}
914  case is_basic_float:
915  {
917  (void) sprintf(prefix, "O");
918  else
919  (void) sprintf(prefix, "F");
920  break;
921  }
922  default: (void) sprintf(prefix, "O");
923  }
924 
925  /* The three following letters are whether "TMP", for temporaries
926  * or "AUX" for auxiliary variables.
927  */
928  switch(kind)
929  {
930  case TMP_ENT:
931  {
932  number = (++count_tmp);
933  (void) sprintf(prefix+1, "TMP");
934  break;
935  }
936  case AUX_ENT:
937  {
938  number = (++count_aux);
939  (void) sprintf(prefix+1, "AUX");
940  break;
941  }
942  default: user_error("make_new_entity", "Bad kind of entity: %d", kind);
943  }
944 
946 
947  /* The first part of the full name is the concatenation of the define
948  * constant ATOMIZER_MODULE_NAME and the local name of the module
949  * entity.
950  */
951  /* ATOMIZER_MODULE_NAME discarded : it is a bug ! RK, 31/05/1994.
952  name = strdup(concatenate(ATOMIZER_MODULE_NAME, entity_local_name(mod_ent),
953  MODULE_SEP_STRING, prefix, num, (char *) NULL));
954  */
955  asprintf(&name,"%s" MODULE_SEP_STRING "%s%d",entity_local_name(mod_ent),prefix,number);
956  /*
957  new_ent = make_entity(name,
958  make_type(is_type_variable,
959  make_variable(ba,
960  NIL,NIL)),
961  make_storage(is_storage_rom, UU),
962  make_value(is_value_unknown, UU));
963  */
964  /* Create a true dynamic variable. RK, 31/05/1994 : */
965  new_ent = make_entity(name,
967  make_variable(ba,
968  NIL,NIL)),
975  dynamic_area,
977  NIL));
978  AddEntityToCurrentModule(new_ent);
979 
980  /* Is the following useless : */
981 
982  /* The new entity is stored in the list of entities of the same type. */
983  switch(basic_tag(ba))
984  {
985  case is_basic_int:
986  {
988  break;
989  }
990  case is_basic_float:
991  {
994  else
995  real_entities = CONS(ENTITY, new_ent, real_entities);
996  break;
997  }
998  case is_basic_logical:
999  {
1001  break;
1002  }
1003  case is_basic_complex:
1004  {
1006  break;
1007  }
1008  case is_basic_string:
1009  {
1010  char_entities = CONS(ENTITY, new_ent, char_entities);
1011  break;
1012  }
1013  default:break;
1014  }
1015 
1016  return new_ent;
1017 }
static entity mod_ent
#define DOUBLE_PRECISION_SIZE
#define AUX_ENT
#define TMP_ENT
static entity dynamic_area
list double_entities
Definition: variable.c:895
list real_entities
Definition: variable.c:892
static int count_tmp
These globals variables count the number of temporary and auxiliary entities.
Definition: variable.c:864
list complex_entities
Definition: variable.c:894
int add_variable_to_area(entity a, entity v)
Definition: variable.c:1376
static int count_aux
Definition: variable.c:865
list logical_entities
Definition: variable.c:893
list char_entities
Definition: variable.c:896
void AddEntityToCurrentModule(entity e)
Add a variable entity to the current module declarations.
Definition: variable.c:260
list integer_entities
Make a new variable entity which name is one letter prefix + one incrementing number.
Definition: variable.c:891

References add_variable_to_area(), AddEntityToCurrentModule(), asprintf, AUX_ENT, basic_float, basic_tag, char_entities, complex_entities, CONS, count_aux, count_tmp, double_entities, DOUBLE_PRECISION_SIZE, dynamic_area, DYNAMIC_AREA_LOCAL_NAME, ENTITY, entity_local_name(), entity_storage, FindEntity(), get_current_module_entity(), integer_entities, is_basic_complex, is_basic_float, is_basic_int, is_basic_logical, is_basic_string, is_storage_ram, is_type_variable, is_value_unknown, logical_entities, make_entity, make_ram(), make_storage(), make_type(), make_value(), make_variable(), mod_ent, module_local_name(), MODULE_SEP_STRING, NIL, prefix, real_entities, storage_undefined, TMP_ENT, user_error, and UU.

Referenced by assign_tmp_to_exp(), and atomizer_of_external().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_new_index_entity()

entity make_new_index_entity ( entity  old_index,
string  suffix 
)

add a terminal suffix till a new name is found.

Parameters
old_indexld_index
suffixuffix

Definition at line 1851 of file variable.c.

1852 {
1853  entity new_index;
1854  string old_name;
1855  char *new_name=NULL;
1857 
1858  old_name = entity_name(old_index);
1859 
1860  /* add a terminal suffix till a new name is found. */
1861  for (asprintf(&new_name, "%s%s", old_name, suffix); !unique_entity_name_p(global_name_to_user_name(new_name),module); old_name = new_name) {
1862  char *tmp = new_name;
1863  asprintf(&new_name, "%s%s", old_name, suffix);
1864  free(tmp);
1865  }
1866 
1867  // FI: copy_storage() cree de l'aliasing entre new_index et old_index
1868  // Is this the right place to fix the problem?
1869  new_index = make_entity(new_name,
1870  copy_type(entity_type(old_index)),
1872  copy_value(entity_initial(old_index)));
1873  AddEntityToCurrentModule(new_index);
1874  return(new_index);
1875 }
static const char * old_name(entity module, entity obj)
old name of obj while in module now.
Definition: compile.c:354

References AddEntityToCurrentModule(), asprintf, copy_type(), copy_value(), entity_initial, entity_module_name(), entity_name, entity_type, free(), global_name_to_user_name(), make_entity, module, module_name_to_entity(), old_name(), storage_undefined, and unique_entity_name_p().

Referenced by loop_strip_mine(), make_index_prime_entity(), make_local_tile_index_entity(), make_tile_index_entity(), and simd_loop_unroll().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_new_integer_scalar_common_variable()

entity make_new_integer_scalar_common_variable ( string  name,
entity  mod,
entity  com 
)

This function creates a common variable in a given common in a given module.

This is an entity with the following fields : name = module_name:name (SUB1:W1) type = variable with basic = int, dimension = NIL storage = ram with function = module (TOP-LEVEL:SUB1) section = common (TOP-LEVEL:~FOO) offset = 0 shared = initial = unknown

The common must be updated with new area size and area layout

Parameters
nameame
modod
comom

Definition at line 1843 of file entity.c.

1844 {
1845  string var_global_name = strdup(concatenate(module_local_name(mod),MODULE_SEP_STRING,
1846  name,NULL));
1848  storage var_storage = make_storage(is_storage_ram,
1849  (make_ram(mod,com,0,NIL)));
1850  value var_value = make_value_unknown();
1851  entity e = make_entity(var_global_name,var_type,var_storage,var_value);
1852  //area_layout(type_area(entity_type(com))) = CONS(ENTITY,e,NIL);
1853  return e;
1854 }

References concatenate(), is_storage_ram, is_type_variable, make_basic_int(), make_entity, make_ram(), make_storage(), make_type(), make_value_unknown(), make_variable(), module_local_name(), MODULE_SEP_STRING, NIL, and strdup().

+ Here is the call graph for this function:

◆ make_new_label()

entity make_new_label ( entity  module)

This function returns a new label.

FI: do labels have to be declared?

FI: it's crazy; the name is usually derived from the entity by the caller and here the entity is retrieved from its name!

Parameters
moduleodule

Definition at line 357 of file entity.c.

358 {
359  /* FI: do labels have to be declared?*/
360  /* FI: it's crazy; the name is usually derived from the entity
361  by the caller and here the entity is retrieved from its name! */
363  const char * module_name = entity_undefined_p(module)?
367 
368 }
#define GENERATED_LABEL_MODULE_NAME
char * new_label_local_name(entity module)
Definition: entity.c:326
entity make_label(const char *module_name, const char *local_name)
Definition: entity.c:308

References entity_undefined_p, GENERATED_LABEL_MODULE_NAME, local_name(), make_label(), module, module_local_name(), module_name(), and new_label_local_name().

Referenced by do_clone_label(), do_loop_unroll_with_prologue(), flag_loop(), inline_expression_call(), inlining_regenerate_labels(), make_loop_label(), and MakeEntry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_new_module_variable()

entity make_new_module_variable ( entity  module,
int  d 
)

Make a new module integer variable of name X<d>.

Parameters
moduleodule

Definition at line 830 of file variable.c.

831 {
832 
833  string name;
835  static int num = 1;
836  if (d != 0) {
837  (void)asprintf(&name,"X%d",d);
838  num = d;
839  }
840  else { (void) asprintf(&name,"X%d",num);
841  num++;}
842 
843  while(!unique_entity_name_p(name,module))
844  {
845  string tmp = name;
846  (void)asprintf(&name,"X%d",num);
847  num++;
848  free(tmp);
849  }
850  ent1 = make_scalar_integer_entity(name,
852  return ent1;
853 }
entity make_scalar_integer_entity(const char *name, const char *module_name)
Create an integer variable of name "name" in module of name "module_name".
Definition: variable.c:1068

References asprintf, entity_undefined, free(), make_scalar_integer_entity(), module, module_local_name(), num, and unique_entity_name_p().

Referenced by array_scalar_access_to_bank_communication(), array_scalar_access_to_compute_communication(), build_new_variable(), insert_run_time_communications(), reference_conversion_computation(), and regions_to_loops().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_new_scalar_variable()

◆ make_new_scalar_variable_with_prefix()

entity make_new_scalar_variable_with_prefix ( const char *  prefix,
entity  module,
basic  b 
)

Create a new scalar variable of type b in the given module.

The variable name is constructed with "<prefix><number>" If the given prefix is the empty string, some standard prefixes are used, based on the type.

In Fortran, the prefix is forced to upper case to be consistent with PIPS Fortran internal representation. All the default prefixes are assumed to be uppercase strings.

In C this function is added to current module only.

Returns
the variable entity.

It is not clear why the default prefix is (re)computed in the repeat until loop rather than before entering it.

Find the first matching non-already existent variable name:

Free the already allocated name in the previous iteration that was conflicting:

Use a default type-dependent variable name since the programmer gave none:

Parameters
prefixrefix
moduleodule

Definition at line 592 of file variable.c.

595 {
596  const char* module_name = module_local_name(module);
597  string ep = strdup(prefix);
598  entity e;
599  char * variable_name = NULL;
600  int number = 0;
601  bool empty_prefix = (strlen(prefix) == 0);
602  const string format = fortran_module_p(module)?"%s%d":"0" BLOCK_SEP_STRING "%s%d";
603  ep = fortran_module_p(module)? strupper(ep,ep) : ep;
604 
605  /* Find the first matching non-already existent variable name: */
606  do {
607  if (variable_name != NULL)
608  /* Free the already allocated name in the previous iteration that
609  was conflicting: */
611 
612  if (empty_prefix) {
613  /* Use a default type-dependent variable name since the programmer
614  gave none: */
615  basic ub = basic_ultimate(b);
616  switch(basic_tag(ub)) {
617  case is_basic_int:
620  break;
621  case is_basic_float:
624  break;
625  case is_basic_logical:
628  break;
629  case is_basic_complex:
632  break;
633  case is_basic_string:
636  break;
637  case is_basic_pointer:
640  break;
641  case is_basic_derived: {
642  entity de = basic_derived(ub);
643  type dt = ultimate_type(entity_type(de));
644 
645  if(type_struct_p(dt)) {
648  }
649  else if(type_union_p(dt)) {
652  }
653  else if(type_enum_p(dt)) {
656  }
657  else {
658  pips_internal_error("Not implemented for type tag: %d",
659  type_tag(dt));
660  }
661  break;
662  }
663  default:
664  pips_internal_error("unknown basic tag: %d",
665  basic_tag(ub));
666  break;
667  }
668  }
669  else
670  asprintf(&variable_name, format, ep, number++);
671  }
673 
674  pips_debug(9, "var %s, tag %d\n", variable_name, basic_tag(b));
675 
678  free(ep);
679 
680  return e;
681 }
string strupper(string, const char *)
Definition: string.c:213
static int unique_string_number
Definition: variable.c:418
#define DEFAULT_POINTER_PREFIX
Definition: variable.c:435
#define DEFAULT_COMPLEX_PREFIX
Definition: variable.c:433
#define DEFAULT_FLOAT_PREFIX
Definition: variable.c:431
#define DEFAULT_STRUCT_PREFIX
Definition: variable.c:436
#define DEFAULT_LOGICAL_PREFIX
Definition: variable.c:432
#define DEFAULT_STRING_PREFIX
Definition: variable.c:434
#define DEFAULT_INT_PREFIX
Default prefixes.
Definition: variable.c:430
static int unique_complex_number
Definition: variable.c:417
#define DEFAULT_ENUM_PREFIX
Definition: variable.c:438
#define DEFAULT_UNION_PREFIX
Definition: variable.c:437
basic basic_ultimate(basic)
get the ultimate basic from a basic typedef
Definition: type.c:1806

References asprintf, basic_derived, basic_tag, basic_ultimate(), BLOCK_SEP_STRING, DEFAULT_COMPLEX_PREFIX, DEFAULT_ENUM_PREFIX, DEFAULT_FLOAT_PREFIX, DEFAULT_INT_PREFIX, DEFAULT_LOGICAL_PREFIX, DEFAULT_POINTER_PREFIX, DEFAULT_STRING_PREFIX, DEFAULT_STRUCT_PREFIX, DEFAULT_UNION_PREFIX, entity_type, fortran_module_p(), free(), is_basic_complex, is_basic_derived, is_basic_float, is_basic_int, is_basic_logical, is_basic_pointer, is_basic_string, make_scalar_entity(), module, module_local_name(), module_name(), pips_debug, pips_internal_error, prefix, strdup(), strupper(), type_enum_p, type_struct_p, type_tag, type_union_p, ultimate_type(), unique_complex_number, unique_entity_name_p(), unique_float_number, unique_integer_number, unique_logical_number, unique_string_number, and variable_name().

Referenced by comEngine_make_new_scalar_variable(), complexity_sigma(), create_counter(), create_new_ent_list(), do_clone_entity(), do_group_constants_terapix(), do_loop_unroll_with_prologue(), do_scalar_renaming_in_vertex(), find_or_create_newInd(), fix_loop_index_sign(), generate_scalar_variables(), generate_scalar_variables_from_list(), inline_expression_call(), loop_to_complexity(), make_complexity_unknown(), make_loadsave_statement(), make_new_scalar_variable(), make_new_simd_vector_with_prefix(), make_place_holder_variable(), make_temporary_pointer_to_array_entity_with_prefix(), MakeAssignedOrComputedGotoInst(), MakeDoInst(), mpi_initialize(), mpi_make_ctx(), outliner_smart_references_computation(), process_true_call_stat(), promote_local_entities(), set_the_i(), and statements_localize_declarations().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_op_exp()

expression make_op_exp ( char *  op_name,
expression  exp1,
expression  exp2 
)

================================================================

expression make_op_exp(char *op_name, expression exp1 exp2): Returns an expression containing the operation "op_name" between "exp1" and "exp2". "op_name" must be one of the four classic operations : +, -, * or /.

If both expressions are integer constant values and the operation result is an integer then the returned expression contained the calculated result.

Else, we treat five special cases : _ exp1 and exp2 are integer linear and op_name is + or -. This case is resolved by make_lin_op_exp(). _ exp1 = 0 _ exp1 = 1 _ exp2 = 0 _ exp2 = 1

Else, we create a new expression with a binary call.

Note: The function MakeBinaryCall() comes from Pips/.../syntax/expression.c The function int_to_expression() comes from ri-util.

Warning: using the same semantic as MakeBinaryCall, make_op_exp owns the pointer exp1 and exp2 after the call, beware of not sharing them !

pips_debug(5, "begin OP EXP : %s %s %s\n",

words_to_string(words_expression(exp1, NIL)),

op_name,

words_to_string(words_expression(exp2, NIL)));

ENTITY_DIVIDE_P(op_ent)

we compute here as FORTRAN would do

We need to know the integer linearity of both expressions.

dividing by one or minus one is similar to multiplying

ENTITY_MULTIPLY_P(op_ent) || ENTITY_DIVIDE_P(op_ent)

ENTITY_DIVIDE_P(op_ent)

pips_debug(5, "end OP EXP : %s\n",

words_to_string(words_expression(result_exp, NIL)));

Parameters
op_namep_name
exp1xp1
exp2xp2

Definition at line 2012 of file expression.c.

2013 {
2014  expression result_exp = expression_undefined;
2015  entity op_ent, unary_minus_ent;
2016 
2017  debug( 7, "make_op_exp", "doing\n");
2019  op_name), entity_domain);
2020  unary_minus_ent =
2023  entity_domain);
2024 
2025  // FI: to avoid cycle between the ri and prettyprint libraries
2026  /* pips_debug(5, "begin OP EXP : %s %s %s\n", */
2027  /* words_to_string(words_expression(exp1, NIL)), */
2028  /* op_name, */
2029  /* words_to_string(words_expression(exp2, NIL))); */
2030 
2031  if( ! ENTITY_FIVE_OPERATION_P(op_ent) )
2032  user_error("make_op_exp", "operation must be : +, -, *, MOD, or /");
2033 
2034  intptr_t val1, val2;
2035  if( expression_integer_value(exp1,&val1) && expression_integer_value(exp2,&val2) )
2036  {
2037 
2038  debug(6, "make_op_exp", "Constant expressions\n");
2039 
2040  if (ENTITY_PLUS_P(op_ent))
2041  result_exp = int_to_expression(val1 + val2);
2042  else if(ENTITY_MINUS_P(op_ent))
2043  result_exp = int_to_expression(val1 - val2);
2044  else if(ENTITY_MULTIPLY_P(op_ent))
2045  result_exp = int_to_expression(val1 * val2);
2046  else if(ENTITY_MODULO_P(op_ent))
2047  result_exp = int_to_expression(val1 % val2);
2048  else /* ENTITY_DIVIDE_P(op_ent) */
2049  /* we compute here as FORTRAN would do */
2050  result_exp = int_to_expression((int) (val1 / val2));
2051  free_expression(exp1);
2052  free_expression(exp2);
2053  }
2054  else
2055  {
2056  /* We need to know the integer linearity of both expressions. */
2057  normalized nor1 = NORMALIZE_EXPRESSION(exp1);
2058  normalized nor2 = NORMALIZE_EXPRESSION(exp2);
2059 
2060  /* dividing by one or minus one is similar to multiplying */
2061  _int val;
2062  if(( ENTITY_DIVIDE_P(op_ent) || ENTITY_MULTIPLY_P(op_ent))
2063  && expression_integer_value(exp2,&val)
2064  && ( val == -1) ) {
2065  free_expression(exp2);
2067  }
2068 
2069  if((normalized_linear_p(nor1) && normalized_linear_p(nor2) ) &&
2070  (ENTITY_PLUS_P(op_ent) || ENTITY_MINUS_P(op_ent) ) )
2071  {
2072  pips_debug(6, "Linear operation\n");
2073 
2074  result_exp = make_lin_op_exp(op_ent, copy_expression(exp1), copy_expression(exp2));
2075  }
2076  else if(expression_equal_integer_p(exp1, 0))
2077  {
2078  if (ENTITY_PLUS_P(op_ent)) {
2079  result_exp = exp2;
2080  free_expression(exp1);
2081  }
2082  else if(ENTITY_MINUS_P(op_ent)) {
2083  result_exp = MakeUnaryCall(unary_minus_ent, exp2);
2084  free_expression(exp1);
2085  }
2086  else /* ENTITY_MULTIPLY_P(op_ent) || ENTITY_DIVIDE_P(op_ent) */ {
2087  result_exp = int_to_expression(0);
2088  free_expression(exp1);free_expression(exp2);
2089  }
2090  }
2091  else if(expression_equal_integer_p(exp1, 1))
2092  {
2093  if(ENTITY_MULTIPLY_P(op_ent)) {
2094  result_exp = exp2;
2095  free_expression(exp1);
2096  }
2097  }
2098  else if(expression_equal_integer_p(exp2, 0))
2099  {
2100  free_expression(exp2);
2101  if (ENTITY_PLUS_P(op_ent) || ENTITY_MINUS_P(op_ent))
2102  result_exp = exp1;
2103  else if (ENTITY_MULTIPLY_P(op_ent)) {
2104  result_exp = int_to_expression(0);
2105  free_expression(exp1);
2106  }
2107  else /* ENTITY_DIVIDE_P(op_ent) */
2108  user_error("make_op_exp", "division by zero");
2109  }
2110  else if(expression_equal_integer_p(exp2, 1))
2111  {
2112  if(ENTITY_MULTIPLY_P(op_ent) || ENTITY_DIVIDE_P(op_ent)) {
2113  result_exp = exp1;
2114  free_expression(exp2);
2115  }
2116  }
2117  }
2118 
2119  if(result_exp == expression_undefined)
2120  result_exp = MakeBinaryCall(op_ent, exp1, exp2);
2121 
2122  // FI: to avoid cycle between the ri and prettyprint libraries
2123  /* pips_debug(5, "end OP EXP : %s\n", */
2124  /* words_to_string(words_expression(result_exp, NIL))); */
2125 
2126  return (result_exp);
2127 }
string make_entity_fullname(const char *module_name, const char *local_name)
END_EOLE.
Definition: entity_names.c:230
#define ENTITY_MODULO_P(e)
expression make_lin_op_exp(entity op_ent, expression exp1, expression exp2)
================================================================
Definition: expression.c:2147
bool expression_equal_integer_p(expression exp, int i)
================================================================
Definition: expression.c:1977

References copy_expression(), debug(), ENTITY_DIVIDE_P, entity_domain, ENTITY_FIVE_OPERATION_P, ENTITY_MINUS_P, ENTITY_MODULO_P, ENTITY_MULTIPLY_P, ENTITY_PLUS_P, expression_equal_integer_p(), expression_integer_value(), expression_undefined, free_expression(), gen_find_tabulated(), int_to_expression(), intptr_t, make_entity_fullname(), make_lin_op_exp(), MakeBinaryCall(), MakeUnaryCall(), MINUS_OPERATOR_NAME, NORMALIZE_EXPRESSION, normalized_linear_p, pips_debug, TOP_LEVEL_MODULE_NAME, UNARY_MINUS_OPERATOR_NAME, and user_error.

Referenced by add_integer_to_expression(), ajoute_constante(), ajoute_new_var(), bdt_save_pred(), build_third_comb(), C_loop_range(), calloc_to_abstract_location(), compute_final_index_value(), contraintes_to_expression(), distance_between_entity(), distance_between_expression(), do_gather_all_expressions(), do_group_constants_terapix(), do_group_count_elements_reduce(), do_grouping_replace_reference_by_expression_walker(), do_linearize_array_reference(), do_linearize_type(), do_loop_expansion(), do_loop_expansion_init(), do_sizeofdimension_reduction(), do_solve_hardware_constraints_on_nb_proc(), do_symbolic_tiling(), do_terapix_warmup_patching(), ecrit_une_var(), ecrit_une_var_neg(), generate_call_get_workchunk_loopbounds(), heap_intrinsic_to_post_pv(), initialization_list_to_statements(), loop_annotate(), loop_normalize_of_loop(), loop_strip_mine(), malloc_arg_to_type(), monome_to_expression(), ndf_normalized_test(), normalize_test_leaves(), offset_of_struct(), partial_eval_min_or_max_operator(), polynome_to_expression(), put_source_ind(), range_to_expression(), rational_sol_edit(), reference_offset(), region_to_minimal_dimensions(), save_pred(), sc_opposite_exp_of_conjunction(), sesamify(), simplify_minmax_expression(), SizeOfDimension(), try_reorder_expression_call(), and whileloop_to_complexity().

+ Here is the call graph for this function:

◆ make_place_holder_variable()

entity make_place_holder_variable ( entity  de)
Parameters
dee

Definition at line 2059 of file variable.c.

2060 {
2062  basic b = make_basic_derived(de);
2063  entity ph = entity_undefined;
2064  if(!entity_undefined_p(m))
2066  return ph;
2067 }
#define PLACE_HOLDER_PREFIX_STRING
Generate special variables to represent declarations such as "struct s;".
Definition: variable.c:2057

References entity_undefined, entity_undefined_p, get_current_module_entity(), make_basic_derived(), make_new_scalar_variable_with_prefix(), and PLACE_HOLDER_PREFIX_STRING.

+ Here is the call graph for this function:

◆ make_ref_expr()

expression make_ref_expr ( entity  ent,
list  args 
)
Parameters
entnt
argsrgs

Definition at line 4316 of file expression.c.

4317 {
4319  make_reference(ent, args)),
4321 }

References is_syntax_reference, make_expression(), make_reference(), make_syntax(), and normalized_undefined.

Referenced by do_loop_unroll_with_epilogue(), do_loop_unroll_with_prologue(), and full_loop_unroll().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_scalar_char_pointer_type()

type make_scalar_char_pointer_type ( void  )

Allocate a char * pointer type.

Definition at line 5227 of file type.c.

5228 {
5230  basic b = make_basic_pointer(pt);
5231  variable v = make_variable(b, NIL, NIL);
5232  type t = make_type_variable(v);
5233  return t;
5234 }
type make_scalar_integer_type(_int n)
Definition: type.c:712

References DEFAULT_CHARACTER_TYPE_SIZE, make_basic_pointer(), make_scalar_integer_type(), make_type_variable(), make_variable(), and NIL.

Referenced by array_pointer_string_type_equal_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_scalar_complex_type()

type make_scalar_complex_type ( _int  n)

Definition at line 719 of file type.c.

720 {
723  return t;
724 }

References is_basic_complex, is_type_variable, make_basic(), make_type(), make_variable(), NIL, and UUINT.

+ Here is the call graph for this function:

◆ make_scalar_entity()

entity make_scalar_entity ( const char *  name,
const char *  module_name,
basic  base 
)

entity make_scalar_entity(name, module_name, base)

FI: this creates an inconsistency between the module declarations and the content of the DYNAMIC area.

FI: I would have expected is_value_unknown, especially with a RAM storage!

Parameters
nameame
module_nameodule_name
basease

Definition at line 331 of file variable.c.

334 {
335  string full_name;
336  entity e, f, a;
337  basic b = base;
338 
339  full_name =
341 
342  pips_debug(8, "name %s\n", full_name);
343 
344  message_assert("not already defined",
346 
349 
353 
354  int offset = 0;
355  /* FI: this creates an inconsistency between the module declarations
356  * and the content of the *DYNAMIC* area.
357  */
358  if(!place_holder_variable_p(e)) {
361  (add_C_variable_to_area(a, e)):(0);
362  else
364  (add_variable_to_area(a, e)):(0);
365  }
366 
367  entity_storage(e) =
369  make_ram(f, a,
370  offset,
371  NIL));
372 
373  /* FI: I would have expected is_value_unknown, especially with a RAM storage! */
375 
376  return(e);
377 }
bool place_holder_variable_p(entity ph)
Definition: variable.c:2069
int add_C_variable_to_area(entity a, entity v)
Definition: variable.c:1381

References add_C_variable_to_area(), add_variable_to_area(), base, basic_tag, c_module_p(), concatenate(), DYNAMIC_AREA_LOCAL_NAME, entity_domain, entity_initial, entity_storage, entity_type, entity_undefined, f(), FindEntity(), full_name, gen_find_tabulated(), is_basic_overloaded, is_storage_ram, local_name_to_top_level_entity(), make_entity, make_ram(), make_storage(), make_value_unknown(), MakeTypeVariable(), message_assert, module_name(), module_name_to_entity(), MODULE_SEP_STRING, NIL, offset, pips_debug, place_holder_variable_p(), storage_undefined, strdup(), type_undefined, and value_undefined.

Referenced by alloc_instrumentation(), find_or_create_scalar_entity(), find_or_create_typed_entity(), make_new_scalar_variable_with_prefix(), old_array_bound_check_instrumentation(), sprintf_check_expression(), terapix_optimize_accumulator(), and Tiling_buffer_allocation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_scalar_integer_entity()

entity make_scalar_integer_entity ( const char *  name,
const char *  module_name 
)

Create an integer variable of name "name" in module of name "module_name".

Parameters
nameame
module_nameodule_name

Definition at line 1068 of file variable.c.

1069 {
1070  string full_name;
1071  entity e, f, a ;
1072  basic b ;
1073 
1074  pips_debug(8, "begin name=%s, module_name=%s\n", name, module_name);
1075 
1081  value_undefined);
1082 
1083  b = make_basic(is_basic_int, (void*) 4);
1084 
1085  entity_type(e) = (type) MakeTypeVariable(b, NIL);
1086 
1089  pips_assert("make_scalar_integer_entity",
1091 
1092  entity_storage(e)
1094  (make_ram(f, a,
1096  NIL)));
1097 
1100 
1101  pips_debug(8, "end\n");
1102 
1103  return(e);
1104 }
void hash_warn_on_redefinition(void)
these function set the variable should_i_warn_on_redefinition to the value true or false
Definition: hash.c:183

References add_any_variable_to_area(), concatenate(), DYNAMIC_AREA_LOCAL_NAME, entity_initial, entity_storage, entity_type, entity_undefined_p, f(), FindEntity(), fortran_module_p(), full_name, hash_warn_on_redefinition(), is_basic_int, is_storage_ram, is_value_constant, local_name_to_top_level_entity(), make_basic(), make_constant_litteral(), make_entity, make_ram(), make_storage(), make_value(), MakeTypeVariable(), module_name(), MODULE_SEP_STRING, NIL, pips_assert, pips_debug, storage_undefined, strdup(), type_undefined, and value_undefined.

Referenced by create_local_index(), create_local_index2(), create_tile_basis(), find_entity(), make_new_module_variable(), module_to_wp65_modules(), sc_add_new_variable_name(), and terapix_loop_handler().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_scalar_integer_type()

type make_scalar_integer_type ( _int  n)

Definition at line 712 of file type.c.

713 {
716  return t;
717 }

References is_basic_int, is_type_variable, make_basic(), make_type(), make_variable(), NIL, and UUINT.

Referenced by create_stub_points_to(), CreateAbstractStateVariable(), make_scalar_char_pointer_type(), UpdateEntity(), and UpdateType().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_scalar_overloaded_type()

type make_scalar_overloaded_type ( void  )

Definition at line 726 of file type.c.

727 {
730  return t;
731 }

References is_type_variable, make_basic_overloaded(), make_type(), make_variable(), and NIL.

Referenced by points_to_cells_minimal_upper_bound(), process_casted_sinks(), and process_casted_sources().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_standard_integer_type()

type make_standard_integer_type ( type  t,
int  size 
)

If it is int i:5, keep the bit basic type

Parameters
sizeize

Definition at line 3196 of file type.c.

3197 {
3198  if (t == type_undefined)
3199  {
3201  return make_type_variable(v);
3202  }
3203  else
3204  {
3205  if (signed_type_p(t) || unsigned_type_p(t))
3206  {
3208  int i = basic_int(b);
3209  variable v = make_variable(make_basic_int(10*(i/10)+size),NIL,NIL);
3210  pips_debug(8,"Old basic size: %d, new size : %d\n",i,10*(i/10)+size);
3211  return make_type_variable(v);
3212  }
3213  else
3214  {
3215  if (bit_type_p(t))
3216  /* If it is int i:5, keep the bit basic type*/
3217  return t;
3218  else
3219  user_warning("Parse error", "Standard integer types\n");
3220  return type_undefined;
3221  }
3222  }
3223 }
#define user_warning(fn,...)
Definition: misc-local.h:262
bool signed_type_p(type t)
Definition: type.c:2800
bool unsigned_type_p(type t)
Predicates on types.
Definition: type.c:2821
bool bit_type_p(type t)
Definition: type.c:2843

References basic_int, bit_type_p(), make_basic_int(), make_type_variable(), make_variable(), NIL, pips_debug, signed_type_p(), type_undefined, type_variable, unsigned_type_p(), user_warning, and variable_basic.

+ Here is the call graph for this function:

◆ make_standard_long_integer_type()

type make_standard_long_integer_type ( type  t)

long

long long

If it is long int i:5, keep the bit basic type

Definition at line 3309 of file type.c.

3310 {
3311  if (t == type_undefined)
3312  {
3314  return make_type_variable(v);
3315  }
3316  else
3317  {
3318  if (signed_type_p(t) || unsigned_type_p(t) || long_type_p(t))
3319  {
3321  int i = basic_int(b);
3322  variable v;
3323  if (i%10 == DEFAULT_INTEGER_TYPE_SIZE)
3324  {
3325  /* long */
3327  pips_debug(8,"Old basic size: %d, new size : %d\n",i,10*(i/10)+DEFAULT_LONG_INTEGER_TYPE_SIZE);
3328  }
3329  else
3330  {
3331  /* long long */
3333  pips_debug(8,"Old basic size: %d, new size : %d\n",i,10*(i/10)+DEFAULT_LONG_LONG_INTEGER_TYPE_SIZE);
3334  }
3335  return make_type_variable(v);
3336  }
3337  else
3338  {
3339  if (bit_type_p(t))
3340  /* If it is long int i:5, keep the bit basic type*/
3341  return t;
3342  else
3343  user_warning("Parse error", "Standard long integer types\n");
3344  return type_undefined;
3345  }
3346  }
3347 }
#define DEFAULT_LONG_LONG_INTEGER_TYPE_SIZE
bool long_type_p(type t)
Definition: type.c:2831

References basic_int, bit_type_p(), DEFAULT_INTEGER_TYPE_SIZE, DEFAULT_LONG_INTEGER_TYPE_SIZE, DEFAULT_LONG_LONG_INTEGER_TYPE_SIZE, long_type_p(), make_basic_int(), make_type_variable(), make_variable(), NIL, pips_debug, signed_type_p(), type_undefined, type_variable, unsigned_type_p(), user_warning, and variable_basic.

+ Here is the call graph for this function:

◆ make_statement_global_stack()

void make_statement_global_stack ( void  )

This assert is too strong when user errors occur. Each pass should pprovide a "clean-up" function to be called by user_error() without creating a library cycle

This is an error recovery

Definition at line 318 of file static.c.

319 {
320  /* This assert is too strong when user errors occur. Each pass
321  * should pprovide a "clean-up" function to be called by
322  * user_error() without creating a library cycle
323  */
324  //pips_assert("statement_global_stack is undefined",
325  // stack_undefined_p(statement_global_stack));
327  /* This is an error recovery */
329  }
331 }
stack stack_make(int, int, int)
allocation
Definition: stack.c:246
#define stack_undefined_p(s)
Definition: newgen_stack.h:56
void free_statement_global_stack()
Definition: static.c:358

References free_statement_global_stack(), stack_make(), stack_undefined_p, statement_domain, and statement_global_stack.

Referenced by generic_module_name_to_transformers(), generic_points_to_analysis(), generic_print_xml_application(), initial_precondition(), live_out_paths_from_caller_to_callee(), module_name_to_preconditions(), partial_eval(), program_precondition(), and summary_precondition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_stderr_variable()

entity make_stderr_variable ( void  )

If the parser has not (yet) encountered "stderr", a PIPS transformation or instrumentation phase may need "stderr" to generate AST code.

This happens with array_bound_check at least.

It's a global variable

Unfortunately, I do not have an unknown basic to use... It should be a FILE * pointer...

Its type is variable, scalar,

its storage must be the static area of top-level

Its initial value is unknown

Definition at line 302 of file variable.c.

303 {
304  /* It's a global variable */
306  STDERR_NAME);
307  /* Unfortunately, I do not have an unknown basic to use... It
308  should be a FILE * pointer... */
314 
315  pips_assert("f & a are defined", !entity_undefined_p(f)
316  && !entity_undefined_p(a));
317 
318  /* Its type is variable, scalar, */
320 
321  /* its storage must be the static area of top-level */
323 
324  /* Its initial value is unknown */
326  return v;
327 }
#define STDERR_NAME
#define UNKNOWN_RAM_OFFSET

References DEFAULT_INTEGER_TYPE_SIZE, entity_initial, entity_storage, entity_type, entity_undefined_p, f(), FindEntity(), FindOrCreateEntity(), make_basic_int(), make_ram(), make_storage_ram(), make_value_unknown(), MakeTypeVariable(), NIL, pips_assert, STATIC_AREA_LOCAL_NAME, STDERR_NAME, TOP_LEVEL_MODULE_NAME, and UNKNOWN_RAM_OFFSET.

Referenced by make_C_print_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_subscript_expression()

expression make_subscript_expression ( expression  a,
list  sl 
)
Parameters
sll

Definition at line 397 of file expression.c.

398 {
399  subscript i = make_subscript(a, sl);
402  return e;
403 }
subscript make_subscript(expression a1, list a2)
Definition: ri.c:2327
syntax make_syntax_subscript(subscript _field_)
Definition: ri.c:2509

References make_subscript(), make_syntax_subscript(), and syntax_to_expression().

+ Here is the call graph for this function:

◆ make_temporary_pointer_to_array_entity()

entity make_temporary_pointer_to_array_entity ( entity  efrom,
expression  from,
entity  module 
)
Parameters
efromfrom
fromrom
moduleodule

Definition at line 819 of file variable.c.

819  {
821 }
entity make_temporary_pointer_to_array_entity_with_prefix(char *prefix, entity efrom, entity module, expression from)
Definition: variable.c:801

References make_temporary_pointer_to_array_entity_with_prefix(), and module.

Referenced by inline_expression_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_temporary_pointer_to_array_entity_with_prefix()

entity make_temporary_pointer_to_array_entity_with_prefix ( char *  prefix,
entity  efrom,
entity  module,
expression  from 
)

Make the pointer type

Create the variable as a pointer

Set its initial

Parameters
prefixrefix
efromfrom
moduleodule
fromrom

Definition at line 801 of file variable.c.

802  {
805 
806  /* Make the pointer type */
808  dims,
809  NIL)));
810  /* Create the variable as a pointer */
812  module, pointer);
813  /* Set its initial */
816  return new;
817 }
cast make_cast(type a1, expression a2)
Definition: ri.c:311
value make_value_expression(expression _field_)
Definition: ri.c:2850
syntax make_syntax_cast(cast _field_)
Definition: ri.c:2503

References copy_basic(), copy_expression(), entity_initial, entity_type, expression_undefined_p, gen_full_copy_list(), make_basic_pointer(), make_cast(), make_expression(), make_new_scalar_variable_with_prefix(), make_syntax_cast(), make_type_variable(), make_value_expression(), make_value_unknown(), make_variable(), module, NIL, normalized_undefined, prefix, type_variable, variable_basic, and variable_dimensions.

Referenced by effects_to_dma(), and make_temporary_pointer_to_array_entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_true_expression()

◆ make_unbounded_dimensions()

list make_unbounded_dimensions ( int  d)

Minimal information to build a d-dimensional array type.

Definition at line 5752 of file type.c.

5753 {
5754  list dl = NIL;
5755  int i;
5756  for(i=0; i<d;i++) {
5759  NIL);
5760  dl = CONS(DIMENSION, d, dl);
5761  }
5762  return dl;
5763 }

References CONS, DIMENSION, int_to_expression(), make_dimension(), make_unbounded_expression(), and NIL.

Referenced by create_stub_points_to().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_unbounded_expression()

expression make_unbounded_expression ( void  )

Definition at line 4339 of file expression.c.

4340 {
4342 }
#define UNBOUNDED_DIMENSION_NAME
Definition: ri-util-local.h:74

References CreateIntrinsic(), MakeNullaryCall(), and UNBOUNDED_DIMENSION_NAME.

Referenced by array_formal_parameter_to_stub_points_to(), binary_arithmetic_operator_to_post_pv(), binary_intrinsic_call_to_points_to_sinks(), complete_points_to_reference_with_fixed_subscripts(), create_pointer_to_array_stub_points_to(), effect_interference(), effect_may_union(), effect_must_union(), effect_to_store_independent(), generic_reference_add_fixed_subscripts(), make_unbounded_dimensions(), make_unbounded_subscripts(), MakeDimension(), malloc_arg_to_type(), module_initial_parameter_pv(), offset_array_reference(), offset_points_to_cell(), points_to_cell_to_upper_bound_points_to_cells(), points_to_cell_types_compatibility(), points_to_cell_update_last_subscript(), points_to_indices_to_subscript_indices(), points_to_indices_to_unbounded_indices(), proper_to_summary_simple_effect(), reference_with_store_independent_indices(), simple_pv_may_union(), simple_pv_must_union(), simplified_reference(), struct_assignment_to_points_to(), struct_variable_to_pointer_locations(), struct_variable_to_pointer_subscripts(), subscript_expressions_to_constant_subscript_expressions(), type_to_array_type(), and update_operator_to_post_pv().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_unbounded_subscripts()

list make_unbounded_subscripts ( int  d)

FI: this piece of code must have been duplicated somewhere else in an effect library.

Definition at line 4346 of file expression.c.

4347 {
4348  list sl = NIL;
4349  int i;
4350 
4351  for(i=0; i<d; i++) {
4353  }
4354 
4355  return sl;
4356 }

References CONS, EXPRESSION, make_unbounded_expression(), and NIL.

Referenced by cells_to_read_or_write_effects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_vecteur_expression()

expression make_vecteur_expression ( Pvecteur  pv)

make expression for vector (Pvecteur)

sort: to insure a deterministic generation of the expression. note: the initial system is NOT touched. ??? Sometimes the vectors are shared, so you cant modify them that easily. Many cores in Hpfc (deducables), Wp65, and so. ok, I'm responsible for some of them:-)

(c) FC 24/11/94 SG: added support for generation of C operator when needed

let us avoid -1*var, we prefer -var

choose among C or fortran operator depending on the entity type this limits the use of +C and -C to pointer arithmetic

Parameters
pvv

Definition at line 1650 of file expression.c.

1651 {
1652  /* sort: to insure a deterministic generation of the expression.
1653  * note: the initial system is *NOT* touched.
1654  * ??? Sometimes the vectors are shared, so you cant modify them
1655  * that easily. Many cores in Hpfc (deducables), Wp65, and so.
1656  * ok, I'm responsible for some of them:-)
1657  *
1658  * (c) FC 24/11/94
1659  * SG: added support for generation of C operator when needed
1660  */
1661  Pvecteur
1662  v_sorted = vect_sort(pv, compare_Pvecteur),
1663  v = v_sorted;
1664  expression factor1, factor2;
1665  entity op_add, op_sub,
1666  c_op_add, c_op_sub;
1667  int coef;
1668 
1673 
1674  if (VECTEUR_NUL_P(v))
1675  return int_to_expression(0);
1676 
1677  coef = VALUE_TO_INT(vecteur_val(v));
1678 
1679  entity var = (entity) vecteur_var(v);
1680  bool next_op_is_c = var !=TCST && entity_pointer_p(var);
1681  if (coef==-1) /* let us avoid -1*var, we prefer -var */
1682  {
1684  factor1 = make_factor_expression(1, (entity) vecteur_var(v));
1685  factor1 = call_to_expression
1686  (make_call(op_ums, CONS(EXPRESSION, factor1, NIL)));
1687  }
1688  else
1689  factor1 = make_factor_expression(coef, (entity) vecteur_var(v));
1690 
1691  for (v=v->succ; v!=NULL; v=v->succ)
1692  {
1693  var = (entity) vecteur_var(v);
1694  coef = VALUE_TO_INT(vecteur_val(v));
1695  pips_assert("some coefficient", coef!=0);
1696  factor2 = make_factor_expression(ABS(coef), var);
1697  /* choose among C or fortran operator depending on the entity type
1698  * this limits the use of +C and -C to pointer arithmetic
1699  */
1700  entity op =
1701  ( next_op_is_c ) ?
1702  ( coef> 0 ? c_op_add : c_op_sub ) :
1703  ( coef> 0 ? op_add : op_sub ) ;
1704  factor1 = MakeBinaryCall(op,factor1,factor2);
1705  next_op_is_c = var !=TCST && entity_pointer_p(var);
1706  }
1707 
1708  vect_rm(v_sorted);
1709 
1710  return factor1;
1711 }
int compare_Pvecteur(Pvecteur *pv1, Pvecteur *pv2)
comparison function for Pvecteur in pips, to be used by qsort.
Definition: constraint.c:50
expression make_factor_expression(int coeff, entity vari)
Some functions to generate expressions from vectors and constraint systems.
Definition: expression.c:1631
Pvecteur vect_sort(Pvecteur v, int *compare)
Pvecteur vect_sort(v, compare) Pvecteur v; int (*compare)();.
Definition: unaires.c:335

References ABS, call_to_expression(), compare_Pvecteur(), CONS, entity_intrinsic(), entity_pointer_p(), EXPRESSION, int_to_expression(), make_call(), make_factor_expression(), MakeBinaryCall(), MINUS_C_OPERATOR_NAME, MINUS_OPERATOR_NAME, NIL, pips_assert, PLUS_C_OPERATOR_NAME, PLUS_OPERATOR_NAME, TCST, UNARY_MINUS_OPERATOR_NAME, VALUE_TO_INT, vect_rm(), vect_sort(), VECTEUR_NUL_P, vecteur_val, and vecteur_var.

Referenced by array_indices_communication(), array_scalar_access_to_bank_communication(), build_esv_list(), build_third_comb(), complex_bound_generation(), constraints_to_loop_bound(), contraintes_to_expression(), eval_var(), expression_to_expression_newbase(), generate_subarray_shift(), get_exp_schedule(), lower_bound_generation(), make_array_bounds(), make_constraint_expression(), make_datum_movement(), make_movement_scalar_wp65(), make_movements_loop_body_wp65(), make_rational_exp(), negate_expression(), partial_eval_expression(), Pcontrainte_to_expression_list(), phi_free_contraints_to_expressions(), predicate_to_expression(), psystem_to_expression(), put_source_ind(), Pvecteur_to_assign_statement(), Pvecteur_to_expression(), reduce_loop_bound(), reference_conversion_computation(), test_bound_generation(), upper_bound_generation(), vect_to_string(), and vectors_to_expressions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_zero_expression()

expression make_zero_expression ( void  )

Make a zero expression.

It is useful compared to int_to_expression(0) because it is much easier to search in source text.

Definition at line 1212 of file expression.c.

1213 {
1214  return int_to_expression(0);
1215 }

References int_to_expression().

Referenced by array_formal_parameter_to_stub_points_to(), create_scalar_stub_sink_cell(), find_points_to_subscript_for_type(), generic_reference_to_transformer(), pointer_source_to_sinks(), and subscript_to_points_to_sinks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeAnyScalarParameter()

parameter MakeAnyScalarParameter ( tag  t,
_int  size 
)

For Fortran.

Parameters
sizeize

Definition at line 251 of file type.c.

252 {
253  return make_parameter(MakeTypeArray(make_basic(t, UUINT(size)), NIL),
256 }
mode make_mode_reference(void)
Definition: ri.c:1356
type MakeTypeArray(basic b, cons *ld)
functions on types
Definition: type.c:162

References make_basic(), make_dummy_unknown(), make_mode_reference(), make_parameter(), MakeTypeArray(), NIL, and UUINT.

Referenced by MakeComplexParameter(), MakeDoublecomplexParameter(), MakeDoubleprecisionParameter(), MakeIntegerParameter(), MakeLogicalParameter(), MakeLongDoublecomplexParameter(), MakeLongIntegerParameter(), MakeLongLongIntegerParameter(), MakeOverloadedParameter(), MakePointerParameter(), MakeQuadprecisionParameter(), MakeRealParameter(), and MakeUnsignedIntegerParameter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeAnyScalarResult()

type MakeAnyScalarResult ( tag  t,
_int  size 
)
Parameters
sizeize

Definition at line 337 of file type.c.

338 {
339  return MakeTypeArray(make_basic(t, UUINT(size)), NIL);
340 }

References make_basic(), MakeTypeArray(), NIL, and UUINT.

Referenced by MakeComplexResult(), MakeDoublecomplexResult(), MakeDoubleprecisionResult(), MakeIntegerResult(), MakeLogicalResult(), MakeLongDoublecomplexResult(), MakeLongIntegerResult(), MakeLongLongIntegerResult(), MakeOverloadedResult(), MakeQuadprecisionResult(), MakeRealResult(), and MakeUnsignedIntegerResult().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeBasic()

basic MakeBasic ( int  the_tag)

END_EOLE.

Parameters
the_taghe_tag

Definition at line 128 of file type.c.

130 {
131  switch(the_tag)
132  {
133  case is_basic_int:
134  return(make_basic(is_basic_int, UUINT(4)));
135  break;
136  case is_basic_float:
137  return(make_basic(is_basic_float, UUINT(4)));
138  break;
139  case is_basic_logical:
140  return(make_basic(is_basic_logical, UUINT(4)));
141  break;
142  case is_basic_complex:
143  return(make_basic(is_basic_complex, UUINT(8)));
144  break;
145  case is_basic_overloaded:
147  break;
148  case is_basic_string:
150  break;
151  default:
152  pips_internal_error("unexpected basic tag: %d",
153  the_tag);
154  break;
155  }
156 
157  return(basic_undefined);
158 }

References basic_undefined, is_basic_complex, is_basic_float, is_basic_int, is_basic_logical, is_basic_overloaded, is_basic_string, make_basic(), pips_internal_error, string_undefined, UU, and UUINT.

Referenced by add_one_bound_argument(), complexity_sigma(), create_integer_parameter_for_new_module(), create_new_integer_scalar_common_variable(), create_private_integer_variable_for_new_module(), DeclarePointer(), extract_lattice(), find_or_create_scalar_entity(), find_or_create_typed_entity(), generate_copy_loop_nest(), generate_optimized_code_for_loop_nest(), loop_flt(), loop_to_complexity(), mpi_initialize(), mpi_make_ctx(), and st_compute_ith_local_index().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeBasicOverloaded()

basic MakeBasicOverloaded ( void  )

bool same_type_name_p(const type t0, const type t1) {

string s0 = string_of_type(t0), s1 =string_of_type(t1); bool same = same_string_p(s0,s1); free(s0); free(s1); return same; } generation of types

Definition at line 77 of file type.c.

78 {
80 }

References is_basic_overloaded, make_basic(), and NIL.

+ Here is the call graph for this function:

◆ MakeBinaryCall()

expression MakeBinaryCall ( entity  f,
expression  eg,
expression  ed 
)

Creates a call expression to a function with 2 arguments.

Parameters
fis the function entity to call
egis the first argument expression given to the function to call
edis the second argument expression given to the function to call
Parameters
egg
edd

Definition at line 354 of file expression.c.

354  {
356  CONS(EXPRESSION, ed, NIL)));
357 }

References CONS, EXPRESSION, f(), make_call_expression(), and NIL.

Referenced by any_basic_update_operation_to_transformer(), any_basic_update_to_transformer_list(), any_update_to_transformer_list(), array_scalar_access_to_bank_communication(), basic_update_reflhs_with_rhs_to_transformer(), binary_arithmetic_operator_to_post_pv(), bound_to_statement(), buffer_full_condition(), c_dim_string(), c_reference(), call_rwt(), compile_master(), compute_final_index_value(), constraints_to_loop_bound(), convert_bound_expression(), ctx_generate_new_statement_cluster_dependant(), derived_formal_parameter_to_stub_points_to(), dimensions_to_dma(), do_array_to_pointer_walk_expression(), do_brace_expression_to_statements(), do_expression_reduction(), do_loop_expansion(), do_loop_to_for_loop(), do_loop_to_while_loop(), do_loop_unroll_with_epilogue(), do_loop_unroll_with_prologue(), do_reduction_atomization(), do_solve_hardware_constraints_on_nb_proc(), do_split_structure(), do_terapix_remove_divide(), do_terapix_warmup_patching(), expand_call(), expr_compute_local_index(), expression_list_to_binary_operator_call(), fix_if_condition(), gen_if_rank(), generate_monome(), get_allocatable_data_expr(), gfc2pips_buildCaseTest(), gfc2pips_code2instruction_(), gfc2pips_dumpSELECT(), gfc2pips_expr2expression(), gfc2pips_reduce_repeated_values(), gfc2pips_symbol2data_instruction(), guard_expanded_statement(), heap_intrinsic_to_post_pv(), hpfc_add_2(), hpfc_add_n(), loop_annotate(), loop_strip_mine(), make_assign_expression(), make_body_from_loop(), make_condition_from_loop(), make_expression_with_state_variable(), make_factor_expression(), make_fields_assignment_instruction(), make_increment_statement(), make_max_exp(), make_max_expression(), make_min_expression(), make_movements_loop_body_wp65(), make_op_exp(), make_scalar_communication_module(), make_scanning_over_tiles(), make_start_ru_module(), make_vecteur_expression(), MakeArithmIfInst(), MakeAssignedOrComputedGotoInst(), MakeComplexConstantExpression(), MakeDimension(), MakeFortranBinaryCall(), makeTransfertSizeExpression(), MakeWhileDoInst(), ndf_normalized_test(), normalize_test_leaves(), outliner_extract_loop_bound(), overlap_redefine_expression(), partial_eval_binary_operator_old(), partial_eval_mult_operator(), partial_eval_plus_or_minus_operator(), Pcontrainte_to_expression_list(), phi_free_contraints_to_expressions(), predicate_to_expression(), psystem_to_expression(), rational_op_exp(), regenerate_expression(), region_to_address(), region_to_minimal_dimensions(), sc_conditional(), sc_opposite_exp_of_conjunction(), sesamify(), simdizer_auto_tile(), simplify_complex_expression(), split_complex_expression(), split_update_call(), st_send_to_computer_if_necessary(), step_local_regionArray(), string_to_expression(), terapix_normalize_tests(), translate_to_module_frame(), typedef_formal_parameter_to_stub_points_to(), unsugared_loop_inc(), unsugared_loop_test(), update_indices_for_local_computation(), update_operation_to_transformer(), update_range(), update_reflhs_with_rhs_to_transformer(), update_test_condition(), and words_dimension().

+ Here is the call graph for this function:

◆ MakeBraceExpression()

expression MakeBraceExpression ( list  l)

Definition at line 3927 of file expression.c.

3928 {
3930 }
#define BRACE_INTRINSIC
Definition: ri-util-local.h:85

References BRACE_INTRINSIC, CreateIntrinsic(), and make_call_expression().

+ Here is the call graph for this function:

◆ MakeCastExpression()

expression MakeCastExpression ( type  t,
expression  e 
)

exp = (t) e

Definition at line 3911 of file expression.c.

3912 {
3913  syntax s = make_syntax_cast(make_cast(t,e));
3915  return exp; /* exp = (t) e */
3916 }

References exp, make_cast(), make_expression(), make_syntax_cast(), and normalized_undefined.

Referenced by cast_STEP_ARG().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeCharacterConstantExpression()

◆ MakeCharacterParameter()

parameter MakeCharacterParameter ( void  )

◆ MakeCharacterResult()

type MakeCharacterResult ( void  )

Definition at line 328 of file type.c.

References DEFAULT_CHARACTER_TYPE_SIZE, is_basic_string, is_constant_int, is_value_constant, make_basic(), make_constant(), make_value(), MakeTypeArray(), NIL, and UUINT.

Referenced by assign_substring_type(), char_pointer_to_double_type(), character_to_character_type(), and substring_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeCommaExpression()

expression MakeCommaExpression ( list  l)

Definition at line 3918 of file expression.c.

3919 {
3920  if (ENDP(l))
3921  return expression_undefined;
3922  if (gen_length(l)==1)
3923  return EXPRESSION(CAR(l));
3925 }
#define COMMA_OPERATOR_NAME

References CAR, COMMA_OPERATOR_NAME, CreateIntrinsic(), ENDP, EXPRESSION, expression_undefined, gen_length(), and make_call_expression().

Referenced by MakeArrayExpression(), and MakeWhileLoop().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeCompilationUnitEntity()

entity MakeCompilationUnitEntity ( const char *  name)

This is useful for the C language only.

Normally, the storage must be rom but in order to store the list of entities declared with extern, we use the ram storage to put this list in ram_shared

Parameters
nameame

Definition at line 1954 of file entity.c.

1955 {
1957 
1958  pips_assert("name is a compilation unit name", compilation_unit_p(name));
1959 
1960  /* Normally, the storage must be rom but in order to store the list of entities
1961  declared with extern, we use the ram storage to put this list in ram_shared*/
1965 
1966  if(!type_undefined_p(entity_type(e)))
1967  free_type(entity_type(e));
1969 
1973 
1974  return e;
1975 }
void free_storage(storage p)
Definition: ri.c:2231
language make_language_c(void)
Definition: ri.c:1253
type make_type_unknown(void)
Definition: ri.c:2724
@ is_storage_rom
Definition: ri.h:2494

References compilation_unit_p(), entity_initial, entity_storage, entity_type, FindOrCreateEntity(), free_storage(), free_type(), free_value(), is_storage_rom, is_value_code, make_code(), make_functional(), make_language_c(), make_sequence(), make_storage(), make_type_functional(), make_type_unknown(), make_value(), NIL, pips_assert, storage_undefined_p, strdup(), TOP_LEVEL_MODULE_NAME, type_undefined_p, UU, and value_undefined_p.

Referenced by add_new_compilation_unit(), add_new_module_from_text(), MakeCurrentCompilationUnitEntity(), and outliner_independent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeComplexConstant()

entity MakeComplexConstant ( expression  r,
expression  i 
)

make a complex constant from two calls to real or integer constants

Problem: does not work if either of the components is negative because negative constants are stored as expressions. For instance, (0, -1) is not a complex constant for PIPS but an expression: cmplx(0,unary_minus(1)).

Note: I might have changed that to store DATA statements... (FI)

name has to be allocated by strdup because of nested calls to concatenate

Definition at line 373 of file constant.c.

374 {
377  entity e;
378  char * name;
379  asprintf(&name,"(%s,%s)", entity_local_name(re), entity_local_name(ie));
380  type rt = entity_type(re);
381  type it = entity_type(ie);
386  int rsize = basic_type_size(rb);
387  int isize = basic_type_size(ib);
388  int size = rsize>isize? rsize: isize;
389 
390  e = make_constant_entity(name, is_basic_complex, size);
391  /* name has to be allocated by strdup because of nested calls to
392  concatenate */
393  free(name);
394  return e;
395 }
entity make_constant_entity(string name, tag bt, size_t size)
For historical reason, call the Fortran version.
Definition: constant.c:301
int basic_type_size(basic)
See also SizeOfElements()
Definition: type.c:1074

References asprintf, basic_type_size(), call_function, entity_local_name(), entity_type, expression_syntax, free(), functional_result, is_basic_complex, make_constant_entity(), syntax_call, type_functional, type_variable, and variable_basic.

+ Here is the call graph for this function:

◆ MakeComplexConstantExpression()

expression MakeComplexConstantExpression ( expression  r,
expression  i 
)

Definition at line 397 of file constant.c.

399 {
401 
403  basic rb = basic_of_expression(r);
404  basic ib = basic_of_expression(i);
405  int rsize = basic_type_size(rb);
406  int isize = basic_type_size(ib);
407  int size = rsize>isize? rsize: isize;
408 
410  (size==4? IMPLIED_COMPLEX_NAME: IMPLIED_DCOMPLEX_NAME), r, i);
411  }
412 
413  return cce;
414 }
bool signed_constant_expression_p(expression e)
Definition: constant.c:604

References basic_of_expression(), basic_type_size(), expression_undefined, IMPLIED_COMPLEX_NAME, IMPLIED_DCOMPLEX_NAME, local_name_to_top_level_entity(), MakeBinaryCall(), and signed_constant_expression_p().

Referenced by complex_to_expression(), gfc2pips_expr2expression(), gfc2pips_make_zero_for_symbol(), and set_the_i().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeComplexParameter()

parameter MakeComplexParameter ( void  )

Definition at line 224 of file type.c.

225 {
227 }
parameter MakeAnyScalarParameter(tag t, _int size)
For Fortran.
Definition: type.c:251

References DEFAULT_COMPLEX_TYPE_SIZE, is_basic_complex, and MakeAnyScalarParameter().

Referenced by complex_to_complex_type(), and complex_to_real_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeComplexResult()

type MakeComplexResult ( void  )

Definition at line 311 of file type.c.

312 {
314 }
type MakeAnyScalarResult(tag t, _int size)
Definition: type.c:337

References DEFAULT_COMPLEX_TYPE_SIZE, is_basic_complex, and MakeAnyScalarResult().

Referenced by complex_to_complex_type(), and overloaded_to_complex_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeConstant()

entity MakeConstant ( string  name,
tag  bt 
)

Make a Fortran constant.

Apparently partly extended fo C...

Parameters
nameame
btt

Definition at line 351 of file constant.c.

352 {
353  return SafeMakeConstant(name, bt, constant_error);
354 }
static bool constant_error(const char *f, const char *m)
Definition: constant.c:287
entity SafeMakeConstant(string name, tag bt, bool(*error_manager)(const char *, const char *))
END_EOLE.
Definition: constant.c:315

References constant_error(), and SafeMakeConstant().

Referenced by bool_to_expression(), buffer_full_condition(), compile_reduction(), float_to_entity(), gfc2pips_int_const2entity(), gfc2pips_logical2entity(), gfc2pips_real2entity(), int_to_entity(), make_C_print_statement(), make_false_expression(), make_special_value(), make_stop_statement(), make_true_expression(), MakeCharacterConstantExpression(), and step_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeDoublecomplexParameter()

parameter MakeDoublecomplexParameter ( void  )

Definition at line 229 of file type.c.

230 {
232 }
#define DEFAULT_DOUBLECOMPLEX_TYPE_SIZE

References DEFAULT_DOUBLECOMPLEX_TYPE_SIZE, is_basic_complex, and MakeAnyScalarParameter().

Referenced by doublecomplex_to_double_type(), and doublecomplex_to_doublecomplex_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeDoublecomplexResult()

type MakeDoublecomplexResult ( void  )

Definition at line 316 of file type.c.

References DEFAULT_DOUBLECOMPLEX_TYPE_SIZE, is_basic_complex, and MakeAnyScalarResult().

Referenced by doublecomplex_to_doublecomplex_type(), and overloaded_to_doublecomplex_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeDoubleprecisionParameter()

parameter MakeDoubleprecisionParameter ( void  )

◆ MakeDoubleprecisionResult()

type MakeDoubleprecisionResult ( void  )

◆ MakeIntegerParameter()

parameter MakeIntegerParameter ( void  )

Definition at line 184 of file type.c.

References DEFAULT_INTEGER_TYPE_SIZE, is_basic_int, and MakeAnyScalarParameter().

Referenced by assign_substring_type(), integer_to_integer_type(), integer_to_logical_type(), integer_to_overloaded_type(), integer_to_real_type(), integer_to_void_type(), and substring_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeIntegerResult()

◆ MakeLogicalParameter()

parameter MakeLogicalParameter ( void  )

Definition at line 219 of file type.c.

References DEFAULT_LOGICAL_TYPE_SIZE, is_basic_logical, and MakeAnyScalarParameter().

+ Here is the call graph for this function:

◆ MakeLogicalResult()

type MakeLogicalResult ( void  )

Definition at line 306 of file type.c.

References DEFAULT_LOGICAL_TYPE_SIZE, is_basic_logical, and MakeAnyScalarResult().

Referenced by character_to_logical_type(), integer_to_logical_type(), logical_to_logical_type(), and overloaded_to_logical_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeLongDoublecomplexParameter()

parameter MakeLongDoublecomplexParameter ( void  )

MB.

Definition at line 234 of file type.c.

235 {
237 }
#define DEFAULT_LONGDOUBLECOMPLEX_TYPE_SIZE

References DEFAULT_LONGDOUBLECOMPLEX_TYPE_SIZE, is_basic_complex, and MakeAnyScalarParameter().

Referenced by longdoublecomplex_to_longdouble_type(), and longdoublecomplex_to_longdoublecomplex_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeLongDoublecomplexResult()

type MakeLongDoublecomplexResult ( void  )

MB.

Definition at line 322 of file type.c.

References DEFAULT_LONGDOUBLECOMPLEX_TYPE_SIZE, is_basic_complex, and MakeAnyScalarResult().

Referenced by longdoublecomplex_to_longdoublecomplex_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeLongIntegerParameter()

parameter MakeLongIntegerParameter ( void  )

Definition at line 189 of file type.c.

References DEFAULT_LONG_INTEGER_TYPE_SIZE, is_basic_int, and MakeAnyScalarParameter().

Referenced by longinteger_to_overloaded_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeLongIntegerResult()

type MakeLongIntegerResult ( void  )

MB.

Definition at line 281 of file type.c.

References DEFAULT_LONG_INTEGER_TYPE_SIZE, is_basic_int, and MakeAnyScalarResult().

Referenced by atomic_function_of_operation(), double_to_longinteger_type(), longdouble_to_longinteger_type(), longinteger_to_longinteger_type(), and real_to_longinteger_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeLongLongIntegerParameter()

parameter MakeLongLongIntegerParameter ( void  )

MB.

Definition at line 199 of file type.c.

References DEFAULT_LONG_LONG_INTEGER_TYPE_SIZE, is_basic_int, and MakeAnyScalarParameter().

Referenced by longlonginteger_to_overloaded_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeLongLongIntegerResult()

type MakeLongLongIntegerResult ( void  )

MB.

Definition at line 286 of file type.c.

References DEFAULT_LONG_LONG_INTEGER_TYPE_SIZE, is_basic_int, and MakeAnyScalarResult().

Referenced by double_to_longlonginteger_type(), longdouble_to_longlonginteger_type(), longlonginteger_to_longlonginteger_type(), and real_to_longlonginteger_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeModeReference()

mode MakeModeReference ( void  )

Definition at line 82 of file type.c.

83 {
85 }

References is_mode_reference, make_mode(), and NIL.

Referenced by update_functional_type_with_actual_arguments(), and UpdateFunctionalType().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeModeValue()

mode MakeModeValue ( void  )

Definition at line 87 of file type.c.

88 {
89  return(make_mode(is_mode_value, NIL));
90 }
@ is_mode_value
Definition: ri.h:1675

References is_mode_value, make_mode(), and NIL.

+ Here is the call graph for this function:

◆ MakeNullaryCall()

expression MakeNullaryCall ( entity  f)

Creates a call expression to a function with zero arguments.

Parameters
fis the function entity to call

Definition at line 331 of file expression.c.

332 {
333  return make_call_expression(f, NIL);
334 }

References f(), make_call_expression(), and NIL.

Referenced by bool_to_expression(), DeclarePointer(), dims_array_init(), expression_list_to_conjonction(), gfc2pips_array_ref2indices(), gfc2pips_code2instruction_(), gfc2pips_expr2expression(), gfc2pips_exprIO2(), gfc2pips_exprIO3(), gfc2pips_get_list_of_dimensions2(), make_simple_Fortran_io_instruction(), make_unbounded_expression(), MakeAtom(), MakeCharacterConstantExpression(), and MakeSimpleIoInst1().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeOverloadedParameter()

parameter MakeOverloadedParameter ( void  )

◆ MakeOverloadedResult()

type MakeOverloadedResult ( void  )

this function creates a default fortran operator result, i.e.

a zero dimension variable with an overloaded basic type.

Definition at line 261 of file type.c.

262 {
264 }

References is_basic_overloaded, and MakeAnyScalarResult().

Referenced by __attribute__(), default_intrinsic_type(), gfc2pips_code2instruction_(), integer_to_overloaded_type(), longinteger_to_overloaded_type(), longlonginteger_to_overloaded_type(), MakeRunTimeSupportFunction(), and pointer_to_overloaded_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakePointerParameter()

parameter MakePointerParameter ( void  )

Definition at line 173 of file type.c.

174 {
175  pips_internal_error("Wrong signature, wrong implementation.\n");
177 }

References DEFAULT_POINTER_TYPE_SIZE, is_basic_pointer, MakeAnyScalarParameter(), and pips_internal_error.

Referenced by pointer_to_overloaded_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeQuadprecisionParameter()

parameter MakeQuadprecisionParameter ( void  )

MB.

Definition at line 214 of file type.c.

215 {
217 }
#define DEFAULT_QUADPRECISION_TYPE_SIZE

References DEFAULT_QUADPRECISION_TYPE_SIZE, is_basic_float, and MakeAnyScalarParameter().

Referenced by longdouble_to_integer_type(), longdouble_to_longdouble_type(), longdouble_to_longinteger_type(), and longdouble_to_longlonginteger_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeQuadprecisionResult()

type MakeQuadprecisionResult ( void  )

MB.

Definition at line 301 of file type.c.

References DEFAULT_QUADPRECISION_TYPE_SIZE, is_basic_float, and MakeAnyScalarResult().

Referenced by longdouble_to_longdouble_type(), longdoublecomplex_to_longdouble_type(), and overloaded_to_longdouble_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeRealParameter()

parameter MakeRealParameter ( void  )

Definition at line 204 of file type.c.

References DEFAULT_REAL_TYPE_SIZE, is_basic_float, and MakeAnyScalarParameter().

Referenced by real_to_double_type(), real_to_integer_type(), real_to_longinteger_type(), real_to_longlonginteger_type(), and real_to_real_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeRealResult()

type MakeRealResult ( void  )

Definition at line 291 of file type.c.

References DEFAULT_REAL_TYPE_SIZE, is_basic_float, and MakeAnyScalarResult().

Referenced by atomic_function_of_operation(), complex_to_real_type(), integer_to_real_type(), overloaded_to_real_type(), and real_to_real_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeSizeofExpression()

expression MakeSizeofExpression ( expression  e)

exp = sizeof(e)

Definition at line 3896 of file expression.c.

3897 {
3898 
3901  return exp; /* exp = sizeof(e)*/
3902 }
sizeofexpression make_sizeofexpression_expression(expression _field_)
Definition: ri.c:2180
syntax make_syntax_sizeofexpression(sizeofexpression _field_)
Definition: ri.c:2506

References exp, make_expression(), make_sizeofexpression_expression(), make_syntax_sizeofexpression(), and normalized_undefined.

Referenced by get_sizeofexpression_for_region().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeSizeofType()

expression MakeSizeofType ( type  t)

exp = sizeof(t)

Definition at line 3904 of file expression.c.

3905 {
3908  return exp; /* exp = sizeof(t) */
3909 }
sizeofexpression make_sizeofexpression_type(type _field_)
Definition: ri.c:2177

References exp, make_expression(), make_sizeofexpression_type(), make_syntax_sizeofexpression(), and normalized_undefined.

Referenced by get_sizeofexpression_for_region().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeTernaryCall()

expression MakeTernaryCall ( entity  f,
expression  e1,
expression  e2,
expression  e3 
)

Creates a call expression to a function with 3 arguments.

Parameters
fis the function entity to call
e1is the first argument expression given to the function to call
e2is the second argument expression given to the function to call
e3is the second argument expression given to the function to call
Parameters
e11
e22
e33

Definition at line 367 of file expression.c.

370  {
371  return make_call_expression(f,
372  CONS(EXPRESSION, e1,
373  CONS(EXPRESSION, e2,
374  CONS(EXPRESSION, e3,
375  NIL))));
376 }

References CONS, EXPRESSION, f(), make_call_expression(), and NIL.

Referenced by expr_compute_local_index(), make_max_expression(), make_min_expression(), and make_phi_assign_instruction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeTypeArray()

type MakeTypeArray ( basic  b,
cons ld 
)

functions on types

Parameters
ldd

Definition at line 162 of file type.c.

163 {
164  return(make_type(is_type_variable, make_variable(b, ld,NIL)));
165 }

References is_type_variable, make_type(), make_variable(), and NIL.

Referenced by CreateLogicalUnits(), MakeAnyScalarParameter(), MakeAnyScalarResult(), MakeCharacterParameter(), MakeCharacterResult(), and MakeVoidPointerResult().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeTypeOverloaded()

type MakeTypeOverloaded ( void  )

Definition at line 107 of file type.c.

108 {
110 }
type MakeTypeVariable(basic b, cons *ld)
BEGIN_EOLE.
Definition: type.c:116

References make_basic_overloaded(), MakeTypeVariable(), and NIL.

Referenced by create_scalar_stub_sink_cell(), and type_to_array_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeTypeStatement()

type MakeTypeStatement ( void  )

Definition at line 92 of file type.c.

93 {
95 }
@ is_type_statement
Definition: ri.h:2898

References is_type_statement, make_type(), and NIL.

Referenced by bootstrap(), make_label(), MakeCLabel(), and MakeLabel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeTypeUnknown()

type MakeTypeUnknown ( void  )

Definition at line 97 of file type.c.

98 {
99  return(make_type(is_type_unknown, NIL));
100 }
@ is_type_unknown
Definition: ri.h:2903

References is_type_unknown, make_type(), and NIL.

Referenced by gfc2pips_symbol2type(), max_type(), and opgen_may_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeTypeVariable()

◆ MakeTypeVoid()

type MakeTypeVoid ( void  )

Definition at line 102 of file type.c.

103 {
104  return(make_type(is_type_void, NIL));
105 }

References is_type_void, make_type(), and NIL.

Referenced by MakeCallInst().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeUnaryCall()

expression MakeUnaryCall ( entity  f,
expression  a 
)

Creates a call expression to a function with one argument.

Parameters
fis the function entity to call
ais the argument expression given to the function to call

Definition at line 342 of file expression.c.

343 {
344  return make_call_expression(f, CONS(EXPRESSION, a, NIL));
345 }

References CONS, EXPRESSION, f(), make_call_expression(), and NIL.

Referenced by binary_arithmetic_operator_to_post_pv(), binary_intrinsic_call_to_points_to_sinks(), call_STEP_subroutine3(), compute_final_index_value(), dag_normalize(), dereference_expression(), dimensions_to_dma(), do_array_to_pointer_walk_expression(), do_linearize_array_manage_callers(), do_outliner_smart_replacment(), do_terapix_argument_handler(), ecrit_une_var_neg(), expr_compute_local_index(), generate_compact(), generate_monome(), get_expression_addr(), heap_intrinsic_to_post_pv(), if_conv_init_statement(), incrementation_expression_to_increment(), initialization_list_to_statements(), inline_expression_call(), int_to_expression(), intrinsic_call_to_points_to(), make_address_of_expression(), make_op_exp(), make_substitution(), MakeArithmIfInst(), MakeFortranUnaryCall(), normalize_microcode(), normalize_test_leaves(), outliner_patch_parameters(), outliner_smart_references_computation(), rational_op_exp(), recover_structured_while(), regenerate_expression(), region_to_address(), replace_reductions_in_statement(), scalopify(), simplify_complex_expression(), st_make_nice_test(), static_controlize_statement(), string_to_expression(), translate_to_module_frame(), and update_range().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeUnsignedIntegerParameter()

parameter MakeUnsignedIntegerParameter ( void  )

Definition at line 194 of file type.c.

References DEFAULT_INTEGER_TYPE_SIZE, DEFAULT_UNSIGNED_TYPE_SIZE, is_basic_int, and MakeAnyScalarParameter().

Referenced by unsigned_integer_to_void_pointer_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeUnsignedIntegerResult()

type MakeUnsignedIntegerResult ( void  )

Definition at line 265 of file type.c.

References DEFAULT_INTEGER_TYPE_SIZE, DEFAULT_UNSIGNED_TYPE_SIZE, is_basic_int, and MakeAnyScalarResult().

+ Here is the call graph for this function:

◆ MakeValueSymbolic()

value MakeValueSymbolic ( expression  e)

this function creates a value for a symbolic constant.

the expression e must be evaluable. Well, it does not seem necessary any more...

pips_internal_error("value of parameter must be constant");

s = make_symbolic(e, make_constant(is_constant_unknown, UU));

Definition at line 581 of file constant.c.

582 {
583  symbolic s;
584  value v;
585 
586  if (value_unknown_p(v = EvalExpression(e))) {
587  /* pips_internal_error("value of parameter must be constant"); */
588  free_value(v);
590  /* s = make_symbolic(e, make_constant(is_constant_unknown, UU)); */
591  }
592  else {
593  pips_assert("v is a constant value", value_constant_p(v));
594 
595  s = make_symbolic(e, value_constant(v));
596 
598  free_value(v);
599  }
600 
601  return make_value(is_value_symbolic, s);
602 }
symbolic make_symbolic(expression a1, constant a2)
Definition: ri.c:2369
constant make_constant_unknown(void)
Definition: ri.c:424
#define value_unknown_p(x)
Definition: ri.h:3077

References constant_undefined, EvalExpression(), free_value(), is_value_symbolic, make_constant_unknown(), make_symbolic(), make_value(), pips_assert, value_constant, value_constant_p, and value_unknown_p.

Referenced by gfc2pips_vars_(), and MakeParameter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeVoidPointerParameter()

parameter MakeVoidPointerParameter ( void  )

Definition at line 178 of file type.c.

179 {
182 }

References make_dummy_unknown(), make_mode_value(), make_parameter(), make_type_void(), NIL, and type_to_pointer_type().

+ Here is the call graph for this function:

◆ MakeVoidPointerResult()

type MakeVoidPointerResult ( void  )

Definition at line 271 of file type.c.

272 {
274 }

References make_basic_pointer(), make_type_void(), MakeTypeArray(), and NIL.

Referenced by unsigned_integer_to_void_pointer_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ malloc_effect_entity_p()

bool malloc_effect_entity_p ( entity  e)

Definition at line 1158 of file entity.c.

1159 {
1161  return (same_entity_p(e, malloc_effect_ent));
1162 
1163 }
static entity malloc_effect_ent
Definition: entity.c:53

References malloc_effect_ent, same_entity_p(), and set_internal_static_entities().

Referenced by effects_package_entity_p(), malloc_cell_p(), malloc_effect_p(), and malloc_reference_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ max0_expression_p()

bool max0_expression_p ( expression  e)

Definition at line 1061 of file expression.c.

1063 {
1066 }

References MAX0_OPERATOR_NAME, MAX_OPERATOR_NAME, and operator_expression_p().

+ Here is the call graph for this function:

◆ maximal_type_depth()

size_t maximal_type_depth ( type  t)

Number of steps to access the lowest leave of type t without a recursive test.

Number of dimensions for an array. One for a struct or an union field, plus its own dimension(s). Recursive data structures do not end up with MAX_INT as type depth. So

A pointer to a scalar may be a pointer to an array, unless property POINTS_TO_STRICT_POINTER_TYPES is set to true.

The name of the function should be non_recursive_maximal_type_depth(). It returns the maximum number of subscript expressions usable in a points-to cell reference.

Concrete types are not used. The depth of named types is supposedly calculated.

Definition at line 4856 of file type.c.

4857 {
4858  set vt = set_make(set_pointer);
4859  int depth = generic_type_depth(t, vt);
4860  set_free(vt);
4861  return depth;
4862 }
static size_t generic_type_depth(type t, set vt)
Definition: type.c:4794
static int depth
la sequence de nids

References depth, generic_type_depth(), set_free(), set_make(), and set_pointer.

Referenced by xml_Type_Entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ member_entity_p()

bool member_entity_p ( entity  e)

Its name must contain the MEMBER_PREFIX after the MODULE_SEP_STRING

Definition at line 1921 of file entity.c.

1922 {
1923  /* Its name must contain the MEMBER_PREFIX after the MODULE_SEP_STRING */
1924  string en = entity_name(e);
1925  string ms = strchr(en, MODULE_SEP);
1926  bool is_member = false;
1927 
1928  if(ms!=NULL)
1929  is_member = (strchr(ms, MEMBER_SEP_CHAR)!=NULL);
1930 
1931  return is_member;
1932 }

References entity_name, MEMBER_SEP_CHAR, and MODULE_SEP.

Referenced by FindOrCreateCurrentEntity(), skip_constants_intrinsics_members(), and update_unstructured_declarations().

+ Here is the caller graph for this function:

◆ memmove_effect_entity_p()

bool memmove_effect_entity_p ( entity  e)

Definition at line 1165 of file entity.c.

1165  {
1167  return (same_entity_p(e, memmove_effect_ent));
1168 }
static entity memmove_effect_ent
Definition: entity.c:54

References memmove_effect_ent, same_entity_p(), and set_internal_static_entities().

Referenced by effects_package_entity_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ min0_expression_p()

bool min0_expression_p ( expression  e)

Definition at line 1054 of file expression.c.

1056 {
1059 }

References MIN0_OPERATOR_NAME, MIN_OPERATOR_NAME, and operator_expression_p().

+ Here is the call graph for this function:

◆ mode_equal_p()

bool mode_equal_p ( mode  m1,
mode  m2 
)
Parameters
m11
m22

Definition at line 1035 of file type.c.

1036 {
1037  if(m1 == m2)
1038  return true;
1039  else if (m1 == mode_undefined && m2 != mode_undefined)
1040  return false;
1041  else if (m1 != mode_undefined && m2 == mode_undefined)
1042  return false;
1043  else
1044  return mode_tag(m1) == mode_tag(m2);
1045 }
#define mode_undefined
Definition: ri.h:1660
#define mode_tag(x)
Definition: ri.h:1693

References mode_tag, and mode_undefined.

Referenced by generic_parameter_equal_p().

+ Here is the caller graph for this function:

◆ module_all_declarations()

list module_all_declarations ( entity  m)

The function itself is not in its declarations.

Maybe, it should be changed in the parser?

A new list is allocated to avoid sharing with code_declarations.

Definition at line 419 of file module.c.

420 {
422  return dl;
423 }

References CONS, ENTITY, entity_declarations, and gen_copy_seq().

Referenced by UseFormalArguments().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ module_body_reorder()

bool module_body_reorder ( statement  body)

Reorder a module.

This recompute the ordering of a module, that is the ordering number of all the statements in the module..

Parameters
bodyis the top-level statement of the module to reorder

If a module_body_reorder() is required, ordering_to_statement must be recomputed if any. So use module_reorder() instead of the low-level module_body_reorder():

Reorder the module statements by beginning with unstructured number and statement number at 1

Parameters
bodyody

Definition at line 211 of file reorder.c.

212 {
213  /* If a module_body_reorder() is required, ordering_to_statement must be
214  recomputed if any. So use module_reorder() instead of the low-level
215  module_body_reorder(): */
216  pips_assert("ordering to statement is not initialized",
218 
219  debug_on("CONTROL_DEBUG_LEVEL");
220 
222 
223  /* Reorder the module statements by beginning with unstructured number
224  and statement number at 1 */
225  bool changed = false;
226  statement_reorder(body, get_unstructured_number(), 1, &changed);
227 
228  debug_off();
229 
230  return changed;
231 }
bool ordering_to_statement_initialized_p()
Test if the ordering to statement is initialized.
Definition: ordering.c:63
static int statement_reorder(statement st, int un, int sn, bool *changed)
Compute the statement ordering of a statement and all its components.
Definition: reorder.c:83
void reset_unstructured_number()
Reset the unstructured number for a new module reordering.
Definition: reorder.c:56
static int get_unstructured_number()
Compute the next unstructured order.
Definition: reorder.c:62

References debug_off, debug_on, get_unstructured_number(), ordering_to_statement_initialized_p(), pips_assert, reset_unstructured_number(), and statement_reorder().

Referenced by do_it(), and module_reorder().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ module_codefilename()

string module_codefilename ( entity  e)

To find resources (this should be located in workspace-util as it depends both on pipsdbm and ri-util.

Definition at line 57 of file util.c.

58 {
60 }
string string_codefilename(const char *s)
Naming of files in the PIPS database.
Definition: file_names.c:37

References entity_local_name(), and string_codefilename().

+ Here is the call graph for this function:

◆ module_entitiesfilename()

string module_entitiesfilename ( entity  e)

Definition at line 87 of file util.c.

88 {
90 }
string string_entitiesfilename(const char *s)
Definition: file_names.c:87

References entity_local_name(), and string_entitiesfilename().

+ Here is the call graph for this function:

◆ module_formal_parameters()

list module_formal_parameters ( entity  func)

list module_formal_parameters(entity func) input : an entity representing a function.

output : the ordered list (of entities) of parameters of the function "func". modifies : nothing. comment : Made from "entity_to_formal_integer_parameters()" that considers only integer variables.

Dummy parameters should have been filtered out of the declarations by the parser, but let's be careful here. As a consequence, dummy parameters cannot be retrieved, except thru the type.

Parameters
funcunc

Definition at line 327 of file module.c.

328 {
329  list formals = NIL;
330  list decl = list_undefined;
331 
332  pips_assert("func must be a module",entity_module_p(func));
333 
334  decl = code_declarations(entity_code(func));
335  FOREACH(ENTITY, e, decl)
336  {
337  /* Dummy parameters should have been filtered out of the
338  declarations by the parser, but let's be careful here. As a
339  consequence, dummy parameters cannot be retrieved, except
340  thru the type. */
344  formals = CONS(ENTITY, e, formals);
345  }
346 
347  return gen_nreverse(formals);
348 }
bool dummy_parameter_entity_p(entity p)
is p a dummy parameter?
Definition: entity.c:1941

References code_declarations, CONS, dummy_parameter_entity_p(), ENTITY, entity_code(), entity_initial, entity_module_p(), entity_storage, FOREACH, gen_nreverse(), list_undefined, NIL, pips_assert, storage_formal_p, and value_reference_p.

Referenced by inline_expression_call(), interprocedural_mapping(), module_initial_parameter_pv(), normalize_microcode_anotate(), sort_parameters(), translate_arguments(), xml_FormalVariables(), xml_ParameterUseToArrayBound(), and xml_TaskParameters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ module_fortranfilename()

string module_fortranfilename ( entity  e)

Definition at line 67 of file util.c.

68 {
70 }
string string_fortranfilename(const char *s)
Definition: file_names.c:49

References entity_local_name(), and string_fortranfilename().

+ Here is the call graph for this function:

◆ module_local_name()

const char* module_local_name ( entity  e)

Returns the module local user name.

No difference between modules and other entities, except for prefixes

Definition at line 582 of file entity.c.

583 {
584  /* No difference between modules and other entities, except for prefixes */
585  const char* name = local_name(entity_name(e));
586 
587  return (name
589 }

References BLOCKDATA_PREFIX, COMMON_PREFIX, entity_name, F95MODULE_PREFIX, local_name(), and MAIN_PREFIX.

Referenced by add_alias_pairs_for_this_caller(), add_common_variables_to_hash_table(), add_declaration_information(), add_entity_to_declarations(), add_formal_parameters_to_hash_table(), add_formal_to_actual_bindings(), add_module_call_site_precondition(), add_non_declared_reference_to_declaration(), add_symbolic_constant_to_declaration(), AddEntityToCompilationUnit(), AddEntityToModule(), AddVariableToCommon(), alias_check_two_variables(), alias_propagation_callers(), allocatable_area_p(), AnalyzeData(), argument_bound_entity(), c_convex_effects_on_actual_parameter_forward_translation(), c_data_to_prec_for_variables(), c_user_function_call_to_transformer(), call_flt(), call_site_to_module_precondition_text(), call_to_complexity(), call_to_polynome(), cell_reference_compare(), check_call_mode_consistency(), check_one_common(), check_overlap_in_common(), common_is_visible_p(), common_region_translation(), comp_regions_of_call(), comp_regions_of_instruction(), compile_a_pure_function(), compile_a_special_io_function(), complexity_sigma(), constant_entity_to_float(), constant_to_transformer(), create_init_common_param_for_arrays(), create_local_index(), create_local_index2(), create_new_common_variable(), create_parameters_h(), create_tile_basis(), declare_common_variables_in_module(), DeclareExternalFunction(), DeclareVariable(), delay_communications_init(), delay_communications_interprocedurally(), do_kernelize(), do_linearize_array_manage_callers(), do_recompile_module(), dynamic_area_p(), EndOfProcedure(), entity_more_or_less_minimal_name(), evaluate_var_to_complexity(), external_statement_identification(), external_value_name(), find_operator(), fix_storage(), float_constant_to_double(), formal_and_actual_parameters_association(), formal_area_p(), fortran_data_to_prec_for_variables(), fortran_user_call_to_transformer(), fortran_user_function_call_to_transformer(), fprint_any_environment(), generate_variable_with_unique_name_to_module(), generic_module_name_to_transformers(), generic_program_pointer_values(), GenericAddLocalEntityToDeclarations(), get_current_module_name(), get_module_precondition(), get_symbol_table(), gfc2pips_namespace(), heap_area_p(), hpfc_common_hook(), hpfc_entity_reduction_p(), hpfc_main_entity_name(), impact_check_two_variables(), in_regions_of_external(), initialize_and_verify_common_variable(), initialize_and_verify_local_variable(), inlining_regenerate_labels(), insert_check_alias_before_statement(), insert_common_declaration(), insert_flag_before_call_site(), insert_test_before_caller(), insert_test_before_statement(), instruction_to_wp65_code(), is_must_be_written_var(), kernel_load_store_generator(), language_module_p(), live_out_paths_from_caller_to_callee(), live_out_summary_paths_engine(), load_body_effects(), load_summary_effects(), load_summary_precondition(), load_summary_reductions(), load_summary_total_postcondition(), load_summary_transformer(), local_entity_of_module_p(), loop_to_complexity(), main_summary_precondition(), make_empty_module(), make_emulated_shared_variable(), make_new_array_variable_with_prefix(), make_new_derived_entity_with_prefix(), make_new_entity(), make_new_integer_scalar_common_variable(), make_new_label(), make_new_local_variables(), make_new_module_variable(), make_new_scalar_variable_with_prefix(), make_nlc_entity(), make_nsp_entity(), make_nub_entity(), make_scanning_over_one_tile(), make_scanning_over_tiles(), MakeCurrentFunction(), MakeEntry(), MakeEntryCommon(), MakeEquivAtom(), MakeVariableStatic(), module_entity_to_compilation_unit_entity(), module_is_called_by_main_program_p(), module_name_to_total_preconditions(), module_to_value_mappings(), module_to_wp65_modules(), mpi_make_ctx(), new_add_formal_to_actual_bindings(), new_label_local_name(), new_local_image_variable(), noms_var(), old_name(), out_regions_from_caller_to_callee(), parser_macro_expansion(), phrase_comEngine_distributor(), phrase_distributor(), phrase_distributor_control_code(), pointer_dummy_targets_area_p(), precondition_intra_to_inter(), print_call_path(), print_common_layout(), print_module_icfg(), print_program_precondition(), process_call_for_summary_precondition(), ProcessEntries(), ProcessEntry(), program_points_to(), program_postcondition(), program_precondition(), put_generated_resources_for_common(), put_generated_resources_for_module(), pvecteur_to_polynome(), reduction_parameters(), reference_to_complexity(), reference_to_polynome(), regions_of_external(), relation_to_transformer(), remove_common_variables_from_hash_table(), remove_formal_parameters_from_hash_table(), remove_from_called_modules(), RemoveEntityFromCompilationUnit(), replace_indices_region(), replace_indices_region_com(), retype_formal_parameters(), safescale_distributor(), sc_add_new_variable_name(), sentence_area(), sentence_data_statement(), set_control_to_label(), set_current_function(), set_resources_for_module(), simplify_sc_to_complexity(), stack_area_p(), statement_identification(), statement_to_complexity(), static_area_p(), string_to_entity(), stub_head(), substitute_ghost_variable_in_expression(), text_area_included(), text_complexity(), text_summary_complexity(), Tiling_buffer_allocation(), transformer_add_call_condition_information_updown(), translate_global_value(), translate_to_module_frame(), TranslateEntryFormals(), unique_entity_name_p(), update_common_layout(), update_common_sizes(), update_functional_type_with_actual_arguments(), update_precondition_with_call_site_preconditions(), update_summary_precondition(), update_user_common_layouts(), UpdateFunctionalType(), user_call_to_points_to_fast_interprocedural(), user_call_to_points_to_interprocedural(), user_call_to_points_to_interprocedural_binding_set(), variable_in_module_p(), variable_in_module_p2(), verify_used_before_set_expression(), verify_used_before_set_statement_flt(), and wrap_call_argument().

+ Here is the call graph for this function:

◆ module_name_to_entity()

entity module_name_to_entity ( const char *  mn)

This is an alias for local_name_to_top_level_entity.

Returns
the entity if found, else entity_undefined
Parameters
mnn

Definition at line 1479 of file entity.c.

1479  {
1480  return local_name_to_top_level_entity(mn);
1481 }

References local_name_to_top_level_entity().

Referenced by actual_symbol_table_dump(), add_control_counters(), add_new_module_from_text(), any_complexities(), array_expansion(), bdsc_code_instrumentation(), build_new_top_level_module_name(), clean_declarations(), clean_labels(), clear_pragma(), clone_variable_with_new_name(), common_region_translation(), compilation_unit_of_module(), computation_intensity(), compute_distribution_controlization_context(), controlize_distribution(), controlizer(), copy_value_of_write(), copy_value_of_write_with_cumulated_regions(), create_HRE_module(), create_state_variable(), create_stub_entity(), deatomizer(), delay_communications(), delay_communications_interprocedurally(), delay_load_communications(), delay_store_communications(), dimensions_to_dma(), do_gpu_qualify_pointers(), do_inlining(), dowhile_to_while(), dprint(), dsc_code_parallelization(), eliminate_original_variables(), entity_to_callees(), entity_to_module_entity(), expression_substitution(), fetch_callees_complexities(), flag_loops(), flatten_code(), for_loop_to_do_loop(), for_loop_to_while_loop(), formal_array_resizing_bottom_up(), freia_compiler(), freia_remove_scalar_ww_deps(), freia_unroll_while(), fsm_generation(), fsm_merge_states(), fsm_split_state(), full_fsm_generation(), full_spaghettify(), full_unroll(), full_unroll_pragma(), gen_multi_recurse_explorer(), generate_two_addresses_code(), generic_make_entity_copy_with_new_name(), generic_module_initial_pointer_values(), generic_module_name_to_transformers(), generic_module_pointer_values(), generic_points_to_analysis(), generic_print_code_pv(), generic_print_xml_application(), generic_program_pointer_values(), get_loop_execution_parallel(), get_module_language(), get_semantic_text(), get_text_complexities(), gpu_qualify_pointers(), gpu_xml_dump(), group_constants(), hbdsc_parallelization(), hpfc_compile(), hpfc_directives_handler(), html_prettyprint(), if_conversion(), if_conversion_compact(), if_conversion_init(), init_convex_in_out_regions(), init_convex_rw_regions(), init_convex_summary_in_out_regions(), init_convex_summary_rw_regions(), init_points_to_analysis(), initial_points_to(), initial_precondition(), inline_calls(), inline_expression_call(), interactive_loop_transformation(), isolate_statement(), kernel_load_store_engine(), kernelize(), linearize_array_generic(), live_in_summary_paths_engine(), live_out_region_engine(), live_out_summary_paths_engine(), live_paths_engine(), loop_auto_unroll(), loop_expansion(), loop_expansion_init(), loop_nest_unswitching(), loop_pragma(), make_dma_transfert(), make_location_entity(), make_new_index_entity(), make_scalar_entity(), MakeRunTimeSupportSubroutine(), module_is_called_by_main_program_p(), module_loops(), module_name_to_input_file_name(), module_name_to_preconditions(), module_name_to_runtime_entity(), module_name_to_total_preconditions(), module_to_value_mappings(), mpi_conversion(), mpi_task_generation(), new_atomizer(), new_controlizer(), normalize_microcode(), omp_loop_parallel_threshold_set(), omp_merge_pragma(), one_thread_parallelize(), openmp_task_generation(), ordinary_summary_precondition(), outline(), outliner_independent(), outliner_independent_recursively(), outliner_scan(), phrase_comEngine_distributor(), phrase_distributor(), phrase_distributor_control_code(), phrase_distributor_init(), phrase_remove_dependences(), print_code_or_source(), print_code_or_source_comp(), print_code_semantics(), print_code_smalltalk(), print_crough(), print_decorated_call_graph(), print_initial_precondition(), print_interface(), print_loops(), print_or_dump_points_to(), print_parallelized_code_common(), print_points_to_cells(), print_program_precondition(), print_xml_code(), print_xml_code_with_explicit_motif(), program_points_to(), program_postcondition(), program_precondition(), recompile_module(), reduction_atomization(), reduction_detection(), reduction_propagation(), redundant_load_store_elimination(), remove_simple_scalar_pointers(), rename_operator(), run_inlining(), safescale_distributor(), safescale_distributor_init(), safescale_module_analysis(), scalar_renaming(), sequence_dependence_graph(), sesamify(), set_loop_execution_parallel(), simd_atomizer(), simd_memory_packing(), simd_remove_reductions(), simdizer(), simdizer_auto_tile(), simdizer_auto_unroll(), simdizer_init(), simplify_complex(), simplify_constant_address_expressions(), simplify_subscripts(), solve_hardware_constraints(), spire_distributed_unstructured_to_structured(), spire_shared_unstructured_to_structured(), split_initializations(), split_structures(), split_update_operator(), statement_insertion(), statement_insertion_fix_access_in_callers(), static_controlize(), step_compile_generated_module(), strip_mine(), summary_precondition(), summary_total_postcondition(), symbolic_tiling(), task_mapping(), terapix_remove_divide(), terapix_warmup(), type_checker(), unroll(), update_referenced_entities(), variable_replication(), wp65(), wrap_kernel_argument(), xml_Application(), xml_Boxes(), and xml_Task().

+ Here is the call graph for this function:

◆ module_name_to_runtime_entity()

entity module_name_to_runtime_entity ( const char *  name)

similar to module_name_to_entity but generates a warning and a stub if the entity is not found

Parameters
nameame

Definition at line 1485 of file entity.c.

1486 {
1487  entity e = module_name_to_entity(name);
1488  if ( entity_undefined_p( e ) )
1489  {
1490  pips_user_warning("entity %s not defined, pips is likely to crash soon\n"
1491  "Please feed pips with its definition and source\n",name);
1493  }
1494 
1495  return e;
1496 }
language copy_language(language p)
LANGUAGE.
Definition: ri.c:1202
#define module_language(e)
implemented as a macro to allow lhs
entity make_empty_subroutine(const char *name, language l)
Definition: entity.c:268

References copy_language(), entity_undefined_p, get_current_module_entity(), make_empty_subroutine(), module_language, module_name_to_entity(), and pips_user_warning.

Referenced by comEngine_generate_procCode(), generate_fifo_stat(), make_exec_mmcd(), make_exec_statement_from_name(), make_mmcd_load_store_stat(), make_phi_assign_instruction(), make_read_write_fifo_stat(), make_shuffle_statement(), and make_wait_step_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ module_par_codefilename()

string module_par_codefilename ( entity  e)

Definition at line 62 of file util.c.

63 {
65 }
string string_par_codefilename(const char *s)
Definition: file_names.c:43

References entity_local_name(), and string_par_codefilename().

+ Here is the call graph for this function:

◆ module_par_fortranfilename()

string module_par_fortranfilename ( entity  e)

Definition at line 72 of file util.c.

73 {
75 }
string string_par_fortranfilename(const char *s)
Definition: file_names.c:69

References entity_local_name(), and string_par_fortranfilename().

+ Here is the call graph for this function:

◆ module_pp_fortranfilename()

string module_pp_fortranfilename ( entity  e)

Definition at line 77 of file util.c.

78 {
80 }
string string_pp_fortranfilename(const char *s)
Definition: file_names.c:75

References entity_local_name(), and string_pp_fortranfilename().

+ Here is the call graph for this function:

◆ module_predicat_fortranfilename()

string module_predicat_fortranfilename ( entity  e)

Definition at line 82 of file util.c.

83 {
85 }
string string_predicat_fortranfilename(const char *s)
Definition: file_names.c:81

References entity_local_name(), and string_predicat_fortranfilename().

+ Here is the call graph for this function:

◆ module_reorder()

bool module_reorder ( statement  body)

Reorder a module and recompute order to statement if any.

This recompute the ordering of a module, that is the ordering number of all the statements in the module..

If there is also already a mapping from the ordering to the statements, it is reset and recompute after reordering.

Parameters
bodyis the top-level statement of the module to reorder

There was a mapping to associate a statement to a given ordering, so clean it:

There was a mapping to associate a statement to a given ordering, so we recompute it:

FI: I'd rather use set_ordering_to_statement() so that reset are properly called and no outdated ots hash table remains for ever in the background, but I do not want to break PIPS right now.

How do you know ordering to statement to be useful in the future?

May be, we are going to work on a different module very soon..

Parameters
bodyody

Definition at line 244 of file reorder.c.

245 {
246  bool ordering_mapping_used = ordering_to_statement_initialized_p();
247  if(ordering_mapping_used)
248  /* There was a mapping to associate a statement to a given ordering,
249  so clean it: */
251 
252  bool changed = module_body_reorder(body);
253 
254  if (ordering_mapping_used) {
255  /* There was a mapping to associate a statement to a given ordering,
256  so we recompute it: */
258  /* FI: I'd rather use set_ordering_to_statement() so that reset are
259  properly called and no outdated ots hash table remains for ever in
260  the background, but I do not want to break PIPS right now.
261 
262  How do you know ordering to statement to be useful in the future?
263 
264  May be, we are going to work on a different module very soon..
265  */
266  }
267 
268  return changed;
269 }
hash_table set_ordering_to_statement(statement s)
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 reset_ordering_to_statement(void)
Reset the mapping from ordering to statement.
Definition: ordering.c:185
bool module_body_reorder(statement body)
Reorder a module.
Definition: reorder.c:211

References module_body_reorder(), ordering_to_statement_initialized_p(), reset_ordering_to_statement(), and set_ordering_to_statement().

Referenced by add_control_counters(), AddEntityToCompilationUnit(), array_bound_check_bottom_up(), array_bound_check_interprocedural(), array_bound_check_top_down(), array_expansion(), atomizer(), bdsc_code_instrumentation(), controlizer(), copy_value_of_write(), copy_value_of_write_with_cumulated_regions(), deatomizer(), delay_communications(), delay_communications_interprocedurally(), delay_load_communications(), delay_store_communications(), do_kernelize(), dowhile_to_while(), dsc_code_parallelization(), eliminate_original_variables(), expression_substitution(), flatten_code(), for_loop_to_do_loop(), for_loop_to_while_loop(), freia_unroll_while(), fsm_generation(), fsm_merge_states(), fsm_split_state(), full_fsm_generation(), full_spaghettify(), full_unroll(), full_unroll_pragma(), generate_starpu_pragma(), generate_two_addresses_code(), global_parallelization(), gpu_promote_sequential(), group_constants(), guard_elimination(), if_conversion(), if_conversion_compact(), if_conversion_init(), interactive_loop_transformation(), invariant_code_motion(), isolate_statement(), kernel_load_store_engine(), kernelize(), linearize_array_generic(), loop_auto_unroll(), loop_expansion(), loop_expansion_init(), loop_nest_unswitching(), module_to_wp65_modules(), mpi_conversion(), mpi_task_generation(), new_atomizer(), new_controlizer(), normalize_microcode(), old_array_bound_check_instrumentation(), old_reductions(), one_thread_parallelize(), openmp_task_generation(), optimize_expressions(), outline(), partial_eval(), phrase_comEngine_distributor(), phrase_distributor(), phrase_distributor_control_code(), phrase_distributor_init(), phrase_remove_dependences(), reduction_atomization(), reduction_detection(), reduction_propagation(), redundant_load_store_elimination(), regions_to_loops(), RemoveEntityFromCompilationUnit(), restructure_control(), safescale_distributor(), safescale_distributor_init(), scalar_renaming(), sesamify(), simd_atomizer(), simd_remove_reductions(), simdizer(), simdizer_auto_tile(), simdizer_auto_unroll(), simdizer_init(), simplify_complex(), simplify_subscripts(), solve_hardware_constraints(), spaghettify(), spire_distributed_unstructured_to_structured(), spire_shared_unstructured_to_structured(), split_initializations(), split_structures(), statement_insertion(), static_controlize(), step_parser(), strip_mine(), symbolic_tiling(), taskify(), terapix_warmup(), tiling_sequence(), unroll(), unspaghettify(), variable_replication(), and wrap_kernel_argument().

+ Here is the call graph for this function:

◆ module_resource_name()

const char* module_resource_name ( entity  e)

Returns a pointer towards the resource name.

The resource name is the module local name: it may include the

Definition at line 593 of file entity.c.

594 {
595  const char* rn = entity_local_name(e);
596 
598 
599  return rn;
600 }

References BLOCKDATA_PREFIX, COMMON_PREFIX, entity_local_name(), F95MODULE_PREFIX, and MAIN_PREFIX.

Referenced by callgraph_module_name(), and module_to_callgraph().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ module_to_declaration_length()

int module_to_declaration_length ( entity  func)

Number of user declaration lines for a module.

Is it allowed? The declaration text may be destroyed or may not exist when a module is synthesized or heavily transformed.

Entity func has not been parsed yet

Parameters
funcunc

Definition at line 352 of file module.c.

353 {
354  value v = entity_initial(func);
355  code c = code_undefined;
356  int length = 0;
357 
358  if(!value_undefined_p(v)) {
359  if(value_code_p(v)) {
360  string s = string_undefined;
361 
362  c = value_code(v);
363  s = code_decls_text(c);
364  if(string_undefined_p(s)) {
365  /* Is it allowed? The declaration text may be destroyed or
366  * may not exist when a module is synthesized or heavily
367  * transformed.
368  */
369  length = 0;
370  }
371  else {
372  char l;
373  while((l=*s++)!= '\0')
374  if(l=='\n')
375  length++;
376  }
377  }
378  else {
379  pips_internal_error("Entity %s is not a module",
380  entity_name(func));
381  }
382  }
383  else {
384  /* Entity func has not been parsed yet */
385  length = -1;
386  }
387 
388  return length;
389 }
#define string_undefined_p(s)
Definition: newgen_types.h:41
#define code_undefined
Definition: ri.h:757

References code_decls_text, code_undefined, entity_initial, entity_name, pips_internal_error, string_undefined, string_undefined_p, value_code, value_code_p, and value_undefined_p.

Referenced by make_filtered_dg_or_dvdg(), and prettyprint_dependence_graph().

+ Here is the caller graph for this function:

◆ module_to_dynamic_area()

entity module_to_dynamic_area ( entity  f)

Definition at line 139 of file area.c.

140 {
142 
143  pips_assert("The dynamic area is defined for module f.\n",
144  !entity_undefined_p(a));
145 
146  return a;
147 }

References DYNAMIC_AREA_LOCAL_NAME, entity_local_name(), entity_undefined_p, f(), FindEntity(), and pips_assert.

+ Here is the call graph for this function:

◆ module_to_heap_area()

entity module_to_heap_area ( entity  f)

Returns the heap area "a" associated to module "f".

Area "a" is always a defined entity.

Assumes that f is defined, as well as its heap area.

Definition at line 129 of file area.c.

130 {
132 
133  pips_assert("The heap area is defined for module f.\n",
134  !entity_undefined_p(a));
135 
136  return a;
137 }

References entity_local_name(), entity_undefined_p, f(), FindEntity(), HEAP_AREA_LOCAL_NAME, and pips_assert.

Referenced by entity_flow_or_context_sentitive_heap_location().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ modulo_expression_p()

bool modulo_expression_p ( expression  e)

Definition at line 1006 of file expression.c.

1008 {
1010 }

References MODULO_OPERATOR_NAME, and operator_expression_p().

+ Here is the call graph for this function:

◆ monome_to_expression()

expression monome_to_expression ( Pmonome  pm)

converts a monome to an expression

Parameters
pmm

Definition at line 3589 of file expression.c.

3590 {
3591  if (MONOME_UNDEFINED_P(pm))
3592  return expression_undefined;
3593  else {
3594  expression coeff;
3595  float x= monome_coeff(pm);
3596  if(x == (int)x)
3597  coeff = (x==1.f)? expression_undefined:int_to_expression((int)x);
3598  else
3599  coeff = float_to_expression(x);
3601  for(Pvecteur v = monome_term(pm);!VECTEUR_NUL_P(v);v=vecteur_succ(v)) {
3602  Value exp = vecteur_val(v);
3603  Variable var = vecteur_var(v);
3604  expression tmp ;
3605  if(exp==0||var==TCST) tmp = int_to_expression(1);
3606  else {
3607  Value val = exp>0 ? exp: -exp;
3608  tmp = entity_to_expression((entity)var);
3609  while(--val)
3611  if(exp<0)
3613  }
3615  }
3616  return expression_undefined_p(coeff)?term:
3618  }
3619 }
static void term(Pproblem XX, int s, Value k, int x)
Definition: isolve.c:315
#define monome_term(pm)
#define MONOME_UNDEFINED_P(pm)
#define monome_coeff(pm)
Macros definitions.
static char * x
Definition: split_file.c:159

References DIVIDE_OPERATOR_NAME, entity_to_expression(), exp, expression_undefined, expression_undefined_p, float_to_expression(), int_to_expression(), make_op_exp(), monome_coeff, monome_term, MONOME_UNDEFINED_P, MULTIPLY_OPERATOR_NAME, TCST, term(), VECTEUR_NUL_P, vecteur_succ, vecteur_val, vecteur_var, and x.

Referenced by polynome_to_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ negative_expression_p()

bool negative_expression_p ( expression  e)

Use constants and type information to decide if the value of sigma(e) is always negative, e.g.

<=0. If this can be proven, true is returned.

false is returned when no decision can be made, i.e. negative_expression_p(e)==false does not imply positive_expression_p(e)

Similar and linked to previous function

We assume an operator is used

We can check a few cases recursively...

Definition at line 896 of file eval.c.

897 {
898  bool negative_p = false; // In general, false because no conclusion can be reached
899  intptr_t v;
900  if(expression_integer_value(e, &v)) {
901  negative_p = v<=0;
902  }
903  else {
904  syntax s = expression_syntax(e);
905 
906  if(syntax_call_p(s)) {
907  call c = syntax_call(s);
908  entity f = call_function(c);
909  type t = entity_type(f);
910  pips_assert("t is a functional type", type_functional_p(t));
912  if(overloaded_type_p(rt)) { /* We assume an operator is used */
913  /* We can check a few cases recursively... */
914  list args = call_arguments(c);
915  intptr_t l = gen_length(args);
916  if(l==1) {
917  expression arg = EXPRESSION(CAR(args));
918  if(ENTITY_UNARY_MINUS_P(f)) {
919  negative_p = positive_expression_p(arg); // Maybe zero, but no chance for sigma(x)>0
920  }
921  }
922  else if(l==2) {
923  expression arg1 = EXPRESSION(CAR(args));
924  expression arg2 = EXPRESSION(CAR(CDR(args)));
925  if(ENTITY_MINUS_P(f)) {
926  negative_p = negative_expression_p(arg1) && positive_expression_p(arg2);
927  }
928  else if(ENTITY_PLUS_P(f)) {
929  negative_p = negative_expression_p(arg1) && negative_expression_p(arg2);
930  }
931  else if(ENTITY_MULTIPLY_P(f)) {
932  negative_p = (negative_expression_p(arg1) && positive_expression_p(arg2))
933  || (positive_expression_p(arg1) && negative_expression_p(arg2));
934  }
935  else if(ENTITY_DIVIDE_P(f)) {
936  negative_p = (negative_expression_p(arg1) && positive_expression_p(arg2))
937  || (positive_expression_p(arg1) && negative_expression_p(arg2));
938  }
939  }
940  }
941  }
942  }
943  return negative_p;
944 }
bool positive_expression_p(expression e)
Use constants and type information to decide if the value of sigma(e) is always positive,...
Definition: eval.c:826
bool negative_expression_p(expression e)
Use constants and type information to decide if the value of sigma(e) is always negative,...
Definition: eval.c:896

References call_arguments, call_function, CAR, CDR, ENTITY_DIVIDE_P, ENTITY_MINUS_P, ENTITY_MULTIPLY_P, ENTITY_PLUS_P, entity_type, ENTITY_UNARY_MINUS_P, EXPRESSION, expression_integer_value(), expression_syntax, f(), functional_result, gen_length(), intptr_t, overloaded_type_p(), pips_assert, positive_expression_p(), syntax_call, syntax_call_p, type_functional, and type_functional_p.

Referenced by add_index_range_conditions(), C_loop_range(), incrementation_expression_to_increment(), and positive_expression_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ new_add_any_variable_to_area()

int new_add_any_variable_to_area ( entity  a,
entity  v,
bool  is_fortran_p 
)

COMMONs are supposed to havethe same layout in each routine

the local areas are StaticArea and DynamicArea in fortran

the areas are localStaticArea, localDynamicArea, moduleStaticArea, globalStaticArea in C

FI: should only happens with stack_area_p(a)...

C language

By definition of the stack area, the offset is unknown because the size of the cariables is unknown statically. E.g. dependent types. This may happen in C99 or in Fortran 77 extensions.

FI: the points-to analysis is going to modify the symbol table under some properties... Maybe it would be better not to track buckets and abstract buckets declared in the heap?

Parameters
is_fortran_ps_fortran_p

Definition at line 1436 of file variable.c.

1437 {
1438  int OldOffset=-1;
1439  type ta = entity_type(a);
1440  area aa = type_area(ta);
1441 
1442  if(top_level_entity_p(a) && is_fortran_p ) {
1443  /* COMMONs are supposed to havethe same layout in each routine */
1444  pips_internal_error("COMMONs should not be modified.");
1445  }
1446  else if(static_area_p(a) || dynamic_area_p(a)) {
1447  /* the local areas are StaticArea and DynamicArea in fortran */
1448  /* the areas are localStaticArea, localDynamicArea,
1449  moduleStaticArea, globalStaticArea in C*/
1450  int s = 0;
1451  OldOffset = area_size(aa);
1452  if(!SizeOfArray(v, &s)) {
1453  /* FI: should only happens with stack_area_p(a)... */
1454  return DYNAMIC_RAM_OFFSET;
1455  }
1456 
1457  if(is_fortran_p) {
1458  area_layout(aa) = gen_nconc(area_layout(aa), CONS(ENTITY, v, NIL));
1459  area_size(aa) = OldOffset+s;
1460  }
1461  else { /* C language */
1462  if(!gen_in_list_p(v, area_layout(aa)))
1463  area_layout(aa) = gen_nconc(area_layout(aa), CONS(ENTITY, v, NIL));
1464  area_size(aa) = OldOffset+s;
1465  }
1466  }
1467  else if(stack_area_p(a)) {
1468  /* By definition of the stack area, the offset is unknown because
1469  the size of the cariables is unknown statically. E.g. dependent
1470  types. This may happen in C99 or in Fortran 77 extensions. */
1471  if(!gen_in_list_p(v, area_layout(aa)))
1472  area_layout(aa) = gen_nconc(area_layout(aa), CONS(ENTITY, v, NIL));
1473  }
1474  else if(heap_area_p(a)) {
1475  /* FI: the points-to analysis is going to modify the symbol table
1476  under some properties... Maybe it would be better not to track
1477  buckets and abstract buckets declared in the heap? */
1478  pips_assert("Not possible for Fortran code", !is_fortran_p);
1479  if(!gen_in_list_p(v, area_layout(aa)))
1480  area_layout(aa) = gen_nconc(area_layout(aa), CONS(ENTITY, v, NIL));
1481  }
1482  else {
1483  pips_internal_error("Unexpected area kind: \"%s\".",
1484  entity_name(a));
1485  }
1486  return(OldOffset);
1487 }

References area_layout, area_size, CONS, dynamic_area_p(), DYNAMIC_RAM_OFFSET, ENTITY, entity_name, entity_type, gen_in_list_p(), gen_nconc(), heap_area_p(), NIL, pips_assert, pips_internal_error, SizeOfArray(), stack_area_p(), static_area_p(), top_level_entity_p(), and type_area.

+ Here is the call graph for this function:

◆ new_label_local_name()

char* new_label_local_name ( entity  module)

loop

Parameters
moduleodule

Definition at line 326 of file entity.c.

327 {
328  string local_name;
329  const char *module_name ;
330  const char * format;
331 
332  pips_assert( "module != 0", module != 0 ) ;
333 
334  if( module == entity_undefined ) {
336  format = "%d";
337  }
338  else {
340  format = c_module_p(module)?LABEL_PREFIX "l%d":LABEL_PREFIX "%d";
341  }
342  --init;
343  for(asprintf(&local_name, format, init);
345  free(local_name);
346  --init;
347  asprintf(&local_name, format, init);
348  /* loop */
349  }
350  if(init == 0) {
351  pips_internal_error("no more available labels");
352  }
353  return local_name;
354 }
static int init
Maximal value set for Fortran 77.
Definition: entity.c:320

References asprintf, c_module_p(), entity_undefined, entity_undefined_p, FindEntity(), free(), GENERATED_LABEL_MODULE_NAME, init, LABEL_PREFIX, local_name(), module, module_local_name(), module_name(), pips_assert, and pips_internal_error.

Referenced by make_new_label(), set_control_to_label(), and text_io_block_if().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ normalize_all_expressions_of()

void normalize_all_expressions_of ( void *  obj)
Parameters
objbj

Definition at line 668 of file normalize.c.

669 {
671  NULL);
672 }
void gen_multi_recurse(void *o,...)
Multi recursion visitor function.
Definition: genClib.c:3428
static void norm_all_rewrite(expression e)
Look for affine expressions and encode them as vectors when possible.
Definition: normalize.c:635

References expression_domain, gen_multi_recurse(), gen_true(), and norm_all_rewrite().

Referenced by array_overflow(), atom_cse_expression(), atomize_this_expression(), call_rwt(), free_guards(), handle_align_and_realign_directive(), handle_distribute_and_redistribute_directive(), loop_flt(), normalize_wp65_code(), NormalizeCodeForHpfc(), and simd_atomize_this_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ normalize_first_expressions_of()

void normalize_first_expressions_of ( void *  obj)
Parameters
objbj

Definition at line 694 of file normalize.c.

695 {
696  gen_multi_recurse(obj,
699  gen_null,
700  NULL);
701 }
static bool normalize_first_expressions_filter(expression e)
Definition: normalize.c:679

References expression_domain, gen_multi_recurse(), gen_null(), and normalize_first_expressions_filter().

Referenced by normalize_align(), normalize_distribute(), and normalize_hpf_object().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ normalize_integer_constant_expression()

expression normalize_integer_constant_expression ( expression  e)

Allocate a new expression equivalent to e, but constant expressions are evaluated.

This function is used to normalize array dimensions to obtain type equality for a[2] and a[4/2].

Definition at line 1112 of file eval.c.

1113 {
1115  intptr_t i;
1116  if(expression_integer_value(e, &i)) {
1117  ne = int_to_expression((int) i);
1118  }
1119  else
1120  ne = copy_expression(e);
1121  return ne;
1122 }

References copy_expression(), expression_integer_value(), expression_undefined, int_to_expression(), and intptr_t.

Referenced by dimensions_to_normalized_dimensions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ normalize_reference()

normalized normalize_reference ( reference  r)

Definition at line 592 of file normalize.c.

593 {
594  entity var = reference_variable(r);
595 
596  pips_assert("The entity var is a variable", entity_variable_p(var));
597 
598  return(entity_integer_scalar_p(var) ?
601 }
bool entity_integer_scalar_p(entity)
for variables (like I), not constants (like 1)! use integer_constant_p() for constants
Definition: variable.c:1130

References entity_integer_scalar_p(), entity_variable_p, is_normalized_complex, is_normalized_linear, make_normalized(), pips_assert, reference_variable, UU, and vect_new().

Referenced by norm_all_rewrite(), and reference_to_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ normalize_subscript_expression()

void normalize_subscript_expression ( expression  e)

Normalization of subscript in expressions.

The C parser generates no more than one index in each subscript construct:

subscript = array:expression x indices:expression* ; syntax = reference + range + call + cast + sizeofexpression

  • subscript + application + va_arg:sizeofexpression* ; expression = syntax x normalized ;

If the array expression points to a multidimensional array, the indices list should be as long as possible, compatible with the array dimension.

               e (expression)
               |
               es (syntax)
               |
              esub (subscript)
              /  \
             /    \
             a    il -> -> (indices list)
             |        \
             as        \
             |          \
            asub         \
            /  \          \
           /    \          \
          sa    sil -> -> ->

The recursive normalization function works bottom up and, when facing the pattern above, concatenate the il index list (or a sublist) to the sil list. If the il list becomes empty, e is connected directly to as and the pieces of data structure es, esub and a are removed.

gen_recurse() is used to apply the transformation on the way up in expression trees. In the C parser, the transformation is applied to a module statement and to the initialization expressions present in the declarations.

Definition at line 4407 of file expression.c.

4408 {
4409  syntax es = expression_syntax(e);
4410  if(syntax_subscript_p(es)) {
4411  subscript esub = syntax_subscript(es);
4412  expression a = subscript_array(esub);
4413  syntax as = expression_syntax(a);
4414  if(syntax_subscript_p(as)) {
4415  subscript asub = syntax_subscript(as);
4416  // FI: bad, imported from effects-util :-( We could use
4417  // expression_to_type and then convert it into a concrete type
4418  //extern type points_to_expression_to_concrete_type(expression);
4419  // type t = points_to_expression_to_concrete_type(a);
4421  // This might be wrong: a is likely to be a pointer to a sub-array
4422  // or a pointer to a scalar for 1D array.
4423  if(pointer_type_p(t) || array_type_p(t)) { // FI: should always be true for a subscript?
4424  int nm = 0;
4425  if(pointer_type_p(t)) {
4426  type et = type_to_pointed_type(t);
4427  nm = (int) array_type_dimension(et) + 1;
4428  }
4429  else
4430  nm = (int) array_type_dimension(t);
4431  //list sil = subscript_indices(asub);
4432  // int nsi = (int) gen_length(sil);
4433  // FI: the efficient way would be to cut of the il list into two
4434  // parts and to use only one call to gen_nconc()
4435  list il = subscript_indices(esub);
4436  for(int i=0;i<nm && !ENDP(il); i++) {
4437  list ni = il; // new index/subscript
4438  POP(il);
4439  CDR(ni) = NIL;
4440  subscript_indices(asub) =
4441  gen_nconc(subscript_indices(asub), ni);
4442  }
4443  if(ENDP(il)) {
4444  // The top subscript can be removed
4445  expression_syntax(e) = as;
4447  subscript_indices(esub) = NIL;
4448  free_syntax(es);
4449  }
4450  else if(il!=subscript_indices(esub)) {
4451  // Update the new index list with the remaining indices
4452  subscript_indices(esub) = il;
4453  }
4454  else {
4455  // No restructuring
4456  ;
4457  }
4458  }
4459  free_type(t);
4460  }
4461  }
4462 }
type expression_to_concrete_type(expression)
A new type is allocated.
Definition: type.c:3751
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
unsigned int array_type_dimension(type)
Definition: type.c:2947

References array_type_dimension(), array_type_p(), CDR, ENDP, expression_syntax, expression_to_concrete_type(), free_syntax(), free_type(), gen_nconc(), int, NIL, pointer_type_p(), POP, subscript_array, subscript_indices, syntax_subscript, syntax_subscript_p, syntax_undefined, and type_to_pointed_type().

Referenced by expression_normalize_subscripts(), and statement_normalize_subscripts().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NormalizeCall()

normalized NormalizeCall ( call  c)

Definition at line 145 of file normalize.c.

146 {
148  entity f = call_function(c);
149  value v = entity_initial(f);
150 
151  switch (value_tag(v)) {
152  case is_value_intrinsic:
154  break;
155  case is_value_constant:
157  break;
158  case is_value_symbolic:
159  if(get_bool_property("EVAL_SYMBOLIC_CONSTANT"))
161  else
163  break;
164  case is_value_unknown:
165  case is_value_code:
167  break;
168  default:
169  pips_internal_error("case default");
170  }
171 
172  return(n);
173 }
normalized make_normalized_linear(Pvecteur _field_)
Definition: ri.c:1450
normalized NormalizeIntrinsic(entity e, list la)
Definition: normalize.c:221
normalized NormalizeConstant(constant c)
Definition: normalize.c:175

References call_arguments, call_function, entity_initial, f(), get_bool_property(), is_normalized_complex, is_value_code, is_value_constant, is_value_intrinsic, is_value_symbolic, is_value_unknown, make_normalized(), make_normalized_linear(), NormalizeConstant(), normalized_undefined, NormalizeIntrinsic(), pips_internal_error, symbolic_constant, UU, value_constant, VALUE_ONE, value_symbolic, value_tag, and vect_new().

Referenced by NormalizeSyntax().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NormalizeCast()

normalized NormalizeCast ( cast  c)

Definition at line 130 of file normalize.c.

131 {
133  type ct = cast_type(c);
134  expression cexp = cast_expression(c);
135  type cexpt = expression_to_type(cexp);
136 
137  if (type_equal_p(ct, cexpt))
138  n = NormalizeExpression(cexp);
139  else
141  free_type(cexpt);
142  return(n);
143 }
normalized make_normalized_complex(void)
Definition: ri.c:1453
normalized NormalizeExpression(expression e)
normalize.c
Definition: normalize.c:81

References cast_expression, cast_type, expression_to_type(), free_type(), make_normalized_complex(), normalized_undefined, NormalizeExpression(), and type_equal_p().

Referenced by NormalizeSyntax().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NormalizeConstant()

normalized NormalizeConstant ( constant  c)

Definition at line 175 of file normalize.c.

176 {
177  return((constant_int_p(c)) ?
180 }

References constant_int, constant_int_p, make_normalized_complex(), make_normalized_linear(), TCST, and vect_new().

Referenced by NormalizeCall().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NormalizeExpression()

normalized NormalizeExpression ( expression  e)

normalize.c

Definition at line 81 of file normalize.c.

82 {
83  normalized n;
84 
86  user_warning("NormalizeExpression",
87  "expression is already normalized\n");
88 
89  n = _NormalizeExpression(e);
90  // expression_normalized(e) = n;
91  return(n);
92 }

References _NormalizeExpression(), expression_normalized, normalized_undefined, and user_warning.

Referenced by force_renormalize(), NormalizeCast(), xml_Connection(), and xml_ConstOffset().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NormalizeIntrinsic()

normalized NormalizeIntrinsic ( entity  e,
list  la 
)

There is no point in normalizing ng since this cannot be expressed by a normalized expression

Parameters
laa

Definition at line 221 of file normalize.c.

222 {
223  normalized n;
224 
225  if (! top_level_entity_p(e))
227 
228  if (ENTITY_UNARY_MINUS_P(e)) {
230 
231  if (normalized_complex_p(n))
232  return(n);
233 
235  }
236  else if (ENTITY_MINUS_P(e) || ENTITY_MINUS_C_P(e) || ENTITY_PLUS_P(e) || ENTITY_PLUS_C_P(e)) {
237  normalized ng, nd;
238 
240  if (normalized_complex_p(ng))
241  return(ng);
242 
244  if (normalized_complex_p(nd)) {
245  FreeNormalized(ng);
246  return(nd);
247  }
248 
249  n = (ENTITY_PLUS_P(e) || ENTITY_PLUS_C_P(e)) ?
252  normalized_linear(nd))) :
255  normalized_linear(nd)));
256 
257  FreeNormalized(ng);
258  FreeNormalized(nd);
259  }
260  else if (ENTITY_MINUS_UPDATE_P(e) || ENTITY_PLUS_UPDATE_P(e)) {
261  /* There is no point in normalizing ng since this cannot be
262  expressed by a normalized expression */
263  //normalized nd;
264 
265  (void) _NormalizeExpression(EXPRESSION(CAR(CDR(la))));
266  return make_normalized_complex();
267  }
268  else if (ENTITY_MULTIPLY_P(e)) {
269  normalized ng, nd;
270  int val;
271 
273  if (normalized_complex_p(ng))
274  return(ng);
275 
277  if (normalized_complex_p(nd)) {
278  FreeNormalized(ng);
279  return(nd);
280  }
281 
282  if (EvalNormalized(nd, &val)) {
283  FreeNormalized(nd);
284  normalized_linear(n = ng) =
286  }
287  else if (EvalNormalized(ng, &val)) {
288  FreeNormalized(ng);
289  normalized_linear(n = nd) =
291  }
292  else {
293  FreeNormalized(ng);
294  FreeNormalized(nd);
296  }
297  }
298  else if((ENTITY_MIN_P(e) || ENTITY_MIN0_P(e)) && gen_length(la) == 2) {
299  n = binary_to_normalized(la, MINIMUM);
300  }
301  else if((ENTITY_MAX_P(e) || ENTITY_MAX0_P(e)) && gen_length(la) == 2) {
302  n = binary_to_normalized(la, MAXIMUM);
303  }
304  else if(ENTITY_MODULO_P(e)) {
305  n = binary_to_normalized(la, MOD);
306  }
307  else if(ENTITY_DIVIDE_P(e)) {
308  n = binary_to_normalized(la, SLASH);
309  }
310  else if(ENTITY_POWER_P(e)) {
311  n = binary_to_normalized(la, POWER);
312  }
313  else {
315  }
316 
317  return(n);
318 }
normalized binary_to_normalized(list la, int op)
Definition: normalize.c:320
#define ENTITY_PLUS_UPDATE_P(e)
#define ENTITY_POWER_P(e)
#define ENTITY_MAX0_P(e)
#define ENTITY_MIN0_P(e)
#define ENTITY_MINUS_UPDATE_P(e)

References _NormalizeExpression(), binary_to_normalized(), CAR, CDR, ENTITY_DIVIDE_P, ENTITY_MAX0_P, ENTITY_MAX_P, ENTITY_MIN0_P, ENTITY_MIN_P, ENTITY_MINUS_C_P, ENTITY_MINUS_P, ENTITY_MINUS_UPDATE_P, ENTITY_MODULO_P, ENTITY_MULTIPLY_P, ENTITY_PLUS_C_P, ENTITY_PLUS_P, ENTITY_PLUS_UPDATE_P, ENTITY_POWER_P, ENTITY_UNARY_MINUS_P, EvalNormalized(), EXPRESSION, FreeNormalized(), gen_length(), is_normalized_complex, is_normalized_linear, make_normalized(), make_normalized_complex(), MAXIMUM, MINIMUM, MOD, normalized_complex_p, normalized_linear, POWER, SLASH, top_level_entity_p(), UU, vect_add(), vect_chg_sgn(), vect_multiply(), and vect_substract().

Referenced by NormalizeCall().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NormalizeReference()

normalized NormalizeReference ( reference  r)

SG is there any good reason to exclude pointer arithmetic ?

Definition at line 182 of file normalize.c.

183 {
185  entity e = reference_variable(r);
186  type t = entity_type(e);
187 
188  pips_assert("constant term ore is an entity",
190 
191  if (!type_variable_p(t)) {
192  if(type_functional_p(t)) {
193  // FI: we might not want to keep the warning for C code...
194  pips_user_warning("Reference to function \"%s\" cannot be normalized.\n"
195  "Is it an undeclared variable?\n",
196  entity_user_name(e));
198  }
199  else {
200  pips_user_warning("Reference to entity \"%s\" cannot be normalized because of its type tag %d\n",
201  entity_name(e), type_tag(t));
202  pips_user_error("Referenced entity should be a variable!\n");
203  }
204  }
205  else {
206  Variable v = (Variable) e;
207  Value val = VALUE_ONE;
208 
209  /* SG is there any good reason to exclude pointer arithmetic ?*/
210  n = (entity_integer_scalar_p(e) ||
212  ( entity_pointer_p(e) && ENDP(reference_indices(r))) ) ?
214  vect_new(v, val)) :
216  }
217 
218  return n;
219 }
bool entity_enum_variable_p(entity e)
Definition: entity.c:992

References ENDP, entity_domain, entity_domain_number, entity_enum_variable_p(), entity_integer_scalar_p(), entity_name, entity_pointer_p(), entity_type, entity_user_name(), is_normalized_complex, is_normalized_linear, make_normalized(), normalized_undefined, pips_assert, pips_user_error, pips_user_warning, reference_indices, reference_variable, type_functional_p, type_tag, type_variable_p, UU, VALUE_ONE, and vect_new().

Referenced by NormalizeSyntax().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NormalizeSyntax()

normalized NormalizeSyntax ( syntax  s)

Definition at line 94 of file normalize.c.

95 {
97 
98  switch (syntax_tag(s)) {
101  break;
102  case is_syntax_range:
104  break;
105  case is_syntax_call:
106  n = NormalizeCall((syntax_call(s)));
107  break;
108  case is_syntax_cast:
109  n = NormalizeCast(syntax_cast(s));
110  break;
113  break;
114  case is_syntax_subscript:
116  break;
119  break;
120  case is_syntax_va_arg:
122  break;
123  default:
124  pips_internal_error("cas default");
125  }
126 
127  return(n);
128 }
normalized NormalizeCall(call c)
Definition: normalize.c:145
normalized NormalizeReference(reference r)
Definition: normalize.c:182
normalized NormalizeCast(cast c)
Definition: normalize.c:130

References is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, make_normalized_complex(), NormalizeCall(), NormalizeCast(), normalized_undefined, NormalizeReference(), pips_internal_error, syntax_call, syntax_cast, syntax_reference, and syntax_tag.

Referenced by _NormalizeExpression(), and array_indices_communication().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ number_of_fields()

int number_of_fields ( type  t)

Recursive number of fields in a data structure...

union and probably enum are not taken into account.

FI: I guess enum should be added

Definition at line 3893 of file type.c.

3894 {
3895  int n = 1;
3896  type ut = ultimate_type(t);
3897 
3898  if(type_variable_p(ut)) {
3900 
3901  if(basic_derived_p(ub)) {
3902  entity de = basic_derived(ub);
3903  type dt = entity_type(de);
3904  n = number_of_fields(dt);
3905  }
3906  }
3907  else if(type_struct_p(t)) {
3908  list el = type_struct(t);
3909  list ce = list_undefined;
3910 
3911  n = 0;
3912  for(ce = el; !ENDP(ce); POP(ce)) {
3913  entity fe = ENTITY(CAR(ce));
3914  type ft = entity_type(fe);
3915  n += number_of_fields(ft);
3916  }
3917  }
3918  else
3919  pips_internal_error("Illegal type argument");
3920 
3921  return n;
3922 }
int number_of_fields(type t)
Recursive number of fields in a data structure...
Definition: type.c:3893

References basic_derived, basic_derived_p, CAR, ENDP, ENTITY, entity_type, list_undefined, number_of_fields(), pips_internal_error, POP, type_struct, type_struct_p, type_variable, type_variable_p, ultimate_type(), and variable_basic.

Referenced by number_of_fields(), and number_of_items().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ number_of_initial_values()

int number_of_initial_values ( list  args)

size.c

size.c

If the size is unknown, the variable is allocated in the STACK area. See ri.pdf, section about "area".

Parameters
argsrgs

Definition at line 44 of file size.c.

45 {
46  int niv = 0;
47  list carg = list_undefined;
48 
49  for(carg=args; !ENDP(carg); POP(carg)) {
50  expression e = EXPRESSION(CAR(carg));
51 
52  if(expression_call_p(e)) {
54  entity f = call_function(c);
55  list sargs = call_arguments(c);
56 
58  niv += number_of_initial_values(sargs);
59  }
60  else
61  niv++;
62  }
63  else
64  niv++;
65  }
66 
67  return niv;
68 }
int number_of_initial_values(list args)
Functions to compute the numer of bytes required to store a variable or an object of a given type in ...
Definition: size.c:44

References call_arguments, call_function, CAR, ENDP, ENTITY_BRACE_INTRINSIC_P, EXPRESSION, expression_call_p(), expression_syntax, f(), list_undefined, number_of_initial_values(), POP, and syntax_call.

Referenced by number_of_initial_values(), and SizeOfArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ number_of_items()

int number_of_items ( type  t)

Same as above, but arrays in struct are taken into account.

Definition at line 3925 of file type.c.

3926 {
3927  int n = 1;
3928  type ut = ultimate_type(t);
3929 
3930  if(type_variable_p(ut)) {
3931  variable uv = type_variable(ut);
3932  basic ub = variable_basic(uv);
3933  int ne;
3934  bool ok = NumberOfElements(ub, variable_dimensions(uv), &ne);
3935 
3936  if(basic_derived_p(ub)) {
3937  entity de = basic_derived(ub);
3938  type dt = entity_type(de);
3939  n = number_of_fields(dt);
3940  }
3941 
3942  if(ok)
3943  n = n*ne;
3944  else
3945  pips_internal_error("Unexpected use of this function");
3946  }
3947  else if(type_struct_p(t)) {
3948  list el = type_struct(t);
3949  list ce = list_undefined;
3950 
3951  n = 0;
3952  for(ce = el; !ENDP(ce); POP(ce)) {
3953  entity fe = ENTITY(CAR(ce));
3954  type ft = entity_type(fe);
3955  n += number_of_items(ft);
3956  }
3957  }
3958  else
3959  pips_internal_error("Illegal type argument");
3960 
3961  return n;
3962 }
int number_of_items(type t)
Same as above, but arrays in struct are taken into account.
Definition: type.c:3925
bool NumberOfElements(basic, list, int *)
Definition: size.c:403

References basic_derived, basic_derived_p, CAR, ENDP, ENTITY, entity_type, list_undefined, number_of_fields(), number_of_items(), NumberOfElements(), ok, pips_internal_error, POP, type_struct, type_struct_p, type_variable, type_variable_p, ultimate_type(), variable_basic, and variable_dimensions.

Referenced by number_of_items(), and SizeOfArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NumberOfDimension()

int NumberOfDimension ( entity  e)

Definition at line 588 of file size.c.

589 {
590  type t = entity_type(e);
591  int nd;
592  cons *pc;
593 
595 
597  nd = 0;
598 
599  while (! ENDP(pc)) {
600  nd += 1;
601  pc = CDR(pc);
602  }
603 
604  return(nd);
605 }

References assert, CDR, ENDP, entity_type, type_variable, type_variable_p, and variable_dimensions.

Referenced by add_bound_arguments(), align_check(), array_as_template(), array_bounds_list(), array_distribution_similar_p(), array_ranges_to_template_ranges(), array_with_numerical_bounds_p(), block_distributed_p(), caller_list_of_bounds(), clean_distributed_io_system(), clean_shared_io_system(), compute_receive_content(), conformant_entities_p(), create_init_common_param_for_arrays(), create_init_common_param_for_processors(), create_init_common_param_for_templates(), create_parameters_h(), define_node_processor_id(), entity_unbounded_p(), extract_the_align(), extract_the_distribute(), full_linearization(), generate_compute_local_indices(), hpfc_broadcast_buffers(), hpfc_compute_align_constraints(), hpfc_compute_distribute_constraints(), hpfc_compute_entity_to_new_declaration(), hpfc_compute_lid(), hpfc_compute_unicity_constraints(), make_guard_expression(), make_reference_expression(), normalize_distribute(), number_of_distributed_dimensions(), one_message_guards_and_neighbour(), partial_linearization(), put_variables_in_ordered_lists(), reduction_parameters(), reference_to_points_to_sinks(), region_translation_init(), replicated_p(), st_generate_packing(), step_local_regionArray(), template_ranges_to_processors_ranges(), text_equivalence_class(), and update_overlaps_of().

+ Here is the caller graph for this function:

◆ NumberOfElements()

bool NumberOfElements ( basic  b,
list  ld,
int n 
)

do we have many elements at the lower typedef levels?

let's take care of the current level

Parameters
ldd

Definition at line 403 of file size.c.

404 {
405  list pc;
406  int ne = 1;
407  bool ok = true;
408  int sne = 1;
409 
410  /* do we have many elements at the lower typedef levels? */
411  if(basic_typedef_p(b)) {
412  entity e = basic_typedef(b);
413  // Lots of asserts skipped here
415 
417  }
418 
419  /* let's take care of the current level */
420  if(ok) {
421  for (pc = ld; pc != NULL && ok; pc = CDR(pc)) {
423  intptr_t s;
425  free_expression(sod);
426  ne *= s;
427  }
428  }
429 
430  *n = ne*sne;
431  return ok;
432 }

References basic_typedef, basic_typedef_p, CAR, CDR, DIMENSION, entity_type, expression_integer_value(), free_expression(), intptr_t, NumberOfElements(), ok, SizeOfDimension(), type_variable, variable_basic, and variable_dimensions.

Referenced by element_number(), expression_reference_number(), number_of_items(), NumberOfElements(), and SizeOfArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator_expression_p()

bool operator_expression_p ( expression  e,
string  op_name 
)
Parameters
op_namep_name

Definition at line 1087 of file expression.c.

1090 {
1091  syntax s = expression_syntax(e);
1092 
1093  if(syntax_call_p(s)) {
1094  call c = syntax_call(s);
1095  entity op = call_function(c);
1096 
1097  return strcmp(op_name, entity_local_name(op)) == 0;
1098  }
1099  else
1100  return false;
1101 }

References call_function, entity_local_name(), expression_syntax, syntax_call, and syntax_call_p.

Referenced by abs_expression_p(), add_expression_p(), assignment_expression_p(), cabs_expression_p(), dabs_expression_p(), divide_expression_p(), false_expression_p(), iabs_expression_p(), logical_expression_p(), max0_expression_p(), min0_expression_p(), modulo_expression_p(), power_expression_p(), sub_expression_p(), substraction_expression_p(), true_expression_p(), and unary_minus_expression_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator_neutral_element()

entity operator_neutral_element ( entity  op)
Parameters
opp

Definition at line 2593 of file entity.c.

2594 {
2595  const char * en = entity_user_name(op);
2596 
2597  const char * one_neutral []= {
2603  NULL
2604  };
2605  for(int i=0;one_neutral[i];i++)
2606  if(same_string_p(one_neutral[i],en)) return make_integer_constant_entity(1);
2607 
2608  const char * plus_inf_neutral[] = {
2612  NULL
2613  };
2614  for(int i=0;plus_inf_neutral[i];i++)
2615  if(same_string_p(plus_inf_neutral[i],en)) {
2616  pips_user_warning("assuming reduction on integer\n");
2617  return make_integer_constant_entity(UINT_MAX);
2618  }
2619 
2620  const char * minus_inf_neutral[] = {
2622  NULL
2623  };
2624  for(int i=0;minus_inf_neutral[i];i++)
2625  if(same_string_p(minus_inf_neutral[i],en)){
2626  pips_user_warning("assuming reduction on integer\n");
2627  return make_integer_constant_entity(INT_MIN);
2628  }
2629 
2630  const char * zero_neutral [] ={
2640  NULL
2641  };
2642  for(int i=0;zero_neutral[i];i++)
2643  if(same_string_p(zero_neutral[i],en)) return make_integer_constant_entity(0);
2644 
2645  return entity_undefined;
2646 }
#define BITWISE_AND_UPDATE_OPERATOR_NAME
entity make_integer_constant_entity(_int)
entity make_integer_constant_entity(int c) make entity for integer constant c
Definition: variable.c:1345

References AND_OPERATOR_NAME, BITWISE_AND_OPERATOR_NAME, BITWISE_AND_UPDATE_OPERATOR_NAME, BITWISE_OR_OPERATOR_NAME, BITWISE_OR_UPDATE_OPERATOR_NAME, DIVIDE_UPDATE_OPERATOR_NAME, entity_undefined, entity_user_name(), LEFT_SHIFT_UPDATE_OPERATOR_NAME, make_integer_constant_entity(), MAX_OPERATOR_NAME, MIN_OPERATOR_NAME, MINUS_UPDATE_OPERATOR_NAME, MULTIPLY_OPERATOR_NAME, MULTIPLY_UPDATE_OPERATOR_NAME, OR_OPERATOR_NAME, pips_user_warning, PLUS_C_OPERATOR_NAME, PLUS_OPERATOR_NAME, PLUS_UPDATE_OPERATOR_NAME, RIGHT_SHIFT_UPDATE_OPERATOR_NAME, and same_string_p.

Referenced by partial_eval_binary_operator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ordering_to_statement()

statement ordering_to_statement ( int  o)

Get the statement associated to a given ordering.

It is useful for retrieve the statements associated with the arcs in the dependence graphs for example.

Definition at line 111 of file ordering.c.

112 {
113  statement s;
115  return s;
116 }
static statement apply_ordering_to_statement(hash_table ots, _int o)
Get the statement from an ordering in a given ordering to statement table.
Definition: ordering.c:87

References apply_ordering_to_statement(), and OrderingToStatement.

Referenced by adg_number_to_statement(), adg_only_call_WR_dependence(), adg_reorder_statement_number(), adg_vertex_to_statement(), AK_ignore_this_vertex(), guard_elimination(), imprime_quast(), LowlinkCompute(), pipsdbm_read_statement_function(), pipsdbm_read_statement_mapping(), process_reduced_loops(), and vertex_to_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ordering_to_statement_initialized_p()

bool ordering_to_statement_initialized_p ( void  )

ordering.c

ordering.c

Definition at line 63 of file ordering.c.

64 {
66 }

References hash_table_undefined, and OrderingToStatement.

Referenced by module_body_reorder(), module_reorder(), and step_parser().

+ Here is the caller graph for this function:

◆ overloaded_parameters_p()

bool overloaded_parameters_p ( list  lparams)
Parameters
lparamsparams

Definition at line 5236 of file type.c.

5237 {
5238  bool overloaded_p = true;
5239 
5240  FOREACH(PARAMETER, p, lparams) {
5241  type pt = parameter_type(p);
5242 
5243  if(!overloaded_type_p(pt)) {
5244  overloaded_p = false;
5245  break;
5246  }
5247  }
5248 
5249  return overloaded_p;
5250 }
list lparams
Array bounds.
Definition: reindexing.c:111
bool overloaded_type_p(type t)
Returns true if t is a variable type with a basic overloaded.
Definition: type.c:2666

References FOREACH, lparams, overloaded_type_p(), PARAMETER, and parameter_type.

Referenced by generic_c_words_simplified_entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ overloaded_type_p()

◆ overwrite_ordering_of_the_statement_to_current_mapping()

bool overwrite_ordering_of_the_statement_to_current_mapping ( statement  stat)

Overwrite the statement for its ordering, if any, in the hash-map.

The difference with add_ordering_of_the_statement_to_current_mapping() is that this version won't trigger a warning if the mapping already exist

Parameters
stattat

Definition at line 142 of file ordering.c.

143 {
144  pips_assert("ordering is defined",
146  hash_overwrite(OrderingToStatement, (void *) statement_ordering(stat), (void *) stat);
147  return true;
148 }
void hash_overwrite(hash_table htp, const void *key, const void *val)
hash_put which allows silent overwrite...
Definition: hash.c:344

References hash_overwrite(), OrderingToStatement, pips_assert, statement_ordering, and STATEMENT_ORDERING_UNDEFINED.

+ Here is the call graph for this function:

◆ parameter_equal_p()

bool parameter_equal_p ( parameter  p1,
parameter  p2 
)
Parameters
p11
p22

Definition at line 1030 of file type.c.

1031 {
1032  return generic_parameter_equal_p(p1, p2, true, true, false);
1033 }

References generic_parameter_equal_p().

+ Here is the call graph for this function:

◆ parameter_passing_by_reference_p()

bool parameter_passing_by_reference_p ( entity  f)

Definition at line 2121 of file entity.c.

2122 {
2124 }
bool parameter_passing_mode_p(entity f, int tag)
Returns true when f has no parameters.
Definition: entity.c:2089

References f(), is_mode_reference, and parameter_passing_mode_p().

+ Here is the call graph for this function:

◆ parameter_passing_by_value_p()

bool parameter_passing_by_value_p ( entity  f)

Definition at line 2116 of file entity.c.

2117 {
2119 }

References f(), is_mode_value, and parameter_passing_mode_p().

+ Here is the call graph for this function:

◆ parameter_passing_mode_p()

bool parameter_passing_mode_p ( entity  f,
int  tag 
)

Returns true when f has no parameters.

Calls thru pointers require syntax_application

It is assumed that all parameters are passed the same way, either by valule or by reference

We are in trouble... because we have to call a higher-level function from the preprocessor library.

Definition at line 2089 of file entity.c.

2090 {
2092 
2093  /* Calls thru pointers require syntax_application */
2094  pips_assert("call to a function", type_functional_p(ft));
2095 
2096  functional ftf = type_functional(ft);
2097  bool mode_p = true;
2098 
2099 
2100  if(!ENDP(functional_parameters(ftf))) {
2101  /* It is assumed that all parameters are passed the same way,
2102  either by valule or by reference */
2104  mode_p = (((int)mode_tag(parameter_mode(p)))==tag);
2105  }
2106  else {
2107  /* We are in trouble... because we have to call a higher-level
2108  function from the preprocessor library. */
2109  if(c_module_p(f))
2110  mode_p = (tag==is_mode_value);
2111  else
2112  mode_p = (tag==is_mode_reference);
2113  }
2114  return mode_p;
2115 }

References c_module_p(), CAR, ENDP, entity_type, f(), functional_parameters, int, is_mode_reference, is_mode_value, mode_tag, PARAMETER, parameter_mode, pips_assert, type_functional, type_functional_p, and ultimate_type().

Referenced by parameter_passing_by_reference_p(), and parameter_passing_by_value_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ place_holder_variable_p()

bool place_holder_variable_p ( entity  ph)
Parameters
phh

Definition at line 2069 of file variable.c.

2070 {
2071  const char * n = entity_local_name(ph);
2072  string f = strstr(n, PLACE_HOLDER_PREFIX_STRING);
2073  return f!=NULL;
2074 }

References entity_local_name(), f(), and PLACE_HOLDER_PREFIX_STRING.

Referenced by analyzable_scalar_entity_p(), c_text_related_entities(), CCompilationUnitMemoryAllocations(), CModuleMemoryAllocation(), create_values_for_simple_effect(), dump_common_layout(), make_declarations_statement(), make_scalar_entity(), module_to_value_mappings(), and words_variable_or_function().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pointed_type()

type pointed_type ( type  t)

returns the type pointed by the input type if it is a pointer or an array of pointers

Definition at line 3035 of file type.c.

3036 {
3037  type res = type_undefined;
3038 
3041  return res;
3042 }

References basic_pointer, basic_pointer_p, type_undefined, type_variable, type_variable_p, and variable_basic.

Referenced by convert_pointer_to_array(), do_array_to_pointer_walk_call_and_patch(), do_linearize_prepatch_subscript(), effects_to_dma(), intrinsic_call_to_type(), and module_initial_parameter_pv().

+ Here is the caller graph for this function:

◆ pointer_dummy_targets_area_p()

bool pointer_dummy_targets_area_p ( entity  aire)
Parameters
aireire

Definition at line 113 of file area.c.

114 {
115 #ifndef NDEBUG
117  pips_assert("entity_kind is consistent", result == ( (entity_kind(aire) & ENTITY_POINTER_DUMMY_TARGETS_AREA) == ENTITY_POINTER_DUMMY_TARGETS_AREA));
118 #endif
120 }

References entity_kind, ENTITY_POINTER_DUMMY_TARGETS_AREA, module_local_name(), pips_assert, POINTER_DUMMY_TARGETS_AREA_LOCAL_NAME, and same_string_p.

Referenced by entity_special_area_p(), sentence_area(), and text_entity_declaration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pointer_reference_to_expression()

expression pointer_reference_to_expression ( reference  r)

Assume p is a pointer.

Compute expression "*(p+i)" from reference r = "p[i]".

rsl is fully copied into two sub-lists: the effective array indices and then the pointer indices.

We build a proper reference to an element of p

We build the equivalent pointer arithmetic expression

Definition at line 4004 of file expression.c.

4005 {
4006  entity p = reference_variable(r);
4008  list rsl = reference_indices(r);
4009  int p_d = variable_dimension_number(type_variable(t)); // pointer dimension
4010  int r_d = (int) gen_length(rsl); // reference dimension
4011 
4012  pips_assert("The reference dimension is strictly greater than "
4013  "the array of pointers dimension", r_d>p_d);
4014 
4015  /* rsl is fully copied into two sub-lists: the effective array
4016  indices and then the pointer indices. */
4017  list esl = NIL;
4018  list psl = NIL;
4019  list crsl = rsl;
4020  int i;
4021  for(i = 0; i<r_d; i++) {
4022  expression se = EXPRESSION(CAR(crsl));
4023  i<p_d? (esl = CONS(EXPRESSION, copy_expression(se), esl))
4024  : (psl = CONS(EXPRESSION, copy_expression(se), psl));
4025  POP(crsl);
4026  }
4027  esl = gen_nreverse(esl), psl = gen_nreverse(psl);
4028 
4029  pips_assert("The pointer index list is not empty", !ENDP(psl));
4030 
4031  /* We build a proper reference to an element of p */
4032  reference nr = make_reference(p, esl);
4034 
4035  /* We build the equivalent pointer arithmetic expression */
4036  expression pae = nre;
4037  // FI: would be better to compute the two operators before entering the loop
4038  // entity plus = ;
4039  // entity indirection = ;
4040  FOREACH(EXPRESSION, pse, psl) {
4043  }
4044 
4045  return pae;
4046 }
#define binary_intrinsic_expression(name, e1, e2)
int variable_dimension_number(variable)
Definition: type.c:5632

References binary_intrinsic_expression, CAR, CONS, copy_expression(), DEREFERENCING_OPERATOR_NAME, ENDP, entity_basic_concrete_type(), EXPRESSION, FOREACH, gen_length(), gen_nreverse(), int, make_reference(), NIL, pips_assert, PLUS_C_OPERATOR_NAME, POP, reference_indices, reference_to_expression(), reference_variable, type_variable, unary_intrinsic_expression, and variable_dimension_number().

Referenced by pointer_reference_dereferencing_to_points_to(), and pointer_reference_to_points_to_sinks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pointer_type_array_p()

bool pointer_type_array_p ( entity  e)

return true if e has a pointer-type array declarator (the upper bound of the last dimension is equal to 1: REAL A(1) )

Definition at line 826 of file entity.c.

827 {
828  /* return true if e has a pointer-type array declarator
829  (the upper bound of the last dimension is equal to 1: REAL A(1) )*/
830  if (entity_variable_p(e))
831  {
833  list l_dims = variable_dimensions(v);
834  if (l_dims != NIL)
835  {
836  int length = gen_length(l_dims);
837  dimension last_dim = find_ith_dimension(l_dims,length);
838  expression exp = dimension_upper(last_dim);
840  return true;
841  }
842  }
843  return false;
844 }

References dimension_upper, entity_type, entity_variable_p, exp, expression_equal_integer_p(), find_ith_dimension(), gen_length(), NIL, type_variable, and variable_dimensions.

Referenced by array_size_stride(), and unnormalized_array_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pointer_type_p()

bool pointer_type_p ( type  t)

Check for scalar pointers.

Definition at line 2993 of file type.c.

2994 {
2995  bool pointer_p = false;
2996  if(type_variable_p(t)) {
2997  variable v = type_variable(t);
2998  basic b = variable_basic(v);
2999  if(basic_pointer_p(b))
3000  pointer_p = (variable_dimensions(type_variable(t)) == NIL);
3001 }
3002  return pointer_p;
3003 }

References basic_pointer_p, NIL, type_variable, type_variable_p, variable_basic, and variable_dimensions.

Referenced by add_conflicts(), any_source_to_sinks(), anywhere_source_to_sinks(), array_pointer_type_equal_p(), assignment_to_points_to(), assignment_to_post_pv(), binary_arithmetic_operator_to_post_pv(), c_convex_effects_on_formal_parameter_backward_translation(), C_type_to_pointed_type(), call_to_points_to(), cast_to_points_to_sinks(), cell_must_point_to_nowhere_sink_in_set_p(), cell_points_to_non_null_sink_in_set_p(), cell_points_to_nowhere_sink_in_set_p(), cell_points_to_null_sink_in_set_p(), char_star_type_p(), check_rhs_value_types(), check_type_of_points_to_cells(), compute_points_to_binded_set(), declaration_statement_to_points_to(), dereferencing_to_points_to(), dereferencing_to_sinks(), do_array_to_pointer_type(), do_check_isolate_statement_preconditions_on_call(), do_gpu_qualify_pointers(), do_linearize_array_manage_callers(), do_linearize_prepatch_type(), effect_interference(), effect_scalar_p(), effect_to_store_independent(), entity_flow_or_context_sentitive_heap_location(), entity_scalar_p(), equal_condition_to_points_to(), expression_pointer_p(), expression_to_points_to(), expression_to_points_to_cells(), expression_to_points_to_sinks_with_offset(), expression_to_points_to_sources(), external_call_to_post_pv(), freed_list_to_points_to(), gen_may_constant_paths(), gen_must_constant_paths(), generic_c_words_simplified_entity(), generic_points_to_cell_to_useful_pointer_cells(), generic_stub_source_to_sinks(), intrinsic_call_condition_to_points_to(), intrinsic_call_to_points_to(), intrinsic_call_to_type(), memory_dereferencing_p(), new_recursive_filter_formal_context_according_to_actual_context(), non_equal_condition_to_points_to(), normalize_subscript_expression(), null_equal_condition_to_points_to(), null_non_equal_condition_to_points_to(), order_condition_to_points_to(), perform_array_element_substitutions_in_transformer(), points_to_cell_types_compatibility(), points_to_cells_parameters(), points_to_expression_to_pointed_type(), points_to_function_projection(), points_to_reference_update_final_subscripts(), points_to_set_block_projection(), points_to_translation_of_formal_parameters(), points_to_translation_of_struct_formal_parameter(), points_to_with_stripped_sink(), process_casted_sources(), recursive_cell_to_pointer_cells(), recursive_store_independent_points_to_reference_p(), reduce_cell_to_pointer_type(), reference_condition_to_points_to(), reference_dereferencing_to_points_to(), reference_to_points_to(), reference_to_points_to_sinks(), safe_intrinsic_to_post_pv(), set_entity_initial(), sizeofexpression_to_points_to_sinks(), store_independent_effect_p(), store_independent_reference_p(), struct_assignment_to_points_to(), struct_variable_to_pointer_locations(), struct_variable_to_pointer_subscripts(), subscript_to_points_to_sinks(), subscripted_reference_to_points_to(), TestCoupleOfReferences(), type_to_final_pointed_type(), type_to_pointed_type(), type_void_star_p(), unary_arithmetic_operator_to_post_pv(), update_operator_to_post_pv(), UpdateDerivedEntity(), UpdateEntity(), variable_initial_expression(), and variable_to_pointer_locations().

◆ polynome_to_expression()

expression polynome_to_expression ( Ppolynome  pp)

converts a polynomial to expression

Parameters
ppp

Definition at line 3622 of file expression.c.

3623 {
3625 
3626  if (POLYNOME_UNDEFINED_P(pp))
3628  else if (POLYNOME_NUL_P(pp))
3629  r = int_to_expression(0);
3630  else {
3631  while (!POLYNOME_NUL_P(pp)) {
3633  if(expression_undefined_p(r)) r=s;
3634  else
3636  pp = polynome_succ(pp);
3637  }
3638  }
3639  return r;
3640 }
#define polynome_monome(pp)
#define POLYNOME_NUL_P(pp)
#define polynome_succ(pp)
expression monome_to_expression(Pmonome pm)
converts a monome to an expression
Definition: expression.c:3589

References expression_undefined, expression_undefined_p, int_to_expression(), make_op_exp(), monome_to_expression(), PLUS_OPERATOR_NAME, polynome_monome, POLYNOME_NUL_P, polynome_succ, and POLYNOME_UNDEFINED_P.

Referenced by do_group_statement_constant(), do_solve_hardware_constraints_on_volume(), edge_cost_polynome(), and simplify_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pop_statement_global_stack()

statement pop_statement_global_stack ( void  )

Definition at line 352 of file static.c.

353 {
355  return st;
356 }
void * stack_pop(stack)
POPs one item from stack s.
Definition: stack.c:399

References stack_pop(), and statement_global_stack.

Referenced by partial_eval_statement(), statement_to_points_to(), statement_to_postcondition(), statement_to_transformer(), update_precondition_with_call_site_preconditions(), xml_Argument(), xml_Boxes(), xml_Call(), xml_Chain_Graph(), xml_Loop(), xml_Loops(), and xml_Task().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ positive_expression_p()

bool positive_expression_p ( expression  e)

Use constants and type information to decide if the value of sigma(e) is always positive, e.g.

>=0

See negative_expression_p()

Should we define positive_integer_expression_p() and check the expression type?

We assume an operator is used

We can check a few cases recursively...

Definition at line 826 of file eval.c.

827 {
828  bool positive_p = false; // In general, false because no conclusion can be reached
829  intptr_t v;
830  if(expression_integer_value(e, &v)) {
831  positive_p = v>=0;
832  }
833  else {
834  syntax s = expression_syntax(e);
835 
836  if(syntax_reference_p(s)) {
839  positive_p = unsigned_type_p(t);
840  }
841  else if(syntax_call_p(s)) {
842  call c = syntax_call(s);
843  entity f = call_function(c);
844  type t = entity_type(f);
845  pips_assert("t is a functional type", type_functional_p(t));
847  if(unsigned_type_p(rt))
848  positive_p = true;
849  else if(overloaded_type_p(rt)) { /* We assume an operator is used */
850  /* We can check a few cases recursively... */
851  list args = call_arguments(c);
852  intptr_t l = gen_length(args);
853  if(l==1) {
854  expression arg = EXPRESSION(CAR(args));
855  if(ENTITY_UNARY_MINUS_P(f)) {
856  positive_p = negative_expression_p(arg); // Maybe zero, but no chance for sigma(x)>0
857  }
858  else if(ENTITY_IABS_P(f) || ENTITY_ABS_P(f) || ENTITY_DABS_P(f)
859  || ENTITY_CABS_P(f)) {
860  positive_p = true;
861  }
862  }
863  else if(l==2) {
864  expression arg1 = EXPRESSION(CAR(args));
865  expression arg2 = EXPRESSION(CAR(CDR(args)));
866  if(ENTITY_MINUS_P(f)) {
867  positive_p = positive_expression_p(arg1) && negative_expression_p(arg2);
868  }
869  else if(ENTITY_PLUS_P(f)) {
870  positive_p = positive_expression_p(arg1) && positive_expression_p(arg2);
871  }
872  else if(ENTITY_MULTIPLY_P(f)) {
873  positive_p = (positive_expression_p(arg1) && positive_expression_p(arg2))
874  || (negative_expression_p(arg1) && negative_expression_p(arg2));
875  }
876  else if(ENTITY_DIVIDE_P(f)) {
877  positive_p = (positive_expression_p(arg1) && positive_expression_p(arg2))
878  || (negative_expression_p(arg1) && negative_expression_p(arg2));
879  }
880  }
881  }
882  }
883  }
884  return positive_p;
885 }
#define ENTITY_DABS_P(e)
#define ENTITY_CABS_P(e)
#define ENTITY_IABS_P(e)
#define ENTITY_ABS_P(e)
bool unsigned_type_p(type)
Predicates on types.
Definition: type.c:2821

References call_arguments, call_function, CAR, CDR, ENTITY_ABS_P, ENTITY_CABS_P, ENTITY_DABS_P, ENTITY_DIVIDE_P, ENTITY_IABS_P, ENTITY_MINUS_P, ENTITY_MULTIPLY_P, ENTITY_PLUS_P, entity_type, ENTITY_UNARY_MINUS_P, EXPRESSION, expression_integer_value(), expression_syntax, f(), functional_result, gen_length(), intptr_t, negative_expression_p(), overloaded_type_p(), pips_assert, reference_variable, syntax_call, syntax_call_p, syntax_reference, syntax_reference_p, type_functional, type_functional_p, ultimate_type(), and unsigned_type_p().

Referenced by add_index_range_conditions(), C_loop_range(), incrementation_expression_to_increment(), and negative_expression_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ power_expression_p()

bool power_expression_p ( expression  e)

Definition at line 1018 of file expression.c.

1020 {
1022 }

References operator_expression_p(), and POWER_OPERATOR_NAME.

+ Here is the call graph for this function:

◆ pragma_build_if_condition()

expression pragma_build_if_condition ( expression  cond,
language  l 
)

build the expression to be put in the if clause.

This functions takes care of the output language.

Returns
the condition compared to the threshold as an expression
Parameters
cond,thecondition to be compared to the threshold
Parameters
condond

Definition at line 159 of file pragma.c.

159  {
161  //switch(get_prettyprint_language_tag()) {
162  switch(language_tag(l)) {
163  case is_language_fortran:
166  break;
167  case is_language_c:
169  break;
170  default:
171  pips_internal_error ("This case should have been handled before" );
172  break;
173  }
174  int threshold = get_int_property("OMP_LOOP_PARALLEL_THRESHOLD_VALUE");
175  list args_if = gen_expression_cons(int_to_expression(threshold), NIL);
176  args_if = gen_expression_cons(cond, args_if);
177  call c = make_call(op, args_if);
178  return call_to_expression(c);
179 }
int get_int_property(const string)
#define language_tag(x)
Definition: ri.h:1590

References C_GREATER_OR_EQUAL_OPERATOR_NAME, call_to_expression(), CreateIntrinsic(), entity_undefined, gen_expression_cons(), get_int_property(), GREATER_OR_EQUAL_OPERATOR_NAME, int_to_expression(), is_language_c, is_language_fortran, is_language_fortran95, language_tag, make_call(), NIL, and pips_internal_error.

Referenced by add_loop_parallel_threshold().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pragma_if_as_expr()

expression pragma_if_as_expr ( expression  arg)
Returns
"if (cond)" as an expression
Parameters
arg,thecondition to be evaluted by the if clause
Parameters
argrg

Definition at line 184 of file pragma.c.

184  {
186  list args_expr = gen_expression_cons (arg, NIL);
187  call c = make_call (omp, args_expr);
188  // syntax s = make_syntax_call (c);
189  expression expr_if = call_to_expression (c);// make_expression (s, normalized_undefined);
190  return expr_if;
191 }
#define OMP_IF_FUNCTION_NAME
OMP related function and opertor names.

References call_to_expression(), CreateIntrinsic(), gen_expression_cons(), make_call(), NIL, and OMP_IF_FUNCTION_NAME.

Referenced by add_loop_parallel_threshold(), and pragma_omp_merge_expr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pragma_omp_merge_expr()

list pragma_omp_merge_expr ( list  outer_extensions,
list  l_pragma,
language  l 
)

merge omp pragma.

Returns
the merged pragma as a list of expression
Parameters
l_pragma,thelist of pragma to merge. The pragma as to be a list of expression ordered. The pragma list has to be ordered from the outer pragma to the inner pragma as in the original loop nest.
Parameters
outer_extensionsuter_extensions
l_pragma_pragma

Definition at line 326 of file pragma.c.

326  {
327  // The "omp parallel for" as a list of expression
329  // The list of the variables of the private clauses
330  list priv_var = NIL;
331  // The list of condition of the if clauses
332  list if_cond = NIL;
333  // The list of reductions
334  list red = NIL;
335  // Get the if clause policy
337  // the outer pragmas
338  set outer_pragmas = set_make(set_pointer);
339  FOREACH(EXTENSION,ex, outer_extensions) {
340  pragma p = extension_pragma(ex);
341  if(pragma_expression_p(p)) {
343  set_add_element(outer_pragmas,outer_pragmas,e);
344  }
345  }
346 
347  // look into each pragma for private, reduction and if clauses
348  FOREACH (PRAGMA, p, l_pragma) {
349  pips_assert ("Can only merge a list of pragma as expression",
350  pragma_expression_p (p));
352  // check each expression and save what need to be saved to generate
353  // the new omp pragma
354  call c = expression_call(e);
355  list args = call_arguments (c);
356  // bind the args to the right list
358  // each private var has to be uniquely declared
359  list add = NIL;
360  FOREACH (EXPRESSION, exp, args) {
361  if(!expression_equal_in_list_p(exp, priv_var) )
362  add = gen_expression_cons(exp, add);
363  }
364  priv_var = gen_nconc(priv_var, add);
365  } else if(is_expression_omp_if_p(e)) {
366  // if clause : check the policy
367  switch(policy) {
368  case IGNORE_IF_POLICY:
369  // do nothing
370  break;
371  case AND_IF_POLICY:
372  case OR_IF_POLICY:
373  if_cond = gen_nconc(if_cond, args);
374  break;
375  default:
376  pips_internal_error ("Should not happen");
377  break;
378  }
379  } else if(is_expression_omp_reduction_p(e)) {
380  // only reductions on outer statement are kept
381  if(set_belong_p(outer_pragmas,e) ) {
382  red = gen_expression_cons(e, red);
383  }
386  // nothing to do the omp parallel for will be automaticly generated
387  } else {
388  // FI: to avoid cycles between librairies ri-util and prettyprint
389  // print_expression(e);
390  pips_internal_error("pips cannot merge this pragma clause");
391  }
392  }
393  }
394  set_free(outer_pragmas);
395  // build the private clause if needed
396  if(priv_var != NIL) {
398  // append the private clause to the omp parallel for
399  result = gen_expression_cons(priv, result);
400  }
401  // append the reduction clauses if any
402  if(red != NIL) {
403  result = gen_nconc(red, result);
404  }
405  // merge the if condition if needed
406  if(policy != IGNORE_IF_POLICY) {
407  expression expr_if = merge_conditions(if_cond, policy, l);
408  // encapsulate the condition into the if clause
409  expr_if = pragma_if_as_expr(expr_if);
410  // append the if clause to the omp parallel for
411  result = gen_expression_cons(expr_if, result);
412  }
413  return result;
414 }
if_clause_policy
that is all for ri-util-local.h
@ AND_IF_POLICY
@ OR_IF_POLICY
@ IGNORE_IF_POLICY
bool expression_equal_in_list_p(expression e, list le)
This function returns true, if there exists an expression equal in the list false,...
Definition: expression.c:566
static expression merge_conditions(list l_cond, if_clause_policy policy, language l)
Definition: pragma.c:104
expression pragma_if_as_expr(expression arg)
Definition: pragma.c:184
list pragma_omp_parallel_for_as_exprs(void)
Definition: pragma.c:236
static if_clause_policy get_if_clause_policy(void)
Definition: pragma.c:88
expression pragma_private_as_expr_with_args(list args_expr)
Definition: pragma.c:196
#define PRAGMA(x)
PRAGMA.
Definition: ri.h:1991
#define pragma_expression_p(x)
Definition: ri.h:2034
#define extension_pragma(x)
Definition: ri.h:1295
#define EXTENSION(x)
EXTENSION.
Definition: ri.h:1253
#define pragma_expression(x)
Definition: ri.h:2036

References AND_IF_POLICY, call_arguments, exp, EXPRESSION, expression_call(), expression_equal_in_list_p(), EXTENSION, extension_pragma, FOREACH, gen_expression_cons(), gen_nconc(), get_if_clause_policy(), IGNORE_IF_POLICY, is_expression_omp_for_p(), is_expression_omp_if_p(), is_expression_omp_omp_p(), is_expression_omp_parallel_p(), is_expression_omp_private_p(), is_expression_omp_reduction_p(), merge_conditions(), NIL, OR_IF_POLICY, pips_assert, pips_internal_error, PRAGMA, pragma_expression, pragma_expression_p, pragma_if_as_expr(), pragma_omp_parallel_for_as_exprs(), pragma_private_as_expr_with_args(), set_add_element(), set_belong_p(), set_free(), set_make(), and set_pointer.

Referenced by merge_on_outer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pragma_omp_parallel_as_exprs()

list pragma_omp_parallel_as_exprs ( void  )
Returns
"omp parallel" as a list of expression

Definition at line 215 of file pragma.c.

215  {
216  // first prepare "omp" as an expression
218  call c = make_call (omp, NULL);
219  syntax s = make_syntax_call (c);
221 
222  //secondly prepare "parallel" as an expression
224  c = make_call (parallel, NULL);
225  s = make_syntax_call (c);
226  expression expr_parallel = make_expression (s, normalized_undefined);
227 
228  // build the list of expression
229  list result = CONS(EXPRESSION, expr_omp, NIL);
230  result = gen_expression_cons (expr_parallel, result);
231  return result;
232 }
#define OMP_OMP_FUNCTION_NAME
#define OMP_PARALLEL_FUNCTION_NAME

References CONS, CreateIntrinsic(), EXPRESSION, gen_expression_cons(), make_call(), make_expression(), make_syntax_call(), NIL, normalized_undefined, OMP_OMP_FUNCTION_NAME, and OMP_PARALLEL_FUNCTION_NAME.

Referenced by pragma_omp_parallel_for_as_exprs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pragma_omp_parallel_for_as_exprs()

list pragma_omp_parallel_for_as_exprs ( void  )
Returns
"omp parallel for" as an expression

Definition at line 236 of file pragma.c.

236  {
237  // first prepare "for" as an expression
239  call c = make_call (e, NULL);
240  syntax s = make_syntax_call (c);
242 
243  //secondly get "omp parallel as an expr and concat
245  result = gen_expression_cons (expr_for, result);
246 
247  return result;
248 }
#define OMP_FOR_FUNCTION_NAME
list pragma_omp_parallel_as_exprs(void)
Definition: pragma.c:215

References CreateIntrinsic(), gen_expression_cons(), make_call(), make_expression(), make_syntax_call(), normalized_undefined, OMP_FOR_FUNCTION_NAME, and pragma_omp_parallel_as_exprs().

Referenced by omp_pragma_expr_for(), pragma_omp_merge_expr(), and reductions_get_omp_pragma_expr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pragma_private_as_expr()

expression pragma_private_as_expr ( list  args_ent)
Returns
"private (x,y)" as an expression
Parameters
arg,theprivate variables as a list of entities
Parameters
args_entrgs_ent

Definition at line 207 of file pragma.c.

207  {
208  // build the privates variable as a list of expression
209  list args_expr = entities_to_expressions (args_ent);
210  return pragma_private_as_expr_with_args (args_expr);
211 }
list entities_to_expressions(list l_ent)
build a list of expressions from a list of entities
Definition: entity.c:2703

References entities_to_expressions(), and pragma_private_as_expr_with_args().

Referenced by omp_append_private_clause().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pragma_private_as_expr_with_args()

expression pragma_private_as_expr_with_args ( list  args_expr)
Returns
"private (x,y)" as an expression
Parameters
args_expr,theprivate variables as a list of expression
Parameters
args_exprrgs_expr

Definition at line 196 of file pragma.c.

196  {
198  call c = make_call (omp, args_expr);
199  syntax s = make_syntax_call (c);
201  return expr_omp;
202 }
#define OMP_PRIVATE_FUNCTION_NAME

References CreateIntrinsic(), make_call(), make_expression(), make_syntax_call(), normalized_undefined, and OMP_PRIVATE_FUNCTION_NAME.

Referenced by pragma_omp_merge_expr(), and pragma_private_as_expr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print_C_common_layout()

void print_C_common_layout ( FILE *  fd,
entity  c,
bool  debug_p 
)

Look for variables aliased with a variable in this common

Parameters
fdd
debug_pebug_p

Definition at line 129 of file declarations.c.

130 {
132  list members = get_common_members(c, mod, false);
133  list equiv_members = NIL;
134 
135  (void) fprintf(fd, "\nLayout for memory area \"%s\" of size %td: \n",
137 
138  if(ENDP(members)) {
139  pips_assert("An empty area has size 0", area_size(type_area(entity_type(c))) ==0);
140  (void) fprintf(fd, "\t* empty area *\n\n");
141  }
142  else {
143  if(area_size(type_area(entity_type(c))) == 0)
144  {
145  if(debug_p) {
146  user_warning("print_common_layout","Non-empty area %s should have a final size greater than 0\n",
147  entity_module_name(c));
148  }
149  else {
150  // The non-empty area can have size zero if the entity is extern
151  //pips_internal_error(// "Non-empty area %s should have a size greater than 0",
152  // entity_module_name(c));
153  }
154  }
155  MAP(ENTITY, m,
156  {
157  pips_assert("RAM storage",
159  int s;
160  // There can be a Array whose size is not known (Dynamic Variables)
161  SizeOfArray(m, &s);
162 
163  pips_assert("An area has no offset as -1",
166  (void) fprintf(fd,
167  "\tDynamic Variable %s, \toffset = UNKNOWN, \tsize = DYNAMIC\n",
168  entity_name(m));
169  }
171 
172  (void) fprintf(fd,
173  "\tExternal Variable %s,\toffset = UNKNOWN,\tsize = %d\n",
174  entity_name(m),s);
175  }
176  else {
177  (void) fprintf(fd,
178  "\tVariable %s,\toffset = %td,\tsize = %d\n",
179  entity_name(m),
181  s);
182  }
183  //}
184  },
185  members);
186  (void) fprintf(fd, "\n");
187  /* Look for variables aliased with a variable in this common */
188  MAP(ENTITY, m,
189  {
191 
192  equiv_members = arguments_union(equiv_members, equiv);
193  },
194  members);
195 
196  if(!ENDP(equiv_members)){
197 
198  equiv_members = arguments_difference(equiv_members, members);
199  if(!ENDP(equiv_members)) {
200  sort_list_of_entities(equiv_members);
201 
202  (void) fprintf(fd, "\tVariables aliased to this common:\n");
203 
204  MAP(ENTITY, m,
205  {
206  int asize;
207  pips_assert("RAM storage", storage_ram_p(entity_storage(m)));
208  if (!SizeOfArray(m, &asize))
209  asize = -1;
210  (void) fprintf(fd,
211  "\tVariable %s,\toffset = %td,\tsize = %d\n",
212  entity_name(m),
214  asize);
215  },
216  equiv_members);
217  (void) fprintf(fd, "\n");
218  gen_free_list(equiv_members);
219  }
220  }
221  }
222  gen_free_list(members);
223 }
cons * arguments_union(cons *a1, cons *a2)
cons * arguments_union(cons * a1, cons * a2): returns a = union(a1, a2) where a1 and a2 are lists of ...
Definition: arguments.c:116
cons * arguments_difference(cons *a1, cons *a2)
set difference: a1 - a2 ; similar to set intersection
Definition: arguments.c:233
#define UNDEFINED_RAM_OFFSET
list get_common_members(entity common, entity __attribute__((unused)) module, bool __attribute__((unused)) only_primary)
The fprint_functional() and fprint_environment() functions are moved from syntax/declaration....
Definition: declarations.c:106
void sort_list_of_entities(list l)
sorted in place.
Definition: entity.c:1358

References area_size, arguments_difference(), arguments_union(), DYNAMIC_RAM_OFFSET, ENDP, ENTITY, entity_module_name(), entity_name, entity_storage, entity_type, fprintf(), gen_free_list(), get_common_members(), get_current_module_entity(), MAP, NIL, pips_assert, ram_offset, ram_shared, SizeOfArray(), sort_list_of_entities(), storage_ram, storage_ram_p, type_area, UNDEFINED_RAM_OFFSET, and user_warning.

Referenced by fprint_any_environment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print_common_layout()

void print_common_layout ( FILE *  fd,
entity  c,
bool  debug_p 
)

list members = area_layout(type_area(entity_type(c)));

list members = common_members_of_module(c, mod , true);

for debugging only

Look for variables declared in this common by some procedures which declares it. The procedures involved depend on the ordering of the parser steps by pipsmake and the user. Maybe, the list should be filtered and restricted to the current module: YES!

Consistency check between the area layout and the ram section

Look for variables aliased with a variable in this common

Parameters
fdd
debug_pebug_p

Definition at line 207 of file area.c.

208 {
210  /* list members = area_layout(type_area(entity_type(c))); */
211  /* list members = common_members_of_module(c, mod , true); */
212  /* for debugging only */
213  list members = common_members_of_module(c, mod , false);
214  list equiv_members = NIL;
215 
216  (void) fprintf(fd,"\nLayout for common /%s/ of size %td:\n",
218 
219  if(ENDP(members)) {
220  pips_assert("An empty area has size 0", area_size(type_area(entity_type(c)))==0);
221  (void) fprintf(fd, "\t* empty area *\n\n");
222  }
223  else {
224  if(area_size(type_area(entity_type(c)))==0
225  // The next condition cannot be tested outside of the Fortran parser
226  // && (common_size_map == hash_table_undefined || common_to_size(c)==0)
227  && !heap_area_p(c)
228  && !stack_area_p(c)) {
229  if(debug_p) {
230  pips_user_warning("Non-empty area %s should have a final size greater than 0\n",
231  entity_module_name(c));
232  }
233  else {
234  pips_internal_error("Non-empty area %s should have a size greater than 0",
235  entity_module_name(c));
236  }
237  }
238  /* Look for variables declared in this common by *some* procedures
239  * which declares it. The procedures involved depend on the ordering
240  * of the parser steps by pipsmake and the user. Maybe, the list should
241  * be filtered and restricted to the current module: YES!
242  */
243  FOREACH(ENTITY, m, members)
244  {
245  pips_assert("RAM storage",
247  if(ram_function(storage_ram(entity_storage(m)))==mod) {
248  int s;
249 
250  /* Consistency check between the area layout and the ram section */
252  pips_internal_error("Variable %s declared in area %s but allocated in area %s",
255  }
256 
257  if(!SizeOfArray(m, &s)) {
260  s = -1;
261  }
262  else {
263  pips_user_warning("Varying size of array \"%s\"\n",
264  entity_name(m));
265  // VLA are now supported by PIPS in the stack_area and the dynamic_area
266  pips_internal_error("Fortran standard prohibit varying size array\n");
267  }
268  }
269 
270  (void) fprintf(fd,
271  "\tVariable %s,\toffset = %td,\tsize = %d\n",
272  entity_name(m),
274  s);
275 
276  }
277  }
278  (void) fprintf(fd, "\n");
279 
280  /* Look for variables aliased with a variable in this common */
281  FOREACH(ENTITY, m, members)
282  {
284  equiv_members = arguments_union(equiv_members, equiv);
285  }
286 
287  if(!ENDP(equiv_members)){
288 
289  equiv_members = arguments_difference(equiv_members, members);
290  if(!ENDP(equiv_members)) {
291  sort_list_of_entities(equiv_members);
292 
293  (void) fprintf(fd, "\tVariables aliased to this common:\n");
294 
295  FOREACH(ENTITY, m, equiv_members)
296  {
297  pips_assert("RAM storage",
299  (void) fprintf(fd,
300  "\tVariable %s,\toffset = %td,\tsize = %d\n",
301  entity_name(m),
303  array_size(m));
304  }
305  (void) fprintf(fd, "\n");
306  gen_free_list(equiv_members);
307  }
308  }
309  }
310  gen_free_list(members);
311 }
static int array_size(dim)
ARRAY_SIZE returns the number of elements in the array whose dimension list is DIM.
Definition: genClib.c:155
entity HeapArea
Definition: area.c:59
entity StackArea
Definition: area.c:60
list common_members_of_module(entity common, entity module, bool only_primary)
returns the list of entity to appear in the common declaration.
Definition: entity.c:1741

References area_size, arguments_difference(), arguments_union(), array_size(), common_members_of_module(), ENDP, ENTITY, entity_local_name(), entity_module_name(), entity_name, entity_storage, entity_type, FOREACH, fprintf(), gen_free_list(), get_current_module_entity(), heap_area_p(), HeapArea, module_local_name(), NIL, pips_assert, pips_internal_error, pips_user_warning, ram_function, ram_offset, ram_section, ram_shared, SizeOfArray(), sort_list_of_entities(), stack_area_p(), StackArea, storage_ram, storage_ram_p, and type_area.

Referenced by fprint_any_environment(), MakeEntryCommon(), and update_user_common_layouts().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print_entities()

void print_entities ( list  l)

Definition at line 167 of file entity.c.

168 {
169  FOREACH(ENTITY, e, l) {
170  fprintf(stderr, "%s ", entity_name(e));
171  }
172 }

References ENTITY, entity_name, FOREACH, and fprintf().

Referenced by actual_c_parser(), add_prettyprint_control_list_to_declaration_statement(), alias_propagation(), basic_supporting_entities(), basic_supporting_types(), c_code_string(), clean_up_sequences_rewrite(), compilation_unit_text(), controlize(), controlize_list(), copy_from_call(), copy_from_test(), cusq_ctxt_init(), enum_supporting_entities(), filtered_declaration_list(), find_enum_of_member(), generic_constant_expression_supporting_entities(), initialized_by_equivalent_variable_p(), insert_common_declaration(), kernel_data_mapping(), loop_nest_to_local_variables(), loop_private_variables_as_entites(), MakeBlock(), merge_on_outer(), module_declarations(), outliner_scan(), outliner_statements_referenced_entities(), recursive_functional_type_supporting_entities(), recursive_functional_type_supporting_types(), recursive_type_supporting_entities(), recursive_type_supporting_types(), redeclaration_enter_statement(), region_dynamic_var_elim(), region_exact_projection_along_parameters(), region_exact_projection_along_variables(), region_non_exact_projection_along_parameters(), region_non_exact_projection_along_variables(), regions_transformer_apply(), sesamify(), smalltalk_code_string(), TakeDerivedEntities(), transformer_formal_parameter_projection(), transformer_projection_with_redundancy_elimination_and_check(), transformer_return_value_projection(), update_referenced_entities(), update_unstructured_declarations(), UseFormalArguments(), variable_private_to_loop_p(), variable_type_supporting_entities(), variable_type_supporting_types(), and xml_code_string().

+ Here is the call graph for this function:

◆ print_entity_set()

void print_entity_set ( set  s)

For some reason, here entity is not capitalized.

Definition at line 174 of file entity.c.

175 {
176  /* For some reason, here entity is not capitalized. */
177  SET_FOREACH(entity, e, s) {
178  fprintf(stderr, "%s ", entity_name(e));
179  }
180 }
#define SET_FOREACH(type_name, the_item, the_set)
enumerate set elements in their internal order.
Definition: newgen_set.h:78

References entity_name, fprintf(), and SET_FOREACH.

+ Here is the call graph for this function:

◆ print_homogeneous_arguments()

void print_homogeneous_arguments ( list  args,
const char *  variable_nameentity 
)

arguments.c

arguments.c

Called "arguments" because the package was developped within the transformer library where entity lists were used to represent transformer arguments. No specific link with transformers. Now used here and there and moved into ri-util. package "arguments"

Basic routines dealing with the arguments field of transformers (i.e. list of entities, so it should be put in ri-util like many such packages written for pips)

Hash tables were not used because the argument lists are very short

Francois Irigoin, April 1990

Parameters
argsrgs
variable_nameariable_name

Definition at line 54 of file arguments.c.

55 {
56  if(ENDP(args))
57  (void) fprintf(stderr, "(nil)\n");
58  else {
59  MAPL(c, {entity e = ENTITY(CAR(c));
60  (void) fprintf(stderr,
61  c==args ? "%s" : ", %s",
62  e==entity_undefined? "entity_undefined" : variable_name(e));},
63  args);
64  (void) putc('\n',stderr);
65  }
66 }

References CAR, ENDP, ENTITY, entity_undefined, fprintf(), MAPL, and variable_name().

Referenced by fprint_transformer(), and print_arguments().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print_ordering_to_statement()

void print_ordering_to_statement ( void  )

Dump the ordering with the corresponding statement address.

Definition at line 71 of file ordering.c.

72 {
73  HASH_MAP(ko, vs, {
74  _int o = (_int) ko;
75  statement s = (statement) vs;
76 
77  fprintf(stderr,"%td (%td,%td)->%s\n",
81 }
string statement_identification(statement)
Like external_statement_identification(), but with internal information, the hexadecimal address of t...
Definition: statement.c:1700
#define ORDERING_NUMBER(o)
#define ORDERING_STATEMENT(o)

References fprintf(), HASH_MAP, ORDERING_NUMBER, ORDERING_STATEMENT, OrderingToStatement, and statement_identification().

Referenced by prettyprint_dependence_graph(), prettyprint_dot_dependence_graph(), and xml_Chain_Graph().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print_type()

void print_type ( type  t)

For debugging.

Definition at line 111 of file type.c.

112 {
113  debug_on("RI-UTIL_DEBUG_LEVEL");
114  if(t==NULL)
115  fprintf(stderr, "type is NULL.\n");
116  else if(type_undefined_p(t))
117  fprintf(stderr, "type is undefined.\n");
118  else if(type_domain_number(t)!=type_domain)
119  fprintf(stderr, "The argument is not a type.\n");
120  else {
121  // Might be better to pass true, or even more information, to see
122  // what happens with the unknown type
123  list pdl = NIL;
124  list wl = words_type(t, &pdl, false);
125  gen_free_list(pdl);
126  dump_words(wl);
127  }
128  debug_off();
129 }
list words_type(type obj, list *ppdl, bool argument_p)
obj is the type to describe
Definition: declarations.c:821
#define type_domain_number(x)
Definition: ri.h:2939
#define type_domain
newgen_transformer_domain_defined
Definition: ri.h:434
void dump_words(list lw)
Definition: print.c:251

Referenced by points_to_cell_types_compatibility().

+ Here is the caller graph for this function:

◆ push_statement_on_statement_global_stack()

void push_statement_on_statement_global_stack ( statement  st)
Parameters
stt

Definition at line 333 of file static.c.

334 {
335  stack_push((void *) st, statement_global_stack);
336 }
void stack_push(void *, stack)
stack use
Definition: stack.c:373

References stack_push(), and statement_global_stack.

Referenced by memorize_precondition_for_summary_precondition(), partial_eval_statement(), statement_to_points_to(), statement_to_postcondition(), statement_to_transformer(), xml_Argument(), xml_Boxes(), xml_Call(), xml_Chain_Graph(), xml_Loop(), xml_Loops(), and xml_Task().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Pvecteur_to_assign_statement()

statement Pvecteur_to_assign_statement ( entity  var,
Pvecteur  v 
)

generates var = linear expression from the Pvecteur.

var is removed if necessary.

??? should manage an (positive remainder) integer divide ? Have a look to make_constraint_expression instead?

Parameters
varar

Definition at line 1720 of file expression.c.

1722 {
1723  statement result;
1724  Pvecteur vcopy;
1725  Value coef;
1726 
1727  coef = vect_coeff((Variable) var, v);
1729 
1730  vcopy = vect_dup(v);
1731 
1732  if (value_notzero_p(coef)) vect_erase_var(&vcopy, (Variable) var);
1733  if (value_one_p(coef)) vect_chg_sgn(vcopy);
1734 
1736  make_vecteur_expression(vcopy));
1737  vect_rm(vcopy);
1738 
1739  return result;
1740 }
#define value_le(v1, v2)
#define value_one_p(val)
#define value_abs(val)
statement make_assign_statement(expression, expression)
Definition: statement.c:583

References assert, entity_to_expression(), make_assign_statement(), make_vecteur_expression(), value_abs, value_le, value_notzero_p, VALUE_ONE, value_one_p, vect_chg_sgn(), vect_coeff(), vect_dup(), vect_erase_var(), and vect_rm().

Referenced by generate_deducables(), and hpfc_compute_lid().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Pvecteur_to_expression()

expression Pvecteur_to_expression ( Pvecteur  vect)

AP, sep 25th 95 : some usefull functions moved from static_controlize/utils.c.

rather use make_vecteur_expression which was already there

Parameters
vectect

Definition at line 1825 of file expression.c.

1826 {
1827  return make_vecteur_expression(vect);
1828 }

References make_vecteur_expression().

Referenced by analyze_expression(), build_first_comb(), build_third_comb(), do_gather_all_expressions_perms(), do_terapix_warmup_patching(), free_guards(), fusion(), fusion_buffer(), Hierarchical_tiling(), include_trans_on_LC_in_ref(), make_lin_op_exp(), make_reindex(), outliner_smart_references_computation(), prgm_mapping(), reconfig_expression(), simplify_dimension(), simplify_relational_expression(), Tiling2_buffer(), Tiling_buffer_allocation(), and translate_to_module_frame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qualified_variable_p()

bool qualified_variable_p ( entity  v,
unsigned int  is_qualified 
)

The variable may turn out to be a function.

Parameters
is_qualifieds_qualified

Definition at line 1666 of file variable.c.

1667 {
1668  bool qualified_p = false;
1669  type t = entity_type(v);
1670  if(type_variable_p(t)) {
1671  // ifdebug(1) pips_assert("the entity must have type variable",
1672  // type_variable_p(t));
1673  // FI: no idea if volatile can he hidden in a typedef...
1674  variable vt = type_variable(t);
1675  list ql = variable_qualifiers(vt);
1676 
1677  FOREACH(QUALIFIER, q, ql) {
1678  if(qualifier_tag(q)==is_qualified) {
1679  qualified_p = true;
1680  break;
1681  }
1682  }
1683  }
1684  return qualified_p;
1685 }
#define qualifier_tag(x)
Definition: ri.h:2175
#define QUALIFIER(x)
QUALIFIER.
Definition: ri.h:2106

References entity_type, FOREACH, QUALIFIER, qualifier_tag, type_variable, type_variable_p, and variable_qualifiers.

Referenced by const_variable_p().

+ Here is the caller graph for this function:

◆ qualifier_equal_p()

bool qualifier_equal_p ( qualifier  q1,
qualifier  q2 
)
Parameters
q11
q22

Definition at line 5420 of file type.c.

5421 {
5422  bool equal_p = qualifier_tag(q1)==qualifier_tag(q2);
5423 
5424  return equal_p;
5425 }

References qualifier_tag.

Referenced by insert_qualifier(), and qualifiers_equal_p().

+ Here is the caller graph for this function:

◆ qualifier_to_string()

string qualifier_to_string ( qualifier  q)

Definition at line 5427 of file type.c.

5428 {
5429  string s = string_undefined;
5430  switch (qualifier_tag(q)) {
5431  case is_qualifier_register:
5432  s = "register";
5433  break;
5434  case is_qualifier_const:
5435  s = "const";
5436  break;
5437  case is_qualifier_restrict:
5438  s = "restrict";
5439  break;
5440  case is_qualifier_volatile:
5441  s = "volatile";
5442  break;
5443  case is_qualifier_auto:
5444  s = "auto";
5445  break;
5446  default :
5447  pips_internal_error("unexpected tag %d", qualifier_tag(q));
5448  }
5449  return s;
5450 }
@ is_qualifier_volatile
Definition: ri.h:2129
@ is_qualifier_register
Definition: ri.h:2130
@ is_qualifier_restrict
Definition: ri.h:2128
@ is_qualifier_auto
Definition: ri.h:2131

References is_qualifier_auto, is_qualifier_const, is_qualifier_register, is_qualifier_restrict, is_qualifier_volatile, pips_internal_error, qualifier_tag, and string_undefined.

Referenced by insert_qualifier().

+ Here is the caller graph for this function:

◆ qualifiers_const_p()

bool qualifiers_const_p ( list  ql)

Check that a qualifier list contains the const qualifier.

Parameters
qll

Definition at line 5453 of file type.c.

5454 {
5455  bool const_p = false;
5456  FOREACH(QUALIFIER, q, ql) {
5457  if(qualifier_const_p(q)) {
5458  const_p = true;
5459  break;
5460  }
5461  }
5462  return const_p;
5463 }
#define qualifier_const_p(x)
Definition: ri.h:2176

References FOREACH, QUALIFIER, and qualifier_const_p.

Referenced by generic_c_words_simplified_entity(), and type_with_const_qualifier_p().

+ Here is the caller graph for this function:

◆ qualifiers_equal_p()

bool qualifiers_equal_p ( list  dims1,
list  dims2 
)
Parameters
dims1ims1
dims2ims2

Definition at line 758 of file type.c.

758  {
759  return gen_equals(dims1,dims2,(gen_eq_func_t)qualifier_equal_p);
760 }
bool qualifier_equal_p(qualifier q1, qualifier q2)
Definition: type.c:5420

References gen_equals(), and qualifier_equal_p().

Referenced by add_declaration_to_declaration_statement_p(), and generic_variable_equal_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qualifiers_restrict_p()

bool qualifiers_restrict_p ( list  ql)

Check that a qualifier list contains the restrict qualifier.

Parameters
qll

Definition at line 5466 of file type.c.

5467 {
5468  bool restrict_p = false;
5469  FOREACH(QUALIFIER, q, ql) {
5470  if(qualifier_restrict_p(q)) {
5471  restrict_p = true;
5472  break;
5473  }
5474  }
5475  return restrict_p;
5476 }
#define qualifier_restrict_p(x)
Definition: ri.h:2179

References FOREACH, QUALIFIER, and qualifier_restrict_p.

Referenced by generic_c_words_simplified_entity().

+ Here is the caller graph for this function:

◆ rand_effects_entity_p()

bool rand_effects_entity_p ( entity  e)

Definition at line 1152 of file entity.c.

1153 {
1155  return (same_entity_p(e, rand_gen_ent));
1156 }
static entity rand_gen_ent
effects package entities
Definition: entity.c:52

References rand_gen_ent, same_entity_p(), and set_internal_static_entities().

Referenced by common_region_translation(), and effects_package_entity_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ range_count()

bool range_count ( range  r,
intptr_t pcount 
)

The range count only can be evaluated if the three range expressions are constant and if the increment is non zero.

On failure, a zero count is returned. See also SizeOfRange().

inc>0

Parameters
pcountcount

Definition at line 979 of file eval.c.

980 {
981  bool success = false;
982  intptr_t l, u, inc;
983 
987  && inc != 0 ) {
988 
989  if(inc<0) {
990  * pcount = ((l-u)/(-inc))+1;
991  }
992  else /* inc>0 */ {
993  * pcount = ((u-l)/inc)+1;
994  }
995 
996  if(* pcount < 0)
997  *pcount = 0;
998 
999  success = true;
1000  }
1001  else {
1002  * pcount = 0;
1003  success = false;
1004  }
1005 
1006  return success;
1007 }
bool success
Definition: gpips-local.h:59

References expression_integer_value(), intptr_t, range_increment, range_lower, and range_upper.

Referenced by implied_do_reference_number().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ range_equal_p()

bool range_equal_p ( range  r1,
range  r2 
)
Parameters
r11
r22

Definition at line 1522 of file expression.c.

1523 {
1524  return expression_equal_p(range_lower(r1), range_lower(r2))
1527 }

References expression_equal_p(), range_increment, range_lower, and range_upper.

Referenced by free_guards(), and syntax_equal_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ range_to_expression()

expression range_to_expression ( range  r,
enum range_to_expression_mode  mode 
)

computes the distance between the lower bound and the upper bound of the range

Parameters
rrange to analyse
modewether we compute the distance or count the number of iterations
Returns
appropriate distance or count

Definition at line 963 of file eval.c.

964 {
971  return distance;
972 }
#define range_to_nbiter_p(e)

References copy_expression(), DIVIDE_OPERATOR_NAME, int_to_expression(), make_op_exp(), MINUS_OPERATOR_NAME, PLUS_OPERATOR_NAME, range_increment, range_lower, range_to_nbiter_p, and range_upper.

Referenced by add_loop_parallel_threshold(), build_iteration_list(), do_loop_expansion(), do_loop_expansion_init(), sesamify(), simd_loop_unroll(), simdizer_auto_tile(), and terapix_loop_handler().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ realign_directive_p()

bool realign_directive_p ( entity  f)

Definition at line 62 of file hpfc.c.

63 {
64  return top_level_entity_p(f) &&
66 }
#define REALIGN_SUFFIX

References entity_local_name(), f(), HPF_PREFIX, REALIGN_SUFFIX, same_string_p, and top_level_entity_p().

Referenced by continue_propagation_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ recursive_functional_type_supporting_entities()

list recursive_functional_type_supporting_entities ( list  sel,
set  vt,
functional  f 
)
Parameters
selel
vtt

Definition at line 3977 of file type.c.

3978 {
3979  ifdebug(8) {
3980  pips_debug(8, "Begin: ");
3981  print_entities(sel);
3982  fprintf(stderr, "\n\n");
3983  }
3984 
3987  {
3989  dummy d = parameter_dummy(p);
3990  if(dummy_identifier_p(d))
3992  }
3993 
3995  list tmp =NIL;
3996 
3997  FOREACH(ENTITY,e,sel)
3998  {
4000  tmp=CONS(ENTITY,e,tmp);
4001  }
4002  gen_free_list(sel);
4003  sel=gen_nreverse(tmp);
4004 
4005  ifdebug(8) {
4006  pips_debug(8, "End: ");
4007  print_entities(sel);
4008  fprintf(stderr, "\n\n");
4009  }
4010 
4011  return sel;
4012 }
struct paramStruct params
@ set_string
Definition: newgen_set.h:42
#define dummy_identifier(x)
Definition: ri.h:1033
#define parameter_dummy(x)
Definition: ri.h:1823
#define dummy_identifier_p(x)
Definition: ri.h:1031

References CONS, dummy_identifier, dummy_identifier_p, ENTITY, entity_user_name(), f(), FOREACH, fprintf(), functional_parameters, functional_result, gen_free_list(), gen_nreverse(), ifdebug, NIL, PARAMETER, parameter_dummy, parameter_type, params, pips_debug, print_entities(), recursive_type_supporting_entities(), set_add_element(), set_belong_p(), set_make(), and set_string.

Referenced by functional_type_supporting_entities(), and recursive_type_supporting_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ recursive_type_supporting_entities()

list recursive_type_supporting_entities ( list  sel,
set  vt,
type  t 
)

varargs do not depend on any other entities

This could be considered a pips_internal_error(), at least when the internal representation is built.

This is weird, but labels also are declared

Parameters
selel
vtt

Definition at line 4283 of file type.c.

4284 {
4285 
4286  ifdebug(8) {
4287  pips_debug(8, "Begin: ");
4288  print_entities(sel);
4289  fprintf(stderr, "\n\n");
4290  }
4291 
4292  if(!set_belong_p(vt, t)) {
4293  vt = set_add_element(vt, vt, t);
4294  if(type_functional_p(t))
4296  else if(type_variable_p(t))
4298  else if(type_varargs_p(t)) {
4299  /* varargs do not depend on any other entities */
4300  //pips_user_warning("varargs case not implemented yet\n"); /* do nothing? */
4301  type vart = type_varargs(t);
4302  sel = recursive_type_supporting_entities(sel, vt, vart);
4303  ;
4304  }
4305  else if(type_void_p(t))
4306  ;
4307  else if(type_struct_p(t)) {
4308  list sse = type_struct(t);
4309 
4310  FOREACH(ENTITY, se, sse) {
4311  sel = recursive_type_supporting_entities(sel, vt, entity_type(se));
4312  }
4313  }
4314  else if(type_union_p(t)) {
4315  list use = type_union(t);
4316 
4317  FOREACH(ENTITY, se, use) {
4318  sel = recursive_type_supporting_entities(sel, vt, entity_type(se));
4319  }
4320  }
4321  else if(type_enum_p(t)) {
4322  list ese = type_enum(t);
4323 
4324  FOREACH(ENTITY, se, ese) {
4325  sel = recursive_type_supporting_entities(sel, vt, entity_type(se));
4326  }
4327  }
4328  else if(type_unknown_p(t))
4329  /* This could be considered a pips_internal_error(), at least when
4330  the internal representation is built. */
4331  ;
4332  else if(type_statement_p(t))
4333  /* This is weird, but labels also are declared*/
4334  ;
4335  else
4336  pips_internal_error("Unexpected type with tag %d", type_tag(t));
4337  }
4338  ifdebug(8) {
4339  pips_debug(8, "End: ");
4340  print_entities(sel);
4341  fprintf(stderr, "\n\n");
4342  }
4343 
4344  return sel;
4345 }
list variable_type_supporting_entities(list sel, set vt, variable v)
Definition: type.c:4254

References ENTITY, entity_type, FOREACH, fprintf(), ifdebug, pips_debug, pips_internal_error, print_entities(), recursive_functional_type_supporting_entities(), recursive_type_supporting_entities(), set_add_element(), set_belong_p(), type_enum, type_enum_p, type_functional, type_functional_p, type_statement_p, type_struct, type_struct_p, type_tag, type_union, type_union_p, type_unknown_p, type_varargs, type_varargs_p, type_variable, type_variable_p, type_void_p, and variable_type_supporting_entities().

Referenced by basic_supporting_entities(), basic_supporting_types(), generic_constant_expression_supporting_entities(), recursive_functional_type_supporting_entities(), recursive_type_supporting_entities(), and type_supporting_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redistribute_directive_p()

bool redistribute_directive_p ( entity  f)

Definition at line 68 of file hpfc.c.

69 {
70  return top_level_entity_p(f) &&
72 }
#define REDISTRIBUTE_SUFFIX

References entity_local_name(), f(), HPF_PREFIX, REDISTRIBUTE_SUFFIX, same_string_p, and top_level_entity_p().

Referenced by continue_propagation_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reference_add_unbounded_subscripts()

void reference_add_unbounded_subscripts ( reference  r,
type  t 
)

Definition at line 300 of file expression.c.

301 {
303 }
void generic_reference_add_fixed_subscripts(reference r, type t, bool zero_p)
Add a set of zero subscripts to a reference "r" by side effect.
Definition: expression.c:236

References generic_reference_add_fixed_subscripts().

Referenced by points_to_cell_add_fixed_subscripts().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reference_add_zero_subscript()

void reference_add_zero_subscript ( reference  r)

No check on reference r.

This may generate an illegal reference if not called properly

Definition at line 267 of file expression.c.

268 {
271  CONS(EXPRESSION, z, NIL));
272 }

References CONS, EXPRESSION, gen_nconc(), int_to_expression(), NIL, and reference_indices.

Referenced by points_to_cell_add_zero_subscript().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reference_add_zero_subscripts()

void reference_add_zero_subscripts ( reference  r,
type  t 
)

Definition at line 261 of file expression.c.

262 {
264 }

References generic_reference_add_fixed_subscripts().

Referenced by anywhere_source_to_sinks(), points_to_cell_add_fixed_subscripts(), points_to_cell_types_compatibility(), reference_add_field_dimension(), and struct_assignment_to_points_to().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reference_complete_with_zero_subscripts()

void reference_complete_with_zero_subscripts ( reference  r)

Reference r to an array maybe partial, as is possible in C: with declaration "int a[10][10]", references "a", "a[i]" and "a[i][j]" are all legal.

The subscript list of reference r is completed with 0 subscript to reference an array element.

Definition at line 278 of file expression.c.

279 {
280  list rsl = reference_indices(r);
281  entity e = reference_variable(r);
283  pips_assert("t is a type of kind variable", type_variable_p(t));
284  variable v = type_variable(t);
285  list dl = variable_dimensions(v);
286 
287  if(gen_length(dl)>gen_length(rsl)) {
288  FOREACH(EXPRESSION, rs, rsl)
289  POP(dl);
290  list sl = NIL; // subscript list
291  FOREACH(DIMENSION, d, dl) {
292  // expression s = zero_p? int_to_expression(0) : make_unbounded_expression();
294  sl = CONS(EXPRESSION, s, sl);
295  }
297  }
298 }

References CONS, DIMENSION, entity_basic_concrete_type(), EXPRESSION, FOREACH, gen_length(), gen_nconc(), int_to_expression(), NIL, pips_assert, POP, reference_indices, reference_variable, type_variable, type_variable_p, and variable_dimensions.

Referenced by points_to_cell_complete_with_zero_subscripts().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reference_equal_p()

bool reference_equal_p ( reference  r1,
reference  r2 
)
Parameters
r11
r22

Definition at line 1500 of file expression.c.

1501 {
1502  entity v1 = reference_variable(r1);
1503  entity v2 = reference_variable(r2);
1504 
1505  list dims1 = reference_indices(r1);
1506  list dims2 = reference_indices(r2);
1507 
1508  if(v1 != v2) {
1509  if(entity_field_p(v1) && entity_field_p(v2)) {
1510  // FI: because of separate compilation, the same field is
1511  // represented by different entities
1512  return same_field_entity_p(v1, v2);
1513  }
1514  else
1515  return false;
1516  }
1517 
1518  return gen_equals(dims1,dims2,(gen_eq_func_t)expression_equal_p);
1519 }
bool same_field_entity_p(const entity f1, const entity f2)
Definition: entity.c:1019

References entity_field_p(), expression_equal_p(), gen_equals(), reference_indices, reference_variable, and same_field_entity_p().

Referenced by adg_write_reference_list(), attach_ref_to_stat(), build_successors_with_rhs(), call_flt(), cell_equal_p(), check_alias_args(), check_for_conflict(), checkReplaceReference(), comEngine_replace_reference_in_stat_rwt(), compact_phi_functions(), count_dataflows_on_ref(), create_realFifo_proc(), da_process_list(), daExpressionReplaceReference(), dataflows_on_ref(), dataflows_on_reference(), dmas_invert_p(), do_expression_reduction(), do_reduction_atomization(), do_reduction_detection(), do_reduction_propagation(), effect_sup_difference(), expression_verbose_reduction_p_and_return_increment(), find_or_create_fifo_from_ref(), fsr_reference_flt(), generate_fifo_stats(), generate_fifo_stats2(), generate_scalar_variables(), generate_scalar_variables_from_list(), get_fifoExp_from_ref(), get_HRE_buff_ent_from_ref(), get_indExp_from_ref(), in_effect_list_p(), merge_two_reductions(), opkill_may_reference(), opkill_must_reference(), perform_substitution_in_expression(), points_to_cell_equal_p(), potential_reduction_substitution_valid_p(), process_ref_lists(), reduction_in_statement_walker(), ref_subs_in_exp(), reference_conflicting_p(), reference_conflicting_test_and_update(), reference_dependence_variable_check_and_add(), reference_in_list_p(), reference_list_update(), rename_reduction_ref_walker(), same_reduction_p(), similarity(), stats_has_rw_conf_p(), and syntax_equal_p().

+ Here is the call graph for this function:

◆ reference_ith_index()

expression reference_ith_index ( reference  ref,
int  i 
)

functions for references

returns the ith index of an array reference

Parameters
refef

Definition at line 145 of file util.c.

146 {
147  int count = i;
148  cons *pi = reference_indices(ref);
149 
150  while (pi != NIL && --count > 0)
151  pi = CDR(pi);
152 
153  pips_assert("reference_ith_index", pi != NIL);
154 
155  return(EXPRESSION(CAR(pi)));
156 }

References CAR, CDR, count, EXPRESSION, NIL, pips_assert, ref, and reference_indices.

◆ reference_offset()

expression reference_offset ( reference  ref)

computes the offset of a C reference with its origin

iterate on the dimensions & indices to create the index expression

there may be more dimensions than indices

there may be more indices than dimensions

Parameters
refef

Definition at line 3807 of file expression.c.

3808 {
3809  if(ENDP(reference_indices(ref))) return int_to_expression(0);
3810  else {
3811  expression address_computation = copy_expression(EXPRESSION(CAR(reference_indices(ref))));
3812 
3813  /* iterate on the dimensions & indices to create the index expression */
3816  POP(indices);
3817  if(!ENDP(dims)) POP(dims); // the first dimension is unused
3818  FOREACH(DIMENSION,dim,dims)
3819  {
3822  make_op_exp(
3826  ),
3827  int_to_expression(1));
3828 
3829  if( !ENDP(indices) ) { /* there may be more dimensions than indices */
3830  expression index_expression = EXPRESSION(CAR(indices));
3831  address_computation = make_op_exp(
3833  copy_expression(index_expression),
3834  make_op_exp(
3836  dimension_size,address_computation
3837  )
3838  );
3839  POP(indices);
3840  }
3841  else {
3842  address_computation = make_op_exp(
3844  dimension_size,address_computation
3845  );
3846  }
3847  }
3848 
3849  /* there may be more indices than dimensions */
3851  {
3852  address_computation = make_op_exp(
3854  address_computation,copy_expression(e)
3855  );
3856  }
3857  return address_computation ;
3858  }
3859 }
static list indices
Definition: icm.c:204
int dimension_size(dimension)
this function computes the size of a dimension.
Definition: size.c:491

References CAR, copy_expression(), DIMENSION, dimension_lower, dimension_size(), dimension_upper, ENDP, entity_type, EXPRESSION, FOREACH, indices, int_to_expression(), make_op_exp(), MINUS_OPERATOR_NAME, MULTIPLY_OPERATOR_NAME, PLUS_OPERATOR_NAME, POP, ref, reference_indices, reference_variable, type_variable, ultimate_type(), and variable_dimensions.

Referenced by do_group_constants_terapix(), do_grouping_replace_reference_by_expression_walker(), and sreference_offset().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reference_scalar_p()

bool reference_scalar_p ( reference  r)

This function returns true if Reference r is scalar.

Definition at line 3530 of file expression.c.

3531 {
3532  entity v = reference_variable(r);
3533  assert(!reference_undefined_p(r) && r!=NULL && v!=NULL);
3534  return (reference_indices(r) == NIL && entity_scalar_p(v));
3535 }
#define reference_undefined_p(x)
Definition: ri.h:2303

References assert, entity_scalar_p(), NIL, reference_indices, reference_undefined_p, and reference_variable.

Referenced by call_instruction_to_communications(), do_reduction_propagation(), first_reference_certainly_includes_second_reference_p(), guess_potential_reduction(), loop_nest_movement_generation(), loop_nest_to_wp65_code(), partial_eval_update_operators(), and references_must_conflict_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reference_to_expression()

expression reference_to_expression ( reference  r)

Definition at line 196 of file expression.c.

197 {
198  expression e;
200 
202 
203  return e;
204 }
normalized normalize_reference(reference r)
Definition: normalize.c:592

References is_syntax_reference, make_expression(), make_syntax(), and normalize_reference().

Referenced by alias_check_array_and_scalar_variable_in_caller_flt(), alias_check_array_variable_in_caller_flt(), bound_to_statement(), conflict_is_a_real_conflict_p(), define_node_processor_id(), do_brace_expression_to_statements(), do_expression_reduction(), do_group_constants_terapix(), do_reduction_atomization(), do_reduction_propagation(), entity_to_expression(), expand_points_to_domain(), generate_c1_alpha(), generate_compact(), generate_copy_loop_nest(), generate_full_copy(), generate_get_value_locally(), generate_mmcd_stat_from_ref(), generate_parallel_body(), generate_prelude(), generate_remapping_guard(), generate_update_values_on_computer_and_nodes(), hpfc_buffer_reference(), hpfc_generate_message(), initialization_list_to_statements(), initialize_array_variable(), live_mapping_expression(), loop_annotate(), make_abc_count_statement(), make_check_io_statement(), make_com_loopbody(), make_lInitStats(), make_list_of_flags(), make_loadsave_statement(), make_lSwitchStats(), make_mypos_expression(), make_phi_assign_instruction(), make_read_loopbody(), make_reference_expression(), make_statement_copy_i(), make_write_loopbody(), MakeArrayExpression(), outliner_smart_references_computation(), pointer_reference_to_expression(), pointer_subscript_to_expression(), process_true_call_stat(), reference_to_address_entity(), replace_array_ref_with_fifos(), replace_array_ref_with_fifos2(), replace_reductions_in_statement(), set_array_status_to_target(), split_complex_expression(), st_call_send_or_receive(), st_compute_current_computer(), st_compute_current_owners(), st_compute_ith_local_index(), struct_assignment_to_points_to(), struct_initialization_to_points_to(), Tiling_buffer_allocation(), translate_to_module_frame(), and verify_array_variable().

+ Here is the call graph for this function:

◆ reference_to_type()

type reference_to_type ( reference  ref)

pips_debug(9, "input entity type %s\n",

words_to_string(words_type(entity_type(reference_variable(ref)),

NIL, false)));

pips_debug(9, "reference case \n");

pips_debug(9, "exp_type %s\n", words_to_string(words_type(exp_type, NIL, false)));

current type

current basic

current dimensions

ifdebug(9) {

pips_debug(7, "new iteration : current type : %s\n",

words_to_string(words_type(ct, NIL, false)));

pips_debug(7, "current list of indices: \n");

print_expressions(l_inds);

}

Warning : qualifiers are set to NIL, because I do not see the need for something else for the moment. BC.

pips_debug(9, "t at the end of reference case %s\n", words_to_string(words_type(t, NIL, false)));

A reference to a function returns a pointer to a function of the very same time

pips_debug(9, "returns with %s\n", words_to_string(words_type(t, NIL, false)));

Parameters
refef

Definition at line 2354 of file type.c.

2355 {
2356  type t = type_undefined;
2357 
2358  // FI: to avoid cycles betwen librairies ri-util and prettyprint
2359  /* pips_debug(9, "input entity type %s\n", */
2360  /* words_to_string(words_type(entity_type(reference_variable(ref)), */
2361  /* NIL, false))); */
2362 
2364 
2365  // FI: to avoid cycles betwen librairies ri-util and prettyprint
2366  /* pips_debug(9, "reference case \n"); */
2367  /* pips_debug(9, "exp_type %s\n", words_to_string(words_type(exp_type, NIL, false))); */
2368 
2369  if(type_variable_p(exp_type))
2370  {
2371  type ct = exp_type; /* current type */
2372  basic cb = variable_basic(type_variable(exp_type)); /* current basic */
2373 
2374  list cd = variable_dimensions(type_variable(exp_type)); /* current dimensions */
2375  list l_inds = reference_indices(ref);
2376 
2377  pips_debug(9, "reference to a variable, "
2378  "we iterate over the indices if any \n");
2379 
2380  while (!ENDP(l_inds))
2381  {
2382  // FI: to avoid cycles betwen librairies ri-util and prettyprint
2383  /* ifdebug(9) { */
2384  /* pips_debug(7, "new iteration : current type : %s\n", */
2385  /* words_to_string(words_type(ct, NIL, false))); */
2386  /* pips_debug(7, "current list of indices: \n"); */
2387  /* print_expressions(l_inds); */
2388  /* } */
2389  if(!ENDP(cd))
2390  {
2391  pips_debug(9, "poping one type dimension and one index\n");
2392  POP(cd);
2393  POP(l_inds);
2394  }
2395  else
2396  {
2397  pips_debug(9,"going through pointer dimension. \n");
2398  // FI: struct are only possible for constant memory path
2399  // the usual internal representation does not use fields
2400  // as indices
2401  pips_assert("reference has too many indices :"
2402  " pointer or struct expected\n",
2403  basic_pointer_p(cb) || basic_derived_p(cb));
2404  if(basic_pointer_p(cb)) {
2405  ct = basic_pointer(cb);
2406  cb = variable_basic(type_variable(ct));
2408  }
2409  else if(basic_derived_p(cb)) { // must be a struct, see assert
2410  entity de = basic_derived(cb);
2411  type st = entity_type(de);
2412  list fl = type_struct(st);
2413  // FI: I am not sure about the internal representation...
2414  // Do we find an integer or a field reference as
2415  // subscript expression?
2416  expression ind = EXPRESSION(CAR(l_inds));
2417  value ind_v = EvalExpression(ind);
2418  if(value_constant_p(ind_v)) {
2419  int n = constant_int(value_constant(ind_v));
2420  entity f = ENTITY(gen_nth(n, fl));
2421  type ft = entity_type(f);
2422  ct = ft;
2423  cb = variable_basic(type_variable(ct));
2425  }
2426  else { // FI: assume a reference to a field
2427  // pips_internal_error("Unexpected internal representation.\n");
2428  pips_assert("The subscript expression is a reference",
2429  expression_reference_p(ind));
2430  entity f =
2432  type ft = entity_type(f);
2433  ct = ft;
2434  cb = variable_basic(type_variable(ct));
2436  }
2437  }
2438  POP(l_inds);
2439  }
2440  }
2441 
2442  /* Warning : qualifiers are set to NIL, because I do not see
2443  * the need for something else for the moment. BC.
2444  */
2445  t = make_type_variable(
2447  gen_full_copy_list(cd),
2448  NIL));
2449  // FI: to avoid cycles betwen librairies ri-util and prettyprint
2450  /* pips_debug(9, "t at the end of reference case %s\n", words_to_string(words_type(t, NIL, false))); */
2451  }
2452  else if(type_functional_p(exp_type))
2453  {
2454  pips_debug(9, "functional case \n");
2455  /* A reference to a function returns a pointer to a function
2456  of the very same time */
2459  (make_basic(is_basic_pointer, copy_type(exp_type)),
2460  NIL, NIL));
2461  }
2462  else
2463  {
2464  // The unknown type ends up here
2465  pips_internal_error("Bad reference type tag %d \"%s\" for reference to %s",
2466  type_tag(exp_type),
2467  type_to_string(exp_type),
2469  }
2470  // FI: to avoid cycles betwen librairies ri-util and prettyprint
2471  /* pips_debug(9, "returns with %s\n", words_to_string(words_type(t, NIL, false))); */
2472  return t;
2473 }
gen_chunk gen_nth(int n, const list l)
to be used as ENTITY(gen_nth(3, l))...
Definition: list.c:710

References basic_derived, basic_derived_p, basic_pointer, basic_pointer_p, CAR, constant_int, copy_basic(), copy_type(), ENDP, ENTITY, entity_basic_concrete_type(), entity_name, entity_type, EvalExpression(), EXPRESSION, expression_reference_p(), expression_syntax, f(), gen_full_copy_list(), gen_nth(), is_basic_pointer, is_type_variable, make_basic(), make_type(), make_type_variable(), make_variable(), NIL, pips_assert, pips_debug, pips_internal_error, POP, ref, reference_indices, reference_variable, syntax_reference, type_functional_p, type_struct, type_tag, type_to_string(), type_undefined, type_variable, type_variable_p, value_constant, value_constant_p, variable_basic, and variable_dimensions.

Referenced by do_brace_expression_to_statements(), expression_to_type(), and substitute_stubs_in_transformer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reference_with_constant_indices_p()

bool reference_with_constant_indices_p ( reference  r)

Definition at line 3022 of file expression.c.

3023 {
3024  list sel = reference_indices(r);
3025  bool constant_p = true;
3026 
3027  FOREACH(EXPRESSION, se, sel) {
3029  && !field_expression_p(se) ) { // for points-to references
3030  constant_p = false;
3031  break;
3032  }
3033  }
3034  return constant_p;
3035 }
bool extended_integer_constant_expression_p(expression e)
More extensive than next function.
Definition: expression.c:858
bool field_expression_p(expression e)
The expression is of kind "a", where "a" is a field of some struct "s".
Definition: expression.c:498

References constant_p(), EXPRESSION, extended_integer_constant_expression_p(), field_expression_p(), FOREACH, and reference_indices.

Referenced by store_independent_effect_p(), and store_independent_reference_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reference_with_store_independent_indices()

reference reference_with_store_independent_indices ( reference  r)

Return by side effect a reference whose memory locations includes the memory locations of r in case the subcript expressions are changed by a store change.

Constant subscript expressions are preserved.

Store varying subscript expressions are replaced by unbounded expressions.

Definition at line 3045 of file expression.c.

3046 {
3047  list sel = reference_indices(r);
3048  list sec = list_undefined;
3049 
3050  for(sec = sel; !ENDP(sec); POP(sec)) {
3051  expression se = EXPRESSION(CAR(sec));
3052 
3054  free_expression(se);
3056  }
3057  }
3058 
3059  return r;
3060 }
#define EXPRESSION_(x)
Definition: ri.h:1220

References CAR, ENDP, EXPRESSION, EXPRESSION_, extended_integer_constant_expression_p(), free_expression(), list_undefined, make_unbounded_expression(), POP, and reference_indices.

Referenced by effect_to_non_pointer_store_independent_effect(), and reference_to_points_to_sinks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reference_with_unbounded_indices_p()

bool reference_with_unbounded_indices_p ( reference  r)

indices can be constant or unbounded: they are store independent.

See next function, reference_with_unbounded_subscript_p()

Definition at line 3066 of file expression.c.

3067 {
3068  list sel = reference_indices(r);
3069  bool unbounded_p = true;
3070 
3071  FOREACH(EXPRESSION, se, sel) {
3073  && !unbounded_expression_p(se)) {
3074  unbounded_p = false;
3075  break;
3076  }
3077  }
3078  return unbounded_p;
3079 }

References EXPRESSION, extended_integer_constant_expression_p(), FOREACH, reference_indices, and unbounded_expression_p().

+ Here is the call graph for this function:

◆ reference_with_unbounded_subscript_p()

bool reference_with_unbounded_subscript_p ( reference  r)

See if the reference uses the unbounded function '*'.

See previous function, reference_with_unbounded_indices_p()

Definition at line 3085 of file expression.c.

3086 {
3087  list sel = reference_indices(r);
3088  bool unbounded_p = false;
3089 
3090  FOREACH(EXPRESSION, se, sel) {
3091  if(unbounded_expression_p(se)) {
3092  unbounded_p = true;
3093  break;
3094  }
3095  }
3096  return unbounded_p;
3097 }

References EXPRESSION, FOREACH, reference_indices, and unbounded_expression_p().

Referenced by generic_apply_effect_to_transformer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ references_do_not_conflict_p()

bool references_do_not_conflict_p ( reference  r1,
reference  r2 
)

If true is returned, the two references cannot conflict unless array bound declarations are violated.

If false is returned, the two references may conflict.

true is returned if the two references are array references and if the two references entities are equal and if at least one dimension can be used to desambiguate the two references using constant subscript expressions. This test is store independent and certainly does not replace a dependence test. It may beused to compute ude-def chains.

If needed, an extra effort could be made for aliased arrays.

FI: OK, it would be better to use their normalized forms

Parameters
r11
r22

Definition at line 1888 of file expression.c.

1889 {
1890  bool do_not_conflict = false;
1891  entity v1 = reference_variable(r1);
1892  entity v2 = reference_variable(r2);
1893 
1894  if(v1==v2) {
1895  list s1 = reference_indices(r1);
1896  list s2 = reference_indices(r2);
1897  if(!ENDP(s1) && gen_length(s1)==gen_length(s2)) {
1898  list cs1, cs2;
1899  for(cs1=s1, cs2=s2; !ENDP(cs1) && !do_not_conflict; POP(cs1), POP(cs2)) {
1900  expression sub1 = EXPRESSION(CAR(cs1));
1901  expression sub2 = EXPRESSION(CAR(cs2));
1902  if(expression_constant_p(sub1) && expression_constant_p(sub2)) {
1903  /* FI: OK, it would be better to use their normalized forms */
1904  do_not_conflict = (expression_to_int(sub1)!=expression_to_int(sub2));
1905  }
1906  }
1907  }
1908  }
1909 
1910  return do_not_conflict;
1911 }

References CAR, ENDP, EXPRESSION, expression_constant_p(), expression_to_int(), gen_length(), POP, reference_indices, reference_variable, and s1.

+ Here is the call graph for this function:

◆ register_static_entity()

void register_static_entity ( entity e)

add given entity to the set of entities that must reset upon workspace deletion practically, all static entities should be stored that way

Definition at line 156 of file entity.c.

156  {
158  pips_assert("static entity cache is large enough",static_entity_size<STATIC_ENTITY_CACHE_SIZE);
159 }
static size_t static_entity_size
Definition: entity.c:77
static entity * static_entity_cache[STATIC_ENTITY_CACHE_SIZE]
Definition: entity.c:76
#define STATIC_ENTITY_CACHE_SIZE
Definition: entity.c:75

References pips_assert, static_entity_cache, STATIC_ENTITY_CACHE_SIZE, and static_entity_size.

Referenced by entity_nowhere_locations(), and entity_null_locations().

+ Here is the caller graph for this function:

◆ relational_expression_p()

bool relational_expression_p ( expression  e)

A relational expression is a call whose function is either one of the following : .LT.,.LE.,.EQ.,.NE.,.GT.,.GE.

Definition at line 587 of file expression.c.

588 {
589  /* A relational expression is a call whose function is either one of the following :
590  * .LT.,.LE.,.EQ.,.NE.,.GT.,.GE. */
591  if (expression_call_p(e))
592  {
595  return true;
596  return false;
597  }
598  return false;
599 }
#define ENTITY_RELATIONAL_OPERATOR_P(e)

References call_function, ENTITY_RELATIONAL_OPERATOR_P, expression_call_p(), expression_syntax, and syntax_call.

Referenced by logical_expression_p(), simplify_relational_expression(), and trivial_expression_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ remove_variable_entity()

void remove_variable_entity ( entity  v)

FI: this is pretty dangerous as it may leave tons of dangling pointers; I use it to correct early declarations of types functions as variables; I assume that no pointers to v exist in statements because we are still in the declaration phasis.

Memory leaks: I do not know if NewGen free_entity() is recursive.

Definition at line 1306 of file variable.c.

1307 {
1308  /* FI: this is pretty dangerous as it may leave tons of dangling pointers;
1309  * I use it to correct early declarations of types functions as variables;
1310  * I assume that no pointers to v exist in statements because we are still
1311  * in the declaration phasis.
1312  *
1313  * Memory leaks: I do not know if NewGen free_entity() is recursive.
1314  */
1315  storage s = entity_storage(v);
1317  code c = code_undefined;
1318 
1319  if(storage_undefined_p(s)) {
1320  const char* fn = entity_module_name(v);
1322  }
1323  else if(storage_ram_p(s)) {
1324  f = ram_function(storage_ram(s));
1325  }
1326  else if(storage_rom_p(s)) {
1327  f = entity_undefined;
1328  }
1329  else {
1330  pips_internal_error("unexpected storage %d", storage_tag(s));
1331  }
1332 
1333  if(!entity_undefined_p(f)) {
1334  pips_assert("remove_variable_entity", entity_module_p(f));
1335  c = value_code(entity_initial(f));
1336  gen_remove(&code_declarations(c), v);
1337  }
1338  free_entity(v);
1339 }
#define storage_tag(x)
Definition: ri.h:2515

References code_declarations, code_undefined, entity_initial, entity_module_name(), entity_module_p(), entity_storage, entity_undefined, entity_undefined_p, f(), free_entity(), gen_remove(), local_name_to_top_level_entity(), pips_assert, pips_internal_error, ram_function, storage_ram, storage_ram_p, storage_rom_p, storage_tag, storage_undefined_p, and value_code.

Referenced by remove_ghost_variable_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveLocalEntities()

void RemoveLocalEntities ( entity  function)

Useful for ParserError()?

FI: dangling pointers? Some variables may be referenced in area_layouts of global common entities!

gen_full_free_list(function_local_entities);

A gen_multi_recurse would be required but it's hard to be at the list level to remove the elements?!?

Parameters
functionunction

Definition at line 152 of file clean.c.

154 {
155 
156  set_current_function(function);
157 
158 #if 0
159  list function_local_entities =
161  entity_domain);
162 #endif
163 
164  /* FI: dangling pointers? Some variables may be referenced in area_layouts of
165  global common entities! */
166  /* gen_full_free_list(function_local_entities); */
167  /* A gen_multi_recurse would be required but it's hard to be at the
168  list level to remove the elements?!? */
169  pips_assert("implemented", false);
170 }

References entity_domain, gen_filter_tabulated(), local_entity_of_current_function_p(), pips_assert, and set_current_function().

+ Here is the call graph for this function:

◆ RemoveLocalEntityFromDeclarations()

void RemoveLocalEntityFromDeclarations ( entity  e,
entity  module,
statement  s 
)

this take care of removing useless declaration statements

Parameters
moduleodule

Definition at line 120 of file variable.c.

121 {
124  if(!statement_undefined_p(s))
125  {
128  if(statement_block_p(s))
129  {
130  // iterate over a copy because FOREACH does not
131  // support inplace modification
132  list theblock = gen_copy_seq(statement_block(s));
133  FOREACH(STATEMENT,stat,theblock)
134  {
135  bool decl_stat = declaration_statement_p(stat);
137  /* this take care of removing useless declaration statements*/
138  if(ENDP(statement_declarations(stat)) && decl_stat)
139  {
141  free_statement(stat);
142  }
143  }
144  gen_free_list(theblock);
145  }
146  }
147 
148 }
void free_statement(statement p)
Definition: ri.c:2189
void gen_remove_once(list *pl, const void *o)
Remove the first occurence of o in list pl:
Definition: list.c:691
list statement_block(statement)
Get the list of block statements of a statement sequence.
Definition: statement.c:1338
bool declaration_statement_p(statement)
Had to be optimized according to Beatrice Creusillet.
Definition: statement.c:224
void RemoveLocalEntityFromDeclarations(entity e, entity module, statement s)
Definition: variable.c:120
#define statement_block_p(stat)
#define statement_undefined_p(x)
Definition: ri.h:2420

References declaration_statement_p(), ENDP, entity_declarations, FOREACH, free_statement(), gen_copy_seq(), gen_free_list(), gen_remove(), gen_remove_once(), instruction_block, module, RemoveLocalEntityFromDeclarations(), STATEMENT, statement_block(), statement_block_p, statement_declarations, statement_instruction, and statement_undefined_p.

Referenced by do_kernelize(), do_reduction_detection(), promote_local_entities(), RemoveLocalEntityFromDeclarations(), rename_statement_declarations(), and statement_clean_declarations_helper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ replace_expression_content()

expression replace_expression_content ( expression  e1,
expression  e2 
)

Use side effects to move the content of e2, s2 and n2, into e1; s1 and n1 are freed, as well as e2.

This is useful if you need to keep the handle on e1. e1 is returned, although it is redundant.

Parameters
e11
e22

Definition at line 3864 of file expression.c.

3865 {
3866  syntax s1 = expression_syntax(e1);
3868  syntax s2 = expression_syntax(e2);
3870 
3871  expression_syntax(e1) = s2;
3872  expression_normalized(e1) = n2;
3875  free_syntax(s1);
3876  free_normalized(n1);
3877  free_expression(e2);
3878 
3879  return e1;
3880 }

References expression_normalized, expression_syntax, free_expression(), free_normalized(), free_syntax(), normalized_undefined, s1, and syntax_undefined.

Referenced by simplify_boolean_expression_with_precondition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset_enclosing_loops_map()

void reset_enclosing_loops_map ( void  )

Referenced by prettyprint_dot_dependence_graph(), and search_parallel_loops().

+ Here is the caller graph for this function:

◆ reset_entity_to_size()

void reset_entity_to_size ( void  )

Definition at line 635 of file size.c.

636 {
638  pips_internal_error("hash table should have been allocated");
639  }
640  else {
643  }
644 }
static hash_table entity_to_size
a hash table to map entities to their numbers of elements
Definition: size.c:623

References entity_to_size, hash_table_free(), hash_table_undefined, and pips_internal_error.

Referenced by create_workspace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset_internal_static_entities()

void reset_internal_static_entities ( void  )

Definition at line 119 of file entity.c.

120 {
121 
130 
132  for(size_t i =0;i< static_entity_size;i++)
136 }
static entity time_effect_ent
Definition: entity.c:55
static bool internal_static_entities_initialized_p
Functions closely related to the entity class, constructors, predicates,...
Definition: entity.c:50

References continue_ent, entity_undefined, internal_static_entities_initialized_p, io_eof_ent, io_error_luns_ent, io_ptr_ent, luns_ent, malloc_effect_ent, memmove_effect_ent, rand_gen_ent, static_entity_cache, static_entity_size, and time_effect_ent.

Referenced by reset_static_entities().

+ Here is the caller graph for this function:

◆ reset_keyword_typedef_table()

void reset_keyword_typedef_table ( void  )

Definition at line 268 of file static.c.

269 {
271  // No need to reset this value. It is a constant defined by Bison.
272  // token_named_type = -1;
273 }

References hash_table_undefined, and keyword_typedef_table.

◆ reset_label_counter()

void reset_label_counter ( void  )

Definition at line 322 of file entity.c.

323 {
324  init = 100000;
325 }

References init.

Referenced by close_workspace(), ensure_comment_consistency(), fprint_statement(), print_statement_of_module(), and statement_to_text().

+ Here is the caller graph for this function:

◆ reset_ordering_to_statement()

void reset_ordering_to_statement ( void  )

Reset the mapping from ordering to statement.

Definition at line 185 of file ordering.c.

186 {
187  pips_assert("hash table is defined",
189 
192 }

References hash_table_free(), hash_table_undefined, OrderingToStatement, and pips_assert.

Referenced by add_aliases_for_current_caller(), alias_check(), array_bound_check_bottom_up(), array_bound_check_interprocedural(), array_bound_check_top_down(), bdsc_code_instrumentation(), chains(), copy_value_of_write(), copy_value_of_write_with_cumulated_regions(), deatomizer(), delay_communications(), delay_load_communications(), delay_store_communications(), do_it(), dsc_code_parallelization(), eliminate_original_variables(), flinter(), forward_substitute(), hbdsc_parallelization(), if_conversion_compact(), impact_check(), invariant_code_motion(), module_reorder(), mpi_conversion(), mpi_task_generation(), old_array_bound_check_instrumentation(), openmp_task_generation(), parallel_tiling(), pipsdbm_read_statement_function(), pipsdbm_read_statement_mapping(), print_dependence_or_chains_graph(), print_dot_dependence_or_chains_graph(), print_filtered_dg_or_dvdg(), print_loopnest_dependence_cone(), process_reduced_loops(), reduction_detection(), reduction_propagation(), redundant_load_store_elimination(), regions_to_loops(), rice_dependence_graph(), scalar_renaming(), sequence_dependence_graph(), simdizer(), spire_distributed_unstructured_to_structured(), spire_shared_unstructured_to_structured(), step_analyse(), step_parser(), used_before_set(), variable_replication(), wp65(), and xml_Chains().

+ Here is the call graph for this function:

◆ reset_static_entities()

void reset_static_entities ( void  )

Definition at line 146 of file entity.c.

147 {
150 }
void reset_internal_static_entities()
Definition: entity.c:119
void reset_std_static_entities()
Definition: entity.c:138

References reset_internal_static_entities(), and reset_std_static_entities().

Referenced by close_workspace(), create_workspace(), and open_workspace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset_std_static_entities()

void reset_std_static_entities ( void  )

Definition at line 138 of file entity.c.

139 {
144 }
static bool std_static_entities_initialized_p
variables to store entities from standard includes
Definition: entity.c:69

References entity_undefined, std_static_entities_initialized_p, stderr_ent, stdin_ent, and stdout_ent.

Referenced by reset_current_phase_context(), reset_static_entities(), and set_current_phase_context().

+ Here is the caller graph for this function:

◆ reset_unique_variable_numbers()

void reset_unique_variable_numbers ( void  )

Definition at line 421 of file variable.c.

422 {
427 }

References unique_complex_number, unique_float_number, unique_integer_number, and unique_logical_number.

Referenced by open_module(), and set_resources_for_module().

+ Here is the caller graph for this function:

◆ reset_unstructured_number()

void reset_unstructured_number ( void  )

reorder.c

reorder.c

Definition at line 56 of file reorder.c.

56  {
57  u_number = 0;
58 }
static int u_number
The current unstructured number, that is the number of control node encountered during depth first vi...
Definition: reorder.c:52

References u_number.

Referenced by control_graph(), and module_body_reorder().

+ Here is the caller graph for this function:

◆ return_value_p()

bool return_value_p ( entity  v)

Is entity v the return value of some function?

Definition at line 522 of file module.c.

523 {
524  bool return_p = strcmp(entity_module_name(v), entity_user_name(v))==0;
525  return return_p;
526 }

References entity_module_name(), and entity_user_name().

+ Here is the call graph for this function:

◆ safe_entity_name()

string safe_entity_name ( entity  e)

predicates and functions for entities

BEGIN_EOLE

  • please do not remove this line Lines between BEGIN_EOLE and END_EOLE tags are automatically included in the EOLE project (JZ - 11/98)

Definition at line 433 of file entity.c.

434 {
435  string sn = string_undefined;
436 
437  if(entity_undefined_p(e))
438  sn = "undefined object, entity assumed";
439  else if(entity_domain_number(e)!= entity_domain)
440  sn = "not an entity";
441  else
442  sn = entity_name(e);
443  return sn;
444 }

References entity_domain, entity_domain_number, entity_name, entity_undefined_p, and string_undefined.

Referenced by dag_compute_outputs(), dagvtx_dump(), entity_list_dump(), entity_list_p(), IdentifierToExpression(), print_dependence_cone(), and print_loopnest_dependence_cone().

+ Here is the caller graph for this function:

◆ safe_instruction_identification()

string safe_instruction_identification ( instruction  i)

Definition at line 337 of file instruction.c.

338 {
339  string instrstring = string_undefined;
341  instrstring = "UNDEFINED INSTRUCTION";
342  else
343  instrstring = instruction_identification(i);
344  return instrstring;
345 }
string instruction_identification(instruction i)
Return a constant string representing symbolically the instruction type.
Definition: instruction.c:284
#define instruction_undefined_p(x)
Definition: ri.h:1455

References instruction_identification(), instruction_undefined_p, and string_undefined.

+ Here is the call graph for this function:

◆ safe_reset_entity_to_size()

void safe_reset_entity_to_size ( void  )

In case of error handling, PIPS may try to reset this table twice.

Definition at line 647 of file size.c.

References entity_to_size, hash_table_free(), and hash_table_undefined.

Referenced by close_workspace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ safe_type_to_string()

string safe_type_to_string ( const  type)

Definition at line 59 of file type.c.

60 {
61  if (type_undefined_p(t))
62  return "undefined type";
63  else
64  return type_to_string(t);
65 }

References type_to_string(), and type_undefined_p.

Referenced by points_to_with_stripped_sink(), and UpdateParenEntity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SafeMakeConstant()

entity SafeMakeConstant ( string  name,
tag  bt,
bool(*)(const char *, const char *)  error_manager 
)

END_EOLE.

Make a Fortran constant

Apparently partly extended fo C...

SG : I like accurate knowledge of constant suffix to fill all cases accurately, there is still work to do there

The LengthOfBasic should be updated for type "string"

Parameters
nameame
btt

Definition at line 315 of file constant.c.

316 {
317  entity e;
318  size_t len = strlen(name);
319  size_t type_length;
320  /* SG : I like accurate knowledge of constant suffix to fill all
321  cases accurately, there is still work to do there */
322  switch(bt) {
323  case is_basic_float:
324  switch(name[len-1]) {
325  case 'f':
326  type_length = DefaultLengthOfBasic(bt);break;
327  case 'F':
328  default:
329  // SG I am sure the default is double for C, I don't know for Fortran
330  type_length = (c_module_p(get_current_module_entity()) ?
331  2 :
332  1
333  ) *DefaultLengthOfBasic(bt);break;
334  } break;
335  default:
336  type_length = DefaultLengthOfBasic(bt);
337  }
338 
339  //e = make_constant_entity(name, bt, type_length);
340  e = make_C_or_Fortran_constant_entity(name, bt, type_length, true, error_manager);
341 
342  /* The LengthOfBasic should be updated for type "string" */
343 
344  return e;
345 }
int DefaultLengthOfBasic(tag t)
Deals with constant expressions and constant entities.
Definition: constant.c:44

References c_module_p(), DefaultLengthOfBasic(), get_current_module_entity(), is_basic_float, and make_C_or_Fortran_constant_entity().

Referenced by MakeConstant().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ same_basic_p()

bool same_basic_p ( basic  b1,
basic  b2 
)

check if two basics are similar.

That is if they are equal modulo typedefs.

Parameters
b11
b22

Definition at line 969 of file type.c.

970 {
971  return compare_basic_p(b1,b2, true);
972 }

References b1, b2, and compare_basic_p().

Referenced by add_formal_to_actual_bindings(), and generic_basic_equal_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ same_entity_name_p()

bool same_entity_name_p ( entity  e1,
entity  e2 
)

compare entity names

Parameters
e1first entity
e2second entity
Returns
true if e1 and e2 have the same name
Parameters
e11
e22

Definition at line 2208 of file entity.c.

2209 {
2210  return same_string_p(entity_name(e1), entity_name(e2));
2211 }

References entity_name, and same_string_p.

Referenced by has_entity_with_same_name().

+ Here is the caller graph for this function:

◆ same_entity_p()

bool same_entity_p ( entity  e1,
entity  e2 
)

predicates on entities

Parameters
e11
e22

Definition at line 1321 of file entity.c.

1322 {
1323  return(e1 == e2);
1324 }

Referenced by _expression_similar_p(), abstract_locations_max(), alias_check(), alias_check_array_and_scalar_variable_in_caller_flt(), alias_check_array_and_scalar_variable_in_module_flt(), alias_check_array_variable_in_caller_flt(), alias_check_array_variable_in_module_flt(), alias_check_scalar_variable_in_caller_flt(), alias_check_scalar_variable_in_module_flt(), apply_farkas(), attach_ref_to_loop(), basic_concrete_types_compatible_for_effects_interprocedural_translation_p(), call_flt(), cell_reference_compare(), check_loop_distribution_feasability(), code_has_write_eff_ref_p(), common_is_visible_p(), compose_vvs(), compute_regions_union(), conflict_is_a_real_conflict_p(), controlize(), convert_pointer_to_array_aux(), convex_cell_reference_preceding_p(), convex_cells_inclusion_p(), convex_in_effect_loop_range_fix(), da_process_list(), di_polynome_var_subst_null(), distance_between_entity(), do_clone_label(), do_delay_communications_interprocedurally(), do_expression_reduction(), do_grouping_filter_out_self(), do_grouping_replace_reference_by_expression_walker(), do_isolate_statement_preconditions_satisified_p(), do_kernelize(), do_linearize_remove_dereferencment_walker(), do_outliner_smart_replacment(), do_reduction_propagation(), do_remove_entity_from_private(), do_scalar_renaming_in_successors(), do_split_structure_return_hook_walker(), do_terapix_argument_handler(), do_terapix_loop_optimizer(), do_terapix_pointer_initialized_from_a_mask_p(), do_terapix_warmup_patching(), dynamic_alias_check_flt(), effect_may_read_or_write_memory_paths_from_entity_p(), effects_to_dma(), entities_maymust_conflict_p(), entity_anywhere_locations_p(), entity_clean_declarations(), entity_continue_p(), entity_in_ref_list(), entity_local_variable_p(), entity_nowhere_locations_p(), entity_null_locations_p(), entity_used_in_calls_walker(), entity_used_in_reference_walker(), entity_written_p(), expand_reference(), expr_has_write_eff_ref_p(), find_calls_to_function_walker(), find_effect_actions_for_entity(), find_entity_macro(), find_region_on_entity(), find_statements_with_label_walker(), first_reference_certainly_includes_second_reference_p(), formal_variable_add_aliases(), free_to_post_pv(), gather_call_sites(), generic_basic_equal_p(), generic_effect_find_aliases_with_simple_pointer_values(), guess_loop_increment_walker(), guess_loop_lower_bound(), guess_write_effect_on_entity_walker(), impact_check(), index_of_a_loop_p(), indice_p(), interprocedural_mapping(), io_entity_p(), io_luns_entity_p(), is_entity_in_list_p(), isolate_patch_reference(), kill_pointer_value(), list_of_same_or_equivalence_arguments(), loadstore_type_conversion_string(), make_send_receive_conversion(), malloc_effect_entity_p(), memmove_effect_entity_p(), offset_of_struct(), old_prototype_factorize(), outline_remove_duplicates(), outliner_smart_references_computation(), partial_eval_binary_operator(), phrase_check_reference(), pointer_values_remove_var(), process_ref_list(), prototype_factorize(), prototype_var_subst(), rand_effects_entity_p(), real_regions_forward_translation(), references_may_conflict_p(), replace_entity_by_expression_expression_walker(), replace_field_by_reference_walker(), same_call_site_p(), same_callst_p(), same_entities(), same_section_common_variable_in_list_p(), same_section_formal_variable_in_list_p(), same_struct_entity_p(), sc_to_vvs(), set_array_dimension_checked(), simple_cell_reference_preceding_p(), simple_cells_inclusion_p(), simple_pv_translate(), simplify_complex_expression(), stat_has_write_eff_ref_p(), statement_has_omp_parallel_directive_p(), statement_phi_function_p(), std_file_entity_p(), stderr_entity_p(), stdin_entity_p(), stdout_entity_p(), storage_formal_offset(), substitute_entity_in_call(), substitute_expressions(), substitute_variable_in_reference(), successor_conflicts_on_entity_p(), terapix_loop_handler(), terapix_optimize_accumulator(), test_dependence_using_regions(), time_effect_entity_p(), top_down_abc_array(), top_down_abc_call(), translate_to_module_frame(), true_dependence_with_entity_p(), undo_rename_reference(), variable_entities_may_conflict_p(), variable_in_list_p(), variable_is_written_by_statement_flt(), variable_references_may_conflict_p(), vecteur_mult(), verify_formal_and_common_variables(), verify_used_before_set_call(), verify_used_before_set_expression(), verify_used_before_set_statement_flt(), vvs_on_polynome(), vvs_on_vvs(), words_points_to_reference(), xml_Pattern_Paving(), and xml_TaskParameter().

◆ same_expression_in_list_p()

bool same_expression_in_list_p ( expression  e,
list  le 
)

This function returns true, if there exists a same expression in the list false, otherwise.

Parameters
lee

Definition at line 557 of file expression.c.

558 {
559  MAP(EXPRESSION, f, if (same_expression_p(e,f)) return true, le);
560  return false;
561 }
bool same_expression_p(expression e1, expression e2)
this is slightly different from expression_equal_p, as it will return true for a+b vs b+a
Definition: expression.c:1426

References EXPRESSION, f(), MAP, and same_expression_p().

Referenced by add_array_dimension_bound_test(), add_array_test(), expression_in_array_subscript(), top_down_abc_array(), and top_down_abc_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ same_expression_p()

bool same_expression_p ( expression  e1,
expression  e2 
)

this is slightly different from expression_equal_p, as it will return true for a+b vs b+a

lazy normalization.

Parameters
e11
e22

Definition at line 1426 of file expression.c.

1427 {
1428 
1429  /* lazy normalization.
1430  */
1433 
1434  normalized n1, n2;
1435  n1 = expression_normalized(e1);
1436  n2 = expression_normalized(e2);
1437 
1438 
1439 
1442  else
1443  return expression_equal_p(e1, e2);
1444 }
bool vect_equal(Pvecteur v1, Pvecteur v2)
bool vect_equal(Pvecteur v1, Pvecteur v2): test a egalite de deux vecteurs
Definition: reductions.c:278

References expression_equal_p(), expression_normalized, NORMALIZE_EXPRESSION, normalized_linear, normalized_linear_p, and vect_equal().

Referenced by alias_check_array_and_scalar_variable_in_caller_flt(), alias_check_array_and_scalar_variable_in_module_flt(), alias_check_array_variable_in_caller_flt(), alias_check_array_variable_in_module_flt(), alias_check_scalar_and_array_variables_in_caller(), alias_check_scalar_and_array_variables_in_module(), bottom_up_abc_expression_implied_do(), check_loop_distribution_feasability(), compact_phi_functions(), expression_equal_in_context_p(), expression_in_array_subscript(), full_define_p(), interprocedural_abc_arrays(), make_loadsave_statement(), outliner_smart_references_computation(), prune_singleton(), same_dimension_p(), same_expression_in_list_p(), size_of_actual_array(), subscript_value(), subscript_value_stride(), substitute_expression_walker(), and try_reorder_expression_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ same_field_entity_p()

bool same_field_entity_p ( const  entity,
const  entity 
)
Parameters
entity1
entity2

Definition at line 1019 of file entity.c.

1020 {
1021  bool same_p = false;
1022  type t1 = entity_type(f1);
1023  type t2 = entity_type(f2);
1024  if(type_structurally_equal_p(t1,t2)) {
1025  string n1 = (string) entity_user_name(f1);
1026  string n2 = (string) entity_user_name(f2);
1027  if(same_string_p(n1, n2))
1028  same_p = true;
1029  }
1030 
1031  return same_p;
1032 }
bool type_structurally_equal_p(type, type)
Type t1 and t2 are equal if their basic concrete components are equal.
Definition: type.c:586

References entity_type, entity_user_name(), f2(), same_string_p, and type_structurally_equal_p().

Referenced by reference_equal_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ same_scalar_location_p()

bool same_scalar_location_p ( entity  e1,
entity  e2 
)

FI: transferred from semantics (should be used for effect translation as well)

e1 or e2 may be a formal parameter as shown by the benchmark m from CEA and the call to SOURCE by the MAIN, parameter NPBF (FI, 13/1/93)

I do not understand why I should return false since they actually have the same location for this call site. However, there is no need for a translate_global_value() since the usual formal/actual binding must be enough.

Parameters
e11
e22

Definition at line 1992 of file variable.c.

1993 {
1994  storage st1 = entity_storage(e1);
1995  storage st2 = entity_storage(e2);
1997  entity s2 = entity_undefined;
1998  ram r1 = ram_undefined;
1999  ram r2 = ram_undefined;
2000  bool same = false;
2001 
2002  /* e1 or e2 may be a formal parameter as shown by the benchmark m from CEA
2003  * and the call to SOURCE by the MAIN, parameter NPBF (FI, 13/1/93)
2004  *
2005  * I do not understand why I should return false since they actually have
2006  * the same location for this call site. However, there is no need for
2007  * a translate_global_value() since the usual formal/actual binding
2008  * must be enough.
2009  */
2010  /*
2011  * pips_assert("same_scalar_location_p", storage_ram_p(st1) && storage_ram_p(st2));
2012  */
2013  if(!(storage_ram_p(st1) && storage_ram_p(st2)))
2014  return false;
2015 
2016  r1 = storage_ram(entity_storage(e1));
2017  s1 = ram_section(r1);
2018  r2 = storage_ram(entity_storage(e2));
2019  s2 = ram_section(r2);
2020 
2021  if(s1 == s2) {
2022  if(ram_offset(r1) == ram_offset(r2))
2023  same = true;
2024  else {
2025  pips_debug(7,
2026  "Different offsets %td for %s in section %s and %td for %s in section %s\n",
2027  ram_offset(r1), entity_name(e1), entity_name(s1),
2028  ram_offset(r2), entity_name(e2), entity_name(s2));
2029  }
2030  }
2031  else {
2032  pips_debug(7,
2033  "Disjoint entitites %s in section %s and %s in section %s\n",
2034  entity_name(e1), entity_name(s1),
2035  entity_name(e2), entity_name(s2));
2036  }
2037 
2038  return same;
2039 }
#define ram_undefined
Definition: ri.h:2221

References entity_name, entity_storage, entity_undefined, pips_debug, ram_offset, ram_section, ram_undefined, s1, storage_ram, and storage_ram_p.

Referenced by expression_equal_in_context_p(), translate_global_value(), and translate_to_module_frame().

+ Here is the caller graph for this function:

◆ same_struct_entity_p()

bool same_struct_entity_p ( const  entity,
const  entity 
)
Parameters
entity0
entity1

Definition at line 1012 of file entity.c.

1013 {
1016  return same_entity_p(s0,s1);
1017 }
entity entity_field_to_entity_struct(entity f)
Definition: entity.c:905

References entity_field_to_entity_struct(), s1, and same_entity_p().

Referenced by distance_between_entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ same_type_name_p()

bool same_type_name_p ( const type  t0,
const type  t1 
)

For naming homogeneity: expression_to_string(), reference_to_string()...

but type_to_string() is already implemented in ri-util in a less useful form string type_to_string(cons type t) { return string_of_type(t); } This function cannot be in ri-util because of string_of_type()

Parameters
t00
t11

Definition at line 74 of file type.c.

74  {
75  string s0 = string_of_type(t0),
76  s1 =string_of_type(t1);
77  bool same = same_string_p(s0,s1);
78  free(s0); free(s1);
79  return same;
80 }
string string_of_type(const type t)
Definition: type.c:56

◆ same_type_p()

bool same_type_p ( type  t1,
type  t2 
)

Type equality and equivalence.

Issues mostly due to C:

  • typedefs: do you want a syntactic equality only?
  • qualifiers: should they be taken into account or not?
  • C defined type equivalence/compatibility: char * == char[], char[N][M]==char (*)[M]
  • functions and pointers to functions are equivalent
  • dependent types: how do you compare the dimension expressions?

Issues dur to PIPS internal representation:

  • newgen basic "string" is sometimes used instead of unsigned char[]

constant string like all constants are functions; for instance, a char * pointer can be assigned a functional void->string...

These issues lead to the concepts of "ultimate" type and of "basic concrete" type, and to the development of many different type "equality" functions. same_type_p(): similar to type_equals but bypasses typedefs

FI Warning: current version only compares ultimate_types but check the various typedef that follows.

typedef int foo;

type_equal_p(int, foo)==true, because foo is simply a renaming for int, but note that type_int_p(entity_type(foo)) returns false. Hence, type_int_p(t1) and type_equal_p(t1,t2) does not imply type_int_p(t2), which may lead to funny bugs.

typedef struct a { int x; int y; } a_t;

typedef struct b { int x; int y; } b_t;

type_equal_p(a_t, b_t)==false, because the underlying structures have different names and because the C type system does not use structural equivalence.

typedef struct { int x; int y; } c_t;

typedef struct { int x; int y; } d_t;

type_EQUAL_P(c_t, d_t)==FALSE because structures (or unions or enums) with implicit names receive each a unique name.

Parameters
t11
t22

Definition at line 409 of file type.c.

410 {
411  t1= ultimate_type(t1);
412  t2= ultimate_type(t2);
413  return type_equal_p(t1,t2);
414 }

References type_equal_p(), and ultimate_type().

+ Here is the call graph for this function:

◆ scalar_integer_type_p()

bool scalar_integer_type_p ( type  t)

The qualifiers do not matter && ENDP(variable_qualifiers(v))

unsigned are as OK as signed

Definition at line 3276 of file type.c.

3277 {
3278  bool long_p = false;
3279  if(!type_undefined_p(t) && type_variable_p(t)) {
3280  variable v = type_variable(t);
3281  basic b = variable_basic(v);
3282  if(basic_int_p(b)) {
3283 
3284  long_p = ENDP(variable_dimensions(v));
3285  /* The qualifiers do not matter
3286  && ENDP(variable_qualifiers(v))
3287  */
3288  /* unsigned are as OK as signed */ /*
3289  && (s == DEFAULT_INTEGER_TYPE_SIZE
3290  || s == DEFAULT_LONG_INTEGER_TYPE_SIZE
3291  || s == DEFAULT_LONG_LONG_INTEGER_TYPE_SIZE);
3292  */
3293  }
3294  }
3295  return long_p;
3296 }

References basic_int_p, ENDP, type_undefined_p, type_variable, type_variable_p, variable_basic, and variable_dimensions.

Referenced by check_rhs_value_types(), EvalConstant(), expression_to_points_to_sinks_with_offset(), for_to_do_loop_conversion(), loop_to_enter_transformer(), and MakeParameter().

+ Here is the caller graph for this function:

◆ scalar_type_p()

bool scalar_type_p ( type  t)

◆ self_initialization_p()

bool self_initialization_p ( entity  v)

Check if a variable is initialized by itself as "int a = a;" is legal C code according to gcc.

sd v referenced in e?

Definition at line 1966 of file variable.c.

1967 {
1968  bool self_p = false;
1969 
1971 
1972  if(expression_undefined_p(e))
1973  self_p = false;
1974  else {
1975  /* sd v referenced in e? */
1977 
1978  FOREACH(REFERENCE, r, lr) {
1979  entity rv = reference_variable(r);
1980  if(v==rv) {
1981  self_p = true;
1982  break;
1983  }
1984  }
1985  gen_free_list(lr);
1986  }
1987  return self_p;
1988 }
expression variable_initial_expression(entity v)
Returns a copy of the initial (i.e.
Definition: variable.c:1899
list expression_to_reference_list(expression e, list lr)
conversion of an expression into a list of references; references are appended to list lr as they are...
Definition: expression.c:1263

References expression_to_reference_list(), expression_undefined_p, FOREACH, gen_free_list(), NIL, REFERENCE, reference_variable, and variable_initial_expression().

+ Here is the call graph for this function:

◆ set_enclosing_loops_map()

◆ set_entity_to_size()

void set_entity_to_size ( void  )

hash_table_clear(entity_to_size);

Definition at line 625 of file size.c.

626 {
628  pips_internal_error("hash table should have been deallocated");
629  /* hash_table_clear(entity_to_size); */
630  }
631 
633 }

References entity_to_size, hash_pointer, hash_table_make(), hash_table_undefined, and pips_internal_error.

Referenced by create_workspace(), and open_workspace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_internal_static_entities()

void set_internal_static_entities ( void  )

beware: cannot be called on creating the database

Definition at line 92 of file entity.c.

93 {
95  {
112 
114 
116  }
117 }
#define IO_EFFECTS_PTR_NAME
To express C IO intrinsics effects.
#define RAND_GEN_EFFECTS_NAME
variable name for random unit
#define RAND_EFFECTS_PACKAGE_NAME
package name for random routines
#define TIME_EFFECTS_PACKAGE_NAME
package name for time routines
#define IO_EFFECTS_PACKAGE_NAME
Implicit variables to handle IO effetcs.
#define IO_EFFECTS_ARRAY_NAME
array of Logical UNits; it is more or less handled as the current file pointer; in C,...
#define MEMMOVE_EFFECTS_PACKAGE_NAME
package name for memmove routines
#define MALLOC_EFFECTS_NAME
variable name for heap effects
#define CONTINUE_FUNCTION_NAME
#define MEMMOVE_EFFECTS_NAME
variable name for memmove unit
#define IO_EOF_ARRAY_NAME
array of end of file codes
#define MALLOC_EFFECTS_PACKAGE_NAME
package name for malloc routines (could be libc package)
#define IO_ERROR_ARRAY_NAME
array of error codes for LUNs
#define TIME_EFFECTS_VARIABLE_NAME
variable holding time effects
entity FindOrCreateTopLevelEntity(const char *name)
Return a top-level entity.
Definition: entity.c:1603

References continue_ent, CONTINUE_FUNCTION_NAME, FindOrCreateEntity(), FindOrCreateTopLevelEntity(), internal_static_entities_initialized_p, IO_EFFECTS_ARRAY_NAME, IO_EFFECTS_PACKAGE_NAME, IO_EFFECTS_PTR_NAME, IO_EOF_ARRAY_NAME, io_eof_ent, IO_ERROR_ARRAY_NAME, io_error_luns_ent, io_ptr_ent, luns_ent, malloc_effect_ent, MALLOC_EFFECTS_NAME, MALLOC_EFFECTS_PACKAGE_NAME, memmove_effect_ent, MEMMOVE_EFFECTS_NAME, MEMMOVE_EFFECTS_PACKAGE_NAME, RAND_EFFECTS_PACKAGE_NAME, RAND_GEN_EFFECTS_NAME, rand_gen_ent, time_effect_ent, TIME_EFFECTS_PACKAGE_NAME, and TIME_EFFECTS_VARIABLE_NAME.

Referenced by get_continue_entity(), io_entity_p(), io_luns_entity_p(), malloc_effect_entity_p(), memmove_effect_entity_p(), rand_effects_entity_p(), and time_effect_entity_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_keyword_typedef_table()

void set_keyword_typedef_table ( hash_table  h)

Definition at line 263 of file static.c.

264 {
266 }

References keyword_typedef_table.

Referenced by AddEntityToCompilationUnit().

+ Here is the caller graph for this function:

◆ set_ordering_to_statement()

hash_table set_ordering_to_statement ( statement  s)

To be used instead of initialize_ordering_to_statement() to make sure that the hash table ots is in sync with the current module.

Definition at line 172 of file ordering.c.

173 {
174  pips_assert("hash table \"OrderingToStatement\" is undefined",
178  OrderingToStatement = ots;
179  return ots;
180 }
@ hash_int
Definition: newgen_hash.h:32
static void rinitialize_ordering_to_statement(hash_table ots, statement s)
Initialize the ordering to statement mapping by iterating from a given statement.
Definition: ordering.c:159

References hash_int, hash_table_make(), hash_table_undefined, OrderingToStatement, pips_assert, and rinitialize_ordering_to_statement().

Referenced by add_aliases_for_current_caller(), alias_check(), array_bound_check_bottom_up(), array_bound_check_interprocedural(), array_bound_check_top_down(), bdsc_code_instrumentation(), chains(), copy_value_of_write(), copy_value_of_write_with_cumulated_regions(), deatomizer(), delay_communications(), delay_load_communications(), delay_store_communications(), do_it(), dsc_code_parallelization(), eliminate_original_variables(), flinter(), forward_substitute(), hbdsc_parallelization(), if_conversion_compact(), impact_check(), invariant_code_motion(), module_reorder(), mpi_conversion(), mpi_task_generation(), old_array_bound_check_instrumentation(), openmp_task_generation(), parallel_tiling(), pipsdbm_read_statement_function(), pipsdbm_read_statement_mapping(), print_dependence_or_chains_graph(), print_dot_dependence_or_chains_graph(), print_filtered_dg_or_dvdg(), print_loopnest_dependence_cone(), process_reduced_loops(), reduction_detection(), reduction_propagation(), redundant_load_store_elimination(), regions_to_loops(), rice_dependence_graph(), scalar_renaming(), sequence_dependence_graph(), simdizer(), spire_distributed_unstructured_to_structured(), spire_shared_unstructured_to_structured(), step_analyse(), used_before_set(), variable_replication(), wp65(), and xml_Chains().

+ Here is the call graph for this function:

◆ set_register_qualifier()

void set_register_qualifier ( entity  v)

Assuming that v is of type variable, add a qualifier register.

Definition at line 778 of file entity.c.

779 {
780  if(!entity_register_p(v)) {
781  //type uvt = ultimate_type(entity_type(v))
782  type vt = entity_type(v);
783  if(type_variable_p(vt)) {
786  *ql = gen_nconc(*ql, CONS(QUALIFIER, q , NIL));
787  }
788  else
789  pips_internal_error("Improper argument\n");
790  }
791 }
qualifier make_qualifier_register(void)
Definition: ri.c:1933
bool entity_register_p(entity e)
Definition: entity.c:766

References CONS, entity_register_p(), entity_type, gen_nconc(), make_qualifier_register(), NIL, pips_internal_error, QUALIFIER, type_variable, type_variable_p, and variable_qualifiers.

+ Here is the call graph for this function:

◆ set_std_static_entities()

void set_std_static_entities ( void  )

entity.c

entity.c

Definition at line 80 of file entity.c.

References FindEntity(), std_static_entities_initialized_p, stderr_ent, stdin_ent, stdout_ent, and TOP_LEVEL_MODULE_NAME.

Referenced by get_stderr_entity(), get_stdin_entity(), get_stdout_entity(), and std_file_entity_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ signed_constant_expression_p()

bool signed_constant_expression_p ( expression  e)

Definition at line 604 of file constant.c.

605 {
606  syntax es = expression_syntax(e);
607  bool ok = true;
608 
609  if(syntax_call_p(es)) {
610  entity ce = call_function(syntax_call(es));
611 
612  if(!entity_constant_p(ce)) {
613  list args = call_arguments(syntax_call(es));
614 
616  syntax arg = expression_syntax(EXPRESSION(CAR(args)));
617  if( syntax_call_p(arg)) {
618  entity mce = call_function(syntax_call(arg));
619  ok = entity_constant_p(mce);
620  }
621  else {
622  ok = false;
623  }
624  }
625  else {
626  ok = false;
627  }
628  }
629  }
630  return ok;
631 }

References call_arguments, call_function, CAR, CreateIntrinsic(), entity_constant_p, EXPRESSION, expression_syntax, ok, syntax_call, syntax_call_p, and UNARY_MINUS_OPERATOR_NAME.

Referenced by MakeComplexConstantExpression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ signed_integer_constant_expression_p()

bool signed_integer_constant_expression_p ( expression  e)

Definition at line 932 of file expression.c.

933 {
935  syntax s = expression_syntax(e);
936 
937  if(syntax_call_p(s)) {
938  call c = syntax_call(s);
939  entity um = call_function(c);
940 
943  entity_domain)) {
944  expression e2 = binary_call_lhs(c);
945 
947  }
948  }
949  return false;
950  }
951  else {
952  return true;
953  }
954 }

References binary_call_lhs, call_function, entity_domain, expression_syntax, gen_find_tabulated(), integer_constant_expression_p(), make_entity_fullname(), syntax_call, syntax_call_p, TOP_LEVEL_MODULE_NAME, and UNARY_MINUS_OPERATOR_NAME.

Referenced by signed_integer_constant_expression_value().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ signed_integer_constant_expression_value()

int signed_integer_constant_expression_value ( expression  e)

could be coded by geting directly the value of the constant entity...

also available as integer_constant_p() which has two arguments

Definition at line 1551 of file expression.c.

1552 {
1553  /* could be coded by geting directly the value of the constant entity... */
1554  /* also available as integer_constant_p() which has *two* arguments */
1555 
1557  int val = 0;
1558 
1559  pips_assert("is signed constant", signed_integer_constant_expression_p(e));
1560 
1561  n = NORMALIZE_EXPRESSION(e);
1562  if(normalized_linear_p(n)) {
1564 
1565  if(vect_constant_p(v)) {
1566  Value x = vect_coeff(TCST, v);
1567  val = VALUE_TO_INT(x);
1568  }
1569  else
1570  pips_internal_error("non constant expression");
1571  }
1572  else
1573  pips_internal_error("non affine expression");
1574 
1575  return val;
1576 }
bool signed_integer_constant_expression_p(expression e)
Definition: expression.c:932

References NORMALIZE_EXPRESSION, normalized_linear, normalized_linear_p, normalized_undefined, pips_assert, pips_internal_error, signed_integer_constant_expression_p(), TCST, VALUE_TO_INT, vect_coeff(), vect_constant_p(), and x.

Referenced by integer_constant_expression_value().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ signed_type_p()

bool signed_type_p ( type  t)

Definition at line 2800 of file type.c.

2801 {
2802  if (type_variable_p(t))
2803  {
2805  if (basic_int_p(b))
2806  if (basic_int(b)/10 == DEFAULT_SIGNED_TYPE_SIZE)
2807  return true;
2808  }
2809  return false;
2810 }
#define DEFAULT_SIGNED_TYPE_SIZE

References basic_int, basic_int_p, DEFAULT_SIGNED_TYPE_SIZE, type_variable, type_variable_p, and variable_basic.

Referenced by make_standard_integer_type(), and make_standard_long_integer_type().

+ Here is the caller graph for this function:

◆ simple_basic_dup()

basic simple_basic_dup ( basic  b)

basic_int, basic_float, basic_logical, basic_complex are all int's

so we duplicate them the same manner: with basic_int.

Definition at line 2735 of file type.c.

2736 {
2737  /* basic_int, basic_float, basic_logical, basic_complex are all int's */
2738  /* so we duplicate them the same manner: with basic_int. */
2739  if (basic_int_p(b) || basic_float_p(b) ||
2741  return(make_basic(basic_tag(b), UUINT(basic_int(b))));
2742  else if (basic_overloaded_p(b))
2743  return(make_basic(is_basic_overloaded, UU));
2744  else {
2745  user_warning("simple_basic_dup",
2746  "(tag %td) isn't that simple\n", basic_tag(b));
2747  if (basic_string_p(b))
2748  fprintf(stderr, "string: value tag = %d\n",
2749  value_tag(basic_string(b)));
2750  return make_basic(basic_tag(b), UUINT(basic_int(b)));
2751  }
2752 }
#define basic_string(x)
Definition: ri.h:631

References basic_complex_p, basic_float_p, basic_int, basic_int_p, basic_logical_p, basic_overloaded_p, basic_string, basic_string_p, basic_tag, fprintf(), is_basic_overloaded, make_basic(), user_warning, UU, UUINT, and value_tag.

Referenced by arguments_to_complexity(), indices_to_complexity(), intrinsic_cost(), and reference_to_complexity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ simplify_C_expression()

bool simplify_C_expression ( expression  e)

Replace C operators "+C" and "-C" which can handle pointers by arithmetic operators "+" and "-" when it is safe to do so, i.e.

when no pointer arithmetic is involved.

FI: Also, it might be useful to normalize the expression in order not to leave an undefined field in it. But this is a recursive function and probably not the right place to cope with this.

FI: see C_syntax/block_scope12.c. The source code line number where the problem occurs cannot be given because we are not in the c_syntax library.

FI: What if not? core dump?

The variable type can hide a functional type via a typedef

Might be wrong, but necessary

Should not occur in old C code

Should not occur in old C code

FI: The index expressions should be simplified too...

What is the type of the constant?

Should not occur in C, before C99

Check "+C" and "-C"

Try to simplify the arguments, do not hope much from the result type because of overloading.

a void expression such as (void) 0 results in an undefined basic. And so may do a condition c? (void *) 0 : (void *) 0.

FI: I guess, typedef equivalent to those could also be declared substituable

Should not occur in C

e must be a void expression, i.e. an expression returning no value

for gcc

Definition at line 2814 of file expression.c.

2815 {
2816  syntax s = expression_syntax(e);
2817  bool can_be_substituted_p = false;
2818 
2819  pips_debug(9, "Begin\n");
2820 
2821  switch(syntax_tag(s)) {
2822  case is_syntax_reference:
2823  {
2825  type rt = entity_type(re);
2826 
2827  if(type_undefined_p(rt)) {
2828  /* FI: see C_syntax/block_scope12.c. The source code line
2829  number where the problem occurs cannot be given because we
2830  are not in the c_syntax library. */
2831  pips_user_warning("Variable \"%s\" is probably used before it is defined\n",
2832  entity_user_name(re));
2833  can_be_substituted_p = false;
2834  }
2835  else {
2836  basic bt = basic_undefined;
2837 
2838  if(type_variable_p(rt)) { /* FI: What if not? core dump? */
2839  /* The variable type can hide a functional type via a
2840  typedef */
2841  type urt = ultimate_type(rt);
2842  if(type_variable_p(urt)) {
2843  bt = variable_basic(type_variable(urt));
2844 
2845  can_be_substituted_p =
2846  basic_int_p(bt)
2847  || basic_float_p(bt)
2848  || basic_overloaded_p(bt) /* Might be wrong, but necessary */
2849  || basic_complex_p(bt) /* Should not occur in old C code */
2850  || basic_logical_p(bt); /* Should not occur in old C code */
2851 
2852  pips_debug(9, "Variable %s is an arithmetic variable: %s\n",
2853  entity_local_name(re), bool_to_string(can_be_substituted_p));
2854  }
2855  }
2856  }
2857  break; /* FI: The index expressions should be simplified too... */
2858  }
2859  case is_syntax_call:
2860  {
2861  call c = syntax_call(s);
2862 
2863  if(expression_constant_p(e)) {
2864  /* What is the type of the constant? */
2865  entity cste = call_function(c);
2867 
2868  can_be_substituted_p =
2869  basic_int_p(rb)
2870  || basic_float_p(rb)
2871  || basic_complex_p(rb); /* Should not occur in C, before C99 */
2872  }
2873  else if(gen_length(call_arguments(c))==2) {
2874  /* Check "+C" and "-C" */
2875  expression e1 = binary_call_lhs(c);
2876  expression e2 = binary_call_rhs(c);
2877  bool can_be_substituted_p1 = simplify_C_expression(e1);
2878  bool can_be_substituted_p2 = simplify_C_expression(e2);
2879  can_be_substituted_p = can_be_substituted_p1 && can_be_substituted_p2;
2880  if(can_be_substituted_p) {
2881  entity op = call_function(c);
2882  if(ENTITY_PLUS_C_P(op)) {
2884  }
2885  else if(ENTITY_MINUS_C_P(op)) {
2887  }
2888  }
2889  }
2890  else {
2891  /* Try to simplify the arguments, do not hope much from the result
2892  type because of overloading. */
2893  type ft = call_to_functional_type(c, true);
2895  entity f = call_function(c);
2896 
2897  //pips_assert("The function type is functional", type_functional_p(entity_type(f)));
2898 
2899  FOREACH(EXPRESSION, se, call_arguments(c)) {
2900  (void) simplify_C_expression(se);
2901  }
2902 
2904  can_be_substituted_p = false;
2905  }
2906  else if(type_variable_p(rt)) {
2908 
2909  if(basic_overloaded_p(rb)) {
2910  /* a void expression such as (void) 0 results in an
2911  * undefined basic. And so may do a condition c? (void *)
2912  * 0 : (void *) 0.
2913  */
2914  rb = basic_of_expression(e);
2915  }
2916  else
2917  rb = copy_basic(rb);
2918 
2919  if(!basic_undefined_p(rb)) {
2920  /* FI: I guess, typedef equivalent to those could also be declared substituable */
2921  can_be_substituted_p =
2922  basic_int_p(rb)
2923  || basic_float_p(rb)
2924  || basic_complex_p(rb); /* Should not occur in C */
2925  free_basic(rb);
2926  }
2927  else {
2928  /* e must be a void expression, i.e. an expression returning no value */
2929  can_be_substituted_p = false;
2930  }
2931  }
2932  else {
2933  can_be_substituted_p = false;
2934  }
2935  }
2936  break;
2937  }
2938  case is_syntax_range:
2939  {
2940  range r = syntax_range(s);
2941  expression le = range_lower(r);
2942  expression ue = range_upper(r);
2943  expression ince = range_increment(r);
2944  (void) simplify_C_expression(le);
2945  (void) simplify_C_expression(ue);
2946  (void) simplify_C_expression(ince);
2947  can_be_substituted_p = false;
2948  break;
2949  }
2950  case is_syntax_cast:
2952  case is_syntax_subscript:
2953  case is_syntax_application:
2954  case is_syntax_va_arg:
2955  can_be_substituted_p = false;
2956  break;
2957  default: pips_internal_error("Bad syntax tag");
2958  can_be_substituted_p = false; /* for gcc */
2959  }
2960 
2961  pips_debug(9, "End: %s\n", bool_to_string(can_be_substituted_p));
2962  return can_be_substituted_p;
2963 }
string bool_to_string(bool)
Definition: string.c:243
#define binary_call_rhs(c)
bool simplify_C_expression(expression e)
Replace C operators "+C" and "-C" which can handle pointers by arithmetic operators "+" and "-" when ...
Definition: expression.c:2814
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

References basic_complex_p, basic_float_p, basic_int_p, basic_logical_p, basic_of_expression(), basic_overloaded_p, basic_undefined, basic_undefined_p, binary_call_lhs, binary_call_rhs, bool_to_string(), call_arguments, call_function, call_to_functional_type(), copy_basic(), ENTITY_COMMA_P, ENTITY_CONDITIONAL_P, entity_intrinsic(), entity_local_name(), ENTITY_MINUS_C_P, ENTITY_PLUS_C_P, entity_type, entity_user_name(), EXPRESSION, expression_constant_p(), expression_syntax, f(), FOREACH, free_basic(), functional_result, gen_length(), is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, MINUS_OPERATOR_NAME, pips_debug, pips_internal_error, pips_user_warning, PLUS_OPERATOR_NAME, range_increment, range_lower, range_upper, reference_variable, syntax_call, syntax_range, syntax_reference, syntax_tag, type_functional, type_undefined_p, type_variable, type_variable_p, ultimate_type(), and variable_basic.

Referenced by MakeForloop().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ simplify_expression()

bool simplify_expression ( expression pexp)

use polynomials to simplify an expression in some cases this operation can change the basic of the expression.

E.g. n/4 -> .25 * n In that case we just undo the simplification

Parameters
pexpexp

Definition at line 3770 of file expression.c.

3770  {
3771  expression exp = *pexp;
3772  bool result =false;
3773  if(!expression_undefined_p(exp)) {
3774  basic oldb = basic_of_expression(exp);
3776  if((result=!POLYNOME_UNDEFINED_P(pu))) {
3778  basic nbasic = basic_of_expression(pue);
3779  if(basic_equal_p(oldb,nbasic)) {
3781  *pexp=pue;
3782  }
3783  else {
3784  free_expression(pue);
3785  }
3786  free_basic(nbasic);
3787  polynome_rm(&pu);
3788  }
3789  free_basic(oldb);
3790  }
3791  return result;
3792 }
expression polynome_to_expression(Ppolynome pp)
converts a polynomial to expression
Definition: expression.c:3622
bool basic_equal_p(basic, basic)
Definition: type.c:927

References basic_equal_p(), basic_of_expression(), exp, expression_to_polynome(), expression_undefined_p, free_basic(), free_expression(), polynome_rm(), polynome_to_expression(), and POLYNOME_UNDEFINED_P.

Referenced by distance_between_expression(), do_simplify_expressions(), loop_annotate(), and simd_loop_unroll().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ simplify_expressions()

void simplify_expressions ( void *  obj)
Parameters
objbj

Definition at line 3801 of file expression.c.

3801  {
3803 }
static void do_simplify_expressions(call c)
Definition: expression.c:3794

References call_domain, do_simplify_expressions(), gen_recurse, and gen_true().

Referenced by optimize_expressions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ size_of_actual_array()

expression size_of_actual_array ( entity  actual_array,
list  l_actual_ref,
int  i 
)

ifdebug(3)

{

fprintf(stderr, "\n Size of actual array without subscript value \n");

print_expression(e);

}

ifdebug(4)

{

fprintf(stderr, "\n j = %d \n",j);

fprintf(stderr, "\n prod : \n");

print_expression(prod);

fprintf(stderr, "\n sum =: \n");

print_expression(sum);

}

ifdebug(2)

{

fprintf(stderr, "\n Size of actual array - subscript value : \n");

print_expression(e);

}

ifdebug(2)

{

fprintf(stderr, "\n Size of actual array:\n");

print_expression(e);

}

Parameters
actual_arrayctual_array
l_actual_ref_actual_ref

Definition at line 4197 of file expression.c.

4199 {
4201  variable actual_var = type_variable(entity_type(actual_array));
4202  list l_actual_dims = variable_dimensions(actual_var);
4203  int num_dim = gen_length(l_actual_dims), j;
4204  for (j=i+1; j<= num_dim; j++)
4205  {
4206  dimension dim_j = find_ith_dimension(l_actual_dims,j);
4207  expression lower_j = dimension_lower(dim_j);
4208  expression upper_j = dimension_upper(dim_j);
4209  expression size_j;
4210  if (expression_constant_p(lower_j) && (expression_to_int(lower_j)==1))
4211  size_j = copy_expression(upper_j);
4212  else
4213  {
4214  size_j = binary_intrinsic_expression(MINUS_OPERATOR_NAME,upper_j,lower_j);
4216  copy_expression(size_j),int_to_expression(1));
4217  }
4218  if (expression_undefined_p(e))
4219  e = copy_expression(size_j);
4220  else
4222  }
4223  // FI: to avoid cycles between librairies ri-util and prettyprint
4224  /* ifdebug(3) */
4225  /* { */
4226  /* fprintf(stderr, "\n Size of actual array without subscript value \n"); */
4227  /* print_expression(e); */
4228  /* } */
4229  if (l_actual_ref!=NIL)
4230  {
4231  // the actual argument is an array element name,
4232  // we have to compute the subscript value also
4234  ifdebug(3)
4235  fprintf(stderr, "\n actual argument is an array element name:");
4236  for (j=i+1; j<= num_dim; j++)
4237  {
4238  dimension dim_j = find_ith_dimension(l_actual_dims,j);
4239  expression lower_j = dimension_lower(dim_j);
4240  expression sub_j = find_ith_argument(l_actual_ref,j);
4241  expression upper_j = dimension_upper(dim_j);
4242  expression size_j,sub_low_j,elem_j;
4243  if ( expression_constant_p(lower_j) && (expression_to_int(lower_j)==1))
4244  size_j = copy_expression(upper_j);
4245  else
4246  {
4247  size_j = binary_intrinsic_expression(
4248  MINUS_OPERATOR_NAME, upper_j, lower_j);
4249  size_j = binary_intrinsic_expression(
4251  }
4252  // CAUTION : heuristic
4253  // We can distinguish or not the special case: lower_bound = subscript,
4254  // 1. If not, we do not lose information such as in SPEC95/applu.f :
4255  // real u(5,33,33,33)
4256  // call exact(i,j,1,u(1,i,j,1))
4257  // => size = 5.33.33.33 -((i-1)5 +(j-1)5.33 +(k-1)5.33.33),
4258  // not 5.33.33.33 -((i-1)5 +(j-1)5.33) (as k=1)
4259  // subroutine exact(i,j,k,u000ijk)
4260  // We will have more combinations, but more chance to translate
4261  // the size of actual array to the callee's frame
4262  // 2. If yes, there are so much combinations =>
4263  // it takes long time to compute, such as in SPEC95/turb3d.f
4264  // CONCLUSION : for time efficiency, we distinguish this case
4265  if (!same_expression_p(sub_j,lower_j))
4266  {
4268  sub_j,lower_j);
4269  if (expression_undefined_p(prod))
4270  elem_j = copy_expression(sub_low_j);
4271  else
4273  sub_low_j,prod);
4275  sum = copy_expression(elem_j);
4276  else
4278  sum, elem_j);
4279  }
4280  if (expression_undefined_p(prod))
4281  prod = copy_expression(size_j);
4282  else
4284  prod,size_j);
4285  // FI: to avoid cycles between librairies ri-util and prettyprint
4286  /* ifdebug(4) */
4287  /* { */
4288  /* fprintf(stderr, "\n j = %d \n",j); */
4289  /* fprintf(stderr, "\n prod : \n"); */
4290  /* print_expression(prod); */
4291  /* fprintf(stderr, "\n sum =: \n"); */
4292  /* print_expression(sum); */
4293  /* } */
4294  }
4296  {
4298  copy_expression(e),sum);
4299  // FI: to avoid cycles between librairies ri-util and prettyprint
4300  /* ifdebug(2) */
4301  /* { */
4302  /* fprintf(stderr, "\n Size of actual array - subscript value : \n"); */
4303  /* print_expression(e); */
4304  /* } */
4305  }
4306  }
4307  // FI: to avoid cycles between librairies ri-util and prettyprint
4308  /* ifdebug(2) */
4309  /* { */
4310  /* fprintf(stderr, "\n Size of actual array:\n"); */
4311  /* print_expression(e); */
4312  /* } */
4313  return e;
4314 }
expression find_ith_argument(list args, int n)
Definition: expression.c:1147
static entity array
t_real sum(int n1, int n2, int n3, t_real u[n1][n2][n3])
Definition: stencil.c:57
Polymorphic argument.
Definition: printf-args.h:92

References binary_intrinsic_expression, copy_expression(), dimension_lower, dimension_upper, entity_type, expression_constant_p(), expression_to_int(), expression_undefined, expression_undefined_p, find_ith_argument(), find_ith_dimension(), fprintf(), gen_length(), ifdebug, int_to_expression(), MINUS_OPERATOR_NAME, MULTIPLY_OPERATOR_NAME, NIL, PLUS_OPERATOR_NAME, same_expression_p(), sum(), type_variable, and variable_dimensions.

Referenced by interprocedural_abc_arrays().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SizeOfArray()

bool SizeOfArray ( entity  e,
int s 
)

This function computes the total size of a variable in bytes, ie.

the product of the number of elements and the size of each element in byte, when this size is a constant.

Arrays cannot be sized by a variable according to Fortran 77 standard, unless they are formal parameters (see SafeSizeOfArray). This restriction is lifted for arrays allocated in the area STACK.

Arrays can be sized by expressions according to C latest standard (see Validation/C_syntax/array_declarators.c). Then their sizes are not available at compile time and their addresses in stack cannot be computed at compiler time (see CSafeSizeOfArray).

Since the size is returned in a signed int, there is a maximum PIPS size for an array.

Let's try to use the initial value

FI: should eveb be freed?

Is it an array of characters initialized with a string expression?

Is it a call to the BRACE_INTRINSIC operator?

This is too simple unfortunately: OK, but why? which test case?

ne = gen_length(args);

Should be a call to CParserError()...

Check for other dimensions which must be all declared: the first dimension only can be implicit

Already taken care of by "ni"

Check for 32 bit signed overflows

Definition at line 87 of file size.c.

88 {
89  type et = entity_type(e);
90  type uet = ultimate_type(et);
91  variable a, ua;
92  bool ok = true;
93  int se = -1;
94  int ne = -1;
95  int mne = -1;
96 
98  a = type_variable(et);
99  ua = type_variable(uet);
100 
101  se = SizeOfElements(variable_basic(ua));
102 
104 
105  if(!ok) {
106  /* Let's try to use the initial value */
107  value ev = entity_initial(e);
108  if(!value_undefined_p(ev)) {
109  if(value_expression_p(ev)) {
110  expression eve = value_expression(ev);
111  //type evet = expression_to_type(eve);
112  basic eveb = basic_of_expression(eve); /* FI: should eveb be freed? */
113 
114  /* Is it an array of characters initialized with a string expression? */
115  if(char_type_p(et) && !basic_undefined_p(eveb) && basic_string_p(eveb)) {
116  ne = string_type_size(eveb);
117  ok = true;
118  }
119  else if(expression_call_p(eve)) {
120  call evec = syntax_call(expression_syntax(eve));
121  entity f = call_function(evec);
122  list args = call_arguments(evec);
123 
124  /* Is it a call to the BRACE_INTRINSIC operator? */
126  /* This is too simple unfortunately: OK, but why? which
127  test case? */
128  /* ne = gen_length(args); */
129  int ni = number_of_initial_values(args);
130  //int nf = number_of_fields(et);
131  int nf = 1;
132 
133  if(type_variable_p(uet)) {
134  variable ev = type_variable(uet);
135  basic eb = variable_basic(ev);
136  if(basic_derived_p(eb)) {
137  entity de = basic_derived(eb);
138  nf = number_of_items(entity_type(de));
139  }
140  }
141  ne = ni/nf;
142  if (nf*ne!=ni) {
143  /* Should be a call to CParserError()... */
144  //pips_user_error("Number of initialization values (%d) incompatible"
145  // " with number of type fields (%d)\n", ni, nf);
146  // let's assume the source code is correct...
147  ne = gen_length(args);
148  }
149  ok = true;
150  }
151  /* Check for other dimensions which must be all declared: the
152  first dimension only can be implicit */
153  /* Already taken care of by "ni" */
154  /*
155  if(ok && gen_length(variable_dimensions(a))>1) {
156  bool sok = false;
157  int sne = -1;
158  sok = NumberOfElements(variable_basic(a), CDR(variable_dimensions(a)), &sne);
159  if(sok) {
160  ne *= sne;
161  }
162  else {
163  ok = false;
164  }
165  }
166  */
167  }
168  }
169  else if(value_constant_p(ev)) {
170  pips_internal_error("Not implemented yet");
171  }
172  }
173  }
174 
175  /* Check for 32 bit signed overflows */
176  mne = se>0 ? INT_MAX/se : INT_MAX;
177 
178  if(ok) {
179  if(mne>=ne)
180  *s = ne*se;
181  else {
182  pips_user_warning("Array size incompatible with 32 bit signed integers\n"
183  "Maximum number of elements: %d, number of elements declared: %d\n",
184  mne, ne);
185  ok = false;
186  }
187  }
188  else {
189  *s = se;
190  }
191 
192  return ok;
193 }
int number_of_items(type)
Same as above, but arrays in struct are taken into account.
Definition: type.c:3925
int string_type_size(basic)
Definition: type.c:1047
bool char_type_p(type)
return true whether ‘t’ is a char or an unsigned char
Definition: type.c:2877
_int SizeOfElements(basic b)
This function returns the length in bytes of the Fortran or C type represented by a basic,...
Definition: size.c:297

References assert, basic_derived, basic_derived_p, basic_of_expression(), basic_string_p, basic_undefined_p, call_arguments, call_function, char_type_p(), ENTITY_BRACE_INTRINSIC_P, entity_initial, entity_type, expression_call_p(), expression_syntax, f(), gen_length(), number_of_initial_values(), number_of_items(), NumberOfElements(), ok, pips_internal_error, pips_user_warning, SizeOfElements(), string_type_size(), syntax_call, type_variable, type_variable_p, ultimate_type(), value_constant_p, value_expression, value_expression_p, value_undefined_p, variable_basic, and variable_dimensions.

Referenced by add_any_variable_to_area(), alias_check(), array_size(), common_members_of_module(), ComputeAddresses(), CSafeSizeOfArray(), current_offset_of_area(), dump_common_layout(), formal_variable_add_aliases(), fprint_any_environment(), GenericAddLocalEntityToDeclarations(), gfc2pips_computeAdressesOfArea(), gfc2pips_symbol2data_instruction(), impact_check(), MakeStorageRam(), new_add_any_variable_to_area(), print_C_common_layout(), print_common_layout(), ram_variable_add_aliases(), SafeSizeOfArray(), same_or_equivalence_argument_add_aliases(), and storage_space_of_variable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SizeOfDimension()

expression SizeOfDimension ( dimension  d)

◆ SizeOfDimensions()

expression SizeOfDimensions ( list  dims)

computes the product of all dimensions in dims

Parameters
dimsims

Definition at line 522 of file size.c.

523 {
525 }
void * gen_reduce(void *r, void *(*fp)(void *, const list), const list l)
Definition: list.c:180
static void * do_sizeofdimension_reduction(void *v, const list l)
Definition: size.c:513

References do_sizeofdimension_reduction(), gen_reduce(), and int_to_expression().

Referenced by dimensions_to_dma(), do_group_constants_terapix(), do_group_count_elements_reduce(), do_linearize_array_reference(), do_linearize_type(), and makeTransfertSizeExpression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SizeOfElements()

_int SizeOfElements ( basic  b)

This function returns the length in bytes of the Fortran or C type represented by a basic, except for a varying size string (formal parameter).

What is the semantics for bitfields? Return its size rounded to a byte number large enough to fit, and not the size in bit.

Some of these values are target architecture dependent: e == 1 character e == 2 short int e == 4 int e == 6 long int e == 8 long long int They are defined in ri-util-local.h To be consistent with the machine compiling and executing PIPS, we could use a switch(e) and the corresponding sizeof().

As for int, e encodes some fine typing information: remove it

pips_assert("SizeOfElements", gen_consistent_p(b));

Size can be zero, i.e. unknown, for an external variable

Definition at line 297 of file size.c.

298 {
299  int e = -1;
300 
301  switch (basic_tag(b)) {
302  case is_basic_int:
303  {
304  /* Some of these values are target architecture dependent:
305  e == 1 character
306  e == 2 short int
307  e == 4 int
308  e == 6 long int
309  e == 8 long long int
310  They are defined in ri-util-local.h
311  To be consistent with the machine compiling and executing
312  PIPS, we could use a switch(e) and the corresponding sizeof().
313  */
314 
315  e = basic_int(b);
316  e = e % 10;
319  break;
320  }
321  case is_basic_float:
322  e = basic_float(b);
323  break;
324  case is_basic_logical:
325  e = basic_logical(b);
326  break;
327  case is_basic_complex:
328  e = basic_complex(b);
329  /* As for int, e encodes some fine typing information: remove it */
330  e = (e/8)*8;
331  break;
332  case is_basic_string: {
334 
335  /* pips_assert("SizeOfElements", gen_consistent_p(b)); */
336 
339  else if(value_symbolic_p(basic_string(b)))
341  else
342  user_error("SizeOfElements",
343  "Sizing of character variable by illegal value (tag=%d)",
344  basic_tag(b));
345 
346  if(constant_int_p(c))
347  e = constant_int(c);
348  else
349  user_error("SizeOfElements",
350  "Sizing of character variable by non-integer constant");
351  break;
352  }
353  case is_basic_bit: {
355  if(constant_int_p(c))
356  // Get the size in bits:
357  e = constant_int(c);
358  else
359  user_error("SizeOfElements",
360  "Sizing of bit-field is non-integer constant");
361  // Round the size to full byte number:
362  e = (e + 7)/8;
363  }
364  break;
365  case is_basic_pointer:
367  break;
368  case is_basic_derived:
370  break;
371  case is_basic_typedef:
373  break;
374  default:
375  pips_internal_error("Ill. tag %d for basic", basic_tag(b));
376  }
377 
378  /* Size can be zero, i.e. unknown, for an external variable */
379  //pips_assert("e is not zero", e!=0);
380 
381  return e;
382 }
int entity_memory_size(entity dt)
Definition: size.c:239
int CSafeSizeOfArray(entity a)
BEGIN_EOLE.
Definition: size.c:225

References basic_bit, basic_complex, basic_derived, basic_float, basic_int, basic_logical, basic_string, basic_tag, basic_typedef, constant_int, constant_int_p, constant_undefined, CSafeSizeOfArray(), DEFAULT_INTEGER_TYPE_SIZE, DEFAULT_LONG_INTEGER_TYPE_SIZE, DEFAULT_POINTER_TYPE_SIZE, entity_memory_size(), is_basic_bit, is_basic_complex, is_basic_derived, is_basic_float, is_basic_int, is_basic_logical, is_basic_pointer, is_basic_string, is_basic_typedef, pips_internal_error, symbolic_constant, user_error, value_constant, value_constant_p, value_symbolic, and value_symbolic_p.

Referenced by abc_with_allocation_size(), alias_check(), array_size_stride(), basic_maximum(), consecutive_expression_p(), distance_between_expression(), edge_cost_polynome(), formal_variable_add_aliases(), get_optimal_opcode(), get_symbol_table(), get_vect_name_from_data(), impact_check(), interprocedural_abc_arrays(), make_datum_movement(), make_movement_scalar_wp65(), make_movements_loop_body_wp65(), ram_variable_add_aliases(), region_translation_init(), same_or_equivalence_argument_add_aliases(), size_of_regions(), SizeOfArray(), SizeOfIthDimension(), subscript_value_stride(), text_equivalence_class(), type_and_size_of_var(), type_memory_size(), ValueSizeOfArray(), and variables_width_filter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sizeofexpression_equal_p()

bool sizeofexpression_equal_p ( sizeofexpression  s0,
sizeofexpression  s1 
)
Parameters
s00
s11

Definition at line 1446 of file expression.c.

References expression_equal_p(), s1, sizeofexpression_expression, sizeofexpression_expression_p, sizeofexpression_type, sizeofexpression_type_p, and type_equal_p().

Referenced by syntax_equal_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SizeOfIthDimension()

int SizeOfIthDimension ( entity  e,
int  i 
)

this function returns the size of the ith dimension of a variable e.

if called for the 0th dimension, it returns the variable element size.

Definition at line 453 of file size.c.

454 {
455  list pc = NIL;
456  intptr_t s = 0;
457 
458  if (!type_variable_p(entity_type(e))) {
459  fprintf(stderr, "[SizeOfIthDimension] not a variable\n");
460  abort();
461  }
462 
463  if (i == 0)
465 
467 
468  while (pc != NULL && --i > 0)
469  pc = CDR(pc);
470 
471  if (pc == NULL) {
472  fprintf(stderr, "[SizeOfIthDimension] not enough dimensions\n");
473  abort();
474  }
475 
477  if(!(expression_integer_value(sod, &s))) {
478  fprintf(stderr, "[SizeOfIthDimension] Non constant %dth dimension\n", i);
479  abort();
480  }
481  free_expression(sod);
482 
483  return s;
484 }

References abort, CAR, CDR, DIMENSION, entity_type, expression_integer_value(), fprintf(), free_expression(), intptr_t, NIL, SizeOfDimension(), SizeOfElements(), type_variable, type_variable_p, variable_basic, and variable_dimensions.

Referenced by array_distribution_similar_p(), ComputeNewSizeOfIthDimension(), create_init_common_param_for_arrays(), hpfc_broadcast_buffers(), hpfc_compute_distribute_constraints(), NormalizeOneTemplateDistribution(), OffsetOfReference(), one_message_guards_and_neighbour(), processor_number(), same_alignment_p(), and text_equivalence_class().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ some_basic_of_any_expression()

basic some_basic_of_any_expression ( expression  exp,
bool  apply_p,
bool  ultimate_p 
)

basic basic_of_any_expression(expression exp, bool apply_p): Makes a basic of the same basic as the expression "exp" if "apply_p" is FALSE.

If "apply_p" is true and if the expression returns a function, then return the resulting type of the function.

WARNING: a new basic object is allocated

PREFER (???) expression_basic

print_expression(exp);

pips_debug(6, "\n");

Well, let's assume range are well formed...

This happens with the assert macro... but could happen anywhere as in (void) printf(...);

FI: I cannot think of anything better...

SG: following code fragment seems wrong to me { sizeofexpression se = syntax_sizeofexpression(sy); if (sizeofexpression_type_p(se)) { type t = sizeofexpression_type(se); if (type_tag(t) != is_type_variable) pips_internal_error("Bad reference type tag %d",type_tag(t)); b = copy_basic(variable_basic(type_variable(t))); } else { b = some_basic_of_any_expression(sizeofexpression_expression(se), apply_p, ultimate_p); }

depending on the depth of the subscript, we should change the basic

the second argument is the type of the returned object

Never go there...

pips_debug(6, "returns with %s\n", basic_to_string(b));

Parameters
expxp
apply_ppply_p
ultimate_pltimate_p

Definition at line 1258 of file type.c.

1259 {
1261  basic b = basic_undefined;
1262 
1263  ifdebug(6){
1264  pips_debug(6, "begins with apply_p=%s and expression ", bool_to_string(apply_p));
1265  // FI: to avoid cycles betwen librairies ri-util and prettyprint
1266  /* print_expression(exp); */
1267  /* pips_debug(6, "\n"); */
1268  }
1269 
1270  switch(syntax_tag(sy)) {
1271  case is_syntax_reference:
1272  {
1273  b = basic_of_any_reference(syntax_reference(sy),apply_p,ultimate_p);
1274  break;
1275  }
1276  case is_syntax_call:
1277  b = basic_of_call(syntax_call(sy), apply_p, ultimate_p);
1278  break;
1279  case is_syntax_range:
1280  /* Well, let's assume range are well formed... */
1282  break;
1283  case is_syntax_cast:
1284  {
1285  type t = cast_type(syntax_cast(sy));
1286 
1287  if (type_tag(t) != is_type_variable) {
1288  if(type_void_p(t))
1289  /* This happens with the assert macro... but could happen
1290  anywhere as in (void) printf(...); */
1291  /* FI: I cannot think of anything better... */
1292  b = basic_undefined;
1293  else
1294  pips_internal_error("Bad reference type tag %d",type_tag(t));
1295  }
1296  else
1298  break;
1299  }
1301  /* SG: following code fragment seems wrong to me
1302  {
1303  sizeofexpression se = syntax_sizeofexpression(sy);
1304  if (sizeofexpression_type_p(se))
1305  {
1306  type t = sizeofexpression_type(se);
1307  if (type_tag(t) != is_type_variable)
1308  pips_internal_error("Bad reference type tag %d",type_tag(t));
1309  b = copy_basic(variable_basic(type_variable(t)));
1310  }
1311  else
1312  {
1313  b = some_basic_of_any_expression(sizeofexpression_expression(se), apply_p, ultimate_p);
1314  }
1315  */
1316 
1318  break;
1319 
1320  case is_syntax_subscript:
1321  {
1322  b = some_basic_of_any_expression(subscript_array(syntax_subscript(sy)), apply_p, ultimate_p);
1323  /* depending on the depth of the subscript, we should change the basic */
1325  break;
1326  }
1327  case is_syntax_application:
1328  {
1330  break;
1331  }
1332  case is_syntax_va_arg:
1333  {
1334  /* the second argument is the type of the returned object */
1336 
1337  if(sizeofexpression_type_p(sofe)) {
1339 
1340  if(type_variable_p(t))
1342  else
1343  pips_internal_error("Not implemented");
1344  }
1345  else {
1347  b = basic_of_any_expression(e, true);
1348  pips_internal_error("expression not expected here");
1349  }
1350  break;
1351  }
1352  default:
1353  pips_internal_error("Bad syntax tag %d", syntax_tag(sy));
1354  /* Never go there... */
1356  }
1357 
1358  /* pips_debug(6, "returns with %s\n", basic_to_string(b)); */
1359 
1360  return b;
1361 }
basic basic_of_call(call c, bool apply_p, bool ultimate_p)
basic basic_of_call(call c): returns the basic of the result given by the call "c".
Definition: type.c:1469

References application_function, basic_and_indices_to_basic(), basic_of_any_expression(), basic_of_any_reference(), basic_of_call(), basic_of_expression(), basic_undefined, bool_to_string(), CAR, cast_type, CDR, copy_basic(), DEFAULT_INTEGER_TYPE_SIZE, exp, expression_syntax, ifdebug, is_basic_overloaded, is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, is_type_variable, make_basic(), make_basic_int(), pips_debug, pips_internal_error, range_lower, SIZEOFEXPRESSION, sizeofexpression_expression, sizeofexpression_type, sizeofexpression_type_p, some_basic_of_any_expression(), subscript_array, subscript_indices, syntax_application, syntax_call, syntax_cast, syntax_range, syntax_reference, syntax_subscript, syntax_tag, syntax_va_arg, type_tag, type_variable, type_variable_p, type_void_p, ultimate_type(), UUINT, and variable_basic.

Referenced by basic_of_any_expression(), basic_of_intrinsic(), expression_to_user_type(), make_temporary_scalar_entity(), and some_basic_of_any_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sort_list_of_entities()

void sort_list_of_entities ( list  l)

sorted in place.

Definition at line 1358 of file entity.c.

1359 {
1361 }

References compare_entities(), and gen_sort_list().

Referenced by dump_common_layout(), entity_generate_missing_declarations(), loop_private_variables_as_entites(), loop_sort_locals(), print_C_common_layout(), print_common_layout(), update_common_sizes(), and update_user_common_layouts().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ split_initializations_in_statement()

void split_initializations_in_statement ( statement  s)

Transform a declaration with an initialization statement into 2 parts, a declaration statement and an initializer statement.

gen_recurse callback on exiting statements. For a declaration to be split:

  • it must be a local declaration
  • the initial value, if any, must be a valid rhs expression or an array initialization; struct initialization are not (yet) supported

generate C99 code

The initialization of a static variable cannot be split

if this transformation led to an uninitialized const, remove the const qualifier

This is not very smart... You do not need pcs in C99 since you are going to add the assignment statements just after the current declaration statement...

Chain the new list within the current statement list

Move to the next original element nsl

Move to the next statement

Move to the next statement

generate C89 code

Do nothing ?

Definition at line 437 of file declarations.c.

438 {
439  if(!get_bool_property("C89_CODE_GENERATION") && statement_block_p(s)) {
440  /* generate C99 code */
441  list cs = list_undefined;
442  list pcs = NIL;
443  list nsl = statement_block(s); // new statement list
444  for( cs = statement_block(s); !ENDP(cs); ) {
445  statement ls = STATEMENT(CAR(cs));
446  if(declaration_statement_p(ls)) {
447  list inits = NIL;
448  list decls = statement_declarations(ls); // Non-recursive
449  //statement sc = statement_undefined; // statement copy
450 
451  FOREACH(ENTITY, var, decls) {
452  /* The initialization of a static variable cannot be split */
453  if(entity_static_variable_p(var)) {
454  pips_user_warning("Initialization of variable \"%s\" cannot be "
455  "split from its declaration because \"%s\" "
456  "is a static variable.\n",
458  }
459  else {
460  const char* mn = entity_module_name(var);
461  const char* cmn = get_current_module_name();
462  if ( same_string_p(mn,cmn)
464  ) {
466  if (expression_is_C_rhs_p(ie)) {
468  inits = gen_nconc(inits, CONS(statement, is, NIL));
470  }
471  else if(entity_array_p(var)) {
472  inits = gen_nconc(inits, brace_expression_to_statements(var,ie));
475  }
477  inits = gen_nconc(inits, brace_expression_to_statements(var,ie));
479  }
480  else {
481  pips_user_warning("split initializations not implemented yet for structures\n");
482  }
483  /* if this transformation led to an uninitialized const, remove the const qualifier */
484  if(value_unknown_p(entity_initial(var))) {
485  list tmp = gen_copy_seq(entity_qualifiers(var));
486  FOREACH(QUALIFIER,q,tmp) {
487  if(qualifier_const_p(q))
489  }
490  gen_free_list(tmp);
491  }
492  }
493  }
494  }
495 
496  if(!ENDP(inits)) {
497  /* This is not very smart... You do not need pcs in C99
498  since you are going to add the assignment statements
499  just after the current declaration statement... */
500  inits = CONS(STATEMENT, ls, inits);
501  /* Chain the new list within the current statement list */
502  if(ENDP(pcs)) {
503  nsl = inits;
504  }
505  else {
506  CDR(pcs) = inits;
507  }
508  /* Move to the next original element nsl */
509  pcs = gen_last(inits);
510  CDR(pcs) = CDR(cs);
511  POP(cs);
512  }
513  else {
514  /* Move to the next statement */
515  pcs = cs;
516  POP(cs);
517  }
518  }
519  else {
520  /* Move to the next statement */
521  pcs = cs;
522  POP(cs);
523  }
524  }
526  }
527  else if(statement_block_p(s)) {
528  /* generate C89 code */
529  list cs = list_undefined;
530  //list pcs = NIL;
531  //list nsl = statement_block(s); // new statement list
532  list inits = NIL; // list of initialization statements
533 
534  for( cs = statement_block(s); !ENDP(cs); POP(cs)) {
535  statement ls = STATEMENT(CAR(cs));
536  if(declaration_statement_p(ls)) {
537  list decls = statement_declarations(ls); // Non-recursive
538  //statement sc = statement_undefined; // statement copy
539 
540  FOREACH(ENTITY, var, decls) {
541  const char* mn = entity_module_name(var);
542  const char* cmn = get_current_module_name();
543  if ( strcmp(mn,cmn) == 0
545  ) {
547  if(expression_undefined_p(ie)) {}
548  else if (expression_is_C_rhs_p(ie)) {
550  inits = gen_nconc(inits, CONS(statement, is, NIL));
552  }
553  else if(entity_array_p(var)) {
554  inits=gen_nconc(inits,brace_expression_to_statements(var,ie));
556  }
557  else {
558  pips_user_warning("split initializations not implemented yet for structures\n");
559  }
560  }
561  }
562  }
563 
564  if(!ENDP(inits)) {
565  list ncs = CDR(cs);
566  if(ENDP(ncs) || !declaration_statement_p(STATEMENT(CAR(ncs)))) {
567  list pcs = gen_last(inits);
568  CDR(cs) = inits;
569  CDR(pcs) = ncs;
570  break;
571  }
572  }
573  }
574  //instruction_block(statement_instruction(s)) = nsl;
575  }
576  else {
577  /* Do nothing ? */
578  }
579 }
list entity_qualifiers(entity e)
return the qualifiers associated to entity e if it's a variable NIL otherwise
Definition: entity.c:1394
bool expression_is_C_rhs_p(expression exp)
Not all expressions can be used as right-hand side (rhs) in C assignments.
Definition: expression.c:2582
void brace_expression_to_updated_type(entity arr, expression e)
use a brace expression to update the type of array "arr" if the dimensions are implicit
Definition: expression.c:3517
list brace_expression_to_statements(entity arr, expression e)
converts a brace expression used to initialize an array (not a struct yet) into a statement sequence
Definition: expression.c:3480
bool entity_static_variable_p(entity)
return true if the entity is declared with the keyword static
Definition: variable.c:1146
expression variable_initial_expression(entity)
Returns a copy of the initial (i.e.
Definition: variable.c:1899
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

References brace_expression_to_statements(), brace_expression_to_updated_type(), CAR, CDR, CONS, declaration_statement_p(), ENDP, ENTITY, entity_array_p(), entity_basic_concrete_type(), entity_initial, entity_module_name(), entity_qualifiers(), entity_static_variable_p(), entity_to_expression(), entity_type, entity_user_name(), expression_is_C_rhs_p(), expression_undefined_p, FOREACH, gen_copy_seq(), gen_free_list(), gen_last(), gen_nconc(), gen_remove_once(), get_bool_property(), get_current_module_name(), instruction_block, list_undefined, make_assign_statement(), make_value_unknown(), NIL, pips_user_warning, POP, QUALIFIER, qualifier_const_p, same_string_p, STATEMENT, statement_block(), statement_block_p, statement_declarations, statement_instruction, struct_type_p(), type_variable, value_unknown_p, variable_initial_expression(), and variable_qualifiers.

Referenced by MakeForloopWithIndexDeclaration(), and statement_split_initializations().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stack_area_p()

◆ standard_long_integer_type_p()

bool standard_long_integer_type_p ( type  t)

Used to encode the long keyword in the parser.

Used to detect long double type in parser

Definition at line 3227 of file type.c.

3228 {
3229  bool long_p = false;
3230  if(!type_undefined_p(t) && type_variable_p(t)) {
3231  variable v = type_variable(t);
3232  basic b = variable_basic(v);
3233  if(basic_int_p(b)) {
3234  int s = basic_int(b);
3235 
3236  long_p = ENDP(variable_dimensions(v))
3237  && ENDP(variable_qualifiers(v))
3238  && (s == DEFAULT_INTEGER_TYPE_SIZE
3241  }
3242  }
3243  return long_p;
3244 }

References basic_int, basic_int_p, DEFAULT_INTEGER_TYPE_SIZE, DEFAULT_LONG_INTEGER_TYPE_SIZE, DEFAULT_LONG_LONG_INTEGER_TYPE_SIZE, ENDP, type_undefined_p, type_variable, type_variable_p, variable_basic, variable_dimensions, and variable_qualifiers.

◆ statement_enclosing_loops_undefined_p()

bool statement_enclosing_loops_undefined_p ( statement  )

◆ statement_global_stack_defined_p()

bool statement_global_stack_defined_p ( void  )

Definition at line 364 of file static.c.

365 {
367 }

References stack_undefined_p, and statement_global_stack.

Referenced by call_to_transformer(), and statement_to_transformer().

+ Here is the caller graph for this function:

◆ statement_normalize_subscripts()

void statement_normalize_subscripts ( statement  s)

To be used for module statements.

Definition at line 4471 of file expression.c.

References expression_domain, gen_recurse, gen_true(), and normalize_subscript_expression().

Referenced by actual_c_parser().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ statement_to_goto_table_flt()

bool statement_to_goto_table_flt ( instruction  i)

End: clean up sequences context.

Add a couple (statement -> GOTO) to the map statement_to_goto_table:

Definition at line 221 of file clean_up_sequences.c.

222 {
223  if (instruction_goto_p(i))
224  {
226 
227  pips_debug(7, "Adding GOTO from instruction %p to statement %p.\n",
228  i, s);
229 
230  if (!hash_defined_p(statement_to_goto_table, (char *) s)) {
232  (char *) s,
233  (char *) CONS(INSTRUCTION, i, NIL));
234  }
235  else {
237  (char *) s,
238  (char *) CONS(INSTRUCTION,
239  i,
241  (char *) s)));
242  }
243  // There is nothing to recurse into:
244  return false;
245  }
246  return true;
247 }
void hash_update(hash_table htp, const void *key, const void *val)
update key->val in htp, that MUST be pre-existent.
Definition: hash.c:491
#define INSTRUCTION(x)
INSTRUCTION.
Definition: ri.h:1448
#define instruction_goto_p(x)
Definition: ri.h:1524

References CONS, hash_defined_p(), hash_get(), hash_put(), hash_update(), INSTRUCTION, instruction_goto, instruction_goto_p, NIL, pips_debug, and statement_to_goto_table.

Referenced by compute_statement_to_goto_table().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ static_area_p()

bool static_area_p ( entity  aire)
Parameters
aireire

Definition at line 77 of file area.c.

78 {
79 #ifndef NDEBUG
81  pips_assert("entity_kind is consistent", result == ( (entity_kind(aire) & ENTITY_STATIC_AREA) == ENTITY_STATIC_AREA));
82 #endif
83  return entity_kind(aire) & ENTITY_STATIC_AREA;
84 }

References entity_kind, ENTITY_STATIC_AREA, module_local_name(), pips_assert, same_string_p, and STATIC_AREA_LOCAL_NAME.

Referenced by AnalyzeData(), c_text_related_entities(), empty_static_area_p(), entity_locations_max(), entity_special_area_p(), entity_static_variable_p(), fix_storage(), live_in_paths_of_statement(), new_add_any_variable_to_area(), sentence_area(), sequence_to_post_pv(), variable_static_p(), and variable_to_abstract_location().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ static_global_variable_p()

bool static_global_variable_p ( entity  v)

Is v a global variable declared local to a C file such "static int i;".

Definition at line 1498 of file variable.c.

1499 {
1500  // static global variables are decared in a compilation unit
1502 
1503  return static_global_variable_p;
1504 }
bool static_global_variable_p(entity v)
Is v a global variable declared local to a C file such "static int i;".
Definition: variable.c:1498

References compilation_unit_p(), entity_module_name(), and static_global_variable_p().

Referenced by create_stub_entity(), filter_formal_context_according_to_actual_context(), new_filter_formal_context_according_to_actual_context(), source_to_sinks(), and static_global_variable_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ static_module_p()

bool static_module_p ( entity  e)

Check if the given module entity is a static module.

Definition at line 80 of file module.c.

80  {
82 }

References entity_name, and static_module_name_p().

Referenced by c_text_related_entities(), CreateEntityFromLocalNameAndPrefix(), CreateMemberScope(), FindEntityFromLocalNameAndPrefixAndScope(), FindOrCreateCurrentEntity(), sentence_head(), and sentence_tail().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ std_file_entity_p()

bool std_file_entity_p ( entity  e)

◆ std_file_entity_to_pointed_file_entity()

entity std_file_entity_to_pointed_file_entity ( entity  e)

Dummy standard files targets.

Definition at line 1243 of file entity.c.

1244 {
1245  string std_file_name;
1246  static string std_file_target_suffix = "";
1247  if (stdin_entity_p(e)) std_file_name = "stdin";
1248  else if (stdout_entity_p(e)) std_file_name = "stdout";
1249  else std_file_name = "stderr";
1250 
1251  string target_name;
1252  asprintf(&target_name,"__%s__%s", std_file_name, std_file_target_suffix);
1253 
1255  target_name);
1256 
1257  if (type_undefined_p(entity_type(target)))
1258  {
1259  type t = entity_type(e);
1265  0, NIL));
1266  entity_kind(target) = EFFECTS_PACKAGE;
1267  }
1268 
1269  return target;
1270 }
bool stdout_entity_p(entity e)
Definition: entity.c:1215
bool stdin_entity_p(entity e)
Definition: entity.c:1203

References asprintf, basic_pointer, EFFECTS_PACKAGE, entity_kind, entity_storage, entity_type, FindEntity(), FindOrCreateEntity(), FindOrCreateTopLevelEntity(), IO_EFFECTS_PACKAGE_NAME, is_storage_ram, make_ram(), make_storage(), NIL, STATIC_AREA_LOCAL_NAME, stdin_entity_p(), stdout_entity_p(), type_undefined_p, type_variable, and variable_basic.

Referenced by declaration_to_post_pv().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stderr_entity_p()

bool stderr_entity_p ( entity  e)

Definition at line 1226 of file entity.c.

1227 {
1228  return same_entity_p(e, get_stderr_entity());
1229 }
entity get_stderr_entity()
Definition: entity.c:1220

References get_stderr_entity(), and same_entity_p().

+ Here is the call graph for this function:

◆ stdin_entity_p()

bool stdin_entity_p ( entity  e)

Definition at line 1203 of file entity.c.

1204 {
1205  return same_entity_p(e, get_stdin_entity());
1206 }
entity get_stdin_entity()
Definition: entity.c:1197

References get_stdin_entity(), and same_entity_p().

Referenced by com_call(), and std_file_entity_to_pointed_file_entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stdout_entity_p()

bool stdout_entity_p ( entity  e)

Definition at line 1215 of file entity.c.

1216 {
1217  return same_entity_p(e, get_stdout_entity());
1218 }
entity get_stdout_entity()
Definition: entity.c:1209

References get_stdout_entity(), and same_entity_p().

Referenced by std_file_entity_to_pointed_file_entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ storage_space_of_variable()

int storage_space_of_variable ( entity  v)

Storage size is expressed in bytes

Definition at line 656 of file size.c.

657 {
658  /* Storage size is expressed in bytes */
659  int l;
660  char * s;
661 
663  user_warning("storage_space_of_variable",
664  "hash table should have been allocated\n");
666  }
667  s = hash_get(entity_to_size, (char *) v);
668  l = (_int) s;
669  if (s == HASH_UNDEFINED_VALUE) {
670  if(!SizeOfArray(v, &l)) {
671  fprintf(stderr, "[storage_space_of_variable] Non constant array size\n");
672  abort();
673  }
674  hash_put(entity_to_size, (char *) v, (char *) (_int) l);
675  }
676 
677  return l;
678 }

References abort, entity_to_size, fprintf(), hash_get(), hash_pointer, hash_put(), hash_table_make(), hash_table_undefined, HASH_UNDEFINED_VALUE, SizeOfArray(), and user_warning.

Referenced by create_new_common_variable(), and variable_entities_may_conflict_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ storage_to_string()

string storage_to_string ( storage  s)

Definition at line 2030 of file entity.c.

2031 {
2032  string desc = string_undefined;
2033 
2034  if(storage_undefined_p(s))
2035  desc = "storage_undefined";
2036  else if(storage_return_p(s))
2037  desc = "return";
2038  else if(storage_ram_p(s))
2039  desc = "ram";
2040  else if(storage_formal_p(s))
2041  desc = "formal";
2042  else if(storage_rom_p(s))
2043  desc = "rom";
2044  else
2045  pips_internal_error("Unknown storage tag");
2046 
2047  return desc;
2048 }

References pips_internal_error, storage_formal_p, storage_ram_p, storage_return_p, storage_rom_p, storage_undefined_p, and string_undefined.

Referenced by add_or_kill_equivalenced_variables(), and UpdateEntity().

+ Here is the caller graph for this function:

◆ store_independent_reference_p()

bool store_independent_reference_p ( reference  r)

Does this reference define the same set of memory locations regardless of the current (environment and) memory state?

This function copes with standard references, extended to pointer references such as p[i], not with general points-to references, which are extended to cope with structs and implicit dereferencing. Points-to references are/should be handled in effects-util, not in ri-util.

Definition at line 3108 of file expression.c.

3109 {
3110  bool independent_p = true;
3111  //list ind = reference_indices(r);
3112  entity v = reference_variable(r);
3113  type t = ultimate_type(entity_type(v));
3114 
3115  if(pointer_type_p(t)) {
3116  independent_p = false;
3117  }
3118  else {
3119  independent_p = reference_with_constant_indices_p(r);
3120  }
3121 
3122  return independent_p;
3123 }
bool reference_with_constant_indices_p(reference r)
Definition: expression.c:3022

References entity_type, pointer_type_p(), reference_variable, reference_with_constant_indices_p(), and ultimate_type().

Referenced by basic_update_reflhs_with_rhs_to_transformer(), generic_reference_to_transformer(), opkill_may_reference(), and opkill_must_reference().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ store_statement_enclosing_loops()

void store_statement_enclosing_loops ( statement  ,
list   
)

◆ string_block_scope_p()

bool string_block_scope_p ( string  s)

Definition at line 511 of file entity.c.

512 {
513  // A block scope string is empty or made of numbers each terminated by BLOCK_SEP_STRING
514  char valid[12] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', BLOCK_SEP_CHAR, '\0'};
515  bool is_block_scope = false;
516  string cs = s;
517  bool is_number = false;
518 
519  pips_debug(10, "Potential block scope string = \"%s\"\n", s);
520 
521  if(strspn(s, valid) == strlen(s)) {
522  for(cs=s; *cs!='\0'; cs++) {
523  if(is_number && isdigit(*cs))
524  ;
525  else if(is_number && *cs==BLOCK_SEP_CHAR)
526  is_number = false;
527  else if(!is_number && isdigit(*cs))
528  is_number = true;
529  else if(!is_number && *cs==BLOCK_SEP_CHAR) {
530  is_block_scope = false;
531  break;
532  }
533  }
534  is_block_scope = !is_number;
535  }
536 
537  pips_debug(10, "String = \"%s\" is %sa block scope string\n", s, is_block_scope?"":"not ");
538 
539  return is_block_scope;
540 }

References BLOCK_SEP_CHAR, and pips_debug.

Referenced by CreateEntityFromLocalNameAndPrefix(), CreateMemberScope(), EnterScope(), FindEntityFromLocalNameAndPrefix(), FindOrCreateCurrentEntity(), FindOrCreateEntityFromLocalNameAndPrefixAndScope(), pop_block_scope(), and scope_to_block_scope().

+ Here is the caller graph for this function:

◆ string_fuse_final_linefeeds()

string string_fuse_final_linefeeds ( string  s)

Get rid of extra linefeed/newline at the end of a string.

This is sometimes useful to cleanup comments messed up by the lexical analyzer.

Warning: the argument s is updated if it ends up with LF

Definition at line 227 of file util.c.

228 {
229  int l = strlen(s)-1;
230 
231  while(l>=1 && *(s+l)=='\n' && *(s+l-1)=='\n') {
232  *(s+l) = '\000';
233  l--;
234  }
235 
236  return s;
237 }

◆ string_of_type()

string string_of_type ( type  t)

Definition at line 56 of file type.c.

57 {
58  list pdl = NIL;
59  list wl = words_type(t, &pdl, false);
60  gen_free_list(pdl);
61  string s = words_to_string(wl);
62  FOREACH(STRING,s,wl) free(s);
63  gen_free_list(wl);
64  return s;
65 }
string words_to_string(cons *lw)
Definition: print.c:211

Referenced by basic_concrete_types_compatible_for_effects_interprocedural_translation_p(), and same_type_name_p().

+ Here is the caller graph for this function:

◆ string_remove_trailing_line_feed()

string string_remove_trailing_line_feed ( string  s)

Remove trailing line feed if any.

Definition at line 169 of file util.c.

170 {
171  int sl = strlen(s);
172  if(sl>0) {
173  string ntl = s+sl-1;
174  if(sl>0 && *ntl=='\n') {
175  *ntl='\000';
176  }
177  }
178  return s;
179 }

◆ string_remove_trailing_line_feeds()

string string_remove_trailing_line_feeds ( string  s)

Remove trailing line feeds.

This function has been implemented three times. See below string_strip_final_linefeeds() and string_fuse_final_linefeeds().

Definition at line 186 of file util.c.

187 {
188  int sl = strlen(s);
189  if(sl>0) {
190  string ntl = s+sl-1;
191  while(sl>0 && *ntl=='\n') {
192  *ntl='\000';
193  ntl--;
194  sl--;
195  }
196  }
197  return s;
198 }

◆ string_strip_final_linefeeds()

string string_strip_final_linefeeds ( string  s)

Get rid of linefeed/newline at the end of a string.

This is sometimes useful to cleanup comments messed up by the lexical analyzer.

Warning: the argument s is updated if it ends up with LF

Definition at line 208 of file util.c.

209 {
210  int l = strlen(s)-1;
211 
212  while(l>=0 && *(s+l)=='\n') {
213  *(s+l) = '\000';
214  l--;
215  }
216 
217  return s;
218 }

◆ string_struct_scope_p()

bool string_struct_scope_p ( string  s)

same kind of testing required for union as well

Full testing would require a module_name, a block_scope and a struct name

Just lookup the struct identifier

Definition at line 503 of file entity.c.

504 {
505  /* Full testing would require a module_name, a block_scope and a struct name */
506  /* Just lookup the struct identifier*/
507  string ss = strchr(s, MEMBER_SEP_CHAR);
508  return ss != NULL;
509 }

References MEMBER_SEP_CHAR.

◆ string_to_entity_list()

list string_to_entity_list ( string  module,
string  names 
)

of entity

Returns
the list of entities in module the name of which is given warning: the entity is created if it does not exist!
Parameters
modulethe name of the module for the entities
namesa string of comma-separated of entity names
Parameters
moduleodule
namesames

Definition at line 1887 of file entity.c.

1888 {
1889  list le = NIL;
1890  string s, next_comma = (char*) 1;
1891  for (s = names; s && *s && next_comma;)
1892  {
1893  next_comma = strchr(s, ',');
1894  if (next_comma) *next_comma = '\0';
1895  le = CONS(ENTITY, FindOrCreateEntity(module, s), le);
1896  s += strlen(s)+1;
1897  if (next_comma) *next_comma = ',';
1898  }
1899  return le;
1900 }

References CONS, ENTITY, FindOrCreateEntity(), module, and NIL.

+ Here is the call graph for this function:

◆ string_to_user_modules()

list string_to_user_modules ( const char *  s)

Build a list of functions from a string s containing SPACE separated function names.

Beware of ambiguities that static function names may cause.

See also string_to_entities() and a similar piece of code in inlining.c that was used to code this function.

FI: warning at a very low level, with no information about the context. Might be better to return list_undefined on a conversion failure?

Definition at line 562 of file module.c.

563 {
564  list ml = NIL; // module list
565  string ds = strdup(s);
566 
567  string c_name= NULL;
568  for(c_name = strtok(ds," ") ;
569  c_name ;
570  c_name=strtok(NULL," ") ) {
572  if(entity_undefined_p(m))
573  /* FI: warning at a very low level, with no information about
574  the context. Might be better to return list_undefined on a
575  conversion failure? */
576  pips_user_warning("No function found for \"%s\".\n", c_name);
577  else
578  ml = CONS(ENTITY, m, ml);
579  }
580  free(ds);
581  return ml;
582 }

References CONS, ENTITY, entity_undefined_p, free(), local_name_to_top_level_entity(), NIL, pips_user_warning, and strdup().

Referenced by loop_fully_unrollable_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ string_type_p()

◆ string_type_size()

int string_type_size ( basic  b)

The size may be unknown as in CHARACTER*(*)

No way to check it really was a '*'?

Definition at line 1047 of file type.c.

1048 {
1049  int size = -1;
1050  value v = basic_string(b);
1052 
1053  switch(value_tag(v)) {
1054  case is_value_constant:
1055  c = value_constant(v);
1056  if(constant_int_p(c))
1057  size = constant_int(c);
1058  else
1059  pips_internal_error("Non-integer constant to size a string");
1060  break;
1061  case is_value_unknown:
1062  /* The size may be unknown as in CHARACTER*(*) */
1063  /* No way to check it really was a '*'? */
1064  size = -1;
1065  break;
1066  default:
1067  pips_internal_error("Non-constant value to size a string");
1068  }
1069 
1070  return size;
1071 }

References basic_string, constant_int, constant_int_p, constant_undefined, is_value_constant, is_value_unknown, pips_internal_error, value_constant, and value_tag.

Referenced by basic_type_size(), constant_to_transformer(), SizeOfArray(), and string_expression_to_transformer().

+ Here is the caller graph for this function:

◆ struct_initialization_expression_to_expressions()

list struct_initialization_expression_to_expressions ( expression  e)

Returns a list of expressions hidden by the brace function.

First cut: FI not too sure about recursive calls to the brace function.

Definition at line 4073 of file expression.c.

4074 {
4075  pips_assert("rhs is a C initialization expression",
4077  syntax s = expression_syntax(e);
4078  call c = syntax_call(s);
4079  list el = call_arguments(c);
4080  return el;
4081 }
bool C_initialization_expression_p(expression e)
Definition: expression.c:4056

References C_initialization_expression_p(), call_arguments, expression_syntax, pips_assert, and syntax_call.

Referenced by struct_initialization_to_points_to().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ struct_type_p()

bool struct_type_p ( type  t)

Returns true if t is of type derived and if the derived type is a struct.

Example : struct foo var;

Note: different trom type_struct_p

Definition at line 3121 of file type.c.

3122 {
3123  bool struct_p = false;
3124  if(derived_type_p(t)) {
3126  entity dte = basic_derived(b);
3127  type dt = entity_type(dte);
3128  struct_p = type_struct_p(dt);
3129  }
3130  return struct_p;
3131 }

References basic_derived, derived_type_p(), entity_type, type_struct_p, type_variable, and variable_basic.

Referenced by add_inter_or_intraprocedural_field_entities(), analyzed_array_p(), analyzed_array_type_p(), analyzed_entity_p(), analyzed_struct_p(), analyzed_struct_type_p(), any_source_to_sinks(), any_user_call_site_to_transformer(), anywhere_source_to_sinks(), assign_rhs_to_reflhs_to_transformer(), assignment_to_points_to(), c_return_to_transformer(), compute_points_to_binded_set(), declaration_statement_to_points_to(), dereferencing_to_points_to(), dereferencing_to_sinks(), freed_list_to_points_to(), generic_points_to_cell_to_useful_pointer_cells(), generic_stub_source_to_sinks(), generic_substitute_formal_array_elements_in_transformer(), intrinsic_call_to_points_to(), memory_dereferencing_p(), module_to_value_mappings(), new_recursive_filter_formal_context_according_to_actual_context(), offset_cell(), perform_array_element_substitutions_in_transformer(), points_to_cells_parameters(), points_to_function_projection(), points_to_set_block_projection(), points_to_translation_of_formal_parameters(), points_to_translation_of_struct_formal_parameter(), recursive_cell_to_pointer_cells(), recursive_store_independent_points_to_reference_p(), reference_add_field_dimension(), reference_to_points_to_sinks(), rename_variable_type(), split_initializations_in_statement(), strict_constant_path_p(), struct_assignment_to_points_to(), struct_variable_to_pointer_locations(), struct_variable_to_pointer_subscripts(), subscript_to_points_to_sinks(), transformer_apply_unknown_field_assignments_or_equalities(), and variable_to_pointer_locations().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ struct_type_to_fields()

◆ struct_variable_to_fields()

list struct_variable_to_fields ( entity  v)

Assume that v is declared as a struct.

Return the list of its fields.

Apart from a possible assert, the same function should work for a union.

Definition at line 2045 of file variable.c.

2046 {
2048  list fl = derived_type_to_fields(c_t);
2049  return fl;
2050 }
list derived_type_to_fields(type)
Definition: type.c:5381

References derived_type_to_fields(), and entity_basic_concrete_type().

Referenced by analyzed_struct_p(), and struct_initialization_to_points_to().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sub_expression_p()

bool sub_expression_p ( expression  e)

Definition at line 991 of file expression.c.

991  {
994  ;
995 }

References MINUS_C_OPERATOR_NAME, MINUS_OPERATOR_NAME, and operator_expression_p().

Referenced by incrementation_expression_to_increment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ subscript_equal_p()

bool subscript_equal_p ( subscript  s1,
subscript  s2 
)
Parameters
s11
s22

Definition at line 1495 of file expression.c.

References expression_equal_p(), gen_equals(), s1, subscript_array, and subscript_indices.

Referenced by syntax_equal_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ subscript_expressions_to_constant_subscript_expressions()

list subscript_expressions_to_constant_subscript_expressions ( list  sl)

make a full copy of the subscript expression list, preserve constant subscripts, replace non-constant subscript by the star subscript expression.

Parameters
sll

Definition at line 3981 of file expression.c.

3982 {
3983  list nsl = NIL;
3984 
3985  FOREACH(EXPRESSION, s, sl){
3987  value v = EvalExpression(s);
3989  int i = constant_int(value_constant(v));
3990  ni = int_to_expression(i);
3991  }
3992  else {
3994  }
3995  nsl = CONS(EXPRESSION, ni, nsl);
3996  }
3997  nsl = gen_nreverse(nsl);
3998  return nsl;
3999 }

References CONS, constant_int, constant_int_p, EvalExpression(), EXPRESSION, expression_undefined, FOREACH, gen_nreverse(), int_to_expression(), make_unbounded_expression(), NIL, value_constant, and value_constant_p.

Referenced by reference_dereferencing_to_points_to(), and subscript_to_points_to_sinks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ subscript_value_stride()

expression subscript_value_stride ( entity  arr,
list  l_inds 
)

ifdebug(4)

{

pips_debug(4,"\nStride of subscript value:");

print_expression(retour);

}

Parameters
arrrr
l_inds_inds

Definition at line 4127 of file expression.c.

4128 {
4129  expression retour = int_to_expression(0);
4130  if (!ENDP(l_inds))
4131  {
4132  variable var = type_variable(entity_type(arr));
4134  list l_dims = variable_dimensions(var);
4135  int num_dim = gen_length(l_inds),i;
4138  for (i=1; i<= num_dim; i++)
4139  {
4140  dimension dim_i = find_ith_dimension(l_dims,i);
4141  expression lower_i = dimension_lower(dim_i);
4142  expression sub_i = find_ith_argument(l_inds,i);
4143  expression upper_i = dimension_upper(dim_i);
4144  expression size_i;
4145  if ( expression_constant_p(lower_i) && (expression_to_int(lower_i)==1))
4146  size_i = copy_expression(upper_i);
4147  else
4148  {
4149  size_i = binary_intrinsic_expression(
4150  MINUS_OPERATOR_NAME, upper_i, lower_i);
4151  size_i = binary_intrinsic_expression(
4153  }
4154  if (!same_expression_p(sub_i,lower_i))
4155  {
4156  expression sub_low_i =
4158  expression elem_i;
4159  if (expression_undefined_p(prod))
4160  elem_i = copy_expression(sub_low_i);
4161  else
4163  sub_low_i,prod);
4164  if (expression_equal_integer_p(retour,0))
4165  retour = copy_expression(elem_i);
4166  else
4168  retour, elem_i);
4169  }
4170  if (expression_undefined_p(prod))
4171  prod = copy_expression(size_i);
4172  else
4174  prod,size_i);
4175  }
4176  if (!expression_equal_integer_p(retour,0))
4177  retour = binary_intrinsic_expression(
4178  MULTIPLY_OPERATOR_NAME, copy_expression(retour), e_size);
4179  }
4180  // FI: to avoid cycles between librairies ri-util and prettyprint
4181  /* ifdebug(4) */
4182  /* { */
4183  /* pips_debug(4,"\nStride of subscript value:"); */
4184  /* print_expression(retour); */
4185  /* } */
4186  return retour;
4187 }

References binary_intrinsic_expression, copy_expression(), dimension_lower, dimension_upper, ENDP, entity_type, expression_constant_p(), expression_equal_integer_p(), expression_to_int(), expression_undefined, expression_undefined_p, find_ith_argument(), find_ith_dimension(), gen_length(), int_to_expression(), MINUS_OPERATOR_NAME, MULTIPLY_OPERATOR_NAME, PLUS_OPERATOR_NAME, same_expression_p(), SizeOfElements(), type_variable, variable_basic, and variable_dimensions.

Referenced by add_aliases_for_current_call_site(), alias_check_array_and_scalar_variable_in_caller_flt(), alias_check_array_and_scalar_variable_in_module_flt(), alias_check_array_variable_in_caller_flt(), alias_check_array_variable_in_module_flt(), dynamic_alias_check_flt(), offset_in_caller(), and same_or_equivalence_argument_add_aliases().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ subscripted_type_to_type()

type subscripted_type_to_type ( type  t,
expression  se 
)

Returns the type of an object of type t subscripted by expression se.

For instance if t is a struct, the type returned is the type corresponding to the se field.

It is much more difficult for arrays...

Do we assume that t is a ultimate type?

A new type is allocated.

scalar case

enum cannot be subscripted

Other basics are incompatible with subscripts

array case

Parameters
see

Definition at line 5562 of file type.c.

5563 {
5564  type st = type_undefined;
5565 
5566  if(type_variable_p(t)) {
5567  variable v = type_variable(t);
5568  list dl = variable_dimensions(v);
5569 
5570  if(ENDP(dl)) {
5571  /* scalar case */
5572  basic b = variable_basic(v);
5573 
5574  if(basic_pointer_p(b)) {
5576  }
5577  else if(basic_derived_p(b)) {
5578  entity de = basic_derived(b);
5579  type det = entity_type(de);
5580  list fl = list_undefined;
5581 
5582  if(type_struct_p(det)) {
5583  fl = type_struct(det); // field list
5584  }
5585  else if(type_union_p(det)) {
5586  fl = type_union(det); // field list
5587  }
5588  else if(type_enum_p(det)) {
5589  /* enum cannot be subscripted */
5590  pips_internal_error("enum type cannot be subscripted.");
5591  }
5592  else {
5593  pips_internal_error("This type cannot be subscripted.");
5594  }
5596  }
5597  else {
5598  /* Other basics are incompatible with subscripts */
5599  pips_internal_error("This type cannot be subscripted");
5600  }
5601  }
5602  else {
5603  /* array case */
5604  type et = copy_type(t);
5605  variable etv = type_variable(et);
5606  // FI: skip the first dimension, which could be implemented more
5607  // efficiently by destroying only the first dimension
5608  list dl = variable_dimensions(etv);
5609  variable_dimensions(etv) =
5611  gen_full_free_list(dl);
5612  st = type_to_pointer_type(et);
5613  }
5614  }
5615  else {
5616  pips_internal_error("Type t is not a variable type.");
5617  }
5618  return st;
5619 }
static type subscripted_field_list_to_type(list fl, expression se)
returns the type associated to se.
Definition: type.c:5514

References basic_derived, basic_derived_p, basic_pointer_p, CDR, copy_type(), ENDP, entity_type, gen_full_copy_list(), gen_full_free_list(), list_undefined, pips_internal_error, subscripted_field_list_to_type(), type_enum_p, type_struct, type_struct_p, type_to_pointed_type(), type_to_pointer_type(), type_undefined, type_union, type_union_p, type_variable, type_variable_p, variable_basic, and variable_dimensions.

Referenced by memory_dereferencing_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ substitute_entity_in_expression()

expression substitute_entity_in_expression ( entity  old,
entity  new,
expression  e 
)

This function replaces all the occurences of an old entity in the expression exp by the new entity.

It returns the expression modified. I think we can write this function by using gen_context_multi_recurse ... * To do .... NN gen_context_multi_recurse done in r22231 Modify the entry expression e by side effect

Parameters
oldentity to replace
newentity that will replace old
eexpression in will the entity old will be replaced
Returns
e expression modified by side effect
Parameters
oldld
newew

Definition at line 2792 of file expression.c.

2793 {
2794  ctx_substitute_t ctx;
2795  ctx.old = old;
2796  ctx.new = new;
2797 
2799  e, &ctx,
2802  NULL);
2803  return e;
2804 }
static void substitute_variable_in_reference(reference r, ctx_substitute_t *ctx)
Definition: expression.c:2741
static void substitute_entity_in_call(call c, ctx_substitute_t *ctx)
Definition: expression.c:2750

References call_domain, gen_context_multi_recurse(), gen_true(), ctx_substitute::new, ctx_substitute::old, reference_domain, substitute_entity_in_call(), and substitute_variable_in_reference().

+ Here is the call graph for this function:

◆ substitute_entity_variable_in_expression()

expression substitute_entity_variable_in_expression ( entity  old,
entity  new,
expression  e 
)

(This function isn't use for the moment) This function replaces all the occurrences of an old entity in the expression exp by the new entity.

It returns the expression modified. It replaces only entity when it's an variable. So a recurse can be made on reference to replace the entity. (to not consider only variable entity have to make a special case for call, call_function) Modify the entry expression e by side effect

Parameters
oldentity to replace
newentity that will replace old
eexpression in will the entity old will be replaced
Returns
e expression modified by side effect
Parameters
oldld
newew

Definition at line 2772 of file expression.c.

2773 {
2774  ctx_substitute_t ctx;
2775  ctx.old = old;
2776  ctx.new = new;
2777 
2779  return e;
2780 }

References gen_context_recurse, gen_true2(), ctx_substitute::new, ctx_substitute::old, reference_domain, and substitute_variable_in_reference().

+ Here is the call graph for this function:

◆ substraction_expression_p()

bool substraction_expression_p ( expression  e)

Test if an expression is an substraction.

Definition at line 1000 of file expression.c.

1000  {
1003 }

References MINUS_C_OPERATOR_NAME, MINUS_OPERATOR_NAME, and operator_expression_p().

+ Here is the call graph for this function:

◆ suggest_basic_for_expression()

tag suggest_basic_for_expression ( expression  e)

a BASIC tag is returned for the expression this is a preliminary version.

should be improved. was in HPFC.

must be a call

else some clever analysis could be done

Definition at line 130 of file expression.c.

131 {
132  tag result = basic_tag(expression_basic(e));
133 
134  if (result==is_basic_overloaded)
135  {
136  syntax s = expression_syntax(e);
137 
138  /* must be a call
139  */
140  assert(syntax_call_p(s));
141 
143  result = is_basic_logical;
144  else
145  {
146  /* else some clever analysis could be done
147  */
148  pips_user_warning("an overloaded is turned into an int...\n");
149  result = is_basic_int;
150  }
151  }
152 
153  return result;
154 }
basic expression_basic(expression)
Definition: type.c:1115

References assert, basic_tag, call_function, ENTITY_RELATIONAL_OPERATOR_P, expression_basic(), expression_syntax, is_basic_int, is_basic_logical, is_basic_overloaded, pips_user_warning, syntax_call, and syntax_call_p.

+ Here is the call graph for this function:

◆ symbolic_constant_declaration_verify()

void symbolic_constant_declaration_verify ( call  c)

Definition at line 128 of file module.c.

129 {
130 
133  { module_coherent_p = false;
134  ifdebug(4) fprintf(stderr,
135  "variable non declaree %s\n",
137  }
138  }
139 }
static bool module_coherent_p
To have asprintf():
Definition: module.c:40

References call_function, checked_module, entity_initial, entity_name, fprintf(), ifdebug, module_coherent_p, value_symbolic_p, and variable_in_module_p2().

+ Here is the call graph for this function:

◆ symbolic_constant_entity_p()

bool symbolic_constant_entity_p ( entity  e)

BEGIN_EOLE.

  • please do not remove this line Lines between BEGIN_EOLE and END_EOLE tags are automatically included in the EOLE project (JZ - 11/98)

Definition at line 83 of file variable.c.

References entity_initial, entity_storage, storage_rom_p, storage_undefined, symbolic_constant, value_symbolic_p, and value_undefined.

Referenced by constant_expression_supporting_references(), and generic_constant_expression_supporting_entities().

+ Here is the caller graph for this function:

◆ symbolic_entity_p()

bool symbolic_entity_p ( entity  e)

Definition at line 1277 of file entity.c.

1278 {
1280 }

References entity_initial, value_symbolic_p, and value_undefined_p.

◆ symbolic_supporting_entities()

list symbolic_supporting_entities ( list  sel,
set  vt,
symbolic  s 
)

C version.

Parameters
selel
vtt

Definition at line 4206 of file type.c.

4207 {
4208  return generic_symbolic_supporting_entities(sel, vt, s, true);
4209 }

References generic_symbolic_supporting_entities().

Referenced by basic_supporting_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ symbolic_supporting_references()

list symbolic_supporting_references ( list  srl,
symbolic  s 
)
Parameters
srlrl

Definition at line 4512 of file type.c.

4513 {
4516  return srl;
4517 }

References constant_expression_supporting_references(), and symbolic_expression.

Referenced by basic_supporting_references().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ syntax_equal_p()

bool syntax_equal_p ( syntax  s1,
syntax  s2 
)
Parameters
s11
s22

Definition at line 1462 of file expression.c.

1463 {
1464  tag t1 = syntax_tag(s1);
1465  tag t2 = syntax_tag(s2);
1466 
1467  if(t1!=t2)
1468  return false;
1469 
1470  switch(t1) {
1471  case is_syntax_reference:
1473  case is_syntax_range:
1474  return range_equal_p(syntax_range(s1), syntax_range(s2));
1475  case is_syntax_call:
1476  return call_equal_p(syntax_call(s1), syntax_call(s2));
1477  case is_syntax_cast:
1478  return cast_equal_p(syntax_cast(s1), syntax_cast(s2));
1481  case is_syntax_subscript:
1483  case is_syntax_application:
1484  case is_syntax_va_arg:
1485  pips_internal_error("Not implemented for syntax tag %d\n", t1);
1486  default:
1487  return false;
1488  break;
1489  }
1490 
1491  pips_internal_error("illegal. syntax tag %d", t1);
1492  return false;
1493 }
bool call_equal_p(call c1, call c2)
Definition: expression.c:1529
bool subscript_equal_p(subscript s1, subscript s2)
Definition: expression.c:1495
bool reference_equal_p(reference r1, reference r2)
Definition: expression.c:1500
bool sizeofexpression_equal_p(sizeofexpression s0, sizeofexpression s1)
Definition: expression.c:1446
bool cast_equal_p(cast c1, cast c2)
Definition: expression.c:1455
bool range_equal_p(range r1, range r2)
Definition: expression.c:1522

References call_equal_p(), cast_equal_p(), is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, pips_internal_error, range_equal_p(), reference_equal_p(), s1, sizeofexpression_equal_p(), subscript_equal_p(), syntax_call, syntax_cast, syntax_range, syntax_reference, syntax_sizeofexpression, syntax_subscript, and syntax_tag.

Referenced by expression_equal_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ syntax_to_expression()

expression syntax_to_expression ( syntax  s)

generates an expression from a syntax

Definition at line 3581 of file expression.c.

3581  {
3582  return make_expression(
3583  s,
3585  );
3586 }

References make_expression(), and normalized_undefined.

Referenced by initialization_list_to_statements(), isolate_patch_reference(), make_entity_expression(), and make_subscript_expression().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ syntax_to_reference_list()

list syntax_to_reference_list ( syntax  s,
list  lr 
)
Parameters
lrr

Definition at line 1270 of file expression.c.

1271 {
1272  switch(syntax_tag(s)) {
1273  case is_syntax_reference:
1274  lr = gen_nconc(lr, CONS(REFERENCE, syntax_reference(s), NIL));
1275  MAPL(ce, {
1276  expression e = EXPRESSION(CAR(ce));
1277  lr = expression_to_reference_list(e, lr);
1278  },
1280  break;
1281  case is_syntax_range:
1285  lr);
1286  break;
1287  case is_syntax_call:
1288  MAPL(ce, {
1289  expression e = EXPRESSION(CAR(ce));
1290  lr = expression_to_reference_list(e, lr);
1291  },
1293  break;
1294  case is_syntax_cast: {
1295  cast c = syntax_cast(s);
1296  expression e = cast_expression(c);
1297  lr = expression_to_reference_list(e, lr);
1298  break;
1299  }
1304  lr = expression_to_reference_list(e, lr);
1305  }
1306  break;
1307  }
1308  case is_syntax_subscript: {
1309  subscript sub = syntax_subscript(s);
1310  expression e = subscript_array(sub);
1311  list il = subscript_indices(sub);
1312  lr = expression_to_reference_list(e, lr);
1313  FOREACH(EXPRESSION, i,il) {
1314  lr = expression_to_reference_list(i, lr);
1315  }
1316  break;
1317  }
1318  case is_syntax_application: {
1321  list al = application_arguments(app);
1322  lr = expression_to_reference_list(f, lr);
1323  FOREACH(EXPRESSION, a,al) {
1324  lr = expression_to_reference_list(a, lr);
1325  }
1326  break;
1327  }
1328  case is_syntax_va_arg: {
1329  list two = syntax_va_arg(s);
1330  FOREACH(SIZEOFEXPRESSION, soe, two) {
1333  lr = expression_to_reference_list(e, lr);
1334  }
1335  }
1336  break;
1337  }
1338  default:
1339  pips_internal_error("illegal tag %d",
1340  syntax_tag(s));
1341 
1342  }
1343  return lr;
1344 }

References application_arguments, application_function, call_arguments, CAR, cast_expression, CONS, EXPRESSION, expression_to_reference_list(), f(), FOREACH, gen_nconc(), is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, MAPL, NIL, pips_internal_error, range_increment, range_lower, range_upper, REFERENCE, reference_indices, SIZEOFEXPRESSION, sizeofexpression_expression, sizeofexpression_expression_p, subscript_array, subscript_indices, syntax_application, syntax_call, syntax_cast, syntax_range, syntax_reference, syntax_sizeofexpression, syntax_subscript, syntax_tag, and syntax_va_arg.

Referenced by expression_to_reference_list().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ thread_safe_variable_p()

bool thread_safe_variable_p ( entity  v)

Definition at line 2539 of file entity.c.

2540 {
2541  bool thread_safe_p = gen_in_list_p(v, thread_safe_entities);
2542 
2543  return thread_safe_p;
2544 }

References gen_in_list_p(), and thread_safe_entities.

Referenced by AK_ignore_this_successor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ time_effect_entity_p()

bool time_effect_entity_p ( entity  e)

Definition at line 1170 of file entity.c.

1170  {
1172  return (same_entity_p(e, time_effect_ent));
1173 }

References same_entity_p(), set_internal_static_entities(), and time_effect_ent.

Referenced by effects_package_entity_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TK_CHARCON_to__int()

_int TK_CHARCON_to__int ( const char *  name)

Should be able to decode any C character constant...

octal constant

Parameters
nameame

Definition at line 88 of file constant.c.

89 {
90  _int r;
91 
92  /* Should be able to decode any C character constant... */
93  if(strlen(name)==3 && name[0]=='\'' && name[2]=='\'')
94  r=name[1];
95  else if(strlen(name)==4 && name[0]=='\'' && name[1]=='\\' && name[3]=='\'')
96  switch(name[2]) {
97  case '\t' :
98  r = 9; // not sure
99  break;
100  case '\n' :
101  r = 10;
102  break;
103  case '\r' :
104  r = 13;
105  break;
106  default:
107  r=name[2];
108  }
109  else if(strlen(name)==6 && name[0]=='\'' && name[1]=='\\' && name[5]=='\'') {
110  /* octal constant */
111  string error_string = string_undefined;
112  errno = 0;
113  r = strtol(&name[2], &error_string, 8);
114  if(errno!=0) {
115  pips_user_warning("character constant %s not recognized\n",name);
116  pips_internal_error("Illegal octal constant");
117  }
118  }
119  else { // Unrecognized format
120  pips_user_warning("character constant %s not recognized\n",name);
121  // pips_internal_error("not implemented yet");
122  r=0;//just temporary
123  }
124 
125  return r;
126 }

References pips_internal_error, pips_user_warning, and string_undefined.

Referenced by make_C_or_Fortran_constant_entity().

+ Here is the caller graph for this function:

◆ top_level_entity_p()

bool top_level_entity_p ( entity  e)

Check if the scope of entity e is global.

People are likely to look for global_entity_p(), entity_global_p() or, slightly different, global_variable_p(), variable_global_p(), or still slightly different, global_function_p(),...

Definition at line 1130 of file entity.c.

1131 {
1132  bool top = (strcmp(TOP_LEVEL_MODULE_NAME, entity_module_name(e)) == 0);
1133 
1134  return top;
1135 }

References entity_module_name(), and TOP_LEVEL_MODULE_NAME.

Referenced by add_any_variable_to_area(), CCompilationUnitMemoryAllocations(), cell_out_of_scope_p(), cell_reference_compare(), common_region_translation(), ComputeAddresses(), create_stub_entity(), cumul_and_update_effects_of_statement(), CurrentOffsetOfArea(), dead_fcd_directive_p(), entity_to_module_entity(), fcd_directive_p(), fortran_library_entity_p(), generate_starpu_pragma(), hpf_directive_entity_p(), interprocedural_mapping(), match_call(), new_add_any_variable_to_area(), normalize_intrinsic(), NormalizeIntrinsic(), outliner_independent_recursively(), outliner_scan(), points_to_set_block_projection(), potential_out_effects_p(), realign_directive_p(), redistribute_directive_p(), SafeLocalToGlobal(), set_current_function(), source_to_sinks(), statements_localize_declarations(), translate_global_value(), update_common_layout(), update_referenced_entities(), UseFormalArguments(), xml_Chain_Graph(), xml_Compute_and_Need(), xml_GlobalVariables(), and xml_Region_Parameter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ trivial_expression_p()

int trivial_expression_p ( expression  e)

This function returns:

1, if e is a relational expression that is always true

-1, if e is a relational expression that is always false

0, otherwise.

It should be called trivial_condition_p().

If e is a relational expression

ifdebug(3) {

fprintf(stderr, "Normalizes of expression:");

print_expression(e);

print_normalized(n1);

print_normalized(n2);

}

The test if an expression is trivial (always true or false) or not depends on the operator of the expression : (op= {<=,<,>=,>,==,!=}) so we have to treat each different case

Expression : v != 0

Expression : v == 0

Expression : v >= 0

Expression : v <= 0

Expression : v < 0

Expression : v > 0

Definition at line 679 of file expression.c.

680 {
682  {
683  /* If e is a relational expression*/
685  expression e1 = EXPRESSION(CAR(args));
686  expression e2 = EXPRESSION(CAR(CDR(args)));
687  normalized n1,n2;
688  entity op;
689  if (expression_undefined_p(e1) ||expression_undefined_p(e2) ) return 0;
690  n1 = NORMALIZE_EXPRESSION(e1);
691  n2 = NORMALIZE_EXPRESSION(e2);
693 
694  // FI: no cycle between the ri-util and prettyprint libraries
695  /* ifdebug(3) { */
696  /* fprintf(stderr, "Normalizes of expression:"); */
697  /* print_expression(e); */
698  /* print_normalized(n1); */
699  /* print_normalized(n2); */
700  /* } */
701 
703  {
704  Pvecteur v1 = normalized_linear(n1);
705  Pvecteur v2 = normalized_linear(n2);
706  Pvecteur v = vect_substract(v1,v2);
707 
708  /* The test if an expression is trivial (always true or false) or not
709  * depends on the operator of the expression :
710  * (op= {<=,<,>=,>,==,!=}) so we have to treat each different case */
711 
712  if (vect_constant_p(v))
713  {
714  if (ENTITY_NON_EQUAL_P(op))
715  {
716  /* Expression : v != 0 */
717  if (VECTEUR_NUL_P(v)) return -1;
718  if (value_zero_p(val_of(v))) return -1;
719  if (value_notzero_p(val_of(v))) return 1;
720  }
721  if (ENTITY_EQUAL_P(op))
722  {
723  /* Expression : v == 0 */
724  if (VECTEUR_NUL_P(v)) return 1;
725  if (value_zero_p(val_of(v))) return 1;
726  if (value_notzero_p(val_of(v))) return -1;
727  }
729  {
730  /* Expression : v >= 0 */
731  if (VECTEUR_NUL_P(v)) return 1;
732  if (value_posz_p(val_of(v))) return 1;
733  if (value_neg_p(val_of(v))) return -1;
734  }
735  if (ENTITY_LESS_OR_EQUAL_P(op))
736  {
737  /* Expression : v <= 0 */
738  if (VECTEUR_NUL_P(v)) return 1;
739  if (value_negz_p(val_of(v))) return 1;
740  if (value_pos_p(val_of(v))) return -1;
741  }
742  if (ENTITY_LESS_THAN_P(op))
743  {
744  /* Expression : v < 0 */
745  if (VECTEUR_NUL_P(v)) return -1;
746  if (value_neg_p(val_of(v))) return 1;
747  if (value_posz_p(val_of(v))) return -1;
748  }
749  if (ENTITY_GREATER_THAN_P(op))
750  {
751  /* Expression : v > 0 */
752  if (VECTEUR_NUL_P(v)) return -1;
753  if (value_pos_p(val_of(v))) return 1;
754  if (value_negz_p(val_of(v))) return -1;
755  }
756  }
757  return 0;
758  }
759  return 0;
760  }
761  return 0;
762 }
#define value_negz_p(val)
#define value_zero_p(val)
#define value_neg_p(val)
#define value_posz_p(val)
#define ENTITY_NON_EQUAL_P(e)
#define ENTITY_EQUAL_P(e)
#define ENTITY_LESS_THAN_P(e)
#define ENTITY_GREATER_THAN_P(e)
#define ENTITY_LESS_OR_EQUAL_P(e)
#define ENTITY_GREATER_OR_EQUAL_P(e)

References call_arguments, call_function, CAR, CDR, ENTITY_EQUAL_P, ENTITY_GREATER_OR_EQUAL_P, ENTITY_GREATER_THAN_P, ENTITY_LESS_OR_EQUAL_P, ENTITY_LESS_THAN_P, ENTITY_NON_EQUAL_P, EXPRESSION, expression_syntax, expression_undefined_p, NORMALIZE_EXPRESSION, normalized_linear, normalized_linear_p, relational_expression_p(), syntax_call, val_of, value_neg_p, value_negz_p, value_notzero_p, value_pos_p, value_posz_p, value_zero_p, vect_constant_p(), vect_substract(), and VECTEUR_NUL_P.

Referenced by abc_with_allocation_size(), alias_check_array_and_scalar_variable_in_caller_flt(), alias_check_array_and_scalar_variable_in_module_flt(), alias_check_array_variable_in_caller_flt(), alias_check_array_variable_in_module_flt(), alias_check_scalar_and_array_variables_in_caller(), alias_check_scalar_and_array_variables_in_module(), alias_check_two_array_variables_in_caller(), alias_check_two_array_variables_in_module(), alias_check_two_scalar_variables_in_caller(), alias_check_two_scalar_variables_in_module(), bottom_up_abc_base_reference_implied_do(), bottom_up_abc_reference(), impact_check_two_scalar_variables_in_path(), and top_down_abc_call().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ true_expression_p()

◆ type_depth()

size_t type_depth ( type  t)

Number of steps to access the lowest leave of type t without dereferencing.

Number of dimensions for an array. One for a struct or an union field, plus its own dimension(s). This does not take into account longer memory access paths due to pointers. Hence, recursive data structures do not end up with MAX_INT as type depth.

A pointer to a scalar may be a pointer to an array, unless property POINTS_TO_STRICT_POINTER_TYPES is set to true.

Concrete types are not used. The depth of named types is supposedly calculated.

This is the maximum number of subscripts used in a store independent reference, a.k.a. a constant memory access path, with a variable of type t.

Definition at line 4880 of file type.c.

4881 {
4883  return depth;
4884 }
#define set_undefined
Definition: newgen_set.h:48

References depth, generic_type_depth(), and set_undefined.

Referenced by c_convex_effects_on_formal_parameter_backward_translation(), cells_to_read_or_write_effects(), consistent_points_to_arc_p(), count_element_references_to_v_p(), effect_basic_depth(), effect_scalar_p(), effect_type_depth(), entity_atomic_reference_p(), and expression_to_points_to().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_equal_p()

bool type_equal_p ( type  t1,
type  t2 
)
Parameters
t11
t22

Definition at line 547 of file type.c.

548 {
549  return generic_type_equal_p(t1, t2, true, true, hash_table_undefined);
550 }

References generic_type_equal_p(), and hash_table_undefined.

Referenced by _expression_similar_p(), abstract_locations_max(), add_implicit_interprocedural_write_effects(), add_or_kill_equivalenced_variables(), any_user_call_site_to_transformer(), array_pointer_string_type_equal_p(), basic_maximum(), cast_equal_p(), DeclareVariable(), do_linearize_array_manage_callers(), entities_maymust_conflict_p(), entity_all_module_xxx_locations_typed(), entity_all_xxx_locations_typed(), entity_flow_or_context_sentitive_heap_location(), integer_expression_to_transformer(), intrinsic_call_to_type(), make_local_value_entity(), max_type(), multiple_pointer_assignment_to_post_pv(), new_recursive_filter_formal_context_according_to_actual_context(), NormalizeCast(), opkill_may_constant_path(), opkill_may_type(), opkill_must_constant_path(), outliner_file(), pointer_expression_to_transformer(), points_to_source_to_translations(), points_to_translation_of_formal_parameters(), precondition_intra_to_inter(), recursive_filter_formal_context_according_to_actual_context(), references_may_conflict_p(), retype_formal_parameters(), same_analyzable_type_scalar_entity_list_p(), same_type_p(), sizeofexpression_equal_p(), struct_reference_assignment_or_equality_to_transformer(), substitute_stubs_in_transformer_with_translation_binding(), translate_global_value(), type_compatible_super_cell(), TypeFunctionalEntity(), update_functional_type_with_actual_arguments(), UpdateType(), and variable_references_may_conflict_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_equal_up_to_qualifiers_p()

bool type_equal_up_to_qualifiers_p ( type  t1,
type  t2 
)
Parameters
t11
t22

Definition at line 552 of file type.c.

553 {
554  return generic_type_equal_p(t1, t2, true, false, hash_table_undefined);
555 }

References generic_type_equal_p(), and hash_table_undefined.

Referenced by array_pointer_type_equal_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_equal_up_to_typedefs_and_qualifiers_p()

bool type_equal_up_to_typedefs_and_qualifiers_p ( type  t1,
type  t2 
)
Parameters
t11
t22

Definition at line 557 of file type.c.

558 {
559  // FI: the last false is weird...
560  return generic_type_equal_p(t1, t2, false, false, hash_table_undefined);
561 }

References generic_type_equal_p(), and hash_table_undefined.

Referenced by points_to_cell_types_compatibility().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_fields()

list type_fields ( type  t)

Definition at line 3073 of file type.c.

3074 {
3075  list l_res = NIL;
3076 
3077  switch (type_tag(t))
3078  {
3079  case is_type_struct:
3080  l_res = type_struct(t);
3081  break;
3082  case is_type_union:
3083  l_res = type_union(t);
3084  break;
3085  case is_type_enum:
3086  l_res = type_enum(t);
3087  break;
3088  default:
3089  pips_internal_error("type_fields improperly called");
3090  }
3091  return l_res;
3092 
3093 }

References is_type_enum, is_type_struct, is_type_union, NIL, pips_internal_error, type_enum, type_struct, type_tag, and type_union.

Referenced by basic_concrete_type_leads_to_pointer_p(), and basic_concrete_types_compatible_for_effects_interprocedural_translation_p().

+ Here is the caller graph for this function:

◆ type_fundamental_basic_p()

bool type_fundamental_basic_p ( type  t)

Definition at line 2930 of file type.c.

2931 {
2932  if (type_variable_p(t))
2933  {
2935  return (basic_int_p(b) || basic_float_p(b) || basic_logical_p(b)
2937  || basic_bit_p(b));
2938  }
2939  return (type_void_p(t) || type_unknown_p(t)) ;
2940 }

References basic_bit_p, basic_complex_p, basic_float_p, basic_int_p, basic_logical_p, basic_overloaded_p, basic_string_p, type_unknown_p, type_variable, type_variable_p, type_void_p, and variable_basic.

Referenced by assignment_to_post_pv(), declaration_to_post_pv(), and sequence_to_post_pv().

+ Here is the caller graph for this function:

◆ type_memory_size()

int type_memory_size ( type  t)

Seems to be the case for defined types; FI: why are they allocated in RAM while they only exist at compile time ?

How is it implemented? 32 bit integer?

A struct (or a union) may be hidden, with its declaration located in the source code of a library. For instance, "_IO_FILE_plus" in stdio.h. Since it contains at least one byte, let set s to 1? Or let the caller deal with the problem?

Definition at line 248 of file size.c.

249 {
250  int s = 0;
251 
252  switch(type_tag(t)) {
253  case is_type_statement:
254  case is_type_area:
255  case is_type_functional:
256  case is_type_varargs:
257  case is_type_unknown:
258  case is_type_void:
259  pips_internal_error("arg. with ill. tag %d", type_tag(t));
260  break;
261  case is_type_variable:
262  {
263  /* Seems to be the case for defined types; FI: why are they
264  allocated in RAM while they only exist at compile time ? */
267  s*=dimension_size(dim);
268 
269  } break;
270  case is_type_struct:
271  MAP(ENTITY, v, {s+=CSafeSizeOfArray(v);}, type_struct(t));
272  break;
273  case is_type_union:
274  MAP(ENTITY, v, {s = s>CSafeSizeOfArray(v)? s : CSafeSizeOfArray(v);}, type_union(t));
275  break;
276  case is_type_enum:
277  s = 4; /* How is it implemented? 32 bit integer? */
278  break;
279  default:
280  pips_internal_error("arg. with unknown tag %d", type_tag(t));
281  break;
282  }
283  /* A struct (or a union) may be hidden, with its declaration
284  located in the source code of a library. For instance,
285  "_IO_FILE_plus" in stdio.h. Since it contains at least one byte,
286  let set s to 1? Or let the caller deal with the problem? */
287  // s = s>0? s : 1;
288  return s;
289 }
@ is_type_varargs
Definition: ri.h:2902
int dimension_size(dimension d)
this function computes the size of a dimension.
Definition: size.c:491

References CSafeSizeOfArray(), DIMENSION, dimension_size(), ENTITY, FOREACH, is_type_area, is_type_enum, is_type_functional, is_type_statement, is_type_struct, is_type_union, is_type_unknown, is_type_varargs, is_type_variable, is_type_void, MAP, pips_internal_error, SizeOfElements(), type_struct, type_tag, type_union, type_variable, variable_basic, and variable_dimensions.

Referenced by entity_memory_size(), EvalSizeofexpression(), get_type_max_width(), and partial_eval_syntax().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_pointer_on_struct_variable_p()

bool type_pointer_on_struct_variable_p ( type  t)

Definition at line 2960 of file type.c.

2961 {
2962  t = ultimate_type(t);
2964  {
2966  return type_struct_variable_p(pt);
2967  }
2968  return false;
2969 }
bool type_struct_variable_p(type t)
Definition: type.c:3867

References basic_pointer, basic_pointer_p, type_struct_variable_p(), type_variable, ultimate_type(), and variable_basic.

Referenced by do_check_isolate_statement_preconditions_on_call(), and do_split_structure().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_struct_variable_p()

◆ type_structurally_equal_p()

bool type_structurally_equal_p ( type  t1,
type  t2 
)

Type t1 and t2 are equal if their basic concrete components are equal.

1-D arrays and pointers are compatible if build on the same type.

Qualifiers are ignored.

Parameters
t11
t22

Definition at line 586 of file type.c.

587 {
588  hash_table structural_table = hash_table_make(hash_pointer, 0);
589  bool equal_p = generic_type_equal_p(t1, t2, false, false, structural_table);
590  hash_table_free(structural_table);
591  return equal_p;
592 }

References generic_type_equal_p(), hash_pointer, hash_table_free(), and hash_table_make().

Referenced by check_type_of_points_to_cells(), declaration_statement_to_points_to(), filter_formal_context_according_to_actual_context(), new_filter_formal_context_according_to_actual_context(), reference_to_points_to_sinks(), and same_field_entity_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_supporting_entities()

list type_supporting_entities ( list  sel,
type  t 
)

keep track of already visited types

Parameters
selel

Definition at line 4347 of file type.c.

4348 {
4349  /* keep track of already visited types */
4350  set vt = set_make(set_pointer);
4351  sel = recursive_type_supporting_entities(sel, vt, t);
4352  set_free(vt);
4353  return sel;
4354 }

References recursive_type_supporting_entities(), set_free(), set_make(), and set_pointer.

Referenced by AddEntityToModuleCompilationUnit(), declarable_type_p(), ensure_comment_consistency(), entity_used_in_declarations_p(), and stub_text().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_supporting_references()

list type_supporting_references ( list  srl,
type  t 
)

To avoid multiple recursion through the same type

Parameters
srlrl

Definition at line 4700 of file type.c.

4701 {
4702  /* To avoid multiple recursion through the same type */
4706  return srl;
4707 }
static set supporting_types
Compute the list of entities implied in the definition of a type.
Definition: type.c:3975

References recursive_type_supporting_references(), set_free(), set_make(), set_pointer, and supporting_types.

Referenced by declaration_supporting_references().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_supporting_types()

list type_supporting_types ( type  t)

Return the list of types used to define type t.

The goal is to find out if a dummy data structure (struct, union or enum) is used within another one and hence does not need to be printed out by the prettyprinter.

keep track of already visited types

Definition at line 5203 of file type.c.

5204 {
5205  /* keep track of already visited types */
5206  set vt = set_make(set_pointer);
5207  list stl = NIL;
5208  stl = recursive_type_supporting_types(stl, vt, t);
5209  set_free(vt);
5210  return stl;
5211 }
static list recursive_type_supporting_types(list stl, set vt, type t)
Compute the list of types implied in the definition of a type.
Definition: type.c:5137

References NIL, recursive_type_supporting_types(), set_free(), set_make(), and set_pointer.

Referenced by outliner_independent_recursively(), and type_used_in_type_declarations_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_to_array_type()

type type_to_array_type ( type  t)

convert a type "t" into a newly allocated array type "at" whose elements are of type "t", unless "t" is void.

Then an array of overloaded elements is generated. The new dimension is unbounded.

This useful when dealing with pointers that are not precisely typed. In C you have often to assume they point towards an array since pointer arithmetic is OK by default.

The behavior of this function is not well defined when typedef are used... t should be a concrete type.

You cannot added a second unbounded dimension in C...

So you should change the element type...

But this is not compatible with points-to references. We can add 0 subscripts as much as we want for unbounded dimensions, but we cannot change *p into p[0]... This is linked to effects-util and points-to analysis, and should probably not be here in library ri-util

Definition at line 5653 of file type.c.

5654 {
5655  type at = type_undefined;
5656 
5657  if(type_void_p(t)) {
5658  at = MakeTypeOverloaded();
5659  }
5660  else
5661  at = copy_type(t);
5662 
5663  variable vt = type_variable(at);
5664 
5665  /* You cannot added a second unbounded dimension in C... */
5666  /* So you should change the element type... */
5667  /* But this is not compatible with points-to references. We can
5668  add 0 subscripts as much as we want for unbounded dimensions,
5669  but we cannot change *p into p[0]... This is linked to
5670  effects-util and points-to analysis, and should probably not be
5671  here in library ri-util */
5672 
5673  //list ld = variable_dimensions(vt);
5674  //dimension fd = DIMENSION(CAR(ld));
5675  //if(false && unbounded_dimension_p(fd)) {
5676  //type et = array_type_to_element_type(at);
5677  // type net = type_to_pointer_type(et);
5678  //free_basic(variable_basic(vt));
5679  //variable_basic(vt) = make_basic_pointer(et);
5680  //}
5681  //else {
5684  NIL);
5685  // Add the new dimension as first dimension... be cause an
5686  // unbounded dimension must be the first dimension.
5688  // }
5689 
5690  return at;
5691 }
type MakeTypeOverloaded()
Definition: type.c:107

References CONS, copy_type(), DIMENSION, int_to_expression(), make_dimension(), make_unbounded_expression(), MakeTypeOverloaded(), NIL, type_undefined, type_variable, type_void_p, and variable_dimensions.

Referenced by create_advanced_stub_points_to(), create_stub_points_to(), and global_source_to_sinks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_to_final_pointed_type()

type type_to_final_pointed_type ( type  t)

returns t if t is not a pointer type, and the first indirectly pointed type that is not a pointer if t is a pointer type.

Type definitions are replaced.

Definition at line 5336 of file type.c.

5337 {
5338  type ut = type_undefined;
5339 
5340  if(!type_undefined_p(t)) {
5341  ut = ultimate_type(t);
5342 
5343  while(!type_undefined_p(ut) && pointer_type_p(ut)) {
5344  ut = type_to_pointed_type(ut);
5345  }
5346  }
5347  return ut;
5348 }

References pointer_type_p(), type_to_pointed_type(), type_undefined, type_undefined_p, and ultimate_type().

Referenced by filtered_declaration_list().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_to_pointed_type()

type type_to_pointed_type ( type  t)

returns t if t is not a pointer type, and the pointed type if t is a pointer type.

Type definitions are replaced. If t is undefined, returns a type_undefined.

Definition at line 5265 of file type.c.

5266 {
5267  type upt = type_undefined;
5268 
5269  if(!type_undefined_p(t)) {
5270  type ut = ultimate_type(t);
5271  type pt = ut;
5272 
5273  if(pointer_type_p(ut))
5275 
5276  if(!type_undefined_p(pt))
5277  upt = ultimate_type(pt);
5278  }
5279  return upt;
5280 }

References basic_pointer, pointer_type_p(), type_undefined, type_undefined_p, type_variable, ultimate_type(), and variable_basic.

Referenced by anywhere_source_to_sinks(), array_pointer_type_equal_p(), call_to_points_to(), cell_to_nowhere_sink(), char_star_type_p(), check_rhs_value_types(), check_type_of_points_to_cells(), create_stub_points_to(), dereferencing_subscript_to_points_to(), derived_formal_parameter_to_stub_points_to(), entity_flow_or_context_sentitive_heap_location(), expression_to_points_to_cells(), expression_to_points_to_sources(), formal_source_to_sinks(), freed_list_to_points_to(), generic_stub_source_to_sinks(), global_source_to_sinks(), MakeIoFileArray(), normalize_subscript_expression(), offset_cell(), perform_array_element_substitutions_in_transformer(), pointer_formal_parameter_to_stub_points_to(), points_to_cell_types_compatibility(), points_to_expression_to_pointed_type(), points_to_translation_mapping_is_typed_p(), points_to_with_stripped_sink(), process_casted_sinks(), sizeofexpression_to_points_to_sinks(), source_to_sinks(), struct_assignment_to_points_to(), struct_initialization_to_points_to(), subscripted_type_to_type(), type_to_final_pointed_type(), type_void_star_p(), typedef_formal_parameter_to_stub_points_to(), and user_call_to_points_to_sinks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_to_pointer_type()

type type_to_pointer_type ( type  t)

allocate a new type "pt" which includes directly "t".

Definition at line 5253 of file type.c.

5254 {
5256 
5257  pips_assert("pt is consistent", type_consistent_p(pt));
5258 
5259  return pt;
5260 }

References make_basic_pointer(), make_type_variable(), make_variable(), NIL, pips_assert, and type_consistent_p().

Referenced by array_type_to_pointer_type(), entity_null_locations(), intrinsic_call_to_type(), MakeVoidPointerParameter(), r_cell_reference_to_type(), subscripted_type_to_type(), and void_to_void_to_int_pointer_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_to_returned_type()

type type_to_returned_type ( type  t)

returns t if t is not a functoional type, and the returned type if t is a functional type.

Type definitions are replaced. If t is undefined, returns a type_undefined.

Definition at line 5316 of file type.c.

5317 {
5318  type urt = type_undefined;
5319 
5320  if(!type_undefined_p(t)) {
5321  type ut = ultimate_type(t);
5322  type rt = ut;
5323 
5324  if(type_functional_p(ut))
5326 
5327  if(!type_undefined_p(rt))
5328  urt = ultimate_type(rt);
5329  }
5330  return urt;
5331 }

References functional_result, type_functional, type_functional_p, type_undefined, type_undefined_p, and ultimate_type().

Referenced by call_to_points_to_sinks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_to_string()

◆ type_union_variable_p()

bool type_union_variable_p ( type  t)

Definition at line 3877 of file type.c.

3878 {
3879  t = ultimate_type(t);
3880  if(type_variable_p(t))
3883  else
3884  return false;
3885 }

References basic_derived, basic_derived_p, entity_union_p(), type_variable, type_variable_p, ultimate_type(), and variable_basic.

Referenced by variable_references_may_conflict_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_used_in_type_declarations_p()

bool type_used_in_type_declarations_p ( entity  e,
list  ldecl 
)

check if e is used to declare one of the entities in entity list ldecl

Parameters
eentity to check
ldecllist of entities whose declaration may use e
Returns
true if e appears in one of the declaration in ldecl

The dummy declaration may be hidden in a struct or a union declaration. Maybe it could also be hidden in a function declaration.

Parameters
ldecldecl

Definition at line 2289 of file entity.c.

2290 {
2291  bool found_p = false;
2292 
2293  FOREACH(ENTITY, d, ldecl) {
2294  /* The dummy declaration may be hidden in a struct or a union
2295  declaration. Maybe it could also be hidden in a function
2296  declaration. */
2297  type dt = entity_type(d);
2298  if(entity_struct_p(d) || entity_union_p(d) || type_functional_p(dt)) {
2299  list stl = type_supporting_types(dt);
2300 
2301  if(gen_in_list_p(e, stl)) {
2302  pips_debug(8, "entity \"%s\" is used to declare entity \"%s\"\n",
2303  entity_name(e), entity_name(d));
2304  found_p = true;
2305  gen_free_list(stl);
2306  break;
2307  }
2308  else {
2309  gen_free_list(stl);
2310  }
2311  }
2312  }
2313 
2314  return found_p;
2315 }
list type_supporting_types(type)
Return the list of types used to define type t.
Definition: type.c:5203

References ENTITY, entity_name, entity_struct_p(), entity_type, entity_union_p(), FOREACH, gen_free_list(), gen_in_list_p(), pips_debug, type_functional_p, and type_supporting_types().

Referenced by c_text_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_void_star_p()

bool type_void_star_p ( type  t)

Definition at line 5765 of file type.c.

5766 {
5767  bool void_star_p = false;
5768  if(pointer_type_p(t))
5769  void_star_p = type_void_p(type_to_pointed_type(t));
5770  return void_star_p;
5771 }

References pointer_type_p(), type_to_pointed_type(), and type_void_p.

Referenced by check_rhs_value_types(), and declaration_statement_to_points_to().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type_with_const_qualifier_p()

bool type_with_const_qualifier_p ( type  t)

Is there a const qualifier associated to type t.

FI: this should be extended in case const can be carried by a typedef, but this first version should be enough for Molka.

Definition at line 5483 of file type.c.

5484 {
5485  bool qualifier_p = false;
5486 
5487  if(type_variable_p(t)) {
5488  variable v = type_variable(t);
5489  list ql = variable_qualifiers(v);
5490  qualifier_p = qualifiers_const_p(ql);
5491  }
5492 
5493  return qualifier_p;
5494 }
bool qualifiers_const_p(list ql)
Check that a qualifier list contains the const qualifier.
Definition: type.c:5453

References qualifiers_const_p(), type_variable, type_variable_p, and variable_qualifiers.

Referenced by safe_assigned_expression_to_transformer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ typedef_entity_p()

bool typedef_entity_p ( entity  e)

Its name must contain the TYPEDEF_PREFIX just after the MODULE_SEP_STRING and the scope information

If there is no scope information, use the module separator

Definition at line 1902 of file entity.c.

1903 {
1904  /* Its name must contain the TYPEDEF_PREFIX just after the
1905  MODULE_SEP_STRING and the scope information */
1906  string en = entity_name(e);
1907  string ms = strrchr(en, BLOCK_SEP_CHAR);
1908  bool is_typedef = false;
1909 
1910  /* If there is no scope information, use the module separator */
1911  if(ms==NULL)
1912  ms = strchr(en, MODULE_SEP);
1913 
1914 
1915  if(ms!=NULL)
1916  is_typedef = (*(ms+1)==TYPEDEF_PREFIX_CHAR);
1917 
1918  return is_typedef;
1919 }
#define TYPEDEF_PREFIX_CHAR
Definition: naming-local.h:63

References BLOCK_SEP_CHAR, entity_name, MODULE_SEP, and TYPEDEF_PREFIX_CHAR.

Referenced by add_prettyprint_control_list_to_declaration_statement(), AddEntityToCompilationUnit(), analyzable_scalar_entity_p(), declarable_type_p(), declaration_to_post_pv(), do_clone_entity(), entity_for_value_mapping_p(), entity_module_p(), FindOrCreateCurrentEntity(), get_symbol_table(), outliner_independent_recursively(), RemoveDummyArguments(), RenameFunctionEntity(), this_entity_cdeclaration(), UpdateEntity(), UseDummyArguments(), UseFormalArguments(), and wipeout_entity().

+ Here is the caller graph for this function:

◆ typedef_type_p()

bool typedef_type_p ( type  t)

Returns true if t is a typedefED type.

Example : Myint i;

Definition at line 3189 of file type.c.

3190 {
3192  && (variable_dimensions(type_variable(t)) == NIL));
3193 }

References basic_typedef_p, NIL, type_variable, type_variable_p, variable_basic, and variable_dimensions.

Referenced by generic_c_words_simplified_entity(), and rename_variable_type().

+ Here is the caller graph for this function:

◆ ultimate_array_type()

type ultimate_array_type ( type  t)

Definition at line 3471 of file type.c.

3472 {
3473  return private_ultimate_type(t, true);
3474 }
static type private_ultimate_type(type t, bool arrays_only)
FI: there are different notions of "ultimate" types in C.
Definition: type.c:3370

References private_ultimate_type().

Referenced by effects_to_dma().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ultimate_type()

type ultimate_type ( type  t)

Definition at line 3466 of file type.c.

3467 {
3468  return private_ultimate_type(t, false);
3469 }

References private_ultimate_type().

Referenced by add_any_variable_to_area(), add_conflicts(), add_implicit_interprocedural_write_effects(), add_index_bound_conditions(), add_reference_information(), any_expression_to_transformer(), any_scalar_assign_to_transformer_list(), any_scalar_assign_to_transformer_without_effect(), any_user_call_site_to_transformer(), anywhere_source_to_sinks(), array_bounded_p(), basic_and_indices_to_basic(), basic_of_any_reference(), basic_of_external(), basic_of_intrinsic(), basic_ultimate(), c_convex_effects_on_actual_parameter_forward_translation(), C_loop_range(), c_reference(), c_text_entities(), C_type_to_pointed_type(), call_to_functional_type(), call_to_post_pv(), call_to_transformer(), can_terapixify_expression_p(), CCompilationUnitMemoryAllocations(), check_declaration_uniqueness_p(), compare_basic_p(), count_element_references_to_v_p(), CreateReturnEntity(), declarations_to_dimensions(), derived_formal_parameter_to_stub_points_to(), do_array_to_pointer_walk_call_and_patch(), do_check_isolate_statement_preconditions_on_call(), do_group_constants_terapix(), do_group_count_elements_reduce(), do_linearize_array_reference(), do_linearize_prepatch_subscript(), do_linearize_prepatch_type(), do_linearize_type(), do_loop_unroll_with_prologue(), do_split_structure(), effect_interference(), effect_to_store_independent(), entity_array_p(), entity_atomic_reference_p(), entity_enum_variable_p(), entity_integer_scalar_p(), entity_memory_size(), entity_pointer_p(), entity_scalar_p(), entity_variable_length_array_p(), expression_basic(), expression_pointer_p(), extended_expression_constant_p(), fix_loop_index_sign(), for_to_do_loop_conversion(), freia_data2d_field(), freia_image_variable_p(), generic_stub_source_to_sinks(), get_symbol_table(), initialization_list_to_statements(), integer_scalar_entity_p(), intrinsic_call_to_type(), loadstore_type_conversion_string(), make_new_scalar_variable_with_prefix(), MakeFunctionExpression(), MemberIdentifierToExpression(), memory_dereferencing_p(), normalize_microcode(), number_of_fields(), number_of_items(), number_of_usable_functional_parameters(), parameter_passing_mode_p(), partial_eval_reference(), positive_expression_p(), private_ultimate_type(), reference_add_field_dimension(), reference_offset(), reference_to_points_to_sinks(), same_type_p(), set_entity_initial(), simplify_C_expression(), SizeOfArray(), some_basic_of_any_expression(), statement_insertion_fix_access_in_callers(), store_independent_reference_p(), struct_variable_to_pointer_locations(), struct_variable_to_pointer_subscripts(), TestCoupleOfReferences(), transformer_add_condition_information_updown(), type_dereferencement_depth(), type_pointer_on_struct_variable_p(), type_struct_variable_p(), type_to_final_pointed_type(), type_to_pointed_type(), type_to_returned_type(), type_union_variable_p(), type_void_or_void_pointer_p(), ultimate_type_equal_p(), UpdateEntity(), UpdateEntity2(), user_call_to_points_to_sinks(), value_passing_summary_transformer(), variable_initial_expression(), variable_to_dimensions(), variables_width_filter(), void_function_p(), and xml_print_parameter().

+ Here is the call graph for this function:

◆ ultimate_type_equal_p()

bool ultimate_type_equal_p ( type  t1,
type  t2 
)
Parameters
t11
t22

Definition at line 563 of file type.c.

564 {
565  type ut1 = ultimate_type(t1);
566  type ut2 = ultimate_type(t2);
567  return generic_type_equal_p(ut1, ut2, false, true, hash_table_undefined);
568 }

References generic_type_equal_p(), hash_table_undefined, and ultimate_type().

+ Here is the call graph for this function:

◆ unary_minus_expression_p()

bool unary_minus_expression_p ( expression  e)

Definition at line 1030 of file expression.c.

1032 {
1034 }

References operator_expression_p(), and UNARY_MINUS_OPERATOR_NAME.

Referenced by expression_opposite_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unbounded_dimension_p()

bool unbounded_dimension_p ( dimension  dim)

bool unbounded_dimension_p(dim) input : a dimension of an array entity.

output : true if the last dimension is unbounded (*), false otherwise. modifies : nothing comment :

Parameters
dimim

Definition at line 1130 of file expression.c.

1132 {
1133  syntax dim_synt = expression_syntax(dimension_upper(dim));
1134  bool res = false;
1135 
1136  if (syntax_call_p(dim_synt)) {
1137  const char* dim_nom = entity_local_name(call_function(syntax_call(dim_synt)));
1138 
1140  res = true;
1141  }
1142 
1143  return(res);
1144 }

References call_function, dimension_upper, entity_local_name(), expression_syntax, same_string_p, syntax_call, syntax_call_p, and UNBOUNDED_DIMENSION_NAME.

Referenced by array_bounded_p(), assumed_size_array_p(), bottom_up_abc_base_reference_implied_do(), bottom_up_abc_reference(), build_call_STEP_init_regionArray(), C_pointer_type_p(), C_type_to_pointed_type(), entity_unbounded_p(), subscript_to_points_to_sinks(), top_down_abc_call(), top_down_abc_dimension(), and words_dimension().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unbounded_entity_p()

bool unbounded_entity_p ( entity  f)

Definition at line 4323 of file expression.c.

4324 {
4325  const char* n = entity_local_name(f);
4327 }

References entity_local_name(), f(), same_string_p, and UNBOUNDED_DIMENSION_NAME.

Referenced by store_independent_points_to_indices_p(), and unbounded_expression_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unbounded_expression_p()

bool unbounded_expression_p ( expression  e)

Definition at line 4329 of file expression.c.

4330 {
4331  syntax s = expression_syntax(e);
4332  if (syntax_call_p(s)) {
4334  return unbounded_entity_p(f);
4335  }
4336  return false;
4337 }
bool unbounded_entity_p(entity f)
Definition: expression.c:4323

References call_function, expression_syntax, f(), syntax_call, syntax_call_p, and unbounded_entity_p().

Referenced by any_expression_to_transformer(), array_references_may_conflict_p(), cell_is_xxx_p(), cell_reference_compare(), compatible_points_to_subscripts_p(), constant_reference_to_normalized_constant_reference(), do_brace_expression_to_updated_type(), effect_to_store_independent(), equal_must_vreference(), exact_points_to_subscript_list_p(), expression_to_points_to_sinks_with_offset(), flow_sensitive_malloc_to_points_to_sinks(), generic_atomic_points_to_reference_p(), malloc_arg_to_type(), module_initial_parameter_pv(), old_effects_conflict_p(), opkill_may_vreference(), opkill_must_vreference(), points_to_indices_to_subscript_indices(), points_to_indices_to_unbounded_indices(), points_to_reference_included_p(), points_to_subscripts_to_number_of_unbounded_dimensions(), proper_to_summary_simple_effect(), reference_to_points_to_translations(), reference_unbounded_indices_p(), reference_with_unbounded_indices_p(), reference_with_unbounded_subscript_p(), refine_points_to_cell_subscripts(), simple_cell_reference_preceding_p(), simple_cells_inclusion_p(), simple_cells_intersection_p(), unique_location_cell_p(), variable_references_may_conflict_p(), words_range(), and words_subscript_range().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ union_type_p()

bool union_type_p ( type  t)

Returns true if t is of type derived and if the derived type is a union.

Example : union foo var;

Note: different trom type_union_p

Definition at line 3151 of file type.c.

3152 {
3153  bool union_p = false;
3154  if(derived_type_p(t)) {
3156  entity dte = basic_derived(b);
3157  type dt = entity_type(dte);
3158  union_p = type_union_p(dt);
3159  }
3160  return union_p;
3161 }

References basic_derived, derived_type_p(), entity_type, type_union_p, type_variable, and variable_basic.

Referenced by rename_variable_type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unnormalize_expression()

void unnormalize_expression ( void *  st)

void unnormalize_expression(expression exp): puts all the normalized field of expressions in "st" to undefined and does the unnormalization recursively

This is very useful when you combine expressions. It prohibits unnormalized expressions with normalized sub-expressions.

FI: any chunk* can be passed; this function could be applied to an expression

Parameters
stt

Definition at line 452 of file normalize.c.

453 {
456  gen_true,
458  NULL);
459 }
void free_expression_normalized(expression e)
Definition: normalize.c:432

References expression_domain, free_expression_normalized(), gen_multi_recurse(), and gen_true().

Referenced by analyze_expression(), do_gather_all_expressions_perms(), do_outliner_smart_replacment(), do_scalar_renaming(), get_exp_schedule(), get_m_coef(), inline_expression_call(), my_adg_expressions_to_predicate(), nlc_linear_expression_p(), optimize_expressions(), partial_eval_expression(), perform_substitution(), rational_op_exp(), redundant_load_store_elimination(), rename_reference(), replace_entities_expression_walker(), sp_linear_expression_p(), splc_linear_expression_p(), try_reorder_expression_call(), and update_expression_syntax().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unnormalized_array_p()

bool unnormalized_array_p ( entity  e)

return true if e is an assumed-size array or a pointer-type array

Definition at line 846 of file entity.c.

847 {
848  /* return true if e is an assumed-size array or a pointer-type array*/
850  return true;
851  return false;
852 }
bool assumed_size_array_p(entity e)
Definition: entity.c:807
bool pointer_type_array_p(entity e)
Definition: entity.c:826

References assumed_size_array_p(), and pointer_type_array_p().

Referenced by formal_array_resizing_bottom_up().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unsigned_basic_p()

bool unsigned_basic_p ( basic  b)

Definition at line 2812 of file type.c.

2812  {
2813  if (basic_int_p(b))
2815  return true;
2816  return false;
2817 }

References basic_int, basic_int_p, and DEFAULT_UNSIGNED_TYPE_SIZE.

Referenced by unsigned_type_p().

+ Here is the caller graph for this function:

◆ unsigned_type_p()

bool unsigned_type_p ( type  t)

Predicates on types.

Definition at line 2821 of file type.c.

2822 {
2823  if (type_variable_p(t))
2824  {
2826  return unsigned_basic_p(b);
2827  }
2828  return false;
2829 }
bool unsigned_basic_p(basic b)
Definition: type.c:2812

References type_variable, type_variable_p, unsigned_basic_p(), and variable_basic.

Referenced by add_type_information(), C_loop_range(), fix_loop_index_sign(), make_standard_integer_type(), make_standard_long_integer_type(), and positive_expression_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unstructured_reorder()

bool unstructured_reorder ( unstructured  u)

Reorder an unstructured.

All the nodes of the unstructured are numbered, first the reachable one and the the unreachable ones if any.

Parameters
uthe unstructured to reorder.

this function is used by control/old_controlizer.c

To store the visited nodes by CONTROL_MAP and avoid visiting twice a control node:

To avoid renaming twice a control node statement, keep track of the visited statements:

First iterate on the reachable control nodes from the entry node of the unstructured and then from the exit node:

Since we enter a control node, increase the unstructured order:

ifdebug(3)

print_statement(st);

Since we enter a control node, number the statements inside this control node with a statement number starting from 1:

Free the list build up during the visit:

Definition at line 166 of file reorder.c.

167 {
168  bool changed = false;
169  /* To store the visited nodes by CONTROL_MAP and avoid visiting twice a
170  control node: */
171  list blocs = NIL;
172  /* To avoid renaming twice a control node statement, keep track of the
173  visited statements: */
174  // set visited_control =
175 
176  pips_debug(2, "entering\n");
177 
178  /* First iterate on the reachable control nodes from the entry node of
179  the unstructured and then from the exit node: */
180  UNSTRUCTURED_CONTROL_MAP(c, u, blocs, {
182  /* Since we enter a control node, increase the unstructured
183  order: */
184  int un = get_next_unstructured_number();
185 
186  pips_debug(3, "will reorder %ld %d\n", statement_number(st), un);
187  /* ifdebug(3) */
188  /* print_statement(st); */
189 
190  /* Since we enter a control node, number the statements inside this
191  control node with a statement number starting from 1: */
192  statement_reorder(st, un, 1, &changed);
193  });
194 
195  /* Free the list build up during the visit: */
196  gen_free_list(blocs);
197 
198  debug(3, "unstructured_reorder", "exiting\n");
199 
200  return changed;
201 }
#define UNSTRUCTURED_CONTROL_MAP(c, u, l, code)
Walk through all the controls of un unstructured.
static int get_next_unstructured_number()
Compute the next unstructured order.
Definition: reorder.c:68
#define control_statement(x)
Definition: ri.h:941
#define statement_number(x)
Definition: ri.h:2452

References control_statement, debug(), gen_free_list(), get_next_unstructured_number(), NIL, pips_debug, statement_number, statement_reorder(), and UNSTRUCTURED_CONTROL_MAP.

Referenced by control_graph(), and statement_reorder().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update_dummy_parameter()

void update_dummy_parameter ( parameter  p,
entity  ep 
)

Note that free_entity(dummy_identifier(d)) should be performed...

Parameters
epp

Definition at line 2072 of file entity.c.

2073 {
2077  }
2078  else {
2079  dummy d = parameter_dummy(p);
2080 
2081  pips_debug(8, "Dummy identifier changed from \"\%s\" to \"\%s\"\n",
2083  /* Note that free_entity(dummy_identifier(d)) should be performed... */
2084  dummy_identifier(d) = ep;
2085  }
2086 }
dummy make_dummy_identifier(entity _field_)
Definition: ri.c:620
void free_dummy(dummy p)
Definition: ri.c:574
#define dummy_unknown_p(x)
Definition: ri.h:1028

References dummy_identifier, dummy_unknown_p, entity_name, free_dummy(), make_dummy_identifier(), parameter_dummy, and pips_debug.

Referenced by RemoveDummyArguments().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update_expression_syntax()

void update_expression_syntax ( expression  e,
syntax  s 
)

◆ update_operator_to_regular_operator()

entity update_operator_to_regular_operator ( entity  op)

Returns the binary operator associated to a C update operator such as +=.

If the operator is unknown, an undefined entity is returned.

Parameters
opp

Definition at line 2154 of file entity.c.

2155 {
2156  entity sop = entity_undefined;
2157 
2158  if(ENTITY_PLUS_UPDATE_P(op))
2160  else if(ENTITY_MINUS_UPDATE_P(op))
2162  else if(ENTITY_MULTIPLY_UPDATE_P(op))
2164  else if(ENTITY_DIVIDE_UPDATE_P(op))
2166  else if(ENTITY_MODULO_UPDATE_P(op))
2168  else if(ENTITY_LEFT_SHIFT_UPDATE_P(op))
2170  else if(ENTITY_RIGHT_SHIFT_UPDATE_P(op))
2172  else if(ENTITY_BITWISE_AND_UPDATE_P(op))
2174  else if(ENTITY_BITWISE_XOR_UPDATE_P(op))
2176  else if(ENTITY_BITWISE_OR_UPDATE_P(op))
2178 
2179  return sop;
2180 }
#define ENTITY_MODULO_UPDATE_P(e)
#define ENTITY_BITWISE_AND_UPDATE_P(e)
#define ENTITY_RIGHT_SHIFT_UPDATE_P(e)
#define ENTITY_BITWISE_OR_UPDATE_P(e)
#define ENTITY_MULTIPLY_UPDATE_P(e)
#define ENTITY_DIVIDE_UPDATE_P(e)
#define ENTITY_BITWISE_XOR_UPDATE_P(e)
#define ENTITY_LEFT_SHIFT_UPDATE_P(e)

References BITWISE_AND_OPERATOR_NAME, BITWISE_OR_OPERATOR_NAME, BITWISE_XOR_OPERATOR_NAME, C_MODULO_OPERATOR_NAME, DIVIDE_OPERATOR_NAME, ENTITY_BITWISE_AND_UPDATE_P, ENTITY_BITWISE_OR_UPDATE_P, ENTITY_BITWISE_XOR_UPDATE_P, ENTITY_DIVIDE_UPDATE_P, entity_intrinsic(), ENTITY_LEFT_SHIFT_UPDATE_P, ENTITY_MINUS_UPDATE_P, ENTITY_MODULO_UPDATE_P, ENTITY_MULTIPLY_UPDATE_P, ENTITY_PLUS_UPDATE_P, ENTITY_RIGHT_SHIFT_UPDATE_P, entity_undefined, LEFT_SHIFT_OPERATOR_NAME, MINUS_C_OPERATOR_NAME, MULTIPLY_OPERATOR_NAME, PLUS_C_OPERATOR_NAME, and RIGHT_SHIFT_OPERATOR_NAME.

Referenced by any_update_to_transformer_list(), call_flt(), split_update_call(), update_operation_to_transformer(), and update_reflhs_with_rhs_to_transformer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update_range()

expression update_range ( entity  ,
range  ,
expression  ,
expression  ,
expression  ,
bool   
)

fortran90.c

◆ update_statement_enclosing_loops()

void update_statement_enclosing_loops ( statement  ,
list   
)

◆ user_call_p()

bool user_call_p ( call  c)

Test if a call is a user call.

Definition at line 4361 of file expression.c.

4361  {
4362  entity f = call_function(c);
4363  value v = entity_initial(f);
4364  return value_code_p(v);
4365 }

References call_function, entity_initial, f(), and value_code_p.

Referenced by copy_from_call(), copy_to_call(), costly_task(), look_for_user_call(), pragma_scop(), and statement_contains_user_call_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ user_function_call_p()

bool user_function_call_p ( expression  e)

Definition at line 1068 of file expression.c.

1070 {
1071  syntax s = expression_syntax(e);
1072  bool user_function_call_p = false;
1073 
1074  if(syntax_call_p(s)) {
1075  call c = syntax_call(s);
1076  entity f = call_function(c);
1077  value v = entity_initial(f);
1079  }
1080  else {
1081  user_function_call_p = false;
1082  }
1083 
1084  return user_function_call_p;
1085 }
bool user_function_call_p(expression e)
Definition: expression.c:1068

References call_function, entity_initial, expression_syntax, f(), syntax_call, syntax_call_p, and value_code_p.

+ Here is the call graph for this function:

◆ Value_to_expression()

expression Value_to_expression ( Value  v)

added interface for linear stuff.

it is not ok if Value is not an int, but if Value is changed sometime, I guess code that use this function will not need any change. FC.

Definition at line 1251 of file expression.c.

1252 {
1253  return(int_to_expression(VALUE_TO_INT(v)));
1254 }

References int_to_expression(), and VALUE_TO_INT.

Referenced by array_access_to_array_ranges(), constraints_to_loop_bound(), do_solve_hardware_constraints_on_nb_proc(), extract_the_align(), fusion(), fusion_buffer(), generate_one_message(), Hierarchical_tiling(), hpfc_broadcast_buffers(), make_rational_exp(), Tiling2_buffer(), Tiling_buffer_allocation(), and update_indices_for_local_computation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ValueNumberOfElements()

Value ValueNumberOfElements ( list  ld)
Parameters
ldd

Definition at line 435 of file size.c.

436 {
437  list pc;
438  Value ne = VALUE_ONE;
439 
440  for (pc = ld; pc != NULL; pc = CDR(pc)) {
442  }
443 
444  return(ne);
445 }
#define value_mult(v, w)
whether the default is protected or not this define makes no sense any more...
Value ValueSizeOfDimension(dimension d)
FI: I do not understand the "Value" cast.
Definition: size.c:531

References CAR, CDR, DIMENSION, value_mult, VALUE_ONE, and ValueSizeOfDimension().

Referenced by simd_replace_parameters(), and ValueSizeOfArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ValueSizeOfArray()

Value ValueSizeOfArray ( entity  e)

Definition at line 206 of file size.c.

207 {
208  variable a;
209  Value longueur, taille_elt;
210 
212  a = type_variable(entity_type(e));
213 
214  taille_elt = (Value) SizeOfElements(variable_basic(a));
216 
217  return(value_mult(taille_elt,longueur));
218 }
Value ValueNumberOfElements(list ld)
Definition: size.c:435

References assert, entity_type, SizeOfElements(), type_variable, type_variable_p, value_mult, ValueNumberOfElements(), variable_basic, and variable_dimensions.

Referenced by equivalent_entity_compare(), and text_equivalence_class().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ValueSizeOfDimension()

Value ValueSizeOfDimension ( dimension  d)

FI: I do not understand the "Value" cast.

Definition at line 531 of file size.c.

532 {
533  Value dl, du;
534  intptr_t l = 0 ;
535  intptr_t u = 0;
536  bool ok;
537 
539  du = (Value) u;
541  dl = (Value) l;
542 
543  if(!ok) {
544  fprintf(stderr, "[ValueSizeOfIthDimension] Non constant dimension\n");
545  abort();
546  }
547 
548  return(value_plus(value_minus(du,dl), VALUE_ONE));
549 }
#define value_plus(v1, v2)
binary operators on values

References abort, dimension_lower, dimension_upper, expression_integer_value(), fprintf(), intptr_t, ok, value_minus, VALUE_ONE, and value_plus.

Referenced by ValueNumberOfElements().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variable_declaration_coherency_p()

bool variable_declaration_coherency_p ( entity  module,
statement  st 
)
Parameters
moduleodule
stt

Definition at line 203 of file module.c.

204 {
205  module_coherent_p = true;
209  gen_true,
211  module_coherent_p = true;
213  call_domain,
214  gen_true,
217  return module_coherent_p;
218 }
void add_non_declared_reference_to_declaration(reference ref)
Definition: module.c:142
void add_symbolic_constant_to_declaration(call c)
Definition: module.c:175

References add_non_declared_reference_to_declaration(), add_symbolic_constant_to_declaration(), call_domain, checked_module, entity_undefined, gen_multi_recurse(), gen_true(), module, module_coherent_p, and reference_domain.

Referenced by wp65().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variable_declaration_verify()

void variable_declaration_verify ( reference  ref)
Parameters
refef

Definition at line 116 of file module.c.

117 {
118 
120  { module_coherent_p = false;
121  fprintf(stderr,
122  "variable non declaree %s\n",
124  }
125 }

References checked_module, entity_name, fprintf(), module_coherent_p, ref, reference_variable, and variable_in_module_p2().

+ Here is the call graph for this function:

◆ variable_dimension_number()

int variable_dimension_number ( variable  v)

Definition at line 5632 of file type.c.

5633 {
5634  int d = 0;
5635 
5637  d++;
5638 
5639  return d;
5640 }

References DIMENSION, FOREACH, and variable_dimensions.

Referenced by create_scalar_stub_sink_cell(), pointer_reference_to_expression(), reference_dereferencing_to_points_to(), and reference_to_points_to_sinks().

+ Here is the caller graph for this function:

◆ variable_dynamic_p()

bool variable_dynamic_p ( entity  v)

Definition at line 1586 of file variable.c.

1587 {
1588  return(type_variable_p(entity_type(v)) &&
1591 }

References dynamic_area_p(), entity_storage, entity_type, ram_section, storage_ram, storage_ram_p, and type_variable_p.

Referenced by deal_with_similars(), and dynamic_variables_to_values().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variable_entities_may_conflict_p()

bool variable_entities_may_conflict_p ( entity  e1,
entity  e2 
)

Can we have and check static aliasing in a1?

Let's assume we are dealing with Fortran code, but another test should be added about the current module language. No test on dynamic aliasing since we are dealing here with direct read and write effects.

return(r1 != ram_undefined && r2 != ram_undefined && f1 == f2 && a1 == a2 && INTERVAL_INTERSECTION(o1, l1, o2, l2));

FI: it's too late to check if r1 and r2 are defined: you already have core dumped! also, f1 and f2 are not relevant since location are governed by area a1 and a2

Parameters
e11
e22

Definition at line 689 of file size.c.

690 {
691  bool intersect_p = false;
692  storage s1, s2;
693  ram r1 = ram_undefined, r2 = ram_undefined;
694  int o1, o2, l1, l2;
695  entity f1, f2, a1, a2;
696 
697  if(same_entity_p(e1, e2)) return true;
698 
699  s1 = entity_storage(e1);
700  s2 = entity_storage(e2);
701 
702  if (! (storage_ram_p(s1) && storage_ram_p(s2))) {
703  // Conflicts may exist beween array elements when an array is
704  // a formal parameter
705  if( ! (storage_formal_p(s1) && storage_formal_p(s2)) ) {
706  return false;
707  }
708  else {
709  formal f1 = storage_formal(s1);
710  formal f2 = storage_formal(s2);
711  entity e1 = formal_function(f1);
712  entity e2 = formal_function(f2);
713  if(e1==e2) {
714  int o1 = formal_offset(f1);
715  int o2 = formal_offset(f2);
716  return o1==o2;
717  }
718  return false;
719  }
720  }
721 
722  r1 = storage_ram(s1);
723  r2 = storage_ram(s2);
724 
725  a1 = ram_section(r1);
726  a2 = ram_section(r2);
727 
728  if(a1!=a2) return false;
729 
730  /* Can we have and check static aliasing in a1? */
731  if(stack_area_p(a1))
732  return false;
733 
734  if(heap_area_p(a1))
735  return false;
736 
737  // FI: we create aliasing in C between an array and its elements
738  // This is used to analyse the value of array elements
739  if (false && c_module_p(get_current_module_entity()))
740  return false;
741 
742  /* Let's assume we are dealing with Fortran code, but another test
743  should be added about the current module language. No test on
744  dynamic aliasing since we are dealing here with direct read and
745  write effects. */
746  o1 = ram_offset(r1);
747  o2 = ram_offset(r2);
748 
749  if(o1==o2) return true;
750 
751  f1 = ram_function(r1);
752  f2 = ram_function(r2);
753 
754  if(f1==f2 && (ENDP(ram_shared(r1)) || ENDP(ram_shared(r2))))
755  return false;
756 
757  l1 = storage_space_of_variable(e1);
758  l1 = l1+o1-1;
759 
760 
761  l2 = storage_space_of_variable(e2);
762  l2 = l2+o2-1;
763 
764  /* return(r1 != ram_undefined && r2 != ram_undefined &&
765  f1 == f2 && a1 == a2 &&
766  INTERVAL_INTERSECTION(o1, l1, o2, l2)); */
767 
768  /* FI: it's too late to check if r1 and r2 are defined:
769  * you already have core dumped!
770  * also, f1 and f2 are not relevant since location are governed
771  * by area a1 and a2
772  */
773 
774  intersect_p = ( a1 == a2 && INTERVAL_INTERSECTION(o1, l1, o2, l2));
775 
776  return intersect_p;
777 }
int storage_space_of_variable(entity v)
Definition: size.c:656
#define INTERVAL_INTERSECTION(a, b, c, d)
Definition: size.c:680

References c_module_p(), ENDP, entity_storage, f2(), formal_function, formal_offset, get_current_module_entity(), heap_area_p(), INTERVAL_INTERSECTION, ram_function, ram_offset, ram_section, ram_shared, ram_undefined, s1, same_entity_p(), stack_area_p(), storage_formal, storage_formal_p, storage_ram, storage_ram_p, and storage_space_of_variable().

Referenced by entities_maymust_conflict_p(), references_may_conflict_p(), and SaveChains().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variable_entity_dimension()

int variable_entity_dimension ( entity  v)

variable_entity_dimension(entity v): returns the dimension of variable v; scalar have dimension 0.

This is not necessarily the dimensions because of typedefs. Another function is able to collect dimensions hidden in typedefs, but also via fields: see type_depth().

Definition at line 1293 of file variable.c.

1294 {
1295  int d = 0;
1296 
1297  pips_assert("variable_entity_dimension", type_variable_p(entity_type(v)));
1298 
1300  d++;
1301 
1302  return d;
1303 }

References DIMENSION, entity_type, FOREACH, pips_assert, type_variable, type_variable_p, and variable_dimensions.

Referenced by deal_with_similars(), declaration_with_overlaps(), generate_remapping_system(), hpfc_unstutter_dummies(), prepare_context(), remapping_variables(), struct_variable_to_pointer_locations(), vertex_partially_invariant_p(), xml_Argument(), xml_AssignArgument(), xml_declarations(), xml_FormalVariables(), xml_GlobalVariables(), xml_LocalVariables(), and xml_ParameterUseToArrayBound().

+ Here is the caller graph for this function:

◆ variable_entity_p()

bool variable_entity_p ( entity  e)

variable.c

variable.c

Definition at line 70 of file variable.c.

71 {
72  bool variable =
75 
76  return variable;
77 }
struct _newgen_struct_variable_ * variable
Definition: ri.h:463

References entity_storage, storage_ram_p, and storage_undefined.

Referenced by entities_maymust_conflict_p(), inline_expression_call(), partial_eval_declarations(), referencenodeclfilter(), retype_formal_parameters(), and value_alias().

+ Here is the caller graph for this function:

◆ variable_equal_p()

bool variable_equal_p ( variable  v1,
variable  v2 
)
Parameters
v11
v22

Definition at line 819 of file type.c.

820 {
821  return generic_variable_equal_p(v1, v2, true, true, hash_table_undefined);
822 }
bool generic_variable_equal_p(variable v1, variable v2, bool strict_p, bool qualifier_p, hash_table structural_table)
Definition: type.c:762

References generic_variable_equal_p(), and hash_table_undefined.

Referenced by register_scalar_communications().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variable_heap_p()

bool variable_heap_p ( entity  v)

Definition at line 1600 of file variable.c.

1601 {
1602  return(type_variable_p(entity_type(v)) &&
1605 }

References entity_storage, entity_type, heap_area_p(), ram_section, storage_ram, storage_ram_p, and type_variable_p.

Referenced by xml_Chain_Graph(), xml_Compute_and_Need(), xml_GlobalVariables(), xml_Region_Parameter(), xml_TaskParameters(), and xml_Type_Entity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variable_in_common_p()

◆ variable_in_list_p()

bool variable_in_list_p ( entity  e,
list  l 
)

Definition at line 1623 of file variable.c.

1624 {
1625  // FI: should be a call to gen_in_list_p()
1626  bool is_in_list = false;
1627  for( ; (l != NIL) && (! is_in_list); l = CDR(l))
1628  if(same_entity_p(e, ENTITY(CAR(l))))
1629  is_in_list = true;
1630  return(is_in_list);
1631 }

References CAR, CDR, ENTITY, NIL, and same_entity_p().

Referenced by add_aliases_for_current_call_site(), and text_equivalences().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variable_in_module_p()

bool variable_in_module_p ( entity  v,
entity  m 
)

This test can only be applied to variables, not to functions, subroutines or commons visible from a module.

Definition at line 1610 of file variable.c.

1612 {
1613  bool in_module_1 =
1614  strcmp(module_local_name(m), entity_module_name(v)) == 0;
1615  bool in_module_2 =
1617 
1618  pips_assert ("Module declaration consistency", in_module_1==in_module_2);
1619 
1620  return in_module_1;
1621 }

References code_declarations, entity_initial, entity_is_argument_p(), entity_module_name(), module_local_name(), pips_assert, and value_code.

Referenced by external_value_name(), and update_common_layout().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variable_in_module_p2()

bool variable_in_module_p2 ( entity  v,
entity  m 
)

Definition at line 94 of file module.c.

97 {
98  bool in_module_1 =
101 
102  bool in_module_2 = entity_is_argument_p(v,decl);
103 
104  ifdebug(8) {
105  if (!in_module_1 || !in_module_2) {
106  pips_debug(8, "variable %s not in declarations of %s\n",
107  entity_name(v),entity_name(m));
108  dump_arguments(decl);
109  }
110  }
111  return (in_module_1 && in_module_2);
112 }
void dump_arguments(cons *args)
entity_name is a macro, hence the code replication
Definition: arguments.c:69

References code_declarations, dump_arguments(), entity_initial, entity_is_argument_p(), entity_module_name(), entity_name, ifdebug, module_local_name(), pips_debug, same_string_p, and value_code.

Referenced by add_non_declared_reference_to_declaration(), symbolic_constant_declaration_verify(), and variable_declaration_verify().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variable_initial_expression()

expression variable_initial_expression ( entity  v)

Returns a copy of the initial (i.e.

initialization) expression of variable v. If v's inital value is a constants or a code block, it is converted to the corresponding expression.

Could have been called entity_to_initialization_expression(), or entity_to_initial_expression(), but it only makes sense for variables.

FI: not sure this is used in C; also, the constant field could be used as well.

Definition at line 1899 of file variable.c.

1900 {
1901  value val = entity_initial(v);
1903 
1904  if (value_undefined_p(val))
1905  {
1906  // FC: this seems to occur on from initial preconditions on a field
1907  // within a struct. The actual initial value should be "0" in that case.
1908  // see Semantics/struct04.c
1909  pips_user_warning("undefined initial value on %s... ignoring",
1910  entity_name(v));
1911  return expression_undefined;
1912  }
1913 
1914  if (value_expression_p(val)) {
1916  }
1917  else if(value_constant_p(val)) {
1918  constant c = value_constant(val);
1919  if (constant_int_p(c)) {
1921  }
1922  else {
1923  pips_internal_error("Not Yet Implemented.");
1924  }
1925  }
1926  else if(value_code_p(val)) {
1929 
1930  if(!ENDP(il)) {
1931  statement is = STATEMENT(CAR(il));
1933 
1934  pips_assert("A pointer initialization is made of one instruction expression",
1935  gen_length(il)==1 && instruction_expression(ii));
1936 
1938  }
1939  }
1940  }
1941  else if(value_unknown_p(val)) {
1943  }
1944  else if(value_intrinsic_p(val)) {
1946  }
1947  else if(value_reference_p(val)) {
1948  // FI: the initial value of a location entity is a reference to itself
1950  }
1951  else if(value_symbolic_p(val)) {
1952  symbolic s = value_symbolic(val);
1953  /* FI: not sure this is used in C; also, the constant field could be
1954  used as well. */
1956  }
1957  else {
1958  pips_internal_error("Unexpected value tag %d.", value_tag(val));
1959  }
1960 
1961  return exp;
1962 }
#define code_initializations(x)
Definition: ri.h:788
#define sequence_statements(x)
Definition: ri.h:2360
#define instruction_expression(x)
Definition: ri.h:1541

References CAR, code_initializations, constant_int, constant_int_p, copy_expression(), ENDP, entity_initial, entity_name, entity_type, exp, expression_undefined, gen_length(), instruction_expression, int_to_expression(), pips_assert, pips_internal_error, pips_user_warning, pointer_type_p(), sequence_statements, STATEMENT, statement_instruction, symbolic_expression, ultimate_type(), value_code, value_code_p, value_constant, value_constant_p, value_expression, value_expression_p, value_intrinsic_p, value_reference_p, value_symbolic, value_symbolic_p, value_tag, value_undefined_p, and value_unknown_p.

Referenced by c_data_to_prec_for_variables(), declaration_statement_to_points_to(), declaration_to_transformer(), declaration_to_transformer_list(), global_source_to_sinks(), move_declaration_control_node_declarations_to_statement(), partial_eval_declaration(), propagate_preconditions_in_declarations(), redeclaration_enter_statement(), rename_statement_declarations(), self_initialization_p(), and split_initializations_in_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variable_is_a_module_formal_parameter_p()

bool variable_is_a_module_formal_parameter_p ( entity  a_variable,
entity  a_module 
)

Well, the variable is a formal parameter of the module:

The variable is in the declaration of the module but is not a formal parameter:

The variable is not in the declaration of the module:

Parameters
a_variable_variable
a_module_module

Definition at line 1547 of file variable.c.

1549 {
1551  {
1552  storage s = entity_storage(e);
1553  if (e == a_variable) {
1554  if (storage_formal_p(s))
1555  /* Well, the variable is a formal parameter of the
1556  module: */
1557  return true;
1558  else
1559  /* The variable is in the declaration of the module
1560  but is not a formal parameter: */
1561  return false;
1562  }
1563  }
1564 
1565  /* The variable is not in the declaration of the module: */
1566  return false;
1567 }
static entity a_variable

References a_variable, code_declarations, ENTITY, entity_initial, entity_storage, FOREACH, storage_formal_p, and value_code.

Referenced by create_values_for_simple_effect(), statement_has_a_module_formal_argument_write_effect_p(), and translate_to_module_frame().

+ Here is the caller graph for this function:

◆ variable_length_array_type_p()

bool variable_length_array_type_p ( type  t)

Is this equivalent to dependent_type_p()?

Definition at line 2972 of file type.c.

2973 {
2974  bool return_val = false;
2975  if(array_type_p(t)) {
2979  return_val=true;
2980  break;
2981  }
2982  }
2983  }
2984  return return_val;
2985 }

References array_type_p(), dimension_lower, dimension_upper, extended_expression_constant_p(), FOREACH, type_variable, and variable_dimensions.

Referenced by entity_variable_length_array_p(), extended_expression_constant_p(), and fixed_length_array_type_p().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variable_return_p()

bool variable_return_p ( entity  v)

True if a variable is the pseudo-variable used to store value returned by a function:

Definition at line 1522 of file variable.c.

1523 {
1524  storage s = entity_storage(v);
1525  bool return_p = storage_return_p(s);
1526 
1527  return return_p;
1528 }

References entity_storage, and storage_return_p.

Referenced by entities_maymust_conflict_p(), statement_has_a_module_formal_argument_write_effect_p(), transformer_filter_subsumed_variables(), and variable_to_abstract_location().

+ Here is the caller graph for this function:

◆ variable_stack_p()

bool variable_stack_p ( entity  v)

Definition at line 1593 of file variable.c.

1594 {
1595  return(type_variable_p(entity_type(v)) &&
1598 }

References entity_storage, entity_type, ram_section, stack_area_p(), storage_ram, storage_ram_p, and type_variable_p.

Referenced by dynamic_variables_to_values().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variable_static_p()

◆ variable_type_supporting_entities()

list variable_type_supporting_entities ( list  sel,
set  vt,
variable  v 
)
Parameters
selel
vtt

Definition at line 4254 of file type.c.

4255 {
4256  basic b = variable_basic(v);
4257  list dims = variable_dimensions(v);
4258 
4259  ifdebug(8) {
4260  pips_debug(8, "Begin: ");
4261  print_entities(sel);
4262  fprintf(stderr, "\n");
4263  }
4264 
4265  FOREACH(DIMENSION, d, dims) {
4266  expression l = dimension_lower(d);
4267  expression u = dimension_upper(d);
4268  sel = constant_expression_supporting_entities(sel, vt, l);
4269  sel = constant_expression_supporting_entities(sel, vt, u);
4270  }
4271 
4272  sel = basic_supporting_entities(sel, vt, b);
4273 
4274  ifdebug(8) {
4275  pips_debug(8, "End: ");
4276  print_entities(sel);
4277  fprintf(stderr, "\n\n");
4278  }
4279 
4280  return sel;
4281 }
list basic_supporting_entities(list sel, set vt, basic b)
Definition: type.c:4211

References basic_supporting_entities(), constant_expression_supporting_entities(), DIMENSION, dimension_lower, dimension_upper, FOREACH, fprintf(), ifdebug, pips_debug, print_entities(), variable_basic, and variable_dimensions.

Referenced by recursive_type_supporting_entities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variable_type_supporting_references()

list variable_type_supporting_references ( list  srl,
variable  v 
)

ifdebug(9) {

pips_debug(8, "Begin: ");

print_references(srl);

fprintf(stderr, "\n");

}

ifdebug(9) {

pips_debug(8, "End: ");

print_references(srl);

fprintf(stderr, "\n");

}

Parameters
srlrl

Definition at line 4562 of file type.c.

4563 {
4564  basic b = variable_basic(v);
4565  list dims = variable_dimensions(v);
4566 
4567  // FI: to avoid cycles betwen librairies ri-util and prettyprint
4568  /* ifdebug(9) { */
4569  /* pips_debug(8, "Begin: "); */
4570  /* print_references(srl); */
4571  /* fprintf(stderr, "\n"); */
4572  /* } */
4573 
4574  MAP(DIMENSION, d, {
4575  expression l = dimension_lower(d);
4576  expression u = dimension_upper(d);
4579  }, dims);
4580 
4581  srl = basic_supporting_references(srl, b);
4582 
4583  // FI: to avoid cycles betwen librairies ri-util and prettyprint
4584  /* ifdebug(9) { */
4585  /* pips_debug(8, "End: "); */
4586  /* print_references(srl); */
4587  /* fprintf(stderr, "\n"); */
4588  /* } */
4589 
4590  return srl;
4591 }
list basic_supporting_references(list srl, basic b)
Definition: type.c:4519

References basic_supporting_references(), constant_expression_supporting_references(), DIMENSION, dimension_lower, dimension_upper, MAP, variable_basic, and variable_dimensions.

Referenced by recursive_type_supporting_references().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vect_debug()

void vect_debug ( Pvecteur  v)

constraint.c

Definition at line 43 of file constraint.c.

44 {
46 }
void vect_fprint(FILE *f, Pvecteur v, get_variable_name_t variable_name)
void vect_fprint(FILE * f, Pvecteur v, char * (*variable_name)()): impression d'un vecteur creux v su...
Definition: io.c:124

References entity_local_name(), and vect_fprint().

Referenced by print_normalized(), PrintLinExpr(), sc_proj_optim_on_di_ofl(), simple_indices_p(), and TestDependence().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vect_product()

Pvecteur vect_product ( Pvecteur pv1,
Pvecteur pv2 
)

returns a Pvecteur equal to (*pv1) * (*pv2) if this product is linear or NULL otherwise.

the result is built from pv1 or pv2 and the other vector is removed.

Parameters
pv1v1
pv2v2

Definition at line 1032 of file eval.c.

1033 {
1034  Pvecteur vr;
1035 
1036  if (vect_const_p(*pv1)) {
1037  vr = vect_multiply(*pv2, vect_coeff(TCST, *pv1));
1038  vect_rm(*pv1);
1039  }
1040  else if (vect_const_p(*pv2)) {
1041  vr = vect_multiply(*pv1, vect_coeff(TCST, *pv2));
1042  vect_rm(*pv2);
1043  }
1044  else {
1045  vr = NULL;
1046  vect_rm(*pv1);
1047  vect_rm(*pv2);
1048  }
1049 
1050  *pv1 = NULL;
1051  *pv2 = NULL;
1052 
1053  return(vr);
1054 }
static bool vect_const_p(Pvecteur v)
returns true if v is not NULL and is constant
Definition: eval.c:1020

References TCST, vect_coeff(), vect_const_p(), vect_multiply(), and vect_rm().

+ Here is the call graph for this function:

◆ vecteur_nul_p()

bool vecteur_nul_p ( Pvecteur  v)

Definition at line 56 of file constraint.c.

57 {
58  return VECTEUR_NUL_P(v) ||
59  // is this possible?
60  (!v->succ && var_of(v)==TCST && val_of(v)==0);
61 }

References Svecteur::succ, TCST, val_of, var_of, and VECTEUR_NUL_P.

Referenced by generate_subarray_shift(), and subarray_shift_assignment_p().

+ Here is the caller graph for this function:

◆ void_function_p()

bool void_function_p ( entity  m)

Check if m is a C void function or a Fortran subroutine.

No information about m is available when false is returned.

Definition at line 538 of file module.c.

539 {
540  type ft = ultimate_type(entity_type(m));
541  bool void_p = false;
542 
543  if(type_functional_p(ft)) {
545  type r = functional_result(f);
546  if(type_void_p(r)) {
547  void_p = true;
548  }
549  }
550 
551  return void_p;
552 }

References entity_type, f(), functional_result, type_functional, type_functional_p, type_void_p, and ultimate_type().

Referenced by words_goto_label().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ volatile_variable_p()

bool volatile_variable_p ( variable  v)
Returns
whether variable is a "volatile" variable

See also entity_register_p()

Definition at line 1649 of file variable.c.

1650 {
1651  bool volatile_p = false;
1652 
1653  // FI: no idea if volatile can he hidden in a typedef...
1654  list ql = variable_qualifiers(v);
1655 
1656  FOREACH(QUALIFIER, q, ql) {
1657  if(qualifier_volatile_p(q)) {
1658  volatile_p = true;
1659  break;
1660  }
1661  }
1662  return volatile_p;
1663 }
#define qualifier_volatile_p(x)
Definition: ri.h:2182

References FOREACH, QUALIFIER, qualifier_volatile_p, and variable_qualifiers.

Referenced by analyzed_type_p(), entity_volatile_variable_p(), and pointer_expression_to_transformer().

+ Here is the caller graph for this function:

◆ wide_forward_control_map_get_blocs()

void wide_forward_control_map_get_blocs ( control  ,
cons **   
)

◆ zero_expression_p()

bool zero_expression_p ( expression  e)

Definition at line 1217 of file expression.c.

1218 {
1219  bool zero_p = false;
1220  if(expression_call_p(e)) {
1221  call c = expression_call(e);
1222  entity f = call_function(c);
1223  if(f==int_to_entity(0))
1224  zero_p = true;
1225  }
1226  return zero_p;
1227 }

References call_function, expression_call(), expression_call_p(), f(), and int_to_entity().

Referenced by binary_intrinsic_call_to_points_to_sinks(), make_send_receive_conversion(), offset_points_to_cell(), points_to_translation_of_formal_parameters(), and reference_to_points_to_translations().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ AllocatableArea

entity AllocatableArea
extern

Definition at line 61 of file area.c.

◆ char_entities

list char_entities

Definition at line 2387 of file ri-util.h.

◆ complex_entities

list complex_entities

Definition at line 2386 of file ri-util.h.

◆ double_entities

list double_entities

Definition at line 2387 of file ri-util.h.

◆ DynamicArea

entity DynamicArea
extern

area.c

area.c

These global variables are declared in ri-util/util.c.

functions for areas Four areas used to allocate variables which are not stored in a Fortran common. These areas are just like Fortran commons, but the dynamic area is the only non-static area according to Fortran standard. The heap and the stack area are used to deal with Fortran ANSI extensions and C, pointers and allocatable arrays, and adjustable arrays (VLA in C). The dynamic area is stack allocated by most compilers but could be statically allocated since the array sizes are known.

Areas are declared for each module. These four global variables are managed by the Fortran and C parsers and used to allocate variables in the current module. Note that the C parser uses more areas at the same time to cope with global variables.

Definition at line 57 of file area.c.

◆ FORTRAN_OMP_CONTINUATION

const string FORTRAN_OMP_CONTINUATION
extern

Definition at line 52 of file pragma.c.

◆ FORTRAN_PRAGMA_HEADER

const string FORTRAN_PRAGMA_HEADER
extern

pragma.c

Definition at line 51 of file pragma.c.

◆ HeapArea

entity HeapArea
extern

Definition at line 59 of file area.c.

◆ integer_entities

list integer_entities
extern

Make a new variable entity which name is one letter prefix + one incrementing number.

The function name should be changed. Useless function according to previous ones ?

This entity is either a new temporary or a new auxiliary variable. The parameter "kind" gives the kind of entity to produce. "ba" gives the basic (ie the type) of the entity to create.

The number of the temporaries is given by a global variable named "count_tmp". The number of the auxiliary variables is given by a global variable named "count_aux". These lists memorize all the new created entities of each type. They are used for the declarations of these new variables : temporaries and auxiliaries.

Definition at line 2787 of file ri-util.h.

Referenced by make_new_entity().

◆ keyword_typedef_table

hash_table keyword_typedef_table
extern

Because of typedefs, the C lexers need help to decide if a character string such as toto is a type name or a keyword or an identifier.

Such a table is used by the C preprocessor and by the C parser. It is also updated for in- or outlining with new typedef names.

The table must be initialized with token values generated by bison. The token values could possibly be different for the PIPS preprocessor and syntactic analyzer. Each has its own initialization function, parser_init_keyword_typedef_table() and preprocessor_init_keyword_table().

Definition at line 253 of file static.c.

Referenced by actual_c_parser(), c_parser_put_new_typedef(), declare_new_typedef(), free_keyword_typedef_table(), is_c_keyword_typedef(), keep_track_of_typedef(), make_keyword_typedef_table(), parser_init_keyword_typedef_table(), preprocessor_init_keyword_typedef_table(), put_new_typedef(), reset_keyword_typedef_table(), and set_keyword_typedef_table().

◆ logical_entities

list logical_entities

Definition at line 2387 of file ri-util.h.

◆ real_entities

list real_entities

Definition at line 2386 of file ri-util.h.

◆ StackArea

entity StackArea
extern

Definition at line 60 of file area.c.

◆ statement_to_goto_table

◆ StaticArea

entity StaticArea
extern

Definition at line 58 of file area.c.

◆ vcid_ri_util_control

char vcid_ri_util_control[]
extern

control.c

control.c

It is mainly used by my unspaghettify and the controlizer.

Ronan Keryell.

Definition at line 34 of file control.c.