PIPS
|
#include <stdlib.h>
#include <stdio.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "ri-util.h"
#include "constants.h"
#include "misc.h"
#include "matrice.h"
#include "sparse_sc.h"
#include "tiling.h"
#include "movements.h"
#include "text-util.h"
#include "polyedre.h"
#include "dg.h"
Go to the source code of this file.
Functions | |
expression | lower_bound_generation (Psysteme sc_neg, Pbase index_base, int number_of_lower_bounds, int loop_rank) |
This fonction generates the lower bounds of the "loop_rank"-th loop. More... | |
expression | upper_bound_generation (Psysteme sc_pos, Pbase index_base, int number_of_upper_bounds, int loop_rank) |
This fonction generates the upper bounds of the "loop_rank"-th loop. More... | |
expression | test_bound_generation (Psysteme sc_test, Pbase index_base) |
This function generates the expressions of the guard if it exists. More... | |
statement | bound_generation (entity module, bool bank_code, bool receive_code, entity ent, Pbase loop_body_indices, Pbase var_id, Psysteme *lsystem, Pbase index_base, int n, int sc_info[][4]) |
Generation of the new loop nest characterizing the new domain. More... | |
statement bound_generation | ( | entity | module, |
bool | bank_code, | ||
bool | receive_code, | ||
entity | ent, | ||
Pbase | loop_body_indices, | ||
Pbase | var_id, | ||
Psysteme * | lsystem, | ||
Pbase | index_base, | ||
int | n, | ||
int | sc_info[][4] | ||
) |
Generation of the new loop nest characterizing the new domain.
The set of systems lsystem describes the set of constraints of each loop index. New loop bounds are deduced from these sytems.
Initialisation des systemes
make new bound expression and new range loop
looplabel = make_new_label(initial_module_name);
new code by FI to add continue statements starts here
end of new code by FI
module | odule |
bank_code | ank_code |
receive_code | eceive_code |
ent | nt |
loop_body_indices | oop_body_indices |
var_id | ar_id |
lsystem | system |
index_base | ndex_base |
sc_info | c_info |
Definition at line 328 of file bound_generation.c.
References bound_distribution(), CONS, CONTRAINTE_UNDEFINED_P, debug(), debug_off, debug_on, entity_empty_label(), entity_local_name(), entity_undefined, fprintf(), free(), gen_nconc(), ifdebug, Ssysteme::inegalites, instruction_block, instruction_block_p, int_to_expression(), is_execution_parallel, is_execution_sequential, loop_to_statement, lower_bound_generation(), make_block_statement(), make_continue_statement(), make_datum_movement(), make_execution(), make_loop(), make_loop_label(), make_movements_loop_body_wp65(), make_range(), make_test(), malloc(), module, NIL, pips_debug, printf(), rank_of_variable(), sc_fprint(), sc_init_with_sc(), space, STATEMENT, statement_instruction, statement_undefined, Svecteur::succ, test_bound_generation(), test_to_statement, upper_bound_generation(), UU, Svecteur::var, variable_of_rank(), vect_size(), and wp65_debug_print_text().
Referenced by movement_computation().
expression lower_bound_generation | ( | Psysteme | sc_neg, |
Pbase | index_base, | ||
int | number_of_lower_bounds, | ||
int | loop_rank | ||
) |
This fonction generates the lower bounds of the "loop_rank"-th loop.
bound_generation.c
this condition is true if the constraint constrains directly the variable
In that case the bound expression results from the combination of two constraints. The variable of rank "higher_rank" will be eliminated from these two constraints in order to give only one bound for the "loop_rank" index.
sc_neg | c_neg |
index_base | ndex_base |
number_of_lower_bounds | umber_of_lower_bounds |
loop_rank | oop_rank |
Definition at line 56 of file bound_generation.c.
References CAR, complex_bound_computation(), CONS, CONTRAINTE_UNDEFINED_P, debug(), debug_off, debug_on, EXPRESSION, expression_undefined, Ssysteme::inegalites, int_to_expression(), local_name_to_top_level_entity(), make_div_expression(), make_op_expression(), make_vecteur_expression(), max, NIL, search_higher_rank(), Scontrainte::succ, TCST, value_abs, value_notmone_p, VALUE_ONE, value_one_p, value_plus, VALUE_TO_INT, value_uminus, VALUE_ZERO, variable_of_rank(), vect_add_elem(), vect_chg_coeff(), vect_cl2(), vect_coeff(), vect_dup(), Scontrainte::vecteur, and VECTEUR_NUL.
Referenced by bound_generation(), and make_movements_loop_body_wp65().
expression test_bound_generation | ( | Psysteme | sc_test, |
Pbase | index_base | ||
) |
This function generates the expressions of the guard if it exists.
All the expressions of the guards are computed from the combination of two constraints where the variable of higher_rank is eliminated.
generation of the left hand side of the guard
generation of the right hand side of the guard
generation of the inequality
sc_test | c_test |
index_base | ndex_base |
Definition at line 234 of file bound_generation.c.
References AND_OPERATOR_NAME, CONS, contrainte_dup(), CONTRAINTE_UNDEFINED_P, debug(), debug_off, debug_on, EXPRESSION, expression_undefined, Ssysteme::inegalites, int_to_expression(), LESS_OR_EQUAL_OPERATOR_NAME, local_name_to_top_level_entity(), make_div_expression(), make_op_expression(), make_vecteur_expression(), NIL, rank, search_higher_rank(), Scontrainte::succ, TCST, value_abs, value_notmone_p, value_notone_p, VALUE_ONE, value_plus, value_pos_p, VALUE_TO_INT, value_uminus, VALUE_ZERO, variable_of_rank(), vect_add_elem(), vect_chg_coeff(), vect_chg_sgn(), vect_coeff(), and Scontrainte::vecteur.
Referenced by bound_generation().
expression upper_bound_generation | ( | Psysteme | sc_pos, |
Pbase | index_base, | ||
int | number_of_upper_bounds, | ||
int | loop_rank | ||
) |
This fonction generates the upper bounds of the "loop_rank"-th loop.
this condition is true if the constraint constrains directly the variable
In that case the bound expression results from the combination of two constraints. The variable of rank "higher_rank" will be eliminated from these two constraints in order to give only one bound for the "loop_rank" index.
sc_pos | c_pos |
index_base | ndex_base |
number_of_upper_bounds | umber_of_upper_bounds |
loop_rank | oop_rank |
Definition at line 145 of file bound_generation.c.
References CAR, complex_bound_computation(), CONS, CONTRAINTE_UNDEFINED_P, debug(), debug_off, debug_on, EXPRESSION, expression_undefined, Ssysteme::inegalites, int_to_expression(), local_name_to_top_level_entity(), make_div_expression(), make_op_expression(), make_vecteur_expression(), min, NIL, search_higher_rank(), Scontrainte::succ, value_abs, value_notone_p, value_one_p, VALUE_TO_INT, VALUE_ZERO, variable_of_rank(), vect_chg_coeff(), vect_chg_sgn(), vect_cl2(), vect_coeff(), vect_dup(), Scontrainte::vecteur, and VECTEUR_NUL.
Referenced by bound_generation(), and make_movements_loop_body_wp65().