PIPS
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "ri-util.h"
#include "constants.h"
#include "matrice.h"
#include "tiling.h"
#include "movements.h"
#include "misc.h"
#include "text-util.h"
#include "parser_private.h"
#include "polyedre.h"
#include "prettyprint.h"
Go to the source code of this file.
Functions | |
void | wp65_debug_print_text (entity m, statement s) |
include "values.h" More... | |
void | wp65_debug_print_module (entity m, statement s) |
bool | variable_in_declaration_module_p (entity m, entity v) |
static entity | find_entity (entity module, Pvecteur pv, string st) |
entity | find_operator (entity module, string oper, string str) |
statement | make_statement_operator (entity oper, cons *args) |
statement | make_movements_loop_body_wp65 (entity module, bool receive_code, entity ent, Pbase local_indices, Pbase var_id, Psysteme sc_neg, Psysteme sc_pos, Pbase index_base, int rank, int number_of_lower_bounds, int number_of_upper_bounds) |
statement make_movements_loop_body_wp65(module,receive_code, ent,local_indices,var_id, sc_neg,sc_pos,index_base,rank, number_of_lower_bounds, number_of_upper_bounds) More... | |
statement | make_datum_movement (entity module, bool receive_code, entity ent, Pbase local_indices, Pbase var_id) |
statement make_datum_movement(module,receive_code,ent, local_indices,var_id) More... | |
statement | make_movement_scalar_wp65 (entity module, bool receive_code, reference r, entity var_id) |
statement make_movement_scalar_wp65(receive_code,r) More... | |
Variables | |
Value | offset_dim1 |
include "generation.h" More... | |
Value | offset_dim2 |
Definition at line 94 of file make_loop_body.c.
References AddEntityToDeclarations(), concatenate(), entity_domain, entity_local_name(), entity_undefined, free(), gen_find_tabulated(), make_scalar_integer_entity(), module, MODULE_SEP_STRING, strdup(), and vecteur_var.
Referenced by make_movements_loop_body_wp65().
module | odule |
oper | per |
str | tr |
Definition at line 117 of file make_loop_body.c.
References concatenate(), entity_domain, entity_undefined, gen_find_tabulated(), is_type_functional, is_type_void, is_value_unknown, make_entity, make_functional(), make_storage_rom(), make_type(), make_value(), module, module_local_name(), MODULE_SEP_STRING, NIL, strdup(), TOP_LEVEL_MODULE_NAME, and UU.
Referenced by make_datum_movement(), make_movement_scalar_wp65(), and make_movements_loop_body_wp65().
statement make_datum_movement | ( | entity | module, |
bool | receive_code, | ||
entity | ent, | ||
Pbase | local_indices, | ||
Pbase | var_id | ||
) |
statement make_datum_movement(module,receive_code,ent, local_indices,var_id)
This function generates the loop body of the movement code. In the case of bank code generation the loop body must be :
BANK_/WP65_ send/receive_nb_bytes(ES_A,O,1,L,Prod_id) ES_A is the emulated shared variable given as entity ent. Prod_id is the Processeur id. given as a Pvecteur in var_id. O and L are the local indices for the bank passed like Pbase in local_indices.
In the case of engine code generation the loop body must be :
BANK_/WP65_send/receive_nb_bytes(L_A,LI,1,LJ,Bank_id)
L_A is the local variable given as entity in ent. Bank_id is the bank id, given as Pvecteur in var_id. LJ, and LI are the local indices passed like Pbase in local_indices corresponds to the Pvecteur belonging Prod_id if bank_code and Bank_id otherwise
build the list of expressions : Prod_id,ES_A(L,O),1 for bank case and Bank_id,L_A(LJ,LI),1 for engine case
generate the send or the receive call
module | odule |
receive_code | eceive_code |
ent | This function generates the loop body of the movement code. In the case of bank code generation the loop body must be : |
BANK_/WP65_ send/receive_nb_bytes(ES_A,O,1,L,Prod_id) ES_A is the emulated shared variable given as entity ent. Prod_id is the Processeur id. given as a Pvecteur in var_id. O and L are the local indices for the bank passed like Pbase in local_indices.
In the case of engine code generation the loop body must be :
BANK_/WP65_send/receive_nb_bytes(L_A,LI,1,LJ,Bank_id)
L_A is the local variable given as entity in ent. Bank_id is the bank id, given as Pvecteur in var_id. LJ, and LI are the local indices passed like Pbase in local_indices is true if the code is generated for receive
local_indices | This function generates the loop body of the movement code. In the case of bank code generation the loop body must be : |
BANK_/WP65_ send/receive_nb_bytes(ES_A,O,1,L,Prod_id) ES_A is the emulated shared variable given as entity ent. Prod_id is the Processeur id. given as a Pvecteur in var_id. O and L are the local indices for the bank passed like Pbase in local_indices.
In the case of engine code generation the loop body must be :
BANK_/WP65_send/receive_nb_bytes(L_A,LI,1,LJ,Bank_id)
L_A is the local variable given as entity in ent. Bank_id is the bank id, given as Pvecteur in var_id. LJ, and LI are the local indices passed like Pbase in local_indices corresponds to the shared entiy if bank_code and to the local entity otherwise
var_id | This function generates the loop body of the movement code. In the case of bank code generation the loop body must be : |
BANK_/WP65_ send/receive_nb_bytes(ES_A,O,1,L,Prod_id) ES_A is the emulated shared variable given as entity ent. Prod_id is the Processeur id. given as a Pvecteur in var_id. O and L are the local indices for the bank passed like Pbase in local_indices.
In the case of engine code generation the loop body must be :
BANK_/WP65_send/receive_nb_bytes(L_A,LI,1,LJ,Bank_id)
L_A is the local variable given as entity in ent. Bank_id is the bank id, given as Pvecteur in var_id. LJ, and LI are the local indices passed like Pbase in local_indices correspond to O,L if bank_code and to LJ,LI otherwise
Definition at line 401 of file make_loop_body.c.
References CONS, debug(), debug_off, debug_on, entity_type, EXPRESSION, find_operator(), free(), int2a(), int_to_expression(), is_syntax_reference, make_expression(), make_reference(), make_statement_operator(), make_syntax(), make_vecteur_expression(), module, NIL, normalized_undefined, offset_dim1, offset_dim2, SizeOfElements(), Svecteur::succ, TCST, type_variable, type_variable_p, VALUE_ONE, variable_basic, vect_add(), vect_add_elem(), vect_dup(), vect_new(), VECTEUR_NUL, VECTEUR_NUL_P, and vecteur_var.
Referenced by bound_generation().
statement make_movement_scalar_wp65 | ( | entity | module, |
bool | receive_code, | ||
reference | r, | ||
entity | var_id | ||
) |
statement make_movement_scalar_wp65(receive_code,r)
This function generates the loop body of the movement code. In the case of bank code generation the loop body must be :
call BANK_/WP65_send/receive_nb_bytes(S)
In the case of engine code generation the loop body must be :
call BANK_/WP65_send/receive_nb_bytes(S)
where nb_bytes is the number of bytes needed for the variable location
nb_bytes is the number of bytes needed for the variable location
build the expression : S
args = CONS(EXPRESSION,int_expr(nb_bytes),NIL);
generate the send or the receive call
module | odule |
receive_code | eceive_code |
r | This function generates the loop body of the movement code. In the case of bank code generation the loop body must be : call BANK_/WP65_send/receive_nb_bytes(S)In the case of engine code generation the loop body must be : call BANK_/WP65_send/receive_nb_bytes(S)where nb_bytes is the number of bytes needed for the variable location is true if the code is generated for receive |
var_id | This function generates the loop body of the movement code. In the case of bank code generation the loop body must be : call BANK_/WP65_send/receive_nb_bytes(S)In the case of engine code generation the loop body must be : call BANK_/WP65_send/receive_nb_bytes(S)where nb_bytes is the number of bytes needed for the variable location corresponds to scalaire entity |
Definition at line 485 of file make_loop_body.c.
References CONS, debug_off, debug_on, entity_local_name(), entity_type, entity_undefined, EXPRESSION, find_operator(), free(), ifdebug, int2a(), int_to_expression(), is_syntax_reference, make_expression(), make_statement_operator(), make_syntax(), make_vecteur_expression(), module, NIL, normalized_undefined, pips_debug, reference_variable, SizeOfElements(), type_variable, type_variable_p, VALUE_ONE, variable_basic, vect_new(), and wp65_debug_print_text().
Referenced by constant_symbolic_communication(), make_load_blocks(), and make_store_blocks().
statement make_movements_loop_body_wp65 | ( | entity | module, |
bool | receive_code, | ||
entity | ent, | ||
Pbase | local_indices, | ||
Pbase | var_id, | ||
Psysteme | sc_neg, | ||
Psysteme | sc_pos, | ||
Pbase | index_base, | ||
int | rank, | ||
int | number_of_lower_bounds, | ||
int | number_of_upper_bounds | ||
) |
statement make_movements_loop_body_wp65(module,receive_code, ent,local_indices,var_id, sc_neg,sc_pos,index_base,rank, number_of_lower_bounds, number_of_upper_bounds)
This function generates the loop body of the movement code. In the case of bank code generation the loop body must be :
O1 = ..... O2 = ..... IF (O1.LE.O2) THEN BANK_/WP65_send/receive_nb_bytes(Prod_id,ES_A(L,O1),O2-O1+1)
ES_A is the emulated shared variable given as entity ent. Prod_id is the Processeur id. given as a Pvecteur in var_id. O and L are the local indices for the bank passed like Pbase in local_indices.
In the case of engine code generation the loop body must be :
LI1 = .... LI2 = .... IF (LI1.LE.LI2) THEN BANK_/WP65_send/receive_nb_bytes(Bank_id,L_A(LJ,LI1),LI2-LI1+1) L_A is the local variable given as entity in ent. Bank_id is the bank id, given as Pvecteur in var_id. LJ, and LI are the local indices passed like Pbase in local_indices
create the new indices new_ind1 et new_ind2 corresponding to LI1 et LI2 when the code is generated for engines and O1 et O2 when code is generated for banks vecteur_var(ofs) is respectivly LI or O
build the expression new_ind2 - new_ind1+1
build the list of expressions : Prod_id,ES_A(L,O1),O2-O1+1 for bank case and Bank_id,L_A(LJ,LI1),LI2-LI1+1 for engine case
generate the send or the receive call
build the test around stat
if (pmin == INT_MIN || pmax == INT_MAX || pmax > pmin) {
}
build the whole code:
O1 = ..... O2 = ..... IF (O1.LE.O2) THEN BANK_/WP65_send/receive(Prod_id,ES_A(L,O1),O2-O1+1) for bank case or: LI1 = .... LI2 = .... IF (LI1.LE.LI2) THEN BANK_/WP65_send/receive(Bank_id,L_A(LJ,LI1),LI2-LI1+1) for engine case
module | odule |
receive_code | eceive_code |
ent | This function generates the loop body of the movement code. In the case of bank code generation the loop body must be : O1 = ..... O2 = ..... IF (O1.LE.O2) THEN BANK_/WP65_send/receive_nb_bytes(Prod_id,ES_A(L,O1),O2-O1+1)ES_A is the emulated shared variable given as entity ent. Prod_id is the Processeur id. given as a Pvecteur in var_id. O and L are the local indices for the bank passed like Pbase in local_indices. |
In the case of engine code generation the loop body must be :
LI1 = .... LI2 = .... IF (LI1.LE.LI2) THEN BANK_/WP65_send/receive_nb_bytes(Bank_id,L_A(LJ,LI1),LI2-LI1+1) L_A is the local variable given as entity in ent. Bank_id is the bank id, given as Pvecteur in var_id. LJ, and LI are the local indices passed like Pbase in local_indices is true if the code is generated for receive
local_indices | This function generates the loop body of the movement code. In the case of bank code generation the loop body must be : O1 = ..... O2 = ..... IF (O1.LE.O2) THEN BANK_/WP65_send/receive_nb_bytes(Prod_id,ES_A(L,O1),O2-O1+1)ES_A is the emulated shared variable given as entity ent. Prod_id is the Processeur id. given as a Pvecteur in var_id. O and L are the local indices for the bank passed like Pbase in local_indices. |
In the case of engine code generation the loop body must be :
LI1 = .... LI2 = .... IF (LI1.LE.LI2) THEN BANK_/WP65_send/receive_nb_bytes(Bank_id,L_A(LJ,LI1),LI2-LI1+1) L_A is the local variable given as entity in ent. Bank_id is the bank id, given as Pvecteur in var_id. LJ, and LI are the local indices passed like Pbase in local_indices corresponds to the shared entiy if bank_code and to the local entity otherwise
var_id | This function generates the loop body of the movement code. In the case of bank code generation the loop body must be : O1 = ..... O2 = ..... IF (O1.LE.O2) THEN BANK_/WP65_send/receive_nb_bytes(Prod_id,ES_A(L,O1),O2-O1+1)ES_A is the emulated shared variable given as entity ent. Prod_id is the Processeur id. given as a Pvecteur in var_id. O and L are the local indices for the bank passed like Pbase in local_indices. |
In the case of engine code generation the loop body must be :
LI1 = .... LI2 = .... IF (LI1.LE.LI2) THEN BANK_/WP65_send/receive_nb_bytes(Bank_id,L_A(LJ,LI1),LI2-LI1+1) L_A is the local variable given as entity in ent. Bank_id is the bank id, given as Pvecteur in var_id. LJ, and LI are the local indices passed like Pbase in local_indices correspond to O,L if bank_code and to LI,LJ otherwise
sc_neg | This function generates the loop body of the movement code. In the case of bank code generation the loop body must be : O1 = ..... O2 = ..... IF (O1.LE.O2) THEN BANK_/WP65_send/receive_nb_bytes(Prod_id,ES_A(L,O1),O2-O1+1)ES_A is the emulated shared variable given as entity ent. Prod_id is the Processeur id. given as a Pvecteur in var_id. O and L are the local indices for the bank passed like Pbase in local_indices. |
In the case of engine code generation the loop body must be :
LI1 = .... LI2 = .... IF (LI1.LE.LI2) THEN BANK_/WP65_send/receive_nb_bytes(Bank_id,L_A(LJ,LI1),LI2-LI1+1) L_A is the local variable given as entity in ent. Bank_id is the bank id, given as Pvecteur in var_id. LJ, and LI are the local indices passed like Pbase in local_indices corresponds to the Pvecteur belonging Prod_id if bank_code and Bank_id otherwise
sc_pos | c_pos |
index_base | ndex_base |
rank | ank |
number_of_lower_bounds | umber_of_lower_bounds |
number_of_upper_bounds | umber_of_upper_bounds |
Definition at line 182 of file make_loop_body.c.
References ASSIGN_OPERATOR_NAME, concatenate(), CONS, debug(), debug_off, debug_on, entity_domain, entity_empty_label(), entity_local_name(), entity_type, entity_undefined, EXPRESSION, find_entity(), find_operator(), FindOrCreateEntity(), fprint_string_Value(), fprintf(), free(), gen_find_tabulated(), ifdebug, int2a(), int_to_expression(), is_syntax_reference, local_name_to_top_level_entity(), lower_bound_generation(), make_block_statement(), make_continue_statement(), make_entity_fullname(), make_expression(), make_op_expression(), make_reference(), make_statement_operator(), make_syntax(), make_test(), make_vecteur_expression(), MakeBinaryCall(), MINUS_OPERATOR_NAME, module, MODULE_SEP_STRING, NIL, normalized_undefined, offset_dim1, offset_dim2, PLUS_OPERATOR_NAME, print_text(), rank, sc_append(), sc_dup(), sc_minmax_of_variable(), SizeOfElements(), STATEMENT, Svecteur::succ, SUFFIX_FOR_TEMP_VAR1_IN_INNER_LOOP, SUFFIX_FOR_TEMP_VAR2_IN_INNER_LOOP, TCST, test_to_statement, Text_Statement(), TOP_LEVEL_MODULE_NAME, type_variable, type_variable_p, upper_bound_generation(), VALUE_ONE, variable_basic, vect_add(), vect_add_elem(), vect_dup(), vect_new(), VECTEUR_NUL_P, vecteur_val, and vecteur_var.
Referenced by bound_generation().
oper | per |
args | rgs |
Definition at line 138 of file make_loop_body.c.
References empty_extensions(), entity_empty_label(), is_instruction_call, make_call(), make_instruction(), make_statement(), make_synchronization_none(), NIL, STATEMENT_NUMBER_UNDEFINED, STATEMENT_ORDERING_UNDEFINED, and string_undefined.
Referenced by make_datum_movement(), make_movement_scalar_wp65(), and make_movements_loop_body_wp65().
Definition at line 74 of file make_loop_body.c.
References CAR, CDR, code_declarations, ENDP, ENTITY, entity_initial, entity_local_name(), NIL, and value_code.
Definition at line 61 of file make_loop_body.c.
References debug_off, debug_on, free_text(), print_text(), and text_module().
Referenced by module_to_wp65_modules().
include "values.h"
Definition at line 53 of file make_loop_body.c.
References debug(), debug_off, debug_on, entity_name, and print_statement().
Referenced by bound_generation(), eval_variable_in_statement(), loop_nest_to_wp65_code(), make_all_movement_blocks(), make_movement_scalar_wp65(), make_scanning_over_one_tile(), make_scanning_over_tiles(), movement_computation(), reference_conversion_statement(), and translate_unary_into_binary_ref().
|
extern |
include "generation.h"
Definition at line 67 of file code.c.
Referenced by make_datum_movement(), and make_movements_loop_body_wp65().
|
extern |
Definition at line 68 of file code.c.
Referenced by make_datum_movement(), and make_movements_loop_body_wp65().