25 #include "pips_config.h"
61 for(cdep = dep; !
ENDP(cdep);
POP(cdep)) {
76 "Variable \"%s\" depends on parameter \"%s\""
77 " but is, at least partly, declared first.\n",
81 "Variable \"%s\" depends on variable \"%s\" "
82 "but is, at least partly, declared first.\n",
87 "depends on variable \"%s\" but is declared first.\n",
135 (void)
fprintf(fd,
"\nLayout for memory area \"%s\" of size %td: \n",
140 (void)
fprintf(fd,
"\t* empty area *\n\n");
146 user_warning(
"print_common_layout",
"Non-empty area %s should have a final size greater than 0\n",
167 "\tDynamic Variable %s, \toffset = UNKNOWN, \tsize = DYNAMIC\n",
173 "\tExternal Variable %s,\toffset = UNKNOWN,\tsize = %d\n",
178 "\tVariable %s,\toffset = %td,\tsize = %d\n",
196 if(!
ENDP(equiv_members)){
199 if(!
ENDP(equiv_members)) {
202 (void)
fprintf(fd,
"\tVariables aliased to this common:\n");
211 "\tVariable %s,\toffset = %td,\tsize = %d\n",
235 pips_assert(
"Argument type is variable or varags:variable or functional or void",
309 (void)
fprintf(fd,
"\nDeclarations for module %s with type ",
323 "* empty declaration list *\n\n":
"Variable list:\n\n");
350 "* empty external declaration list *\n\n":
"External variable list:\n\n");
382 (void)
fprintf(fd,
"\nLayouts for formal parameters:\n\n");
385 "\tVariable %s,\toffset = %td\n",
401 "\nLayout for return variable:\n\n"
402 "\tVariable %s,\tsize = %d\n",
entity_name(rv), asize);
407 (void)
fprintf(fd,
"\nLayouts for areas (commons):\n\n");
420 (void)
fprintf(fd,
"End of declarations for module %s\n\n",
455 "split from its declaration because \"%s\" "
456 "is a static variable.\n",
543 if ( strcmp(mn,cmn) == 0
595 pips_assert(
"Argument type is variable or varags:variable or functional or void",
613 for (
int i = 0; i < ndims; i++)
float a2sf[2] __attribute__((aligned(16)))
USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.
value make_value_unknown(void)
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 ...
cons * arguments_difference(cons *a1, cons *a2)
set difference: a1 - a2 ; similar to set intersection
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
const char * get_current_module_name(void)
Get the name of the current module.
entity get_current_module_entity(void)
Get the entity of the current module.
#define ENDP(l)
Test if a list is empty.
list gen_nreverse(list cp)
reverse a list in place
int gen_position(const void *item, const list l)
Element ranks are strictly positive as for first, second, and so on.
#define POP(l)
Modify a list pointer to point on the next element of the list.
void gen_remove_once(list *pl, const void *o)
Remove the first occurence of o in list pl:
#define NIL
The empty list (nil in Lisp)
list gen_copy_seq(list l)
Copy a list structure.
size_t gen_length(const list l)
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
#define CAR(pcons)
Get the value of the first element of a list.
void gen_free_list(list l)
free the spine of the list
list gen_last(list l)
Return the last 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.
#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)
void gen_sort_list(list l, gen_cmp_func_t compare)
Sorts a list of gen_chunks in place, to avoid allocations...
list statement_block(statement)
Get the list of block statements of a statement sequence.
statement make_assign_statement(expression, expression)
bool declaration_statement_p(statement)
Had to be optimized according to Beatrice Creusillet.
#define pips_user_warning
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
#define user_warning(fn,...)
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define same_string_p(s1, s2)
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...
int(* gen_cmp_func_t)(const void *, const void *)
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
string basic_to_string(basic)
#define statement_block_p(stat)
#define entity_symbolic_p(e)
#define DYNAMIC_RAM_OFFSET
FI: I would have assumed that it is used for the stack area, but I must be wrong.....
#define UNDEFINED_RAM_OFFSET
#define instruction_block(i)
void print_common_layout(FILE *fd, entity c, bool debug_p)
void dump_functional(functional f, string_buffer result)
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....
void check_fortran_declaration_dependencies(list ldecl)
Regeneration of declarations from the symbol table.
void print_C_common_layout(FILE *fd, entity c, bool debug_p)
void fprint_any_environment(FILE *fd, entity m, bool is_fortran)
void fprint_functional(FILE *fd, functional f)
This function is called from c_parse() via ResetCurrentModule() and fprint_environment()
void fprint_environment(FILE *fd, entity m)
void split_initializations_in_statement(statement s)
Transform a declaration with an initialization statement into 2 parts, a declaration statement and an...
void fprint_C_environment(FILE *fd, entity m)
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
int compare_entities(const entity *pe1, const entity *pe2)
Comparison function for qsort.
bool entity_array_p(entity e)
Is e a variable with an array type?
void sort_list_of_entities(list l)
sorted in place.
const char * module_local_name(entity e)
Returns the module local user name.
list entity_qualifiers(entity e)
return the qualifiers associated to entity e if it's a variable NIL otherwise
bool entity_module_p(entity e)
const char * entity_module_name(entity e)
See comments about module_name().
bool expression_is_C_rhs_p(expression exp)
Not all expressions can be used as right-hand side (rhs) in C assignments.
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
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
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
bool SizeOfArray(entity, int *)
This function computes the total size of a variable in bytes, ie.
bool entity_static_variable_p(entity)
return true if the entity is declared with the keyword static
bool entity_scalar_p(entity)
The concrete type of e is a scalar type.
type entity_basic_concrete_type(entity)
retrieves or computes and then returns the basic concrete type of an entity
expression variable_initial_expression(entity)
Returns a copy of the initial (i.e.
bool struct_type_p(type)
Returns true if t is of type derived and if the derived type is a struct.
list fortran_type_supporting_entities(list, type)
string type_to_string(const type)
type.c
#define type_functional_p(x)
#define qualifier_const_p(x)
#define functional_result(x)
#define storage_formal_p(x)
#define parameter_type(x)
#define type_unknown_p(x)
#define QUALIFIER(x)
QUALIFIER.
#define type_functional(x)
#define value_unknown_p(x)
#define basic_pointer_p(x)
#define entity_storage(x)
#define code_declarations(x)
#define storage_formal(x)
#define entity_undefined_p(x)
#define value_symbolic_p(x)
#define functional_parameters(x)
#define PARAMETER(x)
PARAMETER.
#define variable_qualifiers(x)
#define expression_undefined_p(x)
#define type_varargs_p(x)
#define variable_dimensions(x)
#define statement_declarations(x)
#define statement_instruction(x)
#define storage_return_p(x)
#define type_variable_p(x)
#define storage_undefined_p(x)
#define variable_basic(x)
#define STATEMENT(x)
STATEMENT.
#define entity_initial(x)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
internally defined structure.
The structure used to build lists in NewGen.