PIPS
points_to.c File Reference
#include <stdio.h>
#include <string.h>
#include "genC.h"
#include "linear.h"
#include "misc.h"
#include "properties.h"
#include "ri.h"
#include "effects.h"
#include "ri-util.h"
#include "prettyprint.h"
#include "effects-util.h"
#include "text-util.h"
#include "effects-simple.h"
#include "pips-libs.h"
#include "transformer.h"
+ Include dependency graph for points_to.c:

Go to the source code of this file.

Functions

points_to_graph get_points_to_graph_from_statement (_UNUSED_ statement st)
 Interface with points-to library. More...
 
list expression_to_points_to_sinks (_UNUSED_ expression e, _UNUSED_ points_to_graph in)
 
list expression_to_points_to_sources (_UNUSED_ expression e, _UNUSED_ points_to_graph in)
 
set user_call_to_points_to_interprocedural_binding_set (call c, pt_map pt_caller)
 Compute the binding relations in a complete interprocedural way: be as accurate as possible. More...
 
list semantics_expression_to_points_to_sources (expression e)
 Special wrapping for the semantics analyses. More...
 
list semantics_expression_to_points_to_sinks (expression e)
 Returns a list of cells. More...
 
transformer substitute_scalar_stub_in_transformer (transformer tf, entity se, entity de, bool backward_p, list *ppl)
 If both "se", source entity, and "de", destination entity, are defined, substitute the values of "se" by the values of "de" in "backward_p" mode, when translating a callee transformer at a call site of a caller. More...
 
transformer substitute_struct_stub_in_transformer (transformer t, reference l, type lt, reference r, type rt __attribute__((unused)), bool backward_p, list *ppl)
 
static bool relevant_translation_pair_p (points_to pt, list ll)
 The sources of the relevant points-to. More...
 
transformer substitute_stubs_in_transformer (transformer tf, call c, statement s, bool backward_p)
 Exploit the binding map to substitute calles's stubs by actual arguments, which may be stubs of the callers,. More...
 
static transformer substitute_stubs_in_transformer_with_translation_binding (transformer tf, pt_map binding_g, bool backward_p)
 
transformer new_substitute_stubs_in_transformer (transformer tf, call c, statement s, bool backward_p)
 

Function Documentation

◆ expression_to_points_to_sinks()

list expression_to_points_to_sinks ( _UNUSED_ expression  e,
_UNUSED_ points_to_graph  in 
)

Definition at line 63 of file points_to.c.

66 {
67  pips_internal_error("points-to library not available");
68  return NIL;
69 }
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
#define pips_internal_error
Definition: misc-local.h:149

References NIL, and pips_internal_error.

Referenced by semantics_expression_to_points_to_sinks().

+ Here is the caller graph for this function:

◆ expression_to_points_to_sources()

list expression_to_points_to_sources ( _UNUSED_ expression  e,
_UNUSED_ points_to_graph  in 
)

Definition at line 71 of file points_to.c.

74 {
75  pips_internal_error("points-to library not available");
76  return NIL;
77 }

References NIL, and pips_internal_error.

Referenced by semantics_expression_to_points_to_sources().

+ Here is the caller graph for this function:

◆ get_points_to_graph_from_statement()

points_to_graph get_points_to_graph_from_statement ( _UNUSED_ statement  st)

Interface with points-to library.

Definition at line 56 of file points_to.c.

58 {
59  pips_internal_error("points-to library not available");
60  return NULL;
61 }

References pips_internal_error.

Referenced by new_substitute_stubs_in_transformer(), semantics_expression_to_points_to_sinks(), semantics_expression_to_points_to_sources(), and substitute_stubs_in_transformer().

+ Here is the caller graph for this function:

◆ new_substitute_stubs_in_transformer()

transformer new_substitute_stubs_in_transformer ( transformer  tf,
call  c,
statement  s,
bool  backward_p 
)

This leads to an empty transformer because the statement is unreachable. Some kind of dereferencement error has occured earlier in the execution

Parameters
tff
backward_packward_p

Definition at line 417 of file points_to.c.

418 {
419  if(pt_to_list_undefined_p()) {
420  // Return tf as is
421  }
422  else {
424  bool bottom_p = points_to_graph_bottom(ptg);
425 
426  if(bottom_p) {
427  /* This leads to an empty transformer because the statement is
428  * unreachable. Some kind of dereferencement error has occured
429  * earlier in the execution
430  */
431  free_transformer(tf);
432  tf = transformer_empty();
433  }
434  else {
436  pt_map binding_g = make_points_to_graph(false, binding);
437  tf = substitute_stubs_in_transformer_with_translation_binding(tf, binding_g, backward_p);
438  free_points_to_graph(binding_g);
439  }
440  }
441  return tf;
442 }
void free_points_to_graph(points_to_graph p)
points_to_graph make_points_to_graph(bool a1, set a2)
void free_transformer(transformer p)
Definition: ri.c:2616
transformer transformer_empty()
Allocate an empty transformer.
Definition: basic.c:120
bool pt_to_list_undefined_p(void)
points_to.c
#define points_to_graph_bottom(x)
static transformer substitute_stubs_in_transformer_with_translation_binding(transformer tf, pt_map binding_g, bool backward_p)
Definition: points_to.c:375
points_to_graph get_points_to_graph_from_statement(_UNUSED_ statement st)
Interface with points-to library.
Definition: points_to.c:56
set user_call_to_points_to_interprocedural_binding_set(call c, pt_map pt_caller)
Compute the binding relations in a complete interprocedural way: be as accurate as possible.
Definition: points_to.c:79
FI: I do not understand why the type is duplicated at the set level.
Definition: set.c:59

References free_points_to_graph(), free_transformer(), get_points_to_graph_from_statement(), make_points_to_graph(), points_to_graph_bottom, pt_to_list_undefined_p(), substitute_stubs_in_transformer_with_translation_binding(), transformer_empty(), and user_call_to_points_to_interprocedural_binding_set().

Referenced by c_user_call_to_transformer().

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

◆ relevant_translation_pair_p()

static bool relevant_translation_pair_p ( points_to  pt,
list  ll 
)
static

The sources of the relevant points-to.

Definition at line 226 of file points_to.c.

227 {
228  bool relevant_p = false;
229  cell d = points_to_sink(pt); // callee if backward_p
231  entity de = reference_variable(dr);
232  relevant_p = gen_in_list_p((const void *) de, ll);
233 
234  return relevant_p;
235 }
reference cell_any_reference(cell)
API for reference.
Definition: effects.c:77
bool gen_in_list_p(const void *vo, const list lx)
tell whether vo belongs to lx
Definition: list.c:734
#define points_to_sink(x)
#define reference_variable(x)
Definition: ri.h:2326

References cell_any_reference(), gen_in_list_p(), points_to_sink, and reference_variable.

Referenced by substitute_stubs_in_transformer().

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

◆ semantics_expression_to_points_to_sinks()

list semantics_expression_to_points_to_sinks ( expression  e)

Returns a list of cells.

Definition at line 112 of file points_to.c.

113 {
114  list ll = list_undefined;
115  if(pt_to_list_undefined_p()) {
118  ll = CONS(CELL, c, NIL);
119  }
120  else {
123  ll = expression_to_points_to_sinks(e, ptg);
124  }
125  return ll;
126 }
cell make_anywhere_points_to_cell(type t)
Function storing points to information attached to a statement.
Definition: points_to.c:87
type points_to_expression_to_concrete_type(expression)
The type returned is stored in a hash-table.
Definition: type.c:617
#define CELL(x)
CELL.
Definition: effects.h:424
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
Definition: newgen_list.h:150
#define list_undefined
Undefined list definition :-)
Definition: newgen_list.h:69
statement get_current_statement_from_statement_global_stack(void)
Definition: static.c:344
list expression_to_points_to_sinks(_UNUSED_ expression e, _UNUSED_ points_to_graph in)
Definition: points_to.c:63
The structure used to build lists in NewGen.
Definition: newgen_list.h:41

References CELL, CONS, expression_to_points_to_sinks(), get_current_statement_from_statement_global_stack(), get_points_to_graph_from_statement(), list_undefined, make_anywhere_points_to_cell(), NIL, points_to_expression_to_concrete_type(), and pt_to_list_undefined_p().

Referenced by generic_unary_operation_to_transformer(), and points_to_unary_operation_to_transformer().

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

◆ semantics_expression_to_points_to_sources()

list semantics_expression_to_points_to_sources ( expression  e)

Special wrapping for the semantics analyses.

points_to.c

FI: check if new cells are allocated to build the returned location list ll...

Definition at line 94 of file points_to.c.

95 {
97  if (!pt_to_list_undefined_p()) {
99  if(statement_undefined_p(curstat)) {
100  // The points-to IN information should be used
101  ;
102  }
103  else
104  ptg = get_points_to_graph_from_statement(curstat);
105  }
106 
108  return ll;
109 }
#define points_to_graph_undefined
#define statement_undefined_p(x)
Definition: ri.h:2420
list expression_to_points_to_sources(_UNUSED_ expression e, _UNUSED_ points_to_graph in)
Definition: points_to.c:71

References expression_to_points_to_sources(), get_current_statement_from_statement_global_stack(), get_points_to_graph_from_statement(), points_to_graph_undefined, pt_to_list_undefined_p(), and statement_undefined_p.

Referenced by any_assign_to_transformer(), any_basic_update_to_transformer(), any_update_to_transformer(), lhs_expression_to_transformer(), new_array_elements_backward_substitution_in_transformer(), new_array_elements_forward_substitution_in_transformer(), and struct_reference_assignment_or_equality_to_transformer().

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

◆ substitute_scalar_stub_in_transformer()

transformer substitute_scalar_stub_in_transformer ( transformer  tf,
entity  se,
entity  de,
bool  backward_p,
list ppl 
)

If both "se", source entity, and "de", destination entity, are defined, substitute the values of "se" by the values of "de" in "backward_p" mode, when translating a callee transformer at a call site of a caller.

If the "se" entity cannot be substituted, its value must be project.

Parameters
tff
see
dee
backward_packward_p
pplpl

Definition at line 136 of file points_to.c.

137 {
138  if(entity_undefined_p(se))
139  ;
140  else if(entity_undefined_p(de))
141  *ppl = CONS(ENTITY, se, *ppl);
142  else if(entity_has_values_p(de)) {
143  // Not in the caller's frame
144  // entity nsv = entity_to_new_value(se);
145  entity nsv = se;
146  entity ndv = entity_to_new_value(de);
147  if(backward_p) { // For transformers
148  tf = transformer_value_substitute(tf, nsv, ndv);
149  }
150  else { // For preconditions
151  tf = transformer_value_substitute(tf, ndv, nsv);
152  }
153  // Careful, se has been substituted in the argument too
156  entity odv = entity_to_old_value(de);
157  if(backward_p) { // For transformers
158  tf = transformer_value_substitute(tf, osv, odv);
159  }
160  else { // For preconditions
161  tf = transformer_value_substitute(tf, odv, osv);
162  }
163  }
164  }
165  else {
166  // FI: could be some debugging stuff
167  pips_user_warning("Stub \"%s\" cannot be substituted.\n",
168  entity_user_name(de));
169  // FI: entity "de" must be projected
170  *ppl = CONS(ENTITY, se, *ppl);
171  }
172  return tf;
173 }
bool entity_is_argument_p(entity e, cons *args)
Definition: arguments.c:150
#define pips_user_warning
Definition: misc-local.h:146
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
Definition: entity.c:487
#define ENTITY(x)
ENTITY.
Definition: ri.h:2755
#define entity_undefined_p(x)
Definition: ri.h:2762
#define transformer_arguments(x)
Definition: ri.h:2871
transformer transformer_value_substitute(transformer t, entity e1, entity e2)
transformer transformer_value_substitute(transformer t, entity e1, entity e2): if e2 does not appear ...
Definition: transformer.c:1993
entity global_new_value_to_global_old_value(entity)
Definition: value.c:716
entity entity_to_new_value(entity)
Definition: value.c:859
bool entity_has_values_p(entity)
This function could be made more robust by checking the storage of e.
Definition: value.c:911
entity entity_to_old_value(entity)
Definition: value.c:869

References CONS, ENTITY, entity_has_values_p(), entity_is_argument_p(), entity_to_new_value(), entity_to_old_value(), entity_undefined_p, entity_user_name(), global_new_value_to_global_old_value(), pips_user_warning, transformer_arguments, and transformer_value_substitute().

Referenced by forward_substitute_array_location_in_transformer(), new_array_element_backward_substitution_in_transformer(), substitute_struct_stub_in_transformer(), and substitute_stubs_in_transformer().

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

◆ substitute_struct_stub_in_transformer()

transformer substitute_struct_stub_in_transformer ( transformer  t,
reference  l,
type  lt,
reference  r,
type rt   __attribute__(unused),
bool  backward_p,
list ppl 
)

Definition at line 175 of file points_to.c.

176 {
177  list fl = struct_type_to_fields(lt);
178  FOREACH(ENTITY, f, fl) {
180  if(analyzed_type_p(ft)) {
187 
188  if(!entity_undefined_p(l1)) {
189  if(!entity_undefined_p(l2)) {
190  t = substitute_scalar_stub_in_transformer(t, l1, l2, backward_p, ppl);
191  }
192  }
193  else {
194  // pips_internal_error("Not implemented yet.\n");
195  // Do nothing, this field may simply be not used
196  ;
197  }
198  free_reference(r1);
199  free_reference(r2); // another option would be to remove the last subscript
200  }
201  else if(type_struct_variable_p(ft)) {
202  // This piece of code could be integrate in the previous
203  // alternative to share most of its code
208  if(array_type_p(ft)) {
209  // FI: how do we guess the subscript values? we could try to
210  // infer them from the values used in the transformer or we
211  // can generate all possible subscripts...
212 
213  // FI: a special case, used for debugging only
216  }
217 
218  // GO down recursively
219  t = substitute_struct_stub_in_transformer(t, l1, ft, r1, ft, backward_p, ppl);
220  }
221  }
222  return t;
223 }
void free_reference(reference p)
Definition: ri.c:2050
reference copy_reference(reference p)
REFERENCE.
Definition: ri.c:2047
entity constant_memory_access_path_to_location_entity(reference)
A constant memory access path may not be considered.
Definition: locations.c:329
#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
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
Definition: expression.c:165
reference add_subscript_to_reference(reference r, expression s)
Add a last subscript expression s to a reference r.
Definition: expression.c:224
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 array_type_p(type)
Definition: type.c:2942
type entity_basic_concrete_type(entity)
retrieves or computes and then returns the basic concrete type of an entity
Definition: type.c:3677
list struct_type_to_fields(type)
Definition: type.c:5798
bool type_struct_variable_p(type)
Definition: type.c:3867
transformer substitute_struct_stub_in_transformer(transformer t, reference l, type lt, reference r, type rt __attribute__((unused)), bool backward_p, list *ppl)
Definition: points_to.c:175
transformer substitute_scalar_stub_in_transformer(transformer tf, entity se, entity de, bool backward_p, list *ppl)
If both "se", source entity, and "de", destination entity, are defined, substitute the values of "se"...
Definition: points_to.c:136
bool analyzed_type_p(type)
The type t is one of the analyzed types.
Definition: value.c:367

References add_subscript_to_reference(), analyzed_type_p(), array_type_p(), constant_memory_access_path_to_location_entity(), copy_reference(), ENTITY, entity_basic_concrete_type(), entity_to_expression(), entity_undefined_p, f(), FOREACH, free_reference(), int_to_expression(), struct_type_to_fields(), substitute_scalar_stub_in_transformer(), and type_struct_variable_p().

Referenced by substitute_stubs_in_transformer().

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

◆ substitute_stubs_in_transformer()

transformer substitute_stubs_in_transformer ( transformer  tf,
call  c,
statement  s,
bool  backward_p 
)

Exploit the binding map to substitute calles's stubs by actual arguments, which may be stubs of the callers,.

backward_p request a substitution from the callees' frame into the caller's frame, which is useful for transformers. Flag backward_p is set to false to compute summary preconditions.

FI: this function is now only used for preconditions. It has been rewritten for transformers to speed up the process when array elements are involved. It is better to start from the needs, the stubs used in the transformer, than from all possible stubs, but it is much easier for a backward translation. With a forward translation, regular variables may have to be translated into stubs.

FI: A quick improvement would to return when no translation is needed... but you do not always know it when backward_p is set to false.

Parameters
tff
backward_packward_p

Definition at line 256 of file points_to.c.

257 {
259  list ll = backward_p? transformer_to_analyzed_locations(tf)
261  if(ENDP(ll)) {
262  // Return tf as is
263  ;
264  }
265  else if(pt_to_list_undefined_p()) {
266  // Return tf as is
267  }
268  else {
270  bool bottom_p = points_to_graph_bottom(ptg);
271 
272  if(bottom_p) {
273  // FI: should this lead to an empty transformer?
274  pips_internal_error("Not implemented yet.\n");
275  }
276  else {
278  list pl = NIL; // FI: I am not sure we can managed forward and
279  // backward projections with one variable
280  SET_FOREACH(points_to, pt, binding) {
282  if(relevant_translation_pair_p(pt, ll)
284  cell s = points_to_source(pt); // callee if backward_p
285  cell d = points_to_sink(pt); // caller if backward_p
288  // This test should be useless because this is guaranteed by
289  // the approximation, except if binding is corrupted.
291  list srs = reference_indices(sr);
292  list drs = reference_indices(dr);
293  if(ENDP(srs) && ENDP(drs)) {
294  entity se = reference_variable(sr);
295  entity de = reference_variable(dr);
296  //type se_t = entity_basic_concrete_type(se);
297  //type de_t = entity_basic_concrete_type(de);
298  if(entity_has_values_p(de))
299  tf = substitute_scalar_stub_in_transformer(tf, se, de, backward_p, &pl);
300  else {
301  type se_t = entity_basic_concrete_type(se);
302  type de_t = entity_basic_concrete_type(de);
303  if(type_struct_variable_p(se_t)) {
304  tf = substitute_struct_stub_in_transformer(tf, sr, se_t, dr, de_t, backward_p, &pl);
305  }
306  else
307  pl = CONS(ENTITY, se, pl);
308  }
309  }
310  else if(ENDP(srs) && !ENDP(drs)) {
311  entity se = reference_variable(sr);
312  if(analyzed_reference_p(dr)) {
314  tf = substitute_scalar_stub_in_transformer(tf, se, de, backward_p, &pl);
315  }
316  else {
317  pl = CONS(ENTITY, se, pl);
318  }
319  }
320  else if(!ENDP(srs) && ENDP(drs)) {
321  entity de = reference_variable(dr);
322  if(entity_has_values_p(de)) {
324  if(!entity_undefined_p(se))
325  tf = substitute_scalar_stub_in_transformer(tf, se, de, backward_p, &pl);
326  else
327  pips_internal_error("Not implemented yet.\n");
328  }
329  else {
330  type de_t = entity_basic_concrete_type(de);
331  if(type_struct_variable_p(de_t)) {
332  tf = substitute_struct_stub_in_transformer(tf, sr, de_t, dr, de_t, backward_p, &pl);
333  // tf = substitute_struct_stub_reference_in_transformer(tf, sr, de, backward_p, &pl);
334  }
335  else {
336  // Do nothing
337  // entity se = reference_variable(sr);
338  // pl = CONS(ENTITY, se, pl);
339  ;
340  }
341  }
342  }
343  else { // !ENDP(srs) & !ENDP(drs)
344  if(analyzed_reference_p(dr)) {
347  tf = substitute_scalar_stub_in_transformer(tf, se, de, backward_p, &pl);
348  }
349  else {
350  type st = reference_to_type(sr);
352  if(type_struct_variable_p(cst))
353  tf = substitute_struct_stub_in_transformer(tf, sr, cst, dr, cst, backward_p, &pl);
354  else {
355  // No useful information in this binding
356  ;
357  }
358  }
359  }
360  }
361  }
362  }
363  if(!ENDP(pl)) {
364  // Get rid on untranslatable entities
366  }
367  }
368  }
369 
370  gen_free_list(ll);
371 
372  return tf;
373 }
bool atomic_points_to_reference_p(reference r)
Definition: points_to.c:519
#define approximation_exact_p(x)
Definition: effects.h:369
#define approximation_must_p(x)
Definition: effects.h:366
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
void gen_free_list(list l)
free the spine of the list
Definition: list.c:327
#define SET_FOREACH(type_name, the_item, the_set)
enumerate set elements in their internal order.
Definition: newgen_set.h:78
#define points_to_approximation(x)
#define points_to_source(x)
static hash_table pl
properties are stored in this hash table (string -> property) for fast accesses.
Definition: properties.c:783
type compute_basic_concrete_type(type)
computes a new type which is the basic concrete type of the input type (this new type is not stored i...
Definition: type.c:3556
type reference_to_type(reference)
Definition: type.c:2354
#define reference_indices(x)
Definition: ri.h:2328
static bool relevant_translation_pair_p(points_to pt, list ll)
The sources of the relevant points-to.
Definition: points_to.c:226
transformer safe_transformer_projection(transformer t, list args)
t may be undefined, args may contain values unrelated to t
Definition: transformer.c:1187
list transformer_to_analyzed_locations(transformer tf)
The list of location entities that appear in the basis of the transformer predicate.
Definition: transformer.c:2785
list transformer_to_potential_stub_translation(transformer tf, entity m __attribute__((unused)))
Provide a list of variables that might be forward translated into a stub when preconditions are propa...
Definition: transformer.c:2720
bool analyzed_reference_p(reference)
FI: Nelson explains the motivation for can_be_constant_path_p() but I do not understand them.
Definition: value.c:518

References analyzed_reference_p(), approximation_exact_p, approximation_must_p, atomic_points_to_reference_p(), cell_any_reference(), compute_basic_concrete_type(), CONS, constant_memory_access_path_to_location_entity(), ENDP, ENTITY, entity_basic_concrete_type(), entity_has_values_p(), entity_undefined_p, gen_free_list(), get_current_module_entity(), get_points_to_graph_from_statement(), NIL, pips_internal_error, pl, points_to_approximation, points_to_graph_bottom, points_to_sink, points_to_source, pt_to_list_undefined_p(), reference_indices, reference_to_type(), reference_variable, relevant_translation_pair_p(), safe_transformer_projection(), SET_FOREACH, substitute_scalar_stub_in_transformer(), substitute_struct_stub_in_transformer(), transformer_to_analyzed_locations(), transformer_to_potential_stub_translation(), type_struct_variable_p(), and user_call_to_points_to_interprocedural_binding_set().

Referenced by process_call_for_summary_precondition().

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

◆ substitute_stubs_in_transformer_with_translation_binding()

static transformer substitute_stubs_in_transformer_with_translation_binding ( transformer  tf,
pt_map  binding_g,
bool  backward_p 
)
static

Definition at line 375 of file points_to.c.

376 {
377  pips_assert("Backward only", backward_p);
379  FOREACH(ENTITY, l, ll) {
381  value val = entity_initial(l);
382  entity v = l;
383  list sl = NIL;
384  if(value_reference_p(val)) {
385  reference r = value_reference(val); // By definition of list ll
386  v = reference_variable(r);
387  sl = reference_indices(r);
388  }
389  list tcrl = reference_to_points_to_translations(v, sl, binding_g);
390  FOREACH(CELL, tcr, tcrl) {
391  reference tr = cell_any_reference(tcr);
393  // FI: The type checking should be useless, but for constant
394  // character strings which appear as a pointer to a char,
395  // i.e. an integer, and is analyzed as such in the callee
396  if(type_equal_p(lt, trt)
397  && generic_atomic_points_to_reference_p(tr, false)) {
399  if(!entity_undefined_p(tl)) {
401  entity ntlv = entity_to_new_value(tl);
402  tf = transformer_value_substitute(tf, nlv, ntlv);
405  entity otlv = entity_to_old_value(tl);
406  tf = transformer_value_substitute(tf, olv, otlv);
407  }
408  }
409  }
410  }
411  gen_free_list(tcrl);
412  }
413  gen_free_list(ll);
414  return tf;
415 }
bool generic_atomic_points_to_reference_p(reference r, bool strict_p)
Is it a unique concrete memory location?
Definition: points_to.c:489
type points_to_reference_to_concrete_type(reference)
Definition: type.c:685
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
Definition: misc-local.h:172
list reference_to_points_to_translations(entity, list, pt_map)
This function is designed to work properly for the translation of effects at call sites.
bool type_equal_p(type, type)
Definition: type.c:547
#define value_reference(x)
Definition: ri.h:3085
#define value_reference_p(x)
Definition: ri.h:3083
#define entity_initial(x)
Definition: ri.h:2796
entity external_entity_to_new_value(entity)
Definition: value.c:1411
entity external_entity_to_old_value(entity)
Definition: value.c:1422

References CELL, cell_any_reference(), constant_memory_access_path_to_location_entity(), ENTITY, entity_basic_concrete_type(), entity_initial, entity_is_argument_p(), entity_to_new_value(), entity_to_old_value(), entity_undefined_p, external_entity_to_new_value(), external_entity_to_old_value(), FOREACH, gen_free_list(), generic_atomic_points_to_reference_p(), NIL, pips_assert, points_to_reference_to_concrete_type(), reference_indices, reference_to_points_to_translations(), reference_variable, transformer_arguments, transformer_to_analyzed_locations(), transformer_value_substitute(), type_equal_p(), value_reference, and value_reference_p.

Referenced by new_substitute_stubs_in_transformer().

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

◆ user_call_to_points_to_interprocedural_binding_set()

set user_call_to_points_to_interprocedural_binding_set ( call  c,
pt_map  pt_caller 
)

Compute the binding relations in a complete interprocedural way: be as accurate as possible.

This piece of code has been copied from user_call_to_points_to_interprocedural(), which should be modularized...

Not much to do if both IN and OUT are empty, except if OUT is bottom (see below)

For the side effect on binding

set pt_in_filtered =

filter_formal_context_according_to_actual_context(fpcl,

pt_in,

pt_binded,

binding);

Parameters
pt_callert_caller

Definition at line 79 of file points_to.c.

81 {
82  pips_internal_error("points-to library not available");
83  return NIL;
84 }

References NIL, and pips_internal_error.

Referenced by new_substitute_stubs_in_transformer(), and substitute_stubs_in_transformer().

+ Here is the caller graph for this function: