25 #include "pips_config.h"
68 #include "constants.h"
85 #include "resources.h"
89 #include "array_dfg.h"
90 #include "prgm_mapping.h"
92 #include "scheduling.h"
93 #include "reindexing.h"
97 #define STRING_BDT "t"
98 #define STRING_PLC "p"
99 #define STRING_TAU "q"
100 #define STRING_FLAG "flag"
102 #define MAKE_STATEMENT(ins) (make_statement(entity_empty_label(),STATEMENT_NUMBER_UNDEFINED,STATEMENT_ORDERING_UNDEFINED,string_undefined,ins))
120 #define INTEGER_DEC 0
122 #define COMPLEX_DEC 2
123 #define LOGICAL_DEC 3
125 #define CHARACTER_DEC 5
127 #define INTEGER_DECL " INTEGER"
128 #define REAL_DECL " REAL"
129 #define COMPLEX_DECL " COMPLEX"
130 #define LOGICAL_DECL " LOGICAL"
131 #define DOUBLE_DECL " DOUBLE"
132 #define CHARACTER_DECL " CHARACTER"
134 #define NEWLINE "\n *"
136 #define LINE_LENGHT 68
137 #define MARGIN_LENGHT 7
143 #define DOUBLE_PRECISION_SIZE 8
205 int i, le = ps->
nb_eq;
217 fprintf(stderr,
"\nBuild_contraction matrice :");
219 for (i = 1; i <= le; i++)
261 fprintf(stderr,
"\nBuild_contraction_matrice fin\n");
285 Psyslist lsys_aux = NULL, lsys_aux2 = NULL;
289 fprintf(stderr,
"\nBuild list of min begin \n");
297 fprintf(stderr,
"\nSysteme en cours d'etude:");
299 fprintf(stderr,
"\nVariable relative : ");
301 fprintf(stderr,
"\nSysteme en p a ajouter: ");
326 if (lsys_aux2 != NULL)
332 for (cont = sc_aux->
inegalites; cont != NULL; cont = cont->
succ) {
340 for (cont2 = ps_aux2->
inegalites; cont2 != NULL; cont2 = cont2->
succ) {
371 if (lsys_aux2 != NULL)
380 fprintf(stderr,
"\n Liste de systeme build part min : ");
404 list ldata, ldat, lpred, ld;
413 fprintf(stderr,
"\nDataflow on reference %s debut:",
415 fprintf(stderr,
"\nDomain noeud:");
419 for (lpred = cls; lpred !=
NIL;
POP(lpred)) {
425 fprintf(stderr,
"\nSuccesseur en cours : %d\n",stat_pred);
429 for (ld = ldata; ld !=
NIL;
POP(ld)) {
433 fprintf(stderr,
"\nDomain arc:");
440 if (SC_RN_P(sys_pred) ||
443 fprintf(stderr,
"\nDomain inter donc faisabilite:");
454 fprintf(stderr,
"\nDataflow on ref fin\n");
650 fprintf(stderr,
"\nNumero de l'instruction de %s = %d",
682 user_log(
"\n\n *** COMPUTE REINDEXING for %s\n", mod_name);
758 user_log(
"\n\n *** REINDEXING done\n");
void user_log(const char *format,...)
call make_call(entity a1, list a2)
expression make_expression(syntax a1, normalized a2)
test make_test(expression a1, statement a2, statement a3)
void free_instruction(instruction p)
instruction make_instruction(enum instruction_utype tag, void *val)
syntax make_syntax(enum syntax_utype tag, void *val)
string db_get_current_module_name(void)
Also used to check whether set...
void fprint_dfg(FILE *fp, graph obj)
===========================================================================
static hash_table STS
The "STS" global variable is the hash table that maps the static_control on the statements.
#define VALUE_TO_INT(val)
#define value_product(v, w)
#define value_div(v1, v2)
Value ppcm(Value, Value)
ppcm.c
Psysteme predicate_to_system(predicate p)
=================================================================
statement re_do_it(graph the_dfg, bdt the_bdt, plc the_plc)
======================================================================
struct _newgen_struct_statement_ * statement
Pcontrainte contrainte_make(Pvecteur pv)
Pcontrainte contrainte_make(Pvecteur pv): allocation et initialisation d'une contrainte avec un vecte...
#define successor_vertex(x)
#define successor_arc_label(x)
struct _newgen_struct_graph_ * graph
#define SUCCESSOR(x)
SUCCESSOR.
#define graph_vertices(x)
void reset_current_module_entity(void)
Reset the current module entity.
void reset_current_module_statement(void)
Reset the current module statement.
statement set_current_module_statement(statement)
Set the current module statement.
statement get_current_module_statement(void)
Get the current module statement.
entity set_current_module_entity(entity)
static.c
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.
#define POP(l)
Modify a list pointer to point on the next element of the list.
#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)
#define CAR(pcons)
Get the value of the first element of a list.
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
#define DB_PUT_MEMORY_RESOURCE(res_name, own_name, res_val)
conform to old interface.
hash_table hash_table_make(hash_key_type key_type, size_t size)
void hash_table_free(hash_table htp)
this function deletes a hash table that is no longer useful.
#define full_name(dir, name)
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)
static statement mod_stat
We want to keep track of the current statement inside the recurse.
Psyslist add_sc_to_sclist(Psysteme sc, Psyslist lsys)
=================================================================
#define MATRIX_NB_LINES(matrix)
#define MATRIX_DENOMINATOR(matrix)
int MATRIX_DENONIMATOR(matrix): acces au denominateur global d'une matrice matrix
#define MATRIX_ELEM(matrix, i, j)
Macros d'acces aux elements d'une matrice.
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_nulle(Pmatrix Z)
void matrix_nulle(Pmatrix Z): Initialisation de la matrice Z a la valeur matrice nulle
void matrix_identity(Pmatrix, int)
void matrix_identity(Pmatrix ID, int level) Construction d'une sous-matrice identity dans ID(level+1....
#define pips_internal_error
int get_debug_level(void)
GET_DEBUG_LEVEL returns the current debugging level.
#define MODULE_SEP_STRING
hash_table statement_mapping
these macros are obsolete! newgen functions (->) should be used instead
string concatenate(const char *,...)
Return the concatenation of the given strings.
void * gen_find_tabulated(const char *, int)
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
int vertex_int_stmt(vertex)
===========================================================================
void reset_current_stco_map(void)
========================================================================
static_control get_stco_from_current_map(statement)
========================================================================
void fprint_psysteme(FILE *, Psysteme)
===========================================================================
void set_current_stco_map(statement_mapping)
========================================================================
void fprint_bdt(FILE *, bdt)
===========================================================================
#define DATAFLOW(x)
DATAFLOW.
struct _newgen_struct_bdt_ * bdt
#define dfg_arc_label_dataflows(x)
#define static_control_params(x)
#define static_control_yes(x)
#define static_control_undefined
#define dataflow_governing_pred(x)
struct _newgen_struct_plc_ * plc
#define dataflow_reference(x)
void fprint_plc(FILE *fp, plc obj)
========================================================================
graph the_dfg
The placement function.
int nb_nodes
The timing function.
bdt the_bdt
The data flow graph.
void fprint_delay(FILE *fp, graph g, hash_table t)
======================================================================
int get_number_of_ins(entity e)
======================================================================
static int tc
Internal variables
bool reindexing(char *mod_name)
======================================================================
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)
=======================================================================
dfg_vertex_label vertex_label
Local defines.
instruction build_local_time_test(entity t, list l)
======================================================================
list lparams
Array bounds.
#define MAKE_STATEMENT(ins)
list dataflows_on_reference(list cls, reference crhs, predicate pred, list *lm)
=======================================================================
hash_table delay_table
Name : delay.c Package : reindexing Author : Alexis Platonoff Date : March 1995 Historic :
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)
======================================================================
#define STRING_BDT
Name : reindexing.c Package : reindexing Author : Alexis Platonoff & Antoine Cloue Date : april 1994 ...
entity create_new_entity(int st, char *typ, int nb)
========================================================================
Psysteme my_clean_ps(Psysteme ps)
=======================================================================
Psyslist add_sclist_to_sclist(Psyslist l1, Psyslist l2)
=======================================================================
Psysteme matrix_to_system(Pmatrix A, Pbase b)
==================================================================
Psysteme sc_add_egalite_at_end(Psysteme ps, Pcontrainte co)
=======================================================================
void my_constraints_with_sym_cst_to_matrices(Pcontrainte pc, Pbase index_base, Pbase const_base, Pmatrix A, Pmatrix B)
=====================================================================
#define GREATER_THAN_OPERATOR_NAME
#define PLUS_OPERATOR_NAME
#define EQUAL_OPERATOR_NAME
#define ASSIGN_OPERATOR_NAME
#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...
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_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
expression make_entity_expression(entity e, cons *inds)
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
bool reference_equal_p(reference r1, reference r2)
#define normalized_undefined
#define reference_variable(x)
#define EXPRESSION(x)
EXPRESSION.
#define statement_instruction(x)
#define entity_domain
newgen_syntax_domain_defined
#define STATEMENT(x)
STATEMENT.
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.
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)())
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 ...
Pvecteur vect_multiply(Pvecteur v, Value x)
Pvecteur vect_multiply(Pvecteur v, Value x): multiplication du vecteur v par le scalaire x,...
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.
#define exp
Avoid some warnings from "gcc -Wshadow".
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_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_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...