PIPS
|
Go to the source code of this file.
Functions | |
void | print_homogeneous_arguments (list args, const char *variable_name(entity)) |
Functions dealing with entity lists. More... | |
void | dump_arguments (cons *args) |
entity_name is a macro, hence the code replication More... | |
cons * | arguments_add_entity (cons *a, entity e) |
cons * | arguments_rm_entity (cons *a, entity e) |
cons * | arguments_union (cons *a1, cons *a2) |
cons * arguments_union(cons * a1, cons * a2): returns a = union(a1, a2) where a1 and a2 are lists of entities. More... | |
bool | arguments_equal_p (list a1, list a2) |
Check the syntactic equality of lists a1 and a2. More... | |
bool | entity_is_argument_p (entity e, cons *args) |
list | arguments_intersection (list a1, list a2) |
Build a new list with all entities occuring in both a1 and a2. More... | |
bool | arguments_set_equal_p (list a1, list a2) |
Set equality of lists a1 and a2. More... | |
bool | arguments_subset_p (list a1, list a2) |
Check if a1 is a subset of a2. More... | |
void | free_arguments (cons *args) |
cons * | dup_arguments (cons *args) |
cons * | arguments_difference (cons *a1, cons *a2) |
set difference: a1 - a2 ; similar to set intersection More... | |
list | base_to_entities (Pvecteur b) |
generate a Newgen list with all entities refered in vector b More... | |
Definition at line 85 of file arguments.c.
References CONS, ENTITY, entity_is_argument_p(), gen_nconc(), and NIL.
Referenced by add_alternate_return(), add_ghost_variable_entity(), add_index_bound_conditions(), AddEffectiveFormalParameter(), AddEntryEntity(), AddEntryLabel(), args_to_transformer(), arguments_union(), comp_regions_of_implied_do(), ComputeAddresses(), effects_to_arguments(), filter_transformer(), fortran_user_call_to_transformer(), generic_transformer_intra_to_inter(), precondition_intra_to_inter(), ProcessEntry(), recompute_loop_transformer(), safe_transformer_projection(), transformer_add_identity(), transformer_add_loop_index_incrementation(), transformer_add_modified_variable(), transformer_add_modified_variable_entity(), transformer_add_value_update(), transformer_add_variable_incrementation(), transformer_add_variable_update(), transformer_combine(), transformer_list_generic_transitive_closure(), transformer_projection_with_redundancy_elimination_and_check(), translate_global_value(), update_common_sizes(), and update_cp_with_rhs_to_transformer().
set difference: a1 - a2 ; similar to set intersection
should gen_nconc be used ?!? Or is it only useful to chain stuff at the end of a list?
a1 | 1 |
a2 | 2 |
Definition at line 233 of file arguments.c.
References CAR, CONS, ENTITY, entity_is_argument_p(), MAPL, and NIL.
Referenced by dump_common_layout(), precondition_intra_to_inter(), print_C_common_layout(), print_common_layout(), recompute_loop_transformer(), region_exact_projection_along_parameters(), regions_transformer_apply(), statement_to_postcondition(), statement_to_total_precondition(), transformer_filter(), and transformer_list_multiple_closure_to_precondition().
Check the syntactic equality of lists a1 and a2.
To check the equality of a1 and a2 as sets, use argument intersection and a cardinal equality, assuming no entity occurs more than once in a1 or a2.
a1 | 1 |
a2 | 2 |
Definition at line 139 of file arguments.c.
Build a new list with all entities occuring in both a1 and a2.
should gen_nconc be used ?!? Or is it only useful to chain stuff at the end of a list?
a1 | 1 |
a2 | 2 |
Definition at line 158 of file arguments.c.
References CONS, ENTITY, entity_is_argument_p(), FOREACH, and NIL.
Referenced by loop_fully_unrollable_p(), region_exact_projection_along_parameters(), and transformer_general_intersection().
Definition at line 94 of file arguments.c.
References entity_is_argument_p(), entity_name, gen_remove(), and pips_internal_error.
Referenced by reify_ghost_variable_entity(), and rm_live_loop_index().
Set equality of lists a1 and a2.
Check that all entities in a1 also occur in a2 and vice-versa.
Might be faster to use the intersection and its cardinal...
This algorithm is correct if an entity can appear several times in a list.
Could be implemented with two calls to arguments_subset_p()
a1 | 1 |
a2 | 2 |
Definition at line 181 of file arguments.c.
References ENTITY, entity_is_argument_p(), FOREACH, and set_equal_p().
Referenced by transformer_combine().
Check if a1 is a subset of a2.
a1 | 1 |
a2 | 2 |
Definition at line 204 of file arguments.c.
References ENTITY, entity_is_argument_p(), and FOREACH.
Referenced by transformer_list_multiple_closure_to_precondition().
cons * arguments_union(cons * a1, cons * a2): returns a = union(a1, a2) where a1 and a2 are lists of entities.
A new list is allocated.
Entities in a1 have the same rank wrt a1 and a. Entities in a2 are likely to have different ranks wrt a and a2. This might imply a transformer renaming.
a1 | 1 |
a2 | 2 |
Definition at line 116 of file arguments.c.
References arguments_add_entity(), CAR, ENTITY, gen_copy_seq(), and MAPL.
Referenced by add_index_bound_conditions(), dump_common_layout(), fortran_user_call_to_transformer(), print_C_common_layout(), print_common_layout(), and transformer_convex_hulls().
generate a Newgen list with all entities refered in vector b
Definition at line 250 of file arguments.c.
References CONS, ENTITY, gen_nreverse(), NIL, Svecteur::succ, and vecteur_var.
Referenced by transformer_intersect_range_with_domain().
void dump_arguments | ( | cons * | args | ) |
entity_name is a macro, hence the code replication
args | rgs |
Definition at line 69 of file arguments.c.
References CAR, ENDP, ENTITY, entity_name, entity_undefined, fprintf(), and MAPL.
Referenced by dump_live_loop_indices(), EndOfProcedure(), MakeEntry(), precondition_intra_to_inter(), ProcessEntry(), transformer_filter(), TranslateEntryFormals(), and variable_in_module_p2().
should be a macro later, but keep debugging in mind!
args | rgs |
Definition at line 225 of file arguments.c.
References gen_copy_seq().
Referenced by recompute_loop_transformer(), transformer_equality_fix_point(), and transformer_general_intersection().
args | rgs |
Definition at line 150 of file arguments.c.
References chunk_undefined, and gen_find_eq().
Referenced by add_type_information(), any_assign_operation_to_transformer(), any_scalar_assign_to_transformer_list(), any_scalar_assign_to_transformer_without_effect(), arguments_add_entity(), arguments_difference(), arguments_intersection(), arguments_rm_entity(), arguments_set_equal_p(), arguments_subset_p(), assigned_expression_to_transformer(), assigned_expression_to_transformer_list(), call_instruction_to_communications(), ComputeAddresses(), do_kernelize(), filter_transformer(), find_field_in_field_list(), FindOrCreateCurrentEntity(), fortran_user_call_to_transformer(), generic_apply_effect_to_transformer(), ghost_variable_entity_p(), IsEffectiveFormalParameterP(), live_loop_index_p(), loop_nest_movement_generation(), loop_nest_to_local_variables(), MakeEntry(), module_to_all_declarations(), redeclaration_enter_statement(), reify_ghost_variable_entity(), safe_transformer_projection(), SafeFindOrCreateEntity(), SaveEntity(), substitute_scalar_stub_in_transformer(), substitute_stubs_in_transformer_with_translation_binding(), transformer_combine(), transformer_convex_hulls(), transformer_general_consistency_p(), transformer_list_generic_transitive_closure(), transformer_list_preserved_variables(), transformer_list_safe_variables_projection(), transformer_list_with_effect(), translate_global_value(), variable_in_module_p(), and variable_in_module_p2().
void free_arguments | ( | cons * | args | ) |
should be a macro later, but keep debugging in mind!
args | rgs |
Definition at line 218 of file arguments.c.
References gen_free_list().
Referenced by add_formal_to_actual_bindings(), atom_cse_expression(), formal_and_actual_parameters_association(), fortran_user_call_to_transformer(), move_transformer(), reset_live_loop_indices(), test_to_transformer(), test_to_transformer_list(), transformer_combine(), transformer_filter(), and transformer_normalize().
void print_homogeneous_arguments | ( | list | args, |
const char * | variable_nameentity | ||
) |
Functions dealing with entity lists.
Called "arguments" because the package was developped within the transformer library where entity lists were used to represent transformer arguments. No specific link with transformers. Now used here and there and moved into ri-util. package "arguments"
Basic routines dealing with the arguments field of transformers (i.e. list of entities, so it should be put in ri-util like many such packages written for pips)
Hash tables were not used because the argument lists are very short
Francois Irigoin, April 1990
args | rgs |
variable_name | ariable_name |
Definition at line 54 of file arguments.c.
References CAR, ENDP, ENTITY, entity_undefined, fprintf(), MAPL, and variable_name().
Referenced by fprint_transformer(), and print_arguments().