29 #include "pips_config.h"
39 #include "resources.h"
110 bool found_not_constant_constraint =
false;
116 bool phi_found_p =
false;
130 found_not_constant_constraint |=!phi_found_p;
132 if(!found_not_constant_constraint) {
142 found_not_constant_constraint=
false;
146 if(!found_not_constant_constraint)
272 list initializations_holder_seq =
NIL;
285 initializations_holder_seq);
306 initializations_holder_seq=
CONS(
STATEMENT,body,initializations_holder_seq);
instruction make_instruction_loop(loop _field_)
loop make_loop(entity a1, range a2, statement a3, entity a4, execution a5, list a6)
basic copy_basic(basic p)
BASIC.
basic make_basic_int(intptr_t _field_)
expression copy_expression(expression p)
EXPRESSION.
reference make_reference(entity a1, list a2)
dimension make_dimension(expression a1, expression a2, list a3)
execution make_execution_sequential(void)
void free_expression(expression p)
range dimension_to_range(dimension)
static reference ref
Current stmt (an integer)
#define contrainte_succ(c)
#define contrainte_vecteur(c)
passage au champ vecteur d'une contrainte "a la Newgen"
#define region_any_reference(reg)
To be avoided.
#define region_system(reg)
list regions_write_regions(list)
list regions_read_regions(list)
Ppolynome region_enumerate(effect)
void set_rw_effects(statement_effects)
list load_rw_effects_list(statement)
void reset_rw_effects(void)
const char * module_name(const char *s)
Return the module part of an entity name.
char * get_string_property(const char *)
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
#define gen_context_recurse(start, ctxt, domain_number, flt, rwt)
void gen_full_free_list(list l)
statement make_block_statement(list)
Make a block statement from a list of statement.
statement instruction_to_statement(instruction)
Build a statement from a give instruction.
static bool group_constant_range_filter(range r, set constants)
static void do_group_constant_entity(expression exp, set constants)
static bool do_grouping_filter_out_self(expression exp)
static void do_grouping_replace_reference_by_expression_walker(expression exp, grouping_context *ctxt)
static basic do_group_basics_maximum(list entities)
static grouping_layout get_grouping_layout()
static void do_group_statement_constant_prune(statement st, set s)
remove entities that are never referenced by st from s
static entity constant_holder
static void do_group_constants_terapix(statement in, set constants)
bool group_constants(const string module_name)
Dependences for accel-util.h.
static void do_group_constants(statement in, set constants)
static bool do_group_statement_constant_filter(range r, set constants)
remove entities involved in a range from the set of constants
static expression do_group_count_elements(list entities)
static void * do_group_basics_maximum_reduce(void *v, const list l)
static void * do_group_count_elements_reduce(void *v, const list l)
static void do_group_statement_constant(statement st, set constants)
gather all entities that are read and constant in statement s in the set of constant entities
static bool declaration_filter(call c)
Do not touch to the prettyprint control list.
static bool not_type_chunk_p(void *obj)
static bool do_grouping_filter_out_self2(expression e, _UNUSED_ void *ctx)
static void do_grouping_replace_reference_by_expression(void *in, entity old, entity new, expression offset)
void reset_current_module_entity(void)
Reset the current module entity.
void reset_current_module_statement(void)
Reset the current module statement.
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 replace_entity_by_expression_with_filter(void *s, entity ent, expression exp, bool(*filter)(expression))
void gen_context_multi_recurse(void *o, void *context,...)
Multi-recursion with context function visitor.
gen_chunk * gen_get_ancestor(int, const void *)
return the first ancestor object found of the given type.
void gen_null2(__attribute__((unused)) void *u1, __attribute__((unused)) void *u2)
idem with 2 args, to please overpeaky compiler checks
bool gen_false(__attribute__((unused)) gen_chunk *unused)
Return false and ignore the argument.
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
#define ENDP(l)
Test if a list is empty.
list gen_nreverse(list cp)
reverse a list in place
#define NIL
The empty list (nil in Lisp)
list gen_copy_seq(list l)
Copy a list structure.
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
#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
#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)
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.
statement make_assign_statement(expression, expression)
void insert_statement(statement, statement, bool)
This is the normal entry point.
statement find_statement_from_label_name(statement, const char *, const char *)
int vect_size(Pvecteur v)
package vecteur - reductions
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define same_string_p(s1, s2)
set set_intersection(set, const set, const set)
list set_to_sorted_list(const set, gen_cmp_func_t)
set set_difference(set, const set, const set)
bool set_belong_p(const set, const void *)
set set_make(set_type)
Create an empty set of any type but hash_private.
set set_add_element(set, const set, const void *)
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])
Ppolynome polynome_free(Ppolynome pp)
Ppolynome polynome_free(Ppolynome pp) frees space occupied by polynomial pp returns pp == POLYNOME_NU...
#define POLYNOME_UNDEFINED_P(pp)
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
#define make_expression_list(stats...)
#define MINUS_OPERATOR_NAME
#define PLUS_OPERATOR_NAME
#define DEFAULT_INTEGER_TYPE_SIZE
#define INSTANCE_OF(type, value)
polymorhism thanks to newgen !
#define ENTITY_CONTINUE_P(e)
#define entity_variable_p(e)
An entity_variable_p(e) may hide a typedef and hence a functional type.
#define entity_constant_p(e)
bool entity_not_constant_or_intrinsic_p(entity e)
Default entity filter for get_referenced_entities()
int compare_entities(const entity *pe1, const entity *pe2)
Comparison function for qsort.
bool same_entity_p(entity e1, entity e2)
predicates on entities
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...
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
entity entity_empty_label(void)
basic entity_basic(entity e)
return the basic associated to entity e if it's a function/variable/constant basic_undefined otherwis...
set get_referenced_entities(void *elem)
retrieves the set of entities used in elem beware that this entities may be formal parameters,...
bool expression_integer_value(expression e, intptr_t *pval)
expression reference_to_expression(reference r)
bool expression_call_p(expression e)
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
call expression_call(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)
================================================================
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.
expression reference_offset(reference ref)
computes the offset of a C reference with its origin
entity expression_to_entity(expression e)
just returns the entity of an expression, or entity_undefined
expression polynome_to_expression(Ppolynome pp)
converts a polynomial to expression
expression SizeOfDimensions(list)
computes the product of all dimensions in dims
void AddLocalEntityToDeclarations(entity, entity, statement)
Add the variable entity e to the list of variables of the function module.
bool entity_scalar_p(entity)
The concrete type of e is a scalar type.
entity make_new_array_variable_with_prefix(const char *, entity, basic, list)
J'ai ameliore la fonction make_new_scalar_variable_with_prefix
entity make_new_scalar_variable_with_prefix(const char *, entity, basic)
Create a new scalar variable of type b in the given module.
basic basic_maximum(basic, basic)
#define expression_domain
newgen_execution_domain_defined
#define reference_variable(x)
#define value_constant_p(x)
#define call_domain
newgen_callees_domain_defined
#define basic_overloaded_p(x)
#define basic_undefined_p(x)
#define EXPRESSION(x)
EXPRESSION.
#define reference_domain
newgen_range_domain_defined
#define value_symbolic_p(x)
#define reference_indices(x)
#define variable_dimensions(x)
#define statement_undefined_p(x)
#define range_domain
newgen_ram_domain_defined
#define STATEMENT(x)
STATEMENT.
#define entity_initial(x)
Psysteme sc_dup(Psysteme ps)
Psysteme sc_dup(Psysteme ps): should becomes a link.
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.
A gen_chunk is used to store every object.
#define exp
Avoid some warnings from "gcc -Wshadow".
#define VARIABLE_DEFINED_P(v)
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
void vect_rm(Pvecteur v)
void vect_rm(Pvecteur v): desallocation des couples de v;
Pvecteur vect_del_var(Pvecteur v_in, Variable var)
Pvecteur vect_del_var(Pvecteur v_in, Variable var): allocation d'un nouveau vecteur egal a la project...
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...