25 #include "pips_config.h"
59 #include "resources.h"
108 pips_debug(4,
"statement to put into a block : \n");
138 if (!extensions_on_sequence)
163 pips_debug(4,
"statement after put into a block : \n");
292 pips_debug(5,
"entity name to find : %s \n", name);
312 " PIPS can't generate the copy for this variable.\n"
313 " Try to launch pass VARIABLE_REPLICATION.\n", name);
348 "The result of the generated code can be wrong without no other pass transformation.\n"
354 for (
int i=0; i<nbr; i++) {
393 if (!
ENDP(lstatement)) {
471 for (
int i=0; i<nbr; i++) {
506 if (!
ENDP(lweffects)) {
544 bool good_result_p =
true;
546 debug_on(
"MPI_GENERATION_DEBUG_LEVEL");
610 return (good_result_p);
647 if (!
ENDP(lweffects)) {
696 Pbase base_index = NULL;
707 enumeration = SC_UNDEFINED;
710 &condition, &enumeration);
716 pips_debug(8,
"Nb_eq %d , Nb_ineq %d, dimension %d\n", (sc2)->nb_eq, (sc2)->nb_ineq, (sc2)->
dimension);
722 if (condition!=NULL){
724 pips_debug(8,
"Nb_eq %d , Nb_ineq %d, dimension %d\n", (condition)->nb_eq, (condition)->nb_ineq, (condition)->
dimension);
730 if (enumeration!=NULL) {
732 pips_debug(8,
"Nb_eq %d , Nb_ineq %d, dimension %d\n", (enumeration)->nb_eq, (enumeration)->nb_ineq, (enumeration)->
dimension);
740 sequence_statement_for_copy,
787 loutregioneffects =
NIL;
793 pips_internal_error(
"The statement must be the module statement (a sequence of instruction).\n");
808 bool good_result_p =
true;
810 debug_on(
"MPI_GENERATION_DEBUG_LEVEL");
878 return (good_result_p);
float a2sf[2] __attribute__((aligned(16)))
USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.
int get_int_property(const string)
statement copy_statement(statement p)
STATEMENT.
reference make_reference(entity a1, list a2)
bool statement_consistent_p(statement p)
statement make_statement(entity a1, intptr_t a2, intptr_t a3, string a4, instruction a5, list a6, string a7, extensions a8, synchronization a9)
instruction make_instruction_sequence(sequence _field_)
reference copy_reference(reference p)
REFERENCE.
synchronization make_synchronization_none(void)
sequence make_sequence(list a)
task make_task(intptr_t a1, list a2, intptr_t a3, bool a4)
struct _newgen_struct_entity_ * entity
static reference ref
Current stmt (an integer)
static statement module_statement
Pbase base_add_variable(Pbase b, Variable var)
Pbase base_add_variable(Pbase b, Variable v): add variable v as a new dimension to basis b at the end...
void unspaghettify_statement(statement)
The real entry point of unspaghettify:
statement systeme_to_loop_nest(Psysteme, list, statement, entity)
sc is used to generate the loop nest bounds for variables vars.
bool copy_value_of_write(const char *module_name)
PIPS pass.
static void translate_reference_region(reference ref, int *taskid)
call with gen_recurse modify by side effect the variable of the reference to be sure to be a variable...
bool copy_value_of_write_with_cumulated_regions(const char *module_name)
PIPS pass.
static entity region_entity_variable_to_new_declare_entity(entity ent, int taskid)
translate an entity region in a variable entity if it's need if ent is an entity region return a vari...
static statement make_statement_copy_i(reference ref, int i, int taskid)
make_statement_copy_i generate a copy_statement with ref, generate a statement: ref_i = ref;
static void statement_convert_to_statement_with_sequence_of_intruction(statement s, bool extensions_on_sequence)
Maybe these function can be move in statement.c?
static void copy_n_reference(reference ref, int nbr, statement st)
copy_n_reference generate and add nbr statements of copy with reference ref, we have the variable tha...
static string copy_variable_declaration_commenter(__attribute__((unused)) entity e)
Pass: COPY_VALUE_OF_WRITE Debug mode: MPI_GENERATION_DEBUG_LEVEL Properties used:
static bool statement_with_side_effect_p(statement s)
statement_with_side_effect_p Check if the statement make side effect in a variable a side effect for ...
static void copy_write_statement(statement s)
copy_write_statement for the statement s, check if there is/are write effect foreach write effect mak...
static void copy_write_statement_with_cumulated_regions(statement module_statement)
copy_write_statement_with_cumulated_regions foreach first level statement in module_statement generat...
static void copy_n_statement(list lweffects, int nbr, statement st)
copy_n_statement generate and add nbr statements of copy with reference ref, we have the variable tha...
void print_region_sc(effect)
void reset_live_out_regions(void)
void set_live_out_regions(statement_effects)
list effects_read_effects(list)
list load_proper_rw_effects_list(statement)
void reset_proper_rw_effects(void)
void set_proper_rw_effects(statement_effects)
void set_cumulated_rw_effects(statement_effects)
list load_cumulated_rw_effects_list(statement)
list effects_write_effects(list)
void reset_cumulated_rw_effects(void)
list load_live_out_regions_list(statement)
bool expression_with_side_effect_p(expression)
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
#define variable_beta_p(e)
#define variable_rho_p(e)
#define variable_psi_p(e)
#define variable_phi_p(e)
true if e is a phi variable PHI entities have a name like: REGIONS:PHI#, where # is a number.
const char * pips_region_user_name(entity)
char * pips_region_user_name(entity ent) output : the name of entity.
#define descriptor_tag(x)
#define descriptor_convex_p(x)
#define effect_descriptor(x)
#define descriptor_convexunion_p(x)
#define descriptor_convex(x)
#define descriptor_none_p(x)
const char * module_name(const char *s)
Return the module part of an entity name.
char * get_string_property(const char *)
#define gen_context_recurse(start, ctxt, domain_number, flt, rwt)
#define gen_recurse(start, domain_number, flt, rwt)
bool cells_may_conflict_p(cell c1, cell c2)
Check if two cell may conflict.
statement make_empty_block_statement(void)
Build an empty statement (block/sequence)
void reset_current_module_entity(void)
Reset the current module entity.
void reset_current_module_statement(void)
Reset the current module statement.
const char * get_current_module_name(void)
Get the name of the current module.
statement set_current_module_statement(statement)
Set the current module statement.
statement get_current_module_statement(void)
Get the current module statement.
entity set_current_module_entity(entity)
static.c
entity get_current_module_entity(void)
Get the entity of the current module.
bool gen_true2(__attribute__((unused)) gen_chunk *u1, __attribute__((unused)) void *u2)
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
#define ENDP(l)
Test if a list is empty.
#define NIL
The empty list (nil in Lisp)
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
#define CAR(pcons)
Get the value of the first element of a list.
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
list gen_full_copy_list(list l)
Copy a list structure with element copy.
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
#define DB_PUT_MEMORY_RESOURCE(res_name, own_name, res_val)
conform to old interface.
sequence statement_sequence(statement)
Get the sequence of a statement sequence.
bool statement_sequence_p(statement)
Statement classes induced from instruction type.
statement make_assign_statement(expression, expression)
void insert_comments_to_statement(statement, const char *)
Insert a comment string (if non empty) at the beginning of the comments of a statement.
string statement_identification(statement)
Like external_statement_identification(), but with internal information, the hexadecimal address of t...
void pop_generated_variable_commenter(void)
list statement_to_direct_declarations(statement)
Returns the declarations contained directly in a statement s.
void insert_statement(statement, statement, bool)
This is the normal entry point.
statement add_declaration_statement(statement, entity)
void push_generated_variable_commenter(string(*)(entity))
bool declaration_statement_p(statement)
Had to be optimized according to Beatrice Creusillet.
list base_to_list(Pbase base)
Most includes are centralized here.
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_user_warning
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
#define MODULE_SEP_STRING
#define BLOCK_SEP_STRING
Scope separator.
#define STATEMENT_ORDERING_UNDEFINED
mapping.h inclusion
char * i2a(int)
I2A (Integer TO Ascii) yields a string for a given Integer.
string concatenate(const char *,...)
Return the concatenation of the given strings.
void * gen_find_tabulated(const char *, int)
hash_table set_ordering_to_statement(statement s)
To be used instead of initialize_ordering_to_statement() to make sure that the hash table ots is in s...
void reset_ordering_to_statement(void)
Reset the mapping from ordering to statement.
void print_entity_variable(entity e)
print_entity_variable(e)
string expression_to_string(expression e)
void print_statement(statement)
Print a statement on stderr.
static const char * prefix
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
#define make_nop_statement
An alias for make_empty_block_statement.
#define ENTITY_STDIN_P(e)
#define STATEMENT_NUMBER_UNDEFINED
default values
#define DIVIDE_OPERATOR_NAME
#define ENTITY_STDERR_P(e)
#define ENTITY_STDOUT_P(e)
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
bool entity_in_list_p(entity ent, list ent_l)
look for ent in ent_l
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
bool effects_package_entity_p(entity e)
checks if an entity is an IO_EFFECTS_PACKAGE_NAME, a MALLOC_EFFECTS_NAME or a RAND_EFFECTS_PACKAGE_NA...
entity entity_empty_label(void)
string local_name_to_scope(const char *ln)
allocates a new string
const char * entity_module_name(entity e)
See comments about module_name().
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
expression reference_to_expression(reference r)
entity expression_to_entity(expression e)
just returns the entity of an expression, or entity_undefined
extensions empty_extensions(void)
extension.c
void AddLocalEntityToDeclarationsOnly(entity, entity, statement)
Add the variable entity e to the list of variables of the function module.
entity find_or_create_scalar_entity(const char *, const char *, tag)
Looks for an entity which should be a scalar of the specified basic.
#define instruction_sequence_p(x)
#define reference_undefined
#define reference_variable(x)
#define statement_ordering(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define EXPRESSION(x)
EXPRESSION.
#define instruction_undefined
#define statement_label(x)
#define reference_domain
newgen_range_domain_defined
#define sequence_statements(x)
#define reference_indices(x)
#define statement_extensions(x)
#define instruction_sequence(x)
#define statement_declarations(x)
#define statement_instruction(x)
#define statement_comments(x)
#define statement_decls_text(x)
#define statement_number(x)
#define entity_domain
newgen_syntax_domain_defined
#define statement_undefined
#define STATEMENT(x)
STATEMENT.
Psysteme sc_variable_rename(Psysteme s, Variable v_old, Variable v_new)
Psysteme sc_variable_rename(Psysteme s, Variable v_old, Variable v_new): reecriture du systeme s remp...
Psysteme sc_dup(Psysteme ps)
Psysteme sc_dup(Psysteme ps): should becomes a link.
void sc_print(Psysteme ps, get_variable_name_t nom_var)
void sc_print()
void algorithm_row_echelon(Psysteme scn, Pbase base_index, Psysteme *pcondition, Psysteme *penumeration)
see comments above.
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.
#define MPI_GENERATION_NBR_CLUSTER
#define COMMENT_COPY_VARIABLE
#define MPI_GENERATION_PREFIX
task load_parallel_task_mapping(statement)
void store_or_update_parallel_task_mapping(statement, task)
void set_parallel_task_mapping(statement_task)
void reset_parallel_task_mapping(void)
statement_task get_parallel_task_mapping(void)
#define task_synchronization(x)
#define task_on_cluster(x)
#define task_private_data(x)
char *(* get_variable_name_t)(Variable)
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
#define BASE_FOREACH(v, b)