26 #include "pips_config.h"
101 bool formal_p =
true;
110 bool formal_p =
true;
119 bool found_p =
false;
151 bool found_p =
false;
167 bool related_p =
false;
172 related_p = (ec1==ec2);
185 fprintf(stderr,
"cell undefined\n");
192 fprintf(stderr,
"Not a Newgen cell object\n");
205 fprintf(stderr,
"Empty cell list");
226 bool field_p =
false;
284 bool found_p =
false;
285 bool skip_one_p =
false;
302 if(skip_one_p &&
ENDP(sl23) && !
ENDP(nsl)) {
379 bool found_p =
false;
403 "to be inadequate with its use in the current "
491 bool atomic_p =
false;
534 bool intersect_p =
false;
601 bool array_p =
false;
710 bool field_found_p =
false;
717 field_found_p =
true;
731 pips_assert(
"Not too many subscripts wrt the type.\n", i<=d);
735 for(j=i+1;j<=d;j++) {
765 bool may_not_p =
true;
824 bool non_null_p =
false;
847 bool nowhere_p =
false;
872 bool nowhere_p =
false;
981 bool new_cell_p =
false;
1029 bool exact_p =
true;
1043 bool compatible_p =
true;
1053 return compatible_p;
1075 int (*line_number_func)(
void))
1094 for(c_source_sl = source_sl, c_sink_sl = sink_sl;
1096 POP(c_source_sl),
POP(c_sink_sl)) {
1103 && !
ENDP(c_sink_sl)) {
1142 pips_internal_error(
"The type of a sink cell, \"%s\", is not compatible with the source cell, \"%s\".\n",
1170 bool independent_p =
false;
1173 independent_p =
true;
1184 independent_p =
true;
1197 independent_p =
false;
1205 return independent_p;
1250 bool independent_p =
ENDP(il);
1252 if(!independent_p) {
1254 independent_p =
false;
1259 independent_p =
true;
1266 return independent_p;
float a2sf[2] __attribute__((aligned(16)))
USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.
cell make_cell_reference(reference _field_)
approximation copy_approximation(approximation p)
APPROXIMATION.
descriptor make_descriptor_none(void)
cell copy_cell(cell p)
CELL.
points_to make_points_to(cell a1, cell a2, approximation a3, descriptor a4)
void free_reference(reference p)
expression copy_expression(expression p)
EXPRESSION.
reference make_reference(entity a1, list a2)
void free_expression(expression p)
bool entity_heap_location_p(entity b)
package abstract location.
bool entity_null_locations_p(entity e)
test if an entity is the NULL POINTER
bool entity_abstract_location_p(entity al)
bool entity_stub_sink_p(entity e)
test if an entity is a stub sink for a formal parameter e.g.
bool cell_typed_anywhere_locations_p(cell c)
test if a cell is the bottom of the lattice
bool entity_typed_anywhere_locations_p(entity e)
Test if an entity is the bottom of the lattice.
entity entity_all_xxx_locations_typed(string xxx, type t)
FI->AM: the predicate entity_all_xxx_locations_typed_p() is missing...
bool entity_anywhere_locations_p(entity e)
test if an entity is the bottom of the lattice
entity entity_all_locations()
eturn ANY_MODULE:ANYWHERE (the top of the lattice)
bool entity_typed_nowhere_locations_p(entity e)
test if an entity is the bottom of the lattice
void const char const char const int
#define ANYWHERE_LOCATION
bool cells_must_point_to_null_p(list cl)
bool store_independent_points_to_reference_p(reference r)
Functions for points-to references, the kind of references used in points-to cells.
type points_to_cells_minimal_type_upper_bound(list cl __attribute__((unused)))
int points_to_reference_to_final_dimension(reference r)
Compute the number of array subscript at the end of a points_to_reference.
bool cell_points_to_nowhere_sink_in_set_p(cell source, set pts)
bool points_to_cell_in_list_p(cell c, list L)
bool generic_atomic_points_to_cell_p(cell c, bool strict_p)
Is it a unique concrete memory location?
list points_to_reference_to_typed_index(reference r, type t)
Look for the index in "r" that corresponds to a pointer of type "t" and return the corresponding elem...
type points_to_array_reference_to_type(reference r)
If this is an array reference, what is the type of the underlying array type?
bool points_to_cell_equal_p(cell c1, cell c2)
list merge_points_to_cell_lists(list l1, list l2)
Add in "l1" elements of "l2" that are not yet in "l1".
bool field_reference_expression_p(expression e)
Check if expression "e" is a reference to a struct field.
bool cell_points_to_null_sink_in_set_p(cell source, set pts)
bool store_independent_points_to_indices_p(list sl)
check that the subscript list il is either empty or made of integers or fields or unbounded entity "*...
points_to points_to_with_stripped_sink(points_to pt, int(*line_number_func)(void))
The value of the source can often be expressed with different subscript lists.
void print_points_to_cell(cell c)
Debug: use stderr.
bool related_points_to_cells_p(cell c1, cell c2)
bool points_to_array_reference_p(reference r)
Is this a reference to an array or a reference to a pointer? This is not linked to the type of the re...
bool cell_must_point_to_nowhere_sink_in_set_p(cell source, set pts)
How are array handled in pts? do we have arcs "a->a"?
bool constant_points_to_indices_p(list sl)
check that the subscript list il is either empty or made of integers or fields.
bool formal_parameter_points_to_cell_p(cell c)
void fprint_points_to_cell(FILE *f __attribute__((unused)), cell c)
Debug: print a cell list for points-to.
bool compatible_points_to_subscripts_p(expression s1, expression s2)
Two subscript are compatible if they are equal or if one of them is unbounded.
bool generic_atomic_points_to_reference_p(reference r, bool strict_p)
Is it a unique concrete memory location?
bool atomic_points_to_reference_p(reference r)
void print_points_to_cells(list cl)
Debug.
bool cells_may_not_point_to_null_p(list cl)
bool cell_points_to_non_null_sink_in_set_p(cell source, set pts)
A set of functions called cell_points_to_xxxx(cell s, set pts) where set pts is a points-to relation ...
reference points_to_cells_minimal_reference_upper_bound(entity m __attribute__((unused)), type t __attribute__((unused)), list cl __attribute__((unused)))
void complete_points_to_reference_with_zero_subscripts(reference r)
cell make_anywhere_points_to_cell(type t)
Function storing points to information attached to a statement.
bool points_to_cells_intersect_p(cell lc, cell rc)
points-to cells use abstract addresses, hence the proper comparison is an intersection.
bool stub_points_to_cell_p(cell c)
void points_to_reference_update_final_subscripts(reference r, list nsl)
Substitute the subscripts "sl" in points-to reference "r" just after the last field subscript by "nsl...
entity points_to_cells_minimal_module_upper_bound(list cl __attribute__((unused)))
bool recursive_store_independent_points_to_reference_p(type t, list sl)
bool related_points_to_cell_in_list_p(cell c, list L)
Two cells are related if they are based on the same entity.
bool atomic_points_to_cell_p(cell c)
Is it a unique concrete memory location?
list points_to_cells_to_upper_bound_points_to_cells(list cl)
Add to list "l" cells that are upper bound cells of the cells already in list "l" and return list "l"...
bool similar_arc_in_points_to_set_p(points_to spt, set in, approximation *pa)
See if an arc like "spt" exists in set "in", regardless of its approximation.
bool exact_points_to_subscript_list_p(list sl)
See if the subscript list sl is precise, i.e.
cell points_to_cells_minimal_upper_bound(list cl __attribute__((unused)))
Allocate a cell that is the minimal upper bound of the cells in list "cl" according to the points-to ...
list points_to_cell_to_upper_bound_points_to_cells(cell c)
Return a list of cells that are larger than cell "c" in the points-to cell lattice.
void complete_points_to_reference_with_fixed_subscripts(reference r, bool zero_p)
Add a set of zero subscripts to a constant memory path reference "r" by side effect.
bool cell_equal_p(cell, cell)
CELLS.
type points_to_reference_to_concrete_type(reference)
reference cell_any_reference(cell)
API for reference.
type points_to_cell_to_concrete_type(cell)
type points_to_reference_to_type(reference, bool *)
FI: I need more generality than is offered by cell_to_type()
bool anywhere_cell_p(cell)
Is it an anywhere cell?
bool nowhere_cell_p(cell)
Target of an undefined pointer.
bool adapt_reference_to_type(reference, type, int(*)(void))
FI: a really stupid function...
bool heap_cell_p(cell)
Any heap cell, more or less abstract or typed.
#define cell_undefined_p(x)
#define cell_domain_number(x)
#define approximation_exact_p(x)
#define cell_domain
newgen_cell_interpretation_domain_defined
#define approximation_must_p(x)
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
void gen_full_free_list(list l)
bool entities_may_conflict_p(entity e1, entity e2)
Check if two entities may conflict.
entity get_current_module_entity(void)
Get the entity of the current module.
#define ENDP(l)
Test if a list is empty.
list gen_nreverse(list cp)
reverse a list in place
#define POP(l)
Modify a list pointer to point on the next element of the list.
#define NIL
The empty list (nil in Lisp)
size_t gen_length(const list l)
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
#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
list gen_last(list l)
Return the last element of a list.
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
#define CDR(pcons)
Get the list less its first element.
list gen_nthcdr(int n, const list lx)
caution: the first item is 0! was: return( (n<=0) ? l : gen_nthcdr( n-1, CDR( l ))) ; if n>gen_length...
gen_chunk gen_nth(int n, const list l)
to be used as ENTITY(gen_nth(3, l))...
#define list_undefined
Undefined list definition :-)
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
#define MODULE_SEP_STRING
#define GENERIC_GLOBAL_FUNCTION(name, type)
#define SET_FOREACH(type_name, the_item, the_set)
enumerate set elements in their internal order.
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
#define points_to_approximation(x)
#define points_to_sink(x)
#define points_to_source(x)
void print_reference(reference r)
static bool constant_p(entity e)
This function return a bool indicating if related entity e represents a constant.
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
bool entity_field_p(entity e)
e is the field of a structure
const char * entity_module_name(entity e)
See comments about module_name().
bool unbounded_entity_p(entity f)
bool extended_integer_constant_expression_p(expression e)
More extensive than next function.
expression make_unbounded_expression()
bool field_expression_p(expression e)
The expression is of kind "a", where "a" is a field of some struct "s".
bool expression_equal_p(expression e1, expression e2)
Syntactic equality e1==e2.
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
bool integer_expression_p(expression e)
bool reference_equal_p(reference r1, reference r2)
bool unbounded_expression_p(expression e)
reference expression_reference(expression e)
Short cut, meaningful only if expression_reference_p(e) holds.
bool expression_range_p(expression e)
bool char_star_constant_function_type_p(type)
Beware of typedefs.
type expression_to_type(expression)
For an array declared as int a[10][20], the type returned for a[i] is int [20].
type make_scalar_overloaded_type(void)
type C_type_to_pointed_type(type)
returns a copy of t if t is not a pointer type, and the pointed type if t is a pointer type or.
string safe_type_to_string(const type)
type type_to_pointed_type(type)
returns t if t is not a pointer type, and the pointed type if t is a pointer 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.
unsigned int array_type_dimension(type)
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)
bool struct_type_p(type)
Returns true if t is of type derived and if the derived type is a struct.
type array_type_to_element_type(type)
returns the type of the elements of an array type, as a newly allocated type.
bool char_type_p(type)
return true whether âtâ is a char or an unsigned char
bool C_pointer_type_p(type)
Returns OK for "char[]" as well as for "char *".
#define type_functional_p(x)
#define syntax_reference_p(x)
#define syntax_reference(x)
#define reference_undefined
#define reference_variable(x)
#define EXPRESSION(x)
EXPRESSION.
#define type_undefined_p(x)
#define entity_undefined_p(x)
#define expression_undefined
#define reference_indices(x)
#define variable_dimensions(x)
#define expression_syntax(x)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
FI: I do not understand why the type is duplicated at the set level.
The structure used to build lists in NewGen.