25 #include "pips_config.h"
94 bool dereferencing_p =
false;
107 dereferencing_p =
false;
127 dereferencing_p =
true;
135 dereferencing_p =
false;
148 dereferencing_p =
false;
160 while(!dereferencing_p && !
ENDP(csl)) {
164 dereferencing_p =
true;
168 for(
int i = 0; i<n && !
ENDP(csl); i++) {
192 return dereferencing_p;
251 bool write_effect_on_a_module_argument_found =
false;
262 write_effect_on_a_module_argument_found =
true;
267 return write_effect_on_a_module_argument_found;
290 bool abstract_p =
false;
561 pips_debug(8,
"end with : %s\n", res?
"true":
"false");
569 bool scalar_p =
false;
589 bool comparable_p =
false;
611 for(csl1=sl1, csl2=sl2; !
ENDP(csl1) && equal_p;
POP(csl1),
POP(csl2))
617 comparable_p = equal_p;
638 bool independent_p =
false;
647 independent_p =
true;
656 independent_p =
ENDP(inds);
665 return independent_p;
718 bool interfere_p =
false;
787 for(cind = ind; !
ENDP(cind);
POP(cind)) {
903 for(cind1 = ind1; !
ENDP(ind1);
POP(ind1)) {
907 bool interfere_p =
false;
910 for(crl=rl; !
ENDP(rl);
POP(rl)) {
952 s =
"read environment";
962 s =
"write environment";
1025 bool equal_p =
false;
1093 bool result =
false;
1110 bool result =
false;
1125 bool result =
false;
1245 bool included_p =
true;
1254 list cdims2 = dims2;
1263 cdims2 =
CDR(cdims2);
1267 list cdims1 = dims1;
1276 cdims1 =
CDR(cdims1);
1368 bool compatible_p =
true;
1378 compatible_p =
false;
1380 else if(akt1!=akt2) {
1383 compatible_p =
false;
1391 compatible_p =
false;
1397 compatible_p =
false;
1403 compatible_p = e1==e2;
1407 return compatible_p;
1487 bool to_be_freed =
false;
1596 bool to_be_freed =
false;
1748 "or this function would not have been called.", !
ENDP(children));
statement_mapping effectsmap_to_listmap(statement_mapping efs_map)
bool statement_has_a_module_formal_argument_write_effect_p(statement s, entity module, statement_mapping effects_list_map)
Return true if the statement has a write effect on at least one of the argument (formal parameter) of...
bool std_file_cell_p(cell c)
bool effect_comparable_p(effect e1, effect e2)
Can we merge these two effects because they are equal or because they only differ by their approximat...
bool malloc_cell_p(cell c)
bool effect_scalar_p(effect eff)
effect effect_interference(effect eff1, effect eff2)
Modifies effect eff1 to make sure that any memory state modification abstracted by eff2 preserves the...
bool malloc_effect_p(effect e)
bool cell_included_p(cell c1, cell c2)
Check that all memory locations denoted by cell "c1" are included in cell "c2".
bool effects_all_read_p(list el)
Check that all effects in el are read effects.
void points_to_cell_add_unbounded_subscripts(cell c)
void points_to_cell_add_fixed_subscripts(cell c, bool zero_p)
Convert a reference to an array into a reference to its first element.
effect heap_effect(entity m, action ac)
action_kind effect_action_kind(effect eff)
action make_action_write_memory(void)
To ease the extension of action with action_kind.
bool action_equal_p(action a1, action a2)
list effects_to_list(effects efs)
entity effect_entity(effect e)
Created by B.
tag approximation_or(tag t1, tag t2)
tag approximation_or(tag t1, tag t2) input : two approximation tags.
string full_action_to_short_string(action ac)
bool all_heap_locations_cell_p(cell c)
bool anywhere_effect_p(effect e)
Is it an anywhere effect? ANYMMODULE:ANYWHERE
bool store_effect_p(effect e)
bool effect_list_can_be_safely_full_freed_p(list el)
Check if some references might be freed with the effects.
bool atomic_effect_p(effect e)
bool vect_contains_phi_p(Pvecteur v)
bool vect_contains_phi_p(Pvecteur v) input : a vector output : true if v contains a PHI variable,...
bool cell_equal_p(cell c1, cell c2)
CELLS.
string full_action_to_string(action ac)
string action_to_string(action ac)
Functions dealing with actions.
void points_to_cell_add_zero_subscripts(cell c)
bool cell_abstract_location_p(cell c)
entity cell_entity(cell c)
bool malloc_reference_p(reference r)
effect effect_to_pointer_store_independent_effect(effect eff, entity p)
Modify eff so that the set of memory locations decribed after a write to some pointer p is still in t...
bool store_independent_effect_p(effect eff)
Does this effect define the same set of memory locations regardless of the current (environment and) ...
statement_mapping listmap_to_effectsmap(statement_mapping l_map)
bool anywhere_reference_p(reference r)
bool effects_interfere_p(effect eff1, effect eff2)
Two effects interfere if one of them modify the set of locations defined by the other one.
bool any_anywhere_effect_p(effect e)
Is it a typed or untyped anywhere effect?
bool heap_cell_p(cell c)
Any heap cell, more or less abstract or typed.
bool effects_write_variable_p(list el, entity v)
bool std_file_effect_p(effect e)
bool typed_anywhere_effect_p(effect e)
Is it a typed anywhere effect? ANYMMODULE:ANYWHERE_b0, 1, 2.
action_kind action_to_action_kind(action a)
Without the consistency test, this function would certainly be inlined.
void points_to_cell_complete_with_zero_subscripts(cell c)
bool memory_dereferencing_p(reference r)
Does the set of locations referenced by r depend on a pointer dereferencing?
bool points_to_reference_included_p(reference r1, reference r2)
FI->FC/AM: some elements of the lattice must be exploited here...
bool effects_read_variable_p(list el, entity v)
effects list_to_effects(list l_eff)
Future API for GAP, Generic Access Path.
bool nowhere_cell_p(cell c)
Target of an undefined pointer.
bool cell_equivalent_p(cell c1, cell c2)
Check that memory locations denoted by cell "c1" can be reached by knowing cell "c2" and by using poi...
cell points_to_cell_add_field_dimension(cell c, entity f)
Functions about points-to cells - There is no cell.c file.
bool cell_entity_equal_p(cell c1, cell c2)
bool environment_effect_p(effect e)
void points_to_cell_add_zero_subscript(cell c)
tag approximation_and(tag t1, tag t2)
tag approximation_and(tag t1, tag t2) input : two approximation tags.
bool union_compatible_effects_p(effect ef1, effect ef2)
DO NOT USE ANYMORE: NOT COMPATIBLE WITH ABSTRACT LOCATIONS.
reference cell_to_reference(cell c)
FI: probably to be moved elsewhere in ri-util.
bool io_effects_p(list effects)
list recursive_cell_to_pointer_cells(cell c)
static bool generic_anywhere_effect_p(effect e, int kind)
Is it an anywhere effect (kind=0)? a typed anywhere effect (kind=1) ? or any kind of anywhere effect ...
bool effects_write_p(list el)
action make_action_read_memory(void)
bool anywhere_cell_p(cell c)
Is it an anywhere cell?
bool type_declaration_effect_p(effect e)
bool effect_abstract_location_p(effect eff)
effect anywhere_effect(action ac)
Anywhere effect: an effect which can be related to any location of any areas.
bool effect_on_non_local_variable_p(effect eff)
Test if an effect has a non local effect.
bool io_effect_entity_p(entity e)
bool io_effect_p(effect e)
bool std_file_effects_p(list effects)
reference cell_any_reference(cell c)
API for reference.
effect effect_to_store_independent(effect eff)
bool effects_abstract_location_p(list el)
Returns true if at least one effect of effect list el is related to an abstract location.
list cell_indices(cell c)
entity effect_to_entity(effect ef)
Returns the entity corresponding to the mutation.
effect effect_to_non_pointer_store_independent_effect(effect eff)
Modify eff so that the set of memory locations decribed after a write to some non pointer variable is...
bool effects_on_non_local_variable_p(list effects)
Test if a list of effects concerns non local variables.
bool effect_list_consistent_p(list el)
Debugging.
list cell_to_pointer_cells(cell c)
If the reference in "c" is not a pointer, see if it can be transformed into a pointer reference by ad...
reference simple_reference_add_field_dimension(reference r, entity f)
Do not check anything, just add f as a last subscript.
void points_to_cell_update_last_subscript(cell c, expression s)
Transform reference a[i]...[j] and expression s into reference a[i]..[j+s] if j and s are constant in...
reference reference_add_field_dimension(reference r, entity f)
add a field f as a subscript to a reference r if it is meaningful.
bool heap_effect_p(effect e)
string action_kind_to_string(action_kind ak)
bool FILE_star_effect_reference_p(reference ref)
int get_int_property(const string)
action make_action_read(action_kind _field_)
cell make_cell_reference(reference _field_)
action copy_action(action p)
ACTION.
action_kind make_action_kind_store(void)
void free_effect(effect p)
effects make_effects(list a)
bool effect_consistent_p(effect p)
action make_action_write(action_kind _field_)
approximation make_approximation_may(void)
effect make_effect(cell a1, action a2, approximation a3, descriptor a4)
descriptor make_descriptor_none(void)
cell copy_cell(cell p)
CELL.
bool reference_consistent_p(reference p)
reference make_reference(entity a1, list a2)
void free_expression(expression p)
static reference ref
Current stmt (an integer)
bool entity_null_locations_p(entity e)
test if an entity is the NULL POINTER
bool entity_abstract_location_p(entity al)
entity entity_typed_anywhere_locations(type t)
bool entity_all_locations_p(entity e)
test if an entity is the top of the lattice
bool entity_typed_anywhere_locations_p(entity e)
Test if an entity is the bottom of the lattice.
bool entity_nowhere_locations_p(entity e)
test if an entity is the bottom of the lattice
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_all_module_heap_locations_p(entity e)
test if an entity is the a heap area
entity entity_all_heap_locations_typed(type t)
bool entity_all_heap_locations_p(entity e)
test if an entity is the set of all heap locations
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 effect_any_reference(e)
FI: cannot be used as a left hand side.
#define effect_variable(e)
For COMPATIBILITY purpose only - DO NOT USE anymore.
#define variable_phi_p(e)
true if e is a phi variable PHI entities have a name like: REGIONS:PHI#, where # is a number.
type points_to_cell_to_type(cell, bool *)
FI: I need more generality than is offered by cell_to_type()
type points_to_reference_to_type(reference, bool *)
FI: I need more generality than is offered by cell_to_type()
type points_to_expression_to_concrete_type(expression)
The type returned is stored in a hash-table.
bool points_to_array_reference_p(reference)
Is this a reference to an array or a reference to a pointer? This is not linked to the type of the re...
bool atomic_points_to_cell_p(cell)
Is it a unique concrete memory location?
type points_to_array_reference_to_type(reference)
If this is an array reference, what is the type of the underlying array type?
#define cell_reference(x)
#define cell_preference(x)
#define cell_reference_p(x)
#define descriptor_tag(x)
#define action_kind_environment_p(x)
#define action_kind_tag(x)
#define action_kind_store_p(x)
#define action_write_p(x)
#define action_kind_type_declaration_p(x)
#define effect_descriptor(x)
#define effects_effects(x)
#define cell_preference_p(x)
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
bool entities_may_conflict_p(entity e1, entity e2)
Check if two entities may conflict.
const char * get_current_module_name(void)
Get the name of the current module.
#define ENDP(l)
Test if a list is empty.
#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.
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.
#define list_undefined
Undefined list definition :-)
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
void hash_put(hash_table htp, const void *key, const void *val)
This functions stores a couple (key,val) in the hash table pointed to by htp.
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
#define HEAP_AREA_LOCAL_NAME
#define GET_STATEMENT_MAPPING(map, stat)
#define MAKE_STATEMENT_MAPPING()
#define STATEMENT_MAPPING_MAP(s, v, code, h)
#define same_string_p(s1, s2)
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
string string_of_type(const type)
#define entity_variable_p(e)
An entity_variable_p(e) may hide a typedef and hence a functional type.
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
entity FindEntity(const char *package, const char *name)
Retrieve an entity from its package/module name and its local name.
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...
bool malloc_effect_entity_p(entity e)
bool io_luns_entity_p(entity e)
bool std_file_entity_p(entity e)
const char * entity_module_name(entity e)
See comments about module_name().
bool expression_integer_value(expression e, intptr_t *pval)
void reference_complete_with_zero_subscripts(reference r)
Reference r to an array maybe partial, as is possible in C: with declaration "int a[10][10]",...
bool extended_integer_constant_expression_p(expression e)
More extensive than next function.
void reference_add_zero_subscripts(reference r, type t)
expression make_unbounded_expression()
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
bool expression_equal_p(expression e1, expression e2)
Syntactic equality e1==e2.
void reference_add_zero_subscript(reference r)
No check on reference r.
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
bool reference_equal_p(reference r1, reference r2)
void reference_add_unbounded_subscripts(reference r, type t)
bool unbounded_expression_p(expression e)
bool reference_with_constant_indices_p(reference r)
reference reference_with_store_independent_indices(reference r)
Return by side effect a reference whose memory locations includes the memory locations of r in case t...
list expression_to_reference_list(expression e, list lr)
conversion of an expression into a list of references; references are appended to list lr as they are...
bool variable_is_a_module_formal_parameter_p(entity, entity)
bool variable_return_p(entity)
True if a variable is the pseudo-variable used to store value returned by a function:
bool array_of_pointers_type_p(type)
type entity_basic_concrete_type(entity)
retrieves or computes and then returns the basic concrete type of an entity
type subscripted_type_to_type(type, expression)
Returns the type of an object of type t subscripted by expression se.
bool pointer_type_p(type)
Check for scalar pointers.
unsigned int array_type_dimension(type)
size_t type_depth(type)
Number of steps to access the lowest leave of type t without dereferencing.
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.
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 array_of_struct_type_p(type)
entity find_field_in_field_list(entity, list)
To deal with fields declared in different C files.
#define type_functional_p(x)
#define REFERENCE(x)
REFERENCE.
#define reference_undefined
#define reference_variable(x)
#define basic_pointer_p(x)
#define basic_derived_p(x)
#define EXPRESSION(x)
EXPRESSION.
#define entity_undefined_p(x)
#define expression_undefined
#define reference_indices(x)
#define preference_reference(x)
#define variable_dimensions(x)
#define type_variable_p(x)
#define variable_basic(x)
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
The structure used to build lists in NewGen.