92 pips_assert(
"statement_points_to_context is undefined",
166 pips_assert(
"The resulting points-to graph is bottom",
397 "before the analysis is started\n");
456 bool found_p =
false;
698 bool fix_point_p =
false;
699 for(i = 0; i<k+2 ; i++) {
749 pips_debug(1,
"\n\nAt iteration i=%d:\n\n", i);
843 bool fix_point_p =
false;
844 for(i = 0; i<k+2 ; i++) {
886 pips_debug(1,
"\n\nAt iteration i=%d:\n\n", i);
928 bool to_be_freed =
false;
935 bool to_be_freed =
false;
int get_int_property(const string)
approximation make_approximation_exact(void)
approximation copy_approximation(approximation p)
APPROXIMATION.
descriptor make_descriptor_none(void)
points_to make_points_to(cell a1, cell a2, approximation a3, descriptor a4)
bool points_to_graph_consistent_p(points_to_graph p)
points_to copy_points_to(points_to p)
POINTS_TO.
void free_expression(expression p)
#define add_arc_to_pt_map(a, s)
#define consistent_pt_map_p(s)
#define assign_pt_map(x, y)
#define new_simple_pt_map()
bool entity_stub_sink_p(entity e)
test if an entity is a stub sink for a formal parameter e.g.
cell make_anywhere_cell(type t)
set points_to_independent_store(set s)
cell cell_to_nowhere_sink(cell source)
assuming source is a reference to a pointer, build the corresponding sink when the pointer is not ini...
type cell_to_type(cell, bool *)
reference cell_any_reference(cell)
API for reference.
bool points_to_cell_equal_p(cell, cell)
points_to_list load_pt_to_list(statement)
bool bound_pt_to_list_p(statement)
statement get_current_module_statement(void)
Get the current module statement.
entity get_current_module_entity(void)
Get the entity of the current module.
#define NIL
The empty list (nil in Lisp)
size_t gen_length(const list l)
#define CAR(pcons)
Get the value of the first element of a list.
void gen_free_list(list l)
free the spine of the list
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
list gen_full_copy_list(list l)
Copy a list structure with element copy.
bool statement_sequence_p(statement s)
Statement classes induced from instruction type.
bool declaration_statement_p(statement s)
Had to be optimized according to Beatrice Creusillet.
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_user_warning
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
bool set_equal_p(const set, const set)
returns whether s1 == s2
#define SET_FOREACH(type_name, the_item, the_set)
enumerate set elements in their internal order.
set set_clear(set)
Assign the empty set to s s := {}.
set set_add_element(set, const set, const void *)
void * stack_head(const stack)
returns the item on top of stack s
void stack_push(void *, stack)
stack use
void stack_free(stack *)
type, bucket_size, policy
stack stack_make(int, int, int)
allocation
void * stack_pop(stack)
POPs one item from stack s.
#define stack_undefined_p(s)
pt_map update_points_to_graph_with_arc(points_to a, pt_map pt)
Instead of simply adding the new arc, make sure the consistency is not broken.
void fi_points_to_storage(pt_map ptm, statement s, bool store)
#define remove_arc_from_pt_map_(a, s)
pt_map call_to_points_to(call c, pt_map pt_in, list el, bool side_effect_p)
Three different kinds of calls are distinguished:
pt_map condition_to_points_to(expression c, pt_map in, bool true_p)
Update points-to set "in" according to the content of the expression using side effects.
pt_map pointer_assignment_to_points_to(expression lhs, expression rhs, pt_map pt_in)
pt_map expression_to_points_to(expression e, pt_map pt_in, bool side_effect_p)
Update pt_in and pt_out according to expression e.
pt_map assignment_to_points_to(expression lhs, expression rhs, pt_map pt_in)
static void expand_points_to_domain(points_to_graph pt_t, points_to_graph pt_f)
expand the domain of pt_f according to the domain of pt_t
void reset_statement_points_to_context()
int points_to_context_statement_line_number()
void update_statement_points_to_context_with_arc(points_to pt)
set full_copy_simple_pt_map(set m)
FI: short term attempt at providing a deep copy to avoid sharing between sets.
static stack statement_points_to_context
The input points-to information of a statement is updated by the analysis of the statement because of...
pt_map declaration_statement_to_points_to(statement s, pt_map pt_in)
See points_to_init()
pt_map loop_to_points_to(loop l, pt_map pt_in)
FI: I assume that pointers and pointer arithmetic cannot appear in a do loop, "do p=q,...
bool statement_points_to_context_defined_p()
pt_map whileloop_to_points_to(whileloop wl, pt_map pt_in)
void add_arc_to_statement_points_to_context(points_to pt)
void init_statement_points_to_context()
pt_map new_any_loop_to_points_to(statement b, expression init, expression c, expression inc, pt_map pt_in)
Perform the same k-limiting scheme for all kinds of loops.
pt_map points_to_context_statement_in()
void push_statement_points_to_context(statement s, pt_map in)
pt_map pop_statement_points_to_context(void)
pt_map k_limit_points_to(pt_map pt_out, int k)
pt_map sequence_to_points_to(sequence seq, pt_map pt_in)
pt_map forloop_to_points_to(forloop fl, pt_map pt_in)
void equalize_points_to_domains(points_to_graph pt_t, points_to_graph pt_f)
Make sure that pt_t and pt_f have the same definition domain except if one of them is bottom.
pt_map full_copy_pt_map(pt_map in)
static stack current_statement_points_to_context
pt_map any_loop_to_points_to(statement b, expression init, expression c, expression inc, pt_map pt_in)
Perform the same k-limiting scheme for all kinds of loops.
pt_map statement_to_points_to(statement s, pt_map pt_in)
See points_to_statement()
pt_map unstructured_to_points_to(unstructured u, pt_map pt_in)
pt_map test_to_points_to(test t, pt_map pt_in)
Computing the points-to information after a test.
pt_map multitest_to_points_to(multitest mt, pt_map pt_in)
pt_map instruction_to_points_to(instruction i, pt_map pt_in)
See points_to_statement()
void reset_heap_model(void)
void upgrade_approximations_in_points_to_set(pt_map)
When arcs have been removed from a points-to relation, the approximations of remaining arcs may not c...
pt_map graph_assign_list(pt_map, list)
FI: I add functions dealing with points_to_graph variable, i.e.
cell make_null_cell(void)
pt_map normalize_points_to_graph(pt_map)
For the time being, control the out-degree of the vertices in points-to graph "ptg" and fuse the vert...
set points_to_set_block_projection(set, list, bool, bool)
Remove from "pts" arcs based on at least one local entity in list "l" and preserve those based on sta...
void print_points_to_set(string, set)
list variable_to_pointer_locations(entity)
variable.c
pt_map remove_unreachable_stub_vertices_in_points_to_graph(pt_map)
int points_to_equal_p(const void *, const void *)
returns true if two points-to arcs "vpt1" and "vpt2" are equal.
pt_map new_points_to_unstructured(unstructured, pt_map, bool)
void init_heap_model(statement)
bool consistent_points_to_graph_p(points_to_graph)
pt_map merge_points_to_graphs(pt_map, pt_map)
#define points_to_approximation(x)
#define points_to_sink(x)
#define points_to_list_list(x)
#define points_to_graph_domain_number(x)
#define points_to_graph_bottom(x)
#define points_to_graph_set(x)
#define points_to_source(x)
#define points_to_graph_domain
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
bool entity_main_module_p(entity e)
static int init
Maximal value set for Fortran 77.
expression reference_to_expression(reference r)
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
bool type_void_star_p(type)
type expression_to_type(expression)
For an array declared as int a[10][20], the type returned for a[i] is int [20].
bool array_of_pointers_type_p(type)
statement pop_statement_global_stack(void)
statement get_current_statement_from_statement_global_stack(void)
bool integer_type_p(type)
type entity_basic_concrete_type(entity)
retrieves or computes and then returns the basic concrete type of an entity
bool pointer_type_p(type)
Check for scalar pointers.
bool type_structurally_equal_p(type, type)
Type t1 and t2 are equal if their basic concrete components are equal.
bool array_pointer_type_equal_p(type, type)
assume that a pointer to type x is equal to a 1-D array of x
bool formal_parameter_p(entity)
expression variable_initial_expression(entity)
Returns a copy of the initial (i.e.
bool struct_type_p(type)
Returns true if t is of type derived and if the derived type is a struct.
void push_statement_on_statement_global_stack(statement)
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...
bool overloaded_type_p(type)
Returns true if t is a variable type with a basic overloaded.
bool char_star_type_p(type)
Beware of typedefs.
bool array_of_struct_type_p(type)
bool variable_static_p(entity)
true if v appears in a SAVE statement, or in a DATA statement, or is declared static i C.
#define forloop_initialization(x)
#define reference_variable(x)
#define forloop_increment(x)
#define instruction_loop(x)
#define dimension_lower(x)
#define whileloop_evaluation(x)
#define entity_storage(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define range_increment(x)
#define expression_undefined
@ is_instruction_unstructured
@ is_instruction_whileloop
@ is_instruction_expression
@ is_instruction_multitest
@ is_instruction_sequence
#define instruction_tag(x)
#define sequence_statements(x)
#define dimension_upper(x)
#define reference_indices(x)
#define instruction_sequence(x)
#define instruction_forloop(x)
#define instruction_expression(x)
#define expression_undefined_p(x)
#define test_condition(x)
#define instruction_whileloop(x)
#define variable_dimensions(x)
#define whileloop_body(x)
#define statement_declarations(x)
#define statement_instruction(x)
#define instruction_call(x)
#define forloop_condition(x)
#define instruction_test(x)
#define whileloop_condition(x)
#define statement_number(x)
#define value_expression_p(x)
#define evaluation_before_p(x)
#define value_expression(x)
#define instruction_unstructured(x)
#define entity_initial(x)
FI: I do not understand why the type is duplicated at the set level.
The structure used to build lists in NewGen.