PIPS
effects-simple.h File Reference

Go to the source code of this file.

Macros

#define make_sdfi_effect(e)
 copies an effect with no subcript expression More...
 

Enumerations

enum  simple_effects_actions_interpretations {
  act_rw , act_inout , act_live_in , act_live_out ,
  act_rw , act_inout , act_live_in , act_live_out
}
 Warning! Do not modify this file that is automatically generated! More...
 

Functions

list ReferenceUnion (list, list, bool(*)(effect, effect))
 cproto-generated files More...
 
list ReferenceTestUnion (list, list, bool(*)(effect, effect))
 
list EffectsMayUnion (list, list, bool(*)(effect, effect))
 list EffectsMayUnion(list l1, list l2, union_combinable_p) input : two lists of effects output : a list of effects, may union of the two initial lists modifies : l1 and l2 and their effects. More...
 
list ProperEffectsMustUnion (list, list, bool(*)(effect, effect))
 list EffectsMustUnion(list l1, list l2, union_combinable_p) input : two lists of effects output : a list of effects, must union of the two initial lists modifies : l1 and l2 and their effects. More...
 
list EffectsMustUnion (list, list, bool(*)(effect, effect))
 list EffectsMustUnion(list l1, list l2, union_combinable_p) input : two lists of effects output : a list of effects, must union of the two initial lists modifies : l1 and l2 and their effects. More...
 
list effects_may_union (effect, effect)
 
list effects_must_union (effect, effect)
 
effect effect_may_union (effect, effect)
 Preserve store independent information as long as you can. More...
 
effect effect_must_union (effect, effect)
 computes the must union of two combinable effects More...
 
list EffectsSupDifference (list, list, bool(*)(effect, effect))
 list EffectsSupDifference(list l1, l2) input : two lists of effects output : a list of effect, representing the sup_difference of the initial effects. More...
 
list EffectsInfDifference (list, list, bool(*)(effect, effect))
 list EffectsInfDifference(list l1, l2) input : two lists of effects output : a list of effect, representing the inf_difference of the initial effects. More...
 
effect proper_to_summary_simple_effect (effect)
 FI: the goal is to get rid of array subscripts to handle the arrays atomically. More...
 
bool simple_cells_intersection_p (cell, descriptor, cell, descriptor, bool *)
 
bool simple_cells_inclusion_p (cell, descriptor, cell, descriptor, bool *)
 
bool cumulated_references (const string)
 interface.c More...
 
bool proper_references (const string)
 
bool proper_pointer_effects (const string)
 
bool summary_pointer_effects (const string)
 
bool cumulated_pointer_effects (const string)
 
bool cumulated_pointer_effects_with_points_to (const string)
 
bool cumulated_pointer_effects_with_pointer_values (const string)
 
bool proper_effects (const string)
 
bool proper_effects_with_points_to (const string)
 
bool proper_effects_with_pointer_values (const string)
 
bool summary_effects (const string)
 
bool cumulated_effects (const string)
 
bool cumulated_effects_with_points_to (const string)
 
bool cumulated_effects_with_pointer_values (const string)
 
bool in_summary_effects (const string)
 
bool out_summary_effects (const string)
 
bool in_effects (const string)
 
bool out_effects (const string)
 
bool print_code_proper_pointer_effects (const string)
 
bool print_code_cumulated_pointer_effects (const string)
 
bool print_code_proper_effects (const string)
 
bool print_code_cumulated_effects (const string)
 
bool print_code_proper_references (const string)
 
bool print_code_cumulated_references (const string)
 
bool print_code_in_effects (const string)
 
bool print_code_out_effects (const string)
 
bool print_source_proper_effects (const string)
 
bool print_source_cumulated_effects (const string)
 
bool print_source_in_effects (const string)
 
bool print_source_out_effects (const string)
 
bool print_code_as_a_graph_proper_effects (const string)
 
bool print_code_as_a_graph_cumulated_effects (const string)
 
text get_text_proper_pointer_effects (const string)
 
text get_text_cumulated_pointer_effects (const string)
 
text get_text_proper_effects (const string)
 
text get_text_cumulated_effects (const string)
 
list proper_effects_of_expression (expression)
 
list expression_to_proper_effects (expression)
 
list proper_constant_path_effects_of_any_expression (expression, bool)
 
list proper_constant_path_effects_of_expression (expression)
 
list proper_constant_path_effects_of_lhs_expression (expression)
 
list expression_to_proper_constant_path_effects (expression)
 
list lhs_expression_to_proper_constant_path_effects (expression)
 
bool expression_with_side_effect_p (expression)
 
list proper_constant_path_effects_of_expression_with_points_to (expression, statement)
 
list expression_to_proper_constant_path_effects_with_points_to (expression, statement)
 
list proper_effects_of_range (range)
 
bool expression_invariant_wrt_effects (expression, list)
 
void rproper_effects_of_statement (statement)
 
void rcumulated_effects_of_statement (statement)
 
list statement_to_effects (statement)
 
bool full_simple_proper_effects (const char *, statement)
 
bool simple_cumulated_effects (const char *, statement)
 
bool live_paths (const string)
 
bool live_in_summary_paths (const string)
 
bool live_out_summary_paths (const string)
 
bool print_code_live_in_paths (const string)
 
bool print_code_live_out_paths (const string)
 
bool update_loops_locals (const char *, statement)
 
bool is_implied_do_index (entity, instruction)
 
list get_list_of_variable_to_filter (void)
 
bool print_icfg_with_proper_effects (const string)
 
bool print_icfg_with_cumulated_effects (const string)
 
bool print_icfg_with_loops_proper_effects (const string)
 
bool print_icfg_with_loops_cumulated_effects (const string)
 
bool print_icfg_with_control_proper_effects (const string)
 
bool print_icfg_with_control_cumulated_effects (const string)
 
bool print_icfg_with_filtered_proper_effects (const string)
 
bool print_dvicfg_with_filtered_proper_effects (const string)
 
void set_methods_for_proper_references (void)
 methods.c More...
 
void set_methods_for_cumulated_references (void)
 
void set_default_methods_for_proper_simple_effects (void)
 
void set_methods_for_proper_simple_effects (void)
 
void set_methods_for_proper_simple_pointer_effects (void)
 
void set_methods_for_simple_effects (void)
 
void set_methods_for_simple_pointer_effects (void)
 
void set_methods_for_inout_effects (const char *)
 
void set_methods_for_live_paths (const char *)
 
void reset_methods_for_inout_effects (void)
 
void set_methods_for_rw_effects_prettyprint (const char *)
 
void set_methods_for_inout_effects_prettyprint (const char *)
 
void set_methods_for_live_in_paths_prettyprint (const char *)
 
void set_methods_for_live_out_paths_prettyprint (const char *)
 
void reset_methods_for_effects_prettyprint (const char *)
 
bool add_points_to_subscript_lists (list *, list, list)
 translation.c More...
 
bool simple_cell_reference_with_address_of_cell_reference_translation_fi (reference, descriptor, reference, descriptor, int, reference *, descriptor *, bool *)
 
void simple_cell_reference_with_address_of_cell_reference_translation (reference, descriptor, reference, descriptor, int, reference *, descriptor *, bool *)
 
void simple_cell_reference_with_value_of_cell_reference_translation (reference, descriptor, reference, descriptor, int, reference *, descriptor *, bool *)
 
void simple_cell_with_address_of_cell_translation (cell, descriptor, cell, descriptor, int, cell *, descriptor *, bool *)
 
void simple_cell_with_value_of_cell_translation (cell, descriptor, cell, descriptor, int, cell *, descriptor *, bool *)
 
void simple_effects_translation_init (entity, list, bool)
 interprocedural.c More...
 
void simple_effects_translation_end (void)
 
void simple_effect_descriptor_interprocedural_translation (effect)
 
list simple_effects_backward_translation (entity, list, list, transformer)
 
effect translate_effect_to_sdfi_effect (effect)
 
list effects_dynamic_elim (list)
 
list make_unknown_subscript (int)
 
list summary_effect_to_proper_effect (call, effect)
 
void check_user_call_site (entity, list)
 
list fortran_summary_to_proper_effects (entity, list, list)
 
list c_simple_effects_on_formal_parameter_backward_translation (list, expression, transformer)
 
list c_summary_effect_to_proper_effects (effect, expression)
 
list c_summary_to_proper_effects (entity, list, list)
 
list summary_to_proper_effects (entity, list, list)
 
list simple_effects_forward_translation (entity, list, list, transformer)
 
list c_simple_effects_on_actual_parameter_forward_translation (entity, expression, entity, list, transformer)
 
text simple_rw_effects_to_text (list)
 prettyprint.c More...
 
text simple_inout_effects_to_text (list)
 
text simple_live_in_paths_to_text (list)
 
text simple_live_out_paths_to_text (list)
 
string effect_to_string (effect)
 
list words_effect_generic (effect, bool)
 
list words_effect (effect)
 
list words_effect_without_approximation (effect)
 
void print_effect (effect)
 
void print_effects (list)
 
void print_memory_effects (list)
 
bool print_call_graph_with_proper_effects (const string)
 
bool print_call_graph_with_cumulated_effects (const string)
 
effect reference_to_simple_effect (reference, action, bool)
 unary_operators.c More...
 
void simple_effect_add_expression_dimension (effect, expression)
 
void simple_effect_change_ith_dimension_expression (effect, expression, int)
 
effect simple_effect_field_to_rank_conversion (effect)
 
effect simple_effect_dup (effect)
 
effect reference_to_reference_effect (reference, action, bool)
 
list simple_effects_union_over_range (list, entity, range, descriptor)
 
reference simple_reference_to_store_independent_reference (reference, bool *)
 
cell simple_cell_to_store_independent_cell (cell, bool *)
 
list effect_to_store_independent_sdfi_list (effect, bool)
 
list effect_to_may_sdfi_list (effect)
 
list effect_to_sdfi_list (effect)
 
void simple_effects_descriptor_normalize (list)
 
list simple_effects_composition_with_effect_transformer (list, transformer)
 
list old_effects_composition_with_effect_transformer (list, transformer)
 
bool filter_proper_effects (const char *)
 filter_proper_effects.c More...
 
bool simple_cell_reference_preceding_p (reference, descriptor, reference, descriptor, transformer, bool, bool *)
 eval.c More...
 
bool simple_cell_preceding_p (cell, descriptor, cell, descriptor, transformer, bool, bool *)
 
bool path_preceding_p (effect, effect, transformer, bool, bool *)
 
void simple_reference_to_simple_reference_conversion (reference, reference *, descriptor *)
 
void simple_cell_to_simple_cell_conversion (cell, cell *, descriptor *)
 
list eval_simple_cell_with_points_to (cell, descriptor, list, bool *, transformer)
 
list simple_effect_to_constant_path_effects_with_pointer_values (effect)
 
list effect_to_constant_path_effects_with_points_to (effect, statement, transformer)
 
list simple_effect_to_constant_path_effects_with_points_to (effect)
 
list eval_cell_with_points_to (cell, list, bool *)
 for backward compatibility More...
 

Macro Definition Documentation

◆ make_sdfi_effect

#define make_sdfi_effect (   e)
Value:
copy_action(effect_action(e)), \
make_approximation(approximation_tag(effect_approximation(e)), UU)) : \
copy_action(effect_action(e)), \
make_approximation(is_approximation_may, UU))
reference make_reference(entity a1, list a2)
Definition: ri.c:2083
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
#define make_simple_effect(reference, action, approximation)
#define approximation_tag(x)
Definition: effects.h:362
#define effect_action(x)
Definition: effects.h:642
@ is_approximation_may
Definition: effects.h:341
#define effect_approximation(x)
Definition: effects.h:644
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
#define UU
Definition: newgen_types.h:98
#define reference_variable(x)
Definition: ri.h:2326
#define reference_indices(x)
Definition: ri.h:2328

copies an effect with no subcript expression

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

Enumeration Type Documentation

◆ simple_effects_actions_interpretations

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

Modify src/Libs/effects-simple/effects-simple-local.h instead, to add your own modifications. header file built by cproto effects_simple-local.h actions interpretation for simple effects prettyprinting

Enumerator
act_rw 
act_inout 
act_live_in 
act_live_out 
act_rw 
act_inout 
act_live_in 
act_live_out 

Definition at line 34 of file effects-simple.h.

@ act_inout
@ act_live_out
@ act_rw
@ act_live_in

Function Documentation

◆ add_points_to_subscript_lists()

bool add_points_to_subscript_lists ( list ,
list  ,
list   
)

translation.c

◆ c_simple_effects_on_actual_parameter_forward_translation()

list c_simple_effects_on_actual_parameter_forward_translation ( entity  ,
expression  ,
entity  ,
list  ,
transformer   
)

◆ c_simple_effects_on_formal_parameter_backward_translation()

list c_simple_effects_on_formal_parameter_backward_translation ( list  ,
expression  ,
transformer   
)

◆ c_summary_effect_to_proper_effects()

list c_summary_effect_to_proper_effects ( effect  ,
expression   
)

◆ c_summary_to_proper_effects()

list c_summary_to_proper_effects ( entity  ,
list  ,
list   
)

◆ check_user_call_site()

void check_user_call_site ( entity  ,
list   
)

◆ cumulated_effects()

bool cumulated_effects ( const  string)
Parameters
stringodule_name

Referenced by do_kernelize().

+ Here is the caller graph for this function:

◆ cumulated_effects_with_pointer_values()

bool cumulated_effects_with_pointer_values ( const  string)
Parameters
stringodule_name

◆ cumulated_effects_with_points_to()

bool cumulated_effects_with_points_to ( const  string)
Parameters
stringodule_name

◆ cumulated_pointer_effects()

bool cumulated_pointer_effects ( const  string)
Parameters
stringodule_name

◆ cumulated_pointer_effects_with_pointer_values()

bool cumulated_pointer_effects_with_pointer_values ( const  string)
Parameters
stringodule_name

◆ cumulated_pointer_effects_with_points_to()

bool cumulated_pointer_effects_with_points_to ( const  string)
Parameters
stringodule_name

◆ cumulated_references()

bool cumulated_references ( const  string)

interface.c

Parameters
stringodule_name

◆ effect_may_union()

effect effect_may_union ( effect  eff1,
effect  eff2 
)

Preserve store independent information as long as you can.

I should have some order on references to absorb, for instance, x[1] by x[*].

computes the may union of two combinable effects

Parameters
[in]eff1effect
[in]eff2
See also
effects_combinable_p
Returns
a new effect with no sharing with the input effects

Abstract locations cases

In fact, we could have : if (al1_p || al_2_p) { entity e1 = effect_entity(e1); entity e2 = effect_entity(e2);

new_ent = entity_locations_max(e1, e2);

eff = make_simple_effect(make_reference(new_ent, NIL), copy_action(effect_action(eff1)), make_approximation(approximation_and(app1,app2), UU)); }

but entity_locations_max involves string manipulations, which are always costly. So we treat apart the cases where (al1_p and ! al2_p) and (al2_p and ! al1_p) because we already know that the abstract location is the max of both locations (because they are combinable (see effects_combinable_p))

concrete locations cases

it's a preference : we change for a reference cell

let us check the indices

Parameters
eff1ff1
eff2ff2

Definition at line 163 of file binary_operators.c.

164 {
165  effect eff;
166  tag app1 = effect_approximation_tag(eff1);
167  tag app2 = effect_approximation_tag(eff2);
168 
169  bool al1_p = effect_abstract_location_p(eff1);
170  bool al2_p = effect_abstract_location_p(eff2);
171 
172  /* Abstract locations cases */
173  /* In fact, we could have :
174  if (al1_p || al_2_p)
175  {
176  entity e1 = effect_entity(e1);
177  entity e2 = effect_entity(e2);
178 
179  new_ent = entity_locations_max(e1, e2);
180 
181  eff = make_simple_effect(make_reference(new_ent, NIL),
182  copy_action(effect_action(eff1)),
183  make_approximation(approximation_and(app1,app2), UU));
184  }
185 
186  but entity_locations_max involves string manipulations, which are always costly.
187  So we treat apart the cases where (al1_p and ! al2_p) and (al2_p and ! al1_p) because
188  we already know that the abstract location is the max of both locations
189  (because they are combinable (see effects_combinable_p))
190 
191  */
192  if (al1_p && al2_p)
193  {
194  entity e1 = effect_entity(eff1);
195  entity e2 = effect_entity(eff2);
196 
197  entity new_ent = entity_locations_max(e1, e2);
198 
199  eff = make_simple_effect(make_reference(new_ent, NIL),
200  copy_action(effect_action(eff1)),
202  }
203  else if (al1_p) {
204  // functions that can be pointed by effect_dup_func:
205  // simple_effect_dup
206  // region_dup
207  // copy_effect
208  eff = (*effect_dup_func)(eff1);
209  }
210  else if (al2_p) {
211  // functions that can be pointed by effect_dup_func:
212  // simple_effect_dup
213  // region_dup
214  // copy_effect
215  eff = (*effect_dup_func)(eff2);
216  }
217 
218  /* concrete locations cases */
219  else if (effect_scalar_p(eff1))
220  {
222  copy_action(effect_action(eff1)),
224  }
225  else
226  {
227  // functions that can be pointed by effect_dup_func:
228  // simple_effect_dup
229  // region_dup
230  // copy_effect
231  eff = (*effect_dup_func)(eff1);
232  cell eff_c = effect_cell(eff);
233 
234  if (cell_preference_p(eff_c))
235  {
236  /* it's a preference : we change for a reference cell */
237  pips_debug(8, "It's a preference\n");
239  free_cell(eff_c);
241  }
242 
243  /* let us check the indices */
246 
247  tag app_tag = approximation_and(app1,app2);
248 
249  for(; !ENDP(l1); POP(l1), POP(l2))
250  {
251  expression exp1 = EXPRESSION(CAR(l1));
252  expression exp2 = EXPRESSION(CAR(l2));
253  if (!expression_equal_p(exp1, exp2))
254  {
256  app_tag = is_approximation_may;
257  }
258  }
259 
260  approximation_tag(effect_approximation(eff)) = app_tag;
261  }
262  return(eff);
263 }
cell make_cell_reference(reference _field_)
Definition: effects.c:293
action copy_action(action p)
ACTION.
Definition: effects.c:77
void free_cell(cell p)
Definition: effects.c:249
approximation make_approximation(enum approximation_utype tag, void *val)
Definition: effects.c:176
reference copy_reference(reference p)
REFERENCE.
Definition: ri.c:2047
static reference ref
Current stmt (an integer)
Definition: adg_read_paf.c:163
entity entity_locations_max(entity al1, entity al2)
Here, entity al1 and entity al2 can be program variables.
#define effect_approximation_tag(eff)
tag approximation_and(tag, tag)
tag approximation_and(tag t1, tag t2) input : two approximation tags.
Definition: effects.c:1198
bool effect_abstract_location_p(effect)
Definition: effects.c:280
entity effect_entity(effect)
cproto-generated files
Definition: effects.c:52
bool effect_scalar_p(effect)
Definition: effects.c:567
#define cell_preference(x)
Definition: effects.h:472
#define cell_preference_p(x)
Definition: effects.h:470
#define effect_cell(x)
Definition: effects.h:640
#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 CAR(pcons)
Get the value of the first element of a list.
Definition: newgen_list.h:92
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
Definition: misc-local.h:145
int tag
TAG.
Definition: newgen_types.h:92
expression make_unbounded_expression()
Definition: expression.c:4339
bool expression_equal_p(expression e1, expression e2)
Syntactic equality e1==e2.
Definition: expression.c:1347
#define EXPRESSION_(x)
Definition: ri.h:1220
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217
#define preference_reference(x)
Definition: ri.h:2102
The structure used to build lists in NewGen.
Definition: newgen_list.h:41

References approximation_and(), approximation_tag, CAR, cell_preference, cell_preference_p, copy_action(), copy_reference(), effect_abstract_location_p(), effect_action, effect_any_reference, effect_approximation, effect_approximation_tag, effect_cell, effect_entity(), effect_scalar_p(), ENDP, entity_locations_max(), EXPRESSION, EXPRESSION_, expression_equal_p(), free_cell(), is_approximation_may, make_approximation(), make_cell_reference(), make_reference(), make_simple_effect, make_unbounded_expression(), NIL, pips_debug, POP, preference_reference, ref, reference_indices, and UU.

Referenced by effects_may_union().

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

◆ effect_must_union()

effect effect_must_union ( effect  eff1,
effect  eff2 
)

computes the must union of two combinable effects

Parameters
[in]eff1effect
[in]eff2
See also
effects_combinable_p
Returns
a new effect with no sharing with the input effects

Abstract locations cases

In fact, we could have : if (al1_p || al_2_p) { entity e1 = effect_entity(e1); entity e2 = effect_entity(e2);

new_ent = entity_locations_max(e1, e2);

eff = make_simple_effect(make_reference(new_ent, NIL), copy_action(effect_action(eff1)), make_approximation(approximation_and(app1,app2), UU)); }

but entity_locations_max involves string manipulations, which are always costly. So we treat apart the cases where (al1_p and ! al2_p) and (al2_p and ! al1_p) because we already know that the abstract location is the max of both locations (because they are combinable (see effects_combinable_p))

concrete locations cases

it's a preference : we change for a reference cell

let us check the indices

Parameters
eff1ff1
eff2ff2

Definition at line 272 of file binary_operators.c.

273 {
274  effect eff;
275  tag app1 = effect_approximation_tag(eff1);
276  tag app2 = effect_approximation_tag(eff2);
277 
278  bool al1_p = effect_abstract_location_p(eff1);
279  bool al2_p = effect_abstract_location_p(eff2);
280 
281  /* Abstract locations cases */
282  /* In fact, we could have :
283  if (al1_p || al_2_p)
284  {
285  entity e1 = effect_entity(e1);
286  entity e2 = effect_entity(e2);
287 
288  new_ent = entity_locations_max(e1, e2);
289 
290  eff = make_simple_effect(make_reference(new_ent, NIL),
291  copy_action(effect_action(eff1)),
292  make_approximation(approximation_and(app1,app2), UU));
293  }
294 
295  but entity_locations_max involves string manipulations, which are always costly.
296  So we treat apart the cases where (al1_p and ! al2_p) and (al2_p and ! al1_p) because
297  we already know that the abstract location is the max of both locations
298  (because they are combinable (see effects_combinable_p))
299 
300  */
301  if (al1_p && al2_p)
302  {
303  entity e1 = effect_entity(eff1);
304  entity e2 = effect_entity(eff2);
305 
306  entity new_ent = entity_locations_max(e1, e2);
307 
308  eff = make_simple_effect(make_reference(new_ent, NIL),
309  copy_action(effect_action(eff1)),
311  }
312  else if (al1_p) {
313  // functions that can be pointed by effect_dup_func:
314  // simple_effect_dup
315  // region_dup
316  // copy_effect
317  eff = (*effect_dup_func)(eff1);
318  }
319  else if (al2_p) {
320  // functions that can be pointed by effect_dup_func:
321  // simple_effect_dup
322  // region_dup
323  // copy_effect
324  eff = (*effect_dup_func)(eff2);
325  }
326 
327  /* concrete locations cases */
328  else if (effect_scalar_p(eff1))
329  {
331  copy_action(effect_action(eff1)),
332  make_approximation(approximation_or(app1,app2), UU));
333  }
334  else
335  {
336  // functions that can be pointed by effect_dup_func:
337  // simple_effect_dup
338  // region_dup
339  // copy_effect
340  eff = (*effect_dup_func)(eff1);
341  cell eff_c = effect_cell(eff);
342  if (cell_preference_p(eff_c))
343  {
344  /* it's a preference : we change for a reference cell */
345  pips_debug(8, "It's a preference\n");
347  free_cell(eff_c);
349  }
350 
351  /* let us check the indices */
354 
355  tag app_tag = approximation_or(app1,app2);
356 
357  for(; !ENDP(l1); POP(l1), POP(l2))
358  {
359  expression exp1 = EXPRESSION(CAR(l1));
360  expression exp2 = EXPRESSION(CAR(l2));
361  if (!expression_equal_p(exp1, exp2))
362  {
364  app_tag = is_approximation_may;
365  }
366  }
367 
368  effect_approximation_tag(eff) = app_tag;
369  }
370  return(eff);
371 }
tag approximation_or(tag, tag)
tag approximation_or(tag t1, tag t2) input : two approximation tags.
Definition: effects.c:1213

References approximation_and(), approximation_or(), CAR, cell_preference, cell_preference_p, copy_action(), copy_reference(), effect_abstract_location_p(), effect_action, effect_any_reference, effect_approximation_tag, effect_cell, effect_entity(), effect_scalar_p(), ENDP, entity_locations_max(), EXPRESSION, EXPRESSION_, expression_equal_p(), free_cell(), is_approximation_may, make_approximation(), make_cell_reference(), make_reference(), make_simple_effect, make_unbounded_expression(), NIL, pips_debug, POP, preference_reference, ref, reference_indices, and UU.

Referenced by effects_must_union().

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

◆ effect_to_constant_path_effects_with_points_to()

list effect_to_constant_path_effects_with_points_to ( effect  eff,
statement  s,
transformer  context 
)

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 ?

make the resulting effects action to the current effect action

This is dead code: no effects, do not modify le

Parameters
effff
contextontext

Definition at line 284 of file eval.c.

285 {
286  list le = NIL;
287  bool exact_p;
289 
290  pips_debug_effect(5, "input effect", eff);
291 
293  if(!points_to_list_bottom(ptl)) {
294  if (effect_reference_dereferencing_p(ref, &exact_p))
295  {
296  pips_debug(8, "dereferencing case \n");
297  bool exact_p = false;
298 #if false
302  else {
304  }
305 #endif
306 
308  points_to_list_list(ptl),
309  &exact_p, context);
310  if (ENDP(l_eval))
311  {
312  pips_debug(8, "no equivalent constant path found -> anywhere effect\n");
313  /* We have not found any equivalent constant path : it may point anywhere */
314  /* We should maybe contract these effects later. Is it done by the callers ? */
315  // le = CONS(EFFECT, make_anywhere_effect(copy_action(effect_action(eff))), le);
316  le = NIL; // A translation failure means an execution
317  // failure, at least according to the standard
318  }
319  else
320  {
321  /* make the resulting effects action to the current effect action */
322  // list l_eval_eff = cells_to_effects_according_to_effect(l_eval, eff, exact_p);
323 
324  if (effect_read_p(eff))
325  effects_to_read_effects(l_eval);
326  if (effect_may_p(eff))
327  effects_to_may_effects(l_eval);
328  le = gen_nconc(l_eval,le);
329  }
330  }
331  else
332  le = CONS(EFFECT, copy_effect(eff), le);
333  }
334  else {
335  /* This is dead code: no effects, do not modify le */
336  ;
337  }
338  return le;
339 
340 }
effect copy_effect(effect p)
EFFECT.
Definition: effects.c:448
#define pips_debug_effect(level, message, eff)
for debug
bool effects_private_current_context_empty_p(void)
void effects_to_may_effects(list)
transformer effects_private_current_context_head(void)
void effects_to_read_effects(list)
list eval_simple_cell_with_points_to(cell c, descriptor __attribute__((unused)) d, list ptl, bool *exact_p, transformer __attribute__((unused)) t)
Definition: eval.c:194
#define effect_may_p(eff)
#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 effect_descriptor(x)
Definition: effects.h:646
#define EFFECT(x)
EFFECT.
Definition: effects.h:608
#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 points_to_list_list(x)
#define points_to_list_bottom(x)
#define transformer_undefined
Definition: ri.h:2847
Definition: delay.c:253

References CONS, copy_effect(), EFFECT, effect_any_reference, effect_cell, effect_descriptor, effect_may_p, effect_read_p, effect_reference_dereferencing_p(), effects_private_current_context_empty_p(), effects_private_current_context_head(), effects_to_may_effects(), effects_to_read_effects(), ENDP, eval_simple_cell_with_points_to(), gen_nconc(), load_pt_to_list(), NIL, pips_debug, pips_debug_effect, points_to_list_bottom, points_to_list_list, ref, and transformer_undefined.

Referenced by add_values_for_simple_effects_of_statement(), c_user_call_to_transformer(), and simple_effect_to_constant_path_effects_with_points_to().

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

◆ effect_to_may_sdfi_list()

list effect_to_may_sdfi_list ( effect  )

Referenced by EffectsMayUnion().

+ Here is the caller graph for this function:

◆ effect_to_sdfi_list()

list effect_to_sdfi_list ( effect  )

Referenced by EffectsMustUnion().

+ Here is the caller graph for this function:

◆ effect_to_store_independent_sdfi_list()

list effect_to_store_independent_sdfi_list ( effect  ,
bool   
)

◆ effect_to_string()

string effect_to_string ( effect  )

◆ effects_dynamic_elim()

list effects_dynamic_elim ( list  )

◆ effects_may_union()

list effects_may_union ( effect  eff1,
effect  eff2 
)
Parameters
eff1ff1
eff2ff2

Definition at line 138 of file binary_operators.c.

139 {
140  list l_res = NIL;
141  l_res = CONS(EFFECT, effect_may_union(eff1,eff2), NIL);
142  return(l_res);
143 }
effect effect_may_union(effect eff1, effect eff2)
Preserve store independent information as long as you can.

References CONS, EFFECT, effect_may_union(), and NIL.

Referenced by EffectsMayUnion().

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

◆ effects_must_union()

list effects_must_union ( effect  eff1,
effect  eff2 
)
Parameters
eff1ff1
eff2ff2

Definition at line 145 of file binary_operators.c.

146 {
147  list l_res = NIL;
148  l_res = CONS(EFFECT, effect_must_union(eff1,eff2), NIL);
149  return(l_res);
150 }
effect effect_must_union(effect eff1, effect eff2)
computes the must union of two combinable effects

References CONS, EFFECT, effect_must_union(), and NIL.

Referenced by EffectsMustUnion(), and ProperEffectsMustUnion().

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

◆ EffectsInfDifference()

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

list EffectsInfDifference(list l1, l2) input : two lists of effects output : a list of effect, representing the inf_difference of the initial effects.

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

Parameters
l11
l22

Definition at line 462 of file binary_operators.c.

464 {
465  list l_res = NIL;
466 
467  debug(3, "EffectsInfDifference", "begin\n");
469  difference_combinable_p,
471  debug(3, "EffectsInfDifference", "end\n");
472 
473  return l_res;
474 }
list list_of_effects_generic_inf_difference_op(list, list, bool(*)(effect, effect), list(*)(effect, effect))
static list effect_inf_difference(effect eff1 __attribute__((unused)), effect eff2 __attribute__((unused)))
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
Definition: debug.c:189

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

+ Here is the call graph for this function:

◆ EffectsMayUnion()

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

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

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

Parameters
l11
l22

Definition at line 87 of file binary_operators.c.

89 {
90  list lr;
91 
93  union_combinable_p,
96  return(lr);
97 }
list list_of_effects_generic_union_op(list, list, bool(*)(effect, effect), list(*)(effect, effect), list(*)(effect))
list effects_may_union(effect eff1, effect eff2)
list effect_to_may_sdfi_list(effect)

References effect_to_may_sdfi_list(), effects_may_union(), and list_of_effects_generic_union_op().

Referenced by unstructured_to_effects().

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

◆ EffectsMustUnion()

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

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

Effects that are not reused in the output list of effects are freed.

Parameters
l11
l22

Definition at line 126 of file binary_operators.c.

128 {
129  list lr;
130 
132  union_combinable_p,
135  return(lr);
136 }
list effects_must_union(effect eff1, effect eff2)
list effect_to_sdfi_list(effect)

References effect_to_sdfi_list(), effects_must_union(), and list_of_effects_generic_union_op().

+ Here is the call graph for this function:

◆ EffectsSupDifference()

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

list EffectsSupDifference(list l1, l2) input : two lists of effects output : a list of effect, representing the sup_difference of the initial effects.

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

Parameters
l11
l22

Definition at line 438 of file binary_operators.c.

440 {
441  list l_res = NIL;
442 
443  debug(3, "EffectsSupDifference", "begin\n");
445  difference_combinable_p,
447  debug(3, "EffectsSupDifference", "end\n");
448 
449  return l_res;
450 }
list list_of_effects_generic_sup_difference_op(list, list, bool(*)(effect, effect), list(*)(effect, effect))
static list effect_sup_difference(effect eff1, effect eff2)

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

+ Here is the call graph for this function:

◆ eval_cell_with_points_to()

list eval_cell_with_points_to ( cell  c,
list  ptl,
bool exact_p 
)

for backward compatibility

Parameters
ptltl
exact_pxact_p

Definition at line 352 of file eval.c.

353 {
355  list l = NIL;
356 
357  FOREACH(EFFECT,eff, l_eff)
358  {
359  l = CONS(CELL, effect_cell(eff), l);
361  }
362  gen_full_free_list(l_eff);
363  return l;
364 }
#define cell_undefined
Definition: effects.h:430
#define CELL(x)
CELL.
Definition: effects.h:424
#define descriptor_undefined
Definition: effects.h:559
void gen_full_free_list(list l)
Definition: genClib.c:1023
#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

References CELL, cell_undefined, CONS, descriptor_undefined, EFFECT, effect_cell, eval_simple_cell_with_points_to(), FOREACH, gen_full_free_list(), NIL, and transformer_undefined.

+ Here is the call graph for this function:

◆ eval_simple_cell_with_points_to()

list eval_simple_cell_with_points_to ( cell  ,
descriptor  ,
list  ,
bool ,
transformer   
)

◆ expression_invariant_wrt_effects()

bool expression_invariant_wrt_effects ( expression  ,
list   
)

◆ expression_to_proper_constant_path_effects()

◆ expression_to_proper_constant_path_effects_with_points_to()

list expression_to_proper_constant_path_effects_with_points_to ( expression  ,
statement   
)

◆ expression_to_proper_effects()

list expression_to_proper_effects ( expression  e)

Definition at line 131 of file gfc2pips-stubs.c.

131  {
132  STUB_ERROR();
133 }
#define STUB_ERROR()

References STUB_ERROR.

Referenced by expr_has_write_eff_ref_p(), regenerate_call(), simd_supported_stat_p(), and statement_clean_declarations_helper().

+ Here is the caller graph for this function:

◆ expression_with_side_effect_p()

bool expression_with_side_effect_p ( expression  )

Referenced by copy_n_reference().

+ Here is the caller graph for this function:

◆ filter_proper_effects()

bool filter_proper_effects ( const char *  module_name)

filter_proper_effects.c

gets what is needed from PIPS DBM

returns the result to the DBM...

Parameters
module_nameodule_name

Definition at line 201 of file filter_proper_effects.c.

202 {
203  debug_on("FILTER_PROPER_EFFECTS_DEBUG_LEVEL");
204  pips_debug(1, "considering module %s\n", module_name);
205 
206  /* gets what is needed from PIPS DBM
207  */
210  db_get_memory_resource(DBR_CODE, module_name, true));
212  db_get_memory_resource(DBR_PROPER_EFFECTS, module_name, true));
213 
215 
219 
222 
223  /* returns the result to the DBM... */
225  (DBR_FILTERED_PROPER_EFFECTS, module_name, NULL);
226 
230 
231  debug_off();
232  return true;
233 }
void reset_proper_rw_effects(void)
void set_proper_rw_effects(statement_effects)
const char * module_name(const char *s)
Return the module part of an entity name.
Definition: entity_names.c:296
static list variables_to_filter
of entity
static list get_variables_to_filter()
of entity
static bool stmt_flt(statement s)
#define gen_recurse(start, domain_number, flt, rwt)
Definition: genC.h:283
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
statement get_current_module_statement(void)
Get the current module statement.
Definition: static.c:208
entity set_current_module_entity(entity)
static.c
Definition: static.c:66
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
Definition: genClib.c:2752
void gen_free_list(list l)
free the spine of the list
Definition: list.c:327
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
#define DB_PUT_MEMORY_RESOURCE(res_name, own_name, res_val)
conform to old interface.
Definition: pipsdbm-local.h:66
#define debug_on(env)
Definition: misc-local.h:157
#define debug_off()
Definition: misc-local.h:160
entity local_name_to_top_level_entity(const char *n)
This function try to find a top-level entity from a local name.
Definition: entity.c:1450
#define statement_domain
newgen_sizeofexpression_domain_defined
Definition: ri.h:362

References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, gen_free_list(), gen_null(), gen_recurse, get_current_module_statement(), get_variables_to_filter(), local_name_to_top_level_entity(), module_name(), NIL, pips_debug, reset_current_module_entity(), reset_current_module_statement(), reset_proper_rw_effects(), set_current_module_entity(), set_current_module_statement(), set_proper_rw_effects(), statement_domain, stmt_flt(), and variables_to_filter.

+ Here is the call graph for this function:

◆ fortran_summary_to_proper_effects()

list fortran_summary_to_proper_effects ( entity  ,
list  ,
list   
)

◆ full_simple_proper_effects()

bool full_simple_proper_effects ( const char *  ,
statement   
)

Referenced by perform_icm_association().

+ Here is the caller graph for this function:

◆ get_list_of_variable_to_filter()

list get_list_of_variable_to_filter ( void  )

Referenced by make_filtered_dg_or_dvdg().

+ Here is the caller graph for this function:

◆ get_text_cumulated_effects()

text get_text_cumulated_effects ( const  string)
Parameters
stringodule_name

◆ get_text_cumulated_pointer_effects()

text get_text_cumulated_pointer_effects ( const  string)
Parameters
stringodule_name

◆ get_text_proper_effects()

text get_text_proper_effects ( const  string)
Parameters
stringodule_name

◆ get_text_proper_pointer_effects()

text get_text_proper_pointer_effects ( const  string)
Parameters
stringodule_name

◆ in_effects()

bool in_effects ( const  string)
Parameters
stringodule_name

◆ in_summary_effects()

bool in_summary_effects ( const  string)
Parameters
stringodule_name

◆ is_implied_do_index()

bool is_implied_do_index ( entity  ,
instruction   
)

Referenced by quick_privatize_statement_pair().

+ Here is the caller graph for this function:

◆ lhs_expression_to_proper_constant_path_effects()

list lhs_expression_to_proper_constant_path_effects ( expression  )

◆ live_in_summary_paths()

bool live_in_summary_paths ( const  string)
Parameters
stringodule_name

◆ live_out_summary_paths()

bool live_out_summary_paths ( const  string)
Parameters
stringodule_name

◆ live_paths()

bool live_paths ( const  string)
Parameters
stringodule_name

◆ make_unknown_subscript()

list make_unknown_subscript ( int  )

◆ old_effects_composition_with_effect_transformer()

list old_effects_composition_with_effect_transformer ( list  ,
transformer   
)

◆ out_effects()

bool out_effects ( const  string)
Parameters
stringodule_name

Referenced by potential_out_effects_p().

+ Here is the caller graph for this function:

◆ out_summary_effects()

bool out_summary_effects ( const  string)
Parameters
stringodule_name

◆ path_preceding_p()

bool path_preceding_p ( effect  eff1,
effect  eff2,
transformer  current_precondition,
bool  strict_p,
bool exact_p 
)
Parameters
eff1ff1
eff2ff2
current_preconditionurrent_precondition
strict_ptrict_p
exact_pxact_p

Definition at line 132 of file eval.c.

136 {
137  reference r1 = effect_any_reference(eff1);
138  descriptor d1 = effect_descriptor(eff1);
139  reference r2 = effect_any_reference(eff2);
140  descriptor d2 = effect_descriptor(eff2);
141 
143  strict_p, exact_p);
144 }
bool simple_cell_reference_preceding_p(reference r1, descriptor __attribute__((unused)) d1, reference r2, descriptor __attribute__((unused)) d2, transformer __attribute__((unused)) current_precondition, bool strict_p, bool *exact_p)
Definition: eval.c:60
static transformer current_precondition

References current_precondition, effect_any_reference, effect_descriptor, and simple_cell_reference_preceding_p().

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:

◆ print_call_graph_with_cumulated_effects()

bool print_call_graph_with_cumulated_effects ( const  string)
Parameters
stringodule_name

◆ print_call_graph_with_proper_effects()

bool print_call_graph_with_proper_effects ( const  string)
Parameters
stringodule_name

◆ print_code_as_a_graph_cumulated_effects()

bool print_code_as_a_graph_cumulated_effects ( const  string)
Parameters
stringod_name

◆ print_code_as_a_graph_proper_effects()

bool print_code_as_a_graph_proper_effects ( const  string)
Parameters
stringod_name

◆ print_code_cumulated_effects()

bool print_code_cumulated_effects ( const  string)
Parameters
stringodule_name

◆ print_code_cumulated_pointer_effects()

bool print_code_cumulated_pointer_effects ( const  string)
Parameters
stringodule_name

◆ print_code_cumulated_references()

bool print_code_cumulated_references ( const  string)
Parameters
stringodule_name

◆ print_code_in_effects()

bool print_code_in_effects ( const  string)
Parameters
stringodule_name

◆ print_code_live_in_paths()

bool print_code_live_in_paths ( const  string)
Parameters
stringodule_name

◆ print_code_live_out_paths()

bool print_code_live_out_paths ( const  string)
Parameters
stringodule_name

◆ print_code_out_effects()

bool print_code_out_effects ( const  string)
Parameters
stringodule_name

◆ print_code_proper_effects()

bool print_code_proper_effects ( const  string)
Parameters
stringodule_name

◆ print_code_proper_pointer_effects()

bool print_code_proper_pointer_effects ( const  string)
Parameters
stringodule_name

◆ print_code_proper_references()

bool print_code_proper_references ( const  string)
Parameters
stringodule_name

◆ print_dvicfg_with_filtered_proper_effects()

bool print_dvicfg_with_filtered_proper_effects ( const  string)
Parameters
stringodule_name

◆ print_effect()

void print_effect ( effect  )

◆ print_effects()

void print_effects ( list  )

◆ print_icfg_with_control_cumulated_effects()

bool print_icfg_with_control_cumulated_effects ( const  string)
Parameters
stringodule_name

◆ print_icfg_with_control_proper_effects()

bool print_icfg_with_control_proper_effects ( const  string)
Parameters
stringodule_name

◆ print_icfg_with_cumulated_effects()

bool print_icfg_with_cumulated_effects ( const  string)
Parameters
stringodule_name

◆ print_icfg_with_filtered_proper_effects()

bool print_icfg_with_filtered_proper_effects ( const  string)
Parameters
stringodule_name

◆ print_icfg_with_loops_cumulated_effects()

bool print_icfg_with_loops_cumulated_effects ( const  string)
Parameters
stringodule_name

◆ print_icfg_with_loops_proper_effects()

bool print_icfg_with_loops_proper_effects ( const  string)
Parameters
stringodule_name

◆ print_icfg_with_proper_effects()

bool print_icfg_with_proper_effects ( const  string)
Parameters
stringodule_name

◆ print_memory_effects()

void print_memory_effects ( list  )

◆ print_source_cumulated_effects()

bool print_source_cumulated_effects ( const  string)
Parameters
stringodule_name

◆ print_source_in_effects()

bool print_source_in_effects ( const  string)
Parameters
stringodule_name

◆ print_source_out_effects()

bool print_source_out_effects ( const  string)
Parameters
stringodule_name

◆ print_source_proper_effects()

bool print_source_proper_effects ( const  string)
Parameters
stringodule_name

◆ proper_constant_path_effects_of_any_expression()

list proper_constant_path_effects_of_any_expression ( expression  ,
bool   
)

◆ proper_constant_path_effects_of_expression()

list proper_constant_path_effects_of_expression ( expression  )

◆ proper_constant_path_effects_of_expression_with_points_to()

list proper_constant_path_effects_of_expression_with_points_to ( expression  ,
statement   
)

◆ proper_constant_path_effects_of_lhs_expression()

list proper_constant_path_effects_of_lhs_expression ( expression  )

◆ proper_effects()

bool proper_effects ( const  string)
Parameters
stringodule_name

Referenced by do_kernelize().

+ Here is the caller graph for this function:

◆ proper_effects_of_expression()

◆ proper_effects_of_range()

list proper_effects_of_range ( range  )

Referenced by quick_privatize_statement_pair().

+ Here is the caller graph for this function:

◆ proper_effects_with_pointer_values()

bool proper_effects_with_pointer_values ( const  string)
Parameters
stringodule_name

◆ proper_effects_with_points_to()

bool proper_effects_with_points_to ( const  string)
Parameters
stringodule_name

◆ proper_pointer_effects()

bool proper_pointer_effects ( const  string)
Parameters
stringodule_name

◆ proper_references()

bool proper_references ( const  string)
Parameters
stringodule_name

◆ proper_to_summary_simple_effect()

effect proper_to_summary_simple_effect ( effect  eff)

FI: the goal is to get rid of array subscripts to handle the arrays atomically.

This is not possible with pointer indexing. For instance, p[0] is reduced the Fortran way into p, which is wrong. It could be reduced to p[*] and lead to an anywhere effects. Or we must preserve constant indices (store independent), which is the way to go with C since we transform lots of scalar accesses into array accesses.

FI: I do not understand the mix of side effects on eff, free and alloc conditionnaly for some fields. To be checked.

it's a preference : we change for a reference cell

it's a reference : let'us modify it

it may still be a field entity

Parameters
effff

Definition at line 488 of file binary_operators.c.

489 {
490  if (!effect_scalar_p(eff)) {
491  cell eff_c = effect_cell(eff);
492  bool may_p = false;
494 
495  if (cell_preference_p(eff_c))
496  {
497  /* it's a preference : we change for a reference cell */
498  pips_debug(8, "It's a preference\n");
500  free_cell(eff_c);
502  }
503  else
504  {
505  /* it's a reference : let'us modify it */
506  ref = cell_reference(eff_c);
507  }
508 
509  ifdebug(8) {
510  pips_debug(8, "Proper effect %p with reference %p: %s\n", eff, ref,
512  }
513 
514  list inds = reference_indices(ref);
515  list cind = list_undefined;
516  for(cind = inds; !ENDP(cind); POP(cind)) {
517  expression se = EXPRESSION(CAR(cind));
518 
519  ifdebug(8) {
520  pips_debug(8, "Subscript expression :\n");
521  print_expression(se);
522  }
523 
525  if(!unbounded_expression_p(se))
526  {
527  /* it may still be a field entity */
528  if (!(expression_reference_p(se) &&
530  {
531  may_p = true;
532  free_expression(se);
534  }
535  }
536  }
537  }
538 
539  if(may_p)
541 
542  ifdebug(8) {
543  pips_debug(8, "Summary simple effect %p with reference %p: %s\n", eff, ref,
545  }
546 
547  /*
548  if(!reference_with_constant_indices_p(r)) {
549  reference nr = pointer_type_p(ut)?
550  make_reference(e, CONS(EXPRESSION, make_unbounded_expression(), NIL))
551  : make_reference(e, NIL);
552  free_reference(effect_any_reference(eff));
553  if(cell_preference_p(c)) {
554  preference p = cell_preference(c);
555  preference_reference(p) = nr;
556  }
557  else {
558  cell_reference(c) = nr;
559  }
560  }
561  */
562  }
563  return(eff);
564 }
void free_expression(expression p)
Definition: ri.c:853
list words_effect(effect)
#define cell_reference(x)
Definition: effects.h:469
#define list_undefined
Undefined list definition :-)
Definition: newgen_list.h:69
void print_expression(expression e)
no file descriptor is passed to make is easier to use in a debugging stage.
Definition: expression.c:58
bool entity_field_p(entity e)
e is the field of a structure
Definition: entity.c:857
bool extended_integer_constant_expression_p(expression e)
More extensive than next function.
Definition: expression.c:858
bool expression_reference_p(expression e)
Test if an expression is a reference.
Definition: expression.c:528
bool unbounded_expression_p(expression e)
Definition: expression.c:4329
entity expression_variable(expression e)
Definition: expression.c:532
#define reference_undefined
Definition: ri.h:2302
#define ifdebug(n)
Definition: sg.c:47
string words_to_string(cons *lw)
Definition: print.c:211

References CAR, cell_preference, cell_preference_p, cell_reference, copy_reference(), effect_approximation_tag, effect_cell, effect_scalar_p(), ENDP, entity_field_p(), EXPRESSION, EXPRESSION_, expression_reference_p(), expression_variable(), extended_integer_constant_expression_p(), free_cell(), free_expression(), ifdebug, is_approximation_may, list_undefined, make_cell_reference(), make_unbounded_expression(), pips_debug, POP, preference_reference, print_expression(), ref, reference_indices, reference_undefined, unbounded_expression_p(), words_effect(), and words_to_string().

+ Here is the call graph for this function:

◆ ProperEffectsMustUnion()

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

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

Effects that are not reused in the output list of effects are freed.

Parameters
l11
l22

Definition at line 107 of file binary_operators.c.

109 {
110  list lr;
111 
113  union_combinable_p,
116  return(lr);
117 }
list effect_to_list(effect)

References effect_to_list(), effects_must_union(), and list_of_effects_generic_union_op().

+ Here is the call graph for this function:

◆ rcumulated_effects_of_statement()

void rcumulated_effects_of_statement ( statement  )

◆ reference_to_reference_effect()

effect reference_to_reference_effect ( reference  ,
action  ,
bool   
)

Referenced by add_values_for_simple_effects_of_statement().

+ Here is the caller graph for this function:

◆ reference_to_simple_effect()

effect reference_to_simple_effect ( reference  ,
action  ,
bool   
)

unary_operators.c

◆ ReferenceTestUnion()

list ReferenceTestUnion ( list  ,
list  ,
bool(*)(effect, effect  
)

◆ ReferenceUnion()

list ReferenceUnion ( list  ,
list  ,
bool(*)(effect, effect  
)

cproto-generated files

binary_operators.c

◆ reset_methods_for_effects_prettyprint()

void reset_methods_for_effects_prettyprint ( const char *  )

Referenced by sesam_buffers_processing().

+ Here is the caller graph for this function:

◆ reset_methods_for_inout_effects()

void reset_methods_for_inout_effects ( void  )

◆ rproper_effects_of_statement()

void rproper_effects_of_statement ( statement  )

◆ set_default_methods_for_proper_simple_effects()

void set_default_methods_for_proper_simple_effects ( void  )

◆ set_methods_for_cumulated_references()

void set_methods_for_cumulated_references ( void  )

◆ set_methods_for_inout_effects()

void set_methods_for_inout_effects ( const char *  )

◆ set_methods_for_inout_effects_prettyprint()

void set_methods_for_inout_effects_prettyprint ( const char *  )

◆ set_methods_for_live_in_paths_prettyprint()

void set_methods_for_live_in_paths_prettyprint ( const char *  )

◆ set_methods_for_live_out_paths_prettyprint()

void set_methods_for_live_out_paths_prettyprint ( const char *  )

◆ set_methods_for_live_paths()

void set_methods_for_live_paths ( const char *  )

◆ set_methods_for_proper_references()

void set_methods_for_proper_references ( void  )

methods.c

◆ set_methods_for_proper_simple_effects()

◆ set_methods_for_proper_simple_pointer_effects()

void set_methods_for_proper_simple_pointer_effects ( void  )

◆ set_methods_for_rw_effects_prettyprint()

void set_methods_for_rw_effects_prettyprint ( const char *  )

Referenced by sesam_buffers_processing().

+ Here is the caller graph for this function:

◆ set_methods_for_simple_effects()

void set_methods_for_simple_effects ( void  )

◆ set_methods_for_simple_pointer_effects()

void set_methods_for_simple_pointer_effects ( void  )

◆ simple_cell_preceding_p()

bool simple_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 119 of file eval.c.

124 {
125  reference r1 = cell_any_reference(c1);
126  reference r2 = cell_any_reference(c2);
127 
129  strict_p, exact_p);
130 }
reference cell_any_reference(cell)
API for reference.
Definition: effects.c:77

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

Referenced by effect_find_aliased_paths_with_pointer_values(), and make_simple_pv_context().

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

◆ simple_cell_reference_preceding_p()

bool simple_cell_reference_preceding_p ( reference  ,
descriptor  ,
reference  ,
descriptor  ,
transformer  ,
bool  ,
bool  
)

eval.c

Referenced by kill_pointer_value(), and make_simple_pv_from_simple_effects().

+ Here is the caller graph for this function:

◆ simple_cell_reference_with_address_of_cell_reference_translation()

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

Referenced by eval_simple_cell_with_points_to(), make_simple_pv_context(), and simple_pv_translate().

+ Here is the caller graph for this function:

◆ simple_cell_reference_with_address_of_cell_reference_translation_fi()

bool simple_cell_reference_with_address_of_cell_reference_translation_fi ( reference  ,
descriptor  ,
reference  ,
descriptor  ,
int  ,
reference ,
descriptor ,
bool  
)

◆ simple_cell_reference_with_value_of_cell_reference_translation()

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

Referenced by make_simple_pv_context(), and simple_pv_translate().

+ Here is the caller graph for this function:

◆ simple_cell_to_simple_cell_conversion()

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

Definition at line 154 of file eval.c.

157 {
158  *output_cell = input_cell;
159  *output_desc = make_descriptor(is_descriptor_none,UU);
160 }
descriptor make_descriptor(enum descriptor_utype tag, void *val)
Definition: effects.c:433
@ is_descriptor_none
Definition: effects.h:576

References is_descriptor_none, make_descriptor(), and UU.

Referenced by effect_find_aliased_paths_with_pointer_values(), and effect_find_equivalent_pointer_values().

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

◆ simple_cell_to_store_independent_cell()

cell simple_cell_to_store_independent_cell ( cell  ,
bool  
)

◆ simple_cell_with_address_of_cell_translation()

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

Referenced by effect_find_aliased_paths_with_pointer_values().

+ Here is the caller graph for this function:

◆ simple_cell_with_value_of_cell_translation()

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

Referenced by effect_find_aliased_paths_with_pointer_values().

+ Here is the caller graph for this function:

◆ simple_cells_inclusion_p()

bool simple_cells_inclusion_p ( cell  ,
descriptor  ,
cell  ,
descriptor  ,
bool  
)

◆ simple_cells_intersection_p()

bool simple_cells_intersection_p ( cell  ,
descriptor  ,
cell  ,
descriptor  ,
bool  
)

◆ simple_cumulated_effects()

bool simple_cumulated_effects ( const char *  ,
statement   
)

◆ simple_effect_add_expression_dimension()

void simple_effect_add_expression_dimension ( effect  ,
expression   
)

◆ simple_effect_change_ith_dimension_expression()

void simple_effect_change_ith_dimension_expression ( effect  ,
expression  ,
int   
)

◆ simple_effect_descriptor_interprocedural_translation()

void simple_effect_descriptor_interprocedural_translation ( effect  )

◆ simple_effect_dup()

effect simple_effect_dup ( effect  )

Referenced by set_generic_effects_as_needed().

+ Here is the caller graph for this function:

◆ simple_effect_field_to_rank_conversion()

effect simple_effect_field_to_rank_conversion ( effect  )

◆ simple_effect_to_constant_path_effects_with_pointer_values()

list simple_effect_to_constant_path_effects_with_pointer_values ( effect  eff)

it should be a union here. However, we expect the caller to perform the contraction afterwards.

Parameters
effff

Definition at line 206 of file eval.c.

207 {
208  list le = NIL;
209  bool exact_p;
211 
212  if (effect_reference_dereferencing_p(ref, &exact_p))
213  {
214  pips_debug(8, "dereferencing case \n");
215  bool exact_p = false;
218  list l_aliased = effect_find_aliased_paths_with_pointer_values(eff, l_pv, &ctxt);
219  pips_debug_effects(8, "aliased effects\n", l_aliased);
220  reset_pv_context(&ctxt);
221 
222  FOREACH(EFFECT, eff_alias, l_aliased)
223  {
224  entity ent_alias = effect_entity(eff_alias);
225  if (undefined_pointer_value_entity_p(ent_alias)
226  || null_pointer_value_entity_p(ent_alias))
227  {
228  // currently interpret them as anywhere effects since these values
229  // are not yet well integrated in abstract locations lattice
230  // and in effects computations
231  // to be FIXED later.
232  le = CONS(EFFECT, make_anywhere_effect(copy_action(effect_action(eff_alias))), le);
233  free_effect(eff_alias);
234  }
235  else if (entity_abstract_location_p(effect_entity(eff_alias))
236  || !effect_reference_dereferencing_p(effect_any_reference(eff_alias), &exact_p)) {
237  le = CONS(EFFECT, eff_alias, le);
238  /* it should be a union here.
239  * However, we expect the caller
240  * to perform the contraction afterwards. */
241  }
242  else
243  free_effect(eff_alias);
244  }
245  gen_free_list(l_aliased);
246  }
247  else {
248  // functions that can be pointed by effect_dup_func:
249  // simple_effect_dup
250  // region_dup
251  // copy_effect
252  le = CONS(EFFECT, (*effect_dup_func)(eff), le);
253  }
254 
255  return le;
256 }
void free_effect(effect p)
Definition: effects.c:451
bool entity_abstract_location_p(entity al)
#define pips_debug_effects(level, message, l_eff)
effect make_anywhere_effect(action)
statement effects_private_current_stmt_head(void)
effect(* effect_dup_func)(effect eff)
bool undefined_pointer_value_entity_p(entity)
bool null_pointer_value_entity_p(entity)
#define cell_relations_list(x)
Definition: effects.h:549
pv_context make_simple_pv_context(void)
cell_relations load_pv(statement)
list effect_find_aliased_paths_with_pointer_values(effect, list, pv_context *)
find all paths equivalent to eff cell in l_pv by performing a transitive closure
void reset_pv_context(pv_context *)
pv_context is a structure holding the methods to use during pointer values analyses

References cell_relations_list, CONS, copy_action(), EFFECT, effect_action, effect_any_reference, effect_dup_func, effect_entity(), effect_find_aliased_paths_with_pointer_values(), effect_reference_dereferencing_p(), effects_private_current_stmt_head(), entity_abstract_location_p(), FOREACH, free_effect(), gen_free_list(), load_pv(), make_anywhere_effect(), make_simple_pv_context(), NIL, null_pointer_value_entity_p(), pips_debug, pips_debug_effects, ref, reset_pv_context(), and undefined_pointer_value_entity_p().

+ Here is the call graph for this function:

◆ simple_effect_to_constant_path_effects_with_points_to()

list simple_effect_to_constant_path_effects_with_points_to ( effect  eff)
Parameters
effff

Definition at line 343 of file eval.c.

344 {
348 }
list effect_to_constant_path_effects_with_points_to(effect eff, statement s, transformer context)
Definition: eval.c:284

References effect_to_constant_path_effects_with_points_to(), effects_private_current_context_head(), and effects_private_current_stmt_head().

+ Here is the call graph for this function:

◆ simple_effects_backward_translation()

list simple_effects_backward_translation ( entity  ,
list  ,
list  ,
transformer   
)

◆ simple_effects_composition_with_effect_transformer()

list simple_effects_composition_with_effect_transformer ( list  ,
transformer   
)

◆ simple_effects_descriptor_normalize()

void simple_effects_descriptor_normalize ( list  )

◆ simple_effects_forward_translation()

list simple_effects_forward_translation ( entity  ,
list  ,
list  ,
transformer   
)

◆ simple_effects_translation_end()

void simple_effects_translation_end ( void  )

◆ simple_effects_translation_init()

void simple_effects_translation_init ( entity  ,
list  ,
bool   
)

interprocedural.c

◆ simple_effects_union_over_range()

list simple_effects_union_over_range ( list  ,
entity  ,
range  ,
descriptor   
)

◆ simple_inout_effects_to_text()

text simple_inout_effects_to_text ( list  )

◆ simple_live_in_paths_to_text()

text simple_live_in_paths_to_text ( list  )

◆ simple_live_out_paths_to_text()

text simple_live_out_paths_to_text ( list  )

◆ simple_reference_to_simple_reference_conversion()

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

Definition at line 146 of file eval.c.

149 {
150  *output_ref = ref;
151  *output_desc = make_descriptor(is_descriptor_none,UU);
152 }

References is_descriptor_none, make_descriptor(), ref, and UU.

Referenced by eval_simple_cell_with_points_to().

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

◆ simple_reference_to_store_independent_reference()

reference simple_reference_to_store_independent_reference ( reference  ,
bool  
)

◆ simple_rw_effects_to_text()

text simple_rw_effects_to_text ( list  )

prettyprint.c

◆ statement_to_effects()

◆ summary_effect_to_proper_effect()

list summary_effect_to_proper_effect ( call  ,
effect   
)

Referenced by summary_to_proper_reference().

+ Here is the caller graph for this function:

◆ summary_effects()

bool summary_effects ( const  string)
Parameters
stringodule_name

◆ summary_pointer_effects()

bool summary_pointer_effects ( const  string)
Parameters
stringodule_name

◆ summary_to_proper_effects()

list summary_to_proper_effects ( entity  ,
list  ,
list   
)

◆ translate_effect_to_sdfi_effect()

effect translate_effect_to_sdfi_effect ( effect  )

◆ update_loops_locals()

bool update_loops_locals ( const char *  ,
statement   
)

Referenced by do_it().

+ Here is the caller graph for this function:

◆ words_effect()

◆ words_effect_generic()

list words_effect_generic ( effect  ,
bool   
)

◆ words_effect_without_approximation()

list words_effect_without_approximation ( effect  )