PIPS
|
#include <stdio.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "ri-util.h"
#include "constants.h"
#include "misc.h"
#include "vecteur.h"
#include "contrainte.h"
#include "sc.h"
Go to the source code of this file.
Functions | |
void | bound_distribution (Psysteme *pps, Pbase index_base, sc_info, int nb_loop, Psysteme *sc_neg, Psysteme *sc_pos, Psysteme sc_test) |
Distribution of the constraints of the system ps in three systems. More... | |
void | constraint_distribution (Psysteme sc, Psysteme *bound_systems, Pbase index_base, int sc_info[][4]) |
Distribution of the constraints of the system sc into several systems. More... | |
void | egalite_distribution (Psysteme sc, Psysteme *bound_systems, Pbase index_base) |
void bound_distribution | ( | Psysteme * | pps, |
Pbase | index_base, | ||
sc_info | , | ||
int | nb_loop, | ||
Psysteme * | sc_neg, | ||
Psysteme* | sc_pos, | ||
Psysteme | sc_test | ||
) |
Distribution of the constraints of the system ps in three systems.
System ps contains only contraints having to be used to generate bound expressions for the index of rank "rank". sc_neg contains the constraints corresponding to lower bounds for the variable of rank "rank". sc_pos contains the constraints corresponding to upper bounds for the variable of rank "rank". sc_test contains the constraints having to be added in the guard
This condition is true if the variable must be kept like loop index. Then all the constraints are kept in the system (and not in the system of guards)
This condition is true when the constraint constrains directly the variable
This condition is true when the variable of rank "higher_rank" could be eliminated from the two constraints ineq and ineq->succ in order to obtain a new constraint on the variable "var"
the two constraints ineq and ineq->succ are added to the end of the system
If some constraints are in the system constraining a variable which must not be kept as loop index, these constraints are put in guards
Definition at line 58 of file constraint_distribution.c.
References constraint_integer_combination(), CONTRAINTE_UNDEFINED_P, debug(), debug_off, debug_on, entity_local_name(), fprintf(), ifdebug, insert_2ineq_end_sc(), insert_ineq_begin_sc(), rank, sc_fprint(), sc_init_with_sc(), search_higher_rank(), Scontrainte::succ, variable_of_rank(), vect_coeff(), and Scontrainte::vecteur.
Referenced by bound_generation().
void constraint_distribution | ( | Psysteme | sc, |
Psysteme * | bound_systems, | ||
Pbase | index_base, | ||
int | sc_info[][4] | ||
) |
Distribution of the constraints of the system sc into several systems.
System sc contains all the contraints having to be used to generate bound expressions for all loop indices.
A new system is defined for each system variable. Each new system defines the set of constraints needed for the generation of loop bound expressions for one variable.
The constraint constraining directly a variable of rank "rank_hr" is added to the system corresponding to the variable "var_hr" except if this variable must not be kept (var_hr is not a loop index). In this last case, the constraint must be combined with another constraint in order to eliminate the variable "var_hr" and to deduce a constraint constrainnig another variable of rank "rank". In that case, the two constraints are added to the system corresponding to the variable "var = variable_of_rank(rank)"
This condition is true if the variable must be kept like loop index. All the constraints constraining directly the variable of rank "rank_hr" are kept in the system bound_systems[rank_hr]
this condition is true if the combination of the two constraints pc1 and pc2 is not redundant for the
system. Then the two constraints are added to the system of the variable of higher rank
sc | c |
bound_systems | ound_systems |
index_base | ndex_base |
sc_info | c_info |
Definition at line 164 of file constraint_distribution.c.
References bound_redund_with_sc_p(), CONTRAINTE_UNDEFINED_P, debug(), debug_off, debug_on, entity_local_name(), fprintf(), ifdebug, Ssysteme::inegalites, insert_ineq_end_sc(), rank, rank_of_variable(), sc_fprint(), sc_init_with_sc(), search_higher_rank(), search_var_of_higher_rank(), Scontrainte::succ, value_notzero_p, value_sign, variable_of_rank(), vect_coeff(), vect_size(), and Scontrainte::vecteur.
Referenced by movement_computation(), and parallel_tiling().
sc | c |
bound_systems | ound_systems |
index_base | ndex_base |
Definition at line 241 of file constraint_distribution.c.
References CONTRAINTE_UNDEFINED_P, debug(), debug_off, debug_on, Ssysteme::egalites, rank, search_higher_rank(), Scontrainte::succ, and Scontrainte::vecteur.