PIPS
effects-convex.h File Reference

Go to the source code of this file.

Macros

#define region   effect
 Warning! Do not modify this file that is automatically generated! More...
 
#define REGION   EFFECT /**for casts */
 
#define region_CAST   REGION_CAST
 
#define REGION_CAST(x)   REGION(x)
 
#define REGION_   EFFECT_ /**for some left casts */
 
#define REGION_TYPE   EFFECT_TYPE
 
#define REGION_NEWGEN_DOMAIN   EFFECT_NEWGEN_DOMAIN
 
#define gen_REGION_cons   gen_effect_cons
 
#define gen_region_cons   gen_effect_cons
 
#define region_undefined   effect_undefined
 
#define region_undefined_p(reg)   effect_undefined_p((reg))
 
#define make_region(reference, action, approximation, system)
 
#define region_any_reference(reg)    (cell_preference_p(effect_cell(reg)) ? preference_reference(cell_preference(effect_cell(reg))) : cell_reference(effect_cell(reg)))
 To be avoided. More...
 
#define region_action(reg)   effect_action(reg)
 
#define region_approximation(reg)   effect_approximation(reg)
 
#define region_context(reg)   effect_context(reg)
 
#define region_cell(reg)   effect_cell(reg)
 
#define region_entity(reg)   reference_variable(region_any_reference(reg))
 
#define region_action_tag(reg)   action_tag(effect_action(reg))
 
#define region_approximation_tag(reg)    approximation_tag(effect_approximation(reg))
 
#define region_system_(reg)    descriptor_convex_(effect_descriptor(reg))
 
#define region_system(reg)    descriptor_convex(effect_descriptor(reg))
 
#define region_read_p(reg)   (action_tag(effect_action(reg))==is_action_read)
 useful region macros More...
 
#define region_write_p(reg)   (action_tag(effect_action(reg))==is_action_write)
 
#define region_may_p(reg)    (approximation_tag(effect_approximation(reg)) == is_approximation_may)
 
#define region_must_p(reg)    (approximation_tag(effect_approximation(reg)) == is_approximation_must)
 
#define region_exact_p(reg)    (approximation_tag(effect_approximation(reg)) == is_approximation_exact)
 
#define region_empty_p(reg)   sc_empty_p(region_system(reg))
 
#define region_rn_p(reg)   sc_rn_p(region_system(reg))
 
#define region_scalar_p(reg)   (anywhere_effect_p(reg) || entity_scalar_p(region_entity(reg)))
 
#define effect_region_p(e)   (descriptor_convex_p(effect_descriptor(e)))
 
#define debug_regions_consistency(l_reg)   ifdebug(1){regions_consistent_p(l_reg);}
 consistency checking More...
 
#define debug_region_consistency(reg)   ifdebug(1){region_consistent_p(reg);}
 
#define debug_print_region(level, message, region)    ifdebug(level) { pips_debug(level, "%s\n", message); print_region(region);}
 convenient debug messages More...
 
#define R_RW   0
 other things More...
 
#define R_IN   1
 
#define R_OUT   2
 
#define SEQUENTIAL_REGION_SUFFIX   ".reg"
 
#define SEQUENTIAL_PROPER_REGION_SUFFIX   ".preg"
 
#define USER_REGION_SUFFIX   ".ureg"
 
#define SEQUENTIAL_IN_REGION_SUFFIX   ".inreg"
 
#define USER_IN_REGION_SUFFIX   ".uinreg"
 
#define SEQUENTIAL_OUT_REGION_SUFFIX   ".outreg"
 
#define USER_OUT_REGION_SUFFIX   ".uoutreg"
 
#define NB_MAX_ARRAY_DIM   12
 

Functions

bool summary_pointer_regions (const string)
 cproto-generated files More...
 
bool summary_regions (const string)
 
bool may_pointer_regions (const string)
 
bool may_regions (const string)
 
bool must_pointer_regions (const string)
 
bool must_pointer_regions_with_points_to (const string)
 
bool must_regions (const string)
 
bool must_regions_with_points_to (const string)
 
bool must_regions_with_pointer_values (const string)
 
bool in_summary_regions (const string)
 
bool in_regions (const string)
 
bool out_summary_regions (const string)
 
bool out_regions (const string)
 
bool live_out_regions (const char *)
 
bool print_code_proper_pointer_regions (const string)
 
bool print_code_pointer_regions (const string)
 
bool print_code_inv_pointer_regions (const string)
 
bool print_code_proper_regions (const string)
 
bool print_source_proper_regions (const string)
 
bool print_code_regions (const string)
 
bool print_source_regions (const string)
 
bool print_code_inv_regions (const string)
 
bool print_source_inv_regions (const string)
 
bool print_code_in_regions (const string)
 
bool print_source_in_regions (const string)
 
bool print_code_out_regions (const string)
 
bool print_source_out_regions (const string)
 
bool print_code_live_out_regions (const char *)
 
bool print_code_as_a_graph_regions (const string)
 
bool print_code_as_a_graph_in_regions (const string)
 
bool print_code_as_a_graph_out_regions (const string)
 
list regions_of_expression (expression, transformer)
 
list proper_regions_of_expression (expression, transformer)
 
list proper_regions_of_expressions (list, transformer)
 
bool print_call_graph_with_regions (const string)
 
bool print_call_graph_with_in_regions (const string)
 
bool print_call_graph_with_out_regions (const string)
 
bool print_icfg_with_regions (const string)
 
bool print_icfg_with_in_regions (const string)
 
bool print_icfg_with_out_regions (const string)
 
bool print_icfg_with_loops_regions (const string)
 
bool print_icfg_with_loops_in_regions (const string)
 
bool print_icfg_with_loops_out_regions (const string)
 
bool print_icfg_with_control_regions (const string)
 
bool print_icfg_with_control_in_regions (const string)
 
bool print_icfg_with_control_out_regions (const string)
 
void region_translation_statistics_init (bool)
 translation.c More...
 
void region_translation_statistics_close (const char *, const char *)
 
void region_translation_init (entity, reference, entity, reference, Value)
 
void append_declaration_sc_if_exact_without_constraints (effect)
 
effect region_translation (effect, entity, reference, entity, entity, reference, Value, bool)
 
void set_region_interprocedural_translation (void)
 
void reset_region_interprocedural_translation (void)
 
void set_interprocedural_translation_context_sc (entity, list)
 
void set_translation_context_sc (Psysteme)
 
Psysteme get_translation_context_sc (void)
 
void reset_translation_context_sc (void)
 
void set_forward_arguments_to_eliminate (void)
 
void set_backward_arguments_to_eliminate (entity)
 
void set_arguments_to_eliminate (list)
 
void reset_arguments_to_eliminate (void)
 
list get_arguments_to_eliminate (void)
 
void convex_region_descriptor_translation (effect)
 
void convex_cell_reference_with_address_of_cell_reference_translation (reference, descriptor, reference, descriptor, int, reference *, descriptor *, bool *)
 
void convex_cell_reference_with_value_of_cell_reference_translation (reference, descriptor, reference, descriptor, int, reference *, descriptor *, bool *)
 
void convex_cell_with_address_of_cell_translation (cell, descriptor, cell, descriptor, int, cell *, descriptor *, bool *)
 
void convex_cell_with_value_of_cell_translation (cell, descriptor, cell, descriptor, int, cell *, descriptor *, bool *)
 
void set_methods_for_convex_effects (void)
 methods.c More...
 
void set_methods_for_convex_rw_effects (void)
 
void set_methods_for_convex_rw_pointer_effects (void)
 
void set_methods_for_convex_in_out_effects (void)
 
bool in_out_methods_p (void)
 
void init_convex_rw_prettyprint (const char *)
 
void init_convex_rw_regions (const char *)
 
void init_convex_inout_prettyprint (const char *)
 
void init_convex_in_out_regions (const char *)
 
void reset_convex_rw_regions (const char *)
 
void reset_convex_in_out_regions (const char *)
 
void init_convex_summary_rw_regions (const char *)
 
void reset_convex_summary_rw_regions (const char *)
 
void init_convex_summary_in_out_regions (const char *)
 
void reset_convex_prettyprint (const char *)
 
void reset_convex_summary_in_out_regions (const char *)
 
list convex_regions_transformer_compose (list, transformer)
 compose.c More...
 
list convex_regions_inverse_transformer_compose (list, transformer)
 
list convex_regions_precondition_compose (list, transformer, bool)
 
effect reference_to_convex_region (reference, action, bool)
 unary_operators.c More...
 
list convex_regions_descriptor_variable_rename (list, entity, entity)
 
descriptor loop_convex_descriptor_make (loop)
 
list convex_regions_loop_normalize (list, entity, range, entity *, descriptor, bool)
 
list convex_regions_union_over_range (list, entity, range, descriptor)
 
descriptor vector_to_convex_descriptor (Pvecteur)
 
void convex_effects_descriptor_normalize (list)
 
Ppolynome sc_enumerate (Psysteme, Pbase, const char *[])
 sc_enumerate.c More...
 
entity make_beta_entity (int)
 utils.c More...
 
list beta_entities_list (int, int)
 
void regions_init (void)
 
void regions_end (void)
 
effect region_dup (effect)
 
list regions_dup (list)
 
void regions_free (list)
 
void region_free (effect)
 
list region_add_to_regions (effect, list)
 
list regions_add_region (list, effect)
 
list regions_add_context (list, transformer)
 
Psysteme region_sc_normalize (Psysteme, int)
 
Psysteme cell_system_sc_append_and_normalize (Psysteme, Psysteme, int)
 
void region_sc_append_and_normalize (effect, Psysteme, int)
 
list regions_sc_append_and_normalize (list, Psysteme, bool, bool, int)
 
list array_regions_sc_append_and_normalize (list, Psysteme, int)
 
void region_sc_append (effect, Psysteme, bool)
 
list regions_sc_append (list, Psysteme, bool, bool, bool)
 
list all_regions_sc_append (list, Psysteme, bool)
 
list scalar_regions_sc_append (list, Psysteme, bool)
 
list array_regions_sc_append (list, Psysteme, bool)
 
list regions_remove_variables_regions (list, list)
 
void array_regions_variable_rename (list, entity, entity)
 
void all_regions_variable_rename (list, entity, entity)
 
void region_value_substitute (effect, entity, entity)
 
list region_entities_cfc_variables (effect, list)
 
list sc_entities_cfc_variables (Psysteme, list)
 
list region_to_list (effect)
 
list region_to_may_region_list (effect)
 
list regions_to_nil_list (effect, effect)
 
list region_to_nil_list (effect)
 
list regions_to_write_regions (list)
 
list regions_read_regions (list)
 
list regions_write_regions (list)
 
reference make_pointed_regions_reference (entity, bool)
 
reference make_regions_reference (entity)
 
effect make_reference_region (reference, action)
 
reference make_regions_psi_reference (entity)
 
effect reference_whole_region (reference, action)
 
effect entity_whole_region (entity, action)
 
list region_to_store_independent_region_list (effect, bool)
 
void convex_region_add_expression_dimension (effect, expression)
 
void convex_region_change_ith_dimension_expression (effect, expression, int)
 
void convex_region_descriptor_remove_ith_dimension (effect, int)
 
effect convex_effect_field_to_rank_conversion (effect)
 
effect region_append (effect, effect)
 
entity make_phi_entity (int)
 
int phi_entity_rank (entity)
 
list phi_entities_list (int, int)
 
list convex_effect_to_phi_entity_list (effect)
 
expression make_phi_expression (int)
 
bool sc_add_phi_equation (Psysteme *, expression, int, bool, bool)
 
void phi_first_sort_base (Pbase *)
 
int base_nb_phi (Pbase)
 
entity make_psi_entity (int)
 
list psi_entities_list (int, int)
 
expression make_psi_expression (int)
 
int base_nb_psi (Pbase)
 
entity make_rho_entity (int)
 
list rho_entities_list (int, int)
 
bool rho_reference_p (reference)
 
bool rho_region_p (effect)
 
expression make_rho_expression (int)
 
int base_nb_rho (Pbase)
 
list cell_reference_phi_cfc_variables (reference, Psysteme)
 
list region_phi_cfc_variables (effect)
 
void psi_to_phi_region (effect)
 
void phi_to_psi_region (effect)
 
bool psi_reference_p (reference)
 
bool psi_region_p (effect)
 
bool exact_regions_p (void)
 
bool must_regions_p (void)
 
bool array_bounds_p (void)
 
bool disjunct_regions_p (void)
 
bool op_statistics_p (void)
 
void reset_op_statistics (void)
 
void get_regions_properties (void)
 
void get_in_out_regions_properties (void)
 
void region_sc_sort (Psysteme, Pbase)
 
Pcontrainte region_constraints_sort (Pcontrainte, Pbase, bool)
 
Pbase region_sorted_base_dup (effect)
 
Psysteme entity_declaration_sc (entity)
 
list variables_to_int_variables (list)
 
list variables_to_old_variables (list)
 
Psysteme sc_list_variables_rename (Psysteme, list, list)
 
list function_formal_parameters (entity)
 
char * func_entity_name (entity)
 
bool same_common_variables_p (entity, entity)
 
Psysteme sc_loop_proper_precondition (loop)
 
bool empty_convex_context_p (transformer)
 
string region_to_string (effect)
 
bool rectangular_region_p (effect)
 
bool rectangular_must_region_p (entity, statement)
 
effect region_rectangular_hull (effect, bool)
 
expression region_reference_to_expression (reference)
 
Ppolynome region_enumerate (effect)
 
bool region_consistent_p (effect)
 debug.c More...
 
bool regions_consistent_p (list)
 
void convex_regions_translation_init (entity, list, bool)
 interprocedural.c More...
 
void convex_regions_translation_end (void)
 
void reset_out_summary_regions_list (void)
 
void update_out_summary_regions_list (list)
 
list get_out_summary_regions_list (void)
 
list out_regions_from_caller_to_callee (entity, entity)
 
void out_regions_from_call_site_to_callee (call)
 void out_regions_from_call_site_to_callee(call c) input : a potential call site for current_callee. More...
 
list in_regions_of_external (entity, list, transformer)
 list in_regions_of_external(entity func, list real_args, transformer context) input : an external function func, and the list of real arguments used in the calling function. More...
 
list regions_of_external (entity, list, transformer, bool)
 list regions_of_external(entity func, list real_args, transformer context) input : an external function func, and the list of real arguments used in the calling function. More...
 
list convex_regions_backward_translation (entity, list, list, transformer)
 of effects More...
 
list convex_regions_forward_translation (entity, list, list, transformer)
 of effects More...
 
list regions_backward_translation (entity, list, list, transformer, bool)
 list regions_backward_tranlation(entity func, list real_args, list func_regions, transformer context) input : an external function func, and the list of real arguments used in the calling function. More...
 
list c_convex_effects_on_formal_parameter_backward_translation (list, expression, transformer)
 
list regions_forward_translation (entity, list, list, transformer)
 list regions_forward_translation(entity func, list real_args, l_reg, transformer context input : the called function func, the real arguments of the call, the list of regions to translate, and the context of the call. More...
 
list c_convex_effects_on_actual_parameter_forward_translation (entity, expression, entity, list, transformer)
 
string region_sc_to_string (string, Psysteme)
 prettyprint.c More...
 
text text_region (effect)
 
void print_region_sc (effect)
 
text text_inout_array_regions (list)
 
text text_rw_array_regions (list)
 
text text_copyinout_array_regions (list)
 
text text_private_array_regions (list)
 
text get_text_regions (const string)
 
text get_text_in_regions (const string)
 
text get_text_out_regions (const string)
 
void print_rw_regions (list)
 
void print_inout_regions (list)
 
void print_copyinout_regions (list)
 
void print_private_regions (list)
 
void print_regions (list)
 
void print_region (effect)
 
void print_regions_op_statistics (char *, int)
 
void reset_binary_op_statistics (void)
 binary_operators.c More...
 
void print_umust_statistics (char *, char *)
 
void print_umay_statistics (char *, char *)
 
void print_dsup_statistics (char *, char *)
 
void print_dinf_statistics (char *, char *)
 
list RegionsMayUnion (list, list, bool(*)(effect, effect))
 list RegionsMayUnion(list l1, list l2, union_combinable_p) input : two lists of regions output : a list of regions, may union of the two initial lists modifies : l1 and l2 and their regions. More...
 
list RegionsMustUnion (list, list, bool(*)(effect, effect))
 list RegionsMustUnion(list l1, list l2, union_combinable_p) input : two lists of regions output : a list of regions, must union of the two initial lists modifies : l1 and l2 and their regions. More...
 
list RegionsIntersection (list, list, bool(*)(effect, effect))
 list RegionsIntersection(list l1,l2, bool (*intersection_combinable_p)(effect, effect)) input : output : modifies : comment : More...
 
list RegionsEntitiesIntersection (list, list, bool(*)(effect, effect))
 list RegionsEntitiesIntersection(list l1,l2, bool (*intersection_combinable_p)(effect, effect)) input : two lists of regions output : a list of regions containing all the regions of l1 that have a corresponding region (i.e. More...
 
list RegionsSupDifference (list, list, bool(*)(effect, effect))
 list RegionsSupDifference(list l1, l2) input : two lists of regions output : a list of region, representing the sup_difference of the initial regions. More...
 
list RegionsInfDifference (list, list, bool(*)(effect, effect))
 list RegionsInfDifference(list l1, l2) input : two lists of regions output : a list of region, representing the inf_difference of the initial regions. More...
 
list RegionsEntitiesInfDifference (list, list, bool(*)(effect, effect))
 list RegionsEntitiesInfDifference(list l1, l2) input : two lists of regions output : a list of regions, such that: if there is a region R concerning entity A in l1 and in l2, then R is removed from the result; if there is a region R concerning array A in l1, but not in l2, then it is kept in l1, and in the result. More...
 
list region_must_union (effect, effect)
 
list region_may_union (effect, effect)
 
list region_union (effect, effect, bool)
 
effect regions_must_convex_hull (effect, effect)
 
bool convex_cells_inclusion_p (cell, descriptor, cell, descriptor, bool *)
 Inclusion test : More...
 
list region_intersection (effect, effect)
 
bool convex_cells_intersection_p (cell, descriptor, cell, descriptor, bool *)
 
list region_entities_intersection (effect, effect)
 
list region_sup_difference (effect, effect)
 
list region_inf_difference (effect, effect)
 
void reset_proj_op_statistics (void)
 old_projection.c More...
 
void print_proj_op_statistics (char *, char *)
 
entity loop_regions_normalize (list, entity, range, bool *, bool, Psysteme *)
 FONCTIONS D'INTERFACE
More...
 
void project_regions_along_loop_index (list, entity, range)
 void project_regions_along_loop_index(list l_reg, entity index, l_range) input : a list l_reg of regions, a variable which is a loop index. More...
 
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, and the list of variables along which the projection will be performed. More...
 
void project_regions_along_parameters (list, list)
 void project_regions_along_parameters(list l_reg, list l_param) input : a list of regions to project, and the list of variables along which the projection will be performed. More...
 
void project_regions_with_transformer (list, transformer, list)
 
void project_regions_with_transformer_inverse (list, transformer, list)
 
void regions_transformer_apply (list, transformer, list, bool)
 void regions_transformer_apply(l_reg, trans, l_var_not_proj) input : a list of regions, the transformer corresponding to the current statement, and a list of variables along which the regions must not be projected (typically a loop index). More...
 
void regions_remove_phi_variables (list)
 void regions_remove_phi_variables(list l_reg) input : a list of regions, and an integer, which is the highest rank of phi variables that will be kept. More...
 
list regions_dynamic_elim (list)
 list regions_dynamic_elim(list l_reg) input : a list of regions. More...
 
void region_remove_phi_variables (effect)
 
Psysteme cell_reference_system_remove_psi_variables (reference, Psysteme, bool *)
 
void region_remove_psi_variables (effect)
 
Psysteme cell_reference_system_remove_rho_variables (reference, Psysteme, bool *)
 
void region_remove_rho_variables (effect)
 
void region_remove_beta_variables (effect)
 
void region_non_exact_projection_along_parameters (effect, list)
 
void region_exact_projection_along_parameters (effect, list)
 
void region_non_exact_projection_along_variables (effect, list)
 
void region_exact_projection_along_variables (effect, list)
 void region_exact_projection_along_variables(effect reg, list l_var) input : a region and a list of variables. More...
 
Psysteme cell_reference_sc_exact_projection_along_variable (reference, Psysteme, entity, bool *)
 
void region_exact_projection_along_variable (effect, entity)
 
bool region_projection_along_index_safe_p (entity, range)
 
void region_dynamic_var_elim (effect)
 
Psysteme sc_projection_ofl_along_list_of_variables (Psysteme, list)
 MISC
More...
 
void region_sc_projection_along_variables_ofl_ctrl (Psysteme *, Pvecteur, int)
 void region_sc_projection_ofl_along_variables(Psysteme *psc, Pvecteur pv) input : a system of constraints, and a vector of variables. More...
 
bool convex_cell_reference_preceding_p (reference, descriptor, reference, descriptor, transformer, bool, bool *)
 eval.c More...
 
bool convex_cell_preceding_p (cell, descriptor, cell, descriptor, transformer, bool, bool *)
 
void simple_reference_to_convex_reference_conversion (reference, reference *, descriptor *)
 
void simple_cell_to_convex_cell_conversion (cell, cell *, descriptor *)
 
list eval_convex_cell_with_points_to (cell, descriptor, list, bool *, transformer)
 
list convex_effect_to_constant_path_effects_with_points_to (effect)
 
list convex_effect_find_aliased_paths_with_pointer_values (effect, statement)
 
list convex_effect_to_constant_path_effects_with_pointer_values (effect)
 
bool adapt_convex_effect_cell_to_backward_translation (effect)
 points_to.c More...
 
void adapt_phi_n_variable_in_convex_effect (effect, expression, entity)
 
effect adapt_translation_as_convex_effect (effect, effect)
 
effect substitute_stubs_in_convex_array_region (effect, bool, set)
 

Variables

bool add_precondition_to_scalar_convex_regions
 

Macro Definition Documentation

◆ debug_print_region

#define debug_print_region (   level,
  message,
  region 
)     ifdebug(level) { pips_debug(level, "%s\n", message); print_region(region);}

convenient debug messages

Definition at line 102 of file effects-convex.h.

◆ debug_region_consistency

#define debug_region_consistency (   reg)    ifdebug(1){region_consistent_p(reg);}

Definition at line 98 of file effects-convex.h.

◆ debug_regions_consistency

#define debug_regions_consistency (   l_reg)    ifdebug(1){regions_consistent_p(l_reg);}

consistency checking

Definition at line 96 of file effects-convex.h.

◆ effect_region_p

#define effect_region_p (   e)    (descriptor_convex_p(effect_descriptor(e)))

Definition at line 93 of file effects-convex.h.

◆ gen_REGION_cons

#define gen_REGION_cons   gen_effect_cons

Definition at line 42 of file effects-convex.h.

◆ gen_region_cons

#define gen_region_cons   gen_effect_cons

Definition at line 43 of file effects-convex.h.

◆ make_region

#define make_region (   reference,
  action,
  approximation,
  system 
)
Value:
descriptor make_descriptor(enum descriptor_utype tag, void *val)
Definition: effects.c:433
cell make_cell(enum cell_utype tag, void *val)
Definition: effects.c:290
effect make_effect(cell a1, action a2, approximation a3, descriptor a4)
Definition: effects.c:484
@ is_cell_reference
Definition: effects.h:445
@ is_descriptor_convex
Definition: effects.h:575

Definition at line 47 of file effects-convex.h.

◆ NB_MAX_ARRAY_DIM

#define NB_MAX_ARRAY_DIM   12

Definition at line 121 of file effects-convex.h.

◆ R_IN

#define R_IN   1

Definition at line 110 of file effects-convex.h.

◆ R_OUT

#define R_OUT   2

Definition at line 111 of file effects-convex.h.

◆ R_RW

#define R_RW   0

other things

Definition at line 109 of file effects-convex.h.

◆ region

#define region   effect

Warning! Do not modify this file that is automatically generated!

Modify src/Libs/effects-convex/effects-convex-local.h instead, to add your own modifications. header file built by cproto effects_convex-local.h simulation of the type region

Definition at line 35 of file effects-convex.h.

◆ REGION

#define REGION   EFFECT /**for casts */

Definition at line 36 of file effects-convex.h.

◆ REGION_

#define REGION_   EFFECT_ /**for some left casts */

Definition at line 39 of file effects-convex.h.

◆ region_action

#define region_action (   reg)    effect_action(reg)

Definition at line 66 of file effects-convex.h.

◆ region_action_tag

#define region_action_tag (   reg)    action_tag(effect_action(reg))

Definition at line 72 of file effects-convex.h.

◆ region_any_reference

#define region_any_reference (   reg)     (cell_preference_p(effect_cell(reg)) ? preference_reference(cell_preference(effect_cell(reg))) : cell_reference(effect_cell(reg)))

To be avoided.

Use region_any_reference() instead. I definitely remove this one : it is too dangerous. BC. FC: it should not compile, rather than compile and fail???

Definition at line 64 of file effects-convex.h.

◆ region_approximation

#define region_approximation (   reg)    effect_approximation(reg)

Definition at line 67 of file effects-convex.h.

◆ region_approximation_tag

#define region_approximation_tag (   reg)     approximation_tag(effect_approximation(reg))

Definition at line 73 of file effects-convex.h.

◆ region_CAST

#define region_CAST   REGION_CAST

Definition at line 37 of file effects-convex.h.

◆ REGION_CAST

#define REGION_CAST (   x)    REGION(x)

Definition at line 38 of file effects-convex.h.

◆ region_cell

#define region_cell (   reg)    effect_cell(reg)

Definition at line 69 of file effects-convex.h.

◆ region_context

#define region_context (   reg)    effect_context(reg)

Definition at line 68 of file effects-convex.h.

◆ region_empty_p

#define region_empty_p (   reg)    sc_empty_p(region_system(reg))

Definition at line 90 of file effects-convex.h.

◆ region_entity

#define region_entity (   reg)    reference_variable(region_any_reference(reg))

Definition at line 71 of file effects-convex.h.

◆ region_exact_p

#define region_exact_p (   reg)     (approximation_tag(effect_approximation(reg)) == is_approximation_exact)

Definition at line 88 of file effects-convex.h.

◆ region_may_p

#define region_may_p (   reg)     (approximation_tag(effect_approximation(reg)) == is_approximation_may)

Definition at line 84 of file effects-convex.h.

◆ region_must_p

#define region_must_p (   reg)     (approximation_tag(effect_approximation(reg)) == is_approximation_must)

Definition at line 86 of file effects-convex.h.

◆ REGION_NEWGEN_DOMAIN

#define REGION_NEWGEN_DOMAIN   EFFECT_NEWGEN_DOMAIN

Definition at line 41 of file effects-convex.h.

◆ region_read_p

#define region_read_p (   reg)    (action_tag(effect_action(reg))==is_action_read)

useful region macros

Definition at line 82 of file effects-convex.h.

◆ region_rn_p

#define region_rn_p (   reg)    sc_rn_p(region_system(reg))

Definition at line 91 of file effects-convex.h.

◆ region_scalar_p

#define region_scalar_p (   reg)    (anywhere_effect_p(reg) || entity_scalar_p(region_entity(reg)))

Definition at line 92 of file effects-convex.h.

◆ region_system

#define region_system (   reg)     descriptor_convex(effect_descriptor(reg))

Definition at line 77 of file effects-convex.h.

◆ region_system_

#define region_system_ (   reg)     descriptor_convex_(effect_descriptor(reg))

Definition at line 75 of file effects-convex.h.

◆ REGION_TYPE

#define REGION_TYPE   EFFECT_TYPE

Definition at line 40 of file effects-convex.h.

◆ region_undefined

#define region_undefined   effect_undefined

Definition at line 45 of file effects-convex.h.

◆ region_undefined_p

#define region_undefined_p (   reg)    effect_undefined_p((reg))

Definition at line 46 of file effects-convex.h.

◆ region_write_p

#define region_write_p (   reg)    (action_tag(effect_action(reg))==is_action_write)

Definition at line 83 of file effects-convex.h.

◆ SEQUENTIAL_IN_REGION_SUFFIX

#define SEQUENTIAL_IN_REGION_SUFFIX   ".inreg"

Definition at line 116 of file effects-convex.h.

◆ SEQUENTIAL_OUT_REGION_SUFFIX

#define SEQUENTIAL_OUT_REGION_SUFFIX   ".outreg"

Definition at line 118 of file effects-convex.h.

◆ SEQUENTIAL_PROPER_REGION_SUFFIX

#define SEQUENTIAL_PROPER_REGION_SUFFIX   ".preg"

Definition at line 114 of file effects-convex.h.

◆ SEQUENTIAL_REGION_SUFFIX

#define SEQUENTIAL_REGION_SUFFIX   ".reg"

Definition at line 113 of file effects-convex.h.

◆ USER_IN_REGION_SUFFIX

#define USER_IN_REGION_SUFFIX   ".uinreg"

Definition at line 117 of file effects-convex.h.

◆ USER_OUT_REGION_SUFFIX

#define USER_OUT_REGION_SUFFIX   ".uoutreg"

Definition at line 119 of file effects-convex.h.

◆ USER_REGION_SUFFIX

#define USER_REGION_SUFFIX   ".ureg"

Definition at line 115 of file effects-convex.h.

Function Documentation

◆ adapt_convex_effect_cell_to_backward_translation()

bool adapt_convex_effect_cell_to_backward_translation ( effect  )

points_to.c

◆ adapt_phi_n_variable_in_convex_effect()

void adapt_phi_n_variable_in_convex_effect ( effect  ,
expression  ,
entity   
)

◆ adapt_translation_as_convex_effect()

effect adapt_translation_as_convex_effect ( effect  ,
effect   
)

◆ all_regions_sc_append()

list all_regions_sc_append ( list  ,
Psysteme  ,
bool   
)

Referenced by loop_basic_workchunk_to_workchunk().

+ Here is the caller graph for this function:

◆ all_regions_variable_rename()

void all_regions_variable_rename ( list  ,
entity  ,
entity   
)

◆ append_declaration_sc_if_exact_without_constraints()

void append_declaration_sc_if_exact_without_constraints ( effect  )

Referenced by top_down_abc_array().

+ Here is the caller graph for this function:

◆ array_bounds_p()

bool array_bounds_p ( void  )

◆ array_regions_sc_append()

list array_regions_sc_append ( list  ,
Psysteme  ,
bool   
)

◆ array_regions_sc_append_and_normalize()

list array_regions_sc_append_and_normalize ( list  ,
Psysteme  ,
int   
)

◆ array_regions_variable_rename()

void array_regions_variable_rename ( list  ,
entity  ,
entity   
)

◆ base_nb_phi()

int base_nb_phi ( Pbase  )

Referenced by region_sc_minimal().

+ Here is the caller graph for this function:

◆ base_nb_psi()

int base_nb_psi ( Pbase  )

◆ base_nb_rho()

int base_nb_rho ( Pbase  )

◆ beta_entities_list()

list beta_entities_list ( int  ,
int   
)

Referenced by region_remove_beta_variables().

+ Here is the caller graph for this function:

◆ c_convex_effects_on_actual_parameter_forward_translation()

list c_convex_effects_on_actual_parameter_forward_translation ( entity  callee,
expression  real_exp,
entity  formal_ent,
list  l_reg,
transformer  context 
)

it's an intrinsic : FI, cannot it be a constant?

first we compute a SIMPLE effect on the argument of the address_of operator. This is to distinguish between the general case and the case where the operand of the & operator is an array element. Simple effect indices are easier to retrieve.

there should be a FOREACH here to scan the whole list

there are indices but we don't know if they represent array dimensions, struct/union/enum fields, or pointer dimensions.

we build the constraint PHI_nb_phi_real >= last index of eff_real

well, not strictly necessary : forward propagation is only for OUT regions

now we compute a convex effect on the argument of the address_of operator and modify it's last dimension according to the fact that there is an addressing operator

here should be a FOREACH to handle all elements

array element operand : we replace the constraint on the last phi variable with

First we have to test if the eff_real access path leads to the eff_orig access path

to do that, if the entities are the same (well in fact we should also take care of aliasing), we add the constraints of eff_real to those of eff_orig, and the system must be feasible. We should also take care of linearization here.

I guess we could reuse convex_cell_reference_with_address_of_cell_reference_translation

At least part of the original effect corresponds to the actual argument : we need to translate it

first we translate the predicate in the callee's name space

Then we remove the phi variables common to the two regions except the last one if we are not in the general case

This is only valid when there is no linearization ; in the general case a translation system should be built

if not in the general case, we add the constraint phi_nb_phi_real == psi_nb_phi_real - exp_nb_phi_real

Finally, we must rename remaining phi variables from 2 add a PHI1==0 constraint in the general case, or, in the contrary, rename remaining phi variables from 1. We must also change the resulting region entity for the formal entity in all cases.

add PHI1 == 0

else of the if (sc_empty_p)

if(effect_entity(eff_orig) == effect_entity(eff_real) ...)

FOREACH

first we compute an effect on the real_arg

here should be a foreach to scan all the elements

First we have to test if the eff_real access path leads to the eff_orig access path

to do that, if the entities are the same (well in fact we should also take care of aliasing), we add the constraints of eff_real to those of eff_orig, and the system must be feasible.

At least part of the original effect corresponds to the actual argument : we need to translate it

first we perform the path translation

then we translate the predicate in the callee's name space

else of the if (sc_empty_p)

if(effect_entity(eff_orig) == effect_entity(eff_real) ...)

FOREACH

switch

Parameters
calleeallee
real_expeal_exp
formal_entormal_ent
l_reg_reg
contextontext

Definition at line 1163 of file interprocedural.c.

1165 {
1166  syntax real_s = expression_syntax(real_exp);
1167  list l_formal = NIL;
1168 
1169  pips_debug_effects(6,"initial regions :\n", l_reg);
1170 
1171 
1172  switch (syntax_tag(real_s))
1173  {
1174  case is_syntax_call:
1175  {
1176  call real_call = syntax_call(real_s);
1177  entity real_op = call_function(real_call);
1178  list args = call_arguments(real_call);
1179  type uet = ultimate_type(entity_type(real_op));
1180  value real_op_v = entity_initial(real_op);
1181 
1182  pips_debug(5, "call case, function %s \n", module_local_name(real_op));
1183  if(type_functional_p(uet))
1184  {
1185  if (value_code_p(real_op_v))
1186  {
1187  pips_debug(5, "external function\n");
1188  pips_user_warning("Nested function calls are ignored. Consider splitting the code before running PIPS\n");
1189  l_formal = NIL;
1190  break;
1191  }
1192  else /* it's an intrinsic : FI, cannot it be a constant? */
1193  {
1194  pips_debug(5, "intrinsic function\n");
1195 
1196  if (ENTITY_ASSIGN_P(real_op))
1197  {
1198  pips_debug(5, "assignment case\n");
1200  (callee, EXPRESSION(CAR(CDR(args))), formal_ent, l_reg, context);
1201  break;
1202  }
1203  else if(ENTITY_ADDRESS_OF_P(real_op))
1204  {
1205  expression arg1 = EXPRESSION(CAR(args));
1206  list l_real_arg = NIL;
1207  effect eff_real;
1208  int nb_phi_real;
1209  Psysteme sc_nb_phi_real;
1210  expression exp_nb_phi_real = expression_undefined;
1211  bool general_case = true;
1212  bool in_out = in_out_methods_p();
1213 
1214  pips_debug(5, "address of case\n");
1215 
1216  /* first we compute a SIMPLE effect on the argument of the address_of operator.
1217  * This is to distinguish between the general case and the case where
1218  * the operand of the & operator is an array element.
1219  * Simple effect indices are easier to retrieve.
1220  */
1222  list l_eff_real = NIL;
1224  (arg1, &l_eff_real, true);
1225 
1226  eff_real = EFFECT(CAR(l_eff_real)); /* there should be a FOREACH here to scan the whole list */
1227  gen_free_list(l_eff_real);
1228 
1229  nb_phi_real = (int) gen_length(reference_indices(effect_any_reference(eff_real)));
1230  gen_full_free_list(l_real_arg);
1231 
1232  /* there are indices but we don't know if they represent array dimensions,
1233  * struct/union/enum fields, or pointer dimensions.
1234  */
1235  if(nb_phi_real > 0)
1236  {
1237  reference eff_real_ref = effect_any_reference(eff_real);
1238  list l_inds_real = NIL, l_tmp = NIL;
1239  reference ref_tmp;
1240  type t = type_undefined;
1241 
1242  for(l_inds_real = reference_indices(eff_real_ref); !ENDP(CDR(l_inds_real)); POP(l_inds_real))
1243  {
1244  l_tmp = gen_nconc(l_tmp, CONS(EXPRESSION, copy_expression(EXPRESSION(CAR(l_inds_real))), NIL));
1245  }
1246 
1247  ref_tmp = make_reference(reference_variable(eff_real_ref), l_tmp);
1248  t = simple_effect_reference_type(ref_tmp);
1249  free_reference(ref_tmp);
1250 
1251  if (type_undefined_p(t))
1252  pips_internal_error("undefined type not expected ");
1253 
1255  {
1256  pips_debug(5,"array element or sub-array case\n");
1257  general_case = false;
1258  /* we build the constraint PHI_nb_phi_real >= last index of eff_real */
1259  exp_nb_phi_real = copy_expression(EXPRESSION(CAR(l_inds_real))); // copy necessary because eff_real is freed afterwards
1260  sc_nb_phi_real = sc_new();
1261  (void) sc_add_phi_equation(&sc_nb_phi_real,
1262  copy_expression(exp_nb_phi_real),
1263  nb_phi_real, NOT_EG, NOT_PHI_FIRST);
1264  }
1265  else
1266  pips_debug(5, "general case\n");
1267  }
1268 
1269  free_effect(eff_real);
1270  eff_real = effect_undefined;
1271  /* well, not strictly necessary : forward propagation is only for OUT regions */
1272  if (in_out)
1274  else
1277 
1278  /* now we compute a *convex* effect on the argument of the
1279  * address_of operator and modify it's last dimension
1280  * according to the fact that there is an addressing operator
1281  */
1282 
1283  l_eff_real = NIL;
1285  (arg1, &l_eff_real, true);
1286  eff_real = EFFECT(CAR(l_eff_real)); /*There should be a FOREACH to handle all elements */
1287  gen_free_list(l_eff_real);
1288 
1289  gen_full_free_list(l_real_arg);
1290 
1291  if (!general_case)
1292  {
1293  /* array element operand : we replace the constraint on the last
1294  * phi variable with */
1295  entity phi_nb_phi_real = make_phi_entity(nb_phi_real);
1296  region_exact_projection_along_variable(eff_real, phi_nb_phi_real);
1297  region_sc_append_and_normalize(eff_real, sc_nb_phi_real, 1);
1298  (void) sc_free(sc_nb_phi_real);
1299  }
1300 
1301  FOREACH(EFFECT, eff_orig, l_reg)
1302  {
1303  int nb_phi_orig = (int) gen_length(reference_indices(effect_any_reference(eff_orig)));
1304 
1305  /* First we have to test if the eff_real access path leads to the eff_orig access path */
1306 
1307  /* to do that, if the entities are the same (well in fact we should also
1308  * take care of aliasing), we add the constraints of eff_real to those of eff_orig,
1309  * and the system must be feasible.
1310  * We should also take care of linearization here.
1311  */
1312  bool exact_p;
1313  if(path_preceding_p(eff_real, eff_orig, transformer_undefined, false, &exact_p))
1314  {
1315  // functions that can be pointed by effect_dup_func:
1316  // simple_effect_dup
1317  // region_dup
1318  // copy_effect
1319  effect eff_formal = (*effect_dup_func)(eff_orig);
1320  region_sc_append_and_normalize(eff_formal, region_system(eff_real), 1);
1321 
1322  if (sc_empty_p(region_system(eff_formal)))
1323  {
1324  pips_debug(5, "the original effect does not correspond to the actual argument \n");
1325  free_effect(eff_formal);
1326  }
1327  else
1328  {
1329  /* I guess we could reuse convex_cell_reference_with_address_of_cell_reference_translation */
1330  /* At least part of the original effect corresponds to the actual argument :
1331  * we need to translate it
1332  */
1333  Psysteme sc_formal;
1334  reference ref_formal = effect_any_reference(eff_formal);
1335  reference new_ref;
1336  list new_inds = NIL;
1337  int i, min_phi, min_i;
1338 
1339  pips_debug_effect(5, "matching access paths, considered effect is : \n", eff_formal);
1340 
1341  /* first we translate the predicate in the callee's name space */
1343  pips_debug_effect(5, "eff_formal after context translation: \n", eff_formal);
1344 
1345  /* Then we remove the phi variables common to the two regions
1346  * except the last one if we are not in the general case */
1347  /* This is only valid when there is no linearization ; in the general case
1348  * a translation system should be built
1349  */
1350  sc_formal = region_system(eff_formal);
1351  for(i = 1; i <= nb_phi_real; i++)
1352  {
1353  entity phi_i = make_phi_entity(i);
1354  entity psi_i = make_psi_entity(i);
1355 
1356  sc_formal = sc_variable_rename(sc_formal, (Variable) phi_i, (Variable) psi_i);
1357  }
1358  /* if not in the general case, we add the constraint
1359  * phi_nb_phi_real == psi_nb_phi_real - exp_nb_phi_real
1360  */
1361  if (!general_case)
1362  {
1363  entity phi = make_phi_entity(nb_phi_real);
1364  Pvecteur v_phi = vect_new((Variable) phi, VALUE_ONE);
1365  entity psi = make_psi_entity(nb_phi_real);
1366  Pvecteur v_psi = vect_new((Variable) psi, VALUE_ONE);
1367  Pvecteur v = vect_substract(v_phi, v_psi);
1368  normalized nexp = NORMALIZE_EXPRESSION(exp_nb_phi_real);
1369  if (normalized_linear_p(nexp))
1370  {
1371  pips_debug(6, "normalized last index : "
1372  "adding phi_nb_phi_real == psi_nb_phi_real - exp_nb_phi_real \n");
1373  Pvecteur v1 = vect_copy(normalized_linear(nexp));
1374  Pvecteur v2;
1375  v2 = vect_add(v, v1);
1376  sc_formal = sc_constraint_add(sc_formal, contrainte_make(v2), true);
1377  vect_rm(v1);
1378  }
1379  vect_rm(v_psi);
1380  vect_rm(v);
1381  }
1382  region_system(eff_formal) = sc_formal;
1383  pips_debug_effect(5, "eff_formal before removing psi variables: \n", eff_formal);
1384  region_remove_psi_variables(eff_formal);
1385  pips_debug_effect(5, "eff_formal after renaming common dimensions: \n", eff_formal);
1386 
1387  /* Finally, we must rename remaining phi variables from 2
1388  * add a PHI1==0 constraint in the general case,
1389  * or, in the contrary, rename remaining phi variables from 1.
1390  * We must also change the resulting region
1391  * entity for the formal entity in all cases.
1392  */
1393  min_phi = general_case? 2:1;
1394  min_i = general_case ? nb_phi_real+1 : nb_phi_real;
1395  sc_formal = region_system(eff_formal);
1396 
1397  pips_debug(8, "nb_phi_real: %d, min_i: %d, min_phi: %d\n", nb_phi_real, min_i, min_phi);
1398  for(i = min_i; i <= nb_phi_orig; i++)
1399  {
1400  pips_debug(8, "renaming %d-th index into %d-th\n", i, i-min_i+min_phi);
1401  entity phi_i = make_phi_entity(i);
1402  entity psi_formal = make_psi_entity(i-min_i+min_phi);
1403 
1404  // the call to gen_nth is rather costly
1405  expression original_index_exp =
1406  EXPRESSION( gen_nth(i-1, cell_indices(effect_cell(eff_orig))));
1407 
1408  pips_assert("index expression of an effect must be a reference",
1409  expression_reference_p(original_index_exp));
1410  if (entity_field_p(reference_variable(expression_reference(original_index_exp))))
1411  {
1412  pips_debug(8, "field expression (%s)\n",
1413  entity_name(reference_variable(expression_reference(original_index_exp))));
1414  new_inds = gen_nconc(new_inds,
1415  CONS(EXPRESSION,
1416  copy_expression(original_index_exp),
1417  NIL));
1418  }
1419  else
1420  {
1421  pips_debug(8, "phi expression \n");
1422  sc_formal = sc_variable_rename(sc_formal, (Variable) phi_i, (Variable) psi_formal);
1423 
1424  new_inds = gen_nconc(new_inds,
1425  CONS(EXPRESSION,
1426  make_phi_expression(i-nb_phi_real+1),
1427  NIL));
1428  }
1429 
1430  }
1431  for(i=min_phi; i<= nb_phi_orig-min_i+min_phi; i++)
1432  {
1433  entity phi_i = make_phi_entity(i);
1434  entity psi_i = make_psi_entity(i);
1435  sc_formal = sc_variable_rename(sc_formal, (Variable) psi_i, (Variable) phi_i);
1436  }
1437  region_system(eff_formal) = sc_formal;
1438  pips_debug_effect(5, "eff_formal after shifting dimensions: \n", eff_formal);
1439 
1440  if(general_case)
1441  {
1442  /* add PHI1 == 0 */
1443  sc_formal = region_system(eff_formal);
1444  (void) sc_add_phi_equation(&sc_formal, int_to_expression(0), 1, IS_EG, PHI_FIRST);
1445  region_system(eff_formal) = sc_formal;
1446  new_inds = CONS(EXPRESSION, make_phi_expression(1), new_inds);
1447  }
1448 
1449  free_reference(ref_formal);
1450  new_ref = make_reference(formal_ent, new_inds);
1451  cell_reference(effect_cell(eff_formal)) = new_ref;
1452  pips_debug_effect(5, "final eff_formal : \n", eff_formal);
1453  l_formal = RegionsMustUnion(l_formal, CONS(EFFECT, eff_formal, NIL),
1455  pips_debug_effects(6,"l_formal after adding new effect : \n", l_formal);
1456 
1457  } /* else of the if (sc_empty_p) */
1458 
1459  } /* if(effect_entity(eff_orig) == effect_entity(eff_real) ...)*/
1460 
1461  } /* FOREACH */
1462 
1463  if (!expression_undefined_p(exp_nb_phi_real))
1464  free_expression(exp_nb_phi_real);
1465  break;
1466  }
1467  else
1468  {
1469  pips_debug(5, "Other intrinsic case : entering general case \n");
1470  }
1471  }
1472  }
1473  else if(type_variable_p(uet))
1474  {
1475  pips_user_warning("Effects of call thru functional pointers are ignored\n");
1476  l_formal = NIL;
1477  break;
1478  }
1479  }
1480  // entering general case which includes general calls
1481  _FALLTHROUGH_;
1482  case is_syntax_reference:
1483  case is_syntax_subscript:
1484  {
1485  effect eff_real = effect_undefined;
1486 
1487  pips_debug(5, "general case\n");
1488 
1489  /* first we compute an effect on the real_arg */
1490  if (syntax_reference_p(real_s))
1492  else
1493  {
1494  list l_eff_real = NIL;
1496  (real_exp, &l_eff_real, true);
1497  gen_full_free_list(l_real_arg);
1498  if (!ENDP(l_eff_real))
1499  eff_real = EFFECT(CAR(l_eff_real)); /*there should be a foreach to scan all the elements */
1500  gen_free_list(l_eff_real);
1501  }
1502 
1503  if (!effect_undefined_p(eff_real))
1504  {
1505  FOREACH(EFFECT, eff_orig, l_reg)
1506  {
1507  int nb_phi_orig = (int) gen_length(reference_indices(effect_any_reference(eff_orig)));
1508  int nb_phi_real = (int) gen_length(reference_indices(effect_any_reference(eff_real)));
1509  /* First we have to test if the eff_real access path leads to the eff_orig access path */
1510 
1511  /* to do that, if the entities are the same (well in fact we should also
1512  take care of aliasing), we add the constraints of eff_real to those of eff_orig,
1513  and the system must be feasible.
1514  */
1515 
1516  bool exact_p;
1517  if(path_preceding_p(eff_real, eff_orig, transformer_undefined, true, &exact_p)
1518  && nb_phi_orig >= nb_phi_real)
1519  {
1520  effect eff_orig_dup = (*effect_dup_func)(eff_orig);
1521  region_sc_append_and_normalize(eff_orig_dup, region_system(eff_real), 1);
1522 
1523  if (sc_empty_p(region_system(eff_orig_dup)))
1524  {
1525  pips_debug(5, "the original effect does not correspond to the actual argument \n");
1526  free_effect(eff_orig_dup);
1527  }
1528  else
1529  {
1530  /* At least part of the original effect corresponds to the actual argument :
1531  we need to translate it
1532  */
1533  reference ref_formal = make_reference(formal_ent, NIL);
1534  effect eff_formal = make_reference_region(ref_formal, copy_action(effect_action(eff_orig)));
1535 
1536  pips_debug_effect(5, "matching access paths, considered effect is : \n", eff_orig_dup);
1537 
1538  /* first we perform the path translation */
1539  reference n_eff_ref;
1540  descriptor n_eff_d;
1541  effect n_eff;
1542  bool exact_translation_p;
1544  effect_descriptor(eff_orig_dup),
1545  ref_formal,
1546  effect_descriptor(eff_formal),
1547  nb_phi_real,
1548  &n_eff_ref, &n_eff_d,
1549  &exact_translation_p);
1550  n_eff = make_effect(make_cell_reference(n_eff_ref), copy_action(effect_action(eff_orig)),
1551  exact_translation_p? copy_approximation(effect_approximation(eff_orig)) : make_approximation_may(),
1552  n_eff_d);
1553  pips_debug_effect(5, "final eff_formal : \n", n_eff);
1554 
1555  /* then we translate the predicate in the callee's name space */
1557  pips_debug_effect(5, "eff_formal after context translation: \n", n_eff);
1558 
1559  l_formal = RegionsMustUnion(l_formal, CONS(EFFECT, n_eff, NIL),effects_same_action_p);
1560  pips_debug_effects(6, "l_formal after adding new effect : \n", l_formal);
1561  } /* else of the if (sc_empty_p) */
1562 
1563  } /* if(effect_entity(eff_orig) == effect_entity(eff_real) ...)*/
1564 
1565 
1566 
1567  /* */
1568 
1569  } /* FOREACH */
1570  }
1571 
1572  break;
1573  }
1574  case is_syntax_application:
1575  {
1576  pips_internal_error("Application not supported yet");
1577  break;
1578  }
1579 
1580  case is_syntax_cast:
1581  {
1582  pips_debug(6, "cast expression\n");
1583  type formal_ent_type = entity_basic_concrete_type(formal_ent);
1584  expression cast_exp = cast_expression(syntax_cast(real_s));
1585  type cast_exp_type = expression_to_type(cast_exp);
1587  {
1588  l_formal =
1590  (callee, cast_exp,
1591  formal_ent, l_reg, context);
1592  }
1593  else
1594  {
1595  expression formal_exp = entity_to_expression(formal_ent);
1596  l_formal = c_actual_argument_to_may_summary_effects(formal_exp, 'w');
1597  free_expression(formal_exp);
1598  }
1599  free_type(cast_exp_type);
1600  break;
1601  }
1602  case is_syntax_range:
1603  {
1604  pips_user_error("Illegal effective parameter: range\n");
1605  break;
1606  }
1607 
1609  {
1610  pips_debug(6, "sizeofexpression : -> NIL");
1611  l_formal = NIL;
1612  break;
1613  }
1614  case is_syntax_va_arg:
1615  {
1616  pips_internal_error("va_arg not supported yet");
1617  break;
1618  }
1619  default:
1620  pips_internal_error("Illegal kind of syntax");
1621 
1622  } /* switch */
1623 
1624 
1625  pips_debug_effects(6,"resulting regions :\n", l_formal);
1626  return(l_formal);
1627 
1628 }
cell make_cell_reference(reference _field_)
Definition: effects.c:293
action copy_action(action p)
ACTION.
Definition: effects.c:77
void free_effect(effect p)
Definition: effects.c:451
approximation copy_approximation(approximation p)
APPROXIMATION.
Definition: effects.c:132
approximation make_approximation_may(void)
Definition: effects.c:179
void free_reference(reference p)
Definition: ri.c:2050
expression copy_expression(expression p)
EXPRESSION.
Definition: ri.c:850
reference make_reference(entity a1, list a2)
Definition: ri.c:2083
void free_expression(expression p)
Definition: ri.c:853
void free_type(type p)
Definition: ri.c:2658
static entity callee
Definition: alias_pairs.c:62
void const char const char const int
#define VALUE_ONE
Pcontrainte contrainte_make(Pvecteur pv)
Pcontrainte contrainte_make(Pvecteur pv): allocation et initialisation d'une contrainte avec un vecte...
Definition: alloc.c:73
#define region_system(reg)
list RegionsMustUnion(list l1, list l2, bool(*union_combinable_p)(effect, effect))
list RegionsMustUnion(list l1, list l2, union_combinable_p) input : two lists of regions output : a l...
#define NOT_EG
#define NOT_PHI_FIRST
#define PHI_FIRST
list c_convex_effects_on_actual_parameter_forward_translation(entity callee, expression real_exp, entity formal_ent, list l_reg, transformer context)
#define IS_EG
package regions : Alexis Platonoff, 22 Aout 1990, Be'atrice Creusillet 10/94
void convex_region_descriptor_translation(effect)
entity make_phi_entity(int)
effect make_reference_region(reference, action)
void region_sc_append_and_normalize(effect, Psysteme, int)
void convex_cell_reference_with_value_of_cell_reference_translation(reference, descriptor, reference, descriptor, int, reference *, descriptor *, bool *)
bool sc_add_phi_equation(Psysteme *, expression, int, bool, bool)
expression make_phi_expression(int)
void region_exact_projection_along_variable(effect, entity)
void set_methods_for_convex_in_out_effects(void)
Definition: methods.c:469
void init_convex_inout_prettyprint(const char *)
void region_remove_psi_variables(effect)
bool in_out_methods_p(void)
Definition: methods.c:476
void set_methods_for_convex_rw_effects(void)
Definition: methods.c:358
entity make_psi_entity(int)
#define pips_debug_effects(level, message, l_eff)
#define pips_debug_effect(level, message, eff)
for debug
list generic_proper_effects_of_complex_address_expression(expression, list *, int)
type simple_effect_reference_type(reference)
list c_actual_argument_to_may_summary_effects(expression, tag)
bool effects_same_action_p(effect, effect)
bool path_preceding_p(effect, effect, transformer, bool, bool *)
Definition: eval.c:132
void set_methods_for_proper_simple_effects(void)
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
list cell_indices(cell)
Definition: effects.c:64
bool basic_concrete_types_compatible_for_effects_interprocedural_translation_p(type, type)
tests if the actual argument type and the formal argument type are compatible with the current state ...
Definition: type.c:699
action make_action_write_memory(void)
To ease the extension of action with action_kind.
Definition: effects.c:1011
#define cell_reference(x)
Definition: effects.h:469
#define effect_undefined_p(x)
Definition: effects.h:615
#define effect_action(x)
Definition: effects.h:642
#define effect_undefined
Definition: effects.h:614
#define effect_descriptor(x)
Definition: effects.h:646
#define effect_approximation(x)
Definition: effects.h:644
#define EFFECT(x)
EFFECT.
Definition: effects.h:608
#define effect_cell(x)
Definition: effects.h:640
void gen_full_free_list(list l)
Definition: genClib.c:1023
entity get_current_module_entity(void)
Get the entity of the current module.
Definition: static.c:85
#define ENDP(l)
Test if a list is empty.
Definition: newgen_list.h:66
#define POP(l)
Modify a list pointer to point on the next element of the list.
Definition: newgen_list.h:59
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
size_t gen_length(const list l)
Definition: list.c:150
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
Definition: newgen_list.h:150
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
Definition: list.c:344
#define CAR(pcons)
Get the value of the first element of a list.
Definition: newgen_list.h:92
void gen_free_list(list l)
free the spine of the list
Definition: list.c:327
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
Definition: newgen_list.h:179
#define CDR(pcons)
Get the list less its first element.
Definition: newgen_list.h:111
gen_chunk gen_nth(int n, const list l)
to be used as ENTITY(gen_nth(3, l))...
Definition: list.c:710
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
Definition: misc-local.h:145
#define pips_user_warning
Definition: misc-local.h:146
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
Definition: misc-local.h:172
#define pips_internal_error
Definition: misc-local.h:149
#define _FALLTHROUGH_
Definition: misc-local.h:238
#define pips_user_error
Definition: misc-local.h:147
#define ENTITY_ASSIGN_P(e)
#define NORMALIZE_EXPRESSION(e)
#define ENTITY_ADDRESS_OF_P(e)
bool entity_field_p(entity e)
e is the field of a structure
Definition: entity.c:857
const char * module_local_name(entity e)
Returns the module local user name.
Definition: entity.c:582
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
Definition: expression.c:165
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
Definition: expression.c:1188
bool expression_reference_p(expression e)
Test if an expression is a reference.
Definition: expression.c:528
reference expression_reference(expression e)
Short cut, meaningful only if expression_reference_p(e) holds.
Definition: expression.c:1832
type ultimate_type(type)
Definition: type.c:3466
type expression_to_type(expression)
For an array declared as int a[10][20], the type returned for a[i] is int [20].
Definition: type.c:2486
type entity_basic_concrete_type(entity)
retrieves or computes and then returns the basic concrete type of an entity
Definition: type.c:3677
#define type_functional_p(x)
Definition: ri.h:2950
#define value_code_p(x)
Definition: ri.h:3065
#define syntax_reference_p(x)
Definition: ri.h:2728
#define transformer_undefined
Definition: ri.h:2847
#define syntax_reference(x)
Definition: ri.h:2730
#define syntax_tag(x)
Definition: ri.h:2727
#define normalized_linear_p(x)
Definition: ri.h:1779
#define call_function(x)
Definition: ri.h:709
#define reference_variable(x)
Definition: ri.h:2326
#define syntax_cast(x)
Definition: ri.h:2739
#define type_variable(x)
Definition: ri.h:2949
@ is_syntax_range
Definition: ri.h:2692
@ is_syntax_application
Definition: ri.h:2697
@ is_syntax_cast
Definition: ri.h:2694
@ is_syntax_call
Definition: ri.h:2693
@ is_syntax_va_arg
Definition: ri.h:2698
@ is_syntax_reference
Definition: ri.h:2691
@ is_syntax_sizeofexpression
Definition: ri.h:2695
@ is_syntax_subscript
Definition: ri.h:2696
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217
#define cast_expression(x)
Definition: ri.h:747
#define type_undefined_p(x)
Definition: ri.h:2884
#define expression_undefined
Definition: ri.h:1223
#define entity_name(x)
Definition: ri.h:2790
#define reference_indices(x)
Definition: ri.h:2328
#define syntax_call(x)
Definition: ri.h:2736
#define expression_undefined_p(x)
Definition: ri.h:1224
#define variable_dimensions(x)
Definition: ri.h:3122
#define type_undefined
Definition: ri.h:2883
#define call_arguments(x)
Definition: ri.h:711
#define entity_type(x)
Definition: ri.h:2792
#define normalized_linear(x)
Definition: ri.h:1781
#define expression_syntax(x)
Definition: ri.h:1247
#define type_variable_p(x)
Definition: ri.h:2947
#define entity_initial(x)
Definition: ri.h:2796
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...
Definition: sc.c:157
Psysteme sc_new(void)
Psysteme sc_new(): alloue un systeme vide, initialise tous les champs avec des valeurs nulles,...
Definition: sc_alloc.c:55
bool sc_empty_p(Psysteme sc)
bool sc_empty_p(Psysteme sc): check if the set associated to sc is the constant sc_empty or not.
Definition: sc_alloc.c:350
Psysteme sc_constraint_add(Psysteme sc, Pcontrainte c, bool equality)
Definition: sc_insert_eq.c:115
Psysteme sc_free(Psysteme in_ps)
Psysteme sc_free( in_ps ) AL 30/05/94 Free of in_ps.
Definition: sc_list.c:112
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
Definition: vecteur-local.h:89
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
Definition: delay.c:253
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
Definition: vecteur-local.h:60
Pbase vect_copy(Pvecteur b)
direct duplication.
Definition: alloc.c:240
Pvecteur vect_new(Variable var, Value coeff)
Pvecteur vect_new(Variable var,Value coeff): allocation d'un vecteur colineaire au vecteur de base va...
Definition: alloc.c:110
void vect_rm(Pvecteur v)
void vect_rm(Pvecteur v): desallocation des couples de v;
Definition: alloc.c:78
Pvecteur vect_add(Pvecteur v1, Pvecteur v2)
package vecteur - operations binaires
Definition: binaires.c:53
Pvecteur vect_substract(Pvecteur v1, Pvecteur v2)
Pvecteur vect_substract(Pvecteur v1, Pvecteur v2): allocation d'un vecteur v dont la valeur est la di...
Definition: binaires.c:75

References _FALLTHROUGH_, basic_concrete_types_compatible_for_effects_interprocedural_translation_p(), c_actual_argument_to_may_summary_effects(), c_convex_effects_on_actual_parameter_forward_translation(), call_arguments, call_function, callee, CAR, cast_expression, CDR, cell_indices(), cell_reference, CONS, contrainte_make(), convex_cell_reference_with_value_of_cell_reference_translation(), convex_region_descriptor_translation(), copy_action(), copy_approximation(), copy_expression(), EFFECT, effect_action, effect_any_reference, effect_approximation, effect_cell, effect_descriptor, effect_undefined, effect_undefined_p, effects_same_action_p(), ENDP, ENTITY_ADDRESS_OF_P, ENTITY_ASSIGN_P, entity_basic_concrete_type(), entity_field_p(), entity_initial, entity_name, entity_to_expression(), entity_type, EXPRESSION, expression_reference(), expression_reference_p(), expression_syntax, expression_to_type(), expression_undefined, expression_undefined_p, FOREACH, free_effect(), free_expression(), free_reference(), free_type(), gen_free_list(), gen_full_free_list(), gen_length(), gen_nconc(), gen_nth(), generic_proper_effects_of_complex_address_expression(), get_current_module_entity(), in_out_methods_p(), init_convex_inout_prettyprint(), int, int_to_expression(), IS_EG, is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, make_action_write_memory(), make_approximation_may(), make_cell_reference(), make_effect(), make_phi_entity(), make_phi_expression(), make_psi_entity(), make_reference(), make_reference_region(), module_local_name(), NIL, NORMALIZE_EXPRESSION, normalized_linear, normalized_linear_p, NOT_EG, NOT_PHI_FIRST, path_preceding_p(), PHI_FIRST, pips_assert, pips_debug, pips_debug_effect, pips_debug_effects, pips_internal_error, pips_user_error, pips_user_warning, POP, reference_indices, reference_variable, region_exact_projection_along_variable(), region_remove_psi_variables(), region_sc_append_and_normalize(), region_system, RegionsMustUnion(), sc_add_phi_equation(), sc_constraint_add(), sc_empty_p(), sc_free(), sc_new(), sc_variable_rename(), set_methods_for_convex_in_out_effects(), set_methods_for_convex_rw_effects(), set_methods_for_proper_simple_effects(), simple_effect_reference_type(), syntax_call, syntax_cast, syntax_reference, syntax_reference_p, syntax_tag, transformer_undefined, type_functional_p, type_undefined, type_undefined_p, type_variable, type_variable_p, ultimate_type(), value_code_p, VALUE_ONE, variable_dimensions, vect_add(), vect_copy(), vect_new(), vect_rm(), and vect_substract().

Referenced by c_convex_effects_on_actual_parameter_forward_translation(), set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the caller graph for this function:

◆ c_convex_effects_on_formal_parameter_backward_translation()

list c_convex_effects_on_formal_parameter_backward_translation ( list  l_sum_eff,
expression  real_arg,
transformer  context 
)
Parameters
l_sum_effis a list of effects on a C function formal parameter. These effects must be visible from the caller, which means that their reference has at leat one index.
real_argis an expression. It's the real argument corresponding to the formal parameter which memory effects are represented by l_sum_eff.
contextis the transformer translating the callee's neame space into the caller's name space.
Returns
a list of effects which are the translation of l_sum_eff in the caller's name space.

the result

if it's a pointer or a partially indexed array We should do more testing here to check if types are compatible...

the test here may not be right. I guess I should use basic_concrete_type here BC

Then we compute the region corresponding to the real argument

this could easily be made generic BC.

FI: I add the restriction on store regions, but they should have been eliminated before translation is attempted

we translate the initial region descriptor into the caller's name space

and then perform the translation

shouldn't it be a union ? BC

if (pointer_type_p(real_arg_t))

else

case is_syntax_reference

first we compute an effect on the argument of the address_of operator (to treat cases like &(n->m))

we translate the initial region descriptor into the caller's name space

if(!ENDP(eff_ind))

else du if (effect_undefined_p(eff_real) || ...)

FOREACH(EFFECT, eff, l_sum_eff)

FOREACH (EFFECT, eff_real, l_eff_real)

if it's a pointer or a partially indexed array We should do more testing here to check if types are compatible...

first compute the region corresponding to the real argument

this could easily be made generic BC.

FI: I add the restriction on store regions, but they should have been eliminated before translation is attempted

we translate the initial region descriptor into the caller's name space

and then perform the translation

shouldn't it be a union ? BC

if (pointer_type_p(real_arg_t))

else

first we compute an effect on the real_arg

first we translate the formal region predicate

Then we append the formal region to the real region

Well this is valid only in the general case : we should verify that types are compatible.

else du if (effect_undefined_p(eff_real))

shouldn't it be a union ? BC

FOREACH(EFFECT, eff, l_sum_eff)

BC : do not generate effects on HEAP

n_eff = heap_effect(get_current_module_entity(), copy_action(effect_action(eff)));

case is_syntax_call

we should test here the compatibility of the casted expression type with the formal entity type. It is not available here, however, I think it's equivalent to test the compatibility with the real arg expression type since the current function is called after testing the compatilibty between the real expression type and the formal parameter type.

let us at least generate effects on all memory locations reachable from the cast expression

switch

free_type(real_arg_t);

Parameters
l_sum_eff_sum_eff
real_argeal_arg
contextontext

Definition at line 523 of file interprocedural.c.

526 {
527  list l_eff = NIL; /* the result */
528  syntax real_s = expression_syntax(real_arg);
529  type real_arg_t = expression_to_type(real_arg);
530 
531 
532  ifdebug(5)
533  {
534  pips_debug(8, "begin for real arg %s, of type %s and effects :\n",
535  expression_to_string(real_arg),
536  type_to_string(real_arg_t));
537  (*effects_prettyprint_func)(l_sum_eff);
538  }
539 
540  switch (syntax_tag(real_s))
541  {
542  case is_syntax_reference:
543  {
544  reference real_ref = syntax_reference(real_s);
545  entity real_ent = reference_variable(real_ref);
546  list real_ind = reference_indices(real_ref);
547 
548  /* if it's a pointer or a partially indexed array
549  * We should do more testing here to check if types
550  * are compatible...
551  */
552 
553  /* the test here may not be right. I guess I should use basic_concrete_type here BC */
554  if (pointer_type_p(real_arg_t) ||
555  gen_length(real_ind) < type_depth(entity_type(real_ent)))
556  {
557  FOREACH(EFFECT, eff, l_sum_eff) {
558  reference new_ref = copy_reference(real_ref);
559  effect real_eff = effect_undefined;
560 
561  pips_debug(8, "pointer type real arg reference\n");
562 
563  /* Then we compute the region corresponding to the
564  * real argument
565  */
566  pips_debug(8, "effect on the pointed area : \n");
567  // functions that can be pointed by reference_to_effect_func:
568  // reference_to_simple_effect
569  // reference_to_convex_region
570  // reference_to_reference_effect
571  real_eff = (*reference_to_effect_func)
572  (new_ref, copy_action(effect_action(eff)), false);
573 
574  /* this could easily be made generic BC. */
575  /* FI: I add the restriction on store regions, but
576  * they should have been eliminated before translation
577  * is attempted */
578  if(!anywhere_effect_p(real_eff) && store_effect_p(real_eff))
579  {
580  reference n_eff_ref;
581  descriptor n_eff_d;
582  effect n_eff;
583  bool exact_translation_p;
584  // functions that can be pointed by effect_dup_func:
585  // simple_effect_dup
586  // region_dup
587  // copy_effect
588  effect init_eff = (*effect_dup_func)(eff);
589 
590  /* we translate the initial region descriptor
591  * into the caller's name space
592  */
594  /* and then perform the translation */
596  effect_descriptor(init_eff),
597  effect_any_reference(real_eff),
598  effect_descriptor(real_eff),
599  0,
600  &n_eff_ref, &n_eff_d,
601  &exact_translation_p);
602  n_eff = make_effect(make_cell_reference(n_eff_ref), copy_action(effect_action(eff)),
603  exact_translation_p? copy_approximation(effect_approximation(eff)) : make_approximation_may(),
604  n_eff_d);
605  /* shouldn't it be a union ? BC */
606  l_eff = gen_nconc(l_eff, CONS(EFFECT, n_eff, NIL));
607  free_effect(init_eff);
608  free_effect(real_eff);
609  }
610  }
611  } /* if (pointer_type_p(real_arg_t)) */
612  else
613  {
614  pips_debug(8, "real arg reference is not a pointer and is not a partially indexed array -> NIL \n");
615 
616  } /* else */
617  break;
618  } /* case is_syntax_reference */
619  case is_syntax_subscript:
620  {
621  pips_debug(8, "Subscript not supported yet -> anywhere");
622  bool read_p = false, write_p = false;
623  FOREACH(EFFECT, eff, l_sum_eff)
624  {
625  if(effect_write_p(eff)) write_p = true;
626  else read_p = true;
627  }
628 
629  if (write_p)
631  if (read_p)
633  break;
634  }
635  case is_syntax_call:
636  {
637  call real_call = syntax_call(real_s);
638  entity real_op = call_function(real_call);
639  list args = call_arguments(real_call);
640  effect n_eff = effect_undefined;
641 
642  if (ENTITY_ASSIGN_P(real_op))
643  {
645  (l_sum_eff, EXPRESSION(CAR(CDR(args))), context);
646  }
647  else if(ENTITY_ADDRESS_OF_P(real_op))
648  {
649  expression arg1 = EXPRESSION(CAR(args));
650  list l_real_arg = NIL;
651  list l_eff_real;
652 
653  /* first we compute an effect on the argument of the
654  * address_of operator (to treat cases like &(n->m))*/
655  pips_debug(6, "addressing operator case \n");
656 
657  l_real_arg =
659  (arg1, &l_eff_real, true);
660 
661  pips_debug_effects(6, "base effects :\n", l_eff_real);
662 
663  FOREACH(EFFECT, eff_real, l_eff_real)
664  {
665  FOREACH(EFFECT, eff, l_sum_eff) {
666  reference eff_ref = effect_any_reference(eff);
667  list eff_ind = reference_indices(eff_ref);
668 
669  pips_debug_effect(6, "current formal effect :\n", eff);
670 
671  if (effect_undefined_p(eff_real) || anywhere_effect_p(eff_real))
672  {
674  }
675  else
676  {
677  if(!ENDP(eff_ind))
678  {
679  // functions that can be pointed by effect_dup_func:
680  // simple_effect_dup
681  // region_dup
682  // copy_effect
683  effect eff_init = (*effect_dup_func)(eff);
684 
685  /* we translate the initial region descriptor
686  * into the caller's name space
687  */
689 
690  reference output_ref;
691  descriptor output_desc;
692  bool exact;
693 
695  (effect_any_reference(eff), effect_descriptor(eff_init),
696  effect_any_reference(eff_real), effect_descriptor(eff_real),
697  0,
698  &output_ref, &output_desc,
699  &exact);
700 
702  {
703  free_reference(output_ref);
705  }
706  else
707  {
708  n_eff = make_effect(make_cell_reference(output_ref),
711  output_desc);
712  pips_debug_effect(6, "resulting effect: \n", n_eff);
713  }
714  } /* if(!ENDP(eff_ind))*/
715  } /* else du if (effect_undefined_p(eff_real) || ...) */
716 
717  l_eff = gen_nconc(l_eff, CONS(EFFECT, n_eff, NIL));
718  } /* FOREACH(EFFECT, eff, l_sum_eff) */
719  } /* FOREACH (EFFECT, eff_real, l_eff_real) */
720 
721  gen_free_list(l_real_arg);
722  gen_full_free_list(l_eff_real);
723 
724  }
725  else if(ENTITY_DEREFERENCING_P(real_op))
726  {
727  // expression arg1 = EXPRESSION(CAR(args));
728 
729  pips_debug(6, "dereferencing operator case \n");
730 
731  /* if it's a pointer or a partially indexed array
732  * We should do more testing here to check if types
733  * are compatible...
734  */
735  if (pointer_type_p(real_arg_t) ||
736  !ENDP(variable_dimensions(type_variable(real_arg_t))))
737  {
738  pips_debug(8, "pointer type real arg\n");
739  /* first compute the region corresponding to the
740  * real argument
741  */
742  list l_real_eff = NIL;
743  list l_real_arg =
745  (real_arg, &l_real_eff, true);
746 
747  pips_debug_effects(6, "base effects :\n", l_real_eff);
748 
749  FOREACH(EFFECT, real_eff, l_real_eff)
750  {
751  FOREACH(EFFECT, eff, l_sum_eff) {
752  /* this could easily be made generic BC. */
753  /* FI: I add the restriction on store regions, but
754  * they should have been eliminated before translation
755  * is attempted */
756  if(!anywhere_effect_p(real_eff) && store_effect_p(real_eff))
757  {
758  reference n_eff_ref;
759  descriptor n_eff_d;
760  effect n_eff;
761  bool exact_translation_p;
762  // functions that can be pointed by effect_dup_func:
763  // simple_effect_dup
764  // region_dup
765  // copy_effect
766  effect init_eff = (*effect_dup_func)(eff);
767 
768  /* we translate the initial region descriptor
769  * into the caller's name space
770  */
772  /* and then perform the translation */
774  effect_descriptor(init_eff),
775  effect_any_reference(real_eff),
776  effect_descriptor(real_eff),
777  0,
778  &n_eff_ref, &n_eff_d,
779  &exact_translation_p);
780  n_eff = make_effect(make_cell_reference(n_eff_ref), copy_action(effect_action(eff)),
781  exact_translation_p? copy_approximation(effect_approximation(eff)) : make_approximation_may(),
782  n_eff_d);
783  /* shouldn't it be a union ? BC */
784  l_eff = gen_nconc(l_eff, CONS(EFFECT, n_eff, NIL));
785  free_effect(init_eff);
786  }
787  }
788  }
789  gen_free_list(l_real_arg);
790  gen_full_free_list(l_real_eff);
791 
792  } /* if (pointer_type_p(real_arg_t)) */
793  else
794  {
795  pips_debug(8, "real arg reference is not a pointer and is not a partially indexed array -> NIL \n");
796  } /* else */
797  break;
798  }
799  else if(ENTITY_POINT_TO_P(real_op)|| ENTITY_FIELD_P(real_op))
800  {
801  list l_real_arg = NIL;
802  list l_eff_real = NIL;
803  /* first we compute an effect on the real_arg */
804 
805  pips_debug(6, "point_to or field operator\n");
807  (real_arg, &l_eff_real, true);
808 
809  FOREACH(EFFECT, eff_real, l_eff_real)
810  {
811  FOREACH(EFFECT, eff, l_sum_eff) {
812  // functions that can be pointed by effect_dup_func:
813  // simple_effect_dup
814  // region_dup
815  // copy_effect
816  effect eff_formal = (*effect_dup_func)(eff);
817  effect new_eff;
818 
819  if (effect_undefined_p(eff_real))
821  else
822  {
823  // functions that can be pointed by effect_dup_func:
824  // simple_effect_dup
825  // region_dup
826  // copy_effect
827  new_eff = (*effect_dup_func)(eff_real);
828  effect_approximation_tag(new_eff) =
830  effect_action_tag(new_eff) =
831  effect_action_tag(eff);
832 
833 
834  /* first we translate the formal region predicate */
836 
837  /* Then we append the formal region to the real region */
838  /* Well this is valid only in the general case :
839  * we should verify that types are compatible. */
840  new_eff = region_append(new_eff, eff_formal);
841  free_effect(eff_formal);
842 
843  } /* else du if (effect_undefined_p(eff_real)) */
844 
845  /* shouldn't it be a union ? BC */
846  l_eff = gen_nconc(l_eff, CONS(EFFECT, new_eff, NIL));
847  } /* FOREACH(EFFECT, eff, l_sum_eff) */
848  }
849  gen_free_list(l_real_arg);
850  gen_full_free_list(l_eff_real);
851 
852  }
853  else if(ENTITY_MALLOC_SYSTEM_P(real_op))
854  {
855  /* BC : do not generate effects on HEAP */
856  /* n_eff = heap_effect(get_current_module_entity(),
857  * copy_action(effect_action(eff)));*/
858  }
859  else
860  {
861  l_eff = gen_nconc
862  (l_eff,
864  }
865 
866  if (n_eff != effect_undefined && l_eff == NIL)
867  l_eff = CONS(EFFECT,n_eff, NIL);
868  break;
869  } /* case is_syntax_call */
870  case is_syntax_cast :
871  {
872  pips_debug(5, "cast case\n");
873  expression cast_exp = cast_expression(syntax_cast(real_s));
874  type cast_t = expression_to_type(cast_exp);
875  /* we should test here the compatibility of the casted expression type with
876  * the formal entity type. It is not available here, however, I think it's
877  * equivalent to test the compatibility with the real arg expression type
878  * since the current function is called after testing the compatilibty between
879  * the real expression type and the formal parameter type.
880  */
882  {
883  l_eff = gen_nconc
884  (l_eff,
886  (l_sum_eff, cast_exp, context));
887  }
888  else if (!ENDP(l_sum_eff))
889  {
890  /* let us at least generate effects on all memory locations reachable from
891  * the cast expression
892  */
893  bool read_p = false, write_p = false;
894  FOREACH(EFFECT, eff, l_sum_eff)
895  {
896  if(effect_write_p(eff)) write_p = true;
897  else read_p = false;
898  }
899  tag t = write_p ? (read_p ? 'x' : 'w') : 'r';
900  l_eff = gen_nconc
901  (l_eff,
903  }
904 
905  break;
906  }
908  {
909  pips_debug(5,"sizeof expression -> NIL");
910  break;
911  }
912  case is_syntax_va_arg :
913  {
914  pips_internal_error("va_arg() : should have been treated before");
915  break;
916  }
917  case is_syntax_application :
918  {
919  bool read_p = false, write_p = false;
920  pips_user_warning("Application not supported yet -> anywhere effect\n");
921  FOREACH(EFFECT, eff, l_sum_eff)
922  {
923  if(effect_write_p(eff)) write_p = true;
924  else read_p = true;
925  }
926  if (write_p)
928  if (read_p)
930  break;
931  }
932  case is_syntax_range :
933  {
934  pips_user_error("Illegal effective parameter: range\n");
935  break;
936  }
937  default:
938  pips_internal_error("Illegal kind of syntax");
939  break;
940  } /* switch */
941 
942  /* free_type(real_arg_t); */
943 
945  // functions that can be pointed by effects_precondition_composition_op:
946  // effects_composition_with_preconditions_nop
947  // convex_regions_precondition_compose
948  (*effects_precondition_composition_op)(l_eff, context, false);
949  }
950  ifdebug(8)
951  {
952  pips_debug(8, "end with effects :\n");
953  print_regions(l_eff);
954  }
955 
956  return(l_eff);
957 }
reference copy_reference(reference p)
REFERENCE.
Definition: ri.c:2047
bool entity_all_locations_p(entity e)
test if an entity is the top of the lattice
list c_convex_effects_on_formal_parameter_backward_translation(list l_sum_eff, expression real_arg, transformer context)
void convex_cell_reference_with_address_of_cell_reference_translation(reference, descriptor, reference, descriptor, int, reference *, descriptor *, bool *)
void print_regions(list)
effect region_append(effect, effect)
effect make_anywhere_effect(action)
#define effect_approximation_tag(eff)
#define effect_write_p(eff)
#define effect_action_tag(eff)
bool store_effect_p(effect)
Definition: effects.c:1062
bool anywhere_effect_p(effect)
Is it an anywhere effect? ANYMMODULE:ANYWHERE
Definition: effects.c:346
action make_action_read_memory(void)
Definition: effects.c:1017
bool types_compatible_for_effects_interprocedural_translation_p(type, type)
tests if the actual argument type and the formal argument type are compatible with the current state ...
Definition: type.c:932
int tag
TAG.
Definition: newgen_types.h:92
string expression_to_string(expression e)
Definition: expression.c:77
#define ENTITY_DEREFERENCING_P(e)
#define ENTITY_POINT_TO_P(e)
#define ENTITY_FIELD_P(e)
C data structure and pointer management.
#define ENTITY_MALLOC_SYSTEM_P(e)
bool pointer_type_p(type)
Check for scalar pointers.
Definition: type.c:2993
size_t type_depth(type)
Number of steps to access the lowest leave of type t without dereferencing.
Definition: type.c:4880
string type_to_string(const type)
type.c
Definition: type.c:51
#define transformer_undefined_p(x)
Definition: ri.h:2848
#define ifdebug(n)
Definition: sg.c:47

References anywhere_effect_p(), c_actual_argument_to_may_summary_effects(), c_convex_effects_on_formal_parameter_backward_translation(), call_arguments, call_function, CAR, cast_expression, CDR, CONS, convex_cell_reference_with_address_of_cell_reference_translation(), convex_cell_reference_with_value_of_cell_reference_translation(), convex_region_descriptor_translation(), copy_action(), copy_approximation(), copy_reference(), EFFECT, effect_action, effect_action_tag, effect_any_reference, effect_approximation, effect_approximation_tag, effect_descriptor, effect_undefined, effect_undefined_p, effect_write_p, ENDP, ENTITY_ADDRESS_OF_P, entity_all_locations_p(), ENTITY_ASSIGN_P, ENTITY_DEREFERENCING_P, ENTITY_FIELD_P, ENTITY_MALLOC_SYSTEM_P, ENTITY_POINT_TO_P, entity_type, EXPRESSION, expression_syntax, expression_to_string(), expression_to_type(), FOREACH, free_effect(), free_reference(), gen_free_list(), gen_full_free_list(), gen_length(), gen_nconc(), generic_proper_effects_of_complex_address_expression(), ifdebug, is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, make_action_read_memory(), make_action_write_memory(), make_anywhere_effect(), make_approximation_may(), make_cell_reference(), make_effect(), NIL, pips_debug, pips_debug_effect, pips_debug_effects, pips_internal_error, pips_user_error, pips_user_warning, pointer_type_p(), print_regions(), reference_indices, reference_variable, region_append(), store_effect_p(), syntax_call, syntax_cast, syntax_reference, syntax_tag, transformer_undefined_p, type_depth(), type_to_string(), type_variable, types_compatible_for_effects_interprocedural_translation_p(), and variable_dimensions.

Referenced by c_convex_effects_on_formal_parameter_backward_translation(), set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cell_reference_phi_cfc_variables()

list cell_reference_phi_cfc_variables ( reference  ,
Psysteme   
)

Referenced by cell_reference_sc_exact_projection_along_variable().

+ Here is the caller graph for this function:

◆ cell_reference_sc_exact_projection_along_variable()

Psysteme cell_reference_sc_exact_projection_along_variable ( reference  ref,
Psysteme  sc,
entity  var,
bool exact_p 
)
Parameters
refef
scc
varar
exact_pxact_p

Definition at line 1084 of file old_projection.c.

1085 {
1086  Psysteme volatile ps = sc;
1087  *exact_p = true;
1088  if (!sc_empty_p(ps) && !sc_rn_p(ps))
1089  {
1090  if (base_contains_variable_p(ps->base, (Variable) var))
1091  {
1093  {
1094  sc_rm(ps);
1095  *exact_p = false;
1096  return SC_UNDEFINED;
1097  }
1098  TRY {
1099  list l_phi_var = cell_reference_phi_cfc_variables(ref, ps);
1100 
1101  if (gen_find_eq(var, l_phi_var) == chunk_undefined)
1102  {
1103  Psysteme volatile * psc = &ps;
1104  sc_projection_along_variable_ofl_ctrl(psc,(Variable) var,
1105  FWD_OFL_CTRL);
1106  sc_base_remove_variable(ps, (Variable) var);
1107  ps = region_sc_normalize(ps,2);
1108  *exact_p = true;
1109  }
1110  else
1111  {
1112  Pvecteur pv_var = NULL;
1113 
1114  vect_add_elem(&pv_var, (Variable) var, VALUE_ONE);
1115  ps = sc_projection_ofl_along_variables_with_test
1116  (ps, pv_var, exact_p);
1117  vect_rm(pv_var);
1118  ps = region_sc_normalize(ps,2);
1119  }
1120  gen_free_list(l_phi_var);
1122  }
1123  }
1124  }
1125  return ps;
1126 }
static reference ref
Current stmt (an integer)
Definition: adg_read_paf.c:163
#define CATCH(what)
@ overflow_error
#define UNCATCH(what)
#define TRY
bool base_contains_variable_p(Pbase b, Variable v)
bool base_contains_variable_p(Pbase b, Variable v): returns true if variable v is one of b's elements...
Definition: base.c:136
list cell_reference_phi_cfc_variables(reference, Psysteme)
Psysteme region_sc_normalize(Psysteme, int)
#define chunk_undefined
obsolete
Definition: genC.h:79
void * gen_find_eq(const void *item, const list seq)
Definition: list.c:422
void sc_base_remove_variable(Psysteme sc, Variable v)
Definition: sc.c:239
bool sc_rn_p(Psysteme sc)
bool sc_rn_p(Psysteme sc): check if the set associated to sc is the whole space, rn
Definition: sc_alloc.c:369
void sc_rm(Psysteme ps)
void sc_rm(Psysteme ps): liberation de l'espace memoire occupe par le systeme de contraintes ps;
Definition: sc_alloc.c:277
Pbase base
Definition: sc-local.h:75
#define FWD_OFL_CTRL
void vect_add_elem(Pvecteur *pvect, Variable var, Value val)
void vect_add_elem(Pvecteur * pvect, Variable var, Value val): addition d'un vecteur colineaire au ve...
Definition: unaires.c:72

References Ssysteme::base, base_contains_variable_p(), CATCH, cell_reference_phi_cfc_variables(), chunk_undefined, FWD_OFL_CTRL, gen_find_eq(), gen_free_list(), overflow_error, ref, region_sc_normalize(), sc_base_remove_variable(), sc_empty_p(), sc_rm(), sc_rn_p(), TRY, UNCATCH, VALUE_ONE, vect_add_elem(), and vect_rm().

Referenced by cell_reference_system_remove_psi_variables(), and cell_reference_system_remove_rho_variables().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cell_reference_system_remove_psi_variables()

Psysteme cell_reference_system_remove_psi_variables ( reference  ref,
Psysteme  sc,
bool exact_p 
)
Parameters
refef
scc
exact_pxact_p

Definition at line 651 of file old_projection.c.

652 {
653  list volatile l_psi = psi_entities_list(1,NB_MAX_ARRAY_DIM);
654  *exact_p = true;
655 
656  for(; !ENDP(l_psi) && *exact_p; l_psi = CDR(l_psi))
657  {
658  entity e = ENTITY(CAR(l_psi));
659  bool exact_projection;
660  sc = cell_reference_sc_exact_projection_along_variable(ref, sc, e, &exact_projection);
661  *exact_p = *exact_p && exact_projection;
662  }
663  Psysteme volatile ps = sc;
664  if (!ENDP(l_psi) && !SC_UNDEFINED_P(ps))
665  {
667  {
668  sc_rm(ps);
669  ps = SC_UNDEFINED;
670  }
671  TRY
672  {
675  }
676  }
677  return ps;
678 }
#define NB_MAX_ARRAY_DIM
list psi_entities_list(int, int)
Psysteme cell_reference_sc_exact_projection_along_variable(reference ref, Psysteme sc, entity var, bool *exact_p)
Psysteme sc_projection_ofl_along_list_of_variables(Psysteme ps, list l_var)
MISC
#define ENTITY(x)
ENTITY.
Definition: ri.h:2755

References CAR, CATCH, CDR, cell_reference_sc_exact_projection_along_variable(), ENDP, ENTITY, NB_MAX_ARRAY_DIM, overflow_error, psi_entities_list(), ref, sc_projection_ofl_along_list_of_variables(), sc_rm(), TRY, and UNCATCH.

+ Here is the call graph for this function:

◆ cell_reference_system_remove_rho_variables()

Psysteme cell_reference_system_remove_rho_variables ( reference  ref,
Psysteme  sc,
bool exact_p 
)
Parameters
refef
scc
exact_pxact_p

Definition at line 709 of file old_projection.c.

710 {
711  list volatile l_rho = rho_entities_list(1,NB_MAX_ARRAY_DIM);
712  *exact_p = true;
713 
714  for(; !ENDP(l_rho) && *exact_p; l_rho = CDR(l_rho))
715  {
716  entity e = ENTITY(CAR(l_rho));
717  bool exact_projection;
718  sc = cell_reference_sc_exact_projection_along_variable(ref, sc, e, &exact_projection);
719  *exact_p = *exact_p && exact_projection;
720  }
721  Psysteme volatile ps = sc;
722  if (!ENDP(l_rho) && !SC_UNDEFINED_P(ps))
723  {
725  {
726  sc_rm(ps);
727  ps = SC_UNDEFINED;
728  }
729  TRY
730  {
733  }
734  }
735  return ps;
736 }
list rho_entities_list(int, int)

References CAR, CATCH, CDR, cell_reference_sc_exact_projection_along_variable(), ENDP, ENTITY, NB_MAX_ARRAY_DIM, overflow_error, ref, rho_entities_list(), sc_projection_ofl_along_list_of_variables(), sc_rm(), TRY, and UNCATCH.

+ Here is the call graph for this function:

◆ cell_system_sc_append_and_normalize()

Psysteme cell_system_sc_append_and_normalize ( Psysteme  ,
Psysteme  ,
int   
)

Referenced by convex_cells_intersection_p().

+ Here is the caller graph for this function:

◆ convex_cell_preceding_p()

bool convex_cell_preceding_p ( cell  c1,
descriptor  d1,
cell  c2,
descriptor  d2,
transformer  current_precondition,
bool  strict_p,
bool exact_p 
)
Parameters
c11
d11
c22
d22
current_preconditionurrent_precondition
strict_ptrict_p
exact_pxact_p

Definition at line 191 of file eval.c.

196 {
197  reference r1 = cell_any_reference(c1);
198  reference r2 = cell_any_reference(c2);
199 
201  strict_p, exact_p);
202 }
bool convex_cell_reference_preceding_p(reference r1, descriptor d1, reference r2, descriptor d2, transformer current_precondition, bool strict_p, bool *exact_p)
eval.c
Definition: eval.c:67
reference cell_any_reference(cell)
API for reference.
Definition: effects.c:77
static transformer current_precondition

References cell_any_reference(), convex_cell_reference_preceding_p(), and current_precondition.

Referenced by convex_effect_find_aliased_paths_with_pointer_values().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ convex_cell_reference_preceding_p()

bool convex_cell_reference_preceding_p ( reference  r1,
descriptor  d1,
reference  r2,
descriptor  d2,
transformer  current_precondition,
bool  strict_p,
bool exact_p 
)

eval.c

same entity and the path length of r1 is shorter than the path length of r2.

we now have to check that each common index matches

only matching reference indices have been found (phi variables or struct field entities).

we must now check the descriptors.

Parameters
r11
d11
r22
d22
current_preconditionurrent_precondition
strict_ptrict_p
exact_pxact_p

Definition at line 67 of file eval.c.

72 {
73  bool res = true;
74  entity e1 = reference_variable(r1);
75  list ind1 = reference_indices(r1);
76  size_t r1_path_length = gen_length(ind1);
77  entity e2 = reference_variable(r2);
78  list ind2 = reference_indices(r2);
79  size_t r2_path_length = gen_length(ind2);
80 
81  pips_debug(8, "input references r1 : %s, r2: %s \n",
84 
85  *exact_p = true;
86  if (same_entity_p(e1, e2)
87  && ((r1_path_length < r2_path_length)
88  || (!strict_p && r1_path_length == r2_path_length)))
89  {
90  /* same entity and the path length of r1 is shorter than the
91  * path length of r2.
92  *
93  * we now have to check that each common index matches
94  */
95  pips_debug(8,"same entities, and r1 path is shorter than r2 path\n");
96  while (res && !ENDP(ind1))
97  {
98  expression exp1 = EXPRESSION(CAR(ind1));
99  expression exp2 = EXPRESSION(CAR(ind2));
100 
101  if(!expression_equal_p(exp1, exp2))
102  {
103  res = false;
104  *exact_p = true;
105  }
106 
107  POP(ind1);
108  POP(ind2);
109  }
110  if (res)
111  {
112  /* only matching reference indices have been found (phi
113  * variables or struct field entities).
114  *
115  * we must now check the descriptors.
116  */
123 
124  pips_debug_effect(6, "reg1 = \n", reg1);
125  pips_debug_effect(6, "reg2 = \n", reg1);
126 
127  list li = region_intersection(reg1, reg2);
128  if (ENDP(li))
129  {
130  res = false;
131  *exact_p = true;
132  }
133  else
134  {
135 
136  pips_debug_effect(8, "reg2 before eliminating phi variables: \n ", reg2);
137 
138  effect reg2_dup = copy_effect(reg2);
139  list l_reg2 = CONS(EFFECT,reg2_dup,NIL);
140  list l_phi = phi_entities_list(r1_path_length+1,r2_path_length);
141  project_regions_along_variables(l_reg2, l_phi);
142  gen_free_list(l_reg2);
143  gen_free_list(l_phi);
144  pips_debug_effect(8, "reg2_dup after elimination: \n ", reg2_dup);
145 
146  effect reg1_dup = copy_effect(reg1);
148  {
150  region_sc_append(reg1_dup, sc_context, false);
151  }
152 
153  pips_debug_effect(8, "reg1_dup after adding preconditions: \n ", reg1_dup);
154  pips_debug_effect(8, "reg1 after adding preconditions: \n ", reg1);
155 
156  list ld = region_sup_difference(reg1_dup, reg2_dup);
157  if (ENDP(ld))
158  {
159  res = true;
160  *exact_p = true;
161  }
162  else
163  {
164  res = true;
165  *exact_p = false;
166  }
167  gen_full_free_list(ld);
168  }
169  gen_full_free_list(li);
170 
173  free_effect(reg1);
174 
177  free_effect(reg2);
178  }
179  }
180  else
181  {
182  res = false;
183  *exact_p = true;
184  }
185 
186  pips_debug(8, "end : r1 is %s a predecessor of r2 (%s exact)\n", res ? "":"not", *exact_p ? "":"not");
187  return res;
188 }
approximation make_approximation_exact(void)
Definition: effects.c:185
effect copy_effect(effect p)
EFFECT.
Definition: effects.c:448
#define region
simulation of the type region
list region_sup_difference(region reg1, region reg2)
list region_sup_difference(effect reg1, reg2) input : two regions output : a list of regions containi...
list region_intersection(region reg1, region reg2)
Intersection :
list phi_entities_list(int, int)
void region_sc_append(effect, Psysteme, bool)
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,...
#define descriptor_undefined
Definition: effects.h:559
string reference_to_string(reference r)
Definition: expression.c:87
bool same_entity_p(entity e1, entity e2)
predicates on entities
Definition: entity.c:1321
bool expression_equal_p(expression e1, expression e2)
Syntactic equality e1==e2.
Definition: expression.c:1347
#define reference_undefined
Definition: ri.h:2302
#define transformer_relation(x)
Definition: ri.h:2873
#define predicate_system(x)
Definition: ri.h:2069

References CAR, cell_reference, CONS, copy_effect(), current_precondition, descriptor_undefined, EFFECT, effect_cell, effect_descriptor, ENDP, EXPRESSION, expression_equal_p(), free_effect(), gen_free_list(), gen_full_free_list(), gen_length(), is_cell_reference, make_action_write_memory(), make_approximation_exact(), make_cell(), make_effect(), NIL, phi_entities_list(), pips_debug, pips_debug_effect, POP, predicate_system, project_regions_along_variables(), reference_indices, reference_to_string(), reference_undefined, reference_variable, region, region_intersection(), region_sc_append(), region_sup_difference(), same_entity_p(), transformer_relation, and transformer_undefined_p.

Referenced by convex_cell_preceding_p(), and eval_convex_cell_with_points_to().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ convex_cell_reference_with_address_of_cell_reference_translation()

void convex_cell_reference_with_address_of_cell_reference_translation ( reference  ,
descriptor  ,
reference  ,
descriptor  ,
int  ,
reference ,
descriptor ,
bool  
)

Referenced by c_convex_effects_on_formal_parameter_backward_translation(), and eval_convex_cell_with_points_to().

+ Here is the caller graph for this function:

◆ convex_cell_reference_with_value_of_cell_reference_translation()

void convex_cell_reference_with_value_of_cell_reference_translation ( reference  ,
descriptor  ,
reference  ,
descriptor  ,
int  ,
reference ,
descriptor ,
bool  
)

◆ convex_cell_with_address_of_cell_translation()

void convex_cell_with_address_of_cell_translation ( cell  ,
descriptor  ,
cell  ,
descriptor  ,
int  ,
cell ,
descriptor ,
bool  
)

Referenced by convex_effect_find_aliased_paths_with_pointer_values().

+ Here is the caller graph for this function:

◆ convex_cell_with_value_of_cell_translation()

void convex_cell_with_value_of_cell_translation ( cell  ,
descriptor  ,
cell  ,
descriptor  ,
int  ,
cell ,
descriptor ,
bool  
)

Referenced by convex_effect_find_aliased_paths_with_pointer_values().

+ Here is the caller graph for this function:

◆ convex_cells_inclusion_p()

bool convex_cells_inclusion_p ( cell  c1,
descriptor  d1,
cell  c2,
descriptor  d2,
bool exact_p 
)

Inclusion test :

returns true if c1 is included into c2, false otherwise. returns false if c1 may only be included into c2.

Parameters
exact_ptarget is set to true if the result is exact, false otherwise.

In fact, this parameter would be useful only if there are overflows during the systems inclusion test. But it is not currently used.

default result

we have combinable concrete locations or assimilated (context sensitive heap locations)

they intersect if their descriptors intersection is not empty

if one of the systems is unfeasible, the result is false and exact

if one of the systems is not constrained, the result is true and exact

Parameters
c11
d11
c22
d22
exact_pxact_p

Definition at line 1015 of file binary_operators.c.

1018 {
1019  bool res = true; /* default result */
1020  *exact_p = true;
1021 
1022  bool concrete_locations_p = true;
1023 
1024  if (cells_combinable_p(c1, c2))
1025  {
1026  bool c1_abstract_location_p = cell_abstract_location_p(c1);
1027  bool c2_abstract_location_p = cell_abstract_location_p(c2);
1028 
1029  if (c1_abstract_location_p || c2_abstract_location_p)
1030  {
1031  entity e1 = cell_entity(c1);
1032  entity e2 = cell_entity(c2);
1033  bool heap1_context_sensitive_p = c1_abstract_location_p && entity_flow_or_context_sentitive_heap_location_p(e1);
1034  bool heap2_context_sensitive_p = c2_abstract_location_p && entity_flow_or_context_sentitive_heap_location_p(e2);
1035 
1036  if (heap1_context_sensitive_p && heap2_context_sensitive_p)
1037  {
1038  concrete_locations_p = true;
1039  }
1040  else
1041  {
1042  entity al_max = abstract_locations_max(e1, e2);
1043  res = same_entity_p(e2, al_max);
1044  concrete_locations_p = false;
1045  }
1046  }
1047 
1048  if (concrete_locations_p)
1049  {
1050  /* we have combinable concrete locations or assimilated (context sensitive heap locations) */
1051  /* they intersect if their descriptors intersection is not empty */
1052 
1053  Psysteme sc1 = descriptor_convex(d1);
1054  Psysteme sc2 = descriptor_convex(d2);
1055 
1056  /* if one of the systems is unfeasible, the result is false and exact */
1057  if (sc_empty_p(sc1) || sc_empty_p(sc2))
1058  {
1059  res = false;
1060  }
1061  /* if one of the systems is not constrained, the result is true and exact */
1062  else if (sc_rn_p(sc2))
1063  {
1064  res = true;
1065  }
1066  else if (sc_rn_p(sc1))
1067  {
1068  res = true;
1069  }
1070  else
1071  {
1072  res = sc_inclusion_p(sc1, sc2);
1073  }
1074  }
1075  }
1076  else
1077  {
1078  res = false;
1079  }
1080  return res;
1081 }
bool entity_flow_or_context_sentitive_heap_location_p(entity e)
entity abstract_locations_max(entity al1, entity al2)
eturns the smallest abstract location set greater than or equalt to al1 and al2.
bool cells_combinable_p(cell, cell)
bool cell_abstract_location_p(cell)
Definition: effects.c:273
entity cell_entity(cell)
Definition: effects.c:57
#define descriptor_convex(x)
Definition: effects.h:601
#define sc_inclusion_p(ps1, ps2)
Definition: union-local.h:80

References abstract_locations_max(), cell_abstract_location_p(), cell_entity(), cells_combinable_p(), descriptor_convex, entity_flow_or_context_sentitive_heap_location_p(), same_entity_p(), sc_empty_p(), sc_inclusion_p, and sc_rn_p().

Referenced by convex_effect_find_aliased_paths_with_pointer_values().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ convex_cells_intersection_p()

bool convex_cells_intersection_p ( cell  c1,
descriptor  d1,
cell  c2,
descriptor  d2,
bool exact_p 
)

default safe result

can it be true if we have two null locations ?

we have combinable concrete locations or assimilated (context sensitive heap locations)

they intersect if their descriptors intersection is not empty

if one of the systems is unfeasible, the result is false and exact

if one of the systems is not constrained, the result is true and exact

else test the feasibility of the systems intersection

could be some other level?

Parameters
c11
d11
c22
d22
exact_pxact_p

Definition at line 1201 of file binary_operators.c.

1204 {
1205  bool res = true;
1206 
1207  /* default safe result */
1208  bool concrete_locations_p = true;
1209 
1210  if (cells_combinable_p(c1, c2))
1211  {
1212  bool c1_abstract_location_p = cell_abstract_location_p(c1);
1213  bool c2_abstract_location_p = cell_abstract_location_p(c2);
1214 
1215  if (c1_abstract_location_p || c2_abstract_location_p)
1216  {
1217  entity e1 = cell_entity(c1);
1218  entity e2 = cell_entity(c2);
1219  bool heap1_context_sensitive_p = c1_abstract_location_p && entity_flow_or_context_sentitive_heap_location_p(e1);
1220  bool heap2_context_sensitive_p = c2_abstract_location_p && entity_flow_or_context_sentitive_heap_location_p(e2);
1221 
1222  if (heap1_context_sensitive_p && heap2_context_sensitive_p)
1223  {
1224  concrete_locations_p = true;
1225  }
1226  else
1227  {
1228  concrete_locations_p = false;
1229  res = true;
1230  *exact_p = false; /* can it be true if we have two null locations ?*/
1231  }
1232  }
1233 
1234  if (concrete_locations_p)
1235  {
1236  /* we have combinable concrete locations or assimilated (context sensitive heap locations) */
1237  /* they intersect if their descriptors intersection is not empty */
1238 
1239  Psysteme sc1 = descriptor_convex(d1);
1240  Psysteme sc2 = descriptor_convex(d2);
1241 
1242 
1243  /* if one of the systems is unfeasible, the result is false and exact */
1244  if (sc_empty_p(sc1) || sc_empty_p(sc2))
1245  {
1246  pips_debug(8, "d1 or d2 sc_empty");
1247  res = false;
1248  *exact_p = true;
1249  }
1250 
1251  /* if one of the systems is not constrained, the result is true and exact */
1252  else if (sc_rn_p(sc1) || sc_rn_p(sc2))
1253  {
1254  pips_debug(8, "d1 or d2 sc_rn\n");
1255  res = true;
1256  *exact_p = true;
1257  }
1258  else
1259  {
1260  /* else test the feasibility of the systems intersection */
1261  Psysteme sc = cell_system_sc_append_and_normalize(sc_dup(sc1),sc2,2); /* could be some other level? */
1262 
1264  {
1265  pips_debug(3, "overflow error \n");
1266  res = true;
1267  *exact_p = false;
1268  }
1269  TRY
1270  {
1272  *exact_p = true;
1274  sc_rm(sc);
1275  }
1276  }
1277  }
1278  }
1279  else
1280  {
1281  res = false;
1282  *exact_p = true;
1283  }
1284  return res;
1285 }
Psysteme cell_system_sc_append_and_normalize(Psysteme, Psysteme, int)
Psysteme sc_dup(Psysteme ps)
Psysteme sc_dup(Psysteme ps): should becomes a link.
Definition: sc_alloc.c:176
bool sc_integer_feasibility_ofl_ctrl(Psysteme sc, int ofl_ctrl, bool ofl_res)

References CATCH, cell_abstract_location_p(), cell_entity(), cell_system_sc_append_and_normalize(), cells_combinable_p(), descriptor_convex, entity_flow_or_context_sentitive_heap_location_p(), FWD_OFL_CTRL, overflow_error, pips_debug, sc_dup(), sc_empty_p(), sc_integer_feasibility_ofl_ctrl(), sc_rm(), sc_rn_p(), TRY, and UNCATCH.

Referenced by convex_effect_find_aliased_paths_with_pointer_values().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ convex_effect_field_to_rank_conversion()

effect convex_effect_field_to_rank_conversion ( effect  )

◆ convex_effect_find_aliased_paths_with_pointer_values()

list convex_effect_find_aliased_paths_with_pointer_values ( effect  eff,
statement  s 
)
Parameters
effff

Definition at line 326 of file eval.c.

327 {
328  bool exact_p;
329  list l_pv = cell_relations_list( load_pv(s));
338 
339  reset_pv_context(&ctxt);
340  return l_aliased;
341 }
bool convex_cells_intersection_p(cell c1, descriptor d1, cell c2, descriptor d2, bool *exact_p)
bool convex_cells_inclusion_p(cell c1, descriptor d1, cell c2, descriptor d2, bool *exact_p)
Inclusion test :
bool convex_cell_preceding_p(cell c1, descriptor d1, cell c2, descriptor d2, transformer current_precondition, bool strict_p, bool *exact_p)
Definition: eval.c:191
void simple_cell_to_convex_cell_conversion(cell input_cell, cell *output_cell, descriptor *output_desc)
Definition: eval.c:234
void convex_cell_with_address_of_cell_translation(cell, descriptor, cell, descriptor, int, cell *, descriptor *, bool *)
void convex_cell_with_value_of_cell_translation(cell, descriptor, cell, descriptor, int, cell *, descriptor *, bool *)
list generic_effect_find_aliases_with_simple_pointer_values(effect eff, list l_pv, bool *exact_p, transformer current_precondition, bool(*cell_preceding_p_func)(cell, descriptor, cell, descriptor, transformer, bool, bool *), void(*cell_with_address_of_cell_translation_func)(cell, descriptor, cell, descriptor, int, cell *, descriptor *, bool *), void(*cell_with_value_of_cell_translation_func)(cell, descriptor, cell, descriptor, int, cell *, descriptor *, bool *), bool(*cells_intersection_p_func)(cell, descriptor, cell, descriptor, bool *), bool(*cells_inclusion_p_func)(cell, descriptor, cell, descriptor, bool *), void(*simple_cell_conversion_func)(cell, cell *, descriptor *))
Definition: eval.c:673
#define cell_relations_list(x)
Definition: effects.h:549
pv_context make_simple_pv_context(void)
cell_relations load_pv(statement)
void reset_pv_context(pv_context *)
pv_context is a structure holding the methods to use during pointer values analyses

References cell_relations_list, convex_cell_preceding_p(), convex_cell_with_address_of_cell_translation(), convex_cell_with_value_of_cell_translation(), convex_cells_inclusion_p(), convex_cells_intersection_p(), generic_effect_find_aliases_with_simple_pointer_values(), load_pv(), make_simple_pv_context(), reset_pv_context(), simple_cell_to_convex_cell_conversion(), and transformer_undefined.

Referenced by convex_effect_to_constant_path_effects_with_pointer_values().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ convex_effect_to_constant_path_effects_with_pointer_values()

list convex_effect_to_constant_path_effects_with_pointer_values ( effect  )

Referenced by set_methods_for_convex_effects().

+ Here is the caller graph for this function:

◆ convex_effect_to_constant_path_effects_with_points_to()

list convex_effect_to_constant_path_effects_with_points_to ( effect  eff)

We have not found any equivalent constant path : it may point anywhere

We should maybe contract these effects later. Is it done by the callers ?

change the resulting effects action to the current effect action

Parameters
effff

Definition at line 285 of file eval.c.

286 {
287  list le = NIL;
288  bool exact_p;
290 
291  if (effect_reference_dereferencing_p(ref, &exact_p))
292  {
293  pips_debug(8, "dereferencing case \n");
294  bool exact_p = false;
298  else {
300  }
301 
304  &exact_p, context);
305  if (ENDP(l_eval))
306  {
307  pips_debug(8, "no equivalent constant path found -> anywhere effect\n");
308  /* We have not found any equivalent constant path : it may point anywhere */
309  /* We should maybe contract these effects later. Is it done by the callers ? */
311  }
312  else
313  {
314  /* change the resulting effects action to the current effect action */
315  if (effect_read_p(eff))
316  effects_to_read_effects(l_eval);
317  le = gen_nconc(l_eval,le);
318  }
319  }
320  else
321  le = CONS(EFFECT, copy_effect(eff), le);
322  return le;
323 }
list eval_convex_cell_with_points_to(cell c, descriptor d, list ptl, bool *exact_p, transformer current_precondition)
Definition: eval.c:275
bool effects_private_current_context_empty_p(void)
transformer effects_private_current_context_head(void)
statement effects_private_current_stmt_head(void)
void effects_to_read_effects(list)
#define effect_read_p(eff)
#define effect_scalar_p(eff) entity_scalar_p(effect_entity(eff))
bool effect_reference_dereferencing_p(reference, bool *)
Definition: type.c:233
points_to_list load_pt_to_list(statement)
#define points_to_list_list(x)

References CONS, copy_action(), copy_effect(), EFFECT, effect_action, effect_any_reference, effect_cell, effect_descriptor, effect_read_p, effect_reference_dereferencing_p(), effects_private_current_context_empty_p(), effects_private_current_context_head(), effects_private_current_stmt_head(), effects_to_read_effects(), ENDP, eval_convex_cell_with_points_to(), gen_nconc(), load_pt_to_list(), make_anywhere_effect(), NIL, pips_debug, points_to_list_list, ref, and transformer_undefined.

Referenced by set_methods_for_convex_effects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ convex_effect_to_phi_entity_list()

list convex_effect_to_phi_entity_list ( effect  )

◆ convex_effects_descriptor_normalize()

void convex_effects_descriptor_normalize ( list  )

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the caller graph for this function:

◆ convex_region_add_expression_dimension()

void convex_region_add_expression_dimension ( effect  ,
expression   
)

◆ convex_region_change_ith_dimension_expression()

void convex_region_change_ith_dimension_expression ( effect  ,
expression  ,
int   
)

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the caller graph for this function:

◆ convex_region_descriptor_remove_ith_dimension()

void convex_region_descriptor_remove_ith_dimension ( effect  ,
int   
)

◆ convex_region_descriptor_translation()

◆ convex_regions_backward_translation()

list convex_regions_backward_translation ( entity  func,
list  real_args,
list  l_reg,
transformer  context 
)

of effects

Parameters
funcunc
real_argseal_args
l_reg_reg
contextontext

Definition at line 298 of file interprocedural.c.

300 {
301  list l_res = NIL;
302 
303  l_res = regions_backward_translation(func, real_args, l_reg, context, true);
304 
305  return l_res;
306 }
list regions_backward_translation(entity func, list real_args, list func_regions, transformer context, bool proper)
list regions_backward_tranlation(entity func, list real_args, list func_regions, transformer context)...

References NIL, and regions_backward_translation().

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ convex_regions_descriptor_variable_rename()

list convex_regions_descriptor_variable_rename ( list  ,
entity  ,
entity   
)

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the caller graph for this function:

◆ convex_regions_forward_translation()

list convex_regions_forward_translation ( entity  callee,
list  real_args,
list  l_reg,
transformer  context 
)

of effects

Parameters
calleeallee
real_argseal_args
l_reg_reg
contextontext

Definition at line 309 of file interprocedural.c.

311 {
312  list l_res = NIL;
313 
315  l_res = regions_forward_translation(callee, real_args, l_reg, context);
317  l_res = generic_c_effects_forward_translation(callee, real_args, l_reg, context);
318  return l_res;
319 }
list regions_forward_translation(entity func, list real_args, list l_reg, transformer context)
list regions_forward_translation(entity func, list real_args, l_reg, transformer context input : the ...
list generic_c_effects_forward_translation(entity, list, list, transformer)
bool c_module_p(entity m)
Test if a module "m" is written in C.
Definition: entity.c:2777
bool fortran_module_p(entity m)
Test if a module is in Fortran.
Definition: entity.c:2799

References c_module_p(), callee, fortran_module_p(), generic_c_effects_forward_translation(), get_current_module_entity(), NIL, and regions_forward_translation().

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ convex_regions_inverse_transformer_compose()

list convex_regions_inverse_transformer_compose ( list  ,
transformer   
)

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the caller graph for this function:

◆ convex_regions_loop_normalize()

list convex_regions_loop_normalize ( list  ,
entity  ,
range  ,
entity ,
descriptor  ,
bool   
)

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the caller graph for this function:

◆ convex_regions_precondition_compose()

list convex_regions_precondition_compose ( list  ,
transformer  ,
bool   
)

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the caller graph for this function:

◆ convex_regions_transformer_compose()

list convex_regions_transformer_compose ( list  ,
transformer   
)

◆ convex_regions_translation_end()

void convex_regions_translation_end ( void  )

Definition at line 108 of file interprocedural.c.

109 {
112 }
void reset_arguments_to_eliminate(void)
void reset_translation_context_sc(void)

References reset_arguments_to_eliminate(), and reset_translation_context_sc().

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ convex_regions_translation_init()

void convex_regions_translation_init ( entity  callee,
list  real_args,
bool  backward_p 
)

interprocedural.c

interprocedural.c

Parameters
calleeallee
real_argseal_args
backward_packward_p

Definition at line 98 of file interprocedural.c.

99 {
100 
102  if (backward_p)
104  else
106 }
void set_backward_arguments_to_eliminate(entity)
void set_forward_arguments_to_eliminate(void)
void set_interprocedural_translation_context_sc(entity, list)

References callee, set_backward_arguments_to_eliminate(), set_forward_arguments_to_eliminate(), and set_interprocedural_translation_context_sc().

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ convex_regions_union_over_range()

list convex_regions_union_over_range ( list  ,
entity  ,
range  ,
descriptor   
)

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the caller graph for this function:

◆ disjunct_regions_p()

bool disjunct_regions_p ( void  )

◆ empty_convex_context_p()

bool empty_convex_context_p ( transformer  )

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the caller graph for this function:

◆ entity_declaration_sc()

◆ entity_whole_region()

effect entity_whole_region ( entity  ,
action   
)

Referenced by array_must_fully_written_by_regions_p(), and region_translation().

+ Here is the caller graph for this function:

◆ eval_convex_cell_with_points_to()

list eval_convex_cell_with_points_to ( cell  c,
descriptor  d,
list  ptl,
bool exact_p,
transformer  current_precondition 
)
Parameters
ptltl
exact_pxact_p
current_preconditionurrent_precondition

Definition at line 275 of file eval.c.

276 {
277 
278  return generic_eval_cell_with_points_to(c, d, ptl, exact_p, current_precondition,
282 }
void simple_reference_to_convex_reference_conversion(reference ref, reference *output_ref, descriptor *output_desc)
Definition: eval.c:205
list generic_eval_cell_with_points_to(cell input_cell, descriptor input_desc, list ptl, bool *exact_p, transformer current_precondition, bool(*cell_reference_preceding_p_func)(reference, descriptor, reference, descriptor, transformer, bool, bool *), void(*cell_reference_with_address_of_cell_reference_translation_func)(reference, descriptor, reference, descriptor, int, reference *, descriptor *, bool *), void(*cell_reference_conversion_func)(reference, reference *, descriptor *))
Definition: eval.c:361

References convex_cell_reference_preceding_p(), convex_cell_reference_with_address_of_cell_reference_translation(), current_precondition, generic_eval_cell_with_points_to(), and simple_reference_to_convex_reference_conversion().

Referenced by convex_effect_to_constant_path_effects_with_points_to(), and set_methods_for_convex_effects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exact_regions_p()

bool exact_regions_p ( void  )

◆ func_entity_name()

char* func_entity_name ( entity  )

Referenced by InitCompDesc().

+ Here is the caller graph for this function:

◆ function_formal_parameters()

list function_formal_parameters ( entity  )

◆ get_arguments_to_eliminate()

list get_arguments_to_eliminate ( void  )

◆ get_in_out_regions_properties()

void get_in_out_regions_properties ( void  )

Referenced by add_alias_pairs_for_this_caller(), init_convex_in_out_regions(), and init_convex_summary_in_out_regions().

+ Here is the caller graph for this function:

◆ get_out_summary_regions_list()

list get_out_summary_regions_list ( void  )

Definition at line 135 of file interprocedural.c.

136 {
137  return(l_sum_out_reg);
138 }
static list l_sum_out_reg

References l_sum_out_reg.

◆ get_regions_properties()

◆ get_text_in_regions()

text get_text_in_regions ( const  string)
Parameters
stringodule_name

◆ get_text_out_regions()

text get_text_out_regions ( const  string)
Parameters
stringodule_name

◆ get_text_regions()

text get_text_regions ( const  string)
Parameters
stringodule_name

◆ get_translation_context_sc()

Psysteme get_translation_context_sc ( void  )

Referenced by region_translation().

+ Here is the caller graph for this function:

◆ in_out_methods_p()

bool in_out_methods_p ( void  )

Definition at line 476 of file methods.c.

477 {
478  // functions that can be pointed by effects_computation_init_func:
479  // effects_computation_no_init
480  // init_convex_in_out_regions
481  // init_convex_rw_regions
483 }
void init_convex_in_out_regions(const char *module_name)
Definition: methods.c:528
void(* effects_computation_init_func)(const char *)

References effects_computation_init_func, and init_convex_in_out_regions().

Referenced by c_convex_effects_on_actual_parameter_forward_translation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ in_regions()

bool in_regions ( const  string)
Parameters
stringodule_name

◆ in_regions_of_external()

list in_regions_of_external ( entity  func,
list  real_args,
transformer  context 
)

list in_regions_of_external(entity func, list real_args, transformer context) input : an external function func, and the list of real arguments used in the calling function.

output : the corresponding list of regions, at call site. modifies : nothing. comment : The effects of "func" are computed into externals effects, ie. ‘translated’. The translation is made in two phases : _ regions on formal parameters _ regions on common parameters

Get the regions of "func".

translate them

Parameters
funcunc
real_argseal_args
contextontext

Definition at line 232 of file interprocedural.c.

236 {
237  list le = NIL;
238  const char *func_name = module_local_name(func);
239 
240  pips_debug(4, "translation regions for %s\n", func_name);
241 
242  if (! entity_module_p(func))
243  {
244  pips_internal_error("%s: bad function", func_name);
245  }
246  else
247  {
248  list func_regions;
249 
250  /* Get the regions of "func". */
251  func_regions = effects_to_list((effects)
252  db_get_memory_resource(DBR_IN_SUMMARY_REGIONS, func_name, true));
253  /* translate them */
254  le = regions_backward_translation(func, real_args, func_regions, context,
255  SUMMARY);
256  }
257  return le;
258 }
#define SUMMARY
list effects_to_list(effects)
Definition: effects.c:209
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
Definition: database.c:755
bool entity_module_p(entity e)
Definition: entity.c:683

References db_get_memory_resource(), effects_to_list(), entity_module_p(), module_local_name(), NIL, pips_debug, pips_internal_error, regions_backward_translation(), and SUMMARY.

+ Here is the call graph for this function:

◆ in_summary_regions()

bool in_summary_regions ( const  string)
Parameters
stringodule_name

◆ init_convex_in_out_regions()

void init_convex_in_out_regions ( const char *  module_name)

This very useful warning should be placed in pipsmake where IN and OUT regions are requested. Moved to rmake() in pipsmake.c

if (!same_string_p(rule_phase(find_rule_by_resource("REGIONS")),

"MUST_REGIONS"))

pips_user_warning("\nMUST REGIONS not selected - "

"Do not expect wonderful results\n");

Get the transformers and preconditions of the module.

for intermediate values

Parameters
module_nameodule_name

Definition at line 528 of file methods.c.

529 {
530  regions_init();
531 
532  /* This very useful warning should be placed in pipsmake where IN
533  and OUT regions are requested. Moved to rmake() in pipsmake.c */
534  /* if (!same_string_p(rule_phase(find_rule_by_resource("REGIONS")), */
535  /* "MUST_REGIONS")) */
536  /* pips_user_warning("\nMUST REGIONS not selected - " */
537  /* "Do not expect wonderful results\n"); */
538 
539  set_bool_property("MUST_REGIONS", true);
540  set_bool_property("EXACT_REGIONS", true);
542 
543  /* Get the transformers and preconditions of the module. */
545  db_get_memory_resource(DBR_TRANSFORMERS, module_name, true) );
547  db_get_memory_resource(DBR_PRECONDITIONS, module_name, true) );
548 
549  /* for intermediate values */
551  db_get_memory_resource(DBR_CUMULATED_EFFECTS, module_name, true));
553  db_get_memory_resource(DBR_PROPER_EFFECTS, module_name, true));
556 
558 }
void init_convex_inout_prettyprint(const char *__attribute__((unused)) module_name)
Definition: methods.c:519
void get_in_out_regions_properties(void)
void regions_init(void)
void reset_proper_rw_effects(void)
void set_proper_rw_effects(statement_effects)
void set_cumulated_rw_effects(statement_effects)
const char * module_name(const char *s)
Return the module part of an entity name.
Definition: entity_names.c:296
void set_bool_property(const char *, bool)
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
Definition: entity.c:1479
void module_to_value_mappings(entity m)
void module_to_value_mappings(entity m): build hash tables between variables and values (old,...
Definition: mappings.c:624
void set_transformer_map(statement_mapping)
void set_precondition_map(statement_mapping)

References db_get_memory_resource(), get_in_out_regions_properties(), init_convex_inout_prettyprint(), module_name(), module_name_to_entity(), module_to_value_mappings(), regions_init(), reset_proper_rw_effects(), set_bool_property(), set_cumulated_rw_effects(), set_precondition_map(), set_proper_rw_effects(), and set_transformer_map().

Referenced by in_out_methods_p(), and set_methods_for_convex_in_out_effects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init_convex_inout_prettyprint()

void init_convex_inout_prettyprint ( const char *  )

Referenced by c_convex_effects_on_actual_parameter_forward_translation().

+ Here is the caller graph for this function:

◆ init_convex_rw_prettyprint()

void init_convex_rw_prettyprint ( const char *  )

◆ init_convex_rw_regions()

void init_convex_rw_regions ( const char *  module_name)

Get the transformers and preconditions of the module.

for intermediate values

Parameters
module_nameodule_name

Definition at line 495 of file methods.c.

496 {
497  regions_init();
500  (get_bool_property("REGIONS_TRANSLATION_STATISTICS"));
501 
502  /* Get the transformers and preconditions of the module. */
504  db_get_memory_resource(DBR_TRANSFORMERS, module_name, true) );
506  db_get_memory_resource(DBR_PRECONDITIONS, module_name, true) );
507 
508  /* for intermediate values */
510  db_get_memory_resource(DBR_CUMULATED_EFFECTS, module_name, true));
512  db_get_memory_resource(DBR_PROPER_EFFECTS, module_name, true));
515 
517 }
void init_convex_rw_prettyprint(const char *__attribute__((unused)) module_name)
Definition: methods.c:485
void get_regions_properties(void)
void region_translation_statistics_init(bool)
translation.c
Definition: translation.c:162
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....

References db_get_memory_resource(), get_bool_property(), get_regions_properties(), init_convex_rw_prettyprint(), module_name(), module_name_to_entity(), module_to_value_mappings(), region_translation_statistics_init(), regions_init(), reset_proper_rw_effects(), set_cumulated_rw_effects(), set_precondition_map(), set_proper_rw_effects(), and set_transformer_map().

Referenced by set_methods_for_convex_rw_effects(), set_methods_for_convex_rw_pointer_effects(), and step_analyse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init_convex_summary_in_out_regions()

void init_convex_summary_in_out_regions ( const char *  module_name)

for intermediate values

Parameters
module_nameodule_name

Definition at line 606 of file methods.c.

607 {
608  regions_init();
609  set_bool_property("MUST_REGIONS", true);
610  set_bool_property("EXACT_REGIONS", true);
612  /* for intermediate values */
614  db_get_memory_resource(DBR_CUMULATED_EFFECTS, module_name, true));
616  db_get_memory_resource(DBR_PROPER_EFFECTS, module_name, true));
619 
621 }

References db_get_memory_resource(), get_in_out_regions_properties(), init_convex_inout_prettyprint(), module_name(), module_name_to_entity(), module_to_value_mappings(), regions_init(), reset_proper_rw_effects(), set_bool_property(), set_cumulated_rw_effects(), and set_proper_rw_effects().

+ Here is the call graph for this function:

◆ init_convex_summary_rw_regions()

void init_convex_summary_rw_regions ( const char *  module_name)

for intermediate values

Parameters
module_nameodule_name

Definition at line 583 of file methods.c.

584 {
585  regions_init();
586  /* for intermediate values */
588  db_get_memory_resource(DBR_CUMULATED_EFFECTS, module_name, true));
590  db_get_memory_resource(DBR_PROPER_EFFECTS, module_name, true));
593 
595 }

References db_get_memory_resource(), init_convex_rw_prettyprint(), module_name(), module_name_to_entity(), module_to_value_mappings(), regions_init(), reset_proper_rw_effects(), set_cumulated_rw_effects(), and set_proper_rw_effects().

+ Here is the call graph for this function:

◆ live_out_regions()

bool live_out_regions ( const char *  )

◆ loop_convex_descriptor_make()

descriptor loop_convex_descriptor_make ( loop  )

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the caller graph for this function:

◆ loop_regions_normalize()

entity loop_regions_normalize ( list  l_reg,
entity  index,
range  l_range,
bool normalized_regions_p,
bool  sc_loop_p,
Psysteme psc_loop 
)

FONCTIONS D'INTERFACE

entity loop_regions_normalize(list l_reg, entity index, range l_range, bool *normalized_regions_p, bool sc_loop_p, Psysteme *psc_loop) input : a list of regions, a loop index, its range, and a pointer on a bool to know if the loop is normalized, a bool to know if the loop precondition system sc_loop must be normalized.

output : an entity representing the new loop index to use; it may be index if the loop is already normalized. modifies : l_reg, and *normalized_regions_p. comment : Loops are not normalized in PIPS, but array region semantic functions are defined for normalized loops (incr = +/-1). So we perform here a virtual loop normalization. If the loop is not already normalized, a new loop index (beta) is introduced, and the following system is added to each region of l_reg: { index = lower_bound + beta * incr, 0 <= beta } Then the old index is eliminated as a parameter, and the beta variable is returned as the new loop index. If the loop was already normalized, or has been virtually normalized, then *normalized_regions_p is set to TRUE.

Is the loop increment numerically known ?

add to each region predicate the system: { index = lower_bound + beta * incr, 0 <= beta }

eliminate the old index (which is no more a variable, but a parameter)

update the loop preconditions

Parameters
l_reg_reg
indexndex
l_range_range
normalized_regions_pormalized_regions_p
sc_loop_pc_loop_p
psc_loopsc_loop

Definition at line 160 of file old_projection.c.

163 {
164  Value incr = VALUE_ZERO;
165  normalized nub, nlb;
166  list l_tmp;
167  entity new_index = index;
168 
170 
171  if (must_regions_p())
172  {
173  expression e_incr = range_increment(l_range);
174  normalized n;
175 
176  /* Is the loop increment numerically known ? */
177  n = NORMALIZE_EXPRESSION(e_incr);
178  if(normalized_linear_p(n))
179  {
180  Pvecteur v_incr = normalized_linear(n);
181  if(vect_constant_p(v_incr))
182  incr = vect_coeff(TCST, v_incr);
183  }
184 
185  nub = NORMALIZE_EXPRESSION(range_upper(l_range));
186  nlb = NORMALIZE_EXPRESSION(range_lower(l_range));
187 
188  *normalized_regions_p =
189  (value_notzero_p(incr) && normalized_linear_p(nub)
190  && normalized_linear_p(nlb));
191  pips_debug(6, "normalized loop? %s.\n",
192  *normalized_regions_p? "yes" : "no");
193 
194  if (*normalized_regions_p)
195  {
196  if (value_notone_p(value_abs(incr)))
197  {
198  /* add to each region predicate the system:
199  * { index = lower_bound + beta * incr, 0 <= beta }
200  */
201  entity beta = make_beta_entity(1);
202  Psysteme beta_sc = sc_new();
203  Pvecteur v_lb = normalized_linear(nlb);
204  Pvecteur beta_v;
205 
206  new_index = beta;
207  beta_v = vect_new((Variable) index , VALUE_ONE);
208  vect_add_elem(&beta_v, (Variable) beta, value_uminus(incr));
209  beta_v = vect_cl_ofl_ctrl(beta_v,
210  VALUE_MONE, v_lb, NO_OFL_CTRL);
211  sc_add_egalite(beta_sc,contrainte_make(beta_v));
212 
213  beta_v = vect_new((Variable) beta, VALUE_MONE);
214  sc_add_inegalite(beta_sc,contrainte_make(beta_v));
215  sc_creer_base(beta_sc);
216 
217  ifdebug(6)
218  {
219  pips_debug(6, "index system:\n"); sc_syst_debug(beta_sc);
220  }
221 
222  /* eliminate the old index (which is no more a variable,
223  * but a parameter) */
224  l_tmp = CONS(ENTITY, index, NIL);
225  FOREACH(EFFECT, reg, l_reg)
226  {
227  if(store_effect_p(reg)) {
228  if (!region_rn_p(reg) && !region_empty_p(reg))
229  {
230  region_sc_append_and_normalize(reg,beta_sc,1);
232  }
233  }
234  }
235  gen_free_list(l_tmp);
236 
237  /* update the loop preconditions */
238  if (sc_loop_p)
239  {
240  Psysteme sc_tmp;
241  sc_tmp = sc_safe_append(*psc_loop, beta_sc);
242  sc_projection_along_variable_ofl_ctrl(&sc_tmp,(Variable) index,
243  FWD_OFL_CTRL);
244  sc_base_remove_variable(sc_tmp, (Variable) index);
245  *psc_loop = sc_tmp;
246  }
247  sc_rm(beta_sc);
248  }
249  }
250  }
251 
253 
254  return new_index;
255 }
#define VALUE_ZERO
#define value_notzero_p(val)
#define value_uminus(val)
unary operators on values
#define value_notone_p(val)
#define VALUE_MONE
int Value
#define value_abs(val)
void sc_syst_debug(Psysteme s)
constraint_to_text.c
bool vect_constant_p(Pvecteur)
bool vect_constant_p(Pvecteur v): v contains only a constant term, may be zero
Definition: predicats.c:211
#define region_rn_p(reg)
#define debug_regions_consistency(l_reg)
consistency checking
#define region_empty_p(reg)
bool must_regions_p(void)
entity make_beta_entity(int)
utils.c
void region_exact_projection_along_parameters(region reg, list l_param)
void region_exact_projection_along_parameters(effect reg, list l_param) input : a regions reg and a l...
#define range_upper(x)
Definition: ri.h:2290
#define range_increment(x)
Definition: ri.h:2292
#define range_lower(x)
Definition: ri.h:2288
void sc_creer_base(Psysteme ps)
void sc_creer_base(Psysteme ps): initialisation des parametres dimension et base d'un systeme lineair...
Definition: sc_alloc.c:129
void sc_add_egalite(Psysteme p, Pcontrainte e)
void sc_add_egalite(Psysteme p, Pcontrainte e): macro ajoutant une egalite e a un systeme p; la base ...
Definition: sc_alloc.c:389
void sc_add_inegalite(Psysteme p, Pcontrainte i)
void sc_add_inegalite(Psysteme p, Pcontrainte i): macro ajoutant une inegalite i a un systeme p; la b...
Definition: sc_alloc.c:406
Psysteme sc_safe_append(Psysteme s1, Psysteme s2)
Psysteme sc_safe_append(Psysteme s1, Psysteme s2) input : output : calcul de l'intersection des polye...
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
#define NO_OFL_CTRL
Pvecteur vect_cl_ofl_ctrl(Pvecteur v, Value lambda, Pvecteur u, int ofl_ctrl)
Pvecteur vect_cl_ofl_ctrl(Pvecteur v, Value lambda, Pvecteur u, int ofl_ctrl): etape d'acculumulation...
Definition: binaires.c:128
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...
Definition: unaires.c:228

References CONS, contrainte_make(), debug_regions_consistency, EFFECT, ENTITY, FOREACH, FWD_OFL_CTRL, gen_free_list(), ifdebug, make_beta_entity(), must_regions_p(), NIL, NO_OFL_CTRL, NORMALIZE_EXPRESSION, normalized_linear, normalized_linear_p, pips_debug, range_increment, range_lower, range_upper, region_empty_p, region_exact_projection_along_parameters(), region_rn_p, region_sc_append_and_normalize(), sc_add_egalite(), sc_add_inegalite(), sc_base_remove_variable(), sc_creer_base(), sc_new(), sc_rm(), sc_safe_append(), sc_syst_debug(), store_effect_p(), TCST, value_abs, VALUE_MONE, value_notone_p, value_notzero_p, VALUE_ONE, value_uminus, VALUE_ZERO, vect_add_elem(), vect_cl_ofl_ctrl(), vect_coeff(), vect_constant_p(), and vect_new().

Referenced by project_regions_along_loop_index().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ make_beta_entity()

entity make_beta_entity ( int  )

utils.c

Referenced by loop_regions_normalize().

+ Here is the caller graph for this function:

◆ make_phi_entity()

◆ make_phi_expression()

expression make_phi_expression ( int  )

Referenced by c_convex_effects_on_actual_parameter_forward_translation().

+ Here is the caller graph for this function:

◆ make_pointed_regions_reference()

reference make_pointed_regions_reference ( entity  ,
bool   
)

◆ make_psi_entity()

entity make_psi_entity ( int  )

Referenced by c_convex_effects_on_actual_parameter_forward_translation().

+ Here is the caller graph for this function:

◆ make_psi_expression()

expression make_psi_expression ( int  )

◆ make_reference_region()

effect make_reference_region ( reference  ,
action   
)

Referenced by c_convex_effects_on_actual_parameter_forward_translation(), and region_translation().

+ Here is the caller graph for this function:

◆ make_regions_psi_reference()

reference make_regions_psi_reference ( entity  )

Referenced by region_translation().

+ Here is the caller graph for this function:

◆ make_regions_reference()

reference make_regions_reference ( entity  )

Referenced by real_regions_forward_translation().

+ Here is the caller graph for this function:

◆ make_rho_entity()

entity make_rho_entity ( int  )

◆ make_rho_expression()

expression make_rho_expression ( int  )

◆ may_pointer_regions()

bool may_pointer_regions ( const  string)
Parameters
stringodule_name

◆ may_regions()

bool may_regions ( const  string)
Parameters
stringodule_name

◆ must_pointer_regions()

bool must_pointer_regions ( const  string)
Parameters
stringodule_name

◆ must_pointer_regions_with_points_to()

bool must_pointer_regions_with_points_to ( const  string)
Parameters
stringodule_name

◆ must_regions()

bool must_regions ( const  string)
Parameters
stringodule_name

◆ must_regions_p()

◆ must_regions_with_pointer_values()

bool must_regions_with_pointer_values ( const  string)
Parameters
stringodule_name

◆ must_regions_with_points_to()

bool must_regions_with_points_to ( const  string)
Parameters
stringodule_name

◆ op_statistics_p()

◆ out_regions()

bool out_regions ( const  string)
Parameters
stringodule_name

Referenced by do_statement_insertion().

+ Here is the caller graph for this function:

◆ out_regions_from_call_site_to_callee()

void out_regions_from_call_site_to_callee ( call  c)

void out_regions_from_call_site_to_callee(call c) input : a potential call site for current_callee.

output : nothing modifies : l_sum_out_reg becomes the may union of l_sum_out_reg and the translated out regions of the current call site. comment :

Definition at line 205 of file interprocedural.c.

206 {
208  list l_out = NIL, l_tmp = NIL;
209 
210  if (call_function(c) != current_callee)
211  return;
212 
215 
217  context);
219 }
static statement current_stmt
void update_out_summary_regions_list(list l_out)
static entity current_callee
list load_statement_out_regions(statement)
transformer load_statement_precondition(statement)

References call_arguments, call_function, current_callee, current_stmt, load_statement_out_regions(), load_statement_precondition(), NIL, regions_forward_translation(), and update_out_summary_regions_list().

Referenced by out_regions_from_caller_to_callee().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ out_regions_from_caller_to_callee()

list out_regions_from_caller_to_callee ( entity  caller,
entity  callee 
)

All we need to perform the translation

Parameters
calleraller
calleeallee

Definition at line 150 of file interprocedural.c.

151 {
152  const char *caller_name;
153  statement caller_statement;
154 
157  caller_name = module_local_name(caller);
158  pips_debug(2, "begin for caller: %s\n", caller_name);
159 
160  /* All we need to perform the translation */
162  db_get_memory_resource(DBR_CODE, caller_name, true) );
164  db_get_memory_resource(DBR_CUMULATED_EFFECTS, caller_name, true));
166  db_get_memory_resource(DBR_PROPER_EFFECTS, caller_name, true));
167  module_to_value_mappings(caller);
169  db_get_memory_resource(DBR_PRECONDITIONS, caller_name, true));
170 
172  db_get_memory_resource(DBR_OUT_REGIONS, caller_name, true) );
173 
174  caller_statement = (statement)
175  db_get_memory_resource (DBR_CODE, caller_name, true);
176 
178  gen_multi_recurse(caller_statement,
181  NULL);
182 
185 
187 
193  //free_value_mappings();
194  pips_debug(2, "end\n");
195  return(l_sum_out_reg);
196 }
static const char * caller_name
Definition: alias_check.c:122
struct _newgen_struct_statement_ * statement
Definition: cloning.h:21
void out_regions_from_call_site_to_callee(call c)
void out_regions_from_call_site_to_callee(call c) input : a potential call site for current_callee.
static bool stmt_filter(statement s)
void reset_out_effects(void)
void set_out_effects(statement_effects)
void reset_cumulated_rw_effects(void)
void reset_current_module_entity(void)
Reset the current module entity.
Definition: static.c:97
void reset_current_module_statement(void)
Reset the current module statement.
Definition: static.c:221
statement set_current_module_statement(statement)
Set the current module statement.
Definition: static.c:165
entity set_current_module_entity(entity)
static.c
Definition: static.c:66
void gen_multi_recurse(void *o,...)
Multi recursion visitor function.
Definition: genClib.c:3428
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
Definition: genClib.c:2752
#define statement_domain
newgen_sizeofexpression_domain_defined
Definition: ri.h:362
#define call_domain
newgen_callees_domain_defined
Definition: ri.h:58
void reset_precondition_map(void)
void free_value_mappings(void)
Normal call to free the mappings.
Definition: value.c:1212

References call_domain, callee, caller_name, current_callee, db_get_memory_resource(), free_value_mappings(), gen_multi_recurse(), gen_null(), l_sum_out_reg, module_local_name(), module_to_value_mappings(), out_regions_from_call_site_to_callee(), pips_debug, reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), reset_out_effects(), reset_precondition_map(), reset_proper_rw_effects(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), set_out_effects(), set_precondition_map(), set_proper_rw_effects(), statement_domain, and stmt_filter().

+ Here is the call graph for this function:

◆ out_summary_regions()

bool out_summary_regions ( const  string)
Parameters
stringodule_name

◆ phi_entities_list()

list phi_entities_list ( int  ,
int   
)

◆ phi_entity_rank()

int phi_entity_rank ( entity  )

◆ phi_first_sort_base()

void phi_first_sort_base ( Pbase )

Referenced by region_sc_minimal().

+ Here is the caller graph for this function:

◆ phi_to_psi_region()

void phi_to_psi_region ( effect  )

◆ print_call_graph_with_in_regions()

bool print_call_graph_with_in_regions ( const  string)
Parameters
stringodule_name

◆ print_call_graph_with_out_regions()

bool print_call_graph_with_out_regions ( const  string)
Parameters
stringodule_name

◆ print_call_graph_with_regions()

bool print_call_graph_with_regions ( const  string)
Parameters
stringodule_name

◆ print_code_as_a_graph_in_regions()

bool print_code_as_a_graph_in_regions ( const  string)
Parameters
stringod_name

◆ print_code_as_a_graph_out_regions()

bool print_code_as_a_graph_out_regions ( const  string)
Parameters
stringod_name

◆ print_code_as_a_graph_regions()

bool print_code_as_a_graph_regions ( const  string)
Parameters
stringod_name

◆ print_code_in_regions()

bool print_code_in_regions ( const  string)
Parameters
stringodule_name

◆ print_code_inv_pointer_regions()

bool print_code_inv_pointer_regions ( const  string)
Parameters
stringodule_name

◆ print_code_inv_regions()

bool print_code_inv_regions ( const  string)
Parameters
stringodule_name

◆ print_code_live_out_regions()

bool print_code_live_out_regions ( const char *  )

◆ print_code_out_regions()

bool print_code_out_regions ( const  string)
Parameters
stringodule_name

◆ print_code_pointer_regions()

bool print_code_pointer_regions ( const  string)
Parameters
stringodule_name

◆ print_code_proper_pointer_regions()

bool print_code_proper_pointer_regions ( const  string)
Parameters
stringodule_name

◆ print_code_proper_regions()

bool print_code_proper_regions ( const  string)
Parameters
stringodule_name

◆ print_code_regions()

bool print_code_regions ( const  string)
Parameters
stringodule_name

◆ print_copyinout_regions()

void print_copyinout_regions ( list  )

◆ print_dinf_statistics()

void print_dinf_statistics ( char *  mod_name,
char *  prefix 
)
Parameters
mod_nameod_name
prefixrefix

Definition at line 177 of file binary_operators.c.

178 {
179  FILE *fp;
180  string filename;
181 
182  filename = "dinf_op_stat";
184  mod_name, ".", prefix, filename, NULL));
185 
186  fp = safe_fopen(filename, "w");
187  fprintf(fp,"%s",mod_name);
188 
189  fprintf(fp," %d %d %d \n", nb_dinf, nb_dinf_pot_must, nb_dinf_must);
190 
191  safe_fclose(fp, filename);
192  free(filename);
193 }
static int nb_dinf_must
static int nb_dinf
static int nb_dinf_pot_must
FILE * safe_fopen(const char *filename, const char *what)
Definition: file.c:67
int safe_fclose(FILE *stream, const char *filename)
Definition: file.c:77
void free(void *)
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183
string db_get_current_workspace_directory(void)
Definition: workspace.c:96
static const char * prefix
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
char * strdup()

References concatenate(), db_get_current_workspace_directory(), fprintf(), free(), nb_dinf, nb_dinf_must, nb_dinf_pot_must, prefix, safe_fclose(), safe_fopen(), and strdup().

+ Here is the call graph for this function:

◆ print_dsup_statistics()

void print_dsup_statistics ( char *  mod_name,
char *  prefix 
)
Parameters
mod_nameod_name
prefixrefix

Definition at line 158 of file binary_operators.c.

159 {
160  FILE *fp;
161  string filename;
162 
163  filename = "dsup_op_stat";
165  mod_name, ".", prefix, filename, NULL));
166 
167  fp = safe_fopen(filename, "w");
168  fprintf(fp,"%s",mod_name);
169 
170  fprintf(fp," %d %d %d \n", nb_dsup, nb_dsup_pot_must, nb_dsup_must);
171 
172  safe_fclose(fp, filename);
173  free(filename);
174 }
static int nb_dsup
static int nb_dsup_pot_must
static int nb_dsup_must

References concatenate(), db_get_current_workspace_directory(), fprintf(), free(), nb_dsup, nb_dsup_must, nb_dsup_pot_must, prefix, safe_fclose(), safe_fopen(), and strdup().

+ Here is the call graph for this function:

◆ print_icfg_with_control_in_regions()

bool print_icfg_with_control_in_regions ( const  string)
Parameters
stringodule_name

◆ print_icfg_with_control_out_regions()

bool print_icfg_with_control_out_regions ( const  string)
Parameters
stringodule_name

◆ print_icfg_with_control_regions()

bool print_icfg_with_control_regions ( const  string)
Parameters
stringodule_name

◆ print_icfg_with_in_regions()

bool print_icfg_with_in_regions ( const  string)
Parameters
stringodule_name

◆ print_icfg_with_loops_in_regions()

bool print_icfg_with_loops_in_regions ( const  string)
Parameters
stringodule_name

◆ print_icfg_with_loops_out_regions()

bool print_icfg_with_loops_out_regions ( const  string)
Parameters
stringodule_name

◆ print_icfg_with_loops_regions()

bool print_icfg_with_loops_regions ( const  string)
Parameters
stringodule_name

◆ print_icfg_with_out_regions()

bool print_icfg_with_out_regions ( const  string)
Parameters
stringodule_name

◆ print_icfg_with_regions()

bool print_icfg_with_regions ( const  string)
Parameters
stringodule_name

◆ print_inout_regions()

◆ print_private_regions()

void print_private_regions ( list  )

◆ print_proj_op_statistics()

void print_proj_op_statistics ( char *  mod_name,
char *  prefix 
)
Parameters
mod_nameod_name
prefixrefix

Definition at line 104 of file old_projection.c.

105 {
106  FILE *fp;
107  string filename;
108 
109  filename = "proj_param_op_stat";
111  mod_name, ".", prefix, filename, NULL));
112  fp = safe_fopen(filename, "w");
113  fprintf(fp,"%s",mod_name);
114  fprintf(fp," %d %d %d %d %d %d\n", nb_proj_param, nb_proj_param_pot_must,
117  safe_fclose(fp, filename);
118  free(filename);
119 
120  filename = "proj_var_op_stat";
122  mod_name, ".", prefix, filename, NULL));
123  fp = safe_fopen(filename, "w");
124  fprintf(fp,"%s",mod_name);
125  fprintf(fp," %d %d %d %d \n", nb_proj_var, nb_proj_var_pot_must,
127  safe_fclose(fp, filename);
128  free(filename);
129 }
static int nb_proj_param_hermite
static int nb_proj_var_ofl
static int nb_proj_var
static int nb_proj_var_pot_must
static int nb_proj_param_ofl
static int nb_proj_param_hermite_success
static int nb_proj_var_must
static int nb_proj_param_must
static int nb_proj_param_pot_must
static int nb_proj_param
STATISTICS FOR PROJECTION OPERATORS

References concatenate(), db_get_current_workspace_directory(), fprintf(), free(), nb_proj_param, nb_proj_param_hermite, nb_proj_param_hermite_success, nb_proj_param_must, nb_proj_param_ofl, nb_proj_param_pot_must, nb_proj_var, nb_proj_var_must, nb_proj_var_ofl, nb_proj_var_pot_must, prefix, safe_fclose(), safe_fopen(), and strdup().

+ Here is the call graph for this function:

◆ print_region()

void print_region ( effect  )

◆ print_region_sc()

void print_region_sc ( effect  )

Referenced by copy_write_statement_with_cumulated_regions().

+ Here is the caller graph for this function:

◆ print_regions()

◆ print_regions_op_statistics()

void print_regions_op_statistics ( char *  ,
int   
)

◆ print_rw_regions()

void print_rw_regions ( list  )

Referenced by init_convex_rw_prettyprint(), and loop_basic_workchunk_to_workchunk().

+ Here is the caller graph for this function:

◆ print_source_in_regions()

bool print_source_in_regions ( const  string)
Parameters
stringodule_name

◆ print_source_inv_regions()

bool print_source_inv_regions ( const  string)
Parameters
stringodule_name

◆ print_source_out_regions()

bool print_source_out_regions ( const  string)
Parameters
stringodule_name

◆ print_source_proper_regions()

bool print_source_proper_regions ( const  string)
Parameters
stringodule_name

◆ print_source_regions()

bool print_source_regions ( const  string)
Parameters
stringodule_name

◆ print_umay_statistics()

void print_umay_statistics ( char *  mod_name,
char *  prefix 
)
Parameters
mod_nameod_name
prefixrefix

Definition at line 139 of file binary_operators.c.

140 {
141  FILE *fp;
142  string filename;
143 
144  filename = "umay_op_stat";
146  mod_name, ".", prefix, filename, NULL));
147 
148  fp = safe_fopen(filename, "w");
149  fprintf(fp,"%s",mod_name);
150 
151  fprintf(fp," %d %d %d \n", nb_umay, nb_umay_must_must, nb_umay_must);
152 
153  safe_fclose(fp, filename);
154  free(filename);
155 }
static int nb_umay_must
static int nb_umay_must_must
static int nb_umay

References concatenate(), db_get_current_workspace_directory(), fprintf(), free(), nb_umay, nb_umay_must, nb_umay_must_must, prefix, safe_fclose(), safe_fopen(), and strdup().

+ Here is the call graph for this function:

◆ print_umust_statistics()

void print_umust_statistics ( char *  mod_name,
char *  prefix 
)
Parameters
mod_nameod_name
prefixrefix

Definition at line 118 of file binary_operators.c.

119 {
120  FILE *fp;
121  string filename;
122 
123  filename = "umust_op_stat";
125  mod_name, ".", prefix, filename, NULL));
126 
127  fp = safe_fopen(filename, "w");
128  fprintf(fp,"%s",mod_name);
129 
130  fprintf(fp," %d %d %d %d %d %d\n", nb_umust, nb_umust_must_must,
133 
134  safe_fclose(fp, filename);
135  free(filename);
136 }
static int nb_umust_must_may
static int nb_umust_must_may_must
static int nb_umust_must_must_must
static int nb_umust_sc_rn
static int nb_umust_must_must
static int nb_umust

References concatenate(), db_get_current_workspace_directory(), fprintf(), free(), nb_umust, nb_umust_must_may, nb_umust_must_may_must, nb_umust_must_must, nb_umust_must_must_must, nb_umust_sc_rn, prefix, safe_fclose(), safe_fopen(), and strdup().

+ Here is the call graph for this function:

◆ project_regions_along_loop_index()

void project_regions_along_loop_index ( list  l_reg,
entity  index,
range  l_range 
)

void project_regions_along_loop_index(list l_reg, entity index, l_range) input : a list l_reg of regions, a variable which is a loop index.

output : nothing. modifies : l_reg and the regions it contains. comment : project each region in l_reg along the variable index.

Take care of loops with non-unit increment when must regions are required

Parameters
l_reg_reg
indexndex
l_range_range

Definition at line 263 of file old_projection.c.

264 {
265  bool projection_of_index_safe = false;
266  Psysteme sc_tmp = SC_UNDEFINED;
267 
268  debug_on("REGIONS_OPERATORS_DEBUG_LEVEL");
270 
271 
272  /* Take care of loops with non-unit increment when must regions
273  are required */
274  index = loop_regions_normalize(l_reg, index, l_range,
275  &projection_of_index_safe,false,&sc_tmp);
276 
277  if (must_regions_p() && projection_of_index_safe)
278  {
279 
280  FOREACH(EFFECT, reg, l_reg) {
281  if(store_effect_p(reg))
283  }
284  }
285  else
286  {
287  list l = CONS(ENTITY, index, NIL);
288  FOREACH(EFFECT, reg, l_reg) {
289  if(store_effect_p(reg))
291  }
292  gen_free_list(l);
293  }
295  debug_off();
296 
297 }
#define debug_on(env)
Definition: misc-local.h:157
#define debug_off()
Definition: misc-local.h:160
entity loop_regions_normalize(list l_reg, entity index, range l_range, bool *normalized_regions_p, bool sc_loop_p, Psysteme *psc_loop)
FONCTIONS D'INTERFACE
void region_non_exact_projection_along_variables(region reg, list l_var)
void region_non_exact_projection_along_variables(effect reg, list l_var) input : a region and a list ...
void region_exact_projection_along_variable(region reg, entity var)
void region_exact_projection_along_variable(effect reg, entity var) input : a region and a variable (...

References CONS, debug_off, debug_on, debug_regions_consistency, EFFECT, ENTITY, FOREACH, gen_free_list(), loop_regions_normalize(), must_regions_p(), NIL, region_exact_projection_along_variable(), region_non_exact_projection_along_variables(), and store_effect_p().

Referenced by comp_regions_of_implied_do().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ project_regions_along_parameters()

void project_regions_along_parameters ( list  l_reg,
list  l_param 
)

void project_regions_along_parameters(list l_reg, list l_param) input : a list of regions to project, and the list of variables along which the projection will be performed.

output : nothing. modifies : l_reg and the regions it contains. comment : project each region in l_reg along the variables in l_param

Parameters
l_reg_reg
l_param_param

Definition at line 337 of file old_projection.c.

338 {
339 
340  debug_on("REGIONS_OPERATORS_DEBUG_LEVEL");
342 
343  if (must_regions_p())
344  {
345  FOREACH(EFFECT, reg, l_reg) {
346  if(store_effect_p(reg))
348  }
349  }
350  else
351  {
352  FOREACH(EFFECT, reg, l_reg) {
353  if(store_effect_p(reg))
355  }
356  }
358  debug_off();
359 }
void region_non_exact_projection_along_parameters(region reg, list l_param)
void region_non_exact_projection_along_parameters(effect reg, list l_param) input : a region and a li...

References debug_off, debug_on, debug_regions_consistency, EFFECT, FOREACH, must_regions_p(), region_exact_projection_along_parameters(), region_non_exact_projection_along_parameters(), and store_effect_p().

Referenced by comp_regions_of_unstructured(), and regions_transformer_apply().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ project_regions_along_variables()

void project_regions_along_variables ( list  l_reg,
list  l_var 
)

void project_regions_along_variables(list l_reg, list l_param) input : a list of regions to project, and the list of variables along which the projection will be performed.

output : nothing. modifies : l_reg and the regions it contains. comment : project each region in l_reg along the variables in l_var

Parameters
l_reg_reg
l_var_var

Definition at line 307 of file old_projection.c.

308 {
309 
310  debug_on("REGIONS_OPERATORS_DEBUG_LEVEL");
312 
313  if (must_regions_p())
314  {
315  MAP(EFFECT, reg, {
317  }, l_reg);
318  }
319  else
320  {
321  MAP(EFFECT, reg, {
323  },l_reg);
324  }
326  debug_off();
327 }
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
Definition: newgen_list.h:226
void region_exact_projection_along_variables(effect reg, list l_var)
void region_exact_projection_along_variables(effect reg, list l_var) input : a region and a list of v...

References debug_off, debug_on, debug_regions_consistency, EFFECT, MAP, must_regions_p(), region_exact_projection_along_variables(), and region_non_exact_projection_along_variables().

Referenced by convex_cell_reference_preceding_p(), loop_basic_workchunk_to_workchunk(), region_remove_beta_variables(), region_remove_phi_variables(), region_remove_psi_variables(), and region_remove_rho_variables().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ project_regions_with_transformer()

void project_regions_with_transformer ( list  l_reg,
transformer  trans,
list  l_var_not_proj 
)
Parameters
l_reg_reg
transrans
l_var_not_proj_var_not_proj

Definition at line 364 of file old_projection.c.

366 {
367  regions_transformer_apply(l_reg, trans, l_var_not_proj, false);
368 }
void regions_transformer_apply(list l_reg, transformer trans, list l_var_not_proj, bool backward_p)
void regions_transformer_apply(l_reg, trans, l_var_not_proj) input : a list of regions,...

References regions_transformer_apply().

+ Here is the call graph for this function:

◆ project_regions_with_transformer_inverse()

void project_regions_with_transformer_inverse ( list  l_reg,
transformer  trans,
list  l_var_not_proj 
)
Parameters
l_reg_reg
transrans
l_var_not_proj_var_not_proj

Definition at line 370 of file old_projection.c.

372 {
373  regions_transformer_apply(l_reg, trans, l_var_not_proj, true);
374 }

References regions_transformer_apply().

+ Here is the call graph for this function:

◆ proper_regions_of_expression()

list proper_regions_of_expression ( expression  ,
transformer   
)

◆ proper_regions_of_expressions()

list proper_regions_of_expressions ( list  ,
transformer   
)

Referenced by formal_regions_backward_translation().

+ Here is the caller graph for this function:

◆ psi_entities_list()

list psi_entities_list ( int  ,
int   
)

Referenced by cell_reference_system_remove_psi_variables(), and region_remove_psi_variables().

+ Here is the caller graph for this function:

◆ psi_reference_p()

bool psi_reference_p ( reference  )

◆ psi_region_p()

bool psi_region_p ( effect  )

◆ psi_to_phi_region()

void psi_to_phi_region ( effect  )

Referenced by region_translation().

+ Here is the caller graph for this function:

◆ rectangular_must_region_p()

bool rectangular_must_region_p ( entity  ,
statement   
)

Referenced by subarray_shift_p().

+ Here is the caller graph for this function:

◆ rectangular_region_p()

bool rectangular_region_p ( effect  )

◆ reference_to_convex_region()

effect reference_to_convex_region ( reference  ,
action  ,
bool   
)

unary_operators.c

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the caller graph for this function:

◆ reference_whole_region()

◆ region_add_to_regions()

list region_add_to_regions ( effect  ,
list   
)

Referenced by comp_regions_of_implied_do(), and regions_dynamic_elim().

+ Here is the caller graph for this function:

◆ region_append()

effect region_append ( effect  ,
effect   
)

Referenced by c_convex_effects_on_formal_parameter_backward_translation().

+ Here is the caller graph for this function:

◆ region_consistent_p()

bool region_consistent_p ( effect  )

debug.c

◆ region_constraints_sort()

Pcontrainte region_constraints_sort ( Pcontrainte  ,
Pbase  ,
bool   
)

◆ region_dup()

◆ region_dynamic_var_elim()

void region_dynamic_var_elim ( effect  )

◆ region_entities_cfc_variables()

list region_entities_cfc_variables ( effect  ,
list   
)

◆ region_entities_intersection()

list region_entities_intersection ( effect  ,
effect   
)

◆ region_enumerate()

◆ region_exact_projection_along_parameters()

void region_exact_projection_along_parameters ( effect  ,
list   
)

◆ region_exact_projection_along_variable()

void region_exact_projection_along_variable ( effect  ,
entity   
)

Referenced by c_convex_effects_on_actual_parameter_forward_translation().

+ Here is the caller graph for this function:

◆ region_exact_projection_along_variables()

void region_exact_projection_along_variables ( effect  reg,
list  l_var 
)

void region_exact_projection_along_variables(effect reg, list l_var) input : a region and a list of variables.

output : nothing. modifies : the initial region is projected along the variables in l_param. its approximation is set to may if the projection is not exact. comment : overflow errors are trapped here. if it occurs, an empty region replaces the initial region.

Automatic variables read in a CATCH block need to be declared volatile as specified by the documentation

Parameters
regeg
l_var_var

Definition at line 1032 of file old_projection.c.

1033 {
1034  /* Automatic variables read in a CATCH block need to be declared volatile as
1035  * specified by the documentation */
1036  Psysteme volatile ps;
1037  ps = region_system(reg);
1038 
1039  if (!sc_empty_p(ps) && !sc_rn_p(ps))
1040  {
1041  ifdebug(6)
1042  {
1043  pips_debug(6, "initial region :\n");
1044  print_region(reg);
1045  debug(6, "", "variables along which the projection must be performed:\n");
1046  print_entities(l_var);
1047  }
1048 
1049  // if there is an overflow error, reg becomes a whole array may region
1051  {
1053  region_action(reg));
1054  cell c_tmp = region_cell(reg_tmp);
1055  pips_assert("region call must be a reference\n",
1056  cell_reference_p(c_tmp));
1057 
1058  region_system_(reg) = region_system_(reg_tmp);
1059  region_system_(reg_tmp) = newgen_Psysteme(SC_UNDEFINED);
1060  free_effect(reg_tmp);
1061  sc_rm(ps);
1063  }
1064  TRY {
1065  volatile list ll_var = l_var;
1066 
1067  for(; !ENDP(ll_var) &&
1069  ll_var = CDR(ll_var))
1070  {
1072  ENTITY(CAR(ll_var)));
1073  }
1074 
1075  if (!ENDP(ll_var))
1076  {
1078  }
1080  }
1081  }
1082 }
#define region_any_reference(reg)
To be avoided.
#define region_action(reg)
#define region_system_(reg)
#define region_cell(reg)
#define region_approximation_tag(reg)
effect reference_whole_region(reference, action)
bool op_statistics_p(void)
#define cell_reference_p(x)
Definition: effects.h:467
@ is_approximation_exact
Definition: effects.h:343
#define newgen_Psysteme(p)
Definition: effects.h:47
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
Definition: debug.c:189
#define print_region(x)
Definition: print.c:343
void print_entities(list l)
Definition: entity.c:167

References CAR, CATCH, CDR, cell_reference_p, debug(), ENDP, ENTITY, free_effect(), ifdebug, is_approximation_exact, nb_proj_var_ofl, newgen_Psysteme, op_statistics_p(), overflow_error, pips_assert, pips_debug, print_entities(), print_region, reference_whole_region(), region, region_action, region_any_reference, region_approximation_tag, region_cell, region_exact_projection_along_variable(), region_non_exact_projection_along_variables(), region_system, region_system_, sc_empty_p(), sc_rm(), sc_rn_p(), TRY, and UNCATCH.

Referenced by array_must_fully_written_by_regions_p(), and project_regions_along_variables().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ region_free()

void region_free ( effect  )

◆ region_inf_difference()

list region_inf_difference ( effect  ,
effect   
)

◆ region_intersection()

list region_intersection ( effect  ,
effect   
)

◆ region_may_union()

list region_may_union ( effect  ,
effect   
)

◆ region_must_union()

list region_must_union ( effect  ,
effect   
)

◆ region_non_exact_projection_along_parameters()

void region_non_exact_projection_along_parameters ( effect  ,
list   
)

◆ region_non_exact_projection_along_variables()

void region_non_exact_projection_along_variables ( effect  ,
list   
)

◆ region_phi_cfc_variables()

list region_phi_cfc_variables ( effect  )

Referenced by region_exact_projection_along_parameters(), and region_exact_projection_along_variable().

+ Here is the caller graph for this function:

◆ region_projection_along_index_safe_p()

bool region_projection_along_index_safe_p ( entity  ,
range   
)

◆ region_rectangular_hull()

effect region_rectangular_hull ( effect  ,
bool   
)

Referenced by effects_to_dma().

+ Here is the caller graph for this function:

◆ region_reference_to_expression()

expression region_reference_to_expression ( reference  )

Referenced by get_sizeofexpression_for_region().

+ Here is the caller graph for this function:

◆ region_remove_beta_variables()

void region_remove_beta_variables ( effect  )

Referenced by region_translation().

+ Here is the caller graph for this function:

◆ region_remove_phi_variables()

void region_remove_phi_variables ( effect  )

Referenced by region_translation().

+ Here is the caller graph for this function:

◆ region_remove_psi_variables()

void region_remove_psi_variables ( effect  )

Referenced by c_convex_effects_on_actual_parameter_forward_translation().

+ Here is the caller graph for this function:

◆ region_remove_rho_variables()

void region_remove_rho_variables ( effect  )

◆ region_sc_append()

void region_sc_append ( effect  ,
Psysteme  ,
bool   
)

◆ region_sc_append_and_normalize()

void region_sc_append_and_normalize ( effect  ,
Psysteme  ,
int   
)

◆ region_sc_normalize()

Psysteme region_sc_normalize ( Psysteme  ,
int   
)

◆ region_sc_projection_along_variables_ofl_ctrl()

void region_sc_projection_along_variables_ofl_ctrl ( Psysteme psc,
Pvecteur  pv,
int  ofl_ctrl 
)

void region_sc_projection_ofl_along_variables(Psysteme *psc, Pvecteur pv) input : a system of constraints, and a vector of variables.

output : a system of contraints, resulting of the successive projection of the initial system along each variable of pv. modifies : *psc. comment : it is very different from sc_projection_with_test_along_variables_ofl_ctrl. sc_empty is returned if the system is not feasible (BC). The base of *psc is updated. assert if one of the variable does not belong to the base. The case ofl_ctrl == OFL_CTRL is not handled, because the user may want an SC_UNDEFINED, or an sc_empty(sc->base) or an sc_rn(sc->base) as a result. It is not homogeneous. special implementation for regions: special choice for redudancy elimination. bc.

In case of big sc, we might consider a better order for the projection. Example: 2 phases of elimination (must-projection):

  • first: elimination of PHI variables: PHI3, PHI2, PHI1
  • then: elimination of PSI variables: PSI3, PSI2, PSI1 Ex: PHI3 (297 inequations), then PHI2 => explosion (21000) = PSI1 (1034) But PHI3(297 inequations), then PSI1 (191), then PHI2 => ok (1034) DN 21/1/03

The non_exact projection: if the projection excat fails, then return the modified sc, without variable in base.

ne devrait plus arriver !

Parameters
pscsc
pvv
ofl_ctrlfl_ctrl

Definition at line 1727 of file old_projection.c.

1731 {
1732  Pvecteur pv1;
1733  Pbase scbase = base_copy((*psc)->base);
1734 
1735  if (!VECTEUR_NUL_P(pv)) {
1736  for (pv1 = pv;!VECTEUR_NUL_P(pv1) && !SC_UNDEFINED_P(*psc); pv1=pv1->succ) {
1737 
1738  sc_projection_along_variable_ofl_ctrl(psc,vecteur_var(pv1), ofl_ctrl);
1739 
1740  /* In case of big sc, we might consider a better order for the projection.
1741  * Example: 2 phases of elimination (must-projection):
1742  * - first: elimination of PHI variables: PHI3, PHI2, PHI1
1743  * - then: elimination of PSI variables: PSI3, PSI2, PSI1
1744  * Ex: PHI3 (297 inequations), then PHI2 => explosion (21000) = PSI1 (1034)
1745  *But PHI3(297 inequations), then PSI1 (191), then PHI2 => ok (1034) DN 21/1/03
1746  *
1747  * The non_exact projection:
1748  * if the projection excat fails, then return the modified sc, without variable in base.
1749  */
1750 
1751  if (!SC_UNDEFINED_P(*psc)) {
1753  /* *psc = region_sc_normalize(*psc,2); */
1754  }
1755  }
1756  }
1757 
1758  if (SC_UNDEFINED_P(*psc)){ /* ne devrait plus arriver ! */
1759  *psc = sc_empty(scbase);
1760  for (pv1 = pv;!VECTEUR_NUL_P(pv1); pv1=pv1->succ) {
1762  }
1763  }
1764  else {
1765  base_rm(scbase);
1766  }
1767 
1768 }
Psysteme sc_empty(Pbase b)
Psysteme sc_empty(Pbase b): build a Psysteme with one unfeasible constraint to define the empty subsp...
Definition: sc_alloc.c:319
struct Svecteur * succ
Definition: vecteur-local.h:92
#define vecteur_var(v)
#define VECTEUR_NUL_P(v)
#define base_rm(b)
Pbase base_copy(Pbase b)
Direct duplication.
Definition: alloc.c:300

References base_copy(), base_rm, sc_base_remove_variable(), sc_empty(), Svecteur::succ, VECTEUR_NUL_P, and vecteur_var.

Referenced by region_sc_projection_ofl_along_parameters(), and sc_projection_ofl_along_list_of_variables().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ region_sc_sort()

void region_sc_sort ( Psysteme  ,
Pbase   
)

Referenced by text_region_no_action().

+ Here is the caller graph for this function:

◆ region_sc_to_string()

string region_sc_to_string ( string  ,
Psysteme   
)

prettyprint.c

◆ region_sorted_base_dup()

Pbase region_sorted_base_dup ( effect  )

Referenced by text_region_no_action().

+ Here is the caller graph for this function:

◆ region_sup_difference()

list region_sup_difference ( effect  ,
effect   
)

◆ region_to_list()

list region_to_list ( effect  )

Referenced by region_inf_difference(), region_intersection(), region_sup_difference(), region_union(), and RegionsMustUnion().

+ Here is the caller graph for this function:

◆ region_to_may_region_list()

list region_to_may_region_list ( effect  )

Referenced by region_sup_difference(), and RegionsMayUnion().

+ Here is the caller graph for this function:

◆ region_to_nil_list()

list region_to_nil_list ( effect  )

◆ region_to_store_independent_region_list()

list region_to_store_independent_region_list ( effect  ,
bool   
)

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the caller graph for this function:

◆ region_to_string()

string region_to_string ( effect  )

Referenced by common_region_translation().

+ Here is the caller graph for this function:

◆ region_translation()

effect region_translation ( effect  ,
entity  ,
reference  ,
entity  ,
entity  ,
reference  ,
Value  ,
bool   
)

◆ region_translation_init()

void region_translation_init ( entity  ent_1,
reference  rf_1,
entity  ent_2,
reference  rf_2,
Value  offset_1_m_2 
)

relative sizes of elements

Parameters
ent_1nt_1
rf_1f_1
ent_2nt_2
rf_2f_2
offset_1_m_2ffset_1_m_2

Definition at line 362 of file translation.c.

365 {
366  array_1 = ent_1;
367  array_2 = ent_2;
368  ref_1 = rf_1;
369  ref_2 = rf_2;
370  reference_p =
372  offset = offset_1_m_2;
373 
376 
378 
383 
384  ifdebug(2)
385  {
386  pips_debug(2,"before conversion:\n");
387  fprint_string_Value(stderr, "size_elt_1 = ", size_elt_1);
388  fprint_string_Value(stderr, ", size_elt_2 = ", size_elt_2);
389  fprintf(stderr, "\n");
390  if(!reference_p)
391  fprint_string_Value(stderr, "offset =", offset),
392  fprintf(stderr, "\n");
393  }
394  /* relative sizes of elements */
397  {
402  }
403  else
406  {
410  if (statistics_p)
411  {
414  else if (value_eq(size_elt_1, VALUE_CONST(2)))
416  else if (value_eq(size_elt_1, VALUE_CONST(4)))
418  }
419  }
420  else
423  {
427  if (statistics_p)
428  {
431  else if (value_eq(size_elt_2, VALUE_CONST(2)))
433  else if (value_eq(size_elt_2, VALUE_CONST(4)))
435  }
436  }
437 
439 
440 
441  ifdebug(2)
442  {
443  pips_debug(2,"after conversion:\n");
444  fprint_string_Value(stderr, "size_elt_1 = ", size_elt_1);
445  fprint_string_Value(stderr, ", size_elt_2 = ", size_elt_2);
446  fprintf(stderr, "\n");
447  if(!reference_p)
448  fprint_string_Value(stderr, "offset =", offset),
449  fprintf(stderr, "\n");
450  }
451 
454 
455 }
#define int_to_value(i)
end LINEAR_VALUE_IS_INT
#define VALUE_CONST(val)
#define value_zero_p(val)
#define value_eq(v1, v2)
bool operators on values
#define value_division(ref, val)
#define value_mod(v1, v2)
void fprint_string_Value(FILE *, char *, Value)
Definition: io.c:47
static int mat_dim_stat[8][8]
inputs
Definition: translation.c:104
static bool dim_2_assumed
Definition: translation.c:287
static reference ref_1
Definition: translation.c:281
static int zero_offset_stat
size ratio after normalization
Definition: translation.c:107
static bool reference_p
Definition: translation.c:282
static int vect_size_ratio_stat[4]
correspondances between source and target array number of dimensions
Definition: translation.c:106
static Value size_elt_1
Definition: translation.c:285
static bool dim_1_assumed
Definition: translation.c:287
static reference ref_2
Definition: translation.c:281
static entity array_2
Definition: translation.c:280
static entity array_1
Local variables and functions to avoid multiple computations
Definition: translation.c:280
static int dim_1
Definition: translation.c:284
static dimension dims_2[NB_MAX_ARRAY_DIM]
Definition: translation.c:286
static Value size_elt_2
Definition: translation.c:285
static bool dims_array_init(entity array, dimension *dims, int dim_array)
Definition: translation.c:289
static dimension dims_1[NB_MAX_ARRAY_DIM]
Definition: translation.c:286
static int dim_2
Definition: translation.c:284
static bool statistics_p
STATISTICS
Definition: translation.c:101
static Value offset
Definition: translation.c:283
_int SizeOfElements(basic)
This function returns the length in bytes of the Fortran or C type represented by a basic,...
Definition: size.c:297
int NumberOfDimension(entity)
Definition: size.c:588
#define reference_undefined_p(x)
Definition: ri.h:2303
#define variable_basic(x)
Definition: ri.h:3120

References array_1, array_2, dim_1, dim_1_assumed, dim_2, dim_2_assumed, dims_1, dims_2, dims_array_init(), entity_type, fprint_string_Value(), fprintf(), ifdebug, int_to_value, mat_dim_stat, NumberOfDimension(), offset, pips_debug, ref_1, ref_2, reference_p, reference_undefined_p, size_elt_1, size_elt_2, SizeOfElements(), statistics_p, type_variable, VALUE_CONST, value_division, value_eq, value_mod, VALUE_ONE, value_zero_p, variable_basic, vect_size_ratio_stat, and zero_offset_stat.

Referenced by region_translation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ region_translation_statistics_close()

void region_translation_statistics_close ( const char *  mod_name,
const char *  prefix 
)

inputs

other ratios

translation

Parameters
mod_nameod_name
prefixrefix

Definition at line 212 of file translation.c.

213 {
214  FILE *fp;
215  string filename;
216  int i,j,total;
217 
218  if (!statistics_p) return;
219 
220  filename = "inter_trans_stat";
222  mod_name, ".", prefix, "_", filename, 0));
223 
224  fp = safe_fopen(filename, "w");
225  fprintf(fp,"%s", mod_name);
226 
227  /* inputs */
230 
231  for (i=0; i<8; i++)
232  for (j=0; j<8; j++)
233  fprintf(fp, " %d", mat_dim_stat[i][j]);
234 
235  for (i=0; i<4; i++)
236  fprintf(fp, " %d", vect_size_ratio_stat[i]);
237 
238  /* other ratios */
239  for (total = 0, i=0; i<4; i++)
240  total = total + vect_size_ratio_stat[i];
241  fprintf(fp, " %d", scalar_to_array_stat + array_to_array_stat - total);
242 
243  /* translation */
244  fprintf(fp, " %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d",
249 
254 
258 
262 
266 
270 
271  fprintf(fp,"\n");
272  safe_fclose(fp, filename);
273  free(filename);
274 }
static struct Common_Dimension_Stat common_dimension_stat
static struct Remaining_Dimension_Stat remaining_dimension_stat
static struct Phi_Elimination_Stat phi_elimination_stat
static struct Predicate_Translation predicate_translation_stat
static int scalar_to_scalar_stat
number cases in which the offset is nul
Definition: translation.c:109
static int scalar_to_array_stat
Definition: translation.c:110
static struct Linearization_Stat linearization_stat
static struct Beta_Elimination_Stat beta_elimination_stat
static int array_to_array_stat
Definition: translation.c:111

References Common_Dimension_Stat::all_similar, array_to_array_stat, beta_elimination_stat, common_dimension_stat, concatenate(), db_get_current_workspace_directory(), Linearization_Stat::exact, Remaining_Dimension_Stat::exact, Beta_Elimination_Stat::exact, Phi_Elimination_Stat::exact, Predicate_Translation::exact, Beta_Elimination_Stat::exact_input, Phi_Elimination_Stat::exact_input, Predicate_Translation::exact_input, fprintf(), free(), linearization_stat, mat_dim_stat, Remaining_Dimension_Stat::nb, Common_Dimension_Stat::nb_calls, Linearization_Stat::nb_calls, Beta_Elimination_Stat::nb_calls, Phi_Elimination_Stat::nb_calls, Predicate_Translation::nb_calls, Common_Dimension_Stat::non_linear_decl, Linearization_Stat::non_linear_decl, Remaining_Dimension_Stat::non_linear_decl_or_offset, Linearization_Stat::non_linear_system, Common_Dimension_Stat::not_same_decl, phi_elimination_stat, predicate_translation_stat, prefix, remaining_dimension_stat, safe_fclose(), safe_fopen(), scalar_to_array_stat, scalar_to_scalar_stat, statistics_p, strdup(), vect_size_ratio_stat, and zero_offset_stat.

Referenced by reset_convex_rw_regions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ region_translation_statistics_init()

void region_translation_statistics_init ( bool  stat_p)

translation.c

translation.c

Parameters
stat_ptat_p

Definition at line 162 of file translation.c.

163 {
164  int i,j;
165 
166  statistics_p = stat_p;
167 
168  if (!statistics_p)
169  return;
170 
171  for (i=0; i<8; i++)
172  for (j=0; j<8; j++)
173  mat_dim_stat[i][j] = 0;
174 
175  for (i=0; i<4; i++)
176  vect_size_ratio_stat[i] = 0;
177 
178  zero_offset_stat = 0;
182 
187 
192 
196 
200 
204 
208 
209 }

References Common_Dimension_Stat::all_similar, array_to_array_stat, beta_elimination_stat, common_dimension_stat, Linearization_Stat::exact, Remaining_Dimension_Stat::exact, Beta_Elimination_Stat::exact, Phi_Elimination_Stat::exact, Predicate_Translation::exact, Beta_Elimination_Stat::exact_input, Phi_Elimination_Stat::exact_input, Predicate_Translation::exact_input, linearization_stat, mat_dim_stat, Remaining_Dimension_Stat::nb, Common_Dimension_Stat::nb_calls, Linearization_Stat::nb_calls, Beta_Elimination_Stat::nb_calls, Phi_Elimination_Stat::nb_calls, Predicate_Translation::nb_calls, Common_Dimension_Stat::non_linear_decl, Linearization_Stat::non_linear_decl, Remaining_Dimension_Stat::non_linear_decl_or_offset, Linearization_Stat::non_linear_system, Common_Dimension_Stat::not_same_decl, phi_elimination_stat, predicate_translation_stat, remaining_dimension_stat, scalar_to_array_stat, scalar_to_scalar_stat, statistics_p, vect_size_ratio_stat, and zero_offset_stat.

Referenced by init_convex_rw_regions().

+ Here is the caller graph for this function:

◆ region_union()

list region_union ( effect  ,
effect  ,
bool   
)

◆ region_value_substitute()

void region_value_substitute ( effect  ,
entity  ,
entity   
)

◆ regions_add_context()

list regions_add_context ( list  ,
transformer   
)

Referenced by regions_backward_translation().

+ Here is the caller graph for this function:

◆ regions_add_region()

list regions_add_region ( list  ,
effect   
)

Referenced by formal_regions_backward_translation().

+ Here is the caller graph for this function:

◆ regions_backward_translation()

list regions_backward_translation ( entity  func,
list  real_args,
list  func_regions,
transformer  context,
bool  proper 
)

list regions_backward_tranlation(entity func, list real_args, list func_regions, transformer context) input : an external function func, and the list of real arguments used in the calling function.

output : the corresponding list of regions, at call site. modifies : nothing. comment : The effects of "func" are computed into externals effects, ie. ‘translated’. The translation is made in two phases : _ regions on formal parameters _ regions on common parameters

Compute the regions on formal variables.

Compute the regions on common variables (static & global variables).

FI: add local precondition (7 December 1992)

Parameters
funcunc
real_argseal_args
func_regionsunc_regions
contextontext
properroper

Definition at line 341 of file interprocedural.c.

344 {
345  list le = NIL;
346  list tce, tfe;
347 
348  ifdebug(4)
349  {
350  pips_debug(4,"Initial regions\n");
351  print_regions(func_regions);
352  }
353 
356 
357  /* Compute the regions on formal variables. */
358  tfe = formal_regions_backward_translation(func,real_args,func_regions,context);
359 
360  /* Compute the regions on common variables (static & global variables). */
361  tce = common_regions_backward_translation(func, func_regions);
362 
363  if (proper)
364  le = gen_nconc(tce,tfe);
365  else
366  le = RegionsMustUnion(tce, tfe, effects_same_action_p);
367 
368  /* FI: add local precondition (7 December 1992) */
369  le = regions_add_context(le, context);
370 
371  ifdebug(4)
372  {
373  pips_debug(4, " Translated_regions :\n");
374  print_regions(le);
375  }
376 
379  return(le);
380 }
static list common_regions_backward_translation(entity func, list func_regions)
static list formal_regions_backward_translation(entity func, list real_args, list func_regions, transformer context)
static list formal_regions_backward_translation(entity func, list real_args, func_regions,...
list regions_add_context(list, transformer)

References common_regions_backward_translation(), effects_same_action_p(), formal_regions_backward_translation(), gen_nconc(), ifdebug, NIL, pips_debug, print_regions(), regions_add_context(), RegionsMustUnion(), reset_arguments_to_eliminate(), reset_translation_context_sc(), set_backward_arguments_to_eliminate(), and set_interprocedural_translation_context_sc().

Referenced by convex_regions_backward_translation(), in_regions_of_external(), and regions_of_external().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ regions_consistent_p()

bool regions_consistent_p ( list  l_reg)
Parameters
l_reg_reg

Definition at line 116 of file debug.c.

117 {
118  bool consistent = true;
119  MAP(EFFECT, reg,
120  consistent = consistent && region_consistent_p(reg),l_reg);
121  return consistent;
122 }
bool region_consistent_p(region reg)
Definition: debug.c:50

References EFFECT, MAP, and region_consistent_p().

+ Here is the call graph for this function:

◆ regions_dup()

◆ regions_dynamic_elim()

list regions_dynamic_elim ( list  l_reg)

list regions_dynamic_elim(list l_reg) input : a list of regions.

output : a list of regions in which regions of dynamic variables are removed, and in which dynamic integer scalar variables are eliminated from the predicate. modifies : nothing; the regions l_reg initially contains are copied if necessary. comment :

If the reference is a common variable (ie. with storage ram but not dynamic) or a formal parameter, the region is not ignored.

| heap_area_p(ram_section(r))

pips_internal_error("bad tag for %s (rom)", entity_name(reg_ent));

Eliminate dynamic variables.

Parameters
l_reg_reg

Definition at line 531 of file old_projection.c.

532 {
533  list l_res = NIL;
534 
535  debug_on("REGIONS_OPERATORS_DEBUG_LEVEL");
537 
538  FOREACH(EFFECT, reg, l_reg)
539  {
540  if(store_effect_p(reg)) {
541  entity reg_ent = region_entity(reg);
542  storage reg_s = entity_storage(reg_ent);
543  bool ignore_this_region = false;
544 
545  ifdebug(4)
546  {
547  pips_debug_effect(4, "current region: \n", reg);
548  }
549 
550  /* If the reference is a common variable (ie. with storage ram but
551  * not dynamic) or a formal parameter, the region is not ignored.
552  */
553  if(!anywhere_effect_p(reg)) {
554  switch (storage_tag(reg_s))
555  {
556  case is_storage_return:
557  pips_debug(5, "return var ignored (%s)\n", entity_name(reg_ent));
558  ignore_this_region = true;
559  break;
560  case is_storage_ram:
561  {
562  ram r = storage_ram(reg_s);
563  // FI: why ignore regions that are likely to be accessible
564  // via pointers?
565  if (dynamic_area_p(ram_section(r)) /*|| heap_area_p(ram_section(r))*/
566  || stack_area_p(ram_section(r)))
567  {
568  pips_debug(5, "dynamic or pointed var ignored (%s)\n", entity_name(reg_ent));
569  ignore_this_region = true;
570  }
571  break;
572  }
573  case is_storage_formal:
574  break;
575  case is_storage_rom:
576  if(!entity_special_area_p(reg_ent) && !anywhere_effect_p(reg))
577  ignore_this_region = true;
578  break;
579  /* pips_internal_error("bad tag for %s (rom)", entity_name(reg_ent)); */
580  default:
581  pips_internal_error("case default reached");
582  }
583  }
584 
585  if (! ignore_this_region) /* Eliminate dynamic variables. */
586  {
587  region r_res = region_dup(reg);
589  ifdebug(4)
590  {
591  pips_debug_effect(4, "region kept : \n", r_res);
592  }
593  l_res = region_add_to_regions(r_res,l_res);
594  }
595  else
596  ifdebug(4)
597  {
598  pips_debug_effect(4, "region removed : \n", reg);
599  }
600  }
601  }
603  debug_off();
604 
605  return(l_res);
606 }
#define region_entity(reg)
list region_add_to_regions(effect, list)
effect region_dup(effect)
void region_dynamic_var_elim(region reg)
void region_dynamic_var_elim(effect reg) input : a region .
bool dynamic_area_p(entity aire)
Definition: area.c:68
bool stack_area_p(entity aire)
Definition: area.c:104
bool entity_special_area_p(entity e)
Definition: area.c:154
#define storage_tag(x)
Definition: ri.h:2515
#define entity_storage(x)
Definition: ri.h:2794
#define ram_section(x)
Definition: ri.h:2249
@ is_storage_rom
Definition: ri.h:2494
@ is_storage_return
Definition: ri.h:2491
@ is_storage_ram
Definition: ri.h:2492
@ is_storage_formal
Definition: ri.h:2493
#define storage_ram(x)
Definition: ri.h:2521

References anywhere_effect_p(), debug_off, debug_on, debug_regions_consistency, dynamic_area_p(), EFFECT, entity_name, entity_special_area_p(), entity_storage, FOREACH, ifdebug, is_storage_formal, is_storage_ram, is_storage_return, is_storage_rom, NIL, pips_debug, pips_debug_effect, pips_internal_error, ram_section, region, region_add_to_regions(), region_dup(), region_dynamic_var_elim(), region_entity, stack_area_p(), storage_ram, storage_tag, and store_effect_p().

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ regions_end()

◆ regions_forward_translation()

list regions_forward_translation ( entity  func,
list  real_args,
list  l_reg,
transformer  context 
)

list regions_forward_translation(entity func, list real_args, l_reg, transformer context input : the called function func, the real arguments of the call, the list of regions to translate, and the context of the call.

output : the translated list of regions : real arguments are translated into formal arguments, and common variables of the caller into common variables of the callee. modifies : nothing. comment :

Parameters
funcunc
real_argseal_args
l_reg_reg
contextontext

Definition at line 980 of file interprocedural.c.

984 {
985  list l_t_reg = NIL;
986  list l_form_reg, l_common_reg;
987 
988  ifdebug(3)
989  {
990  pips_debug(3,"initial regions :\n");
991  print_regions(l_reg);
992  }
993 
996 
998  (func, real_args, l_reg, context);
999  l_common_reg = common_regions_forward_translation(func, l_reg);
1000  l_t_reg = RegionsMustUnion
1001  (l_form_reg, l_common_reg, effects_same_action_p);
1002 
1003  ifdebug(3)
1004  {
1005  pips_debug(3,"final regions : \n");
1006  print_regions(l_t_reg);
1007  }
1008 
1011  return l_t_reg;
1012 }
static list real_regions_forward_translation(entity func, list real_args, list l_reg, transformer context)
static list real_regions_forward_translation(entity func, list real_args, l_reg, transformer context)...
static list common_regions_forward_translation(entity func, list real_regions)
static list common_regions_forward_translation (entity func, list real_regions) input : the called fu...

References common_regions_forward_translation(), effects_same_action_p(), ifdebug, NIL, pips_debug, print_regions(), real_regions_forward_translation(), RegionsMustUnion(), reset_arguments_to_eliminate(), reset_translation_context_sc(), set_forward_arguments_to_eliminate(), and set_interprocedural_translation_context_sc().

Referenced by convex_regions_forward_translation(), and out_regions_from_call_site_to_callee().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ regions_free()

void regions_free ( list  )

Referenced by real_regions_forward_translation(), xml_data(), and xml_Task().

+ Here is the caller graph for this function:

◆ regions_init()

◆ regions_must_convex_hull()

effect regions_must_convex_hull ( effect  ,
effect   
)

◆ regions_of_expression()

list regions_of_expression ( expression  ,
transformer   
)

Referenced by real_regions_forward_translation().

+ Here is the caller graph for this function:

◆ regions_of_external()

list regions_of_external ( entity  func,
list  real_args,
transformer  context,
bool  proper 
)

list regions_of_external(entity func, list real_args, transformer context) input : an external function func, and the list of real arguments used in the calling function.

output : the corresponding list of regions, at call site. modifies : nothing. comment : The effects of "func" are computed into externals effects, ie. ‘translated’. The translation is made in two phases : _ regions on formal parameters _ regions on common parameters

Get the regions of "func".

translate them

Parameters
funcunc
real_argseal_args
contextontext
properroper

Definition at line 271 of file interprocedural.c.

273 {
274  list le = NIL;
275  const char *func_name = module_local_name(func);
276 
277  pips_debug(4, "translation regions for %s\n", func_name);
278 
279  if (! entity_module_p(func))
280  {
281  pips_internal_error("%s: bad function", func_name);
282  }
283  else
284  {
285  list func_regions;
286 
287  /* Get the regions of "func". */
288  func_regions = effects_to_list((effects)
289  db_get_memory_resource(DBR_SUMMARY_REGIONS, func_name, true));
290  /* translate them */
291  le = regions_backward_translation(func, real_args, func_regions, context,
292  proper);
293  }
294  return le;
295 }

References db_get_memory_resource(), effects_to_list(), entity_module_p(), module_local_name(), NIL, pips_debug, pips_internal_error, and regions_backward_translation().

+ Here is the call graph for this function:

◆ regions_read_regions()

◆ regions_remove_phi_variables()

void regions_remove_phi_variables ( list  l_reg)

void regions_remove_phi_variables(list l_reg) input : a list of regions, and an integer, which is the highest rank of phi variables that will be kept.

output : nothing. modifies : project regions in l_reg along the phi variables which rank are higher (>) than phi_max. comment : An assumption is made : the projection is exact and the approximation are thus preserved, except if an overflow error occurs. This function is only used in the case of a forward interprocedural propagation : the assumption is then always true.

Parameters
l_reg_reg

Definition at line 508 of file old_projection.c.

509 {
510  debug_on("REGIONS_OPERATORS_DEBUG_LEVEL");
512 
513  FOREACH(EFFECT, reg, l_reg)
515 
517 
518  debug_off();
519 }
void region_remove_phi_variables(region reg)
void region_remove_phi_variables(effect reg, int phi_max) input : a PSI region in which phi variables...

References debug_off, debug_on, debug_regions_consistency, EFFECT, FOREACH, and region_remove_phi_variables().

+ Here is the call graph for this function:

◆ regions_remove_variables_regions()

list regions_remove_variables_regions ( list  ,
list   
)

◆ regions_sc_append()

list regions_sc_append ( list  ,
Psysteme  ,
bool  ,
bool  ,
bool   
)

◆ regions_sc_append_and_normalize()

list regions_sc_append_and_normalize ( list  ,
Psysteme  ,
bool  ,
bool  ,
int   
)

◆ regions_to_nil_list()

list regions_to_nil_list ( effect  ,
effect   
)

Referenced by RegionsEntitiesInfDifference().

+ Here is the caller graph for this function:

◆ regions_to_write_regions()

list regions_to_write_regions ( list  )

◆ regions_transformer_apply()

void regions_transformer_apply ( list  l_reg,
transformer  trans,
list  l_var_not_proj,
bool  backward_p 
)

void regions_transformer_apply(l_reg, trans, l_var_not_proj) input : a list of regions, the transformer corresponding to the current statement, and a list of variables along which the regions must not be projected (typically a loop index).

output : nothing. modifies : l_reg and the regions it contains comment : project each region in l_reg along the variables in the arguments of trans which are not in l_var_not_proj, using the algorithm described in document E/185/CRI.

addition of the predicate of the transformer to the predicate of the regions and elimination of redundances; then, projection of regions along initial variables, and renaming of old variables corresponding to the eliminated variables into new variables.

first we store the names of the old and int variables

addition of the predicate of the transformer, and elimination of redundances

projection along intermediate variables

remove potential old values that may be found in transformer

no memory leaks

Parameters
l_reg_reg
transrans
l_var_not_proj_var_not_proj
backward_packward_p

Definition at line 386 of file old_projection.c.

388 {
389  list l_var = arguments_difference(transformer_arguments(trans), l_var_not_proj);
390 
391  if (ENDP(l_var) || ENDP(l_reg))
392  return;
393 
394  debug_on("REGIONS_OPERATORS_DEBUG_LEVEL");
396 
397  ifdebug(3)
398  {
399  pips_debug_effects(3, "regions before transformation:\n", l_reg);
400  pips_debug(3, "elimination of variables: \n");
401  print_entities(l_var);
402  }
403 
404  if (!must_regions_p())
405  {
406  project_regions_along_parameters(l_reg, l_var);
407  }
408  else
409  {
410  list l_int, l_old;
412 
413  ifdebug(8)
414  {
415  fprintf(stderr,"transformer:\n");
417  }
418 
419  /* addition of the predicate of the transformer to the predicate of
420  * the regions and elimination of redundances; then, projection of
421  * regions along initial variables, and renaming of old variables
422  * corresponding to the eliminated variables into new variables. */
423 
424  /* first we store the names of the old and int variables */
425  l_old = variables_to_old_variables(l_var);
426  l_int = variables_to_int_variables(l_var);
427 
428  if(backward_p)
429  {
430  sc_list_variables_rename(sc_trans, l_var, l_int);
431  sc_list_variables_rename(sc_trans, l_old, l_var);
432  }
433  else
434  {
435  sc_list_variables_rename(sc_trans, l_old, l_int);
436  }
437 
438  FOREACH(EFFECT, reg, l_reg)
439  {
440  if(store_effect_p(reg))
441  {
442  Psysteme sc_reg = region_system(reg);
443 
444  if (!SC_UNDEFINED_P(sc_reg) && !sc_empty_p(sc_reg) && !sc_rn_p(sc_reg))
445  {
447 
448  pips_debug_effect(8, "region before transformation: \n", reg);
449 
450  sc_list_variables_rename(sc_reg, l_var, l_int);
451  pips_debug_effect(8, "region after renaming: \n", reg);
452 
453  /* addition of the predicate of the transformer,
454  and elimination of redundances */
455  region_sc_append_and_normalize(reg, sc_trans, 1);
456 
458 
459  pips_debug_effect(8, "region after addition of the transformer: ", reg);
460 
461  /* projection along intermediate variables */
464  pips_debug_effect(8, "region after projection along parameters: \n", reg );
465 
466  /* remove potential old values that may be found in transformer */
467  list l_old_values = NIL;
468  sc_reg = region_system(reg);
469  for(Pbase b = sc_base(sc_reg); !BASE_NULLE_P(b); b = vecteur_succ(b)) {
470  entity e = (entity) vecteur_var(b);
471  if(local_old_value_entity_p(e)) {
472  l_old_values = CONS(ENTITY, e, l_old_values);
473  }
474  }
475  region_exact_projection_along_parameters(reg, l_old_values);
476  gen_free_list(l_old_values);
478  pips_debug_effect(8, "region after transformation: \n", reg );
479  }
480  }
481  }
482 
483  /* no memory leaks */
484  gen_free_list(l_int);
485  gen_free_list(l_old);
486  sc_rm(sc_trans);
487  }
488 
489  pips_debug_effects(3, "regions after transformation:\n", l_reg);
490 
491  gen_free_list(l_var);
493  debug_off();
494 }
struct _newgen_struct_entity_ * entity
Definition: abc_private.h:14
cons * arguments_difference(cons *a1, cons *a2)
set difference: a1 - a2 ; similar to set intersection
Definition: arguments.c:233
#define debug_region_consistency(reg)
Psysteme sc_list_variables_rename(Psysteme, list, list)
list variables_to_int_variables(list)
list variables_to_old_variables(list)
void project_regions_along_parameters(list l_reg, list l_param)
void project_regions_along_parameters(list l_reg, list l_param) input : a list of regions to project,...
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...
Definition: entity.c:453
#define transformer_arguments(x)
Definition: ri.h:2871
void sc_print(Psysteme ps, get_variable_name_t nom_var)
void sc_print()
Definition: sc_io.c:194
bool local_old_value_entity_p(entity)
Return true if an entity is a local old value (such as "o#0" for a global value "i#init"....
Definition: value.c:642
char *(* get_variable_name_t)(Variable)
Definition: vecteur-local.h:62
#define vecteur_succ(v)
#define BASE_NULLE_P(b)

References arguments_difference(), BASE_NULLE_P, CONS, debug_off, debug_on, debug_region_consistency, debug_regions_consistency, EFFECT, ENDP, ENTITY, entity_local_name(), FOREACH, fprintf(), gen_free_list(), ifdebug, local_old_value_entity_p(), must_regions_p(), NIL, pips_debug, pips_debug_effect, pips_debug_effects, predicate_system, print_entities(), project_regions_along_parameters(), region_exact_projection_along_parameters(), region_sc_append_and_normalize(), region_system, sc_dup(), sc_empty_p(), sc_list_variables_rename(), sc_print(), sc_rm(), sc_rn_p(), store_effect_p(), transformer_arguments, transformer_relation, variables_to_int_variables(), variables_to_old_variables(), vecteur_succ, and vecteur_var.

Referenced by project_regions_with_transformer(), and project_regions_with_transformer_inverse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ regions_write_regions()

◆ RegionsEntitiesInfDifference()

list RegionsEntitiesInfDifference ( list  l1,
list  l2,
bool(*)(effect, effect difference_combinable_p 
)

list RegionsEntitiesInfDifference(list l1, l2) input : two lists of regions output : a list of regions, such that: if there is a region R concerning entity A in l1 and in l2, then R is removed from the result; if there is a region R concerning array A in l1, but not in l2, then it is kept in l1, and in the result.

modifies : the regions of l2 may be freed. comment : we keep the regions of l1 that are not combinable with those of l2, but we don't keep the regions of l2 that are not combinable with those of l_reg1.

l_res = list_of_effects_generic_binary_op(l1, l2, difference_combinable_p, regions_to_nil_list, region_to_list, region_to_nil_list);

Parameters
l11
l22

Definition at line 366 of file binary_operators.c.

369 {
370  list l_res = NIL;
371 
372  debug(3, "RegionsEntitiesInfDifference", "begin\n");
373  /* l_res = list_of_effects_generic_binary_op(l1, l2,
374  difference_combinable_p,
375  regions_to_nil_list,
376  region_to_list,
377  region_to_nil_list);*/
379  difference_combinable_p,
381  debug(3, "RegionsEntitiesInfDifference", "end\n");
382 
383  return l_res;
384 }
list regions_to_nil_list(effect, effect)
list list_of_effects_generic_cells_inf_difference_op(list, list, bool(*)(effect, effect), list(*)(effect, effect))

References debug(), list_of_effects_generic_cells_inf_difference_op(), NIL, and regions_to_nil_list().

Referenced by internal_compute_distribution_context().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RegionsEntitiesIntersection()

list RegionsEntitiesIntersection ( list  l1,
list  l2,
bool(*)(effect, effect intersection_combinable_p 
)

list RegionsEntitiesIntersection(list l1,l2, bool (*intersection_combinable_p)(effect, effect)) input : two lists of regions output : a list of regions containing all the regions of l1 that have a corresponding region (i.e.

same entity) in l2. modifies : l1 and l2. comment :

l_res = list_of_effects_generic_binary_op(l1, l2, intersection_combinable_p, region_entities_intersection, region_to_nil_list, region_to_nil_list);

Parameters
l11
l22

Definition at line 275 of file binary_operators.c.

277 {
278  list l_res = NIL;
279 
280  pips_debug(3, "begin\n");
281  /* l_res = list_of_effects_generic_binary_op(l1, l2,
282  intersection_combinable_p,
283  region_entities_intersection,
284  region_to_nil_list,
285  region_to_nil_list); */
286 
288  intersection_combinable_p,
290  pips_debug(3, "end\n");
291 
292  return l_res;
293 }
list region_entities_intersection(region r1, region r2)
list region_entities_intersection(region reg1, reg2) input : two regions output : a mere copy of the ...
list list_of_effects_generic_cells_intersection_op(list, list, bool(*)(effect, effect), list(*)(effect, effect))

References list_of_effects_generic_cells_intersection_op(), NIL, pips_debug, and region_entities_intersection().

+ Here is the call graph for this function:

◆ RegionsInfDifference()

list RegionsInfDifference ( list  l1,
list  l2,
bool(*)(effect, effect difference_combinable_p 
)

list RegionsInfDifference(list l1, l2) input : two lists of regions output : a list of region, representing the inf_difference of the initial regions.

modifies : the regions of l2 may be freed. comment : we keep the regions of l1 that are not combinable with those of l2, but we don't keep the regions of l2 that are not combinable with those of l_reg1.

l_res = list_of_effects_generic_binary_op(l1, l2, difference_combinable_p, region_inf_difference, region_to_list, region_to_nil_list);

Parameters
l11
l22

Definition at line 334 of file binary_operators.c.

336 {
337  list l_res = NIL;
338 
339  debug(3, "RegionsInfDifference", "begin\n");
340  /* l_res = list_of_effects_generic_binary_op(l1, l2,
341  difference_combinable_p,
342  region_inf_difference,
343  region_to_list,
344  region_to_nil_list); */
346  difference_combinable_p,
348  debug(3, "RegionsInfDifference", "end\n");
349 
350  return l_res;
351 }
list region_inf_difference(region reg1, region reg2)
list region_inf_difference(region reg1, reg2) input : two regions output : a list of regions containi...
list list_of_effects_generic_inf_difference_op(list, list, bool(*)(effect, effect), list(*)(effect, effect))

References debug(), list_of_effects_generic_inf_difference_op(), NIL, and region_inf_difference().

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RegionsIntersection()

list RegionsIntersection ( list  l1,
list  l2,
bool(*)(effect, effect intersection_combinable_p 
)

list RegionsIntersection(list l1,l2, bool (*intersection_combinable_p)(effect, effect)) input : output : modifies : comment :

Parameters
l11
l22

Definition at line 250 of file binary_operators.c.

252 {
253  list l_res = NIL;
254 
255  debug(3, "RegionsIntersection", "begin\n");
257  intersection_combinable_p,
259 
260 
261  debug(3, "RegionsIntersection", "end\n");
262 
263  return l_res;
264 }
list list_of_effects_generic_intersection_op(list, list, bool(*)(effect, effect), list(*)(effect, effect))

References debug(), list_of_effects_generic_intersection_op(), NIL, and region_intersection().

Referenced by compute_send_regions(), edge_cost(), edge_cost_polynome(), real_regions_forward_translation(), set_methods_for_convex_effects(), set_methods_for_convex_rw_pointer_effects(), test_dependence_using_regions(), and transfer_regions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RegionsMayUnion()

list RegionsMayUnion ( list  l1,
list  l2,
bool(*)(effect, effect union_combinable_p 
)

list RegionsMayUnion(list l1, list l2, union_combinable_p) input : two lists of regions output : a list of regions, may union of the two initial lists modifies : l1 and l2 and their regions.

Regions that are not reused in the output list of regions are freed.nothing (no sharing introduced).

Parameters
l11
l22

Definition at line 207 of file binary_operators.c.

209 {
210  list lr;
211 
212  debug(3, "RegionsMayUnion", "begin\n");
214  union_combinable_p,
217  debug(3, "RegionsMayUnion", "end\n");
218  return(lr);
219 }
list region_may_union(region r1, region r2)
computes the may union of two combinable array regions
list region_to_may_region_list(effect)
list list_of_effects_generic_union_op(list, list, bool(*)(effect, effect), list(*)(effect, effect), list(*)(effect))

References debug(), list_of_effects_generic_union_op(), region_may_union(), and region_to_may_region_list().

Referenced by set_methods_for_convex_effects(), set_methods_for_convex_rw_pointer_effects(), and update_out_summary_regions_list().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RegionsMustUnion()

list RegionsMustUnion ( list  l1,
list  l2,
bool(*)(effect, effect union_combinable_p 
)

list RegionsMustUnion(list l1, list l2, union_combinable_p) input : two lists of regions output : a list of regions, must union of the two initial lists modifies : l1 and l2 and their regions.

Regions that are not reused in the output list of regions are freed.

Parameters
l11
l22

Definition at line 228 of file binary_operators.c.

230 {
231  list lr;
232 
233  debug(3, "RegionsMustUnion", "begin\n");
235  union_combinable_p,
238  debug(3, "RegionsMustUnion", "end\n");
239  return(lr);
240 }
list region_must_union(region r1, region r2)
computes the must union of two combinable array regions
list region_to_list(effect)

References debug(), list_of_effects_generic_union_op(), region_must_union(), and region_to_list().

Referenced by allocate_task_to_cluster(), c_convex_effects_on_actual_parameter_forward_translation(), common_region_translation(), common_regions_backward_translation(), common_regions_forward_translation(), compute_recv_regions(), MCW(), move_task_to_cluster(), real_regions_forward_translation(), regions_backward_translation(), regions_forward_translation(), set_methods_for_convex_effects(), set_methods_for_convex_rw_pointer_effects(), and used_data().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RegionsSupDifference()

list RegionsSupDifference ( list  l1,
list  l2,
bool(*)(effect, effect difference_combinable_p 
)

list RegionsSupDifference(list l1, l2) input : two lists of regions output : a list of region, representing the sup_difference of the initial regions.

modifies : the regions of l2 may be freed. comment : we keep the regions of l1 that are not combinable with those of l2, but we don't keep the regions of l2 that are not combinable with those of l_reg1.

l_res = list_of_effects_generic_binary_op(l1, l2, difference_combinable_p, region_sup_difference, region_to_list, region_to_nil_list);

Parameters
l11
l22

Definition at line 305 of file binary_operators.c.

307 {
308  list l_res = NIL;
309 
310  debug(3, "RegionsSupDifference", "begin\n");
311  /* l_res = list_of_effects_generic_binary_op(l1, l2,
312  difference_combinable_p,
313  region_sup_difference,
314  region_to_list,
315  region_to_nil_list); */
317  difference_combinable_p,
319 
320  debug(3, "RegionsSupDifference", "end\n");
321 
322  return l_res;
323 }
list list_of_effects_generic_sup_difference_op(list, list, bool(*)(effect, effect), list(*)(effect, effect))

References debug(), list_of_effects_generic_sup_difference_op(), NIL, and region_sup_difference().

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset_arguments_to_eliminate()

void reset_arguments_to_eliminate ( void  )

◆ reset_binary_op_statistics()

void reset_binary_op_statistics ( void  )

binary_operators.c

Definition at line 93 of file binary_operators.c.

94 {
95  nb_umust = 0;
100  nb_umust_sc_rn = 0;
101 
102  nb_umay = 0;
103  nb_umay_must_must = 0;
104  nb_umay_must = 0;
105 
106  nb_dsup = 0;
107  nb_dsup_pot_must = 0;
108  nb_dsup_must = 0;
109 
110  nb_dinf = 0;
111  nb_dinf_pot_must = 0;
112  nb_dinf_must = 0;
113 }

References nb_dinf, nb_dinf_must, nb_dinf_pot_must, nb_dsup, nb_dsup_must, nb_dsup_pot_must, nb_umay, nb_umay_must, nb_umay_must_must, nb_umust, nb_umust_must_may, nb_umust_must_may_must, nb_umust_must_must, nb_umust_must_must_must, and nb_umust_sc_rn.

◆ reset_convex_in_out_regions()

void reset_convex_in_out_regions ( const char *  )

◆ reset_convex_prettyprint()

void reset_convex_prettyprint ( const char *  )

◆ reset_convex_rw_regions()

void reset_convex_rw_regions ( const char *  module_name)
Parameters
module_nameodule_name

Definition at line 560 of file methods.c.

561 {
562  regions_end();
567  // reset_proper_rw_effects();
569 }
void regions_end(void)
void region_translation_statistics_close(const char *, const char *)
Definition: translation.c:212
void reset_transformer_map(void)

References free_value_mappings(), module_name(), region_translation_statistics_close(), regions_end(), reset_cumulated_rw_effects(), reset_precondition_map(), and reset_transformer_map().

Referenced by set_methods_for_convex_rw_effects(), set_methods_for_convex_rw_pointer_effects(), and step_analyse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset_convex_summary_in_out_regions()

void reset_convex_summary_in_out_regions ( const char *  )

◆ reset_convex_summary_rw_regions()

void reset_convex_summary_rw_regions ( const char *  )

◆ reset_op_statistics()

void reset_op_statistics ( void  )

◆ reset_out_summary_regions_list()

void reset_out_summary_regions_list ( void  )

Definition at line 121 of file interprocedural.c.

122 {
124 }
#define list_undefined
Undefined list definition :-)
Definition: newgen_list.h:69

References l_sum_out_reg, and list_undefined.

Referenced by regions_to_loops().

+ Here is the caller graph for this function:

◆ reset_proj_op_statistics()

◆ reset_region_interprocedural_translation()

void reset_region_interprocedural_translation ( void  )

◆ reset_translation_context_sc()

void reset_translation_context_sc ( void  )

◆ rho_entities_list()

list rho_entities_list ( int  ,
int   
)

Referenced by cell_reference_system_remove_rho_variables(), and region_remove_rho_variables().

+ Here is the caller graph for this function:

◆ rho_reference_p()

bool rho_reference_p ( reference  )

◆ rho_region_p()

bool rho_region_p ( effect  )

◆ same_common_variables_p()

bool same_common_variables_p ( entity  ,
entity   
)

◆ sc_add_phi_equation()

◆ sc_entities_cfc_variables()

list sc_entities_cfc_variables ( Psysteme  ,
list   
)

◆ sc_enumerate()

Ppolynome sc_enumerate ( Psysteme  ordered_sc,
Pbase  ordered_base,
const char *  variable_names[] 
)

sc_enumerate.c

sc_enumerate.c

Parameters
ordered_scrdered_sc
ordered_baserdered_base
variable_namesariable_names

Definition at line 307 of file sc_enumerate.c.

310 {
311  // Automatic variables read in a CATCH block need to be declared volatile as
312  // specified by the documentation
313  Polyhedron * volatile A = NULL;
314  Matrix * volatile a = NULL;
315  Polyhedron * volatile C = NULL;
316  Enumeration * volatile ehrhart = NULL;
317 
318  int nbrows = 0;
319  int nbcolumns = 0;
320  if( sc_dimension(ordered_sc) == 0 )
321  return make_polynome(1,TCST,1);
322  else
323  {
325  {
326  if (A) my_Polyhedron_Free(&A);
327  if (a) my_Matrix_Free(&a);
328  if (C) my_Polyhedron_Free(&C);
329  RETHROW();
330  }
331  TRY
332  {
333  assert(!SC_UNDEFINED_P(ordered_sc) && (sc_dimension(ordered_sc) != 0));
334  nbrows = ordered_sc->nb_eq + ordered_sc->nb_ineq+1;
335  nbcolumns = ordered_sc->dimension +2;
336  a = Matrix_Alloc(nbrows, nbcolumns);
337  sc_to_matrix(ordered_sc,a);
338 
339  A = Constraints2Polyhedron(a, MAX_NB_RAYS);
340  my_Matrix_Free(&a);
341 
342  C = Universe_Polyhedron(base_dimension(ordered_base));
343 
344  ehrhart = Polyhedron_Enumerate(A, C, MAX_NB_RAYS, variable_names);
345  // Value vals[2]= {0,0};
346  // Value *val = compute_poly(ehrhart,&vals[0]);
347  // printf("%lld\n",*val);
349  my_Polyhedron_Free(&C);
350  } // end TRY
351 
353  return evalue_to_polynome(&ehrhart->EP,ordered_base);
354  }
355 }
@ any_exception_error
catch all
#define RETHROW()
#define assert(ex)
Definition: newgen_assert.h:41
Ppolynome make_polynome(float coeff, Variable var, Value expo)
Ppolynome make_polynome(float coeff, Variable var, Value expo) PRIVATE allocates space for,...
Definition: pnome-alloc.c:100
static Ppolynome evalue_to_polynome(evalue *, Pbase)
Definition: sc_enumerate.c:290
static void sc_to_matrix(Psysteme sc, Matrix *mat)
Passage du systeme lineaire sc a une matrice matrix (structure Irisa) Cette fonction de conversion es...
Definition: sc_enumerate.c:115
#define MAX_NB_RAYS
IRISA/POLYLIB data structures.
Definition: sc_enumerate.c:47
static void my_Polyhedron_Free(Polyhedron *volatile *p)
Definition: sc_enumerate.c:75
static void my_Matrix_Free(Matrix *volatile *m)
Definition: sc_enumerate.c:63
Definition: pip__tab.h:25
int dimension
Definition: sc-local.h:74
int nb_ineq
Definition: sc-local.h:73
int nb_eq
Definition: sc-local.h:72
#define base_dimension(b)

References any_exception_error, assert, base_dimension, CATCH, Ssysteme::dimension, evalue_to_polynome(), make_polynome(), MAX_NB_RAYS, my_Matrix_Free(), my_Polyhedron_Free(), Ssysteme::nb_eq, Ssysteme::nb_ineq, RETHROW, sc_to_matrix(), TCST, TRY, and UNCATCH.

+ Here is the call graph for this function:

◆ sc_list_variables_rename()

Psysteme sc_list_variables_rename ( Psysteme  ,
list  ,
list   
)

Referenced by regions_transformer_apply(), replace_indices_region(), and replace_indices_region_com().

+ Here is the caller graph for this function:

◆ sc_loop_proper_precondition()

Psysteme sc_loop_proper_precondition ( loop  )

◆ sc_projection_ofl_along_list_of_variables()

Psysteme sc_projection_ofl_along_list_of_variables ( Psysteme  ps,
list  l_var 
)

MISC

converts the list into a Pvecteur

ps = sc_projection_ofl_along_variables(ps, pv_var);

Parameters
pss
l_var_var

Definition at line 1693 of file old_projection.c.

1694 {
1695 
1696  Pvecteur pv_var = NULL;
1697  /* converts the list into a Pvecteur */
1698  MAP(ENTITY, e,
1699  {
1700  if (base_contains_variable_p(ps->base, (Variable) e) )
1701  vect_add_elem(&pv_var, (Variable) e, VALUE_ONE);
1702  }, l_var);
1704  /* ps = sc_projection_ofl_along_variables(ps, pv_var); */
1705  vect_rm(pv_var);
1706  return(ps);
1707 }
void region_sc_projection_along_variables_ofl_ctrl(Psysteme *psc, Pvecteur pv, int ofl_ctrl)
void region_sc_projection_ofl_along_variables(Psysteme *psc, Pvecteur pv) input : a system of constra...

References Ssysteme::base, base_contains_variable_p(), ENTITY, FWD_OFL_CTRL, MAP, region_sc_projection_along_variables_ofl_ctrl(), VALUE_ONE, vect_add_elem(), and vect_rm().

Referenced by cell_reference_system_remove_psi_variables(), cell_reference_system_remove_rho_variables(), region_exact_projection_along_parameters(), region_non_exact_projection_along_parameters(), and region_non_exact_projection_along_variables().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scalar_regions_sc_append()

list scalar_regions_sc_append ( list  ,
Psysteme  ,
bool   
)

Referenced by convex_in_effect_loop_range_fix().

+ Here is the caller graph for this function:

◆ set_arguments_to_eliminate()

void set_arguments_to_eliminate ( list  )

◆ set_backward_arguments_to_eliminate()

void set_backward_arguments_to_eliminate ( entity  )

Referenced by add_alias_pairs_for_this_call_site(), convex_regions_translation_init(), and regions_backward_translation().

+ Here is the caller graph for this function:

◆ set_forward_arguments_to_eliminate()

void set_forward_arguments_to_eliminate ( void  )

Referenced by convex_regions_translation_init(), and regions_forward_translation().

+ Here is the caller graph for this function:

◆ set_interprocedural_translation_context_sc()

void set_interprocedural_translation_context_sc ( entity  ,
list   
)

◆ set_methods_for_convex_effects()

void set_methods_for_convex_effects ( void  )

methods.c

Definition at line 235 of file methods.c.

236 {
240 
248 
255 
262 
263 
265  if (get_constant_paths_p())
266  {
267  switch (get_pointer_info_kind())
268  {
271  break;
272  case with_points_to:
274  break;
275  case with_pointer_values:
277  break;
278  default:
279  pips_internal_error("unexpected value\n");
280  }
281  }
282 
283 
288 
292 
296 
304 
306  // FI: sometimes in sequences, you need the completed transformer,
307  // some other times, for instance when moving from the loop body
308  // to the loop, you need the non-completed statement transformer
312 
314 
316 
317 
318  db_get_proper_rw_effects_func = db_get_convex_proper_rw_regions;
319  db_put_proper_rw_effects_func = db_put_convex_proper_rw_regions;
320 
321  db_get_invariant_rw_effects_func = db_get_convex_invariant_rw_regions;
322  db_put_invariant_rw_effects_func = db_put_convex_invariant_rw_regions;
323 
324  db_get_rw_effects_func = db_get_convex_rw_regions;
325  db_put_rw_effects_func = db_put_convex_rw_regions;
326 
327  db_get_summary_rw_effects_func = db_get_convex_summary_rw_regions;
328  db_put_summary_rw_effects_func = db_put_convex_summary_rw_regions;
329 
330  db_get_in_effects_func = db_get_convex_in_regions;
331  db_put_in_effects_func = db_put_convex_in_regions;
332 
333  db_get_cumulated_in_effects_func = db_get_convex_cumulated_in_regions;
334  db_put_cumulated_in_effects_func = db_put_convex_cumulated_in_regions;
335 
336  db_get_invariant_in_effects_func = db_get_convex_invariant_in_regions;
337  db_put_invariant_in_effects_func = db_put_convex_invariant_in_regions;
338 
339  db_get_summary_in_effects_func = db_get_convex_summary_in_regions;
340  db_put_summary_in_effects_func = db_put_convex_summary_in_regions;
341 
342  db_get_out_effects_func = db_get_convex_out_regions;
343  db_put_out_effects_func = db_put_convex_out_regions;
344 
345  db_get_summary_out_effects_func = db_get_convex_summary_out_regions;
346  db_put_summary_out_effects_func = db_put_convex_summary_out_regions;
347 
348  db_get_useful_variables_effects_func = db_get_convex_useful_variables_regions;
349  db_put_useful_variables_effects_func = db_put_convex_useful_variables_regions;
350 
353 
355 }
transformer load_completed_statement_transformer(statement s)
three mappings used throughout semantics analysis:
list RegionsSupDifference(list l1, list l2, bool(*difference_combinable_p)(effect, effect))
list RegionsSupDifference(list l1, l2) input : two lists of regions output : a list of region,...
effect regions_must_convex_hull(region f1, region f2)
1- Union :
list RegionsMayUnion(list l1, list l2, bool(*union_combinable_p)(effect, effect))
list RegionsMayUnion(list l1, list l2, union_combinable_p) input : two lists of regions output : a li...
list RegionsInfDifference(list l1, list l2, bool(*difference_combinable_p)(effect, effect))
list RegionsInfDifference(list l1, l2) input : two lists of regions output : a list of region,...
list RegionsIntersection(list l1, list l2, bool(*intersection_combinable_p)(effect, effect))
list RegionsIntersection(list l1,l2, bool (*intersection_combinable_p)(effect, effect)) input : outpu...
static void convex_in_effect_loop_range_fix(loop l, list *gin, list *gw, bool(*r_w_combinable_p)(effect, effect), entity *index, range r)
Definition: methods.c:84
list eval_convex_cell_with_points_to(cell, descriptor, list, bool *, transformer)
Definition: eval.c:275
void convex_region_change_ith_dimension_expression(effect, expression, int)
descriptor loop_convex_descriptor_make(loop)
list convex_regions_descriptor_variable_rename(list, entity, entity)
list convex_effect_to_constant_path_effects_with_pointer_values(effect)
effect reference_to_convex_region(reference, action, bool)
unary_operators.c
bool empty_convex_context_p(transformer)
list convex_effect_to_constant_path_effects_with_points_to(effect)
Definition: eval.c:285
void region_free(effect)
void convex_regions_translation_init(entity, list, bool)
interprocedural.c
list region_to_store_independent_region_list(effect, bool)
list c_convex_effects_on_formal_parameter_backward_translation(list, expression, transformer)
list c_convex_effects_on_actual_parameter_forward_translation(entity, expression, entity, list, transformer)
void convex_effects_descriptor_normalize(list)
list convex_regions_backward_translation(entity, list, list, transformer)
of effects
descriptor vector_to_convex_descriptor(Pvecteur)
void convex_regions_translation_end(void)
list convex_regions_loop_normalize(list, entity, range, entity *, descriptor, bool)
list convex_regions_forward_translation(entity, list, list, transformer)
of effects
void convex_region_add_expression_dimension(effect, expression)
list convex_regions_precondition_compose(list, transformer, bool)
list regions_dynamic_elim(list)
list regions_dynamic_elim(list l_reg) input : a list of regions.
list convex_regions_union_over_range(list, entity, range, descriptor)
list convex_regions_transformer_compose(list, transformer)
compose.c
list convex_regions_inverse_transformer_compose(list, transformer)
@ with_points_to
@ with_no_pointer_info
@ with_pointer_values
transformer(* load_transformer_func)(statement)
effect(* effect_union_op)(effect, effect)
list(* effects_sup_difference_op)(list, list, bool(*eff1_eff2_combinable_p)(effect, effect))
void(* db_put_invariant_in_effects_func)(const char *, statement_effects)
list(* fortran_effects_backward_translation_op)(entity, list, list, transformer)
statement_effects(* db_get_invariant_in_effects_func)(const char *)
void(* db_put_summary_in_effects_func)(const char *, list)
void(* db_put_in_effects_func)(const char *, statement_effects)
list(* effect_to_constant_path_effects_func)(effect)
bool(* empty_context_test)(transformer)
list(* effects_intersection_op)(list, list, bool(*eff1_eff2_combinable_p)(effect, effect))
transformer(* load_completed_transformer_func)(statement)
effect effect_nop(effect)
list(* c_effects_on_formal_parameter_backward_translation_func)(list, expression, transformer)
transformer(* load_context_func)(statement)
effect(* proper_to_summary_effect_func)(effect)
list(* effects_union_op)(list, list, bool(*eff1_eff2_combinable_p)(effect, effect))
void(* db_put_rw_effects_func)(const char *, statement_effects)
void(* effect_descriptor_interprocedural_translation_op)(effect)
void(* db_put_useful_variables_effects_func)(const char *, entity_effects)
void(* effects_translation_end_func)(void)
void(* effects_descriptor_normalize_func)(list)
pointer_info_val get_pointer_info_kind(void)
list(* effects_transformer_composition_op)(list, transformer)
void(* db_put_invariant_rw_effects_func)(const char *, statement_effects)
statement_effects(* db_get_invariant_rw_effects_func)(const char *)
list(* effect_to_store_independent_effect_list_func)(effect, bool)
bool(* effect_consistent_p_func)(effect)
list effect_to_constant_path_effects_with_no_pointer_information(effect)
void(* loop_range_in_effect_func)(loop, list *, list *, bool(*)(effect, effect), entity *, range)
descriptor(* loop_descriptor_make_func)(loop)
void(* effect_free_func)(effect eff)
list(* effects_local_to_global_translation_op)(list)
list(* db_get_summary_in_effects_func)(const char *)
effect(* reference_to_effect_func)(reference, action, bool)
statement_effects(* db_get_out_effects_func)(const char *)
void(* db_put_out_effects_func)(const char *, statement_effects)
void set_descriptor_range_p(bool)
list(* db_get_summary_out_effects_func)(const char *)
entity_effects(* db_get_useful_variables_effects_func)(const char *)
statement_effects(* db_get_cumulated_in_effects_func)(const char *)
list(* effects_test_union_op)(list, list, bool(*eff1_eff2_combinable_p)(effect, effect))
void(* effects_translation_init_func)(entity, list, bool)
list(* effects_loop_normalize_func)(list, entity, range, entity *, descriptor, bool)
void set_contracted_proper_effects(bool)
end of effects-generic-local.h
bool get_constant_paths_p(void)
void(* db_put_summary_out_effects_func)(const char *, list)
list(* effects_descriptors_variable_change_func)(list, entity, entity)
descriptor(* vector_to_descriptor_func)(Pvecteur)
void(* db_put_summary_rw_effects_func)(const char *, list)
void(* effect_add_expression_dimension_func)(effect eff, expression exp)
void(* db_put_cumulated_in_effects_func)(const char *, statement_effects)
list(* effects_inf_difference_op)(list, list, bool(*eff1_eff2_combinable_p)(effect, effect))
effect(* effect_dup_func)(effect eff)
statement_effects(* db_get_in_effects_func)(const char *)
list(* fortran_effects_forward_translation_op)(entity, list, list, transformer)
void(* effect_change_ith_dimension_expression_func)(effect eff, expression exp, int i)
void(* db_put_proper_rw_effects_func)(const char *, statement_effects)
list(* eval_cell_with_points_to_func)(cell, descriptor, list, bool *, transformer)
statement_effects(* db_get_proper_rw_effects_func)(const char *)
list(* effects_union_over_range_op)(list, entity, range, descriptor)
list(* effects_transformer_inverse_composition_op)(list, transformer)
list(* db_get_summary_rw_effects_func)(const char *)
bool(* stmt_strongly_feasible_p_func)(statement)
list(* effects_precondition_composition_op)(list, transformer, bool)
statement_effects(* db_get_rw_effects_func)(const char *)
list(* c_effects_on_actual_parameter_forward_translation_func)(entity, expression, entity, list, transformer)
bool statement_strongly_feasible_p(statement)
Return true if statement s is reachable according to its precondition.
Definition: utils.c:99
transformer load_statement_transformer(statement)

References c_convex_effects_on_actual_parameter_forward_translation(), c_convex_effects_on_formal_parameter_backward_translation(), c_effects_on_actual_parameter_forward_translation_func, c_effects_on_formal_parameter_backward_translation_func, convex_effect_to_constant_path_effects_with_pointer_values(), convex_effect_to_constant_path_effects_with_points_to(), convex_effects_descriptor_normalize(), convex_in_effect_loop_range_fix(), convex_region_add_expression_dimension(), convex_region_change_ith_dimension_expression(), convex_region_descriptor_translation(), convex_regions_backward_translation(), convex_regions_descriptor_variable_rename(), convex_regions_forward_translation(), convex_regions_inverse_transformer_compose(), convex_regions_loop_normalize(), convex_regions_precondition_compose(), convex_regions_transformer_compose(), convex_regions_translation_end(), convex_regions_translation_init(), convex_regions_union_over_range(), db_get_cumulated_in_effects_func, db_get_in_effects_func, db_get_invariant_in_effects_func, db_get_invariant_rw_effects_func, db_get_out_effects_func, db_get_proper_rw_effects_func, db_get_rw_effects_func, db_get_summary_in_effects_func, db_get_summary_out_effects_func, db_get_summary_rw_effects_func, db_get_useful_variables_effects_func, db_put_cumulated_in_effects_func, db_put_in_effects_func, db_put_invariant_in_effects_func, db_put_invariant_rw_effects_func, db_put_out_effects_func, db_put_proper_rw_effects_func, db_put_rw_effects_func, db_put_summary_in_effects_func, db_put_summary_out_effects_func, db_put_summary_rw_effects_func, db_put_useful_variables_effects_func, effect_add_expression_dimension_func, effect_change_ith_dimension_expression_func, effect_consistent_p_func, effect_descriptor_interprocedural_translation_op, effect_dup_func, effect_free_func, effect_nop(), effect_to_constant_path_effects_func, effect_to_constant_path_effects_with_no_pointer_information(), effect_to_store_independent_effect_list_func, effect_union_op, effects_descriptor_normalize_func, effects_descriptors_variable_change_func, effects_inf_difference_op, effects_intersection_op, effects_local_to_global_translation_op, effects_loop_normalize_func, effects_precondition_composition_op, effects_sup_difference_op, effects_test_union_op, effects_transformer_composition_op, effects_transformer_inverse_composition_op, effects_translation_end_func, effects_translation_init_func, effects_union_op, effects_union_over_range_op, empty_context_test, empty_convex_context_p(), eval_cell_with_points_to_func, eval_convex_cell_with_points_to(), fortran_effects_backward_translation_op, fortran_effects_forward_translation_op, get_constant_paths_p(), get_pointer_info_kind(), load_completed_statement_transformer(), load_completed_transformer_func, load_context_func, load_statement_precondition(), load_statement_transformer(), load_transformer_func, loop_convex_descriptor_make(), loop_descriptor_make_func, loop_range_in_effect_func, pips_internal_error, proper_to_summary_effect_func, reference_to_convex_region(), reference_to_effect_func, region_consistent_p(), region_dup(), region_free(), region_to_store_independent_region_list(), regions_dynamic_elim(), regions_must_convex_hull(), RegionsInfDifference(), RegionsIntersection(), RegionsMayUnion(), RegionsMustUnion(), RegionsSupDifference(), set_contracted_proper_effects(), set_descriptor_range_p(), statement_strongly_feasible_p(), stmt_strongly_feasible_p_func, vector_to_convex_descriptor(), vector_to_descriptor_func, with_no_pointer_info, with_pointer_values, and with_points_to.

Referenced by bdsc_code_instrumentation(), dsc_code_parallelization(), hbdsc_parallelization(), pragma_outliner(), regions_to_loops(), sequence_dependence_graph(), set_methods_for_convex_in_out_effects(), set_methods_for_convex_rw_effects(), spire_distributed_unstructured_to_structured(), and step_analyse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_methods_for_convex_in_out_effects()

void set_methods_for_convex_in_out_effects ( void  )

Definition at line 469 of file methods.c.

470 {
474 }
void reset_convex_in_out_regions(const char *__attribute__((unused)) module_name)
Definition: methods.c:571
void set_methods_for_convex_effects()
methods.c
Definition: methods.c:235
void(* effects_computation_reset_func)(const char *)

References effects_computation_init_func, effects_computation_reset_func, init_convex_in_out_regions(), reset_convex_in_out_regions(), and set_methods_for_convex_effects().

Referenced by c_convex_effects_on_actual_parameter_forward_translation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_methods_for_convex_rw_effects()

void set_methods_for_convex_rw_effects ( void  )

Definition at line 358 of file methods.c.

359 {
363 }
void reset_convex_rw_regions(const char *module_name)
Definition: methods.c:560
void init_convex_rw_regions(const char *module_name)
Definition: methods.c:495

References effects_computation_init_func, effects_computation_reset_func, init_convex_rw_regions(), reset_convex_rw_regions(), and set_methods_for_convex_effects().

Referenced by c_convex_effects_on_actual_parameter_forward_translation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_methods_for_convex_rw_pointer_effects()

void set_methods_for_convex_rw_pointer_effects ( void  )

Definition at line 365 of file methods.c.

366 {
370 
378 
385 
392 
397 
401 
405 
413 
418 
420 
422 
423 
424  db_get_proper_rw_effects_func = db_get_convex_proper_rw_pointer_regions;
425  db_put_proper_rw_effects_func = db_put_convex_proper_rw_pointer_regions;
426 
427  db_get_invariant_rw_effects_func = db_get_convex_invariant_rw_pointer_regions;
428  db_put_invariant_rw_effects_func = db_put_convex_invariant_rw_pointer_regions;
429 
430  db_get_rw_effects_func = db_get_convex_rw_pointer_regions;
431  db_put_rw_effects_func = db_put_convex_rw_pointer_regions;
432 
433  db_get_summary_rw_effects_func = db_get_convex_summary_rw_pointer_regions;
434  db_put_summary_rw_effects_func = db_put_convex_summary_rw_pointer_regions;
435 
436  db_get_in_effects_func = db_get_convex_in_regions;
437  db_put_in_effects_func = db_put_convex_in_regions;
438 
439  db_get_cumulated_in_effects_func = db_get_convex_cumulated_in_regions;
440  db_put_cumulated_in_effects_func = db_put_convex_cumulated_in_regions;
441 
442  db_get_invariant_in_effects_func = db_get_convex_invariant_in_regions;
443  db_put_invariant_in_effects_func = db_put_convex_invariant_in_regions;
444 
445  db_get_summary_in_effects_func = db_get_convex_summary_in_regions;
446  db_put_summary_in_effects_func = db_put_convex_summary_in_regions;
447 
448  db_get_out_effects_func = db_get_convex_out_regions;
449  db_put_out_effects_func = db_put_convex_out_regions;
450 
451  db_get_summary_out_effects_func = db_get_convex_summary_out_regions;
452  db_put_summary_out_effects_func = db_put_convex_summary_out_regions;
453 
454  db_get_useful_variables_effects_func = db_get_convex_useful_variables_pointer_regions;
455  db_put_useful_variables_effects_func = db_put_convex_useful_variables_pointer_regions;
456 
459 
462 
464 }

References c_convex_effects_on_actual_parameter_forward_translation(), c_convex_effects_on_formal_parameter_backward_translation(), c_effects_on_actual_parameter_forward_translation_func, c_effects_on_formal_parameter_backward_translation_func, convex_effects_descriptor_normalize(), convex_in_effect_loop_range_fix(), convex_region_add_expression_dimension(), convex_region_change_ith_dimension_expression(), convex_region_descriptor_translation(), convex_regions_backward_translation(), convex_regions_descriptor_variable_rename(), convex_regions_forward_translation(), convex_regions_inverse_transformer_compose(), convex_regions_loop_normalize(), convex_regions_precondition_compose(), convex_regions_transformer_compose(), convex_regions_translation_end(), convex_regions_translation_init(), convex_regions_union_over_range(), db_get_cumulated_in_effects_func, db_get_in_effects_func, db_get_invariant_in_effects_func, db_get_invariant_rw_effects_func, db_get_out_effects_func, db_get_proper_rw_effects_func, db_get_rw_effects_func, db_get_summary_in_effects_func, db_get_summary_out_effects_func, db_get_summary_rw_effects_func, db_get_useful_variables_effects_func, db_put_cumulated_in_effects_func, db_put_in_effects_func, db_put_invariant_in_effects_func, db_put_invariant_rw_effects_func, db_put_out_effects_func, db_put_proper_rw_effects_func, db_put_rw_effects_func, db_put_summary_in_effects_func, db_put_summary_out_effects_func, db_put_summary_rw_effects_func, db_put_useful_variables_effects_func, effect_add_expression_dimension_func, effect_change_ith_dimension_expression_func, effect_consistent_p_func, effect_descriptor_interprocedural_translation_op, effect_dup_func, effect_free_func, effect_nop(), effect_to_store_independent_effect_list_func, effect_union_op, effects_computation_init_func, effects_computation_reset_func, effects_descriptor_normalize_func, effects_descriptors_variable_change_func, effects_inf_difference_op, effects_intersection_op, effects_local_to_global_translation_op, effects_loop_normalize_func, effects_precondition_composition_op, effects_sup_difference_op, effects_test_union_op, effects_transformer_composition_op, effects_transformer_inverse_composition_op, effects_translation_end_func, effects_translation_init_func, effects_union_op, effects_union_over_range_op, empty_context_test, empty_convex_context_p(), fortran_effects_backward_translation_op, fortran_effects_forward_translation_op, init_convex_rw_regions(), load_completed_statement_transformer(), load_completed_transformer_func, load_context_func, load_statement_precondition(), load_statement_transformer(), load_transformer_func, loop_convex_descriptor_make(), loop_descriptor_make_func, loop_range_in_effect_func, proper_to_summary_effect_func, reference_to_convex_region(), reference_to_effect_func, region_consistent_p(), region_dup(), region_free(), region_to_store_independent_region_list(), regions_dynamic_elim(), regions_must_convex_hull(), RegionsInfDifference(), RegionsIntersection(), RegionsMayUnion(), RegionsMustUnion(), RegionsSupDifference(), reset_convex_rw_regions(), set_contracted_proper_effects(), set_descriptor_range_p(), statement_strongly_feasible_p(), stmt_strongly_feasible_p_func, vector_to_convex_descriptor(), and vector_to_descriptor_func.

+ Here is the call graph for this function:

◆ set_region_interprocedural_translation()

void set_region_interprocedural_translation ( void  )

◆ set_translation_context_sc()

void set_translation_context_sc ( Psysteme  )

◆ simple_cell_to_convex_cell_conversion()

void simple_cell_to_convex_cell_conversion ( cell  input_cell,
cell output_cell,
descriptor output_desc 
)
Parameters
input_cellnput_cell
output_cellutput_cell
output_descutput_desc

Definition at line 234 of file eval.c.

235 {
236 
237  reference input_ref = cell_any_reference(input_cell);
238  reference output_ref = reference_undefined;
239 
240  simple_reference_to_convex_reference_conversion(input_ref, &output_ref, output_desc);
241  *output_cell = make_cell_reference(output_ref);
242 }

References cell_any_reference(), make_cell_reference(), reference_undefined, and simple_reference_to_convex_reference_conversion().

Referenced by convex_effect_find_aliased_paths_with_pointer_values().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ simple_reference_to_convex_reference_conversion()

void simple_reference_to_convex_reference_conversion ( reference  ref,
reference output_ref,
descriptor output_desc 
)
Parameters
refef
output_refutput_ref
output_descutput_desc

Definition at line 205 of file eval.c.

206 {
207 
212 
214  {
217  {
220  }
221  else
223  }
224  *output_ref = effect_any_reference(reg);
225  *output_desc = effect_descriptor(reg);
226 
227  pips_debug_effect(6, "reg = \n", reg);
228 
231  free_effect(reg);
232 }
descriptor make_descriptor_convex(Psysteme _field_)
Definition: effects.c:439
void effect_add_field_dimension(effect, entity)
#define exp
Avoid some warnings from "gcc -Wshadow".
Definition: vasnprintf.c:207

References cell_reference, convex_region_add_expression_dimension(), descriptor_undefined, effect_add_field_dimension(), effect_any_reference, effect_cell, effect_descriptor, entity_field_p(), exp, EXPRESSION, expression_reference(), expression_reference_p(), FOREACH, free_effect(), make_action_write_memory(), make_approximation_exact(), make_cell_reference(), make_descriptor_convex(), make_effect(), make_reference(), NIL, pips_debug_effect, ref, reference_indices, reference_undefined, reference_variable, and sc_new().

Referenced by eval_convex_cell_with_points_to(), and simple_cell_to_convex_cell_conversion().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ substitute_stubs_in_convex_array_region()

effect substitute_stubs_in_convex_array_region ( effect  ,
bool  ,
set   
)

◆ summary_pointer_regions()

bool summary_pointer_regions ( const  string)

cproto-generated files

interface.c

Parameters
stringodule_name

◆ summary_regions()

bool summary_regions ( const  string)
Parameters
stringodule_name

Referenced by do_check_isolate_statement_preconditions_on_call().

+ Here is the caller graph for this function:

◆ text_copyinout_array_regions()

text text_copyinout_array_regions ( list  )

◆ text_inout_array_regions()

text text_inout_array_regions ( list  )

Referenced by init_convex_inout_prettyprint().

+ Here is the caller graph for this function:

◆ text_private_array_regions()

text text_private_array_regions ( list  )

◆ text_region()

text text_region ( effect  )

Referenced by concerned_entity_p(), step_compute_CHAINS_DG_remove_summary_regions(), and text_all_comp_regions().

+ Here is the caller graph for this function:

◆ text_rw_array_regions()

text text_rw_array_regions ( list  )

◆ update_out_summary_regions_list()

void update_out_summary_regions_list ( list  l_out)
Parameters
l_out_out

Definition at line 126 of file interprocedural.c.

127 {
129  l_sum_out_reg = l_out;
130  else
133 }
#define list_undefined_p(c)
Return if a list is undefined.
Definition: newgen_list.h:75

References effects_same_action_p(), l_sum_out_reg, list_undefined_p, and RegionsMayUnion().

Referenced by out_regions_from_call_site_to_callee().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variables_to_int_variables()

list variables_to_int_variables ( list  )

Referenced by regions_transformer_apply().

+ Here is the caller graph for this function:

◆ variables_to_old_variables()

list variables_to_old_variables ( list  )

Referenced by regions_transformer_apply().

+ Here is the caller graph for this function:

◆ vector_to_convex_descriptor()

descriptor vector_to_convex_descriptor ( Pvecteur  )

Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().

+ Here is the caller graph for this function:

Variable Documentation

◆ add_precondition_to_scalar_convex_regions

bool add_precondition_to_scalar_convex_regions
extern