25 #include "pips_config.h"
57 #include "resources.h"
59 #include "constants.h"
86 bool first_reference =
true;
88 for(; !
ENDP(lexpr);
POP(lexpr)) {
94 (void)
fprintf(stderr,
"reference list:");
96 (void)
fprintf(stderr,
"first_reference=%s\n",
99 for(consr = lr; !
ENDP(consr) ;
POP(consr)) {
102 if (first_reference) {
104 (void)
fprintf(stderr,
"list lwr_local:");
108 first_reference =
false;
112 debug(8,
"loop_nest_to_local_variables",
113 "Variable %s is not private\n",
116 (void)
fprintf(stderr,
"list lwr_local:");
118 (void)
fprintf(stderr,
"list lwr : ");
141 "call-communications - not assignment\n");
174 "loop_instruction_to_communications: non implemented case \n");
179 fetch_map,store_map,r_to_ud,lpv);
199 debug(8,
"statement_to_communications",
"begin with tag %d\n",
206 "statement_to_communications-instruction block- begin\n");
217 "statement_to_communications-instruction block- end\n");
221 (void)
fprintf(stderr,
"not implemented\n");
226 "statement_to_communications-instruction loop- begin\n");
234 "statement_to_communications-instruction loop- end\n");
239 (void)
fprintf(stderr,
"statement_to_communications-instruction call- begin\n");
242 fetch_map,store_map,r_to_ud,lpv);
244 (void)
fprintf(stderr,
"statement_to_communications-instruction call- end\n");
278 fetch_map,store_map, r_to_ud1,&lpv);
286 bool load_code,
entity var_id)
294 for (lrs =lrefs ; !
ENDP(lrs) ;
POP(lrs)) {
307 bool load_code,
statement computational_or_emulator,
320 entity compute_or_memory_module,
333 pips_assert(
"true",compute_or_memory_module==compute_or_memory_module
334 && load_code==load_code);
349 for (lrs = lrefs; !
ENDP(lrs);
POP(lrs)) {
364 "[array_indices_communication ERROR]--> NON LINEAR funct.\n");
394 pvi = pvi->
succ,j++) {
399 (loop_indices,tile, tile_delay,
400 tile_indices,tile_local_indices,j);
459 int bn,
int ls,
list lt,
460 bool load_code,
entity proc_id,
461 entity var_id,
bool fully_sequential,
469 load_code,var_id,loop_indices,tile,
471 tile_indices,tile_local_indices);
480 if (!fully_sequential) {
528 int bn,
int ls,
list lt,
bool load_code,
537 if (!fully_sequential) {
550 lst,!load_code,proc_id);
552 lt,load_code,proc_id);
575 loop newloop =
make_loop(ent1,looprange, loopbody, looplabel,
607 list *new_slst,
list *new_blist,
bool fully_sequential,
614 " communication to be inserted at run time stat no %"PRIdPTR
": ",
625 ent1,fully_sequential,
626 loop_indices,tile, tile_delay,tile_indices,
632 ls,lt,!
load, proc_id,
633 ent1,fully_sequential);
635 *new_blist =
gen_nconc(*new_blist,ccode);
641 list list_statement_block,
644 bool fully_sequential,
660 bank_indices,bn,ls,proc_id,
664 &new_slst1,new_blist,
665 v_to_esv,fully_sequential,
666 loop_indices,tile, tile_delay,
667 tile_indices,tile_local_indices);
682 bank_indices,bn,ls,proc_id,
683 nbody,fetch_map,store_map,new_slst,
685 v_to_esv,fully_sequential,
686 loop_indices,tile, tile_delay,
687 tile_indices,tile_local_indices);
704 v_to_esv,new_slst,new_blist,fully_sequential,
705 loop_indices,tile, tile_delay,tile_indices,
718 v_to_esv,new_slst,new_blist,fully_sequential,
719 loop_indices,tile, tile_delay,tile_indices,
729 }, list_statement_block);
748 fetch_map,store_map);
757 fetch_map,store_map));
772 list_statement_block);
execution make_execution(enum execution_utype tag, void *val)
loop make_loop(entity a1, range a2, statement a3, entity a4, execution a5, list a6)
reference make_reference(entity a1, list a2)
range make_range(expression a1, expression a2, expression a3)
struct _newgen_struct_entity_ * entity
static reference ref
Current stmt (an integer)
bool entity_is_argument_p(entity e, cons *args)
#define value_increment(ref)
#define int_to_value(i)
end LINEAR_VALUE_IS_INT
#define value_minus(v1, v2)
#define value_notzero_p(val)
#define value_uminus(val)
unary operators on values
#define value_plus(v1, v2)
binary operators on values
Pvecteur make_loop_indice_equation(Pbase loop_indices, tiling tile, Pvecteur tile_delay, Pvecteur tile_indices, Pvecteur tile_local_indices, int rank)
PACKAGE MOVEMENTS.
void insert_run_time_communications(entity compute_module, entity memory_module, Pbase bank_indices, int bn, int ls, entity proc_id, list list_statement_block, statement_mapping fetch_map, statement_mapping store_map, list *new_slst, list *new_blist, hash_table v_to_esv, bool fully_sequential, Pbase loop_indices, tiling tile, Pvecteur tile_delay, Pvecteur tile_indices, Pvecteur tile_local_indices)
bool test_run_time_communications(list list_statement_block, statement_mapping fetch_map, statement_mapping store_map)
void include_constant_symbolic_communication(entity compute_or_memory_module, list lrefs, bool load_code, statement computational_or_emulator, entity var_id)
static list array_indices_communication(entity compute_or_memory_module, Pbase bank_indices, int bn, int ls, list lrefs, bool load_code, entity var_id, Pbase loop_indices, tiling tile, Pvecteur tile_delay, Pvecteur tile_indices, Pvecteur tile_local_indices)
void loop_instruction_to_communications(statement stmt, statement st_level1, statement st_level2, list *lwr, list *lwr_local, statement_mapping *fetch_map, statement_mapping *store_map, hash_table r_to_ud, list *lpv)
This function associates to each variable in the loop the statement where it should be communicated (...
void call_instruction_to_communications(statement s, statement st_level1, statement st_level2, list *lwr, list *lwr_local, statement_mapping *fetch_map, statement_mapping *store_map, hash_table r_to_ud, list *lpv)
This function associates to each variable in the call statement the statement where it should be comm...
static void insert_array_scalar_access_movement(entity compute_module, entity memory_module, Pbase bank_indices, int bn, int ls, entity proc_id, entity ent1, list lt, statement stat, bool load, hash_table v_to_esv, list *new_slst, list *new_blist, bool fully_sequential, Pbase loop_indices, tiling tile, Pvecteur tile_delay, Pvecteur tile_indices, Pvecteur tile_local_indices)
static list constant_symbolic_communication(entity compute_or_memory_module, list lrefs, bool load_code, entity var_id)
dg_vertex_label vertex_label
void statement_to_communications(statement stmt, statement st_level1, statement st_level2, list *lwr, list *lwr_local, statement_mapping *fetch_map, statement_mapping *store_map, hash_table r_to_ud, list *lpv)
This function associates to each variable in stmt the statement where it should be communicated.
list array_scalar_access_to_bank_communication(entity memory_module, Pbase bank_indices, int bn, int ls, list lt, bool load_code, entity proc_id, entity var_id, bool fully_sequential)
dg_arc_label arc_label
Computation of communications needed for generating distributed code in PUMA.
void compute_communications(list l, statement_mapping *fetch_map, statement_mapping *store_map)
This function associates to each variable the statement in l where it should be communicated Fecth_ma...
static list build_esv_list(list lt, hash_table v_to_esv, Pbase bank_indices)
static list array_scalar_access_to_compute_communication(entity compute_module, Pbase bank_indices, int bn, int ls, list lt, bool load_code, entity proc_id, entity var_id, bool fully_sequential, Pbase loop_indices, tiling tile, Pvecteur tile_delay, Pvecteur tile_indices, Pvecteur tile_local_indices)
statement make_block_statement(list)
Make a block statement from a list of statement.
statement make_empty_block_statement(void)
Build an empty statement (block/sequence)
#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)
#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 MAPL(_map_list_cp, _code, _l)
Apply some code on the addresses of all the elements of a list.
statement make_assign_statement(expression, expression)
bool assignment_statement_p(statement)
Test if a statement is an assignment.
statement make_test_statement(expression, statement, statement)
hash_table hash_table_make(hash_key_type key_type, size_t size)
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.
static entity(* load)(entity)
statement make_movement_scalar_wp65(entity module, bool receive_code, reference r, entity var_id)
statement make_movement_scalar_wp65(receive_code,r)
#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.
expression make_div_expression(expression, cons *)
operation.c
#define GET_STATEMENT_MAPPING(map, stat)
string bool_to_string(bool)
#define HASH_UNDEFINED_VALUE
value returned by hash_get() when the key is not found; could also be called HASH_KEY_NOT_FOUND,...
normalized NormalizeSyntax(syntax s)
void print_reference_list(list lr)
static void norm(struct rproblem *RR)
cette procedure normalise la fonction cout, calcule les valeurs des seconds membres resultant d'une n...
list expression_to_operand_list(expression e, list lr)
This function gives the list of operands belonging to Expression e.
void reference_list_print(list l)
This function prints the references belonging to l.
void reference_list_add(list *l1, list *l2)
This function adds all the references of l2 to l1 if they don't appear in l1.
void reference_list_update(list *l, reference r)
This function add Reference r to List l, if r doesn't belong to l.
bool array_indice_in_list_p(reference r, list lwr)
bool reference_in_list_p(reference r, list lwr)
This function tests whether at least one array indice of Reference r belongs to List lwr or not.
void update_map(statement_mapping m, statement st, reference r)
#define loop_to_statement(l)
#define EQUAL_OPERATOR_NAME
#define NORMALIZE_EXPRESSION(e)
#define is_instruction_block
soft block->sequence transition
#define instruction_block(i)
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 make_loop_label(int __attribute__((unused)) desired_number, entity module)
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 MakeBinaryCall(entity f, expression eg, expression ed)
Creates a call expression to a function with 2 arguments.
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_scalar_p(reference r)
This function returns true if Reference r is scalar.
entity make_new_module_variable(entity, int)
Make a new module integer variable of name X<d>.
void AddEntityToDeclarations(entity, entity)
END_EOLE.
#define REFERENCE(x)
REFERENCE.
#define normalized_linear_p(x)
#define reference_variable(x)
#define instruction_loop(x)
#define dimension_lower(x)
#define EXPRESSION(x)
EXPRESSION.
@ is_instruction_unstructured
#define instruction_tag(x)
#define dimension_upper(x)
#define reference_indices(x)
struct _newgen_struct_instruction_ * instruction
#define instruction_call_p(x)
#define variable_dimensions(x)
#define statement_instruction(x)
#define instruction_call(x)
#define call_arguments(x)
#define statement_number(x)
#define normalized_linear(x)
#define expression_syntax(x)
#define type_variable_p(x)
#define STATEMENT(x)
STATEMENT.
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
Pvecteur vect_multiply(Pvecteur v, Value x)
Pvecteur vect_multiply(Pvecteur v, Value x): multiplication du vecteur v par le scalaire x,...
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.
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_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
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...