25 #include "pips_config.h"
50 #include "resources.h"
292 string summary_resource_name,
329 DBR_CUMULATED_POINTER_EFFECTS, DBR_SUMMARY_POINTER_EFFECTS,
".cumu");
341 DBR_CUMULATED_EFFECTS, DBR_SUMMARY_EFFECTS,
".cumu");
359 DBR_IN_EFFECTS, DBR_IN_SUMMARY_EFFECTS,
".ineff");
365 DBR_OUT_EFFECTS, DBR_OUT_SUMMARY_EFFECTS,
".outeff");
377 DBR_CUMULATED_EFFECTS, DBR_SUMMARY_EFFECTS,
".ucumu");
382 return print_code_effects(
module_name,
false,
true,
false,
383 DBR_IN_EFFECTS, DBR_IN_SUMMARY_EFFECTS,
".uineff");
389 DBR_OUT_EFFECTS, DBR_OUT_SUMMARY_EFFECTS,
".uouteff");
424 DBR_PROPER_POINTER_EFFECTS,
439 DBR_CUMULATED_POINTER_EFFECTS,
440 DBR_SUMMARY_POINTER_EFFECTS,
469 DBR_CUMULATED_EFFECTS,
489 bool context_stack_defined_p =
492 if (!context_stack_defined_p)
496 debug_on(
"PROPER_EFFECTS_DEBUG_LEVEL");
502 if (!context_stack_defined_p)
537 bool context_stack_defined_p =
551 if (!context_stack_defined_p)
557 debug_on(
"PROPER_EFFECTS_DEBUG_LEVEL");
574 if (!context_stack_defined_p)
635 bool side_effect_p =
false;
638 side_effect_p =
true;
643 return side_effect_p;
659 bool context_stack_defined_p =
661 bool stmt_stack_defined_p =
671 if (!context_stack_defined_p)
677 if (!stmt_stack_defined_p)
679 debug_on(
"PROPER_EFFECTS_DEBUG_LEVEL");
691 if (!context_stack_defined_p)
695 if (!stmt_stack_defined_p)
735 bool context_stack_defined_p =
738 if (!context_stack_defined_p)
748 if (!context_stack_defined_p)
761 bool invariant_p =
true;
763 for(cee=ee; !
ENDP(cee) && invariant_p;
POP(cee)) {
768 for(cel=el; !
ENDP(el) && invariant_p;
POP(el)) {
954 DBR_LIVE_IN_PATHS, DBR_LIVE_IN_SUMMARY_PATHS,
".live_in");
960 DBR_LIVE_OUT_PATHS, DBR_LIVE_OUT_SUMMARY_PATHS,
".live_out");
973 static void update_loop_locals(
loop l,
bool *changed)
978 fprintf(stderr,
"new body effects:\n");
986 body_effects, private_variable)) {
988 new_loop_locals =
CONS(
ENTITY, private_variable, new_loop_locals);
1033 bool changed =
false;
1038 (changed) ?
"There was at least a change":
1039 "There was no change at all");
1071 pips_debug(7,
"%s implied do index ? index: %s\n",
1079 pips_debug(7,
"index read in range expressions\n");
1094 if (expression_implied_do_index_p(expr,e))
1115 if (expression_implied_do_index_p(
exp,e)) li=
true;
1129 #define ADD_ELEMENT_TO_LIST( _list, _type, _element) \
1130 (_list = gen_nconc( _list, CONS( _type, _element, NIL)))
1134 #define READWRITE_ALL 2
1137 #define READWRITE_END 5
1152 string variables_names =
1154 string saved = variables_names, s;
1157 for (s = variables_names; *s; s++) {
1168 variables_names = s+1;
1186 effects_filter(
list l_effs,
list l_ents)
1239 l_effs_flt = effects_filter(l_effs, vars_to_filter);
1242 if (l_effs_flt !=
NIL) {
1270 static text get_real_call_filtered_proper_effects(
1284 l_effs_flt = effects_filter(l_effs, vars_to_filter);
1286 if (l_effs_flt !=
NIL) {
1321 #include "pips-libs.h"
1322 #ifdef HAVE_PIPS_icfg_LIBRARY
1364 get_real_call_filtered_proper_effects,
1365 get_statement_filtered_proper_effects);
1371 get_real_call_filtered_proper_effects,
1372 get_statement_filtered_proper_effects);
int get_int_property(const string)
void free_effect(effect p)
effects apply_statement_effects(statement_effects f, statement k)
static reference ref
Current stmt (an integer)
static const char * caller_name
static bool is_user_view
useful
void free_effects_private_current_context_stack(void)
void reset_useful_variables_effects(void)
void set_is_user_view_p(bool)
bool live_out_summary_paths_engine(const char *)
bool live_in_summary_paths_engine(const char *)
liveness_analysis_engine.c
void make_effects_private_current_context_stack(void)
void make_effects_private_current_stmt_stack(void)
utils.c
bool in_effects_engine(const char *, effects_representation_val)
list generic_proper_effects_of_range(range)
pointer_info_val get_pointer_info_kind(void)
void expression_proper_effects_engine(const char *, statement)
void proper_effects_of_module_statement(statement)
void close_invariant_rw_effects(void)
bool out_effects_engine(const char *, effects_representation_val)
bool summary_in_effects_engine(const char *)
in_effects_engine.c
void close_rw_effects(void)
void init_useful_variables_effects(void)
list generic_proper_effects_of_any_lhs(expression)
void init_rw_effects(void)
statement effects_private_current_stmt_pop(void)
text get_any_effect_type_text(const char *, string, string, bool)
void free_effects_private_current_stmt_stack(void)
void rw_effects_of_module_statement(statement)
void init_proper_rw_effects(void)
bool effects_private_current_context_stack_initialized_p(void)
bool live_paths_engine(const char *, effects_representation_val)
bool summary_out_effects_engine(const char *)
void effects_private_current_stmt_push(statement)
bool summary_rw_effects_engine(const char *)
bool rw_effects_engine(const char *)
list load_rw_effects_list(statement)
bool get_constant_paths_p(void)
statement_effects get_rw_effects(void)
void set_prettyprint_with_attachments(bool)
list generic_proper_effects_of_expression(expression)
void init_invariant_rw_effects(void)
transformer effects_private_current_context_pop(void)
void generic_effects_reset_all_methods(void)
void close_useful_variables_effects(void)
void set_pointer_info_kind(pointer_info_val)
methods.c
void effects_private_current_context_push(transformer)
list pointer_effects_to_constant_path_effects(list)
bool proper_effects_engine(const char *)
bool print_source_or_code_with_any_effects_engine(const char *, string, string, string, bool)
void set_constant_paths_p(bool)
bool effects_private_current_stmt_stack_initialized_p(void)
statement_effects get_invariant_rw_effects(void)
void close_proper_rw_effects(void)
simple_effects_actions_interpretations
actions interpretation for simple effects prettyprinting
bool print_source_in_effects(const string)
bool print_icfg_with_proper_effects(const string)
void reset_methods_for_inout_effects(void)
void set_methods_for_proper_simple_effects(void)
bool cumulated_effects(const string)
bool proper_pointer_effects(const string)
bool proper_references(const string)
bool summary_effects(const string)
bool print_code_cumulated_effects(const string)
bool expression_invariant_wrt_effects(expression, list)
list proper_constant_path_effects_of_lhs_expression(expression)
bool live_in_summary_paths(const string)
void set_methods_for_inout_effects(const char *)
text simple_rw_effects_to_text(list)
prettyprint.c
bool in_effects(const string)
text get_text_proper_effects(const string)
bool live_paths(const string)
void set_methods_for_proper_simple_pointer_effects(void)
bool cumulated_pointer_effects_with_points_to(const string)
list proper_constant_path_effects_of_expression(expression)
bool print_code_as_a_graph_cumulated_effects(const string)
bool cumulated_pointer_effects_with_pointer_values(const string)
text get_text_proper_pointer_effects(const string)
bool proper_effects_with_pointer_values(const string)
list proper_constant_path_effects_of_any_expression(expression, bool)
bool print_icfg_with_loops_proper_effects(const string)
bool out_effects(const string)
bool print_code_proper_pointer_effects(const string)
bool update_loops_locals(const char *, statement)
list proper_effects_of_expression(expression)
bool simple_cumulated_effects(const char *, statement)
bool print_source_out_effects(const string)
bool print_icfg_with_filtered_proper_effects(const string)
text get_text_cumulated_effects(const string)
bool cumulated_pointer_effects(const string)
list expression_to_proper_effects(expression)
bool print_code_proper_effects(const string)
bool proper_effects_with_points_to(const string)
bool print_icfg_with_loops_cumulated_effects(const string)
bool print_source_proper_effects(const string)
bool print_code_live_in_paths(const string)
bool proper_effects(const string)
bool print_code_out_effects(const string)
bool print_code_in_effects(const string)
bool live_out_summary_paths(const string)
bool print_code_cumulated_pointer_effects(const string)
bool cumulated_effects_with_pointer_values(const string)
list expression_to_proper_constant_path_effects(expression)
bool in_summary_effects(const string)
void set_methods_for_proper_references(void)
methods.c
text get_text_cumulated_pointer_effects(const string)
bool print_code_cumulated_references(const string)
list statement_to_effects(statement)
void rproper_effects_of_statement(statement)
void set_methods_for_live_in_paths_prettyprint(const char *)
void set_methods_for_simple_pointer_effects(void)
list proper_effects_of_range(range)
list get_list_of_variable_to_filter(void)
bool print_code_proper_references(const string)
void reset_methods_for_effects_prettyprint(const char *)
bool print_code_as_a_graph_proper_effects(const string)
void set_methods_for_cumulated_references(void)
list lhs_expression_to_proper_constant_path_effects(expression)
bool print_source_cumulated_effects(const string)
void set_methods_for_simple_effects(void)
bool is_implied_do_index(entity, instruction)
bool cumulated_references(const string)
interface.c
bool summary_pointer_effects(const string)
bool print_dvicfg_with_filtered_proper_effects(const string)
void set_methods_for_live_paths(const char *)
void rcumulated_effects_of_statement(statement)
bool cumulated_effects_with_points_to(const string)
void set_methods_for_live_out_paths_prettyprint(const char *)
list proper_constant_path_effects_of_expression_with_points_to(expression, statement)
bool print_icfg_with_control_proper_effects(const string)
void set_methods_for_rw_effects_prettyprint(const char *)
bool print_icfg_with_control_cumulated_effects(const string)
bool print_code_live_out_paths(const string)
bool out_summary_effects(const string)
bool expression_with_side_effect_p(expression)
bool print_icfg_with_cumulated_effects(const string)
bool full_simple_proper_effects(const char *, statement)
void set_methods_for_inout_effects_prettyprint(const char *)
list expression_to_proper_constant_path_effects_with_points_to(expression, statement)
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
#define effect_write_p(eff)
bool effects_interfere_p(effect, effect)
Two effects interfere if one of them modify the set of locations defined by the other one.
#define action_write_p(x)
struct _newgen_struct_statement_effects_ * statement_effects
#define effects_effects(x)
const char * module_name(const char *s)
Return the module part of an entity name.
char * get_string_property(const char *)
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
#define gen_context_recurse(start, ctxt, domain_number, flt, rwt)
bool entities_may_conflict_p(entity e1, entity e2)
Check if two entities may conflict.
bool effects_may_read_or_write_memory_paths_from_entity_p(list l_eff, entity e)
tests whether the input effects list may contain effects with a memory path from the input entity e; ...
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.
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)
#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)
#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.
void gen_free_list(list l)
free the spine of the 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.
#define list_undefined
Undefined list definition :-)
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
#define ADD_ELEMENT_TO_LIST(_list, _type, _element)
bool generic_print_icfg(const string, bool, bool, bool, text(*)(const string))
bool generic_print_icfg_filtered(const string, bool, bool, bool, text(*)(entity, statement, call), text(*)(entity, statement))
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_user_warning
#define pips_internal_error
string bool_to_string(bool)
void * gen_find_tabulated(const char *, int)
#define string_undefined_p(s)
text statement_to_text(statement)
void set_bool_property(const char *, bool)
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 same_entity_p(entity e1, entity e2)
predicates on entities
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.
const char * module_local_name(entity e)
Returns the module local user name.
void print_entities(list l)
bool expression_implied_do_p(e)
#define syntax_reference_p(x)
#define transformer_undefined
#define syntax_reference(x)
#define reference_variable(x)
#define loop_domain
newgen_language_domain_defined
#define EXPRESSION(x)
EXPRESSION.
#define entity_undefined_p(x)
#define instruction_call_p(x)
#define statement_instruction(x)
#define statement_comments(x)
#define instruction_call(x)
#define call_arguments(x)
#define expression_syntax(x)
#define entity_domain
newgen_syntax_domain_defined
#define entity_initial(x)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
The structure used to build lists in NewGen.
#define MERGE_TEXTS(r, t)
#define exp
Avoid some warnings from "gcc -Wshadow".