25 #include "pips_config.h"
41 #include "constants.h"
59 int number_of_lower_bounds,loop_rank;
67 int higher_rank,nlb = 0;
69 bool reductible =
false;
72 debug(8,
"lower_bound_generation",
"begin\n");
74 if (number_of_lower_bounds>=1) {
82 if (higher_rank > loop_rank ) {
97 if (higher_rank <= loop_rank || reductible ) {
132 debug(8,
"lower_bound_generation",
"end\n");
148 int number_of_upper_bounds, loop_rank;
152 int higher_rank, nub = 0;
158 bool reductible =
false;
161 debug(8,
"upper_bound_generation",
"begin\n");
164 if (number_of_upper_bounds) {
172 if (higher_rank > loop_rank ) {
187 if (higher_rank <=loop_rank || reductible) {
221 debug(8,
"upper_bound_generation",
"end\n");
254 debug(8,
"test_bound_generation",
"begin\n");
308 if (debut) lexpr =expr;
317 debug(8,
"test_bound_generation",
"end\n");
333 Pbase loop_body_indices,
341 Psysteme ps,*sc_pos,*sc_neg,sc_test;
344 int n0_loop,i,first_loop;
345 int number_of_lower_bounds = 0;
346 int number_of_upper_bounds =0;
360 debug(8,
"bound_generation",
"begin\n");
370 sc_neg,sc_pos,sc_test);
386 (void)
fprintf(stderr,
"base des indices \n");
387 for (pv = index_base; pv!=NULL; pv=pv->
succ)
391 for (j=1; j<=3;j++) {
392 printf (
"%d,",sc_info[i][j]); }
397 first_loop = (bank_code) ? 2 : 1;
399 for (n0_loop =
vect_size(index_base); n0_loop >= first_loop; n0_loop --) {
403 ps = lsystem[n0_loop];
405 (void)
fprintf(stderr,
"LE SYSTEME est :\n");
408 number_of_lower_bounds = 0;
409 number_of_upper_bounds = 0;
419 sc_info[n0_loop][2]);
425 number_of_upper_bounds=sc_info[n0_loop][2];
426 number_of_lower_bounds=sc_info[n0_loop][3];
429 number_of_lower_bounds,
434 number_of_upper_bounds,
437 looprange =
make_range(lower_bound,upper_bound,
473 pips_debug(8,
"systeme pour la %d boucle \n",n0_loop);
474 (void)
sc_fprint(stderr, sc_neg[n0_loop],
476 (void)
sc_fprint(stderr, sc_pos[n0_loop],
488 debug(8,
"bound_generation",
"end\n");
execution make_execution(enum execution_utype tag, void *val)
loop make_loop(entity a1, range a2, statement a3, entity a4, execution a5, list a6)
test make_test(expression a1, statement a2, statement a3)
range make_range(expression a1, expression a2, expression a3)
#define VALUE_TO_INT(val)
#define value_uminus(val)
unary operators on values
#define value_notone_p(val)
#define value_notmone_p(val)
#define value_plus(v1, v2)
binary operators on values
int rank_of_variable(Pbase base, Variable var)
this function returns the rank of the variable var in the base 0 encodes TCST, but I do not know why,...
int search_higher_rank(Pvecteur vect, Pbase base)
int search_higher_rank(): this fonction returns the rank of the variable of higher rank in the vecteu...
expression complex_bound_computation(Psysteme __attribute__((unused)) sc, Pbase index_base, Pcontrainte ineq1, Pcontrainte ineq2, int rank)
Compute the complex bounds associated to the variable of higher rank, after the variable "el_var" of ...
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.
#define CONTRAINTE_UNDEFINED_P(c)
Pcontrainte contrainte_dup(Pcontrainte c_in)
Pcontrainte contrainte_dup(Pcontrainte c_in): allocation d'une contrainte c_out prenant la valeur de ...
statement make_block_statement(list)
Make a block statement from a list of statement.
#define NIL
The empty list (nil in Lisp)
#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.
statement make_continue_statement(entity)
float_t space[SIZE][SIZE]
int vect_size(Pvecteur v)
package vecteur - reductions
statement make_movements_loop_body_wp65(entity module, bool receive_code, entity ent, Pbase local_indices, Pbase var_id, Psysteme sc_neg, Psysteme sc_pos, Pbase index_base, int rank, int number_of_lower_bounds, int number_of_upper_bounds)
statement make_movements_loop_body_wp65(module,receive_code, ent,local_indices,var_id,...
void wp65_debug_print_text(entity m, statement s)
include "values.h"
statement make_datum_movement(entity module, bool receive_code, entity ent, Pbase local_indices, Pbase var_id)
statement make_datum_movement(module,receive_code,ent, local_indices,var_id)
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
expression test_bound_generation(Psysteme sc_test, Pbase index_base)
This function generates the expressions of the guard if it exists.
statement bound_generation(entity module, bool bank_code, bool receive_code, entity ent, Pbase loop_body_indices, Pbase var_id, Psysteme *lsystem, Pbase index_base, int n, int sc_info[][4])
Generation of the new loop nest characterizing the new domain.
expression lower_bound_generation(Psysteme sc_neg, Pbase index_base, int number_of_lower_bounds, int loop_rank)
This fonction generates the lower bounds of the "loop_rank"-th loop.
expression upper_bound_generation(Psysteme sc_pos, Pbase index_base, int number_of_upper_bounds, int loop_rank)
This fonction generates the upper bounds of the "loop_rank"-th loop.
expression make_div_expression(expression, cons *)
operation.c
expression make_op_expression(entity, cons *)
#define instruction_block_p(i)
#define loop_to_statement(l)
#define test_to_statement(t)
#define AND_OPERATOR_NAME
FI: intrinsics are defined at a third place after bootstrap and effects! I guess the name should be d...
#define instruction_block(i)
#define LESS_OR_EQUAL_OPERATOR_NAME
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...
entity local_name_to_top_level_entity(const char *n)
This function try to find a top-level entity from a local name.
entity entity_empty_label(void)
entity make_loop_label(int __attribute__((unused)) desired_number, entity module)
expression make_vecteur_expression(Pvecteur pv)
make expression for vector (Pvecteur)
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
#define EXPRESSION(x)
EXPRESSION.
#define expression_undefined
#define statement_instruction(x)
@ is_execution_sequential
#define statement_undefined
#define STATEMENT(x)
STATEMENT.
Psysteme sc_init_with_sc(Psysteme sc)
This function returns a new empty system which has been initialized with the same dimension and base ...
Variable variable_of_rank()
void sc_fprint(FILE *fp, Psysteme ps, get_variable_name_t nom_var)
void sc_fprint(FILE * f, Psysteme ps, char * (*nom_var)()): cette fonction imprime dans le fichier po...
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
void vect_chg_sgn(Pvecteur v)
void vect_chg_sgn(Pvecteur v): multiplie v par -1
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 TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
#define VECTEUR_NUL
DEFINITION DU VECTEUR NUL.
char *(* get_variable_name_t)(Variable)
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
Pvecteur vect_dup(Pvecteur v_in)
Pvecteur vect_dup(Pvecteur v_in): duplication du vecteur v_in; allocation de et copie dans v_out;.
Pvecteur vect_cl2(Value x1, Pvecteur v1, Value x2, Pvecteur v2)
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_chg_coeff(Pvecteur *ppv, Variable var, Value val)
void vect_chg_coeff(Pvecteur *ppv, Variable var, Value val): mise de la coordonnee var du vecteur *pp...