25 #include "pips_config.h"
54 #include "constants.h"
154 pips_debug(8,
"add_interprocedural_new_value_entities" "for %s\n",
210 readonly?
"readonly" :
"read/write");
216 bool array_equivalenced =
false;
226 for(ce=local_shared; !
ENDP(ce);
POP(ce)) {
241 "%s is aliased with scalar variable %s with non "
242 "analyzed type %s or with array variable\n",
245 array_equivalenced =
true;
252 "%s is aliased with scalar variable %s with different "
257 array_equivalenced =
true;
269 if(!array_equivalenced) {
288 for(ce=local_shared; !
ENDP(ce);
POP(ce)) {
334 int old_value_number = 0;
335 int intermediate_value_number = 0;
336 int new_value_number = 0;
359 new_value_number *= 3; new_value_number /= 2;
360 old_value_number *= 3; old_value_number /= 2;
362 new_value_number =
MAX(10,new_value_number);
363 old_value_number =
MAX(10,old_value_number);
365 intermediate_value_number = old_value_number;
367 pips_debug(8,
"old_value_number = %d\n", old_value_number);
368 pips_debug(8,
"new_value_number = %d\n", new_value_number);
372 intermediate_value_number);
583 "experimental value, false.");
626 list module_inter_effects;
627 list module_intra_effects;
902 pips_debug(1,
"Number of analyzed variables for module %s: %d\n",
905 pips_debug(1,
"Number of analyzed values for module %s: %d\n",
effect copy_effect(effect p)
EFFECT.
void free_reference(reference p)
reference make_reference(entity a1, list a2)
reference copy_reference(reference p)
REFERENCE.
struct _newgen_struct_entity_ * entity
bool entity_heap_location_p(entity b)
package abstract location.
bool entity_abstract_location_p(entity al)
bool entity_typed_anywhere_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
Pvecteur vect_variable_rename(Pvecteur v, Variable v_old, Variable v_new)
Pvecteur vect_variable_rename(Pvecteur v, Variable v_old, Variable v_new): rename the potential coord...
transformer transformer_equalities_add(transformer tf, Pcontrainte eqs)
struct _newgen_struct_reference_ * reference
struct _newgen_struct_action_ * action
#define CONTRAINTE_UNDEFINED
Pcontrainte contraintes_free(Pcontrainte pc)
Pcontrainte contraintes_free(Pcontrainte pc): desallocation de toutes les contraintes de la liste pc.
Pcontrainte contrainte_make(Pvecteur pv)
Pcontrainte contrainte_make(Pvecteur pv): allocation et initialisation d'une contrainte avec un vecte...
list load_module_intraprocedural_effects(entity e)
list load_summary_effects(entity e)
FI->FI, FI->BC: these two functions should be moved into effects-util or effects-simple.
struct _newgen_struct_effect_ * effect
effects load_proper_rw_effects(statement)
list effect_to_constant_path_effects_with_no_pointer_information(effect)
effect(* reference_to_effect_func)(reference, action, bool)
effect(* effect_dup_func)(effect eff)
effect reference_to_reference_effect(reference, action, bool)
list effect_to_constant_path_effects_with_points_to(effect, statement, transformer)
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
#define effect_write_p(eff)
#define variable_phi_p(e)
true if e is a phi variable PHI entities have a name like: REGIONS:PHI#, where # is a number.
bool location_entity_p(entity)
type points_to_reference_to_concrete_type(reference)
reference cell_any_reference(cell)
API for reference.
bool generic_atomic_points_to_reference_p(reference, bool)
Is it a unique concrete memory location?
bool store_effect_p(effect)
entity make_location_entity(reference)
locations.c
reference simple_reference_add_field_dimension(reference, entity)
Do not check anything, just add f as a last subscript.
bool pt_to_list_undefined_p(void)
points_to.c
bool store_independent_effect_p(effect)
Does this effect define the same set of memory locations regardless of the current (environment and) ...
#define action_write_p(x)
#define effects_effects(x)
const char * module_name(const char *s)
Return the module part of an entity name.
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
#define gen_recurse(start, domain_number, flt, rwt)
void gen_full_free_list(list l)
bool entities_may_conflict_p(entity e1, entity e2)
Check if two entities may conflict.
statement get_current_module_statement(void)
Get the current module statement.
entity get_current_module_entity(void)
Get the entity of the current module.
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
#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)
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
#define CAR(pcons)
Get the value of the first 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 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)
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
#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
void reset_hooks_register(reset_func_t)
reset_hooks.c
#define SET_FOREACH(type_name, the_item, the_set)
enumerate set elements in their internal order.
int bool
we cannot use an enum or stdbool because we need to be compatible with newgen, thus boolean need to h...
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
#define entity_variable_p(e)
An entity_variable_p(e) may hide a typedef and hence a functional type.
#define entity_constant_p(e)
bool entity_not_constant_or_intrinsic_p(entity e)
Default entity filter for get_referenced_entities()
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 dummy_parameter_entity_p(entity p)
is p a dummy parameter?
bool entity_formal_p(entity p)
is p a formal parameter?
bool c_module_p(entity m)
Test if a module "m" is written in C.
set get_referenced_entities_filtered(void *elem, bool(*chunk_filter)(void *), bool(*entity_filter)(entity))
Same as get_referenced_entities, but will only consider entities that fulfills entity_filter and will...
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
string storage_to_string(storage s)
bool typedef_entity_p(entity e)
bool effects_package_entity_p(entity e)
checks if an entity is an IO_EFFECTS_PACKAGE_NAME, a MALLOC_EFFECTS_NAME or a RAND_EFFECTS_PACKAGE_NA...
bool entity_field_p(entity e)
e is the field of a structure
const char * module_local_name(entity e)
Returns the module local user name.
bool entity_module_p(entity e)
entity function_to_return_value(entity m)
Returns the entity rv that carries the value returned by module m, when m is not a C void function or...
bool formal_context_variable_p(entity)
Such pseudo-variables are generated by the points-to analysis.
bool entity_static_variable_p(entity)
return true if the entity is declared with the keyword static
bool variable_is_a_module_formal_parameter_p(entity, entity)
bool place_holder_variable_p(entity)
bool global_variable_p(entity)
Is v a global variable such as "int i;".
bool variable_dynamic_p(entity)
bool type_equal_p(type, type)
bool integer_scalar_entity_p(entity)
integer_scalar_entity_p() is obsolete; use entity_integer_scalar_p()
type entity_basic_concrete_type(entity)
retrieves or computes and then returns the basic concrete type of an entity
bool variable_stack_p(entity)
list struct_type_to_fields(type)
bool struct_type_p(type)
Returns true if t is of type derived and if the derived type is a struct.
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.
string type_to_string(const type)
type.c
struct _newgen_struct_callees_ * callees
#define transformer_undefined
#define functional_result(x)
#define storage_formal_p(x)
#define type_unknown_p(x)
#define callees_callees(x)
#define reference_variable(x)
#define type_functional(x)
#define entity_storage(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define transformer_arguments(x)
#define storage_return_p(x)
#define type_variable_p(x)
Pcontrainte eq
element du vecteur colonne du systeme donne par l'analyse
static bool entity_for_value_mapping_p(entity e)
static void allocate_module_value_mappings(entity m)
static void add_reference_values(reference r, bool write_p, bool global_p)
void add_or_kill_equivalenced_variables(entity e, bool readonly)
Look for variables equivalenced with e.
transformer tf_equivalence_equalities_add(transformer tf)
mappings.c
bool value_mappings_compatible_vector_p(Pvecteur iv)
transform a vector based on variable entities into a vector based on new value entities when possible...
static void add_inter_or_intraprocedural_field_entities(reference r, list fl, bool intra_p)
Check which fields combined with r would lead to analyzed values and recurse for fields which are str...
void add_intraprocedural_value_entities(entity e)
Use to be static, but may be called from ri_to_transformer.
void variables_to_new_values(Pvecteur v)
replace variables by new values which is necessary for equivalenced variables
list variables_to_values(list list_mod)
static void reset_equivalence_equalities()
static void add_interprocedural_value_entities(entity e)
????
void upwards_vect_rename(Pvecteur v, transformer post)
Renaming of variables in v according to transformations occuring later.
static void values_for_current_module_intraprocedural_simple_effects(void)
static void create_values_for_simple_effect(effect e, entity m)
If effect e meets all conditions to represent a location whose value could and should be analyzed,...
list dynamic_variables_to_values(list list_mod)
Build the list of values to be projected when the declaration list list_mod is no longer valid becaus...
static void add_interprocedural_field_entities(reference r, list fl)
static void add_interprocedural_new_value_entity(entity e)
static void add_intraprocedural_value_entities_unconditionally(entity e)
static void add_intraprocedural_field_entities(reference r, list fl)
list variable_to_values(entity e)
void module_to_value_mappings(entity m)
void module_to_value_mappings(entity m): build hash tables between variables and values (old,...
static bool add_values_for_simple_effects_of_statement(statement s)
Declare value entities necessary to analyze locations defined by proper effects.
static void add_equivalence_equality(entity e, entity eq)
static Pcontrainte equivalence_equalities
Variable value mappings package.
list variables_to_old_values(list list_mod)
void add_implicit_interprocedural_write_effects(entity al, list el)
It is assumed that al is an abstract location that is written and which may conflict with effects in ...
void add_equivalenced_values(entity e, entity eq, bool readonly)
struct Scontrainte * succ
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
FI: I do not understand why the type is duplicated at the set level.
The structure used to build lists in NewGen.
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
#define VECTEUR_UNDEFINED
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
Pvecteur vect_new(Variable var, Value coeff)
Pvecteur vect_new(Variable var,Value coeff): allocation d'un vecteur colineaire au vecteur de base va...
void vect_add_elem(Pvecteur *pvect, Variable var, Value val)
void vect_add_elem(Pvecteur * pvect, Variable var, Value val): addition d'un vecteur colineaire au ve...
list current_module_declarations()