25 #include "pips_config.h"
81 initial_module, compute_module, memory_module,
82 llv_to_lcr, r_to_llv, v_to_lllv, r_to_ud,
104 pips_assert(
"true", initial_module==initial_module);
108 debug(6,
"loop_nest_to_local_variables",
"begin\n");
111 (void)
fprintf(stderr,
"Private variables:");
128 bool first_reference =
true;
131 for(; !
ENDP(lexpr);
POP(lexpr)) {
137 (void)
fprintf(stderr,
"reference list:");
139 (void)
fprintf(stderr,
"first_reference=%s\n",
143 for(consr = lr; !
ENDP(consr) ;
POP(consr)) {
148 debug(7,
"loop_nest_to_local_variables",
149 "Variable %s is private\n",
152 first_reference =
false;
158 first_reference =
false;
178 hash_put(v_to_nlv, v, (
void*)(n+1));
192 debug(6,
"loop_nest_to_local_variables",
"end\n");
215 debug(8,
"make_emulated_shared_variable",
"begin\n");
237 (void)
fprintf(stderr,
"number of elements for %s: %d\n",
277 debug(8,
"make_emulated_shared_variable",
"esv_name=%s\n",
entity_name(esv));
279 debug(8,
"make_emulated_shared_variable",
"end\n");
303 hash_put(v_to_esv, (
char *) v, (
char *) esv);
324 char *local_variable_name;
333 debug(7,
"make_new_local_variables",
"begin v=%s, number=%d, pd=%d\n",
336 for(s=0; s<pd; s++) {
342 (void)
asprintf(&local_variable_name,
"%s%s%s%s%s%d%s%d",
378 hash_put(v_to_lllv, (
char *) v, (
char *) lllv);
386 debug(7,
"make_new_local_variables",
"end\n");
402 v_to_lllv, llv_to_lcr,
415 bool conflicting =
false;
417 debug(8,
"reference_conflicting_test_and_update",
"begin\n");
422 (void)
fprintf(stderr,
"reference %p to %s:",
425 (void) putc(
'\n', stderr);
430 debug(8,
"reference_conflicting_test_and_update",
431 "no local variables for reference %p to %s\n",
434 debug(8,
"reference_conflicting_test_and_update",
"return FALSE\n");
438 for(cllv = lllv; !
ENDP(cllv);
POP(cllv)) {
443 for(ccr = lcr; !
ENDP(ccr);
POP(ccr)) {
448 (void)
fprintf(stderr,
"conflict_p with reference %p to %s:",
451 (void) putc(
'\n', stderr);
463 debug(8,
"reference_conflicting_test_and_update",
464 "reference equality and same use, return TRUE\n");
474 debug(8,
"reference_conflicting_test_and_update",
475 "reference equality and same use, return TRUE\n");
477 hash_put(r_to_llv, (
char *) r, (
char *) llv);
487 pips_assert(
"reference_conflicting_test_and_update",
495 hash_put(r_to_llv, (
char *) r, (
char *) llv);
500 debug(8,
"reference_conflicting_test_and_update",
501 "Conflict! Look for conflicts with other components\n");
508 debug(8,
"reference_conflicting_test_and_update",
"return %d\n",
524 debug(8,
"reference_conflicting_p",
"begin\n");
526 (void)
fprintf(stderr,
"Reference 1 %p: ", r1);
528 (void)
fprintf(stderr,
"\nReference 2 %p: ", r2);
530 (void) fputc(
'\n',stderr);
552 (void)
fprintf(stderr,
"Test with reference 1 %p: ", r1);
554 (void)
fprintf(stderr,
" and reference 2 %p: ", r2);
556 (void) fputc(
'\n',stderr);
557 (void)
fprintf(stderr,
"Test with reference 11 %p: ", r11);
559 (void)
fprintf(stderr,
" and reference 21 %p: ", r21);
561 (void) fputc(
'\n',stderr);
562 (void) fputc(
'\n',stderr);
567 debug(8,
"reference_conflicting_p",
"return TRUE\n");
574 debug(8,
"reference_conflicting_p",
"return FALSE\n");
604 debug(8,
"make_tile_constraints",
"begin\n");
609 (void)
fprintf(stderr,
"Partitioning matrix P:\n");
620 (void)
fprintf(stderr,
"Inverse of partitioning matrix, IP:\n");
624 for ( i=1; i<=d; i++) {
627 for ( j=1; j<=d; j++) {
647 debug(8,
"make_tile_constraints",
"end\n");
661 debug(8,
"set_dimensions_of_local_variables",
"begin\n");
676 debug(8,
"set_dimensions_of_local_variables",
"end\n");
706 debug(8,
"set_dimensions_of_local_variable_family",
"begin\n");
713 debug(8,
"set_dimensions_of_local_variable_family",
"entity=%s\n",
716 for( d = 1; !
ENDP(rvld);
POP(rvld), d++) {
738 for(cr = lr; !
ENDP(cr);
POP(cr)) {
769 "System on phi for dimension %d:\n", d);
788 debug(8,
"set_dimensions_of_local_variable_family",
789 "bounds for dimension %d: [%d:%d]\n", d,
min,
max);
794 if (
value_gt(gmin,gmax)) gmax = gmin;
802 debug(8,
"set_dimensions_of_local_variable_family",
803 "bounds for dimension %d: [%d:%d]\n", d, gmin, gmax);
value make_value_unknown(void)
basic copy_basic(basic p)
BASIC.
storage make_storage(enum storage_utype tag, void *val)
ram make_ram(entity a1, entity a2, intptr_t a3, list a4)
dimension make_dimension(expression a1, expression a2, list a3)
bool entity_is_argument_p(entity e, cons *args)
#define value_minus(v1, v2)
#define value_min(v1, v2)
#define value_decrement(ref)
#define VALUE_TO_INT(val)
#define value_uminus(val)
unary operators on values
#define value_max(v1, v2)
#define value_addto(ref, val)
#define value_div(v1, v2)
Pbase vect_add_variable(Pbase b, Variable v)
package vecteur - routines sur les bases
static graph dg
dg is the dependency graph ; FIXME : should not be static global ?
#define contrainte_vecteur(c)
passage au champ vecteur d'une contrainte "a la Newgen"
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 ...
Pcontrainte contrainte_new(void)
package contrainte - allocations et desallocations
void contrainte_chg_sgn(Pcontrainte)
void contrainte_chg_sgn(Pcontrainte eq): changement de signe d'une contrainte, i.e.
struct _newgen_struct_dg_arc_label_ * dg_arc_label
#define CONFLICT(x)
CONFLICT.
#define dg_arc_label_conflicts(x)
#define conflict_source(x)
entity make_phi_entity(int)
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
bool number_of_elements(list, intptr_t *)
flint_utils.c
#define successor_arc_label(x)
#define vertex_successors(x)
#define SUCCESSOR(x)
SUCCESSOR.
#define graph_vertices(x)
#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)
list gen_copy_seq(list l)
Copy a list structure.
#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.
void gen_free_list(list l)
free the spine of the list
#define MAPL(_map_list_cp, _code, _l)
Apply some code on the addresses of all the elements of a list.
#define list_undefined
Undefined list definition :-)
bool assignment_statement_p(statement)
Test if a statement is an assignment.
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.
int vect_size(Pvecteur v)
package vecteur - reductions
#define DENOMINATOR(matrix)
int DENOMINATEUR(matrix): acces au denominateur global d'une matrice matrix La combinaison *(&()) est...
#define ACCESS(matrix, column, i, j)
Macros d'acces aux elements d'une matrice.
#define matrice_new(n, m)
Allocation et desallocation d'une matrice.
Value * matrice
package matrice
void matrice_general_inversion(matrice a, matrice inv_a, int n)
void matrice_general_inversion(matrice a; matrice inv_a; int n) calcul de l'inversion du matrice gene...
void matrice_normalize(matrice a, int n, int m)
void matrice_normalize(matrice a, int n, int m)
void matrice_fprint(FILE *, matrice, int, int)
matrice_io.c
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
#define DYNAMIC_AREA_LOCAL_NAME
#define MODULE_SEP_STRING
string bool_to_string(bool)
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define HASH_MAP(k, v, code, ht)
#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)
void AddEntityToDeclarations(entity e, entity module)
END_EOLE.
int add_variable_to_area(entity a, entity v)
void set_dimensions_of_local_variables(hash_table v_to_lllv, Pbase basis, tiling tile, hash_table llv_to_lcr)
void loop_nest_to_local_variables(entity initial_module, entity compute_module, entity memory_module, hash_table llv_to_lcr, hash_table r_to_llv, hash_table v_to_lllv, hash_table r_to_ud, hash_table v_to_esv, hash_table v_to_nlv, list lpv, statement body, Pbase indices, graph dg, int bn, int ls, int pd, tiling tile)
for the phi variable
list make_new_local_variables(entity v, entity compute_module, int number, int pd, hash_table v_to_lllv)
bool reference_conflicting_test_and_update(reference r, graph dg, hash_table v_to_lllv, hash_table llv_to_lcr, hash_table r_to_llv, hash_table r_to_ud)
reference_conflicting_test_and_update():
dg_vertex_label vertex_label
entity make_emulated_shared_variable(entity v, entity memory_module, int bn, int ls)
Psysteme make_tile_constraints(matrice P, Pbase b)
Psysteme make_tile_constraints(P, b):
dg_arc_label arc_label
Code Generation for Distributed Memory Machines.
void set_dimensions_of_local_variable_family(list llv, Psysteme tc, list lr, tiling tile, int dimn)
void set_dimensions_of_local_variable_family(llv, tc, lr):
entity find_or_create_emulated_shared_variable(entity v, entity memory_module, hash_table v_to_esv, int bn, int ls)
bool reference_conflicting_p(reference r1, reference r2, graph dg)
sentence Sentence_Variable(entity e)
void print_reference_list(list lr)
void print_reference(reference r)
static int tc
Internal variables
#define NORMALIZE_EXPRESSION(e)
#define make_entity(n, t, s, i)
#define instruction_block(i)
entity FindEntity(const char *package, const char *name)
Retrieve an entity from its package/module name and its local 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...
const char * module_local_name(entity e)
Returns the module local user name.
void print_entities(list l)
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)
expression find_ith_expression(list le, int r)
find_ith_expression() is obsolet; use find_ith_argument() instead
list expression_to_reference_list(expression e, list lr)
conversion of an expression into a list of references; references are appended to list lr as they are...
int dimension_size(dimension)
this function computes the size of a dimension.
type MakeTypeVariable(basic, cons *)
BEGIN_EOLE.
#define REFERENCE(x)
REFERENCE.
#define normalized_linear_p(x)
#define reference_variable(x)
#define dimension_lower(x)
#define entity_storage(x)
#define EXPRESSION(x)
EXPRESSION.
#define entity_undefined_p(x)
#define dimension_upper(x)
#define reference_indices(x)
#define dimension_undefined
#define instruction_call_p(x)
#define variable_dimensions(x)
#define statement_instruction(x)
#define instruction_call(x)
#define call_arguments(x)
#define normalized_linear(x)
#define type_variable_p(x)
#define entity_domain
newgen_syntax_domain_defined
#define variable_basic(x)
#define STATEMENT(x)
STATEMENT.
#define storage_undefined
#define entity_initial(x)
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,...
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_minmax_of_variable(Psysteme ps, Variable var, Value *pmin, Value *pmax)
void sc_minmax_of_variable(Psysteme ps, Variable var, Value *pmin, *pmax): examine un systeme pour tr...
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 ...
Psysteme sc_normalize(Psysteme ps)
Psysteme sc_normalize(Psysteme ps): normalisation d'un systeme d'equation et d'inequations lineaires ...
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.
void print_sentence(FILE *fd, sentence s)
FI: just to make sure that text.h is built; pips-makemake -l does not tale into account a library who...
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
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;.
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...
#define EMULATED_SHARED_MEMORY_PREFIX
Header File for WP65.
#define LOCAL_MEMORY_SEPARATOR
#define LOCAL_MEMORY_PREFIX