25 #include "pips_config.h"
63 #include "constants.h"
79 #include "resources.h"
83 #include "array_dfg.h"
84 #include "prgm_mapping.h"
86 #include "scheduling.h"
87 #include "reindexing.h"
105 for(lr = lrange; !
ENDP(lr);
POP(lr)) {
114 user_error(
"set_array_declaration",
"\n Increment diff de 1\n");
159 int lower_or_upper, array_or_loop;
198 for(llv = lvar, llr = lrange; (!
ENDP(llv)) && (!
ENDP(llr));
227 fprintf(stderr,
"Subs of %s by %s\n",
242 fprintf(stderr,
"SINGLE expression\n");
247 for(pc =
lvect; pc != NULL; pc = pc->succ) {
260 fprintf(stderr,
"MAX or MIN expression of %d args\n",
267 for(pc =
lvect; pc != NULL; pc = pc->succ) {
277 for(la = args; !
ENDP(la);
POP(la)) {
296 fprintf(stderr,
"Subs with %s gives:\n",
300 fprintf(stderr,
"\tlvect : \n");
314 "\nWe want a linear bound\n");
324 if(
lvect->succ == NULL)
330 for(pc =
lvect; pc != NULL; pc = pc->succ)
360 int lower_or_upper, array_or_loop;
367 fprintf(stderr,
"\nIN LOWER\n");
369 fprintf(stderr,
"\nIN UPPER\n");
372 if(SC_UNDEFINED_P(sc))
373 user_error(
"bound_compute",
"Undefined systeme\n");
375 for(inequ = sc->inegalites; inequ != NULL; inequ = inequ->
succ) {
378 lower_or_upper, array_or_loop);
426 fprintf(stderr,
"\n\tKind : %d", array_or_loop);
428 fprintf(stderr,
"List of vars : ");
430 fprintf(stderr,
"\nList of ranges :\n");
431 for(llr = lrange; !
ENDP(llr);
POP(llr)) {
437 if (SC_UNDEFINED_P(ps))
438 user_error(
"make_bounds",
"\nUndefined system\n");
444 cont = ps->inegalites;
445 while (cont != NULL) {
454 fprintf(stderr,
"\n LOWER ps\n");
456 fprintf(stderr,
"\n UPPER ps\n");
468 fprintf(stderr,
" Lower bound : %s\n",
470 fprintf(stderr,
" Upper bound : %s\n\n",
511 for (l = lt; l !=
NIL; l = l->
cdr)
523 while (cont != NULL) {
540 else if (sc_lower->
nb_ineq > 1) {
543 for (cont = sc_lower->
inegalites; cont != NULL; cont = cont->
succ) {
557 user_error(
"get_bounds_expression",
"\n No lower bound\n");
559 if (sc_upper->nb_ineq == 1) {
561 vect =
vect_dup((sc_upper->inegalites)->vecteur);
568 else if(sc_upper->nb_ineq > 1) {
571 for (cont = sc_upper->inegalites; cont != NULL; cont = cont->
succ) {
587 user_error(
"get_bounds_expression",
"\n No upper bound\n");
594 "\nNew lb and ub expressions :\n\tLB: %s\n\tUB: %s\n",
634 (*sp) = SC_UNDEFINED;
637 for (lp = lr; lp !=
NIL; lp = lp->
cdr) {
640 for (cont = ps->inegalites; cont != NULL; cont = cont->
succ) {
649 for (cont = ps->egalites; cont != NULL; cont = cont->
succ) {
670 fprintf(stderr,
"\nListe de psystemes construite :");
675 for (i = 1; i <= c; i++) {
676 lsys_aux = lsys_aux->
succ;
679 for (; lsys_aux != NULL; lsys_aux = lsys_aux->succ) {
680 ps_aux = lsys_aux->psys;
718 Psyslist lsys = NULL, lsys_aux, lsys_aux2;
724 (*sp) = SC_UNDEFINED;
726 for (lp = lr; lp !=
NIL; lp = lp->
cdr)
730 for (cont = ps->inegalites; cont != NULL; cont = cont->
succ)
744 fprintf(stderr,
"\nListe de psystemes construite 2:");
750 lsys_aux = lsys->
succ;
752 for (; lsys_aux != NULL; lsys_aux = lsys_aux->succ)
754 ps_aux = lsys_aux->psys;
769 lsys_aux = lsys->
succ;
771 for (i = 2; i <= c; i++)
773 lsys_aux = lsys_aux->
succ;
774 lsys_aux2 = lsys_aux2->
succ;
777 for (; lsys_aux != NULL; lsys_aux = lsys_aux->succ)
779 ps_aux = lsys_aux->psys;
794 fprintf(stderr,
"\nListe de psystemes construite en final 2:");
call make_call(entity a1, list a2)
expression make_expression(syntax a1, normalized a2)
dimension make_dimension(expression a1, expression a2, list a3)
syntax make_syntax(enum syntax_utype tag, void *val)
range make_range(expression a1, expression a2, expression a3)
#define value_sign(v)
trian operators on values
#define value_absolute(ref)
#define value_notzero_p(val)
#define value_posz_p(val)
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...
range make_bounds(Psysteme ps, entity ent, int array_or_loop, list lvar, list lrange)
=====================================================================
void set_array_declaration(entity var_to_decl, list lrange)
Name : bounds.c Package : reindexing Author : Alexis Platonoff Date : March 1995 Historic :
void get_bounds_expression(Psyslist sys, list lt, list *lb, list *ub)
=====================================================================
expression constraint_to_bound(Pcontrainte pc, entity ent, list lvar, list lrange, int lower_or_upper, int array_or_loop)
===================================================================
Psyslist separate_variables(Psysteme ps, list l, Psysteme *sp, int c)
========================================================================
Psyslist separate_variables_2(Psysteme ps, list l, Psysteme *sp, int c)
========================================================================
expression bound_compute(Psysteme sc, entity ent, list lvar, list lrange, int lower_or_upper, int array_or_loop)
===================================================================
Pcontrainte contrainte_make(Pvecteur pv)
Pcontrainte contrainte_make(Pvecteur pv): allocation et initialisation d'une contrainte avec un vecte...
Pcontrainte contrainte_dup(Pcontrainte c_in)
Pcontrainte contrainte_dup(Pcontrainte c_in): allocation d'une contrainte c_out prenant la valeur de ...
#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.
#define NIL
The empty list (nil in Lisp)
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.
#define CDR(pcons)
Get the list less its first element.
void fprint_entity_list(FILE *fp, list l)
void fprint_entity_list(FILE *fp,list l): prints a list of entities on file fp.
#define ADD_ELEMENT_TO_LIST(_list, _type, _element)
Psyslist add_sc_to_sclist(Psysteme sc, Psyslist lsys)
=================================================================
#define user_error(fn,...)
int get_debug_level(void)
GET_DEBUG_LEVEL returns the current debugging level.
const char * pu_variable_name(Variable)
package mapping : Alexis Platonoff, april 1993
void vecteur_fprint(FILE *, Pcontrainte, const char *(*)(entity))
void pu_vect_fprint(FILE *, Pvecteur)
===========================================================================
expression make_rational_exp(Pvecteur, Value)
=====================================================================
void fprint_psysteme(FILE *, Psysteme)
===========================================================================
Pvecteur vect_var_subst(Pvecteur, Variable, Pvecteur)
=================================================================
string expression_to_string(expression e)
list words_range(range obj, list *ppdl)
Psyslist reverse_psyslist(Psyslist l)
======================================================================
bool min_or_max_expression_p(expression exp)
===================================================================
expression merge_expressions(expression exp1, expression exp2, int max_or_min)
===================================================================
#define NORMALIZE_EXPRESSION(e)
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 entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
bool expression_equal_integer_p(expression exp, int i)
================================================================
#define normalized_undefined
#define range_increment(x)
#define EXPRESSION(x)
EXPRESSION.
#define expression_undefined
#define normalized_tag(x)
#define variable_dimensions(x)
#define call_arguments(x)
#define normalized_linear(x)
#define expression_syntax(x)
Psysteme sc_make(Pcontrainte leg, Pcontrainte lineg)
Psysteme sc_make(Pcontrainte leg, Pcontrainte lineg): allocation et initialisation d'un systeme d'equ...
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 ...
Psysteme sc_new(void)
Psysteme sc_new(): alloue un systeme vide, initialise tous les champs avec des valeurs nulles,...
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_append(Psysteme s1, Psysteme s2)
Psysteme sc_append(Psysteme s1, Psysteme s2): calcul de l'intersection des polyedres definis par s1 e...
void sl_fprint(in_fi, in_sl, char *(*in_fu)())
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
Psysteme sc_normalize(Psysteme ps)
Psysteme sc_normalize(Psysteme ps): normalisation d'un systeme d'equation et d'inequations lineaires ...
void vect_chg_sgn(Pvecteur v)
void vect_chg_sgn(Pvecteur v): multiplie v par -1
struct Scontrainte * succ
Warning! Do not modify this file that is automatically generated!
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.
struct cons * cdr
The pointer to the next element.
string words_to_string(cons *lw)
#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....
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_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...