PIPS
|
Go to the source code of this file.
Macros | |
#define | WP65_INCLUDED |
Warning! Do not modify this file that is automatically generated! More... | |
#define | EMULATED_SHARED_MEMORY_PREFIX "ES_" |
#define | LOCAL_MEMORY_PREFIX "L_" |
#define | LOCAL_MEMORY_SEPARATOR "_" |
#define | COMPUTE_ENGINE_NAME "WP65" |
#define | BANK_NAME "BANK" |
#define WP65_SUFFIX "_WP65" More... | |
#define | PROCESSOR_IDENTIFIER "PROC_ID" |
#define MEMORY_EMULATOR_SUFFIX "_BANK" More... | |
#define | BANK_IDENTIFIER "BANK_ID" |
#define | BANK_LINE_IDENTIFIER "L" |
#define | BANK_OFFSET_IDENTIFIER "O" |
#define | SUFFIX_FOR_INDEX_TILE_IN_INITIAL_BASIS "_1" |
#define | SUFFIX_FOR_INDEX_TILE_IN_TILE_BASIS "_0" |
#define | PREFIX_FOR_LOCAL_TILE_BASIS "L_" |
#define | PIPELINE_DEPTH 1 |
These values should be read in model.rc (FI, 20/11/91) #define PROCESSOR_NUMBER 4 #define BANK_NUMBER 4 #define LINE_SIZE 25 More... | |
#define | MAXIMUM_LOCAL_VARIABLE_NAME_SIZE 256 |
Variables | |
Value | offset_dim1 |
WP65_INCLUDED. More... | |
Value | offset_dim2 |
#define PIPELINE_DEPTH 1 |
#define PROCESSOR_IDENTIFIER "PROC_ID" |
#define WP65_INCLUDED |
Warning! Do not modify this file that is automatically generated!
Modify src/Libs/wp65/wp65-local.h instead, to add your own modifications. header file built by cproto wp65-local.h Header File for WP65
Francois Irigoin, Corinne Ancourt, Lei Zhou
September 1991
lwr | wr |
Definition at line 140 of file references.c.
References CAR, CDR, EXPRESSION, expression_to_reference_list(), MAPL, NIL, REFERENCE, reference_in_list_p(), and reference_indices.
Referenced by call_instruction_to_communications().
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 | ||
) |
Generation of the emulated shared memory code corresponding to the transfer of a scalar array element :
CALL BANK_RECEIVE_4(PROC_ID, X1, 1) CALL BANK_RECEIVE_4(PROC_ID, L, 1) CALL BANK_RECEIVE_4(PROC_ID, O, 1) IF (BANK_ID = X1) THEN CALL BANK_SEND_4(PROC_ID, ES_B(O,L), 1) ENDIF
memory_module | emory_module |
bank_indices | ank_indices |
bn | n |
ls | s |
lt | t |
load_code | oad_code |
proc_id | roc_id |
var_id | ar_id |
fully_sequential | ully_sequential |
Definition at line 527 of file communications.c.
References AddEntityToDeclarations(), CONS, constant_symbolic_communication(), entity_intrinsic(), EQUAL_OPERATOR_NAME, gen_nconc(), int_to_expression(), is_execution_parallel, loop_to_statement, make_block_statement(), make_empty_block_statement(), make_execution(), make_loop(), make_loop_label(), make_new_module_variable(), make_range(), make_reference(), make_test_statement(), make_vecteur_expression(), MakeBinaryCall(), NIL, pips_assert, REFERENCE, STATEMENT, Svecteur::succ, UU, VALUE_ONE, Svecteur::var, and vect_new().
Referenced by insert_array_scalar_access_movement().
Psysteme build_sc_with_several_uniform_ref | ( | entity | module, |
cons * | lr, | ||
Psysteme | sc_domain, | ||
Pbase * | new_index_base | ||
) |
build_sc_with_several_uniform_ref():
Build the set of constraints describing the array function for the set of uniform references to the array and update the system describing the domain with constraints on new variables
build the system of constraints describing the array function. One constraint for each dimension of the array is built. This constraint is put in the system of inequalities of sc_array_function
update the system describing the image function with the others array functions having a uniform dependence with the first one for example, assume we have A(i,j) and A(i+2,j+3)
then the final system will be : i + 2 X1 <= 0 j - 3 X1 <= 0 X1 is new variable
add to the system of constraints describing the domain the set of constraints on the new variables. If X1,X2,...Xn are these new variables the set of constraints added is: 0 <= X1 <= 1 0 <= X2 <= 1 - X1 0 <= X3 <= 1 - X1 -X2 0<= Xn <= 1 - X1 - X2 ... -Xn-1
module | odule |
lr | r |
sc_domain | c_domain |
new_index_base | ew_index_base |
Definition at line 1011 of file code.c.
References Ssysteme::base, CAR, CDR, contrainte_make(), debug(), Ssysteme::dimension, ENDP, entity_local_name(), EXPRESSION, fprintf(), ifdebug, Ssysteme::inegalites, module, Ssysteme::nb_ineq, new_variable, NIL, norm(), NORMALIZE_EXPRESSION, normalized_linear, normalized_linear_p, pips_internal_error, POP, print_reference(), REFERENCE, reference_indices, sc_add_new_variable_name(), sc_creer_base(), sc_dup(), sc_fprint(), sc_new(), Scontrainte::succ, Svecteur::succ, TCST, VALUE_MONE, value_notzero_p, VALUE_ONE, VALUE_ZERO, Svecteur::var, VARIABLE_UNDEFINED, vect_add_variable(), vect_chg_coeff(), vect_chg_sgn(), vect_dup(), vect_size(), vect_substract(), Scontrainte::vecteur, VECTEUR_NUL, VECTEUR_NUL_P, and vecteur_val.
Referenced by make_load_blocks(), and make_store_blocks().
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 | ||
) |
first reference in statement s
st_level1 | t_level1 |
st_level2 | t_level2 |
lwr | wr |
lwr_local | wr_local |
fetch_map | etch_map |
store_map | tore_map |
r_to_ud | _to_ud |
lpv | pv |
Definition at line 67 of file communications.c.
References array_indice_in_list_p(), assignment_statement_p(), bool_to_string(), call_arguments, CAR, debug(), ENDP, entity_is_argument_p(), entity_local_name(), EXPRESSION, expression_to_operand_list(), fprintf(), ifdebug, instruction_call, NIL, pips_assert, POP, print_reference_list(), REFERENCE, reference_in_list_p(), reference_list_print(), reference_list_update(), reference_scalar_p(), reference_variable, statement_instruction, and update_map().
Referenced by statement_to_communications().
void call_to_wp65_code | ( | statement | s, |
entity | compute_module, | ||
entity | memory_module, | ||
entity | bank_id, | ||
entity | proc_id, | ||
statement | computational, | ||
statement | emulator, | ||
statement_mapping | fetch_map, | ||
statement_mapping | store_map, | ||
hash_table | v_to_esv | ||
) |
To deal with implied_do and I/Os
communications for variables having to be loaded in local memories for assignments
communications for variables having to be stored in global memory for assignments
compute_module | ompute_module |
memory_module | emory_module |
bank_id | ank_id |
proc_id | roc_id |
computational | omputational |
emulator | mulator |
fetch_map | etch_map |
store_map | tore_map |
v_to_esv | _to_esv |
Definition at line 267 of file instruction_to_wp65_code.c.
References call_function, CONS, copy_statement(), entity_local_name(), fprintf(), gen_nconc(), generate_io_wp65_code(), GET_STATEMENT_MAPPING, HASH_UNDEFINED_VALUE, ifdebug, include_constant_symbolic_communication(), instruction_block, instruction_call, NIL, reference_list_print(), STATEMENT, statement_instruction, and statement_number.
Referenced by instruction_to_wp65_code().
This function classifies the references in lists.
All the references belonging to the same list are uniform dependent references
llr | lr |
Definition at line 975 of file code.c.
References CAR, CDR, CONS, debug(), LIST, NIL, REFERENCE, and uniform_dependence_p().
Referenced by make_load_blocks(), and make_store_blocks().
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_map contains for each statement the list of variables having to be communicated before its execution.
Store_map contains for each statement the list of variables having to be communicated after its execution.
list of written variables
list of variables written in a local instruction block
list of privates variables
fetch_map | etch_map |
store_map | tore_map |
Definition at line 267 of file communications.c.
References CAR, hash_pointer, hash_table_make(), MAPL, NIL, s1, STATEMENT, and statement_to_communications().
Referenced by module_to_wp65_modules().
computation of the list of loop indices base_index and of the iteration domain sci
list_loop_statement | ist_loop_statement |
sc | c |
basis | asis |
Definition at line 92 of file find_iteration_domain.c.
References Ssysteme::base, BASE_NULLE, base_reversal(), debug(), entity_local_name(), fprintf(), ifdebug, loop_iteration_domaine_to_sc(), and vect_fprint().
Referenced by find_iteration_domain().
void concat_data_list | ( | list * | l, |
list * | lr, | ||
statement | st, | ||
statement_mapping | map, | ||
bool | perfect_nested_loop | ||
) |
lr | r |
st | t |
map | ap |
perfect_nested_loop | erfect_nested_loop |
Definition at line 236 of file references.c.
References CAR, GET_STATEMENT_MAPPING, HASH_UNDEFINED_VALUE, instruction_block, instruction_loop, instruction_tag, is_instruction_block, is_instruction_loop, list_of_calls_p(), loop_body, MAPL, reference_list_add(), STATEMENT, statement_instruction, and variable_list_add().
Referenced by loop_nest_movement_generation().
module | odule |
pv | v |
st | t |
Definition at line 61 of file basis.c.
References AddEntityToDeclarations(), concatenate(), entity_domain, entity_local_name(), entity_undefined, free(), gen_find_tabulated(), make_scalar_integer_entity(), module, module_local_name(), MODULE_SEP_STRING, strdup(), and vecteur_var.
Referenced by create_tile_basis().
module | odule |
pv | v |
st | t |
Definition at line 80 of file basis.c.
References AddEntityToDeclarations(), concatenate(), entity_domain, entity_local_name(), entity_undefined, free(), gen_find_tabulated(), make_scalar_integer_entity(), module, module_local_name(), MODULE_SEP_STRING, strdup(), and vecteur_var.
Referenced by create_tile_basis().
void create_tile_basis | ( | entity | initial_module, |
entity | compute_module, | ||
entity | memory_module, | ||
Pbase | initial_basis, | ||
Pbase * | tile_basis_in_initial_basis, | ||
Pbase * | tile_basis_in_tile_basis, | ||
Pbase * | local_tile_basis, | ||
Pbase * | tile_basis_in_tile_basis2, | ||
Pbase * | local_tile_basis2 | ||
) |
initial_module | nitial_module |
compute_module | ompute_module |
memory_module | emory_module |
initial_basis | nitial_basis |
tile_basis_in_initial_basis | ile_basis_in_initial_basis |
tile_basis_in_tile_basis | ile_basis_in_tile_basis |
local_tile_basis | ocal_tile_basis |
tile_basis_in_tile_basis2 | ile_basis_in_tile_basis2 |
local_tile_basis2 | ocal_tile_basis2 |
Definition at line 100 of file basis.c.
References base_fprint(), BASE_NULLE, base_reversal(), concatenate(), create_local_index(), create_local_index2(), debug(), entity_domain, entity_local_name(), entity_undefined, fprintf(), free(), gen_find_tabulated(), ifdebug, make_scalar_integer_entity(), module_local_name(), MODULE_SEP_STRING, PREFIX_FOR_LOCAL_TILE_BASIS, strdup(), Svecteur::succ, SUFFIX_FOR_INDEX_TILE_IN_INITIAL_BASIS, SUFFIX_FOR_INDEX_TILE_IN_TILE_BASIS, vect_add_variable(), vect_fprint(), VECTEUR_NUL_P, and vecteur_var.
Referenced by loop_nest_to_wp65_code().
void delete_statement_fetch | ( | statement | ) |
void delete_statement_store | ( | statement | ) |
module | odule |
min | in |
Definition at line 141 of file code.c.
References eval_var(), fprintf(), gen_recurse, gen_true(), ifdebug, min, module, reference_domain, var_minmax, var_to_evaluate, and wp65_debug_print_text().
list expression_to_operand_list | ( | expression | e, |
list | lr | ||
) |
This function gives the list of operands belonging to Expression e.
lr | r |
Definition at line 96 of file references.c.
References call_arguments, CAR, CONS, EXPRESSION, expression_syntax, fprintf(), gen_nconc(), is_syntax_call, is_syntax_range, is_syntax_reference, MAPL, NIL, range_increment, range_lower, range_upper, REFERENCE, syntax_call, syntax_range, syntax_reference, and syntax_tag.
Referenced by call_instruction_to_communications().
entity find_or_create_emulated_shared_variable | ( | entity | v, |
entity | memory_module, | ||
hash_table | v_to_esv, | ||
int | bn, | ||
int | ls | ||
) |
nothing to do
memory_module | emory_module |
v_to_esv | _to_esv |
bn | n |
ls | s |
Definition at line 284 of file variable.c.
References concatenate(), EMULATED_SHARED_MEMORY_PREFIX, entity_domain, entity_local_name(), entity_undefined, gen_find_tabulated(), hash_put(), make_emulated_shared_variable(), and MODULE_SEP_STRING.
Referenced by loop_nest_to_local_variables().
void fprint_wp65_hash_tables | ( | FILE * | fd, |
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 | ||
) |
Ignore this function: debugging purposes only.
fd | d |
llv_to_lcr | lv_to_lcr |
r_to_llv | _to_llv |
v_to_lllv | _to_lllv |
r_to_ud | _to_ud |
v_to_esv | _to_esv |
Definition at line 406 of file wp65.c.
References CAR, CDR, ENDP, ENTITY, entity_local_name(), entity_name, fprint_reference(), fprintf(), HASH_MAP, intptr_t, is_action_read, LIST, POP, and REFERENCE.
Referenced by loop_nest_to_wp65_code().
void free_fetch_map | ( | void | ) |
void free_store_map | ( | void | ) |
bool full_parallel_loop_nest_p | ( | statement | mod_stat, |
statement | loop_stmt, | ||
int | nest_dim, | ||
graph | dg, | ||
bool * | loop_carried_dep | ||
) |
mod_stat | od_stat |
loop_stmt | oop_stmt |
nest_dim | est_dim |
dg | g |
loop_carried_dep | oop_carried_dep |
Definition at line 1119 of file instruction_to_wp65_code.c.
References dg, mod_stat, and search_parallel_loops().
Referenced by loop_nest_to_wp65_code().
statement generate_io_wp65_code | ( | statement | s1, |
statement | body, | ||
hash_table | v_to_esv, | ||
bool | loop_or_call_print | ||
) |
we know that it is a loop nest containing a PRINT function The loop body contains block statement in case of CONTINUE loop nest style
loop nest belonging IO statement
implied_do case
s1 | 1 |
body | ody |
v_to_esv | _to_esv |
loop_or_call_print | oop_or_call_print |
Definition at line 406 of file instruction_to_wp65_code.c.
References CAR, copy_expression(), DIMENSION, dimension_lower, dimension_upper, ENDP, entity_type, gen_length(), gen_nreverse(), gen_nthcdr(), hash_get(), implied_do_range_list, implied_do_ranges(), instruction_block, instruction_block_p, instruction_call, int_to_expression(), ith_loop_in_loop_nest(), loop_range, make_range(), NIL, pl, POP, RANGE, range_lower, range_upper, reference_variable, s1, STATEMENT, statement_instruction, statement_ordering, STATEMENT_ORDERING_UNDEFINED, translate_IO_ref(), type_variable, and variable_dimensions.
Referenced by call_to_wp65_code(), and loop_nest_to_wp65_code().
statement_mapping get_fetch_map | ( | void | ) |
ppn | pn |
pbn | bn |
pls | ls |
Definition at line 71 of file model.c.
References fopen_config(), get_string_property(), and model_fscan().
Referenced by wp65().
statement_mapping get_store_map | ( | void | ) |
void include_constant_symbolic_communication | ( | entity | compute_or_memory_module, |
list | lrefs, | ||
bool | load_code, | ||
statement | computational_or_emulator, | ||
entity | var_id | ||
) |
Add data movements to the appropriated module
compute_or_memory_module | ompute_or_memory_module |
lrefs | refs |
load_code | oad_code |
computational_or_emulator | omputational_or_emulator |
var_id | ar_id |
Definition at line 305 of file communications.c.
References constant_symbolic_communication(), gen_nconc(), instruction_block, and statement_instruction.
Referenced by call_to_wp65_code(), and loop_nest_to_wp65_code().
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 | ||
) |
compute_module | ompute_module |
memory_module | emory_module |
bank_indices | ank_indices |
bn | n |
ls | s |
proc_id | roc_id |
list_statement_block | ist_statement_block |
fetch_map | etch_map |
store_map | tore_map |
new_slst | ew_slst |
new_blist | ew_blist |
v_to_esv | _to_esv |
fully_sequential | ully_sequential |
loop_indices | oop_indices |
tile | ile |
tile_delay | ile_delay |
tile_indices | ile_indices |
tile_local_indices | ile_local_indices |
Definition at line 639 of file communications.c.
References AddEntityToDeclarations(), CAR, CONS, entity_undefined, gen_nconc(), GET_STATEMENT_MAPPING, HASH_UNDEFINED_VALUE, insert_array_scalar_access_movement(), instruction_block, instruction_call_p, instruction_loop, instruction_tag, is_instruction_block, is_instruction_call, is_instruction_loop, loop_body, make_block_statement(), make_new_module_variable(), MAPL, NIL, STATEMENT, and statement_instruction.
Referenced by loop_nest_to_wp65_code().
void instruction_to_wp65_code | ( | entity | module, |
list | l, | ||
graph | dg, | ||
int | pn, | ||
int | bn, | ||
int | ls, | ||
int | pd, | ||
entity | proc_id, | ||
entity | proc_id_mm, | ||
Pbase | bank_indices, | ||
hash_table | v_to_esv, | ||
hash_table | v_to_nlv, | ||
entity | compute_module, | ||
statement | computational, | ||
entity | memory_module, | ||
statement | emulator, | ||
statement_mapping | fetch_map, | ||
statement_mapping | store_map | ||
) |
cms
FI: the semantics has been changed: the next two get_xxx() cannot/should not return something undefined.
if ((cme = get_current_module_entity()) == entity_undefined)
FI: already done somewhere else
set_current_module_entity(local_name_to_top_level_entity(module_local_name(module)));
if ((cms = get_current_module_statement()) == statement_undefined)
FI: shouldn't the current statement be retrieved at the same time as the current module?
reset_current_module_entity();
module | odule |
dg | g |
pn | n |
bn | n |
ls | s |
pd | d |
proc_id | roc_id |
proc_id_mm | roc_id_mm |
bank_indices | ank_indices |
v_to_esv | _to_esv |
v_to_nlv | _to_nlv |
compute_module | ompute_module |
computational | omputational |
memory_module | emory_module |
emulator | mulator |
fetch_map | etch_map |
store_map | tore_map |
Definition at line 175 of file instruction_to_wp65_code.c.
References call_to_wp65_code(), CAR, db_get_memory_resource(), debug_off, debug_on, dg, fprintf(), get_current_module_statement(), ifdebug, instruction_block, instruction_tag, is_instruction_block, is_instruction_call, is_instruction_goto, is_instruction_loop, is_instruction_test, is_instruction_unstructured, loop_nest_to_wp65_code(), MAPL, mod_stat, module, module_local_name(), pips_internal_error, reset_current_module_statement(), return_statement_p(), s1, set_current_module_statement(), STATEMENT, statement_instruction, and Svecteur::var.
Referenced by module_to_wp65_modules().
Test if the statement resulting from the perfectly_loop_nest_to_body function contains at first call an io.
st | t |
Definition at line 467 of file instruction_to_wp65_code.c.
References call_function, CAR, entity_local_name(), instruction_block, instruction_block_p, instruction_call, STATEMENT, and statement_instruction.
Referenced by loop_nest_to_wp65_code().
void iteration_domain_from_statement | ( | list * | list_loop_statement, |
statement | s, | ||
int * | nested_level, | ||
list * | blocks, | ||
instruction * | inst | ||
) |
case where there is a unique assignment in do-enddo loop nest
list_loop_statement | ist_loop_statement |
nested_level | ested_level |
blocks | locks |
inst | nst |
Definition at line 116 of file find_iteration_domain.c.
References blocks, CAR, CDR, CONS, continue_statement_p(), debug(), gen_length(), instruction_block, instruction_loop, instruction_loop_p, instruction_tag, is_instruction_block, is_instruction_call, is_instruction_goto, is_instruction_loop, is_instruction_test, is_instruction_unstructured, loop_body, make_instruction_block(), NIL, pips_internal_error, STATEMENT, statement_instruction, and true.
Referenced by find_iteration_domain().
level | evel |
Definition at line 146 of file instruction_to_wp65_code.c.
References entity_undefined, EXPRESSION, expression_syntax, gen_nth(), level, reference_indices, reference_variable, syntax_reference, and syntax_reference_p.
s1 | 1 |
level | evel |
Definition at line 158 of file instruction_to_wp65_code.c.
References CAR, instruction_block, instruction_block_p, instruction_loop, level, loop1, loop_body, s1, STATEMENT, and statement_instruction.
Referenced by generate_io_wp65_code().
lsb | sb |
Definition at line 136 of file instruction_to_wp65_code.c.
References CAR, CDR, NIL, pl, STATEMENT, and statement_call_p().
Referenced by concat_data_list(), and loop_nest_to_wp65_code().
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 (this statement may be external to the loop).
stmt | tmt |
st_level1 | t_level1 |
st_level2 | t_level2 |
lwr | wr |
lwr_local | wr_local |
fetch_map | etch_map |
store_map | tore_map |
r_to_ud | _to_ud |
lpv | pv |
Definition at line 150 of file communications.c.
References CAR, fprintf(), instruction_block, instruction_loop, instruction_tag, is_instruction_block, is_instruction_call, loop_body, loop_index, loop_locals, make_reference(), NIL, reference_list_add(), reference_list_update(), STATEMENT, statement_instruction, and statement_to_communications().
Referenced by statement_to_communications().
void loop_nest_movement_generation | ( | entity | module, |
statement | loop_nest, | ||
int | pn, | ||
int | bn, | ||
int | ls, | ||
int | pd, | ||
entity | proc_id, | ||
entity | proc_id_mm, | ||
Pbase | bank_indices, | ||
hash_table | v_to_esv, | ||
hash_table | v_to_nlv, | ||
entity | compute_module, | ||
statement | computational, | ||
entity | memory_module, | ||
statement | emulator, | ||
statement_mapping | fetch_map, | ||
statement_mapping | store_map, | ||
statement | mod_stat, | ||
bool | fully_parallel, | ||
Psysteme | sc_tile, | ||
Pbase | initial_basis, | ||
Pbase | local_basis, | ||
Pbase | local_basis2, | ||
Pbase | tile_basis_in_tile_basis, | ||
Pbase | tile_basis_in_tile_basis2, | ||
Pbase | loop_body_indices, | ||
list | lpv, | ||
list * | lb, | ||
list * | blb, | ||
list * | sb, | ||
list * | bsb, | ||
int | first_parallel_level, | ||
int | last_parallel_level, | ||
hash_table | llv_to_lcr, | ||
hash_table | r_to_llv, | ||
hash_table | v_to_lllv, | ||
hash_table | r_to_ud | ||
) |
the list of data having to be store into the global memory is the concatenation of store_map sets of the internal loops
update of variable names according to the module of appartenance
module | odule |
loop_nest | oop_nest |
pn | n |
bn | n |
ls | s |
pd | d |
proc_id | roc_id |
proc_id_mm | roc_id_mm |
bank_indices | ank_indices |
v_to_esv | _to_esv |
v_to_nlv | _to_nlv |
compute_module | ompute_module |
computational | omputational |
memory_module | emory_module |
emulator | mulator |
fetch_map | etch_map |
store_map | tore_map |
mod_stat | od_stat |
fully_parallel | ully_parallel |
sc_tile | c_tile |
initial_basis | nitial_basis |
local_basis | ocal_basis |
local_basis2 | ocal_basis2 |
tile_basis_in_tile_basis | ile_basis_in_tile_basis |
tile_basis_in_tile_basis2 | ile_basis_in_tile_basis2 |
loop_body_indices | oop_body_indices |
lpv | pv |
lb | b |
blb | lb |
sb | b |
bsb | sb |
first_parallel_level | irst_parallel_level |
last_parallel_level | ast_parallel_level |
llv_to_lcr | lv_to_lcr |
r_to_llv | _to_llv |
v_to_lllv | _to_lllv |
r_to_ud | _to_ud |
Definition at line 483 of file instruction_to_wp65_code.c.
References CAR, concat_data_list(), debug_off, debug_on, entity_is_argument_p(), entity_local_name(), is_action_read, is_action_write, make_all_movement_blocks(), MAPL, mod_stat, module, NIL, pips_assert, REFERENCE, reference_scalar_p(), reference_variable, and sc_variables_rename().
Referenced by loop_nest_to_wp65_code().
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 | ||
) |
variable.c
variable.c
loop_nest_to_local_variables():
Key function allocating local copies according to interferences between references. It also gather information about references (which is also indirectly available in the effect information), allocate emulated shared variables, and create different mappings between local variables and references.
pips_assert("loop_nest_to_local_variables", instruction_block_p(instr));
first reference in statement s
there are only two expressions to loop over: the lhs and the rhs
FI: local variable dimensions should be set later by the caller so as to use the clustering performed here to compute space complexity, to use space complexity to define the tiling and to use the tiling to define the dimensions
initial_module | nitial_module |
compute_module | loop_nest_to_local_variables(): |
Key function allocating local copies according to interferences between references. It also gather information about references (which is also indirectly available in the effect information), allocate emulated shared variables, and create different mappings between local variables and references. initial module: achtung, this arg. is not used!?!
memory_module | loop_nest_to_local_variables(): |
Key function allocating local copies according to interferences between references. It also gather information about references (which is also indirectly available in the effect information), allocate emulated shared variables, and create different mappings between local variables and references. compute module
llv_to_lcr | loop_nest_to_local_variables(): |
Key function allocating local copies according to interferences between references. It also gather information about references (which is also indirectly available in the effect information), allocate emulated shared variables, and create different mappings between local variables and references. memory module
r_to_llv | loop_nest_to_local_variables(): |
Key function allocating local copies according to interferences between references. It also gather information about references (which is also indirectly available in the effect information), allocate emulated shared variables, and create different mappings between local variables and references. local variable to list of conflicting references
v_to_lllv | loop_nest_to_local_variables(): |
Key function allocating local copies according to interferences between references. It also gather information about references (which is also indirectly available in the effect information), allocate emulated shared variables, and create different mappings between local variables and references. reference to list of local variables
r_to_ud | loop_nest_to_local_variables(): |
Key function allocating local copies according to interferences between references. It also gather information about references (which is also indirectly available in the effect information), allocate emulated shared variables, and create different mappings between local variables and references. variable to list of lists of local variables
v_to_esv | loop_nest_to_local_variables(): |
Key function allocating local copies according to interferences between references. It also gather information about references (which is also indirectly available in the effect information), allocate emulated shared variables, and create different mappings between local variables and references. reference to use def
v_to_nlv | loop_nest_to_local_variables(): |
Key function allocating local copies according to interferences between references. It also gather information about references (which is also indirectly available in the effect information), allocate emulated shared variables, and create different mappings between local variables and references. variable to emulated shared variable
lpv | loop_nest_to_local_variables(): |
Key function allocating local copies according to interferences between references. It also gather information about references (which is also indirectly available in the effect information), allocate emulated shared variables, and create different mappings between local variables and references. variable to number of associated local variables (local to this procedure)
body | loop_nest_to_local_variables(): |
Key function allocating local copies according to interferences between references. It also gather information about references (which is also indirectly available in the effect information), allocate emulated shared variables, and create different mappings between local variables and references. private variables
indices | ndices |
dg | g |
bn | n |
ls | s |
pd | d |
tile | ile |
Definition at line 80 of file variable.c.
References assignment_statement_p(), bool_to_string(), call_arguments, CAR, CONS, debug(), dg, ENDP, entity_is_argument_p(), entity_local_name(), EXPRESSION, expression_to_reference_list(), find_or_create_emulated_shared_variable(), fprintf(), gen_free_list(), hash_get(), hash_put(), HASH_UNDEFINED_VALUE, ifdebug, indices, instruction_block, instruction_call, instruction_call_p, intptr_t, is_action_read, is_action_write, make_new_local_variables(), NIL, pips_assert, POP, print_entities(), print_reference_list(), REFERENCE, reference_conflicting_test_and_update(), reference_indices, reference_variable, set_dimensions_of_local_variables(), STATEMENT, and statement_instruction.
Referenced by loop_nest_to_wp65_code().
tiling loop_nest_to_tile | ( | Psysteme | sc, |
int | ls, | ||
Pbase | base_index, | ||
int | first_parallel_level, | ||
int | last_parallel_level, | ||
int | perfect_nested_level | ||
) |
tiling.c
tiling.c
Functions to decide a specific tiling for a loop nest
File: tiling.c
PUMA, ESPRIT contract 2701
Francois Irigoin, Corinne Ancourt, Lei Zhou 1991 loop_nest_to_tile():
Because the number of elements per bank ligne is usefull to optimize the tiling, parameter ls is used temporarily to build it. Because ls is the number of bytes of each bank ligne, it is divided by the assumed number of bytes needed for the
location of one element (4 for int and real)
build the diagonal matrix: ls x I
build origin tile vector as the first iteration to minimize the number of partial tiles (heuristics)
vect_chg_coeff(&porigin,var,min);
sc | c |
ls | s |
base_index | ase_index |
first_parallel_level | irst_parallel_level |
last_parallel_level | ast_parallel_level |
perfect_nested_level | erfect_nested_level |
Definition at line 58 of file tiling.c.
References ACCESS, int_to_value, make_tiling(), matrice_new, matrice_nulle(), max, min, MIN, pips_internal_error, sc_dup(), sc_minmax_of_variable(), Svecteur::succ, VALUE_CONST, VALUE_ONE, vect_chg_coeff(), vect_size(), VECTEUR_NUL, VECTEUR_NUL_P, and vecteur_var.
Referenced by loop_nest_to_wp65_code().
void loop_nest_to_wp65_code | ( | entity | module, |
statement | loop_nest, | ||
graph | dg, | ||
int | pn, | ||
int | bn, | ||
int | ls, | ||
int | pd, | ||
entity | proc_id, | ||
entity | proc_id_mm, | ||
Pbase | bank_indices, | ||
hash_table | v_to_esv, | ||
hash_table | v_to_nlv, | ||
entity | compute_module, | ||
statement | computational, | ||
entity | memory_module, | ||
statement | emulator, | ||
statement_mapping | fetch_map, | ||
statement_mapping | store_map, | ||
statement | mod_stat | ||
) |
load block
bank load block
store block
bank store block
compute block
list of local variables to list of conflicting references
inverse table: list of local variables to use for a given reference
variable to list of list of local variables: the main list is an image of connected components of the dependence graph filtered for a given variable, v; the low-level list is a function of the number of pipeline stages
reference to use-def usage ; use and def are encoded as action_is_read and action_is_write
pipelining offset; no pipelining is implemented yet
private variables for the loop nest
local variables
pour eviter tous les problemes de tiling sur les nids de boucles internes a des nids de boucles mal imbriques on execute les boucles internes en sequentiel. Il faudrait autrement s'assurer que l'on a les meme indices de boucles en interne pour le tiling et que les bornes sont identiques (meme restrictions que pour du loop fusion)
creation of new indices
a modifie pour tenir compte des dimensions reelles des domaines
normalement full_initila_basis == initial_basis2
a modifie pour tenir compte des dimensions reelles des domaines
put together the different pieces of code as two lists of statements
add the scanning over the tiles around them to build a proper stmt
update computational and emulator with cs and ems
module | odule |
loop_nest | oop_nest |
dg | g |
pn | n |
bn | n |
ls | s |
pd | d |
proc_id | roc_id |
proc_id_mm | roc_id_mm |
bank_indices | ank_indices |
v_to_esv | _to_esv |
v_to_nlv | _to_nlv |
compute_module | ompute_module |
computational | omputational |
memory_module | emory_module |
emulator | mulator |
fetch_map | etch_map |
store_map | tore_map |
mod_stat | od_stat |
Definition at line 579 of file instruction_to_wp65_code.c.
References assert, base_dup(), base_fprint(), BASE_NULLE, base_reversal(), CAR, compute_loop_nest_dim(), CONS, continue_statement_p(), create_tile_basis(), debug(), debug_off, debug_on, dg, entity_local_name(), find_iteration_domain(), fprint_wp65_hash_tables(), fprintf(), full_parallel_loop_nest_p(), gen_map(), gen_nconc(), generate_io_wp65_code(), hash_pointer, hash_table_free(), hash_table_make(), ifdebug, include_constant_symbolic_communication(), insert_run_time_communications(), instruction_block, instruction_loop, instruction_to_statement(), int_to_expression(), io_loop_nest_p(), is_execution_parallel, list_of_calls_p(), loop_bounds_to_tile_bounds(), loop_locals, loop_nest_dim, loop_nest_movement_generation(), loop_nest_to_local_variables(), loop_nest_to_tile(), loop_to_statement, make_block_statement(), make_compute_block(), make_execution(), make_loop(), make_loop_label(), make_range(), make_scanning_over_one_tile(), make_scanning_over_tiles(), MAP, MAPL, mod_stat, module, NIL, perfectly_nested_loop_to_body(), reduce_loop_bound_for_st(), REFERENCE, reference_list_print(), reference_scalar_defined_p(), reference_scalar_p(), sc_fprint(), sc_new(), sc_variables_rename(), STATEMENT, statement_instruction, statement_undefined, Svecteur::succ, UU, VALUE_ZERO, Svecteur::var, vect_add(), vect_chg_coeff(), vect_dup(), vect_fprint(), vect_size(), VECTEUR_NUL, and wp65_debug_print_text().
Referenced by instruction_to_wp65_code().
void make_all_movement_blocks | ( | entity | initial_module, |
entity | compute_module, | ||
entity | memory_module, | ||
entity | v, | ||
list | map, | ||
hash_table | llv_to_lcr, | ||
hash_table | v_to_lllv, | ||
hash_table | r_to_ud, | ||
hash_table | v_to_esv, | ||
int | pn, | ||
int | bn, | ||
int | ls, | ||
Psysteme | iteration_domain, | ||
Pbase | initial_basis, | ||
Pbase | local_basis, | ||
entity | proc_id, | ||
Pbase | bank_indices, | ||
Pbase | loop_body_indices, | ||
list * | pmb, | ||
list * | pbmb, | ||
tag | use_def, | ||
int | first_parallel_level, | ||
int | last_parallel_level | ||
) |
generates all data movements related to entity v, loads or stores depending on use_def
FI: depending on the pipeline stage, a specific lv should be chosen; by default, let's take the first one
statement for one movement block
statement for one bank movement block
initial_module | nitial_module |
compute_module | ompute_module |
memory_module | emory_module |
map | ap |
llv_to_lcr | lv_to_lcr |
v_to_lllv | _to_lllv |
r_to_ud | _to_ud |
v_to_esv | _to_esv |
pn | n |
bn | n |
ls | s |
iteration_domain | teration_domain |
initial_basis | nitial_basis |
local_basis | ocal_basis |
proc_id | roc_id |
bank_indices | ank_indices |
loop_body_indices | oop_body_indices |
pmb | mb |
pbmb | bmb |
use_def | se_def |
first_parallel_level | irst_parallel_level |
last_parallel_level | ast_parallel_level |
Definition at line 972 of file instruction_to_wp65_code.c.
References CAR, CONS, debug(), ENDP, ENTITY, gen_nconc(), hash_get(), ifdebug, intptr_t, is_action_read, is_action_write, LIST, make_load_blocks(), make_store_blocks(), NIL, pips_debug, pips_internal_error, POP, REFERENCE, reference_in_list_p(), STATEMENT, and wp65_debug_print_text().
Referenced by loop_nest_movement_generation().
list make_compute_block | ( | entity | module, |
statement | body, | ||
Pvecteur | offsets, | ||
hash_table | r_to_llv, | ||
tiling | tile, | ||
Pbase | initial_basis, | ||
Pbase | local_basis, | ||
Pbase | tile_basis_in_tile_basis, | ||
Pbase | tile_basis_in_initial_basis, | ||
Psysteme | iteration_domain, | ||
int | first_parallel_level, | ||
int | last_parallel_level | ||
) |
module | odule |
body | ody |
offsets | ffsets |
r_to_llv | _to_llv |
tile | ile |
initial_basis | nitial_basis |
local_basis | ocal_basis |
tile_basis_in_tile_basis | ile_basis_in_tile_basis |
tile_basis_in_initial_basis | ile_basis_in_initial_basis |
iteration_domain | teration_domain |
first_parallel_level | irst_parallel_level |
last_parallel_level | ast_parallel_level |
Definition at line 679 of file code.c.
References CONS, gen_nconc(), instruction_block, make_block_statement(), make_scanning_over_one_tile(), module, NIL, reference_conversion_statement(), STATEMENT, and statement_instruction.
Referenced by loop_nest_to_wp65_code().
filled in the following
filled in the following
generate the proper type; basic is preserved but the array is made two dimensional
In two sprintf , -1 is added once seperately by LZ make_expression_1 takes the place of the make_expression_1 12/11/91
FI->CA, LZ: what should we do with scalar variables? Put a copy on each memory bank? Take into account memory bank conflicts shown in thresholding (PUMA WP 6.1 and 6.7)
memory_module | emory_module |
bn | n |
ls | s |
Definition at line 195 of file variable.c.
References add_variable_to_area(), AddEntityToDeclarations(), CAR, concatenate(), CONS, copy_basic(), debug(), DIMENSION, dimension_size(), dimension_undefined, DYNAMIC_AREA_LOCAL_NAME, EMULATED_SHARED_MEMORY_PREFIX, ENDP, entity_domain, entity_initial, entity_local_name(), entity_name, entity_storage, entity_type, entity_undefined, FindEntity(), fprintf(), gen_find_tabulated(), ifdebug, int_to_expression(), is_storage_ram, make_dimension(), make_entity, make_ram(), make_storage(), make_value_unknown(), MakeTypeVariable(), module_local_name(), MODULE_SEP_STRING, NIL, number_of_elements(), pips_assert, POP, print_sentence(), Sentence_Variable(), storage_undefined, strdup(), type_undefined, type_variable, type_variable_p, value_undefined, variable_basic, and variable_dimensions.
Referenced by find_or_create_emulated_shared_variable().
void make_fetch_map | ( | void | ) |
void make_load_blocks | ( | entity | initial_module, |
entity | compute_module, | ||
entity | memory_module, | ||
entity | var, | ||
entity | shared_variable, | ||
entity | local_variable, | ||
list | lrefs, | ||
hash_table | r_to_ud, | ||
Psysteme | sc_domain, | ||
Pbase | index_base, | ||
Pbase | bank_indices, | ||
Pbase | tile_indices, | ||
Pbase | loop_body_indices, | ||
entity | Proc_id, | ||
int | pn, | ||
int | bn, | ||
int | ls, | ||
statement * | load_block, | ||
statement * | bank_load_block, | ||
int | first_parallel_level, | ||
int | last_parallel_level | ||
) |
is true if it is the generation of code for bank false if it is for engine
is true if the generated code must be a RECEIVE, false if it must be a SEND
Cases where the references are scalar variables
In the other cases the references must be classified in lists of uniform dependent references
For each list of uniform dependent references, "load_block" and "bank_load_block" are computed
initial_module | nitial_module |
compute_module | ompute_module |
memory_module | emory_module |
var | ar |
shared_variable | hared_variable |
local_variable | ocal_variable |
lrefs | refs |
r_to_ud | _to_ud |
sc_domain | c_domain |
index_base | ndex_base |
bank_indices | ank_indices |
tile_indices | ile_indices |
loop_body_indices | oop_body_indices |
Proc_id | roc_id |
pn | n |
bn | n |
ls | s |
load_block | oad_block |
bank_load_block | ank_load_block |
first_parallel_level | irst_parallel_level |
last_parallel_level | ast_parallel_level |
Definition at line 1312 of file code.c.
References BASE_NULLE, build_sc_with_several_uniform_ref(), CAR, CDR, classify_reference(), CONS, debug(), ENDP, entity_local_name(), false, fprintf(), hash_get(), ifdebug, initialize_offsets(), intptr_t, is_action_read, LIST, make_block_statement(), make_movement_scalar_wp65(), movement_computation(), NIL, nullify_offsets(), pips_assert, POP, print_reference(), REFERENCE, reference_indices, sc_dup(), sc_image_computation(), STATEMENT, true, VALUE_ONE, Svecteur::var, vect_add(), vect_dup(), vect_new(), vecteur_val, and vecteur_var.
Referenced by make_all_movement_blocks().
list make_new_local_variables | ( | entity | v, |
entity | compute_module, | ||
int | number, | ||
int | pd, | ||
hash_table | v_to_lllv | ||
) |
Local variables cannot be immediately dimensionned because this will depend on all associated references.
To avoid a possible "fusion" between references connected in the dg, local variable declarations should be delayed to that point.
concatenate cannot be used (directly) because of n and s conversions
a new btv is necessary for each variable because CONS cannot be shared under NewGen rules
FI->LZ: the type should be v's type, except for the dimensions, the storage should be RAM and allocated in the dynamic area of module_name, and the value is undefined; the actual dimensions will be updated later
update v_to_lllv by side effect
compute_module | ompute_module |
number | umber |
pd | d |
v_to_lllv | _to_lllv |
Definition at line 310 of file variable.c.
References add_variable_to_area(), AddEntityToDeclarations(), asprintf, CONS, copy_basic(), debug(), DYNAMIC_AREA_LOCAL_NAME, ENTITY, entity_local_name(), entity_name, entity_storage, entity_type, entity_undefined_p, FindEntity(), gen_nconc(), hash_get(), hash_put(), HASH_UNDEFINED_VALUE, is_storage_ram, LIST, LOCAL_MEMORY_PREFIX, LOCAL_MEMORY_SEPARATOR, make_entity, make_ram(), make_storage(), MakeTypeVariable(), module_local_name(), MODULE_SEP_STRING, NIL, pips_assert, storage_undefined, type_variable, value_undefined, and variable_basic.
Referenced by loop_nest_to_local_variables().
statement make_scanning_over_one_tile | ( | entity | module, |
statement | body, | ||
tiling | tile, | ||
Pbase | initial_basis, | ||
Pbase | local_basis, | ||
Pbase | tile_basis_in_tile_basis, | ||
Pbase | tile_basis_in_initial_basis, | ||
Psysteme | iteration_domain, | ||
int | first_parallel_level, | ||
int | last_parallel_level | ||
) |
make_scanning_over_one_tile():
generates a nest of loops to enumerate all iterations contained in one tile; the loop bounds are such that empty tiles execute no iteration at all;
The following system is built:
-> -> B i <= b
-> --> -> t1 = P t0 + o
-> --> -> i = t1 + l
-> -1 -> --> -—> 0 <= k P ( i - t1 ) <= (k-1)
where (B,b) defines the iteration domain, t1 is the tile origin in the initial basis, t0 is the tile origin in the tile basis, P is the partitioning matrix, o is the partitioning origin, i is an iteration, and k is the denominator of the inverse of P. l is an iteration in the local (to the current tile) basis.
Because the loops over the tiles are built with t1 and because we need to access the copy with local coordinates, i and t0 are eliminated.
A few changes would make this function generate loops for a shared memory machine. The local_basis would be useless and the initial basis should be chosen as indices for the loops so as not to have to update the loop body. So l would not be introduced and i would not be projected.
Algorithm described in PPoPP'91.
only fully-dimensional partitioning for the time being
add change of basis equations to iteration domain: tile_basis_in_tile_basis to tile_basis_in_initial_basis
add translation equations from initial basis to local basis using tile_basis_in_initial_basis: i == t1 + l
add the tile membership inequalities
update the basis for system tile_domain
get rid of tile_basis_in_initial_basis; we might as well (?) keep them and get rid of tile_basis_in_tile_basis
get rid of initial indices
TEMPTATIVE
compute general information on loop bound origins this is done to take into account information carried by the outer loops, scanning the tile set
get rid of local indices
inject this redundant information
END OF TEMPTATIVE SECTION
apply a row echelon transformation
transform these constraints into a loop nest with the right body, starting with the innermost loop
test pour optimiser le nid de boucles genere
I need new labels and new continues for my loops! make_loop_label() needs (at least) a module name
module | odule |
body | ody |
tile | ile |
initial_basis | nitial_basis |
local_basis | ocal_basis |
tile_basis_in_tile_basis | ile_basis_in_tile_basis |
tile_basis_in_initial_basis | ile_basis_in_initial_basis |
iteration_domain | teration_domain |
first_parallel_level | irst_parallel_level |
last_parallel_level | ast_parallel_level |
Definition at line 475 of file code.c.
References base_dimension, BASE_NULLE, base_rm, CONS, contrainte_make(), debug(), entity_local_name(), eq, fprintf(), gen_nconc(), ifdebug, instruction_block, instruction_block_p, int_to_expression(), is_execution_sequential, loop_to_statement, make_block_statement(), make_bound_expression(), make_continue_statement(), make_execution(), make_loop(), make_loop_label(), make_range(), max, min, module, module_local_name(), new_loop_bound(), NIL, pips_assert, sc_add_egalite(), sc_append(), sc_creer_base(), sc_dup(), sc_force_variable_to_zero(), sc_fprint(), sc_minmax_of_variable(), sc_transform_eg_in_ineg(), STATEMENT, statement_comments, statement_instruction, statement_undefined, strdup(), Svecteur::succ, tile_change_of_basis(), tile_membership(), tiling_tile, UU, VALUE_MONE, VALUE_ONE, variable_of_rank(), vect_add_elem(), VECTEUR_NUL, VECTEUR_NUL_P, vecteur_var, and wp65_debug_print_text().
Referenced by loop_nest_to_wp65_code(), and make_compute_block().
statement make_scanning_over_tiles | ( | entity | module, |
list | body, | ||
entity | proc_id, | ||
int | pn, | ||
tiling | tile, | ||
Pbase | initial_basis, | ||
Pbase | tile_basis_in_tile_basis, | ||
Pbase | tile_basis_in_initial_basis, | ||
Psysteme | iteration_domain, | ||
int | first_parallel_level, | ||
int | last_parallel_level | ||
) |
generates a nest of loops to enumerate all tiles containing at least one iteration in iteration_domain, and even sometimes zero because a rational projection is used; empty tiles are taken care of at a lower level to make sure that no iterations are performed.
The following system is built:
-> -> B i <= b
-> --> -> t1 = P t0 + o
-> -1 -> --> -—> 0 <= k P ( i - t1 ) <= (k-1)
where (B,b) defines the iteration domain, t1 is the tile origin in the initial basis, t0 is the tile origin in the tile basis, P is the partitioning matrix, o is the partitioning origin, i is an iteration, and k is the denominator of the inverse of P.
i and t1 are eliminated to obtain constraints on t0 only. These constraints are used to derive the loop bounds.
This piece of code could also be used to generate tiled code for a shared memory machine without any change.
Notes:
Algorithm described in PPoPP'91
only fully-dimensional partitioning for the time being
add change of basis equations to iteration domain: tile_basis_in_tile_basis to tile_basis_in_initial_basis; they would be of no use for a shared memory machine
add the tile membership inequalities
update the basis for system tile_domain
get rid of initial indices; they would be preserved to generate shared memory code
get rid of tile_basis_in_initial_basis; we might as well (?) keep them and get rid of tile_basis_in_tile_basis
apply a row echelon transformation
transform these constraints into a loop nest with the right body, starting with the innermost loop
optimization : Loop indices that are constant and don't appear in the program body are not generated
distribute work statically on processors using the outermost loop (assumed parallel!) if proc_id is properly defined; this should not be the case for bank tiles
I may need a definition for PROC_ID = MOD(I_0, PROCESSOR_NUMBER)
I need new labels and new continues for my loops! make_loop_label() needs (at least) a module name
Now, s is certainly a block; prefix it with proc_id def
module | odule |
body | ody |
proc_id | roc_id |
pn | n |
tile | ile |
initial_basis | nitial_basis |
tile_basis_in_tile_basis | ile_basis_in_tile_basis |
tile_basis_in_initial_basis | ile_basis_in_initial_basis |
iteration_domain | teration_domain |
first_parallel_level | irst_parallel_level |
last_parallel_level | ast_parallel_level |
Definition at line 227 of file code.c.
References base_dimension, BASE_NULLE, base_rm, concatenate(), CONS, debug(), entity_local_name(), entity_storage, entity_to_expression(), fprintf(), gen_nconc(), ifdebug, instruction_block, instruction_block_p, int_to_expression(), is_execution_sequential, local_name_to_top_level_entity(), loop_to_statement, make_assign_statement(), make_block_statement(), make_bound_expression(), make_continue_statement(), make_execution(), make_loop(), make_loop_label(), make_range(), MakeBinaryCall(), max, min, MOD_INTRINSIC_NAME, module, module_local_name(), new_loop_bound(), NIL, NORMALIZE_EXPRESSION, normalized_linear, normalized_linear_p, pips_assert, pips_debug, PLUS_OPERATOR_NAME, reference_in_statement_p(), sc_append(), sc_creer_base(), sc_dup(), sc_fprint(), sc_minmax_of_variable(), sc_normalize(), sc_transform_eg_in_ineg(), STATEMENT, statement_comments, statement_instruction, statement_undefined, storage_formal_p, strdup(), tile_change_of_basis(), tile_membership(), tiling_tile, UU, value_eq, variable_of_rank(), VECTEUR_NUL_P, and wp65_debug_print_text().
Referenced by loop_nest_to_wp65_code().
void make_store_blocks | ( | entity | initial_module, |
entity | compute_module, | ||
entity | memory_module, | ||
entity | var, | ||
entity | shared_variable, | ||
entity | local_variable, | ||
list | lrefs, | ||
hash_table | r_to_ud, | ||
Psysteme | sc_domain, | ||
Pbase | index_base, | ||
Pbase | bank_indices, | ||
Pbase | tile_indices, | ||
Pbase | loop_body_indices, | ||
entity | Proc_id, | ||
int | pn, | ||
int | bn, | ||
int | ls, | ||
statement * | store_block, | ||
statement * | bank_store_block, | ||
int | first_parallel_level, | ||
int | last_parallel_level | ||
) |
is true if it is the generation of code for bank false if it is for engine
is true if the generated code must be a RECEIVE, false if it must be a SEND
Cases where the references are scalar variables
In the other cases the references must be classified in lists of uniform dependent references
For each list of uniform dependent references, "store_block" and "bank_store_block" are computed
initial_module | nitial_module |
compute_module | ompute_module |
memory_module | emory_module |
var | ar |
shared_variable | hared_variable |
local_variable | ocal_variable |
lrefs | refs |
r_to_ud | _to_ud |
sc_domain | c_domain |
index_base | ndex_base |
bank_indices | ank_indices |
tile_indices | ile_indices |
loop_body_indices | oop_body_indices |
Proc_id | roc_id |
pn | n |
bn | n |
ls | s |
store_block | tore_block |
bank_store_block | ank_store_block |
first_parallel_level | irst_parallel_level |
last_parallel_level | ast_parallel_level |
Definition at line 1166 of file code.c.
References BASE_NULLE, build_sc_with_several_uniform_ref(), CAR, CDR, classify_reference(), CONS, debug(), ENDP, entity_local_name(), false, fprintf(), hash_get(), ifdebug, initialize_offsets(), intptr_t, is_action_write, LIST, make_block_statement(), make_movement_scalar_wp65(), movement_computation(), NIL, nullify_offsets(), pips_assert, POP, print_reference(), REFERENCE, reference_indices, sc_dup(), sc_image_computation(), STATEMENT, true, VALUE_ONE, Svecteur::var, vect_add(), vect_dup(), vect_new(), vecteur_val, and vecteur_var.
Referenced by make_all_movement_blocks().
void make_store_map | ( | void | ) |
Psysteme make_tile_constraints(P, b):
convert a partitioning matrice into a system of linear constraints for a tile whose origin is 0, i.e. generate constraints over local indices:
-> -1 -> -—> 0 <= k P b <= (k-1)
where k is the denominator of P inverse.
FI: such functions should be put together in a file, linear.c
pips_assert("make_tile_constraints", k > 1);
Definition at line 591 of file variable.c.
References ACCESS, base_dimension, contrainte_chg_sgn(), contrainte_dup(), contrainte_new(), contrainte_vecteur, debug(), DENOMINATOR, entity_local_name(), fprintf(), ifdebug, matrice_fprint(), matrice_free, matrice_general_inversion(), matrice_new, matrice_normalize(), pips_assert, sc_add_inegalite(), sc_creer_base(), sc_fprint(), sc_new(), tc, TCST, value_minus, VALUE_ONE, value_one_p, value_uminus, variable_of_rank(), and vect_add_elem().
Referenced by set_dimensions_of_local_variables().
sname | name |
Definition at line 101 of file wp65.c.
References f(), make_empty_function(), make_language_unknown(), and MakeIntegerResult().
Referenced by module_to_wp65_modules().
Reads and prints the target machine description (compatible formats) Temporary version. A more general machine model should be defined by Lei for complexity evaluation.
File: model.c
PUMA, ESPRIT contract 2701
Francois Irigoin 1991 ???
fd | d |
pn | n |
bn | n |
ls | s |
Definition at line 50 of file model.c.
References fprintf().
Referenced by wp65().
fd | d |
ppn | pn |
pbn | bn |
pls | ls |
Definition at line 59 of file model.c.
References user_error.
Referenced by get_model().
void module_to_wp65_modules | ( | entity | module, |
statement | module_code, | ||
graph | dg, | ||
int | pn, | ||
int | bn, | ||
int | ls, | ||
int | pd, | ||
entity * | pcompute_module, | ||
statement * | pcomputational, | ||
entity * | pmemory_module, | ||
statement * | pemulator | ||
) |
variable to emulated shared variable
To establish an occurence numbering accross loop nests
Generate two new modules, compute module and memory module
Generate scalar variables that are going to be used all over the compute and memory module
variables related to bank emulation are put together in one basis to decrease the number of parameters; they are used as such when liner systems of constraints are built
skip a potential useless unstructured
generate code for each loop nest in the module and append it to computational and emulator
kill_statement_number_and_ordering(computational); kill_statement_number_and_ordering(emulator);
return results
module | odule |
module_code | odule_code |
dg | g |
pn | n |
bn | n |
ls | s |
pd | d |
pcompute_module | compute_module |
pcomputational | computational |
pmemory_module | memory_module |
pemulator | emulator |
Definition at line 202 of file wp65.c.
References AddEntityToDeclarations(), BANK_IDENTIFIER, BANK_LINE_IDENTIFIER, BANK_NAME, BANK_OFFSET_IDENTIFIER, BASE_NULLE, CAR, compute_communications(), COMPUTE_ENGINE_NAME, concatenate(), CONS, control_statement, copy_language(), debug(), dg, entity_local_name(), entity_storage, entity_undefined, fprintf(), gen_nconc(), hash_pointer, hash_table_free(), hash_table_make(), ifdebug, instruction_block, instruction_to_wp65_code(), instruction_undefined, instruction_unstructured, instruction_unstructured_p, is_mode_reference, is_storage_formal, list_undefined, make_basic_int(), make_block_statement(), make_dummy_unknown(), make_empty_subroutine(), make_formal(), make_mode(), make_parameter(), make_return_statement(), make_scalar_integer_entity(), MAKE_STATEMENT_MAPPING, make_storage(), MakeEntityFunction(), MakeTypeVariable(), module, module_functional_parameters, module_language, module_local_name(), module_reorder(), NIL, PARAMETER, PROCESSOR_IDENTIFIER, STATEMENT, statement_comments, statement_instruction, statement_undefined, strdup(), string_undefined_p, unstructured_control, UU, vect_add_variable(), vect_fprint(), and wp65_debug_print_module().
Referenced by wp65().
expression ref_in_implied_do | ( | expression | exp | ) |
This function extracts from an implied_do expression the reference having to be computed or printed.
exp | xp |
Definition at line 328 of file instruction_to_wp65_code.c.
References call_arguments, call_function, CAR, entity_local_name(), exp, EXPRESSION, expression_syntax, gen_last(), syntax_call, and syntax_call_p.
Referenced by translate_IO_ref().
lt | t |
Definition at line 62 of file references.c.
References pips_assert.
Referenced by update_map().
r1 | 1 |
r2 | 2 |
dg | g |
Definition at line 513 of file variable.c.
References CAR, CONFLICT, conflict_sink, conflict_source, debug(), dg, dg_arc_label_conflicts, effect_any_reference, fprintf(), graph_vertices, ifdebug, MAPL, print_reference(), reference_equal_p(), SUCCESSOR, successor_arc_label, VERTEX, and vertex_successors.
Referenced by reference_conflicting_test_and_update().
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():
Build, incrementally, connected component in the dependence graph. Input dependences should be used to save local memory space. Mappings are updated.
Too many local variables might be created if two connected components had to be fused. This is not likely to happen with real code. In that case, the function would stop with pips_error().
referenced variable
short cut for identical references; not necessarily a good idea for the body translation process; design to save time in transfer code generation
should go one step forwards and take care of use-def, easier by introducing a "use and def" value or by adding the new reference directly
we need to remember there is a use and a def
this is very clumsy as we may keep a large number of identical def after one use and vice-versa; we need a use-and-def value or we have to keep all references and filter them for data movements
update llv_to_lcr by side-effect
should not happen too often: the regions associated with two references do not intersect together but each of them intersect a third one on which we bump afterwards; the two initial llv's should be merged...
update llv_to_lcr by side-effect
save current_llv for a future (?) merge
no need to study conflicts with other references in the same connected component
dg | g |
v_to_lllv | _to_lllv |
llv_to_lcr | lv_to_lcr |
r_to_llv | _to_llv |
r_to_ud | _to_ud |
Definition at line 401 of file variable.c.
References CAR, CONS, debug(), dg, ENDP, entity_local_name(), fprintf(), gen_nconc(), hash_get(), hash_put(), HASH_UNDEFINED_VALUE, ifdebug, LIST, list_undefined, NIL, pips_assert, pips_internal_error, POP, print_reference(), REFERENCE, reference_conflicting_p(), reference_equal_p(), and reference_variable.
Referenced by loop_nest_to_local_variables().
list reference_conversion_computation | ( | entity | compute_module, |
list * | lt, | ||
expression | expr, | ||
Pbase | initial_basis, | ||
Pbase | tile_indices, | ||
Pbase | tile_local_indices, | ||
tiling | tile | ||
) |
the called function is assumed to be unchanged
compute_module | ompute_module |
lt | t |
expr | xpr |
initial_basis | nitial_basis |
tile_indices | ile_indices |
tile_local_indices | ile_local_indices |
tile | ile |
Definition at line 799 of file code.c.
References AddEntityToDeclarations(), call_arguments, CAR, CONS, EXPRESSION, expression_syntax, gen_nconc(), is_syntax_call, is_syntax_reference, make_assign_statement(), make_loop_indice_equation(), make_new_module_variable(), make_vecteur_expression(), MAPL, NIL, pips_internal_error, rank_of_variable(), reference_variable, STATEMENT, statement_undefined, syntax_call, syntax_reference, syntax_tag, VALUE_ONE, vect_new(), and VECTEUR_NUL.
Referenced by reference_conversion_statement().
void reference_conversion_expression | ( | expression | e, |
hash_table | r_to_llv, | ||
Pvecteur | offsets, | ||
Pbase | initial_basis, | ||
Pbase | local_basis | ||
) |
no pipeline, select the first entity by default
the called function is assumed to be unchanged
r_to_llv | _to_llv |
offsets | ffsets |
initial_basis | nitial_basis |
local_basis | ocal_basis |
Definition at line 864 of file code.c.
References call_arguments, CAR, debug(), ENTITY, EXPRESSION, expression_syntax, hash_get(), HASH_UNDEFINED_VALUE, ifdebug, is_syntax_call, is_syntax_range, is_syntax_reference, MAPL, pips_internal_error, print_words(), rank_of_variable(), reference_indices, reference_variable, syntax_call, syntax_reference, syntax_tag, variable_of_rank(), and Words_Expression().
Referenced by reference_conversion_statement().
list reference_conversion_statement | ( | entity | module, |
statement | body, | ||
list * | lt, | ||
hash_table | r_to_llv, | ||
Pvecteur | offsets, | ||
Pbase | initial_basis, | ||
Pbase | tile_indices, | ||
Pbase | local_basis, | ||
tiling | tile | ||
) |
void reference_conversion_statement(body, r_to_llv, offsets, initial_basis, local_basis):
All references in body which appear in r_to_llv are replaced by references to one of the local variables associated via the r_to_llv hash_table; the choice of one specific local variable is a function of offsets, which is used to generate pipelined code (not implemented).
Statement numbers are set to STATEMENT_NUMBER_UNDEFINED.
the function is assumed to be unchanged
module | odule |
body | ody |
lt | t |
r_to_llv | _to_llv |
offsets | ffsets |
initial_basis | nitial_basis |
tile_indices | ile_indices |
local_basis | ocal_basis |
tile | ile |
Definition at line 723 of file code.c.
References call_arguments, CAR, debug(), entity_undefined, EXPRESSION, ifdebug, instruction_block, instruction_call, instruction_loop, instruction_tag, is_instruction_block, is_instruction_call, is_instruction_goto, is_instruction_loop, is_instruction_test, is_instruction_unstructured, loop_body, MAP, MAPL, module, pips_debug, pips_internal_error, reference_conversion_computation(), reference_conversion_expression(), STATEMENT, statement_instruction, statement_number, STATEMENT_NUMBER_UNDEFINED, and wp65_debug_print_text().
Referenced by make_compute_block().
This function tests whether at least one array indice of Reference r belongs to List lwr or not.
lwr | wr |
Definition at line 130 of file references.c.
References CAR, CDR, REFERENCE, and reference_equal_p().
Referenced by array_indice_in_list_p(), call_instruction_to_communications(), and make_all_movement_blocks().
This function adds all the references of l2 to l1 if they don't appear in l1.
l1 | 1 |
l2 | 2 |
Definition at line 175 of file references.c.
References CAR, CDR, NIL, REFERENCE, and reference_list_update().
Referenced by concat_data_list(), loop_instruction_to_communications(), and statement_to_communications().
void reference_list_print | ( | list | l | ) |
This function prints the references belonging to l.
Definition at line 186 of file references.c.
References CAR, CDR, entity_local_name(), fprintf(), NIL, REFERENCE, and reference_variable.
Referenced by call_instruction_to_communications(), call_to_wp65_code(), insert_array_scalar_access_movement(), and loop_nest_to_wp65_code().
This function add Reference r to List l, if r doesn't belong to l.
Definition at line 161 of file references.c.
References CAR, CDR, CONS, gen_nconc(), NIL, REFERENCE, and reference_equal_p().
Referenced by call_instruction_to_communications(), loop_instruction_to_communications(), and reference_list_add().
void reference_scalar_defined_p | ( | reference | r | ) |
Definition at line 199 of file references.c.
References assert, NIL, reference_indices, reference_undefined_p, and reference_variable.
Referenced by loop_nest_to_wp65_code().
initial_basis | nitial_basis |
local_basis | ocal_basis |
Definition at line 855 of file code.c.
References entity_undefined, rank_of_variable(), reference_variable, and variable_of_rank().
void reset_fetch_map | ( | void | ) |
void reset_store_map | ( | void | ) |
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):
The algorithm used is not general; references are assumed equal up to a translation;
A general algorithm, as would be necessary for instance if a dependence was detected in the transposition algorithm between M(I,J) and M(J,I), would preserve some translation information for each reference in lr so as to generate proper new references to the local variable.
let's use the first reference to find out the number of dimensions
referenced variable
referenced variable type
referenced variable dimension list
dimension number
dimensions for the local variables
computation of the initial bounds of Entity rv
pips_assert("set_dimensions_of_local_variable_family",
pour tenir compte des offsets numeriques dans les fonctions d'acces
parameter ==> min = max = 1
ips_internal_error("unbounded domain for phi, %s", "check tile bounds and subscript expressions");
update types
sharing is not legal under NewGen rules; to avoid it lvd is duplicated at the CONS level, except the first time
llv | lv |
tc | The algorithm used is not general; references are assumed equal up to a translation; |
A general algorithm, as would be necessary for instance if a dependence was detected in the transposition algorithm between M(I,J) and M(J,I), would preserve some translation information for each reference in lr so as to generate proper new references to the local variable. list of local variables with same dimensions used at different pipeline stages
lr | r |
tile | The algorithm used is not general; references are assumed equal up to a translation; |
A general algorithm, as would be necessary for instance if a dependence was detected in the transposition algorithm between M(I,J) and M(J,I), would preserve some translation information for each reference in lr so as to generate proper new references to the local variable. non-empty list of associated references
dimn | imn |
Definition at line 689 of file variable.c.
References ACCESS, CAR, CONS, contrainte_make(), debug(), DIMENSION, dimension_lower, dimension_undefined, dimension_upper, ENDP, ENTITY, entity_local_name(), entity_name, entity_type, find_ith_expression(), fprintf(), gen_copy_seq(), gen_nconc(), ifdebug, int_to_expression(), list_undefined, make_dimension(), make_phi_entity(), MAPL, max, min, NIL, NORMALIZE_EXPRESSION, normalized_linear, normalized_linear_p, pips_debug, pips_internal_error, POP, print_sentence(), REFERENCE, reference_indices, reference_variable, sc_add_egalite(), sc_dup(), sc_fprint(), sc_minmax_of_variable(), sc_normalize(), Sentence_Variable(), tc, TCST, tiling_tile, type_variable, value_addto, VALUE_CONST, value_decrement, value_div, value_gt, value_lt, VALUE_MAX, value_max, value_max_p, VALUE_MIN, value_min, value_min_p, VALUE_MONE, VALUE_ONE, value_pos_p, VALUE_TO_INT, VALUE_ZERO, variable_dimensions, vect_add_elem(), vect_add_variable(), vect_coeff(), and vect_dup().
Referenced by set_dimensions_of_local_variables().
void set_dimensions_of_local_variables | ( | hash_table | v_to_lllv, |
Pbase | basis, | ||
tiling | tile, | ||
hash_table | llv_to_lcr | ||
) |
v_to_lllv | _to_lllv |
basis | asis |
tile | ile |
llv_to_lcr | lv_to_lcr |
Definition at line 652 of file variable.c.
References CAR, debug(), ENDP, hash_get(), HASH_MAP, LIST, make_tile_constraints(), POP, sc_rm(), set_dimensions_of_local_variable_family(), tc, tiling_tile, and vect_size().
Referenced by loop_nest_to_local_variables().
void set_fetch_map | ( | statement_mapping | ) |
void set_store_map | ( | statement_mapping | ) |
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.
The lwr list corresponds to the list of variables that have been updated before the current statement bloc. The lwr_local list corresponds to the list of variables that are updated in the current statement bloc.
stmt | tmt |
st_level1 | t_level1 |
st_level2 | t_level2 |
lwr | wr |
lwr_local | wr_local |
fetch_map | etch_map |
store_map | tore_map |
r_to_ud | _to_ud |
lpv | pv |
Definition at line 191 of file communications.c.
References call_instruction_to_communications(), CAR, debug(), fprintf(), ifdebug, instruction_block, instruction_tag, is_instruction_block, is_instruction_call, is_instruction_goto, is_instruction_loop, is_instruction_test, is_instruction_unstructured, loop_instruction_to_communications(), MAPL, pips_internal_error, reference_list_add(), STATEMENT, and statement_instruction.
Referenced by compute_communications(), and loop_instruction_to_communications().
bool store_map_undefined_p | ( | void | ) |
bool test_run_time_communications | ( | list | list_statement_block, |
statement_mapping | fetch_map, | ||
statement_mapping | store_map | ||
) |
just to avoid warning
list_statement_block | ist_statement_block |
fetch_map | etch_map |
store_map | tore_map |
Definition at line 733 of file communications.c.
References CAR, CONS, GET_STATEMENT_MAPPING, HASH_UNDEFINED_VALUE, instruction_block, instruction_loop, instruction_tag, is_instruction_block, is_instruction_call, is_instruction_loop, loop_body, MAPL, NIL, ok, STATEMENT, and statement_instruction.
void tile_change_of_basis | ( | Psysteme | tile_domain, |
Pbase | initial_basis, | ||
Pbase | tile_basis, | ||
Pbase | tile_init_basis, | ||
tiling | tile | ||
) |
tile_domain | ile_domain |
initial_basis | nitial_basis |
tile_basis | ile_basis |
tile_init_basis | ile_init_basis |
tile | ile |
Definition at line 161 of file code.c.
References ACCESS, base_dimension, contrainte_make(), eq, sc_add_egalite(), TCST, tiling_origin, tiling_tile, VALUE_MONE, variable_of_rank(), vect_add_elem(), vect_coeff(), and VECTEUR_NUL.
Referenced by make_scanning_over_one_tile(), and make_scanning_over_tiles().
Psysteme tile_membership(P, origin, member):
builds a linear constraint system to express the fact that iteration "member" belongs to a P tile with origin "origin". "origin" and "member" are expressed in the initial basis.
pips_assert("tile_membership", k > 1);
origin | rigin |
member | ember |
Definition at line 1469 of file code.c.
References ACCESS, base_dimension, contrainte_chg_sgn(), contrainte_dup(), contrainte_new(), contrainte_vecteur, debug(), DENOMINATOR, entity_local_name(), fprintf(), ifdebug, matrice_fprint(), matrice_free, matrice_general_inversion(), matrice_new, matrice_normalize(), member(), origin, pips_assert, sc_add_inegalite(), sc_creer_base(), sc_fprint(), sc_new(), TCST, value_minus, VALUE_ONE, value_one_p, value_uminus, variable_of_rank(), and vect_add_elem().
Referenced by make_scanning_over_one_tile(), and make_scanning_over_tiles().
reference translate_IO_ref | ( | call | c, |
hash_table | v_to_esv, | ||
bool | loop_or_call_print | ||
) |
This function translates a reference in I/O statement into its corresponding emulated shared memory reference.
scan the argument list till IOLIST' arguments
implied-do case: the array reference is the first argument in the last argument list of the implied do call
v_to_esv | _to_esv |
loop_or_call_print | oop_or_call_print |
Definition at line 346 of file instruction_to_wp65_code.c.
References call_arguments, call_function, CAR, CDR, ENDP, entity_local_name(), exp, EXPRESSION, expression_syntax, expression_to_string(), gen_full_copy_list(), hash_get(), is_syntax_reference, make_reference(), make_syntax(), NIL, pips_assert, pips_user_error, ref_in_implied_do(), reference_indices, reference_undefined, reference_variable, same_string_p, syntax_call, syntax_call_p, syntax_reference, and syntax_reference_p.
Referenced by generate_io_wp65_code().
This function checks if two references have a uniform dependence.
It assumes that some verifications have been made before. The two references r1 and r2 must reference the same array with the same dimension.
FI: could/should be moved in ri-util/expression.c
r1 | 1 |
r2 | 2 |
Definition at line 939 of file code.c.
References CAR, CDR, debug(), EXPRESSION, NORMALIZE_EXPRESSION, normalized_linear, normalized_linear_p, reference_indices, TCST, vect_rm(), vect_size(), vect_substract(), and vecteur_var.
Referenced by classify_reference().
void update_map | ( | statement_mapping | m, |
statement | st, | ||
reference | r | ||
) |
st | t |
Definition at line 68 of file references.c.
References CONS, entity_local_name(), fprintf(), gen_nconc(), GET_STATEMENT_MAPPING, HASH_UNDEFINED_VALUE, ifdebug, NIL, ref_in_list_p(), REFERENCE, reference_variable, SET_STATEMENT_MAPPING, and statement_number.
Referenced by call_instruction_to_communications().
This function adds all the references of l2 to l1 if they don't appear in l1.
l1 | 1 |
l2 | 2 |
Definition at line 225 of file references.c.
References CAR, CDR, NIL, REFERENCE, and variable_list_update().
Referenced by concat_data_list().
This function adds the reference r to List l, if the reference_variable(r) doesn't belong to l.
Definition at line 208 of file references.c.
References CAR, CDR, CONS, entity_local_name(), gen_nconc(), NIL, REFERENCE, and reference_variable.
Referenced by variable_list_add().
bool wp65 | ( | const | string | ) |
Let's modify the old code instead of copy it but do not tell pipsdbm; else we would get a copy of the code, not consistent with the dependence graph
fprintf(stderr,"refs du code\n"); debug_refs(s); fprintf(stderr,"refs du dg\n"); debug_refs(dg);
fprintf(stderr,"refs du code\n"); debug_refs(s); fprintf(stderr,"refs du dg\n"); debug_refs(dg);
Put final code for the computational module in a text resource of the database
Put final code for the memory module in a text resource of the database
reset_current_module_statement();
string | nput_module_name |
Definition at line 128 of file wp65.c.
References close_prettyprint(), db_get_memory_resource(), debug(), debug_off, debug_on, dg, empty_text(), entity_undefined, free(), get_model(), get_string_property(), ifdebug, init_prettyprint(), make_text_resource(), model_fprint(), module, module_name_to_entity(), module_to_wp65_modules(), PIPELINE_DEPTH, PRETTYPRINT_PARALLEL, regions_init(), reset_current_module_entity(), reset_ordering_to_statement(), set_current_module_entity(), set_ordering_to_statement(), set_string_property(), statement_undefined, strdup(), text_module(), translate_unary_into_binary_ref(), and variable_declaration_coherency_p().
there should be only one instruction: do not put a STOP in the source file
Definition at line 508 of file wp65.c.
References assignment_statement_p(), CAR, control_predecessors, control_statement, control_successors, debug(), instruction_block, instruction_block_p, instruction_unstructured, instruction_unstructured_p, MAPL, NIL, perfectly_nested_loop_p(), return_statement_p(), s1, STATEMENT, statement_instruction, stop_statement_p(), and unstructured_control.
|
extern |
WP65_INCLUDED.
cproto-generated files code.c
WP65_INCLUDED.
Definition at line 67 of file code.c.
Referenced by initialize_offsets(), and nullify_offsets().
|
extern |
Definition at line 68 of file code.c.
Referenced by initialize_offsets(), and nullify_offsets().