29 #include "pips_config.h"
41 #include "resources.h"
102 if(nb_dimensions - nb_indices == new_formal_dimensions)
105 for(
size_t i=1;i<nb_indices;i++)
POP(*iter);
128 "try using inlining if possible\n");
189 if(
ENDP(flagged_statements)) {
206 if(strstr( str_pragma , inserted_pragma ))
224 if(strstr( str_pragma , inserted_pragma ))
247 debug_on(
"STATEMENT_INSERTION_DEBUG_LEVEL");
404 debug_on(
"ARRAY_EXPANSION_DEBUG_LEVEL");
dimension make_dimension(expression a1, expression a2, list a3)
static const char * caller_name
void transformer_free(transformer t)
struct _newgen_struct_statement_ * statement
#define CONTRAINTE_UNDEFINED_P(c)
void constraints_for_bounds(Variable, Pcontrainte *, Pcontrainte *, Pcontrainte *)
void constraints_for_bounds(var, pinit, plower, pupper) Variable var; Pcontrainte *pinit,...
expression constraints_to_loop_bound(Pcontrainte, Variable, bool, entity)
expression constraints_to_loop_bound(c, var, is_lower)
int dummy
A dummy file, to prevent empty libraries from breaking builds.
#define region_any_reference(reg)
To be avoided.
#define region_system(reg)
Psysteme entity_declaration_sc(entity)
bool out_regions(const string)
effects load_proper_rw_effects(statement)
void reset_proper_rw_effects(void)
void set_proper_rw_effects(statement_effects)
void set_cumulated_rw_effects(statement_effects)
list load_cumulated_rw_effects_list(statement)
void reset_cumulated_rw_effects(void)
#define effects_effects(x)
bool empty_string_p(const char *s)
const char * module_name(const char *s)
Return the module part of an entity name.
char * get_string_property(const char *)
#define gen_context_recurse(start, ctxt, domain_number, flt, rwt)
void gen_full_free_list(list l)
void reset_current_module_entity(void)
Reset the current module entity.
void reset_current_module_statement(void)
Reset the current module statement.
const char * get_current_module_name(void)
Get the name of the current module.
statement set_current_module_statement(statement)
Set the current module statement.
statement get_current_module_statement(void)
Get the current module statement.
entity set_current_module_entity(entity)
static.c
entity get_current_module_entity(void)
Get the entity of the current module.
void gen_recurse_stop(void *obj)
Tells the recursion not to go in this object.
void gen_context_multi_recurse(void *o, void *context,...)
Multi-recursion with context function visitor.
bool gen_true2(__attribute__((unused)) gen_chunk *u1, __attribute__((unused)) void *u2)
#define ENDP(l)
Test if a list is empty.
list gen_nreverse(list cp)
reverse a list in place
#define POP(l)
Modify a list pointer to point on the next element of the list.
#define NIL
The empty list (nil in Lisp)
#define VOLATILE_FOREACH(_fe_CASTER, _fe_item, _fe_list)
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)
void gen_free_list(list l)
free the spine of the list
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
gen_chunk gen_nth(int n, const list l)
to be used as ENTITY(gen_nth(3, l))...
list gen_full_copy_list(list l)
Copy a list structure with element copy.
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
#define DB_PUT_MEMORY_RESOURCE(res_name, own_name, res_val)
conform to old interface.
list find_statements_with_pragma(statement, const char *)
Get a list of statements with pragma begining with a prefix.
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.
void * hash_del(hash_table htp, const void *key)
this function removes from the hash table pointed to by htp the couple whose key is equal to key.
static statement expanded
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_user_warning
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
Pbase list_to_base(list l)
Pbase list_to_base(list l): returns the Pbase that contains the variables of list "l",...
#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_FOREACH(key_type, k, value_type, v, ht)
#define HASH_DEFAULT_SIZE
set set_assign_list(set, const list)
assigns a list contents to a set all duplicated elements are lost
bool set_belong_p(const set, const void *)
set set_make(set_type)
Create an empty set of any type but hash_private.
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Psysteme sc_rectangular_hull(Psysteme, Pbase)
take the rectangular bounding box of the systeme sc, by projecting each constraint of the systeme aga...
Psysteme sc_cute_convex_hull(Psysteme, Psysteme)
returns s1 v s2.
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
#define statement_block_p(stat)
#define entity_declarations(e)
MISC: newgen shorthands.
#define DIVIDE_OPERATOR_NAME
#define module_functional_parameters(func)
bool entity_in_list_p(entity ent, list ent_l)
look for ent in ent_l
bool array_entity_p(entity e)
bool same_entity_p(entity e1, entity e2)
predicates on entities
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
list expressions_to_entities(list expressions)
map expression_to_entity on expressions
bool expression_reference_p(expression e)
Test if an expression is a reference.
reference expression_reference(expression e)
Short cut, meaningful only if expression_reference_p(e) holds.
bool formal_parameter_p(entity)
#define dummy_identifier(x)
struct _newgen_struct_callees_ * callees
#define parameter_dummy(x)
#define callees_callees(x)
#define reference_variable(x)
#define pragma_string_p(x)
#define entity_storage(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define call_domain
newgen_callees_domain_defined
#define storage_formal(x)
#define EXPRESSION(x)
EXPRESSION.
#define extension_pragma(x)
#define EXTENSION(x)
EXTENSION.
#define transformer_relation(x)
#define PARAMETER(x)
PARAMETER.
#define reference_indices(x)
#define statement_extensions(x)
#define variable_dimensions(x)
#define statement_declarations(x)
#define extensions_extension(x)
#define call_arguments(x)
#define statement_undefined_p(x)
#define value_expression_p(x)
#define dummy_identifier_p(x)
#define predicate_system(x)
#define statement_undefined
#define STATEMENT(x)
STATEMENT.
#define entity_initial(x)
void sc_rm(Psysteme ps)
void sc_rm(Psysteme ps): liberation de l'espace memoire occupe par le systeme de contraintes ps;
Psysteme sc_safe_append(Psysteme s1, Psysteme s2)
Psysteme sc_safe_append(Psysteme s1, Psysteme s2) input : output : calcul de l'intersection des polye...
void simplify_minmax_expression(expression e, transformer tr)
tries hard to simplify expression e if it is a min or a max operator, by evaluating it under precondi...
void module_to_value_mappings(entity m)
void module_to_value_mappings(entity m): build hash tables between variables and values (old,...
transformer load_statement_precondition(statement)
void reset_precondition_map(void)
void set_precondition_map(statement_mapping)
static void entity_to_declaring_statement_aux(statement s, entity_to_declaring_statement_t *param)
static bool do_statement_insertion(statement s)
bool statement_insertion(const char *module_name)
statement_insertion.c
static void statement_insertion_fix_access(list regions)
fixes statement declaration depending on region access
static void find_calls_to_function_walker_in_declaration(statement s, entity_list_pair *p)
static void do_array_expansion_aux(statement s, hash_table expanded)
static list find_calls_to_function(statement in, entity to)
returns a list of call to to found in in
static statement entity_to_declaring_statement(entity e, statement top)
returns the statement block declaring entity e among all thoses in top assumes the entity is declared...
bool array_expansion(const char *module_name)
static void statement_insertion_fix_access_in_callers(const char *module_name, entity new_formal)
tries hard to propagate entity dimension change
static bool do_array_expansion(statement s, hash_table expanded)
static void find_calls_to_function_walker(call c, entity_list_pair *p)
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
FI: I do not understand why the type is duplicated at the set level.
The structure used to build lists in NewGen.