PIPS
|
#include <stdlib.h>
#include <stdio.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "ri-util.h"
#include "prettyprint.h"
#include "effects-util.h"
#include "misc.h"
#include "text.h"
#include "text-util.h"
#include "properties.h"
#include "effects-generic.h"
#include "effects-simple.h"
#include "points-to.h"
Go to the source code of this file.
Functions | |
cell | make_nowhere_cell () |
This file contains all the operators defining constant paths : More... | |
cell | make_typed_nowhere_cell (type t) |
cell | cell_to_nowhere_sink (cell source) |
assuming source is a reference to a pointer, build the corresponding sink when the pointer is not initialized, i.e. More... | |
set | points_to_anywhere_typed (list lhs_list, set input) |
Already exists in points_to_general_algorithm.c, to be removed later... More... | |
set | points_to_anywhere (list lhs_list, set input) |
list | array_to_constant_paths (expression e, set in __attribute__((__unused__))) |
input : expression e and a set of points_to output : a set of constant paths translates an expression into a set of constant paths by first changing operators like . More... | |
cell | max_module (cell m1, cell m2) |
we define operator max fot the lattice Module which has any_module as top and a bottom which is not yet clearly defined (maybe no_module) max_module : Module * Module -> Module Side effects on m1 if we have an anywhere location to return. More... | |
bool | entity_any_module_p (entity e) |
operator kill for the dimension Module: More... | |
bool | opkill_may_module (cell m1, cell m2) |
bool | opkill_must_module (cell m1, cell m2) |
cell | op_gen_module (cell m1, __attribute__((__unused__)) cell m2) |
Operator gen for modules: m1 is the sink, m2 the source (m2 points to m1) opkill_gen_module : Module * Module -> Module. More... | |
bool | opkill_may_name (cell n1, cell n2) |
We define operators for the lattice Name which can be a: -variable of a the program -malloc -NULL /0 -STATIC/STACK/DYNAMIC/HEAP/FORMAL -nowhere/anywhere. More... | |
bool | opkill_must_name (cell n1, cell n2) |
type | max_type (type t1, type t2) |
bool | opkill_may_type (type t1, type t2) |
bool | opkill_must_type (type t1, type t2) |
opkill_must_type is the same as op_kill_may_type... More... | |
type | opgen_may_type (type t1, type t2) |
type | opgen_must_type (type t1, type t2) |
the same as opgen_may_type More... | |
bool | opkill_may_reference (cell c1, cell c2) |
bool | opkill_must_reference (cell c1, cell c2) |
bool | opkill_may_vreference (cell c1, cell c2) |
FI: really weird and unefficient. More... | |
bool | opkill_must_vreference (cell c1, cell c2) |
returns true if c2 must kills c1 because of the subscript expressions More... | |
bool | opkill_may_constant_path (cell c1, cell c2) |
bool | opkill_must_constant_path (cell c1, cell c2) |
returns true if c2 kills c1 More... | |
set | kill_may_set (list L, set in_may) |
Compute the set of arcs in the input points-to relation "in" whose approximation must be changed from "exact" to "may". More... | |
set | kill_must_set (list L, set in) |
Generate the subset of arcs that must be removed from the points-to graph "in". More... | |
set | points_to_may_filter (set in) |
returns a set which contains all the MAY points to More... | |
set | points_to_must_filter (set in) |
returns a set which contains all the EXACT points to More... | |
bool | address_of_expression_p (expression e) |
shoud be moved to expression.c More... | |
bool | subscript_expression_p (expression e) |
set | gen_may_set (list L, list R, set in_may, bool *address_of_p) |
Should be moved to anywhere_abstract_locations.c. More... | |
set | gen_must_set (list L, list R, set in_must, bool *address_of_p) |
bool | unique_location_cell_p (cell c) |
Does cell "c" represent a unique memory location or a set of memory locations? More... | |
set | gen_may_constant_paths (cell l, list R, set in_may, bool *address_of_p, int Lc) |
set | gen_must_constant_paths (cell l, list R, set in_must, bool *address_of_p, int Lc) |
Build a set of arcs from cell l towards cells in list R if *address_p is true, or towards cells pointed by cells in list R if not. More... | |
points_to | opgen_may_constant_path (cell l __attribute__((__unused__)), cell r __attribute__((__unused__))) |
points_to | opgen_must_constant_path (cell l __attribute__((__unused__)), cell r __attribute__((__unused__))) |
bool | opgen_may_module (entity e1, entity e2) |
bool | opgen_must_module (entity e1, entity e2) |
bool | opgen_may_name (entity e1, entity e2) |
bool | opgen_must_name (entity e1, entity e2) |
bool | opgen_may_vreference (list vr1, list vr2) |
bool | atomic_constant_path_p (cell cp) |
Could be replaced by abstract_location_p() but this later don't take into account the null location. More... | |
set | opgen_null_location (set L, cell r) |
set | points_to_independent_store (set s) |
bool | equal_must_vreference (cell c1, cell c2) |
set | points_to_nowhere (list lhs_list, set input) |
arg1: list of cells arg2: set of points-to Create a points-to set with elements of lhs_list as source and NOWHERE as sink. More... | |
bool address_of_expression_p | ( | expression | e | ) |
shoud be moved to expression.c
Definition at line 741 of file constant-path-utils.c.
References call_function, entity_an_operator_p, expression_syntax, syntax_call, and syntax_call_p.
list array_to_constant_paths | ( | expression | e, |
set in | __attribute__(__unused__) | ||
) |
input : expression e and a set of points_to output : a set of constant paths translates an expression into a set of constant paths by first changing operators like .
and -> into p[0](get_memory_path()). Then evaluate this path by using points_toÚrelations already computed (eval_cell_with_points_to()). Finaly construct a set of constant paths according to the list returned by eval_cell_with_points_to().
Definition at line 176 of file constant-path-utils.c.
References array_reference_p(), CELL, cell_undefined, CONS, expression_reference(), generic_effects_reset_all_methods(), make_cell_reference(), NIL, set_methods_for_proper_simple_effects(), and simple_cell_to_store_independent_cell().
Could be replaced by abstract_location_p() but this later don't take into account the null location.
cp | p |
Definition at line 1243 of file constant-path-utils.c.
References cell_any_reference(), cp, entity_abstract_location_p(), entity_null_locations_p(), and reference_variable.
assuming source is a reference to a pointer, build the corresponding sink when the pointer is not initialized, i.e.
is undefined.
source | ource |
Definition at line 55 of file constant-path-utils.c.
References cell_to_type(), cell_undefined, copy_type(), free_type(), get_bool_property(), make_nowhere_cell(), make_typed_nowhere_cell(), and type_to_pointed_type().
Referenced by declaration_statement_to_points_to(), malloc_to_points_to_sinks(), and user_call_to_points_to_fast_interprocedural().
operator kill for the dimension Module:
Definition at line 234 of file constant-path-utils.c.
References ANY_MODULE_NAME, entity_module_name(), and same_string_p.
Referenced by opgen_may_module(), opgen_must_module(), opkill_may_module(), and opkill_must_module().
c1 | 1 |
c2 | 2 |
Definition at line 1292 of file constant-path-utils.c.
References CAR, cell_any_reference(), ENDP, entity_minimal_user_name(), EXPRESSION, expression_constant_p(), expression_to_int(), expression_to_string(), gen_length(), generic_effects_reset_all_methods(), NIL, POP, reference_indices, reference_variable, s1, set_methods_for_proper_simple_effects(), simple_cell_to_store_independent_cell(), and unbounded_expression_p().
Referenced by gen_may_constant_paths(), and gen_must_constant_paths().
here we have x = y, then we generate (x,y1,a)|(y,y1,a) as points to relation
locations_equal_p
&& !entity_abstract_location_p(el)
Should be replaced by opgen_constant_path(l,r)
if(reference_unbounded_indices_p(ref))
Make sure the types are compatible...
in_may | n_may |
address_of_p | ddress_of_p |
Lc | c |
Definition at line 1003 of file constant-path-utils.c.
References array_entity_p(), cell_any_reference(), copy_cell(), equal_must_vreference(), FOREACH, free_type(), gen_length(), int, make_approximation_exact(), make_approximation_may(), make_descriptor_none(), make_points_to(), pips_internal_error, pointer_type_p(), points_to_cell_types_compatibility(), points_to_equal_p(), points_to_rank(), points_to_reference_to_type(), points_to_sink, points_to_source, points_to_undefined, points_to_undefined_p, ref, reference_variable, set_add_element(), SET_FOREACH, set_generic_make(), set_private, and unique_location_cell_p().
Referenced by gen_may_set().
Should be moved to anywhere_abstract_locations.c.
**If the source is not precisely known */
It is easier not to have to maintain the consistency between gen_may1 and kill_may.
in_may | n_may |
address_of_p | ddress_of_p |
Definition at line 813 of file constant-path-utils.c.
References approximation_exact_p, cell_any_reference(), cells_may_conflict_p(), copy_cell(), entity_nowhere_locations_p(), entity_null_locations_p(), entity_type, entity_typed_nowhere_locations_p(), FOREACH, gen_length(), gen_may_constant_paths(), get_bool_property(), int, make_anywhere_points_to_cell(), make_approximation_may(), make_descriptor_none(), make_points_to(), pips_user_error, pips_user_warning, points_to_approximation, points_to_equal_p(), points_to_rank(), points_to_sink, points_to_source, reference_variable, set_add_element(), SET_FOREACH, set_generic_make(), set_private, and set_union().
Referenced by list_assignment_to_points_to().
Build a set of arcs from cell l towards cells in list R if *address_p is true, or towards cells pointed by cells in list R if not.
Approximation is must if Lc==1. Lc is the cardinal of L, a set containing l.
FI->AM: I do not understand why the cardinal of R is not used too when deciding if the approximation is may or must. I decide to change the semantics of this function although it is used by the initial analysis.
FI: since *address_of_p is not modified, I do not understand why a pointer is passed.
FI->AM: sharing of a... A new approximation must be generated for each new arc
if we have x = &y then we generate (x,y,a) as points to relation
Should be replaced by opgen_constant_path(l,r)
if(reference_unbounded_indices_p(ref))
here we have x = y, then we generate (x,y1,a)|(y,y1,a) as points to relation
locations_equal_p
&& !entity_abstract_location_p(el)
if(array_entity_p(reference_variable(cell_any_reference(r)))){
reference ref = cell_any_reference(r);
expression ex = reference_to_expression(ref);
if(!expression_pointer_p(ex))
pt = make_points_to(l, r, a, make_descriptor_none());
else
pt = make_points_to(l, points_to_sink(i), a, make_descriptor_none());
}
if(!points_to_undefined_p(pt))
set_add_element(gen_must_cps, gen_must_cps, (void*) pt);
if(reference_unbounded_indices_p(ref))
in_must | n_must |
address_of_p | ddress_of_p |
Lc | c |
Definition at line 1088 of file constant-path-utils.c.
References array_entity_p(), cell_any_reference(), equal_must_vreference(), FOREACH, free_type(), gen_length(), generic_effects_reset_all_methods(), int, make_approximation_exact(), make_approximation_may(), make_descriptor_none(), make_points_to(), pointer_type_p(), points_to_equal_p(), points_to_rank(), points_to_reference_to_type(), points_to_sink, points_to_source, points_to_undefined, points_to_undefined_p, ref, reference_variable, set_add_element(), SET_FOREACH, set_generic_make(), set_methods_for_proper_simple_effects(), set_private, simple_cell_to_store_independent_cell(), and unique_location_cell_p().
Referenced by gen_must_set().
if len > 1 we must iterate over in_must and change all points-to relations having L as lhs into may relations
in_must | n_must |
address_of_p | ddress_of_p |
Definition at line 908 of file constant-path-utils.c.
References cell_any_reference(), entity_nowhere_locations_p(), entity_null_locations_p(), entity_type, entity_typed_nowhere_locations_p(), FOREACH, gen_length(), gen_must_constant_paths(), int, make_anywhere_points_to_cell(), make_approximation_may(), make_descriptor_none(), make_points_to(), pips_user_error, pips_user_warning, points_to_compare_cell(), points_to_equal_p(), points_to_rank(), points_to_sink, points_to_source, reference_variable, set_add_element(), SET_FOREACH, set_generic_make(), set_private, and set_union().
Compute the set of arcs in the input points-to relation "in" whose approximation must be changed from "exact" to "may".
This set is linked to set "gen_may1", although consistency would be easier to maintain if only "kill_may" were used to generate the new arcs...
kill_may = { pt in "in"| exact(pt) ^ \exists l in L conflict(l, source(pt))}
The restriction to !atomic does not seem useful.
in_may | n_may |
Definition at line 668 of file constant-path-utils.c.
References FOREACH, make_approximation_exact(), make_descriptor_none(), make_points_to(), opkill_may_constant_path(), points_to_equal_p(), points_to_rank(), points_to_sink, points_to_source, set_add_element(), SET_FOREACH, set_generic_make(), and set_private.
Referenced by list_assignment_to_points_to().
Generate the subset of arcs that must be removed from the points-to graph "in".
Set "in_must" is the subset of set "in" with exact points-to arcs only.
kill_1 = kill_must = {pt in "in" | source(pt) in L ^ |L|=1 ^ atomic(L) }
where "atomic(L)" is a short cut for "atomic(l) forall l in L"
Here, correctly, the atomicity is not checked directly, but properly, using an operator of the lattice.
in | n |
Definition at line 700 of file constant-path-utils.c.
References CAR, CELL, gen_length(), int, new_simple_pt_map, opkill_must_constant_path(), points_to_source, set_add_element(), and SET_FOREACH.
Referenced by list_assignment_to_points_to().
cell make_nowhere_cell | ( | void | ) |
This file contains all the operators defining constant paths :
CP = Mdodule * Name * Type *Vref. To calculate the lattice PC operators we define these operators first on each of its dimensions. Each dimension represents a lattice with a bottom and a top.
Definition at line 35 of file constant-path-utils.c.
References entity_all_xxx_locations(), make_cell_reference(), make_reference(), NIL, and NOWHERE_LOCATION.
Referenced by cell_to_nowhere_sink(), intrinsic_call_to_points_to(), points_to_nowhere(), remove_points_to_cell(), and unary_intrinsic_call_to_points_to_sinks().
Definition at line 43 of file constant-path-utils.c.
References entity_all_xxx_locations_typed(), make_cell_reference(), make_reference(), NIL, and NOWHERE_LOCATION.
Referenced by cell_to_nowhere_sink(), freed_list_to_points_to(), points_to_set_block_projection(), and remove_points_to_cell().
we define operator max fot the lattice Module which has any_module as top and a bottom which is not yet clearly defined (maybe no_module) max_module : Module * Module -> Module Side effects on m1 if we have an anywhere location to return.
m1 | 1 |
m2 | 2 |
Definition at line 207 of file constant-path-utils.c.
References cell_any_reference(), entity_all_locations(), entity_name, make_cell_reference(), make_reference(), NIL, reference_variable, and same_string_p.
t1 | 1 |
t2 | 2 |
Definition at line 411 of file constant-path-utils.c.
References MakeTypeUnknown(), type_equal_p(), and type_unknown_p.
cell op_gen_module | ( | cell | m1, |
__attribute__((__unused__)) cell | m2 | ||
) |
Operator gen for modules: m1 is the sink, m2 the source (m2 points to m1) opkill_gen_module : Module * Module -> Module.
we return the module m1 whatever is its type (#any_module, TOP-LEVEL, any_module)
Definition at line 282 of file constant-path-utils.c.
points_to opgen_may_constant_path | ( | cell l | __attribute__(__unused__), |
cell r | __attribute__(__unused__) | ||
) |
Definition at line 1167 of file constant-path-utils.c.
References points_to_undefined.
e1 | 1 |
e2 | 2 |
Definition at line 1179 of file constant-path-utils.c.
References entity_any_module_p(), entity_module_name(), and same_string_p.
e1 | 1 |
e2 | 2 |
Definition at line 1201 of file constant-path-utils.c.
References entity_abstract_location_p(), entity_name, and same_string_p.
t1 | 1 |
t2 | 2 |
Definition at line 437 of file constant-path-utils.c.
References MakeTypeUnknown(), and type_unknown_p.
Referenced by opgen_must_type().
vr1 | r1 |
vr2 | r2 |
Definition at line 1223 of file constant-path-utils.c.
References ENDP, extended_integer_constant_expression_p(), and FOREACH.
points_to opgen_must_constant_path | ( | cell l | __attribute__(__unused__), |
cell r | __attribute__(__unused__) | ||
) |
Definition at line 1173 of file constant-path-utils.c.
References points_to_undefined.
e1 | 1 |
e2 | 2 |
Definition at line 1190 of file constant-path-utils.c.
References entity_any_module_p(), entity_module_name(), and same_string_p.
e1 | 1 |
e2 | 2 |
Definition at line 1212 of file constant-path-utils.c.
References entity_abstract_location_p(), entity_name, and same_string_p.
the same as opgen_may_type
t1 | 1 |
t2 | 2 |
Definition at line 448 of file constant-path-utils.c.
References opgen_may_type().
Definition at line 1254 of file constant-path-utils.c.
References gen_null(), make_approximation_exact(), make_descriptor_none(), make_points_to(), points_to_equal_p(), points_to_rank(), set_add_element(), SET_FOREACH, set_generic_make(), and set_private.
c1 | 1 |
c2 | 2 |
Definition at line 601 of file constant-path-utils.c.
References cell_any_reference(), entity_type, free_type(), opkill_may_module(), opkill_may_name(), opkill_may_type(), opkill_may_vreference(), points_to_reference_to_type(), reference_variable, type_area_p, type_equal_p(), and type_undefined.
Referenced by kill_may_set().
if the lhs or the rhs is a nowhere location or a null/0 value we generate a pips_user_warning
m1 | 1 |
m2 | 2 |
Definition at line 242 of file constant-path-utils.c.
References cell_any_reference(), entity_any_module_p(), entity_name, reference_variable, and same_string_p.
Referenced by opkill_may_constant_path().
We define operators for the lattice Name which can be a: -variable of a the program -malloc -NULL /0 -STATIC/STACK/DYNAMIC/HEAP/FORMAL -nowhere/anywhere.
We define the max between 2 names according to the order established by the lattice Name, already done by entity_locations_max() but we have to add a new abstract location for Formal area opkill for the lattice Name tests if 2 names are : -variables of the program then we return the result of the comparison their names. -abstract locations so we return FALSE. Name * Name-> Bool
if(entity_malloc_p(e2)) kill_may_p = false// function entity_malloc_p() have to be defined and different from entity_heap_location_p()
if(entity_malloc_p(e1)) kill_may_p = true// function entity_malloc_p() have to be defined and different from entity_heap_location_p()
n1 | 1 |
n2 | 2 |
Definition at line 310 of file constant-path-utils.c.
References cell_any_reference(), entity_abstract_location_p(), entity_all_locations_p(), entity_name, entity_nowhere_locations_p(), entity_null_locations_p(), make_cell_reference(), make_reference(), NIL, pips_user_error, reference_variable, same_string_p, and variable_to_abstract_location().
Referenced by opkill_may_constant_path(), and opkill_must_name().
c1 | 1 |
c2 | 2 |
Definition at line 454 of file constant-path-utils.c.
References cell_preference, cell_reference, cell_reference_p, preference_reference, reference_equal_p(), reference_undefined, and store_independent_reference_p().
t1 | 1 |
t2 | 2 |
Definition at line 422 of file constant-path-utils.c.
References type_equal_p(), and type_unknown_p.
Referenced by opkill_may_constant_path(), and opkill_must_type().
FI: really weird and unefficient.
Also I asummed that vreference was limited to the subscript list... FI->AM: to be checked wrt your dissertation.
c1 | 1 |
c2 | 2 |
Definition at line 496 of file constant-path-utils.c.
References CAR, cell_any_reference(), ENDP, entity_minimal_user_name(), EXPRESSION, expression_constant_p(), expression_equal_p(), expression_to_int(), expression_to_string(), field_expression_p(), NIL, POP, reference_indices, reference_variable, s1, and unbounded_expression_p().
Referenced by opkill_may_constant_path().
returns true if c2 kills c1
if (! type_area_p(entity_type(v1)) && !type_area_p(entity_type(v2))){
if (entity_abstract_location_p(v1))
t1 = entity_type(v1);
else
t1 = simple_effect_reference_type(r1);
if (entity_abstract_location_p(v2))
t2 = entity_type(v2);
else
t2 = simple_effect_reference_type(r2);
type_equal_p = opkill_must_type(t1,t2);
}
c1 | 1 |
c2 | 2 |
Definition at line 627 of file constant-path-utils.c.
References cell_any_reference(), opkill_must_module(), opkill_must_name(), opkill_must_vreference(), points_to_reference_to_type(), type_equal_p(), and type_undefined.
Referenced by kill_must_set().
m1 | 1 |
m2 | 2 |
Definition at line 260 of file constant-path-utils.c.
References cell_any_reference(), entity_any_module_p(), entity_name, reference_variable, and same_string_p.
Referenced by opkill_must_constant_path().
if(entity_malloc_p(e2)) kill_may_p = false// function entity_malloc_p() have to be defined and different from entity_heap_location_p()
if(entity_malloc_p(e1)) kill_may_p = true// function entity_malloc_p() have to be defined and different from entity_heap_location_p()
n1 | 1 |
n2 | 2 |
Definition at line 361 of file constant-path-utils.c.
References cell_any_reference(), entity_abstract_location_p(), entity_all_locations_p(), entity_name, entity_nowhere_locations_p(), entity_null_locations_p(), make_cell_reference(), make_reference(), NIL, opkill_may_name(), pips_user_error, reference_variable, same_string_p, and variable_to_abstract_location().
Referenced by opkill_must_constant_path().
c1 | 1 |
c2 | 2 |
Definition at line 478 of file constant-path-utils.c.
References cell_any_reference(), reference_equal_p(), and store_independent_reference_p().
opkill_must_type is the same as op_kill_may_type...
t1 | 1 |
t2 | 2 |
Definition at line 432 of file constant-path-utils.c.
References opkill_may_type().
returns true if c2 must kills c1 because of the subscript expressions
This function should be rewritten from scratch, with a defined semantics for "*" as a subscript and possibly a larger use of expression_equal_p(). Also, we need to specify if the scopes for each rereference are equal or not.
c1 | 1 |
c2 | 2 |
Definition at line 546 of file constant-path-utils.c.
References CAR, cell_any_reference(), ENDP, entity_minimal_user_name(), EXPRESSION, expression_constant_p(), expression_equal_p(), expression_to_int(), expression_to_string(), NIL, POP, reference_indices, reference_variable, s1, and unbounded_expression_p().
Referenced by opkill_must_constant_path().
lhs_path matches the kill set.
input - kill
if the lhs_set or the rhs set contains more than an element, we set the approximation to MAY.
Computing the gen set
create a new points to with as source the current element of lhs_set and sink the null value .
gen + input_kill_diff
lhs_list | hs_list |
input | nput |
Definition at line 122 of file constant-path-utils.c.
References ANYWHERE_LOCATION, entity_all_xxx_locations(), FOREACH, gen(), gen_length(), input(), make_approximation_exact(), make_approximation_may(), make_cell_reference(), make_descriptor_none(), make_points_to(), make_reference(), NIL, points_to_compare_cell(), points_to_equal_p(), points_to_rank(), points_to_source, set_add_element(), set_difference(), SET_FOREACH, set_generic_make(), set_private, and set_union().
Referenced by list_assignment_to_points_to().
Already exists in points_to_general_algorithm.c, to be removed later...
iterate over the lhs_set, if it contains more than an element approximations are set to MAY, otherwise it's set to EXACT Set the sink to anywhere .
input - kill
if the lhs_set or the rhs set contains more than an element, we set the approximation to MAY.
Computing the gen set
create a new points to with as source the current element of lhs_set and sink the null value .
lhs_list | hs_list |
input | nput |
Definition at line 75 of file constant-path-utils.c.
References ANYWHERE_LOCATION, cell_any_reference(), entity_all_xxx_locations_typed(), entity_type, FOREACH, gen(), gen_length(), input(), make_approximation_exact(), make_approximation_may(), make_cell_reference(), make_descriptor_none(), make_points_to(), make_reference(), NIL, points_to_compare_cell(), points_to_equal_p(), points_to_rank(), points_to_source, reference_variable, set_add_element(), set_difference(), SET_FOREACH, set_generic_make(), set_private, and set_union().
Referenced by list_assignment_to_points_to().
Definition at line 1273 of file constant-path-utils.c.
References make_points_to(), points_to_approximation, points_to_descriptor, points_to_equal_p(), points_to_rank(), points_to_sink, points_to_source, set_add_element(), SET_FOREACH, set_generic_make(), set_private, and simple_cell_to_store_independent_cell().
Referenced by any_loop_to_points_to(), and new_any_loop_to_points_to().
returns a set which contains all the MAY points to
in | n |
Definition at line 716 of file constant-path-utils.c.
References approximation_may_p, points_to_approximation, points_to_equal_p(), points_to_rank(), set_add_element(), SET_FOREACH, set_generic_make(), and set_private.
Referenced by list_assignment_to_points_to().
returns a set which contains all the EXACT points to
in | n |
Definition at line 729 of file constant-path-utils.c.
References approximation_exact_p, points_to_approximation, points_to_equal_p(), points_to_rank(), set_add_element(), SET_FOREACH, set_generic_make(), and set_private.
Referenced by list_assignment_to_points_to().
arg1: list of cells arg2: set of points-to Create a points-to set with elements of lhs_list as source and NOWHERE as sink.
Iterate over input and kill all points-to relations where sinks are elements of lhs_list.
if the lhs_set or the rhs set contains more than an element, we set the approximation to MAY.
Computing the gen set
lhs_list | hs_list |
input | nput |
Definition at line 1351 of file constant-path-utils.c.
References copy_approximation(), FOREACH, free_approximation(), gen(), gen_length(), input(), make_approximation_exact(), make_approximation_may(), make_descriptor_none(), make_nowhere_cell(), make_points_to(), points_to_equal_p(), points_to_rank(), points_to_source, set_add_element(), set_difference(), SET_FOREACH, set_generic_make(), set_private, and set_union().
bool subscript_expression_p | ( | expression | e | ) |
Definition at line 752 of file constant-path-utils.c.
References expression_syntax, and syntax_subscript_p.
Does cell "c" represent a unique memory location or a set of memory locations?
This is key to decide if a points-to arc is a must or a may arc.
Is it always possible to decide when heap abstract locations are concerned?
See also cell_abstract_location_p()
Definition at line 980 of file constant-path-utils.c.
References anywhere_cell_p(), cell_any_reference(), cell_typed_anywhere_locations_p(), EXPRESSION, FOREACH, heap_cell_p(), reference_indices, and unbounded_expression_p().
Referenced by gen_may_constant_paths(), and gen_must_constant_paths().