25 #include "pips_config.h"
72 #include "resources.h"
293 fputs(
" to ",stderr);
346 pips_debug(2,
"looking for conflict with statement\n");
367 pips_debug(2,
"conflict found on reference, with") ;
428 pips_debug(1,
"considering block statement:\n");
438 pips_debug(1,
"considering assignment statement:\n");
452 if(
param.stop)
break;
472 debug_on(
"FORWARD_SUBSTITUTE_DEBUG_LEVEL");
bool effects_consistent_p(effects p)
expression copy_expression(expression p)
EXPRESSION.
syntax copy_syntax(syntax p)
SYNTAX.
void free_expression(expression p)
static reference ref
Current stmt (an integer)
static graph dg
dg is the dependency graph ; FIXME : should not be static global ?
static list successors(list l)
#define CONFLICT(x)
CONFLICT.
#define dg_arc_label_conflicts(x)
#define conflict_source(x)
effects load_proper_rw_effects(statement)
void reset_proper_rw_effects(void)
void set_proper_rw_effects(statement_effects)
void set_cumulated_rw_effects(statement_effects)
void reset_cumulated_rw_effects(void)
list proper_effects_of_expression(expression)
#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))
#define effect_variable(e)
For COMPATIBILITY purpose only - DO NOT USE anymore.
action_kind effect_action_kind(effect)
#define action_kind_store_p(x)
#define effects_effects(x)
const char * module_name(const char *s)
Return the module part of an entity name.
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
static void perform_substitution_in_expression(expression e, p_substitution subs)
do perform the substitution var -> val everywhere in s
static bool no_write_effects_on_var(entity var, list le)
static void perform_substitution(p_substitution subs, void *s)
static void free_substitution(p_substitution subs)
static void perform_substitution_in_assign(p_substitution subs, statement s)
struct t_substitution * p_substitution
bool forward_substitute(const char *module_name)
interface to pipsmake.
static bool call_flt(call c, p_substitution subs)
static bool some_conflicts_between(hash_table successors, statement s1, statement s2, p_substitution sub)
whether there are some conflicts between s1 and s2 according to successor table successors
static bool functionnal_on_effects(reference ref, list le)
static bool other_cool_enough_for_a_last_substitution(statement s, reference ref)
s = r ; s = s + w ; // read THEN write...
dg_vertex_label vertex_label
static bool functionnal_on(reference ref, statement s)
returns whether there is other write proper effect than on var or if some variable conflicting with v...
static p_substitution make_substitution(statement source, reference ref, expression val)
newgen-looking make/free
static bool do_substitute(statement anext, struct s_p_s *param)
static bool cool_enough_for_a_last_substitution(statement s)
x = a(i) ; a(j) = x ;
static p_substitution substitution_candidate(statement s, bool only_scalar)
Whether it is a candidate of a substitution operation.
static bool fs_filter(statement stat, graph dg)
top-down forward substitution of reference in SEQUENCE only.
#define gen_context_recurse(start, ctxt, domain_number, flt, rwt)
void gen_full_free_list(list l)
#define successor_vertex(x)
#define successor_arc_label(x)
struct _newgen_struct_graph_ * graph
#define SUCCESSOR(x)
SUCCESSOR.
bool entities_may_conflict_p(entity e1, entity e2)
Check if two entities may conflict.
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
void gen_recurse_stop(void *obj)
Tells the recursion not to go in this object.
void gen_context_multi_recurse(void *o, void *context,...)
Multi-recursion with context function visitor.
void gen_null2(__attribute__((unused)) void *u1, __attribute__((unused)) void *u2)
idem with 2 args, to please overpeaky compiler checks
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
instruction make_instruction_block(list statements)
Build an instruction block from a list of statements.
#define ENDP(l)
Test if a list is empty.
#define POP(l)
Modify a list pointer to point on the next element of the list.
#define NIL
The empty list (nil in Lisp)
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.
#define CDR(pcons)
Get the list less its first element.
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.
list statement_block(statement)
Get the list of block statements of a statement sequence.
call statement_call(statement)
Get the call of a statement.
bool statement_call_p(statement)
statement update_statement_instruction(statement, instruction)
Replace the instruction in statement s by instruction i.
bool assignment_statement_p(statement)
Test if a statement is an assignment.
bool statement_in_statement_p(statement, statement)
void * hash_get(const hash_table htp, const void *key)
this function retrieves in the hash table pointed to by htp the couple whose key is equal to key.
void hash_table_free(hash_table htp)
this function deletes a hash table that is no longer useful.
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
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
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 unnormalize_expression(void *st)
void unnormalize_expression(expression exp): puts all the normalized field of expressions in "st" to ...
string reference_to_string(reference r)
string expression_to_string(expression e)
void print_reference(reference r)
void print_statement(statement)
Print a statement on stderr.
#define binary_call_rhs(c)
#define ENTITY_ASSIGN_P(e)
#define statement_block_p(stat)
#define binary_call_lhs(c)
#define ASSIGN_OPERATOR_NAME
entity update_operator_to_regular_operator(entity op)
Returns the binary operator associated to a C update operator such as +=.
bool same_entity_p(entity e1, entity e2)
predicates on entities
entity local_name_to_top_level_entity(const char *n)
This function try to find a top-level entity from a local name.
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
void update_expression_syntax(expression e, syntax s)
frees expression syntax of e and replace it by the new syntax s
bool reference_equal_p(reference r1, reference r2)
expression MakeUnaryCall(entity f, expression a)
Creates a call expression to a function with one argument.
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.
entity basic_to_generic_conversion(basic)
returns the corresponding generic conversion entity, if any.
basic basic_of_expression(expression)
basic basic_of_expression(expression exp): Makes a basic of the same basic as the expression "exp".
bool entity_scalar_p(entity)
The concrete type of e is a scalar type.
bool basic_equal_p(basic, basic)
basic basic_of_reference(reference)
Retrieves the basic of a reference in a newly allocated basic object.
#define syntax_reference_p(x)
#define expression_domain
newgen_execution_domain_defined
#define syntax_reference(x)
#define reference_variable(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define call_domain
newgen_callees_domain_defined
#define basic_undefined_p(x)
#define EXPRESSION(x)
EXPRESSION.
#define entity_undefined_p(x)
#define reference_indices(x)
#define instruction_call_p(x)
#define statement_instruction(x)
#define instruction_call(x)
#define call_arguments(x)
#define expression_syntax(x)
#define STATEMENT(x)
STATEMENT.
hash_table statements_to_successors(list, graph)
creates a hash_table containing statements from statements as keys and their respective succesors acc...
The structure used to build lists in NewGen.
structure to hold a substitution to be performed forward.
reference ref
the statement where the definition was found.
expression val
maybe could be a reference to allow arrays? SG:done