PIPS
|
#include "matrice.h"
Go to the source code of this file.
Macros | |
#define | HYPERPLANE_OPTIONS "X" |
Warning! Do not modify this file that is automatically generated! More... | |
#define HYPERPLANE_OPTIONS "X" |
Warning! Do not modify this file that is automatically generated!
Modify src/Libs/hyperplane/hyperplane-local.h instead, to add your own modifications. header file built by cproto hyperplane-local.h package hyperplane
Definition at line 34 of file hyperplane.h.
loopnest_st | oopnest_st |
dim | im |
Definition at line 812 of file tiling.c.
References ACCESS, type_sg::base, check_positive_dependence(), cone_generating_system, cone_undefined, CONFLICT, conflict_cone, db_get_memory_resource(), DENOMINATOR, dg, dg_arc_label_conflicts, FOREACH, fprintf(), gen_recurse, gen_true(), get_current_module_name(), graph_vertices, ifdebug, matrice_free, matrice_identite(), matrice_new, module_name(), pips_user_warning, SG_UNDEFINED_P, statement_domain, statement_in_loopnest(), statement_in_loopnest_p, SUCCESSOR, successor_arc_label, successor_vertex, test_statement_of_reference, vect_size(), VERTEX, vertex_successors, and vertex_to_statement().
Referenced by local_tile_constraints(), and parallel_tiling().
statement code_generation | ( | list | lls, |
Pvecteur | pvg[], | ||
Pbase | base_oldindex, | ||
Pbase | base_newindex, | ||
Psysteme | sc_newbase, | ||
bool | preserve_entry_label_p | ||
) |
include <sys/stdtypes.h> for debug with dbmalloc include "stdlib.h" statement code_generation(cons *lls,Pvecteur pvg[], Pbase base_oldindex, Pbase base_newindex) generation of hyperplane code for the nested loops (cons *lls). the new nested loops will be ; DOSEQ Ip = ... DOALL Jp = ... DOALL Kp = ... ... ENDDO
modification : Keep the code in the sequential version. Let the parallelisation to generate the parallel code. suggested by BB, modified by Yi-Qing. 17/05/92
make the parallel loops from inner loop to outermost loop
handling of current loop
new bounds for new index related to the old index of the old loop
FI: I do not understand how you could keep a go to target (!) or a list of local variables
lls | ls |
pvg | vg |
base_oldindex | ase_oldindex |
base_newindex | ase_newindex |
sc_newbase | c_newbase |
preserve_entry_label_p | reserve_entry_label_p |
Definition at line 58 of file code_generation.c.
References base_reversal(), BASE_UNDEFINED, CAR, CDR, clear_label(), copy_statement(), entity_empty_label(), expression_undefined, free_instruction(), instruction_loop, instruction_undefined, int_to_expression(), is_execution_sequential, is_instruction_loop, loop_body, loop_undefined, make_bound_expression(), make_execution(), make_instruction(), make_loop(), make_range(), makeloopbody(), NIL, range_undefined, sc_newbase, STATEMENT, statement_instruction, statement_newbase(), statement_undefined, Svecteur::succ, UU, and Svecteur::var.
Referenced by hyperplane(), parallel_tiling(), tiling_transformation(), and unimodular().
check if tile_size is modified by sloop and generate a temporary variable if needed
we should also check tile_size has no write effect but currently, string_to_expression asserts this
outer loop new index
inner loop
outer loop
will help partial_eval
save
go on for the next one
once we are done, regenerate the whole thing
prepare chain all
set tail
chain all
update
he label have been duplicated by copy_statement
fix signed / unsigned types for further processing otherwise we could end with integer overflow
base | ase |
vector | ector |
Definition at line 64 of file symbolic_tiling.c.
References AddEntityToCurrentModule(), base, binary_intrinsic_expression, CAR, clean_up_sequences(), CONS, copy_expression(), copy_statement(), DEFAULT_INTEGER_TYPE_SIZE, DIVIDE_OPERATOR_NAME, EFFECT, effect_any_reference, effect_write_p, entity_empty_label(), entity_to_expression(), EXPRESSION, fix_loop_index_sign(), FOREACH, gen_append(), gen_nreverse(), gen_recurse, gen_true(), get_current_module_entity(), instruction_to_statement(), instruction_undefined, int_to_expression(), load_cumulated_rw_effects_list(), loop_body, loop_domain, loop_index, loop_range, make_assign_statement(), make_basic_int(), make_execution_parallel(), make_instruction_block(), make_instruction_loop(), make_loop(), make_new_scalar_variable(), make_op_exp(), make_range(), make_reference(), make_syntax_reference(), MIN_OPERATOR_NAME, MINUS_OPERATOR_NAME, MULTIPLY_OPERATOR_NAME, NIL, PLUS_OPERATOR_NAME, POP, proper_effects_of_expression(), range_upper, references_may_conflict_p(), set_conflict_testing_properties(), STATEMENT, statement_instruction, statement_label, statement_loop(), statement_undefined, update_expression_syntax(), and update_statement_instruction().
Referenced by do_simdizer_auto_tile_generate_all_tests(), and symbolic_tiling().
void global_parallelization | ( | const char * | module_name | ) |
module_name | odule_name |
Definition at line 51 of file global_parallelization.c.
References always_select(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, entity_module_p(), hyperplane(), local_name_to_top_level_entity(), look_for_nested_loop_statements(), module, module_name(), module_reorder(), pips_assert, and strdup().
cproto-generated files
In a first phase, trust the user blindly!
Query the user for h's coordinates
Definition at line 40 of file hyperplane_direction.c.
References debug(), fprintf(), ifdebug, pips_assert, pips_debug, string_undefined, user_log(), user_request(), and VALUE_FMT.
Referenced by hyperplane().
Query the user for a partitioning matrix P.
Query the user for P's components
Definition at line 137 of file tiling.c.
References ACCESS, debug(), DENOMINATOR, fprintf(), ifdebug, matrice_fprint(), pips_assert, pips_debug, string_undefined, user_log(), user_request(), VALUE_FMT, and VALUE_ONE.
Referenced by parallel_tiling(), and tiling_transformation().
Psysteme local_tile_constraints | ( | Pbase | initial_basis, |
Pbase | local_tile_basis, | ||
Psysteme | sc, | ||
matrice | P, | ||
Pvecteur * | pvch, | ||
statement | st | ||
) |
computation of the hyperplane tile direction in the tile basis: = sum(hi)= 1H
The local tile direction is legal and colinear to the partitioning vecteur (pdim)
Build the constraints 0 <= det(HT).[HT. (i -i0)]<det(HT).1 with i0=P.G_tile.i_tile <==> 0 <= det(HT).[HT. (i -P.G_tile.i_tile)]<det(HT).1 <==> 0 <= det(HT).[HT.i -G_tile.i_tile]<= det(HT)-1
initial_basis | nitial_basis |
local_tile_basis | ocal_tile_basis |
sc | c |
pvch | vch |
st | t |
Definition at line 407 of file tiling.c.
References ACCESS, Ssysteme::base, base_add_variable(), base_dimension, BASE_UNDEFINED, check_tiling_legality(), compute_local_change_of_basis(), contrainte_make(), CONTRAINTE_UNDEFINED, Ssysteme::dimension, empty_string_p(), entity_local_name(), fprintf(), get_string_property(), ifdebug, malloc(), matrice_fprint(), matrice_general_inversion(), matrice_identite(), matrice_new, OFL_CTRL, pips_assert, pips_debug, sc_add_egalite(), sc_dup(), sc_fprint(), scanning_base_to_vect(), VALUE_ONE, VALUE_ZERO, vect_add_elem(), vect_new(), VECTEUR_NUL_P, vecteur_succ, and vecteur_var.
Referenced by parallel_tiling().
bool loop_hyperplane | ( | const char * | module_name | ) |
module_name | odule_name |
Definition at line 72 of file global_parallelization.c.
References hyperplane(), interactive_loop_transformation(), and module_name().
lls | ls |
Definition at line 501 of file tiling.c.
References CAR, CDR, expression_integer_value(), instruction_loop, intptr_t, list_undefined, loop_index, loop_range, NIL, origin, range_lower, STATEMENT, statement_instruction, vect_chg_coeff(), and VECTEUR_NUL.
Referenced by parallel_tiling(), and tiling_transformation().
bool loop_tiling | ( | const char * | module_name | ) |
module_name | odule_name |
Definition at line 725 of file tiling.c.
References interactive_loop_transformation(), module_name(), and tiling_transformation().
bool parallel_loop_tiling | ( | const char * | module_name | ) |
module_name | odule_name |
Definition at line 1143 of file tiling.c.
References interactive_loop_transformation(), module_name(), and parallel_tiling().
sc | c |
index_base | ndex_base |
Definition at line 890 of file tiling.c.
References Ssysteme::base, base_copy(), base_reversal(), build_sc_nredund_1pass(), CATCH, FWD_OFL_CTRL, overflow_error, sc_append(), sc_copy(), sc_dup(), sc_elim_var(), sc_empty(), sc_init_with_sc(), sc_normalize(), Svecteur::succ, TRY, UNCATCH, vect_copy(), vect_size(), VECTEUR_NUL_P, and vecteur_var.
Referenced by parallel_tiling().
Referenced by compute_local_change_of_basis(), hyperplane(), tile_hyperplane_constraints(), and tiling_transformation().
tiling.c
serialized_matrix | erialized_matrix |
Definition at line 104 of file tiling.c.
References ACCESS, buffer, DENOMINATOR, empty_string_p(), free(), line, pips_assert, strdup(), string_undefined, string_undefined_p, and VALUE_ONE.
Referenced by parallel_tiling(), and tiling_transformation().
bool symbolic_tiling | ( | const char * | module_name | ) |
prelude
postlude
module_name | odule_name |
Definition at line 199 of file symbolic_tiling.c.
References clean_up_sequences(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, do_symbolic_tiling(), ENDP, find_label_entity(), find_loop_from_label(), gen_full_free_list(), gen_length(), get_current_module_entity(), get_current_module_name(), get_current_module_statement(), get_string_property(), module_name(), module_name_to_entity(), module_reorder(), pips_user_warning, reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), statement_undefined_p, string_to_expressions(), and symbolic_tiling_valid_p().
Psysteme tile_hyperplane_constraints | ( | Pbase | initial_basis, |
Pbase | tile_basis, | ||
matrice | HT, | ||
Pvecteur | tiling_offset | ||
) |
Generate the tile membership constraints between a tile coordinates and an iteration coordinate.
computation of the hyperplane tile direction in the tile basis: = sum(hi)= 1H
computation of the tile scanning base G.
Build the constraints 0 <= det(HT).[HT. (i -i0)]<det(HT).1 with i0=P.G_tile.i_tile <==> 0 <= det(HT).[HT. (i -P.G_tile.i_tile)]<det(HT).1 <==> 0 <= det(HT).[HT.i -G_tile.i_tile]<= det(HT)-1
Find the origin of the iteration domain. Use 0 as default coordinate
initial_basis | nitial_basis |
tile_basis | ile_basis |
HT | T |
tiling_offset | iling_offset |
Definition at line 274 of file tiling.c.
References ACCESS, base_dimension, BASE_UNDEFINED, contrainte_make(), CONTRAINTE_UNDEFINED, debug(), DENOMINATOR, empty_string_p(), entity_local_name(), fprintf(), get_string_property(), ifdebug, malloc(), matrice_fprint(), matrice_identite(), matrice_new, offset, pips_assert, pips_debug, printf(), sc_add_inegalite(), sc_creer_base(), sc_fprint(), sc_new(), scanning_base_hyperplane(), TCST, VALUE_ONE, value_uminus, VALUE_ZERO, vect_add_elem(), vect_chg_sgn(), vect_coeff(), vect_dup(), VECTEUR_NUL, vecteur_succ, and vecteur_var.
Referenced by parallel_tiling().