PIPS
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "linear.h"
#include "genC.h"
#include "misc.h"
#include "ri.h"
#include "effects.h"
#include "matrice.h"
#include "tiling.h"
#include "dg.h"
#include "graph.h"
#include "ri-util.h"
#include "prettyprint.h"
#include "effects-util.h"
#include "text-util.h"
#include "movements.h"
#include "wp65.h"
Go to the source code of this file.
Typedefs | |
typedef dg_arc_label | arc_label |
Code Generation for Distributed Memory Machines. More... | |
typedef dg_vertex_label | vertex_label |
Functions | |
static void | ref_found_p (reference ref) |
static bool | reference_in_statement_p (statement l, entity v) |
static void | eval_var (reference ref) |
void | eval_variable_in_statement (entity module, statement s, Variable v, int min) |
void | tile_change_of_basis (Psysteme tile_domain, Pbase initial_basis, Pbase tile_basis, Pbase tile_init_basis, tiling tile) |
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) |
make_scanning_over_tiles() More... | |
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(): More... | |
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) |
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): More... | |
list | reference_conversion_computation (entity compute_module, list *lt, expression expr, Pbase initial_basis, Pbase tile_indices, Pbase tile_local_indices, tiling tile) |
entity | reference_translation (reference r, Pbase initial_basis, Pbase local_basis) |
void | reference_conversion_expression (expression e, hash_table r_to_llv, Pvecteur offsets, Pbase initial_basis, Pbase local_basis) |
bool | uniform_dependence_p (reference r1, reference r2) |
This function checks if two references have a uniform dependence. More... | |
list | classify_reference (list llr, reference r) |
This function classifies the references in lists. More... | |
Psysteme | build_sc_with_several_uniform_ref (entity module, cons *lr, Psysteme sc_domain, Pbase *new_index_base) |
build_sc_with_several_uniform_ref(): More... | |
static void | initialize_offsets (list lt) |
static void | nullify_offsets () |
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) |
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) |
Psysteme | tile_membership (matrice P, Pbase origin, Pbase member) |
Psysteme tile_membership(P, origin, member): More... | |
Variables | |
Value | offset_dim1 = VALUE_ZERO |
include "generation.h" More... | |
Value | offset_dim2 = VALUE_ZERO |
static entity | tile_indice_entity1 |
static bool | ref_in_statement1 |
static Value | var_minmax = VALUE_ZERO |
static Variable | var_to_evaluate |
typedef dg_arc_label arc_label |
typedef dg_vertex_label vertex_label |
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().
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().
|
static |
Definition at line 95 of file code.c.
References CAR, CDR, CONS, entity_local_name(), EXPRESSION, expression_undefined, fprintf(), gen_nconc(), make_vecteur_expression(), NIL, NORMALIZE_EXPRESSION, normalized_linear, normalized_linear_p, print_words(), ref, reference_indices, TCST, value_mult, value_notzero_p, VALUE_ZERO, var_minmax, var_to_evaluate, vect_add_elem(), vect_chg_coeff(), vect_coeff(), vect_fprint(), and Words_Expression().
Referenced by eval_variable_in_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().
|
static |
Definition at line 1144 of file code.c.
References CAR, CDR, EXPRESSION, LIST, NIL, norm(), NORMALIZE_EXPRESSION, normalized_linear, offset_dim1, offset_dim2, REFERENCE, reference_indices, TCST, and vect_coeff().
Referenced by make_load_blocks(), and make_store_blocks().
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 | IN, but modified by side effect to avoid copying statements |
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().
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 | entity |
local_variable | emulated shared variable for example ES_A |
lrefs | local variable for example L_A_1_1 |
r_to_ud | list of references associated to the local variable |
sc_domain | c_domain |
index_base | domain of iteration |
bank_indices | index basis |
tile_indices | contains the index describing the bank: bank_id, L (ligne of bank) and O (offset in the ligne) |
loop_body_indices | contains the local indices LI, LJ of tile |
Proc_id | roc_id |
pn | corresponds to a processeur identicator |
bn | n |
ls | s |
load_block | bank number and line size (depends on the machine) |
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().
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 | entity |
local_variable | emulated shared variable for example ES_A |
lrefs | local variable for example L_A_1_1 |
r_to_ud | _to_ud |
sc_domain | c_domain |
index_base | domain of iteration |
bank_indices | index basis |
tile_indices | contains the index describing the bank: bank_id, L (ligne of bank) and O (offset in the ligne) |
loop_body_indices | contains the local indices LI, LJ of tile |
Proc_id | roc_id |
pn | corresponds to a processeur identicator |
bn | n |
ls | s |
store_block | bank number and line size (depends on the machine) |
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().
|
static |
Definition at line 1163 of file code.c.
References offset_dim1, and offset_dim2.
Referenced by make_load_blocks(), and make_store_blocks().
|
static |
Definition at line 75 of file code.c.
References entity_local_name(), ref, ref_in_statement1, reference_variable, and tile_indice_entity1.
Referenced by reference_in_statement_p().
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().
Definition at line 83 of file code.c.
References gen_recurse, gen_true(), ref_found_p(), ref_in_statement1, reference_domain, and tile_indice_entity1.
Referenced by make_scanning_over_tiles().
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 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().
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().
Value offset_dim1 = VALUE_ZERO |
include "generation.h"
WP65_INCLUDED.
Definition at line 67 of file code.c.
Referenced by initialize_offsets(), make_datum_movement(), make_movements_loop_body_wp65(), and nullify_offsets().
Value offset_dim2 = VALUE_ZERO |
Definition at line 68 of file code.c.
Referenced by initialize_offsets(), make_datum_movement(), make_movements_loop_body_wp65(), and nullify_offsets().
|
static |
Definition at line 71 of file code.c.
Referenced by ref_found_p(), and reference_in_statement_p().
|
static |
Definition at line 70 of file code.c.
Referenced by ref_found_p(), and reference_in_statement_p().
|
static |
Definition at line 72 of file code.c.
Referenced by eval_var(), and eval_variable_in_statement().
|
static |
Definition at line 73 of file code.c.
Referenced by eval_var(), and eval_variable_in_statement().