10 #include "pips_config.h"
24 " include \"STEP.h\"\n", NULL));
41 pips_debug(1,
"begin new_module = %p, loop_stmt = %p\n", new_module, loop_stmt);
97 reduction_init_stmt,
false);
142 if (incr_lb == incr_ub) {
149 else if (incr_lb >= 1) {
152 else if (incr_ub <= -1) {
195 pips_debug(1,
"SEND after projection and rectangularization : \n");
197 pips_debug(1,
"RECV after projection and rectangularization : \n");
322 pips_debug(2,
"entity %s in referenced entities but not in recv nor send regions\n",
entity_name(e));
406 compile_regions(new_module, recv_l, loop_p, loop_stmt, send_as_comm_l, reductions_l, mpi_begin_stmt, mpi_end_stmt);
413 compile_regions(new_module, send_l, loop_p, loop_stmt, send_as_comm_l, reductions_l, mpi_begin_stmt, mpi_end_stmt);
461 int local_dbg_lvl = 2;
472 new_entities =
set_del_element(new_entities, new_entities, step_symbolic_e);
514 *referenced_entities =
gen_nconc(*referenced_entities, new_e);
530 list referenced_entities =
outliner_scan(new_module, statements_to_outline, new_body);
536 compile_body(directive_stmt, new_module, drt,
transformation, referenced_entities, new_body, mpi_begin_stmt, work_stmt, mpi_end_stmt);
542 list effective_parameters =
NIL, formal_parameters =
NIL;
543 outliner_parameters(new_module, new_body, referenced_entities, entity_to_effective_parameter, &effective_parameters, &formal_parameters);
547 outliner_patch_parameters(statements_to_outline, referenced_entities, effective_parameters, formal_parameters, new_body, mpi_begin_stmt, mpi_end_stmt);
float a2sf[2] __attribute__((aligned(16)))
USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.
effects apply_statement_effects(statement_effects f, statement k)
effect copy_effect(effect p)
EFFECT.
transformer make_transformer(list a1, predicate a2)
predicate make_predicate(Psysteme a1)
test make_test(expression a1, statement a2, statement a3)
instruction make_instruction_test(test _field_)
#define STEP_SUM_REDUCE_NAME
#define STEP_PROD_REDUCE_NAME
#define STEP_BOUNDS_UP(index)
#define STEP_MIN_REDUCE_NAME
#define RT_STEP_initreduction
#define RT_STEP_reduction
#define STEP_BOUNDS_LOW(index)
#define STEP_MAX_REDUCE_NAME
list outliner_scan(entity, list, statement)
void outliner_file(entity, list, statement *)
list outliner_statements_referenced_entities(list)
outlining.c
hash_table outliner_init(entity, list)
statement outliner_call(entity, list, list)
void outliner_patch_parameters(list, list, list, list, statement, statement, statement)
we need to patch parameters , effective parameters and body in C because parameters are passed by cop...
void outliner_parameters(entity, statement, list, hash_table, list *, list *)
region rectangularization_region(region reg)
statement generate_call_get_rank(entity new_module)
void step_RT_set_local_declarations(entity module, statement body)
void check_entity_step_type(entity data)
void generate_call_construct_begin_construct_end(entity new_module, step_directive drt, statement mpi_begin_stmt, statement mpi_end_stmt)
expression get_expression_addr(expression expr)
compile_RT.c
statement generate_call_get_commsize(entity new_module)
statement call_STEP_subroutine2(string name,...)
statement generate_call_get_rank_loopbounds(entity new_module, loop loop_stmt)
set step_created_symbolic
void generate_call_init_regionArray(list referenced_entities, statement before, statement __attribute__((unused)) after)
entity step_local_loop_index(entity module, string name)
void step_RT_clean_local()
entity get_entity_step_rank(entity module)
entity step_type(entity data)
statement generate_call_compute_loopslices(entity new_module, loop loop_stmt)
static bool step_get_directive_reductions(step_directive drt, set *reductions_l)
statement compile_mpi(statement directive_stmt, string new_module_name, step_directive drt, int transformation)
compile_mpi.c
static void update_referenced_entities(statement new_body, list *referenced_entities)
static void loop_basic_workchunk_to_workchunk(statement stmt, list *recv_l, list *send_l)
static statement compile_loopbounds(entity new_module, loop loop_stmt, statement work_stmt)
static statement compile_barrier(entity __attribute__((unused)) new_module, statement work_stmt)
static list keep_recv_or_send_referenced_entity(list recv_l, list send_l, list referenced_entities)
static list duplicate_regions_referenced_entity(list referenced_entities, list regions_l)
static statement compile_loopslices(entity new_module, loop loop_stmt)
static void loopbounds_substitution(entity new_module, loop loop_stmt)
static string step_head_hook(entity __attribute__((unused)) e)
Copyright 2007-2012 Alain Muller, Frederique Silber-Chaussumier.
static void compile_body(statement directive_stmt, entity new_module, step_directive drt, int transformation, list referenced_entities, statement new_body, statement mpi_begin_stmt, statement work_stmt, statement mpi_end_stmt)
static void compile_reduction(set reductions_l[STEP_UNDEF_REDUCE], statement before_stmt, statement after_stmt)
static statement compile_master(entity new_module, statement work_stmt)
void compile_regions(entity new_module, list regions_l, bool loop_p, loop loop_stmt, list send_as_comm_l, set reductions_l[STEP_UNDEF_REDUCE], statement mpi_begin_stmt, statement mpi_end_stmt)
static bool reduction_p(set reductions_l[STEP_UNDEF_REDUCE], entity e)
entity MakeConstant(string name, tag bt)
Make a Fortran constant.
Pcontrainte contrainte_make(Pvecteur pv)
Pcontrainte contrainte_make(Pvecteur pv): allocation et initialisation d'une contrainte avec un vecte...
string compilation_unit_of_module(const char *)
The output is undefined if the module is referenced but not defined in the workspace,...
#define region_entity(reg)
list all_regions_sc_append(list, Psysteme, bool)
void print_rw_regions(list)
void project_regions_along_variables(list, list)
void project_regions_along_variables(list l_reg, list l_param) input : a list of regions to project,...
struct _newgen_struct_statement_effects_ * statement_effects
#define effects_effects(x)
statement make_block_statement(list)
Make a block statement from a list of statement.
statement instruction_to_statement(instruction)
Build a statement from a give instruction.
statement make_empty_block_statement(void)
Build an empty statement (block/sequence)
const char * get_current_module_name(void)
Get the name of the current module.
entity get_current_module_entity(void)
Get the entity of the current module.
list gen_nreverse(list cp)
reverse a list in place
#define NIL
The empty list (nil in Lisp)
list gen_copy_seq(list l)
Copy a list structure.
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
#define CAR(pcons)
Get the value of the first element of a list.
void gen_free_list(list l)
free the spine of the list
bool gen_in_list_p(const void *vo, const list lx)
tell whether vo belongs to lx
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
#define list_undefined
Undefined list definition :-)
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
list statement_block(statement)
Get the list of block statements of a statement sequence.
loop statement_loop(statement)
Get the loop of a statement.
bool empty_statement_p(statement)
Test if a statement is empty.
void put_a_comment_on_a_statement(statement, string)
Similar to try_to_put_a_comment_on_a_statement() but insert a CONTINUE to put the comment on it if th...
list statements_to_declarations(list)
Returns the declarations contained in a list of statement.
void insert_statement(statement, statement, bool)
This is the normal entry point.
statement make_plain_continue_statement(void)
Make a simple continue statement to be used as a NOP or ";" in C.
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define TOP_LEVEL_MODULE_NAME
Module containing the global variables in Fortran and C.
#define MODULE_SEP_STRING
string concatenate(const char *,...)
Return the concatenation of the given strings.
void * gen_find_tabulated(const char *, int)
bool set_empty_p(const set)
tell whether set s is empty.
set set_assign_list(set, const list)
assigns a list contents to a set all duplicated elements are lost
set set_del_element(set, const set, const void *)
list set_to_sorted_list(const set, gen_cmp_func_t)
#define SET_FOREACH(type_name, the_item, the_set)
enumerate set elements in their internal order.
bool set_belong_p(const set, const void *)
#define set_undefined_p(s)
set set_make(set_type)
Create an empty set of any type but hash_private.
set set_add_element(set, const set, const void *)
int(* gen_cmp_func_t)(const void *, const void *)
void reset_prettyprinter_head_hook()
void set_prettyprinter_head_hook(string(*f)(entity))
void print_statement(statement)
Print a statement on stderr.
#define EQUAL_OPERATOR_NAME
#define statement_block_p(stat)
#define entity_declarations(e)
MISC: newgen shorthands.
#define make_statement_list(stats...)
easy list constructor
int compare_entities(const entity *pe1, const entity *pe2)
Comparison function for qsort.
bool c_module_p(entity m)
Test if a module "m" is written in C.
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
void print_entities(list l)
bool top_level_entity_p(entity e)
Check if the scope of entity e is global.
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
expression MakeBinaryCall(entity f, expression eg, expression ed)
Creates a call expression to a function with 2 arguments.
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
#define range_increment(x)
#define entity_undefined_p(x)
#define statement_undefined_p(x)
#define entity_domain
newgen_syntax_domain_defined
#define statement_undefined
#define STATEMENT(x)
STATEMENT.
Psysteme sc_rn(Pbase b)
Psysteme sc_rn(Pbase b): build a Psysteme without constraints to define R^n, where n is b's dimension...
void sc_creer_base(Psysteme ps)
void sc_creer_base(Psysteme ps): initialisation des parametres dimension et base d'un systeme lineair...
Psysteme sc_new(void)
Psysteme sc_new(): alloue un systeme vide, initialise tous les champs avec des valeurs nulles,...
void insert_ineq_begin_sc(Psysteme sc, Pcontrainte ineq)
This function inserts the constraint ineq at the beginning of the system of inequalities of sc.
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
void expression_and_precondition_to_integer_interval(expression, transformer, int *, int *)
Evaluate expression e in context p, assuming that e is an integer expression.
statement compile_omp(statement stmt, step_directive d)
compile.c
void add_omp_guard(statement *block)
#define STEP_TRANSFORMATION_HYBRID
void step_directive_type_print(step_directive drt)
#define STEP_THREADPRIVATE
#define STEP_UNDEF_REDUCE
#define STEP_PARALLEL
Handled construction.
#define step_directive_type(x)
@ is_step_clause_reduction
@ is_step_clause_transformation
@ is_step_clause_threadprivate
@ is_step_clause_schedule
@ is_step_clause_firstprivate
#define step_directive_clauses(x)
#define step_clause_tag(x)
#define STEP_CLAUSE(x)
STEP_CLAUSE.
#define step_clause_reduction(x)
#define MAP_ENTITY_INT_MAP(k, v, c, f)
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
FI: I do not understand why the type is duplicated at the set level.
The structure used to build lists in NewGen.
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
#define VECTEUR_NUL
DEFINITION DU VECTEUR NUL.
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
Pvecteur vect_make(Pvecteur v, Variable var, Value val,...)
Pvecteur vect_make(v, [var, val,]* 0, val) Pvecteur v; // may be NULL, use assigne anyway Variable va...
Pvecteur vect_new(Variable var, Value coeff)
Pvecteur vect_new(Variable var,Value coeff): allocation d'un vecteur colineaire au vecteur de base va...