25 #include "pips_config.h"
70 #include "constants.h"
87 #define PHI_FIRST true
88 #define NOT_PHI_FIRST false
93 static entity beta[BETA_MAX];
111 pips_assert(
"BETA range (n) must be between 1 and BETA_MAX\n",
112 1<=n && n<=BETA_MAX);
147 for(i=beta_min; i<=beta_max; i++)
159 #ifndef bool_undefined
161 #define bool_undefined ((bool) (-15))
162 #define bool_undefined_p(b) ((b)==bool_undefined)
176 for(i=0; i<BETA_MAX; i++)
204 pips_assert(
"The copied region has the same persistent property as sthe input region",
414 if (SC_EMPTY_P(sc_reg))
494 bool arrays_only,
bool scalars_only,
498 pips_assert(
"not arrays_only and scalars_only", !(arrays_only && scalars_only));
510 if ((scalar_p && !arrays_only) || (!scalar_p && !scalars_only))
555 int level = nredund_p? 1: -1;
571 bool arrays_only,
bool scalars_only,
574 int level = nredund_p? 1: -1;
576 arrays_only, scalars_only,
640 pips_debug(7,
"Region on variable %s removed\n",
689 Pbase b = sc_base(sc_reg);
716 sc_base(sc_reg) = nb;
823 debug(8,
"",
"variables :\n");
827 pips_assert(
"sc_entities_cfc_variables", !SC_UNDEFINED_P(sc));
860 c_pred->
succ = c_suiv;
862 sc_egalites(sc) = c_suiv;
875 c = sc_inegalites(sc);
886 c_pred->
succ = c_suiv;
888 sc_inegalites(sc) = c_suiv;
902 sc_base(sc) = (
Pbase) NULL;
1076 for (dim = 1; dim <= d; dim++)
1077 regions_ref_inds =
gen_nconc(regions_ref_inds,
1129 for (dim = 1; dim<=d; dim ++)
1162 bool linear_p =
true;
1188 fprintf(stderr,
"(it's %s a pointer)\n", pointer_p?
"":
"not");
1189 pips_debug(3,
"effect type depth is %d\n", d);
1198 if (d>0 || pointer_p)
1206 pips_debug(8,
"pointer or array or struct case \n");
1208 pips_assert(
"The number of indices is less or equal to the possible "
1209 "effect type depth, unless we are dealing with a pointer.\n",
1226 for (dim = 1; dim <= max_phi; dim++) {
1249 for (idim = 1; ind !=
NIL; idim++, ind =
CDR(ind))
1253 bool dim_linear_p =
false;
1260 pips_debug(3,
"unbounded dimension PHI%d\n",idim);
1262 pips_debug(3,
"addition of equality :\nPHI%d - %s = 0\n",
1271 dim_linear_p =
false;
1274 dim_linear_p =
true;
1283 pips_debug(3,
"%slinear equation.\n", dim_linear_p?
"":
"non-");
1285 linear_p = linear_p && dim_linear_p;
1335 list regions_ref_inds =
NIL, ent_list_dim =
NIL;
1343 for (dim = 1; ent_list_dim !=
NIL; ent_list_dim =
CDR(ent_list_dim), dim++)
1344 regions_ref_inds =
gen_nconc(regions_ref_inds,
1372 bool linear_p =
true;
1383 fprintf(stderr,
"(it's %s a pointer)\n", pointer_p?
"":
"not");
1389 if (d>0 || pointer_p)
1397 pips_assert(
"The number of indices is less or equal to the type depth, "
1398 "unless we are dealing with a pointer",
1405 sc = make_whole_array_predicate(e);
1407 for (dim = 1; dim <= d; dim++)
1414 for (idim = 1; ind !=
NIL; idim++, ind =
CDR(ind))
1424 pips_debug(3,
"unbounded dimension PHI%d\n",idim);
1426 pips_debug(3,
"addition of equality :\nPHI%d - %s = 0\n",
1436 dim_linear_p =
false;
1444 pips_debug(3,
"%slinear equation.\n", dim_linear_p?
"":
"non-");
1446 linear_p = linear_p && dim_linear_p;
1481 make_whole_array_predicate(e));
1547 pips_debug(8,
"non linear expression : change approximation to may\n");
1593 pips_debug(8,
"non linear expression : change approximation to may\n");
1708 pips_debug(8,
"nb_phi1 = %d, nb_phi_2 = %d \n", nb_phi_1, nb_phi_2);
1712 for(i=1; i<= nb_phi_2; i++)
1731 for(i=nb_phi_2; i>=1; i--)
1785 pips_assert (
"n can't be more than a two digit number", n < 100);
1789 (void) sprintf(phi_name+3,
"%d",n);
1821 int n = sscanf(rn,
"%d", &
rank);
1833 for(i=phi_min; i<=phi_max; i++)
1924 pips_assert(
"inequality with respect to a range has no meaning",is_eg);
1933 bool must_p =
false;
1962 pips_assert(
"sc is defined", !SC_UNDEFINED_P(sc));
2066 "Side-effects in subscript expression \"%s\" should be avoided:\n", e);
2079 "Imprecise subscript expression \"%s\" should be avoided:\n", e);
2085 "No information derived from subscript expression \"%s\":\n", e);
2131 bool first =
true, phi_only =
true;
2148 if (first) first =
false;
2228 pips_assert (
"n can't be more than a two digit number", n < 100);
2232 (void) sprintf(psi_name+3,
"%d",n);
2255 for(i=psi_min; i<=psi_max; i++)
2323 pips_assert (
"n can't be more than a two digit number", n < 100);
2327 (void) sprintf(rho_name+3,
"%d",n);
2350 for(i=rho_min; i<=rho_max; i++)
2477 for(i = 1; i<= ndims; i++)
2506 for(i = 1; i<= ndims; i++)
2555 static bool exact_regions_property =
false;
2556 static bool must_regions_property =
false;
2557 static bool array_bounds_property =
false;
2558 static bool disjunct_property =
false;
2559 static bool op_statistics_property =
false;
2563 return exact_regions_property;
2568 return must_regions_property;
2573 return array_bounds_property;
2578 return disjunct_property;
2583 return op_statistics_property;
2604 exact_regions_property =
true;
2605 must_regions_property =
true;
2618 static void set_bases_for_compare(
Pbase sorted_base)
2620 Pbase b = sorted_base;
2621 base_for_compare = sorted_base;
2625 no_phi_base_for_compare = b;
2628 static void reset_bases_for_compare()
2637 static int compare_region_entities(
entity *pe1,
entity *pe2);
2641 return compare_region_constraints(pc1, pc2,
true);
2646 return compare_region_constraints(pc1, pc2,
false);
2660 debug_on(
"REGIONS_PRETTYPRINT_DEBUG_LEVEL");
2701 set_bases_for_compare(sorted_base);
2704 (c, sorted_base, equality_p?
2705 ((
int (*)()) compare_region_equalities):
2706 ((
int (*)()) compare_region_inequalities), NULL);
2707 reset_bases_for_compare();
2740 v1 = (*pc1)->vecteur,
2741 v2 = (*pc2)->vecteur;
2750 if (nb_phi_1 != nb_phi_2)
2753 if ((nb_phi_1 == 0) || (nb_phi_2 == 0))
2754 return( (nb_phi_1 ==0)? +1 : -1 );
2757 return( (nb_phi_1 > nb_phi_2)? +1 : -1);
2763 b = no_phi_base_for_compare;
2767 b = base_for_compare;
2768 for(; b!= no_phi_base_for_compare; b = b->
succ)
2788 for(passe = 1; passe <= 2; passe++)
2790 int positive_terms = 0, negative_terms = 0;
2792 v = (passe == 1) ? v1 : v2;
2804 if(negative_terms > positive_terms)
2807 if(negative_terms == positive_terms)
2864 static int compare_region_entities(
entity *pe1,
entity *pe2)
2866 int phi_1 =
false, phi_2 =
false,
2867 null_1 = (*pe1==(
entity)NULL),
2868 null_2 = (*pe2==(
entity)NULL);
2870 if (null_1 && null_2)
2876 if (null_1 && phi_2)
2879 if (null_2 && phi_1)
2882 if (null_1 || null_2)
2883 return(null_2-null_1);
2886 if (phi_1 - phi_2 == 0) {
2891 int result = strcmp(
s1,s2);
2899 return(phi_2 - phi_1);
2911 for (dim = 1; !
ENDP(ldim); dim++, ldim =
CDR(ldim))
2918 "addition of inequality :\n%s - PHI%d <= 0\n",
2926 "addition of inequality :\nPHI%d - %s <= 0\n",
2951 debug(8,
"",
"%s -> %s\n",
2977 debug(8,
"",
"%s -> %s\n",
2996 list ll_var_new = l_var_new;
3002 ll_var_new =
CDR(ll_var_new);
3079 user_error(
"same_common_array_p",
"not COMMON entities : %s or %s",
3087 if (offs1 == offs2) {
3089 basic basic1, basic2;
3108 if (nb_dims1 == nb_dims2) {
3110 for (count_dim = 1, equal =
true;
3111 (count_dim <= nb_dims1) && (equal); count_dim++) {
3116 if (size1 != size2) {
3179 pips_debug(3,
"undefined contexted found, returned as empty\n");
3191 return strdup(
"[region_to_string] no longer implemented\n");
3194 static bool max_one_phi_var_per_constraint(c)
3212 return max_one_phi_var_per_constraint(sc_egalites(syst)) &&
3213 max_one_phi_var_per_constraint(sc_inegalites(syst));
3254 &sc_inegalites(scd), &lower, &upper);
3255 bool constant_index_p =
3258 if(constant_index_p) {
3282 bool constant_path_head_p =
true;
3283 while(!
ENDP(iter) && constant_path_head_p ) {
3291 constant_path_head_p &= expression_is_a_constant_reference_p(e,
region_system(reg));
3295 if(constant_path_head_p) {
3301 constant_path_head_p &= expression_is_a_constant_reference_p(e,
region_system(reg));
3479 sc_base(r_sc)=sorted_base;
3485 const char * base_names [sc_dimension(r_sc)];
float a2sf[2] __attribute__((aligned(16)))
USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.
action copy_action(action p)
ACTION.
void free_effect(effect p)
bool effect_consistent_p(effect p)
approximation make_approximation(enum approximation_utype tag, void *val)
approximation make_approximation_may(void)
effect copy_effect(effect p)
EFFECT.
void free_transformer(transformer p)
transformer make_transformer(list a1, predicate a2)
expression make_expression(syntax a1, normalized a2)
subscript make_subscript(expression a1, list a2)
predicate make_predicate(Psysteme a1)
void free_reference(reference p)
storage make_storage(enum storage_utype tag, void *val)
expression copy_expression(expression p)
EXPRESSION.
reference make_reference(entity a1, list a2)
syntax copy_syntax(syntax p)
SYNTAX.
void free_expression(expression p)
void free_syntax(syntax p)
syntax make_syntax(enum syntax_utype tag, void *val)
syntax make_syntax_subscript(subscript _field_)
struct _newgen_struct_entity_ * entity
static reference ref
Current stmt (an integer)
bool entity_abstract_location_p(entity al)
#define value_minus(v1, v2)
#define VALUE_TO_INT(val)
void const char const char const int
#define value_zero_p(val)
Pbase base_add_variable(Pbase b, Variable var)
Pbase base_add_variable(Pbase b, Variable v): add variable v as a new dimension to basis b at the end...
bool base_contains_variable_p(Pbase b, Variable v)
bool base_contains_variable_p(Pbase b, Variable v): returns true if variable v is one of b's elements...
Pbase vect_add_variable(Pbase b, Variable v)
package vecteur - routines sur les bases
bool transformer_equations_constrain_variable_p(const transformer t, const entity v)
Is value v used with a non-zero coefficient by the equations of transformer t?
bool transformer_inequalities_constrain_variable_p(const transformer t, const entity v)
Is value v used with a non-zero coefficient by the inequalities of transformer t?
transformer transformer_identity()
Allocate an identity transformer.
void vect_debug(Pvecteur v)
constraint.c
void sc_syst_debug(Psysteme s)
constraint_to_text.c
#define CONTRAINTE_UNDEFINED_P(c)
#define contrainte_succ(c)
struct Scontrainte * Pcontrainte
Pcontrainte contrainte_make(Pvecteur pv)
Pcontrainte contrainte_make(Pvecteur pv): allocation et initialisation d'une contrainte avec un vecte...
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)
bool bounds_equal_p(Variable, Pcontrainte, Pcontrainte)
this function checks whether the lower and upper constraints are going to generate the same bound on ...
#define region_any_reference(reg)
To be avoided.
#define region_action(reg)
#define debug_region_consistency(reg)
#define region_system_(reg)
#define region_entity(reg)
#define region_system(reg)
#define region_empty_p(reg)
#define region_approximation_tag(reg)
#define make_region(reference, action, approximation, system)
#define region
simulation of the type region
#define region_scalar_p(reg)
list all_regions_sc_append(list, Psysteme, bool)
bool rho_region_p(effect)
list function_formal_parameters(entity)
void convex_region_change_ith_dimension_expression(effect, expression, int)
list region_to_may_region_list(effect)
list region_add_to_regions(effect, list)
entity make_phi_entity(int)
void all_regions_variable_rename(list, entity, entity)
list regions_write_regions(list)
effect make_reference_region(reference, action)
Psysteme sc_list_variables_rename(Psysteme, list, list)
list regions_sc_append_and_normalize(list, Psysteme, bool, bool, int)
void region_value_substitute(effect, entity, entity)
void get_in_out_regions_properties(void)
bool exact_regions_p(void)
list regions_read_regions(list)
bool must_regions_p(void)
bool empty_convex_context_p(transformer)
list rho_entities_list(int, int)
list variables_to_int_variables(list)
expression make_rho_expression(int)
Psysteme sc_loop_proper_precondition(loop)
void psi_to_phi_region(effect)
expression make_psi_expression(int)
bool rho_reference_p(reference)
bool disjunct_regions_p(void)
list region_to_list(effect)
list convex_effect_to_phi_entity_list(effect)
list phi_entities_list(int, int)
effect entity_whole_region(entity, action)
bool add_precondition_to_scalar_convex_regions
bool same_common_variables_p(entity, entity)
void region_sc_append_and_normalize(effect, Psysteme, int)
effect region_append(effect, effect)
list sc_entities_cfc_variables(Psysteme, list)
void convex_region_descriptor_remove_ith_dimension(effect, int)
reference make_pointed_regions_reference(entity, bool)
list region_to_store_independent_region_list(effect, bool)
bool array_bounds_p(void)
list region_phi_cfc_variables(effect)
Pcontrainte region_constraints_sort(Pcontrainte, Pbase, bool)
bool rectangular_must_region_p(entity, statement)
void phi_first_sort_base(Pbase *)
bool psi_region_p(effect)
list beta_entities_list(int, int)
void get_regions_properties(void)
bool sc_add_phi_equation(Psysteme *, expression, int, bool, bool)
effect reference_whole_region(reference, action)
list cell_reference_phi_cfc_variables(reference, Psysteme)
void phi_to_psi_region(effect)
void region_sc_append(effect, Psysteme, bool)
expression make_phi_expression(int)
reference make_regions_psi_reference(entity)
list psi_entities_list(int, int)
list regions_to_write_regions(list)
Psysteme region_sc_normalize(Psysteme, int)
Ppolynome region_enumerate(effect)
Ppolynome sc_enumerate(Psysteme, Pbase, const char *[])
sc_enumerate.c
list region_entities_cfc_variables(effect, list)
list regions_add_context(list, transformer)
void region_exact_projection_along_variable(effect, entity)
entity make_beta_entity(int)
utils.c
effect region_dup(effect)
expression region_reference_to_expression(reference)
Psysteme entity_declaration_sc(entity)
Psysteme cell_system_sc_append_and_normalize(Psysteme, Psysteme, int)
void array_regions_variable_rename(list, entity, entity)
string region_to_string(effect)
bool rectangular_region_p(effect)
list scalar_regions_sc_append(list, Psysteme, bool)
void region_exact_projection_along_parameters(effect, list)
effect convex_effect_field_to_rank_conversion(effect)
bool psi_reference_p(reference)
Pbase region_sorted_base_dup(effect)
void convex_region_add_expression_dimension(effect, expression)
list regions_sc_append(list, Psysteme, bool, bool, bool)
bool op_statistics_p(void)
reference make_regions_reference(entity)
list regions_to_nil_list(effect, effect)
effect region_rectangular_hull(effect, bool)
void region_sc_sort(Psysteme, Pbase)
char * func_entity_name(entity)
entity make_psi_entity(int)
int phi_entity_rank(entity)
list regions_add_region(list, effect)
void set_region_interprocedural_translation(void)
void reset_op_statistics(void)
entity make_rho_entity(int)
list array_regions_sc_append(list, Psysteme, bool)
list region_to_nil_list(effect)
void reset_region_interprocedural_translation(void)
list array_regions_sc_append_and_normalize(list, Psysteme, int)
list variables_to_old_variables(list)
list regions_remove_variables_regions(list, list)
bool effects_private_current_context_empty_p(void)
transformer effects_private_current_context_head(void)
bool effects_private_current_context_stack_initialized_p(void)
list load_statement_local_regions(statement)
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
#define effect_approximation_tag(eff)
#define variable_rho_p(e)
#define variable_psi_p(e)
#define variable_phi_p(e)
true if e is a phi variable PHI entities have a name like: REGIONS:PHI#, where # is a number.
tag approximation_and(tag, tag)
tag approximation_and(tag t1, tag t2) input : two approximation tags.
action make_action_write_memory(void)
To ease the extension of action with action_kind.
bool store_effect_p(effect)
#define cell_reference(x)
#define effect_undefined_p(x)
#define cell_reference_p(x)
#define approximation_exact_p(x)
#define action_write_p(x)
#define effect_approximation(x)
#define newgen_Psysteme(p)
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
void gen_full_free_list(list l)
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
#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
#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_find_eq(const void *item, const list seq)
list gen_append(list l1, const list l2)
#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)
int vect_size(Pvecteur v)
package vecteur - reductions
#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
#define user_error(fn,...)
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
#define MODULE_SEP_STRING
string concatenate(const char *,...)
Return the concatenation of the given strings.
void * gen_find_tabulated(const char *, int)
Ppolynome make_polynome(float coeff, Variable var, Value expo)
Ppolynome make_polynome(float coeff, Variable var, Value expo) PRIVATE allocates space for,...
Ppolynome polynome_mult(Ppolynome pp1, Ppolynome pp2)
Ppolynome polynome_mult(Ppolynome pp1, Ppolynome pp2) returns pp1 * pp2.
#define POLYNOME_UNDEFINED
string reference_to_string(reference r)
string expression_to_string(expression e)
#define MINUS_OPERATOR_NAME
#define PLUS_OPERATOR_NAME
#define NORMALIZE_EXPRESSION(e)
#define ENTITY_PRE_DECREMENT_P(e)
#define make_entity(n, t, s, i)
#define ENTITY_POST_DECREMENT_P(e)
#define FIELD_OPERATOR_NAME
#define ENTITY_POST_INCREMENT_P(e)
#define ENTITY_PRE_INCREMENT_P(e)
#define REGIONS_MODULE_NAME
Already defined.
#define DIVIDE_OPERATOR_NAME
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
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...
bool dummy_parameter_entity_p(entity p)
is p a dummy parameter?
code entity_code(entity e)
string entity_name_without_scope(entity e)
allocates a new string
bool entity_field_p(entity e)
e is the field of a structure
void print_entities(list l)
bool fortran_module_p(entity m)
Test if a module is in Fortran.
bool entity_module_p(entity e)
entity CreateIntrinsic(string name)
this function does not create an intrinsic function because they must all be created beforehand by th...
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
int entity_field_rank(entity f)
f is a field of a structure or of an union: what is its rank?
subscript expression_subscript(expression e)
expression reference_to_expression(reference r)
range expression_range(expression e)
bool expression_field_p(expression e)
The expression is of kind "s.a", where "s" is a struct and a "a" field.
bool expression_call_p(expression e)
bool expression_subscript_p(expression e)
bool field_expression_p(expression e)
The expression is of kind "a", where "a" is a field of some struct "s".
expression MakeBinaryCall(entity f, expression eg, expression ed)
Creates a call expression to a function with 2 arguments.
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.
Ppolynome expression_to_polynome(expression exp)
===========================================================================
bool unbounded_expression_p(expression e)
reference expression_reference(expression e)
Short cut, meaningful only if expression_reference_p(e) holds.
entity expression_variable(expression e)
bool expression_range_p(expression e)
entity expression_to_entity(expression e)
just returns the entity of an expression, or entity_undefined
expression syntax_to_expression(syntax s)
generates an expression from a syntax
int effect_type_depth(type)
Number of steps to access the lowest leave of type t.
bool entity_scalar_p(entity)
The concrete type of e is a scalar type.
int SizeOfIthDimension(entity, int)
this function returns the size of the ith dimension of a variable e.
type entity_basic_concrete_type(entity)
retrieves or computes and then returns the basic concrete type of an entity
bool pointer_type_p(type)
Check for scalar pointers.
size_t type_depth(type)
Number of steps to access the lowest leave of type t without dereferencing.
type make_scalar_integer_type(_int)
_int SizeOfElements(basic)
This function returns the length in bytes of the Fortran or C type represented by a basic,...
int NumberOfDimension(entity)
#define normalized_undefined
#define syntax_reference_p(x)
#define transformer_undefined
#define transformer_undefined_p(x)
#define storage_formal_p(x)
#define syntax_reference(x)
#define normalized_linear_p(x)
#define reference_variable(x)
#define dimension_lower(x)
#define entity_storage(x)
#define code_declarations(x)
#define EXPRESSION(x)
EXPRESSION.
#define subscript_indices(x)
#define expression_undefined
#define transformer_relation(x)
#define transformer_arguments(x)
#define dimension_upper(x)
#define reference_indices(x)
#define variable_dimensions(x)
#define predicate_system_(x)
#define call_arguments(x)
#define normalized_linear(x)
#define expression_syntax(x)
#define type_variable_p(x)
#define predicate_system(x)
#define entity_domain
newgen_syntax_domain_defined
#define variable_basic(x)
void sc_base_add_variable(Psysteme sc, Variable var)
Psysteme sc_variable_rename(Psysteme s, Variable v_old, Variable v_new)
Psysteme sc_variable_rename(Psysteme s, Variable v_old, Variable v_new): reecriture du systeme s remp...
bool sc_weak_consistent_p(Psysteme sc)
check that sc is well defined, that the numbers of equalities and inequalities are consistent with th...
bool sc_rn_p(Psysteme sc)
bool sc_rn_p(Psysteme sc): check if the set associated to sc is the whole space, rn
Psysteme sc_empty(Pbase b)
Psysteme sc_empty(Pbase b): build a Psysteme with one unfeasible constraint to define the empty subsp...
Psysteme sc_rn(Pbase b)
Psysteme sc_rn(Pbase b): build a Psysteme without constraints to define R^n, where n is b's dimension...
void sc_creer_base(Psysteme ps)
void sc_creer_base(Psysteme ps): initialisation des parametres dimension et base d'un systeme lineair...
void sc_fix(Psysteme s)
fix system s for coherency of the base and number of things.
void sc_rm(Psysteme ps)
void sc_rm(Psysteme ps): liberation de l'espace memoire occupe par le systeme de contraintes ps;
void sc_add_egalite(Psysteme p, Pcontrainte e)
void sc_add_egalite(Psysteme p, Pcontrainte e): macro ajoutant une egalite e a un systeme p; la base ...
Pbase sc_to_minimal_basis(Psysteme ps)
creation d'une base contenant toutes les variables apparaissant avec des coefficients non-nuls dans l...
Psysteme sc_new(void)
Psysteme sc_new(): alloue un systeme vide, initialise tous les champs avec des valeurs nulles,...
bool sc_empty_p(Psysteme sc)
bool sc_empty_p(Psysteme sc): check if the set associated to sc is the constant sc_empty or not.
void sc_add_inegalite(Psysteme p, Pcontrainte i)
void sc_add_inegalite(Psysteme p, Pcontrainte i): macro ajoutant une inegalite i a un systeme p; la b...
Psysteme sc_dup(Psysteme ps)
Psysteme sc_dup(Psysteme ps): should becomes a link.
Psysteme sc_copy(Psysteme ps)
Psysteme sc_copy(Psysteme ps): duplication d'un systeme (allocation et copie complete des champs sans...
Psysteme sc_safe_elim_redund(Psysteme ps)
Same as above, but the basis is preserved and sc_empty is returned is the system is not feasible.
Psysteme sc_safe_append(Psysteme s1, Psysteme s2)
Psysteme sc_safe_append(Psysteme s1, Psysteme s2) input : output : calcul de l'intersection des polye...
Psysteme sc_free(Psysteme in_ps)
Psysteme sc_free( in_ps ) AL 30/05/94 Free of in_ps.
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
Psysteme sc_normalize2(volatile Psysteme ps)
Psysteme sc_normalize2(Psysteme ps): normalisation d'un systeme d'equation et d'inequations lineaires...
Psysteme sc_strong_normalize3(Psysteme ps)
Psysteme sc_strong_normalize5(Psysteme ps, char *(*variable_name)(Variable))
Psysteme sc_strong_normalize4(Psysteme ps, char *(*variable_name)(Variable))
Psysteme sc_strong_normalize4(Psysteme ps, char * (*variable_name)(Variable))
Psysteme sc_strong_normalize2(volatile Psysteme ps)
Psysteme sc_strong_normalize2(Psysteme ps)
Psysteme sc_safe_normalize(Psysteme ps)
Psysteme sc_safe_normalize(Psysteme ps) output : ps, normalized.
Psysteme sc_normalize(Psysteme ps)
Psysteme sc_normalize(Psysteme ps): normalisation d'un systeme d'equation et d'inequations lineaires ...
Psysteme sc_strong_normalize(Psysteme ps)
Psysteme sc_strong_normalize(Psysteme ps)
Pcontrainte constraints_sort_with_compare(Pcontrainte c, Pbase sort_base, constraint_cmp_func_t compare, void *context)
void sc_vect_sort(Psysteme s, int(*compare)(Pvecteur *, Pvecteur *))
the name is self explanatory, I guess.
void vect_chg_sgn(Pvecteur v)
void vect_chg_sgn(Pvecteur v): multiplie v par -1
#define semantics_user_warning
transformer any_expression_to_transformer(entity v, expression expr, transformer pre, bool is_internal)
A set of functions to compute the transformer associated to an expression evaluated in a given contex...
transformer add_index_range_conditions(transformer pre, entity i, range r, transformer tfb)
bool value_mappings_compatible_vector_p(Pvecteur iv)
transform a vector based on variable entities into a vector based on new value entities when possible...
transformer load_statement_transformer(statement)
struct Scontrainte * succ
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.
#define sc_equal_p(ps1, ps2)
#define exp
Avoid some warnings from "gcc -Wshadow".
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
#define VECTEUR_NUL
DEFINITION DU VECTEUR NUL.
struct Svecteur * Pvecteur
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
#define base_dimension(b)
#define BASE_NULLE
MACROS SUR LES BASES.
Pbase vect_copy(Pvecteur b)
direct duplication.
Pvecteur vect_dup(Pvecteur v_in)
Pvecteur vect_dup(Pvecteur v_in): duplication du vecteur v_in; allocation de et copie dans v_out;.
Pbase base_dup(Pbase b)
Pbase base_dup(Pbase b) Note: this function changes the value of the pointer.
Pvecteur vect_new(Variable var, Value coeff)
Pvecteur vect_new(Variable var,Value coeff): allocation d'un vecteur colineaire au vecteur de base va...
void vect_rm(Pvecteur v)
void vect_rm(Pvecteur v): desallocation des couples de v;
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...
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...
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...
void vect_sort_in_place(Pvecteur *pv, int *compare)
void vect_sort_in_place(pv, compare) Pvecteur *pv; int (*compare)(Pvecteur *, Pvecteur *);
bool vect_contains_variable_p(Pvecteur v, Variable var)
bool vect_contains_variable_p(Pvecteur v, Variable var) BA 19/05/94 input : a vector and a variable o...
bool vect_common_variables_p(Pvecteur v1, Pvecteur v2)
bool vect_common_variables_p(Pvecteur v1, v2) BA 19/05/94 input : two vectors.