PIPS
|
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include "boolean.h"
#include "arithmetique.h"
#include "vecteur.h"
#include "contrainte.h"
Go to the source code of this file.
Functions | |
Pcontrainte | contrainte_new (void) |
package contrainte - allocations et desallocations More... | |
Pcontrainte | contrainte_make (Pvecteur pv) |
Pcontrainte contrainte_make(Pvecteur pv): allocation et initialisation d'une contrainte avec un vecteur passe en parametre. More... | |
Pcontrainte | contrainte_make_1D (Value a, Variable x, Value b, bool less_p) |
Generate a constraint a x <= b or a x >= b, according to less_p, or ax==b, regardless of less_p. More... | |
Pcontrainte | contraintes_make (Pvecteur pv,...) |
Convert a list of vectors into a list of constraints. More... | |
Pcontrainte | contrainte_dup (Pcontrainte c_in) |
Pcontrainte contrainte_dup(Pcontrainte c_in): allocation d'une contrainte c_out prenant la valeur de la contrainte c_in (i.e. More... | |
Pcontrainte | contraintes_dup (Pcontrainte c_in) |
Pcontrainte contraintes_dup(Pcontrainte c_in) a list of constraints is copied. More... | |
Pcontrainte | contrainte_free (Pcontrainte c) |
Pcontrainte contrainte_free(Pcontrainte c): liberation de l'espace memoire alloue a la contrainte c ainsi que de ses champs vecteur et saturations; seul le lien vers la contrainte suivante est ignore. More... | |
Pcontrainte | contraintes_free (Pcontrainte pc) |
Pcontrainte contraintes_free(Pcontrainte pc): desallocation de toutes les contraintes de la liste pc. More... | |
void | dbg_contrainte_rm (Pcontrainte c, char *f) |
void dbg_contrainte_rm(Pcontrainte c): version debug de contrainte rm; trace de la desallocation et impression de la contrainte sur stdout More... | |
Pcontrainte | contrainte_copy (Pcontrainte c_in) |
Have a look at contrainte_dup and contraintes_dup which reverse the order of the list This copy version (including vect_copy, sc_copy) maintains the order (DN,24/6/02) More... | |
Pcontrainte | contraintes_copy (Pcontrainte c_in) |
Pcontrainte contraintes_copy(Pcontrainte c_in) a list of constraints is copied with the same order In fact, here we only need to replace contrainte_dup by contrainte_copy Have a look at contrainte_copy (DN,24/6/02) More... | |
Pcontrainte contrainte_copy | ( | Pcontrainte | c_in | ) |
Have a look at contrainte_dup and contraintes_dup which reverse the order of the list This copy version (including vect_copy, sc_copy) maintains the order (DN,24/6/02)
c_in | _in |
Definition at line 254 of file alloc.c.
References c_in, c_out, contrainte_new(), and vect_copy().
Referenced by bound_redund_with_sc_p(), build_integer_sc_nredund(), build_sc_nredund_1pass_ofl_ctrl(), contraintes_copy(), eq_redund_with_sc_p(), extract_nredund_subsystem(), ineq_redund_with_sc_p(), sc_append(), sc_safe_append(), sc_strong_normalize2(), sc_strong_normalize_and_check_feasibility(), and sc_strong_normalize_and_check_feasibility2().
Pcontrainte contrainte_dup | ( | Pcontrainte | c_in | ) |
Pcontrainte contrainte_dup(Pcontrainte c_in): allocation d'une contrainte c_out prenant la valeur de la contrainte c_in (i.e.
duplication d'une contrainte); les tableaux de saturations ne sont pas recopies car on n'en connait pas la dimension. Le lien vers le successeur est aussi ignore pour ne pas cree de sharing intempestif.
allocate c_out; c_out := c_in; return c_out;
Ancien nom: eq_dup() et cp_eq()
c_in | _in |
Definition at line 132 of file alloc.c.
References c_in, c_out, contrainte_new(), and vect_dup().
Referenced by build_transfer_equations(), contrainte_dup_extract(), contraintes_dup(), dj_simple_inegs_to_eg(), elim_redund_sc_with_sc(), find_implicit_equation(), find_motif(), get_bounds_expression(), insert_2ineq_end_sc(), insert_ineq_begin_sc(), insert_ineq_end_sc(), make_bounds(), make_tile_constraints(), mapping_on_broadcast(), sc_minmax_of_variable2(), sc_supress_parallel_redund_constraints(), sc_supress_same_constraints(), sc_transform_eg_in_ineg(), sc_transform_ineg_in_eg(), separate_variables(), separate_variables_2(), test_bound_generation(), tile_membership(), and valuer().
Pcontrainte contrainte_free | ( | Pcontrainte | c | ) |
Pcontrainte contrainte_free(Pcontrainte c): liberation de l'espace memoire alloue a la contrainte c ainsi que de ses champs vecteur et saturations; seul le lien vers la contrainte suivante est ignore.
Utilisation standard: c = contrainte_free(c);
Autre utilisation possible: (void) contrainte_free(c); c = NULL;
comme toujours, les champs pointeurs sont remis a NULL avant la desallocation pour detecter au plus tot les erreurs dues a l'allocation dynamique de memoire.
Modification:
Definition at line 184 of file alloc.c.
References CONTRAINTE_UNDEFINED, CONTRAINTE_UNDEFINED_P, Scontrainte::eq_sat, free(), Scontrainte::r_sat, Scontrainte::s_sat, Scontrainte::succ, vect_rm(), Scontrainte::vecteur, and VECTEUR_UNDEFINED.
Referenced by combiner_ofl_with_test(), contrainte_remove_large_coef(), contraintes_free(), dj_simple_inegs_to_eg(), eq_redund_with_sc_p(), extract_common_constraints(), loop_executed_approximation(), pa_path_to_few_disjunct_ofl_ctrl(), region_sc_minimal(), sc_elim_empty_constraints(), sc_elim_redund_with_first_ofl_ctrl(), sc_force_variable_to_zero(), sc_rm_empty_constraints(), sc_supress_same_constraints(), and top_down_abc_dimension().
Pcontrainte contrainte_make | ( | Pvecteur | pv | ) |
Pcontrainte contrainte_make(Pvecteur pv): allocation et initialisation d'une contrainte avec un vecteur passe en parametre.
Modifications:
pv | v |
Definition at line 73 of file alloc.c.
References contrainte_new(), and contrainte_vecteur.
Referenced by __attribute__(), add_equivalence_equality(), adg_dataflowgraph(), adg_dataflowgraph_with_extremities(), adg_get_conjonctions(), adg_get_predicate_of_loops(), adg_max_of_leaves(), adg_suppress_2nd_in_1st_ps(), affine_to_transformer(), base_complete(), broadcast_conditions(), broadcast_dimensions(), broadcast_of_dataflow(), build_convex_constraints_from_vertices(), build_list_of_min(), build_sc_machine(), build_sc_with_several_uniform_ref(), c_convex_effects_on_actual_parameter_forward_translation(), check_range_wrt_precondition(), comp_exec_domain(), completer_base(), completer_n_base(), compose_vvs(), compute_entity_to_declaration_constraints(), constraint_to_bound(), contrainte_make_1D(), converti_psysmin_psysmax(), dependence_cone_positive(), dependence_system_add_lci_and_di(), dj_simple_inegs_to_eg(), dj_system_complement(), do_solve_hardware_constraints_on_nb_proc(), efficient_sc_check_inequality_feasibility(), elim_var_with_eg(), expression_less_than_in_context(), expressions_to_predicate(), expressions_to_vectors(), find_implicit_equation(), find_intermediate_constraints(), find_intermediate_constraints_recursively(), find_motif(), find_pattern(), fortran_user_function_call_to_transformer(), free_guards(), full_linearization(), gcd_and_constant_dependence_test(), generate_system_for_equal_variables(), generate_work_sharing_system(), generic_equality_to_transformer(), generic_minmax_to_transformer(), hpfc_compute_align_constraints(), hpfc_compute_distribute_constraints(), hpfc_compute_entity_to_new_declaration(), hpfc_compute_unicity_constraints(), include_parameters_in_sc(), integer_divide_to_transformer(), integer_power_to_transformer(), integer_right_shift_to_transformer(), interlaced_basic_workchunk_regions_p(), local_tile_constraints(), logical_binary_function_to_transformer(), logical_constant_to_transformer(), loop_basic_workchunk_to_workchunk(), loop_bounds_to_tile_bounds(), loop_executed_approximation(), loop_index_domaine_to_contrainte(), loop_regions_normalize(), make_context_of_loop(), make_dual(), make_expression_equalities(), make_reindex(), make_scanning_over_one_tile(), matrix_to_system(), my_adg_expressions_to_predicate(), nullify_factors(), pa_path_to_few_disjunct_ofl_ctrl(), partial_broadcast_coefficients(), partial_linearization(), Pcontrainte_separate_on_vars(), plc_elim_var_with_eg(), polynome_to_contrainte(), polynome_to_sc(), prepare_reindexing(), processor_loop(), prototype_dimension(), put_variables_in_ordered_lists(), re_do_it(), relation_to_transformer(), sc_elim_double_constraints(), sc_empty(), sc_find_equalities(), sc_gen_read(), sc_image_computation(), sc_minmax_of_variables(), sc_multiply_constant_terms(), sc_of_constrs(), sc_supress_same_constraints(), separate_variables(), set_dimensions_of_local_variable_family(), simple_addition_to_transformer(), simple_affine_to_transformer(), simplify_minmax_contrainte(), small_positive_slope_reduce_coefficients_with_bounding_box(), stmt_bdt_directions(), suppress_sc_in_sc(), tile_change_of_basis(), tile_hyperplane_constraints(), tile_membership_constraints(), top_down_abc_dimension(), transformer_add_loop_index_initialization(), transformer_add_sign_information(), transformer_add_variable_incrementation(), transformer_constraint_add(), transformer_convex_hulls(), transformer_derivative_constraints(), transformer_derivative_fix_point(), transformer_equality_fix_point(), transformer_list_generic_transitive_closure(), translate_global_value(), valuer(), vvs_on_vvs(), and vvs_to_sc().
Pcontrainte contrainte_make_1D | ( | Value | a, |
Variable | x, | ||
Value | b, | ||
bool | less_p | ||
) |
Generate a constraint a x <= b or a x >= b, according to less_p, or ax==b, regardless of less_p.
Since equalities and inequalities are not distinguished, less_p is not relevant when equations are built.
less_p | ess_p |
Definition at line 86 of file alloc.c.
References contrainte_make(), value_uminus, vect_make_1D(), VECTEUR_UNDEFINED, and x.
Referenced by add_bounding_box_constraints().
Pcontrainte contrainte_new | ( | void | ) |
package contrainte - allocations et desallocations
CONTRAINTE.
INTLIBRARY Pcontrainte contrainte_new(): allocation et initialisation d'une contrainte vide
Anciens noms: init_eq(), creer_eq
= (Pcontrainte)MALLOC(sizeof (Scontrainte),CONTRAINTE, "contrainte_new");
Definition at line 47 of file alloc.c.
References Scontrainte::eq_sat, exit, fprintf(), malloc(), Scontrainte::r_sat, Scontrainte::s_sat, Scontrainte::succ, and Scontrainte::vecteur.
Referenced by adg_sc_dup(), contrainte_copy(), contrainte_dup(), contrainte_make(), contraintes_make(), creer_Psysteme(), inegalite_comb_ofl_ctrl(), make_tile_constraints(), mat_sys_conv(), matrices_to_constraints(), matrices_to_constraints_with_sym_cst(), matrices_to_contraintes_with_sym_cst(), matrices_to_loop_sc(), matrices_to_sc(), my_matrices_to_constraints_with_sym_cst(), my_matrices_to_constraints_with_sym_cst_2(), pu_matrices_to_contraintes(), sc_copy(), sc_dup1(), tile_membership(), and var_posit().
Pcontrainte contraintes_copy | ( | Pcontrainte | c_in | ) |
Pcontrainte contraintes_copy(Pcontrainte c_in) a list of constraints is copied with the same order In fact, here we only need to replace contrainte_dup by contrainte_copy Have a look at contrainte_copy (DN,24/6/02)
c_in | _in |
Definition at line 270 of file alloc.c.
References c_in, c_out, contrainte_copy(), and Scontrainte::succ.
Referenced by build_sc_nredund_1pass_ofl_ctrl().
Pcontrainte contraintes_dup | ( | Pcontrainte | c_in | ) |
Pcontrainte contraintes_dup(Pcontrainte c_in) a list of constraints is copied.
c_in | _in |
Definition at line 146 of file alloc.c.
References c_in, c_out, contrainte_dup(), and Scontrainte::succ.
Referenced by constraints_to_loop_bound(), and dj_simple_inegs_to_eg().
Pcontrainte contraintes_free | ( | Pcontrainte | pc | ) |
Pcontrainte contraintes_free(Pcontrainte pc): desallocation de toutes les contraintes de la liste pc.
chaque contrainte est detruite par un appel a contrainte_free.
Ancien nom: elim_tte_ineg()
pc | c |
Definition at line 226 of file alloc.c.
References contrainte_free(), CONTRAINTE_UNDEFINED, CONTRAINTE_UNDEFINED_P, and Scontrainte::succ.
Referenced by apply_abstract_effect_to_transformer(), combiner_ofl_with_test(), extract_lattice(), generic_minmax_to_transformer(), hpfc_broadcast_buffers(), hpfc_compute_lid(), make_rectangular_area(), reset_equivalence_equalities(), sc_resol_smith(), sc_rm(), sc_transform_eg_in_ineg(), smith_int(), systeme_to_loop_nest(), transformer_basic_fix_point(), transformer_pattern_fix_point(), and translate_to_module_frame().
Pcontrainte contraintes_make | ( | Pvecteur | pv, |
... | |||
) |
Convert a list of vectors into a list of constraints.
pv | v |
Definition at line 99 of file alloc.c.
References contrainte_new(), contrainte_succ, contrainte_vecteur, and VECTEUR_NUL.
Referenced by find_intermediate_constraints().
void dbg_contrainte_rm | ( | Pcontrainte | c, |
char * | f | ||
) |
void dbg_contrainte_rm(Pcontrainte c): version debug de contrainte rm; trace de la desallocation et impression de la contrainte sur stdout
rint_eq(c);
REE((char *)c,CONTRAINTE,f);
Definition at line 239 of file alloc.c.
References dbg_vect_rm(), f(), free(), printf(), and Scontrainte::vecteur.