25 #include "pips_config.h"
64 #include "constants.h"
80 #include "resources.h"
84 #include "array_dfg.h"
85 #include "prgm_mapping.h"
87 #include "scheduling.h"
88 #include "reindexing.h"
92 #define STRING_BDT "t"
93 #define STRING_PLC "p"
94 #define STRING_TAU "q"
95 #define STRING_FLAG "flag"
97 #define MAKE_STATEMENT(ins) \
98 (make_statement(entity_empty_label(), \
99 STATEMENT_NUMBER_UNDEFINED, \
100 STATEMENT_ORDERING_UNDEFINED, \
101 string_undefined, ins))
170 #define INTEGER_DEC 0
172 #define COMPLEX_DEC 2
173 #define LOGICAL_DEC 3
175 #define CHARACTER_DEC 5
177 #define INTEGER_DECL " INTEGER"
178 #define REAL_DECL " REAL"
179 #define COMPLEX_DECL " COMPLEX"
180 #define LOGICAL_DECL " LOGICAL"
181 #define DOUBLE_DECL " DOUBLE"
182 #define CHARACTER_DECL " CHARACTER"
184 #define NEWLINE "\n *"
186 #define LINE_LENGHT 68
187 #define MARGIN_LENGHT 7
253 if (lte == NULL)
return(te);
282 for (l = t; l!= NULL; l = l->
succ)
284 fprintf(fp,
"\nTest n. %d:", i);
304 if (l1 == NULL)
return(l2);
305 if (l2 == NULL)
return(l1);
335 int os = 0, od = 0,di;
363 fprintf(stderr,
"\n os = %d", os);
364 fprintf(stderr,
"\n od = %d", od);
365 fprintf(stderr,
"\nExpression :");
402 fprintf(stderr,
"\nVecteur 2 :");
404 fprintf(stderr,
"\nIndices of Dest :");
441 fprintf(stderr,
"\nValue of PD :");
455 fprintf(stderr,
"\nValue of the delay :");
482 fprintf(stderr,
"\nFin calculate delai");
512 Psyslist sl_tbou, sl_ptopo, llp1, llp2, llp3;
513 list lcr_range =
NIL, ab_val, lcr_ab;
524 user_error(
"prepare_array_bounds",
"\n Bounds already exits\n");
526 for(pc_aux = pc; pc_aux != NULL; pc_aux = pc_aux->
succ) {
530 user_error(
"prepare_array_bounds",
"\n Not the same stmt\n");
537 while (llp1 != NULL){
549 while (llp1 != NULL){
561 for(llp = pc_aux->
lp; !
ENDP(llp);
POP(llp)) {
572 "\nNew lb and ub expressions (only Space) :\n\tLB: %s\n\tUB: %s\n",
581 lcr_range =
gen_nconc(lcr_range, lcr_ab);
590 lcr_ab =
CDR(lcr_ab);
592 sl_ptopo = sl_ptopo->
succ;
597 for(llt = pc_aux->
lt; !
ENDP(llt);
POP(llt)) {
608 "\nNew lb and ub expressions (time) :\n\tLB: %s\n\tUB: %s\n",
617 lcr_range =
gen_nconc(lcr_range, lcr_ab);
626 lcr_ab =
CDR(lcr_ab);
628 sl_tbou = sl_tbou->
succ;
631 for(llp = pc_aux->
lp; !
ENDP(llp);
POP(llp)) {
644 "\nNew lb and ub expressions (space) :\n\tLB: %s\n\tUB: %s\n",
653 lcr_range =
gen_nconc(lcr_range, lcr_ab);
662 lcr_ab =
CDR(lcr_ab);
664 sl_ptopo = sl_ptopo->
succ;
672 fprintf(stderr,
"\n====================\n====================\n");
676 #define DOUBLE_PRECISION_SIZE 8
706 entity mod_entity, var_ent;
708 list lcr, lt, la, lom;
731 SAI,
num, (
char *) NULL));
735 "\nOne ins (%d) has no array entity : %s\n",
753 default:
user_error(
"make_array_bounds",
"\nBad array type\n");
764 if(is_first && (d >= 0) && (d !=
INFINITY)) {
781 "\nArray bounds should be linear\n");
848 fprintf(stderr,
"\nReference en entree: \n");
849 fprintf(stderr,
"\n\tVariable : ");
851 fprintf(stderr,
"\n\tIndices : ");
863 fprintf(stderr,
"\nSysteme qui remplace :");
874 for (cont = int_ps->
egalites; cont != NULL; cont = cont->
succ)
905 fprintf(stderr,
"\nReference en sortie: \n");
906 fprintf(stderr,
"\n\tVariable : ");
908 fprintf(stderr,
"\n\tIndices : ");
957 Pscell pc = NULL, pc_aux = NULL;
959 Psysteme ps_b, ps_p, ps_aux, old_ps, new_ps, int_ps, sys_p, pps, pcond,
960 time_ps = SC_UNDEFINED;
963 list lexp, bv, lnewp, lnewb, lpar, ciel, lnew, lnewp2, lnewp3, ltau =
964 NIL, lnewq, lnewt, lom, lt =
NIL;
965 int pcount, bcount = 0, diff, d, qcount = 0, count_loop, i, time_count;
968 Pvecteur vec, Tindx, Tcnst, Qindx, Qcnst, new_indx;
970 Pmatrix mT, mB, mT_inv, mQ, mC, mQ_inv, mT_invB, mH, mP, mR, mQ_invC,
971 mS, mR_inv, mS_inv, mI, mIc, mU, mId;
975 Psyslist lsys, lsys_aux, ltime, lsys_time, ltopo;
984 fprintf(stderr,
"\n***debut index pour %d***\n", cn);
1020 user_error(
"prepare_reindexing",
"PLC not linear\n");
1050 fprintf(stderr,
"\n**Computing Cell**\n\n");
1055 "Multi dimensional case not treated yet\n");
1070 user_error(
"prepare_reindexing",
"Bdt is not linear\n");
1077 ps_b = SC_UNDEFINED;
1084 "Rational case not treated yet !\n");
1087 fprintf(stderr,
"\nNouvelles variables b:\n");
1089 fprintf(stderr,
"\nNouvelles variables p:\n");
1091 fprintf(stderr,
"\nContraintes sur B:\n");
1093 fprintf(stderr,
"\nContraintes sur P:\n");
1099 if (SC_UNDEFINED_P(ps_b)) {
1109 fprintf(stderr,
"\nDiff = %d\n",diff);
1131 if (!SC_UNDEFINED_P(ps_b))
1149 lnewp2 =
CDR(lnewp2);
1161 fprintf(stderr,
"\nBase incomplete !!!\n");
1170 if(SC_UNDEFINED_P(ps_b))
1178 for(; !
ENDP(llnew);
POP(llnew)) {
1236 fprintf(stderr,
"\nOld indices:");
1238 fprintf(stderr,
"\nNew indices:");
1240 fprintf(stderr,
"\nDomain of the old indices:");
1242 fprintf(stderr,
"\nSystem of basis change 1:");
1248 fprintf(stderr,
"\nMatrice mT_inv :");
1250 fprintf(stderr,
"\nMatrice mT_invB :");
1256 Tcnst, mT_inv, mT_invB);
1264 fprintf(stderr,
"\nSystem of basis change 2:");
1266 fprintf(stderr,
"\nDomain after the basis change:");
1288 fprintf(stderr,
"\nDomain after row_echelon:");
1305 fprintf(stderr,
"\nHermite of mT = ");
1313 fprintf(stderr,
"\nSeparate begin");
1317 &sys_p, count_loop);
1319 fprintf(stderr,
"\nSeparate end");
1323 fprintf(stderr,
"\n Separate systems: ");
1325 fprintf(stderr,
"\nSystems for PLC:");
1335 while (lsys_time != NULL) {
1336 if (i <= time_count) {
1339 lsys_time = lsys_time->
succ;
1345 lsys_time = lsys_time->
succ;
1352 fprintf(stderr,
"\n Systems for BDT after build_min: ");
1354 fprintf(stderr,
"\n Systems for PLC after build_min: ");
1359 for (lsys_aux = ltime; lsys_aux != NULL; lsys_aux =
1366 fprintf(stderr,
"\nWe work on system: ");
1400 fprintf(stderr,
"\nmQ_inv :");
1402 fprintf(stderr,
"\nmQ_invC:");
1447 &sys_p, count_loop);
1452 pc_aux->statement = cn;
1453 pc_aux->domain = pred;
1455 pc_aux->var_base = Tindx;
1456 pc_aux->con_base = Tcnst;
1460 pc_aux->Tmat_inv = mT_inv;
1462 pc_aux->Bmat_inv = mT_invB;
1464 pc_aux->Rmat_inv = mR_inv;
1466 pc_aux->Smat_inv = mS_inv;
1467 pc_aux->lomega = lom;
1468 pc_aux->lp = lnewp3;
1470 pc_aux->ltau = ltau;
1471 pc_aux->Nbounds = new_ps;
1473 pc_aux->t_bounds = ltime;
1474 pc_aux->p_topology = ltopo;
1479 fprintf(stderr,
"\nNoeud %d :\n", cn);
1480 fprintf(stderr,
"\nNouvelles variables:\n");
1484 fprintf(stderr,
"\nBasen de Smat = ");
1488 fprintf(stderr,
"\nSmat inverse = ");
1490 fprintf(stderr,
"\nR_inv = ");
1492 fprintf(stderr,
"\nNew Psystem ");
1495 fprintf(stderr,
"Liste des extremums sur temps :");
1497 fprintf(stderr,
"Liste sur topology de p :");
1510 fprintf(stderr,
"\nNo Loop Counters\n");
1527 fprintf(stderr,
"\n**Computing Cell**\n\n");
1532 "\nA constant schedule can not be multi-dimensional\n");
1548 "Rational case not treated yet !");
1551 pc_aux->statement = cn;
1552 pc_aux->domain = pred;
1554 pc_aux->var_base = NULL;
1555 pc_aux->con_base = Tcnst;
1556 pc_aux->Rbase_out = NULL;
1557 pc_aux->Tbase_out = NULL;
1566 pc_aux->lomega = lom;
1570 pc_aux->Nbounds = NULL;
1571 pc_aux->Nindices = NULL;
1573 pc_aux->p_topology = NULL;
1585 fprintf(stderr,
"\n***Fin index***\n");
1613 fprintf(stderr,
"\ncompatible pc debut:\n");
1615 fprintf(stderr,
"\nDataflow:");
1619 if ((pcd == NULL) || (pcs == NULL))
1625 fprintf(stderr,
"\nSysteme destination avec arc:\n");
1631 fprintf(stderr,
"\nTransformation:");
1633 fprintf(stderr,
"\nSysteme source:\n");
1636 if(pss != SC_UNDEFINED) {
1639 fprintf(stderr,
"\nSysteme source:\n");
1655 fprintf(stderr,
"\ncellules compatibles .");
1657 fprintf(stderr,
"\ncellules non compatibles .");
1658 fprintf(stderr,
"\ncompatible pc fin:\n");
1680 bool not_found =
true;
1683 Pmatrix mL, mC, mA, mAC, mB, mBC, term1, term2, term3, term4, term5;
1686 Pvecteur Abase, ACbase, Bbase, Lbase;
1692 fprintf(stderr,
"\nMake reindex debut pour le noeud %d:\n", crt_m);
1698 fprintf(stderr,
"\nOld dataflow reference : ");
1702 if (source_pc != NULL) {
1704 for ( ; (source_pc != NULL) && not_found; ) {
1708 source_pc = source_pc->
succ;
1712 user_error(
"make reindex",
" pas trouve de domaine commun !");
1720 mB = source_pc->
Rmat;
1721 mBC = source_pc->
Smat;
1731 fprintf(stderr,
"\nApplication transformation :\n");
1733 for (; ltrans !=
NIL;
POP(ltrans)) {
1766 fprintf(stderr,
"\nMatrice A:\n");
1768 fprintf(stderr,
"\nMatrice mL:\n");
1770 fprintf(stderr,
"\nMatrice mB:\n");
1772 fprintf(stderr,
"\nMatrice mC:\n");
1791 fprintf(stderr,
"\nBase de depart:\n");
1793 fprintf(stderr,
"\nBase d arrivee:\n");
1795 fprintf(stderr,
"\nBase matrice constante:\n");
1797 fprintf(stderr,
"\nMatrice produit:\n");
1799 fprintf(stderr,
"\nMatrice constante:\n");
1804 ACbase, term2, term7);
1816 for (; cont != NULL; cont = cont->
succ) {
1828 mB = source_pc->
Rmat;
1829 mBC = source_pc->
Smat;
1837 fprintf(stderr,
"\nApplication transformation : destination empty\n");
1839 for (; ltrans !=
NIL;
POP(ltrans)) {
1883 fprintf(stderr,
"\nMatrice mB:\n");
1885 fprintf(stderr,
"\nMatrice mC:\n");
1895 fprintf(stderr,
"\nBase d arrivee:\n");
1897 fprintf(stderr,
"\nBase matrice constante:\n");
1899 fprintf(stderr,
"\nMatrice constante:\n");
1904 ACbase, term1, term6);
1911 for (; cont != NULL; cont = cont->
succ) {
1920 fprintf(stderr,
"\nNouvelles contraintes:\n");
1922 fprintf(stderr,
"\nNouvelles expressions: %s\n",
1930 user_error(
"make_reindex",
"\nTransformation should be empty\n");
1934 fprintf(stderr,
"\nListe d expression :\n");
1950 fprintf(stderr,
"\nNouvelle reference :\t ");
1952 fprintf(stderr,
"\nMake reindex fin\n");
1983 bool is_in_list =
false;
1984 list li, le = l_exp;
1986 for(li = l_ind; (li !=
NIL) && (! is_in_list); li =
CDR(li)) {
2066 list cls, *linit, *lmax;
2074 Psysteme new_ps, pps, pps2, pps3 = SC_UNDEFINED, te_dup, pcond;
2096 fprintf(stderr,
"\nBuild_third_comb begin");
2112 fprintf(stderr,
"\nIns BEFORE substitution\n");
2116 fprintf(stderr,
"\nSubstitution with system:");
2122 for (cont = int_ps->
egalites; cont != NULL; cont = cont->
succ) {
2140 fprintf(stderr,
"\nSubstitute %s by %s\n",
2147 fprintf(stderr,
"\nIns AFTER substitution\n");
2167 fprintf(stderr,
"\nOOPPS!! pas de reference\n");
2190 pcond =
sc_rn(nbase);
2222 fprintf(stderr,
"\nListe des p : ");
2230 while (llp1 != NULL) {
2248 fprintf(stderr,
"\nConstant Schedule : %s\n",
2261 for (; lp !=
NIL; lp =
CDR(lp)) {
2266 "\nBEFORE subs: var = %s, val = 1, vec = ",
2276 fprintf(stderr,
"\nAFTER subs:\n");
2295 "\nInstruction en milieu de build_third_comb() :\n");
2315 "\nInstruction en sortie de build_third_comb() :\n");
2326 while (ldf !=
NIL) {
2382 fprintf(stderr,
"\nCurrent Dataflow:");
2384 fprintf(stderr,
"\nSystem of the edge:");
2389 if (!SC_UNDEFINED_P(new_ps)) {
2398 fprintf(stderr,
"\nnew system:");
2404 new_ps->
base = NULL;
2411 if (SC_RN_P(new_ps) ||
2435 pcond =
sc_rn(nbase);
2466 fprintf(stderr,
"\nListe des p : ");
2479 while (llp1 != NULL) {
2513 fprintf(stderr,
"\nConstant Schedule : %s\n",
2570 for (; lp !=
NIL; lp =
CDR(lp)) {
2575 "\nBEFORE subs: var = %s, val = 1, vec = ",
2585 fprintf(stderr,
"\nAFTER subs:\n");
2604 "\nInstruction en milieu de build_third_comb() :\n");
2640 "\nInstruction en sortie de build_third_comb() :\n");
2658 fprintf(stderr,
"\nFin d'un dataflow");
2665 fprintf(stderr,
"\nBuild_third_comb end");
2704 Pmytest lins = NULL, tes = NULL;
2707 fprintf(stderr,
"\nBuild_third_subcomb begin");
2726 while (ldf !=
NIL) {
2743 if (!SC_UNDEFINED_P(new_ps)) {
2757 fprintf(stderr,
"\nFin d'un dataflow");
2766 fprintf(stderr,
"\nBuild_third_subcomb end");
2794 list clrhs, cls, *linit, *lmax;
2801 Pmytest lins = NULL, lins1, lins2, lins3;
2807 fprintf(stderr,
"\nBuild_second_comb begin");
2813 while (clrhs->
cdr !=
NIL) {
2819 for (lins1 = lins; lins1 != NULL; lins1 = lins1->
succ) {
2838 for (lins1 = lins; lins1 != NULL; lins1 = lins1->
succ) {
2845 &linit_aux, &lmax_aux);
2857 &linit_aux, &lmax_aux);
2885 list cls, *linit, *lmax;
2889 list n_indices =
NIL, clrhs, lp;
2905 fprintf(stderr,
"\n** instruction build_firstomb_comb debut pour %d**\n",cn);
2906 fprintf(stderr,
"\nInstruction en entree : ");
2916 fprintf(stderr,
"\nInstruction apres lhs_subs");
2924 fprintf(stderr,
"\nNombre de reference a droite : %d\n",
2928 if (pc->
succ != NULL) {
2967 fprintf(stderr,
"\nNo right hand side reference\n");
2976 fprintf(stderr,
"\nListe des p : ");
2981 for (; lp !=
NIL; lp =
CDR(lp)) {
2996 vec = (((pc->
t_bounds)->psys)->egalites)->vecteur;
3045 list vl, sl, lstatg, ltim =
NIL, laux, lins =
NIL, lent;
3051 list linit, lstat, lmax =
NIL;
3064 fprintf(stderr,
"\nGraphe renverse comme la creme:");
3081 user_error(
"re_do_it",
"\nMulti dimensional case not treated yet\n");
3110 user_error(
"reindexing",
"Pas une assignation\n");
3131 if (lins->cdr !=
NIL) {
3135 for (; lins !=
NIL; lins =
CDR(lins)) {
3195 for (; lins !=
NIL; lins =
CDR(lins)) {
3211 "\n\n****************************************************");
3212 fprintf(stderr,
"\nCODE BEFORE DELAY");
3214 "\n****************************************************\n\n");
3217 "\n\n****************************************************\n");
3273 "\n\n****************************************************");
3274 fprintf(stderr,
"\nCODE FINAL");
3276 "\n****************************************************\n\n");
3279 "\n\n****************************************************\n");}
3281 return(new_mod_stat);
execution make_execution(enum execution_utype tag, void *val)
instruction copy_instruction(instruction p)
INSTRUCTION.
call make_call(entity a1, list a2)
normalized make_normalized(enum normalized_utype tag, void *val)
expression make_expression(syntax a1, normalized a2)
loop make_loop(entity a1, range a2, statement a3, entity a4, execution a5, list a6)
predicate make_predicate(Psysteme a1)
test make_test(expression a1, statement a2, statement a3)
instruction make_instruction(enum instruction_utype tag, void *val)
reference copy_reference(reference p)
REFERENCE.
syntax make_syntax(enum syntax_utype tag, void *val)
range make_range(expression a1, expression a2, expression a3)
void fprint_dfg(FILE *fp, graph obj)
===========================================================================
statement adg_number_to_statement(int in_nb)
======================================================================
#define int_to_value(i)
end LINEAR_VALUE_IS_INT
#define VALUE_TO_INT(val)
#define value_uminus(val)
unary operators on values
void const char const char const int
#define value_notone_p(val)
#define value_zero_p(val)
#define value_mult(v, w)
whether the default is protected or not this define makes no sense any more...
#define value_mod(v1, v2)
#define value_div(v1, v2)
#define value_posz_p(val)
Value ppcm(Value, Value)
ppcm.c
void fprint_string_Value(FILE *, char *, Value)
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...
Psysteme predicate_to_system(predicate p)
=================================================================
void analyze_expression(expression *e, int *d)
=====================================================================
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)
=====================================================================
Psyslist separate_variables(Psysteme ps, list l, Psysteme *sp, int c)
========================================================================
Psyslist separate_variables_2(Psysteme ps, list l, Psysteme *sp, int c)
========================================================================
struct scell scell
type cell that contains all information for the reindexation of
#define DOUBLE_PRECISION_SIZE
static void calculate_delay(expression exp, Pscell pcs, Pscell pcd, entity tau)
========================================================================
static Psysteme include_trans_on_LC_in_sc2(Psysteme ps, Pscell pc, Pbase b)
=======================================================================
static Psysteme include_trans_on_LC_in_sc(Psysteme ps, Pscell pc)
=======================================================================
static Pmytest add_ltest_to_ltest(Pmytest l1, Pmytest l2)
=======================================================================
#define INTEGER_DEC
We define a set of constant in order to a more generic function for the insert of the declarations of...
static Pbase include_time_in_base(Pscell pc, entity e)
=====================================================================
static void fprint_mytest(FILE *fp, Pmytest t)
=======================================================================
static Pmytest build_third_subcomb(reference old_ref, list cls, instruction assign_i, Pscell pc, Psysteme sc)
=====================================================================
void make_array_bounds(vertex cv)
===================================================================
struct newinst newinst
type of new instruction which contains information about the loop
static list build_first_comb(Pscell pc, instruction ci, list cls, int cn, list *linit, list *lmax)
=====================================================================
void substitute_expressions(expression exp, list l_ind, list l_exp)
=====================================================================
dfg_vertex_label vertex_label
Internal variables
static reference make_reindex(dataflow crt_df, int crt_m, instruction assign_i, Pscell pc)
========================================================================
#define MAKE_STATEMENT(ins)
struct newinst * Pnewinst
struct mytest mytest
type of a test, the same as the "normal" test except that the
static list build_second_comb(Pscell pc, list clrhs, instruction assign_i, list cls, Psysteme sc, list *linit, list *lmax)
=====================================================================
list prepare_reindexing(vertex v, bdt b, plc p)
=======================================================================
static list build_third_comb(reference old_ref, list cls, instruction assign_i, Pscell pc, Psysteme te, Psysteme sc, int *c, list *linit, list *lmax)
=====================================================================
void substitute_loop_indices(instruction ins, list l_ind, list l_exp)
=====================================================================
static Pmytest add_elt_to_test_list(Pmytest te, Pmytest lte)
=====================================================================
static reference include_trans_on_LC_in_ref(reference re, Pscell pc)
=======================================================================
static void prepare_array_bounds(Pscell pc)
===================================================================
static bool compatible_pc_p(Pscell pcd, Pscell pcs, int s, dataflow d)
========================================================================
static Pmytest create_mytest(Psysteme ps, instruction ins1, instruction ins2)
=======================================================================
#define STRING_BDT
Name : cell.c Package : reindexing Author : Alexis Platonoff & Antoine Cloue Date : april 1995 Histor...
statement re_do_it(graph the_dfg, bdt the_bdt, plc the_plc)
======================================================================
#define CONTRAINTE_UNDEFINED_P(c)
Pcontrainte contrainte_make(Pvecteur pv)
Pcontrainte contrainte_make(Pvecteur pv): allocation et initialisation d'une contrainte avec un vecte...
int nb_elems_list(Pcontrainte)
int nb_elems_list(Pcontrainte list): nombre de contraintes se trouvant dans une liste de contraintes
expression Psysteme_to_expression(Psysteme)
system_to_code.c
statement generate_optional_if(Psysteme, statement)
statement generate_optional_if(sc, stat)
Pdisjunct dj_append_system(Pdisjunct in_dj, Psysteme in_ps)
Pdisjunct dj_append_system( (Pdisjunct) in_dj, (Psysteme) in_ps ) Input : A disjunct in_dj to wich in...
#define vertex_vertex_label(x)
#define vertex_successors(x)
#define graph_vertices(x)
entity get_current_module_entity(void)
Get the entity of the current module.
instruction make_instruction_block(list statements)
Build an instruction block from a list of statements.
#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)
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.
#define CDR(pcons)
Get the list less its first element.
bool assignment_statement_p(statement)
Test if a statement is an assignment.
statement st_make_nice_test(expression, list, list)
void * hash_get(const hash_table htp, const void *key)
this function retrieves in the hash table pointed to by htp the couple whose key is equal to key.
void hash_put(hash_table htp, const void *key, const void *val)
This functions stores a couple (key,val) in the hash table pointed to by htp.
void * hash_del(hash_table htp, const void *key)
this function removes from the hash table pointed to by htp the couple whose key is equal to key.
void fprint_entity_list(FILE *fp, list l)
void fprint_entity_list(FILE *fp,list l): prints a list of entities on file fp.
list base_to_list(Pbase base)
Most includes are centralized here.
#define ADD_ELEMENT_TO_LIST(_list, _type, _element)
Value vect_pgcd_all(Pvecteur v)
Value vect_pgcd(Pvecteur v): calcul du pgcd de tous les coefficients non nul d'un vecteur v.
int vect_size(Pvecteur v)
package vecteur - reductions
Psysteme include_trans_in_sc(int s, Psysteme sys, list l)
=================================================================
Psyslist add_sc_to_sclist(Psysteme sc, Psyslist lsys)
=================================================================
#define MATRIX_NB_LINES(matrix)
#define MATRIX_NB_COLUMNS(matrix)
#define MATRIX_DENOMINATOR(matrix)
int MATRIX_DENONIMATOR(matrix): acces au denominateur global d'une matrice matrix
#define matrix_free(m)
Allocation et desallocation d'une matrice.
Pmatrix matrix_new(int m, int n)
package matrix
void matrix_hermite(Pmatrix MAT, Pmatrix P, Pmatrix H, Pmatrix Q, Value *det_p, Value *det_q)
package matrix
void matrix_general_inversion(Pmatrix a, Pmatrix inv_a)
void matrix_general_inversion(Pmatrix a; Pmatrix inv_a) calcul de l'inversion du matrice general.
void matrix_add(Pmatrix a, Pmatrix b, Pmatrix c)
a = b + c
void matrix_multiply(const Pmatrix a, const Pmatrix b, Pmatrix c)
void matrix_multiply(Pmatrix a, Pmatrix b, Pmatrix c): multiply rational matrix a by rational matrix ...
void matrix_normalize(Pmatrix a)
void matrix_normalize(Pmatrix a)
void matrix_fprint(FILE *, Pmatrix)
matrix_io.c
#define pips_internal_error
#define user_error(fn,...)
int get_debug_level(void)
GET_DEBUG_LEVEL returns the current debugging level.
Pbase list_to_base(list l)
Pbase list_to_base(list l): returns the Pbase that contains the variables of list "l",...
#define MODULE_SEP_STRING
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define HASH_UNDEFINED_VALUE
value returned by hash_get() when the key is not found; could also be called HASH_KEY_NOT_FOUND,...
void * gen_find_tabulated(const char *, int)
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)
===========================================================================
list static_control_to_indices(static_control)
package mapping : Alexis Platonoff, july 1993
void substitute_var_with_vec(Psysteme, entity, Value, Pvecteur)
===========================================================================
list simplify_minmax(list, Psysteme, int)
=================================================================
static_control get_stco_from_current_map(statement)
========================================================================
expression make_rational_exp(Pvecteur, Value)
=====================================================================
void fprint_psysteme(FILE *, Psysteme)
===========================================================================
void fprint_dataflow(FILE *, int, dataflow)
===========================================================================
#define DATAFLOW(x)
DATAFLOW.
#define dataflow_transformation(x)
#define placement_dims(x)
#define SCHEDULE(x)
SCHEDULE.
#define schedule_predicate(x)
#define dataflow_governing_pred(x)
#define dfg_vertex_label_statement(x)
#define dataflow_reference(x)
#define dfg_vertex_label_exec_domain(x)
void fprint_list_of_exp(FILE *fp, list exp_l)
void fprint_list_of_exp(FILE *fp, list exp_l): prints in the file "fp" the list of expression "exp_l"...
string expression_to_string(expression e)
void print_reference(reference r)
bool vecteurs_libres_p(Psysteme sys, Pbase v_base, Pbase c_base)
========================================================================
graph the_dfg
The placement function.
bdt the_bdt
The data flow graph.
#define INFINITY
define INFINITY 2147483647
#define IS_LOOP_BOUNDS
FI: moved into ri-util.
hash_table delay_table
Name : delay.c Package : reindexing Author : Alexis Platonoff Date : March 1995 Historic :
list add_delay_information(hash_table t, list sl)
======================================================================
list lparams
Array bounds.
void build_contraction_matrices(int s, Psysteme ps, Pmatrix mH, int *c, Pmatrix *mQ, Pmatrix *mQ_inv, Pmatrix *mC, list *ln, list *lom, Pbase indx, Pbase cnst)
========================================================================
instruction build_flag_test(entity f, entity t)
======================================================================
Psyslist build_list_of_min(Psyslist lsys, list lnew, Psysteme ps)
=======================================================================
instruction build_local_time_test(entity t, list l)
======================================================================
list dataflows_on_reference(list cls, reference crhs, predicate pred, list *lm)
=======================================================================
expression build_global_time_test_with_exp(entity tg, expression exp)
======================================================================
instruction make_init_time(entity en, expression ex)
======================================================================
entity get_time_ent(int st, char *typ, int count)
==================================================================
instruction make_increment_instruction(entity t, int i)
=====================================================================
instruction build_flag_assign(entity f, bool val)
======================================================================
entity create_new_entity(int st, char *typ, int nb)
========================================================================
reference my_build_new_ref(int kind, int n, list subscripts, reference old_r)
========================================================================
Psysteme change_base_in_sc(Psysteme ps, list lvar, Psysteme lequ)
========================================================================
placement extract_plc(plc p, int cn)
========================================================================
list remove_minmax(list le)
=====================================================================
void my_matrices_to_constraints_with_sym_cst_2(Pcontrainte *pc, Pbase new_base, Pbase index_base, Pbase const_base, Pmatrix A, Pmatrix B)
=====================================================================
void my_lhs_subs_in_ins(instruction ins, string SA, int n, list subscripts)
========================================================================
void matrix_coef_mult(Pmatrix A, Value nb)
========================================================================
void print_detailed_ins(instruction ins)
======================================================================
bool vars_in_vect_p(Pvecteur pv, list vars)
======================================================================
Psysteme sc_reverse_constraints(Psysteme ps)
========================================================================
list find_new_variables(list l1, list l2)
========================================================================
expression merge_expressions(expression exp1, expression exp2, int max_or_min)
===================================================================
Psysteme sc_add_egalite_at_end(Psysteme ps, Pcontrainte co)
=======================================================================
bool is_vect_constant_p(Pvecteur v)
========================================================================
list extract_bdt(bdt b, int cn)
=======================================================================
void my_constraints_with_sym_cst_to_matrices(Pcontrainte pc, Pbase index_base, Pbase const_base, Pmatrix A, Pmatrix B)
=====================================================================
bool cst_vector_p(Pvecteur v, Pbase b)
========================================================================
list ADD_LIST_TO_LIST(list l1, list l2)
=======================================================================
void my_matrices_to_constraints_with_sym_cst(Pcontrainte *pc, Pbase new_base, Pbase index_base, Pbase const_base, Pmatrix A, Pmatrix B)
=====================================================================
Psysteme base_complete(Psysteme sys, list var_l, list par_l, list *new_l)
=======================================================================
#define ENTITY_ASSIGN_P(e)
#define NORMALIZE_EXPRESSION(e)
#define is_instruction_block
soft block->sequence transition
#define DIVIDE_OPERATOR_NAME
#define instruction_block(i)
#define make_empty_statement
An alias for make_empty_block_statement.
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 same_entity_p(entity e1, entity e2)
predicates on entities
entity entity_empty_label(void)
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
expression make_vecteur_expression(Pvecteur pv)
make expression for vector (Pvecteur)
expression make_entity_expression(entity e, cons *inds)
expression Pvecteur_to_expression(Pvecteur vect)
AP, sep 25th 95 : some usefull functions moved from static_controlize/utils.c.
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)
================================================================
#define normalized_undefined
#define REFERENCE(x)
REFERENCE.
#define syntax_reference(x)
#define reference_variable(x)
#define INSTRUCTION(x)
INSTRUCTION.
#define EXPRESSION(x)
EXPRESSION.
#define instruction_undefined
#define instruction_tag(x)
#define normalized_tag(x)
#define expression_normalized(x)
#define reference_indices(x)
#define expression_undefined_p(x)
#define statement_instruction(x)
#define instruction_call(x)
@ is_execution_sequential
#define call_arguments(x)
#define instruction_test(x)
#define normalized_linear(x)
#define expression_syntax(x)
#define entity_domain
newgen_syntax_domain_defined
#define variable_basic(x)
#define STATEMENT(x)
STATEMENT.
bool sc_consistent_p(Psysteme sc)
bool sc_consistent_p(Psysteme sc): check that sc is well defined, that the numbers of equalities and ...
Psysteme sc_make(Pcontrainte leg, Pcontrainte lineg)
Psysteme sc_make(Pcontrainte leg, Pcontrainte lineg): allocation et initialisation d'un systeme d'equ...
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_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_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 ...
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.
bool sc_rational_feasibility_ofl_ctrl(Psysteme sc, int ofl_ctrl, bool ofl_res)
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)())
Psyslist sl_new()
Psyslist sl_new() AL 26/10/93 Input : Nothing.
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
void algorithm_row_echelon(Psysteme scn, Pbase base_index, Psysteme *pcondition, Psysteme *penumeration)
see comments above.
Psysteme sc_normalize(Psysteme ps)
Psysteme sc_normalize(Psysteme ps): normalisation d'un systeme d'equation et d'inequations lineaires ...
void sc_chg_var(Psysteme s, Variable v_old, Variable v_new)
void sc_chg_var(Psysteme s, Variable v_old, Variable v_new) this function replace the variable v_old ...
void vect_chg_sgn(Pvecteur v)
void vect_chg_sgn(Pvecteur v): multiplie v par -1
Pvecteur vect_div(Pvecteur v, Value x)
Pvecteur vect_div(Pvecteur v, Value x): division du vecteur v par le scalaire x, si x est different d...
Pvecteur vect_multiply(Pvecteur v, Value x)
Pvecteur vect_multiply(Pvecteur v, Value x): multiplication du vecteur v par le scalaire x,...
void sa_print_ins(FILE *fp, instruction i)
=========================================================================
list get_rhs_of_instruction(instruction ins)
=========================================================================
void rhs_subs_in_ins(instruction ins, reference r1, reference r2)
=========================================================================
graph my_dfg_reverse_graph(graph g)
======================================================================
void constraints_with_sym_cst_to_matrices(Pcontrainte, Pbase, Pbase, Pmatrix, Pmatrix)
=======================================================================
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.
type of a test, the same as the "normal" test except that the
type of new instruction which contains information about the loop
list lomega
information about the local time
type cell that contains all information for the reindexation of
list ltau
list of variable t created
Pmatrix Rmat_inv
(to) = Rmat (i) + Smat
Pmatrix Bmat
(i) = Tmat_inv(t) + Bmat_inv(n)
list lp
list of the period(s) of bdt
Pmatrix Tmat_inv
(t) = Tmat(i) + Bmat(n)
struct scell * succ
topology of the plc in function of t
predicate domain
number of the node
Psyslist t_bounds
list of the new indices
Pbase var_base
predicate of the schedule
Pbase con_base
(to) = Rmat(i) + Smat(n)
Pbase Nindices
new systeme of bounds in (t,p,..)
Pmatrix Smat
(i) = Rmat_inv(to) + Smat_inv(n)
Psysteme Nbounds
list of variable tau created
Psyslist p_topology
bounds of global time for the ins
predicate edge_dom
complete domain of the bdt
list lt
list of variable p created
#define pa_faisabilite(pa)
#define exp
Avoid some warnings from "gcc -Wshadow".
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
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)
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_new(Variable var, Value coeff)
Pvecteur vect_new(Variable var,Value coeff): allocation d'un vecteur colineaire au vecteur de base va...
Pvecteur vect_add(Pvecteur v1, Pvecteur v2)
package vecteur - operations binaires
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...
Pvecteur vect_cl_ofl_ctrl(Pvecteur v, Value lambda, Pvecteur u, int ofl_ctrl)
Pvecteur vect_cl_ofl_ctrl(Pvecteur v, Value lambda, Pvecteur u, int ofl_ctrl): etape d'acculumulation...
void vect_erase_var(Pvecteur *ppv, Variable v)
void vect_erase_var(Pvecteur * ppv, Variable v): projection du vecteur *ppv selon la direction v (i....
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...
void vect_normalize(Pvecteur v)
void vect_normalize(Pvecteur v): division de tous les coefficients de v par leur pgcd; "normalisation...