30 #include "pips_config.h"
49 for(carg=args; !
ENDP(carg);
POP(carg)) {
176 mne = se>0 ? INT_MAX/se : INT_MAX;
183 "Maximum number of elements: %d, number of elements declared: %d\n",
209 Value longueur, taille_elt;
343 "Sizing of character variable by illegal value (tag=%d)",
350 "Sizing of character variable by non-integer constant");
360 "Sizing of bit-field is non-integer constant");
421 for (pc = ld; pc != NULL &&
ok; pc =
CDR(pc)) {
440 for (pc = ld; pc != NULL; pc =
CDR(pc)) {
459 fprintf(stderr,
"[SizeOfIthDimension] not a variable\n");
468 while (pc != NULL && --i > 0)
472 fprintf(stderr,
"[SizeOfIthDimension] not enough dimensions\n");
478 fprintf(stderr,
"[SizeOfIthDimension] Non constant %dth dimension\n", i);
544 fprintf(stderr,
"[ValueSizeOfIthDimension] Non constant dimension\n");
664 "hash table should have been allocated\n");
671 fprintf(stderr,
"[storage_space_of_variable] Non constant array size\n");
680 #define INTERVAL_INTERSECTION(a,b,c,d) (!((b) <= (c) || (d) <= (a)))
691 bool intersect_p =
false;
728 if(a1!=a2)
return false;
749 if(o1==o2)
return true;
expression copy_expression(expression p)
EXPRESSION.
void free_expression(expression p)
#define value_minus(v1, v2)
#define value_plus(v1, v2)
binary operators on values
#define value_mult(v, w)
whether the default is protected or not this define makes no sense any more...
entity get_current_module_entity(void)
Get the entity of the current module.
#define ENDP(l)
Test if a list is empty.
#define POP(l)
Modify a list pointer to point on the next element of the list.
#define NIL
The empty list (nil in Lisp)
size_t gen_length(const list l)
#define CAR(pcons)
Get the value of the first element of a list.
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
#define CDR(pcons)
Get the list less its first element.
void * gen_reduce(void *r, void *(*fp)(void *, const list), const list l)
#define list_undefined
Undefined list definition :-)
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
hash_table hash_table_make(hash_key_type key_type, size_t size)
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.
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.
void hash_table_free(hash_table htp)
this function deletes a hash table that is no longer useful.
#define pips_user_warning
#define pips_internal_error
#define user_error(fn,...)
#define user_warning(fn,...)
#define HASH_UNDEFINED_VALUE
value returned by hash_get() when the key is not found; could also be called HASH_KEY_NOT_FOUND,...
#define hash_table_undefined
Value of an undefined hash_table.
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
int f2(int off1, int off2, int w, int n, float r[n], float a[n], float b[n])
#define MINUS_OPERATOR_NAME
#define PLUS_OPERATOR_NAME
#define DEFAULT_INTEGER_TYPE_SIZE
#define ENTITY_BRACE_INTRINSIC_P(e)
C initialization expression.
#define DEFAULT_LONG_INTEGER_TYPE_SIZE
#define DEFAULT_POINTER_TYPE_SIZE
#define MULTIPLY_OPERATOR_NAME
bool stack_area_p(entity aire)
bool heap_area_p(entity aire)
bool same_entity_p(entity e1, entity e2)
predicates on entities
bool c_module_p(entity m)
Test if a module "m" is written in C.
value EvalExpression(expression e)
Evaluate statically an expression.
bool expression_integer_value(expression e, intptr_t *pval)
bool expression_call_p(expression e)
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
expression make_op_exp(char *op_name, expression exp1, expression exp2)
================================================================
basic basic_of_expression(expression)
basic basic_of_expression(expression exp): Makes a basic of the same basic as the expression "exp".
int number_of_items(type)
Same as above, but arrays in struct are taken into account.
int string_type_size(basic)
bool char_type_p(type)
return true whether âtâ is a char or an unsigned char
#define value_undefined_p(x)
#define storage_formal_p(x)
#define value_constant(x)
#define basic_typedef_p(x)
#define symbolic_constant(x)
#define dimension_lower(x)
#define basic_derived_p(x)
#define entity_storage(x)
#define value_constant_p(x)
#define storage_formal(x)
#define value_symbolic(x)
#define basic_undefined_p(x)
#define EXPRESSION(x)
EXPRESSION.
#define constant_int_p(x)
#define value_symbolic_p(x)
#define formal_function(x)
#define dimension_upper(x)
#define variable_dimensions(x)
#define call_arguments(x)
#define basic_string_p(x)
#define value_expression_p(x)
#define expression_syntax(x)
#define type_variable_p(x)
#define value_expression(x)
#define constant_undefined
#define variable_basic(x)
#define entity_initial(x)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
void safe_reset_entity_to_size()
In case of error handling, PIPS may try to reset this table twice.
_int SizeOfElements(basic b)
This function returns the length in bytes of the Fortran or C type represented by a basic,...
int storage_space_of_variable(entity v)
static hash_table entity_to_size
a hash table to map entities to their numbers of elements
Value ValueSizeOfDimension(dimension d)
FI: I do not understand the "Value" cast.
#define INTERVAL_INTERSECTION(a, b, c, d)
expression SizeOfDimension(dimension d)
int element_number(basic b, list ld)
END_EOLE.
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 ...
int ExpressionToInt(expression e)
this function computes the value of an integer constant expression and returns it to the calling func...
expression SizeOfDimensions(list dims)
computes the product of all dimensions in dims
static void * do_sizeofdimension_reduction(void *v, const list l)
int entity_memory_size(entity dt)
bool NumberOfElements(basic b, list ld, int *n)
int CSafeSizeOfArray(entity a)
BEGIN_EOLE.
bool variable_entities_may_conflict_p(entity e1, entity e2)
void set_entity_to_size()
int NumberOfDimension(entity e)
void reset_entity_to_size()
bool SizeOfArray(entity e, int *s)
This function computes the total size of a variable in bytes, ie.
Value ValueSizeOfArray(entity e)
Value ValueNumberOfElements(list ld)
int dimension_size(dimension d)
this function computes the size of a dimension.
int type_memory_size(type t)
int SizeOfIthDimension(entity e, int i)
this function returns the size of the ith dimension of a variable e.
The structure used to build lists in NewGen.