25 #include "pips_config.h"
33 #include "resources.h"
101 else pips_user_warning(
"replacement of non reference expression not implemented yet \n");
257 debug_on(
"REDUCTION_DETECTION_DEBUG_LEVEL");
static hash_table seen
static function to store whether a module has been seen during the recursive generation of the daVinc...
void free_reference(reference p)
void free_expression(expression p)
reference copy_reference(reference p)
REFERENCE.
static graph dependence_graph
static reference ref
Current stmt (an integer)
static graph dg
dg is the dependency graph ; FIXME : should not be static global ?
struct _newgen_struct_statement_ * statement
#define CONFLICT(x)
CONFLICT.
#define dg_arc_label_conflicts(x)
#define conflict_source(x)
#define conflict_undefined
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
#define effect_write_p(eff)
#define effect_read_p(eff)
#define effect_scalar_p(eff) entity_scalar_p(effect_entity(eff))
bool anywhere_effect_p(effect)
Is it an anywhere effect? ANYMMODULE:ANYWHERE
void simplify_c_operator(statement)
replace PLUS_C_OPERATOR_NAME by PLUS_OPERATOR_NAME when relevant
#define successor_vertex(x)
#define successor_arc_label(x)
struct _newgen_struct_graph_ * graph
#define vertex_successors(x)
#define SUCCESSOR(x)
SUCCESSOR.
#define graph_vertices(x)
void reset_current_module_entity(void)
Reset the current module entity.
void reset_current_module_statement(void)
Reset the current module statement.
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.
void replace_reference(void *s, reference old, entity new)
Replace an old reference by a reference to a new entity in a statement.
void replace_entity_by_expression(void *s, entity ent, expression exp)
replace all reference to entity ent by expression exp in s.
size_t gen_length(const list l)
#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.
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.
call statement_call(statement)
Get the call of a statement.
bool assignment_statement_p(statement)
Test if a statement is an assignment.
statement vertex_to_statement(vertex v)
Vertex_to_statement looks for the statement that is pointed to by vertex v.
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_user_warning
bool set_belong_p(const set, const void *)
set set_make(set_type)
Create an empty set of any type but hash_private.
set set_add_element(set, const set, const void *)
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.
entity reduction_operator_entity(reduction_operator op)
match a reduction operator against operator entity
bool reduction_propagation(const char *mod_name)
now try to backward propagate the reduction, if it is meaningful.
static bool potential_reduction_substitution_valid_p(list sus, conflict legal_conflict, reference ref)
static bool do_reduction_detection(graph dg)
sg: this function does a huge pattern matching :) and is not very smart
bool reduction_detection(const char *mod_name)
dg_vertex_label vertex_label
static void do_reduction_propagation(graph dg)
sg: this function does a huge pattern matching :) and is not very smart
static reference guess_potential_reduction(successor su, conflict *relevant)
reductions load_proper_reductions(statement)
void reset_proper_reductions(void)
void set_proper_reductions(pstatement_reductions)
#define REDUCTION(x)
REDUCTION.
#define reduction_reference(x)
#define reductions_list(x)
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
#define binary_call_rhs(c)
#define expression_scalar_p(e)
#define binary_call_lhs(c)
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
bool intrinsic_entity_p(entity e)
bool same_entity_p(entity e1, entity e2)
predicates on entities
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
expression reference_to_expression(reference r)
bool expression_call_p(expression e)
call expression_call(expression e)
bool reference_equal_p(reference r1, reference r2)
bool expression_reference_p(expression e)
Test if an expression is a reference.
reference expression_reference(expression e)
Short cut, meaningful only if expression_reference_p(e) holds.
bool reference_scalar_p(reference r)
This function returns true if Reference r is scalar.
void RemoveLocalEntityFromDeclarations(entity, entity, statement)
#define syntax_reference(x)
#define reference_undefined
#define reference_variable(x)
#define reference_undefined_p(x)
#define EXPRESSION(x)
EXPRESSION.
#define call_arguments(x)
#define expression_syntax(x)
FI: I do not understand why the type is duplicated at the set level.
The structure used to build lists in NewGen.