PIPS
|
#include "newgen_types.h"
Go to the source code of this file.
Data Structures | |
struct | cons |
The structure used to build lists in NewGen. More... | |
Macros | |
#define | NIL ((list)NULL) |
The empty list (nil in Lisp) More... | |
#define | POP(l) ((l)=(l)->cdr) |
Modify a list pointer to point on the next element of the list. More... | |
#define | ENDP(l) ((l)==NIL) |
Test if a list is empty. More... | |
#define | list_undefined ((cons *)-3) |
Undefined list definition :-) More... | |
#define | list_undefined_p(c) ((c)==list_undefined) |
Return if a list is undefined. More... | |
#define | CAR(pcons) ((pcons)->car) |
Get the value of the first element of a list. More... | |
#define | CDR(pcons) ((pcons)->cdr) |
Get the list less its first element. More... | |
#define | REFCAR(pc) (&(CAR(pc).p)) |
Get the adress of the first element of a list. More... | |
#define | CONS(_t_, _i_, _l_) gen_##_t_##_cons((_i_),(_l_)) |
List element cell constructor (insert an element at the beginning of a list) More... | |
#define | FOREACH(_fe_CASTER, _fe_item, _fe_list) |
Apply/map an instruction block on all the elements of a list. More... | |
#define | VOLATILE_FOREACH(_fe_CASTER, _fe_item, _fe_list) |
#define | MAPL(_map_list_cp, _code, _l) |
Apply some code on the addresses of all the elements of a list. More... | |
#define | MAP(_map_CASTER, _map_item, _map_code, _map_list) |
Apply/map an instruction block on all the elements of a list (old fashioned) More... | |
#define | gen_BOOL_cons gen_bool_cons |
Another name to the funtion to insert a bool element at the start of a list. More... | |
#define | gen_INT_cons gen_int_cons |
Another name to the funtion to insert an integer element at the start of a list. More... | |
#define | gen_LIST_cons gen_list_cons |
Another name to the funtion to insert a list element at the start of a list. More... | |
#define | gen_CONSP_cons gen_list_cons |
Another name to the funtion to insert a list element at the start of a list. More... | |
#define | gen_STRING_cons gen_string_cons |
Another name to the funtion to insert a string element at the start of a list. More... | |
#define | gen_sweep_forward_init(l, p1, p2) gen_sweep_init(l, gen_sweep_forward, p1, p2) |
#define | gen_sweep_backward_init(l, p1, p2) gen_sweep_init(l, gen_sweep_backward, p1, p2) |
Typedefs | |
typedef struct cons | cons |
The structure used to build lists in NewGen. More... | |
typedef list(* | gen_closure_func_t) (gen_chunk *, list) |
typedef struct __gen_sweep_state * | gen_sweep_state |
Enumerations | |
enum | gen_sweep_direction { gen_sweep_forward , gen_sweep_backward } |
sweep a list... More... | |
Functions | |
void | gen_copy (void *, void *) |
#define CONS(type,x,l) gen_cons((void*) (x), (l)) More... | |
bool | gen_eq (const void *, const void *) |
void * | gen_identity (const void *) |
Just return the argument. More... | |
void * | gen_chunk_identity (gen_chunk) |
void * | gen_find_tabulated (const char *, int) |
list | gen_filter_tabulated (bool(*)(gen_chunk *), int) |
returns the list of entities with this caracteristics. More... | |
void | gen_free_area (void **, int) |
free an area. More... | |
void | gen_mapc_tabulated (void(*)(gen_chunk *), int) |
apply fp to domain... More... | |
list | gen_append (list, const list) |
list | gen_concatenate (const list, const list) |
concatenate two lists. More... | |
list | gen_copy_seq (const list) |
Copy a list structure. More... | |
list | gen_nconc (list, list) |
physically concatenates CP1 and CP2 but do not duplicates the elements More... | |
list | gen_full_copy_list (const list) |
Copy a list structure with element copy. More... | |
list | gen_make_list (int,...) |
list | gen_nreverse (list) |
reverse a list in place More... | |
void * | gen_find (const void *, const list, gen_filter2_func_t, gen_extract_func_t) |
void * | gen_find_from_end (const void *, const list, gen_filter2_func_t, gen_extract_func_t) |
void * | gen_find_eq (const void *, const list) |
void * | gen_find_if (gen_filter_func_t, const list, gen_extract_func_t) |
void * | gen_find_if_from_end (gen_filter_func_t, list, gen_extract_func_t) |
the last match is returned More... | |
void | gen_free_list (list) |
free the spine of the list More... | |
void | gen_full_free_list (list) |
list | gen_last (const list) |
Return the last element of a list. More... | |
void * | gen_car (const list) |
size_t | gen_length (const list) |
size_t | list_own_allocated_memory (const list) |
gen_chunk | gen_nth (int, const list) |
to be used as ENTITY(gen_nth(3, l))... More... | |
list | gen_nthcdr (int, const list) |
caution: the first item is 0! was: return( (n<=0) ? l : gen_nthcdr( n-1, CDR( l ))) ; if n>gen_length(l), NIL is returned. More... | |
void | gen_map (gen_iter_func_t, const list) |
void | gen_mapl (gen_iter_func_t, const list) |
MAP. More... | |
void * | gen_reduce (void *, void *(*)(void *, const list), const list) |
void | gen_remove (list *, const void *) |
remove all occurences of item o from list *cpp, which is thus modified. More... | |
void | gen_remove_once (list *, const void *) |
Remove the first occurence of o in list pl: More... | |
list | gen_some (gen_filter_func_t, const list) |
bool | gen_replace_in_list (list, const void *, const void *) |
substitute all item s by t in list l More... | |
void | gen_exchange_in_list (list, const void *, const void *) |
exchange items i1 & i2 in the list More... | |
list | gen_insert_list (list, const void *, list, bool) |
insert nl before or after item in list l, both initial lists are consumed More... | |
void | gen_insert_after (const void *, const void *, list) |
list | gen_insert_before (const void *, const void *, list) |
list | gen_once (const void *, list) |
Prepend an item to a list only if it is not already in the list. More... | |
bool | gen_in_list_p (const void *, const list) |
tell whether vo belongs to lx More... | |
int | gen_occurences (const void *, const list) |
count occurences of vo in l More... | |
bool | gen_once_p (const list) |
FC: ARGH...O(n^2)! More... | |
bool | gen_equals (const list, const list, gen_eq_func_t) |
compares two lists using the functor given in parameters returns true if for all n, the n'th element of first list is equals to the n'th element of the second list More... | |
void | gen_sort_list (list, gen_cmp_func_t) |
Sorts a list of gen_chunks in place, to avoid allocations... More... | |
void | gen_list_patch (list, const void *, const void *) |
Replace all the reference to x in list l by a reference to y: More... | |
void | gen_closure (gen_closure_func_t, const list) |
list | gen_copy_string_list (const list) |
of string More... | |
void | gen_free_string_list (list) |
void | gen_fprint (FILE *, const string, const list, gen_string_func_t) |
list | gen_cons (const void *, const list) |
list | gen_bool_cons (bool, const list) |
typed cons for "basic" types More... | |
list | gen_int_cons (_int, const list) |
list | gen_string_cons (string, const list) |
list | gen_list_cons (const list, const list) |
list | gen_typed_cons (_int, const void *, const list) |
CONS a list with minimal type checking this cannot be done within the CONS macro because possible functions calls must not be replicated. More... | |
list | gen_CHUNK_cons (const gen_chunk *, const list) |
list | gen_VOID_STAR_cons (const void *, const list) |
void | gen_list_and (list *, const list) |
Compute A = A inter B: complexity in O(n2) More... | |
void | gen_list_and_not (list *, const list) |
Compute A = A inter non B: More... | |
int | gen_position (const void *, const list) |
Element ranks are strictly positive as for first, second, and so on. More... | |
bool | gen_list_cyclic_p (const list) |
list | gen_list_head (list *, int) |
list | gen_common_prefix (const list, const list) |
return the common list prefix of lists l1 and l2. More... | |
void | gen_substitute_chunk_by_list (list *pl, const void *o, list sl) |
substitute item o by list sl in list *pl, which is modified as a side effect. More... | |
gen_sweep_state | gen_sweep_init (list, gen_sweep_direction, list *, list *) |
initialize list l sweep in direction dir, with pointers for head & tail More... | |
bool | gen_sweep_update (gen_sweep_state) |
void | gen_sweep_done (gen_sweep_state) |
#define gen_sweep_backward_init | ( | l, | |
p1, | |||
p2 | |||
) | gen_sweep_init(l, gen_sweep_backward, p1, p2) |
Definition at line 372 of file newgen_list.h.
#define gen_sweep_forward_init | ( | l, | |
p1, | |||
p2 | |||
) | gen_sweep_init(l, gen_sweep_forward, p1, p2) |
Definition at line 371 of file newgen_list.h.
Definition at line 335 of file newgen_list.h.
typedef struct __gen_sweep_state* gen_sweep_state |
Definition at line 366 of file newgen_list.h.
enum gen_sweep_direction |
sweep a list...
Enumerator | |
---|---|
gen_sweep_forward | |
gen_sweep_backward |
Definition at line 365 of file newgen_list.h.
void gen_closure | ( | gen_closure_func_t | , |
const | list | ||
) |
returns the list of entities with this caracteristics.
Definition at line 144 of file tabulated.c.
References CHUNK, CONS, gen_chunk_undefined, get_tabulated_from_domain(), NIL, gen_chunk::p, _gtp::size, and _gtp::table.
Referenced by db_get_module_list_initial_order(), generate_starpu_pragma(), GenericCleanLocalEntities(), html_print_symbol_table(), RemoveLocalEntities(), and spire_distributed_unstructured_to_structured().
void* gen_find_tabulated | ( | const char * | key, |
int | domain | ||
) |
Definition at line 218 of file tabulated.c.
References gen_chunk_undefined, gen_get_tabulated_name_basic(), get_tabulated_from_domain(), HASH_UNDEFINED_VALUE, message_assert, gen_chunk::p, and _gtp::table.
Referenced by add_address_of_value(), add_non_declared_reference_to_declaration(), add_old_value(), add_sizeof_value(), add_symbolic_constant_to_declaration(), add_test(), alias_check(), binary_arithmetic_operator_to_post_pv(), build_new_ref(), clone_variable_with_new_name(), cmf_layout_align(), compile_mpi(), complex_bound_generation(), craft_layout_align(), create_local_index(), create_local_index2(), create_named_entity(), create_parameter_for_new_module(), create_parameter_variable_for_new_module(), create_private_integer_variable_for_new_module(), create_private_variable_for_new_module(), create_state_variable(), create_tile_basis(), creer_nom_var(), db_module_exists_p(), ecrit_une_var_neg(), entity_all_locations(), entity_empty_label(), entity_field_to_entity(), entity_from_user_name(), entity_intrinsic(), entity_nowhere_locations(), eov_add_entity_to_eliminate(), external_entity_to_old_value(), fetch_complexity_parameters(), find_entity(), find_label_entity(), find_operator(), find_or_create_coeff(), find_or_create_db_symbol(), find_or_create_emulated_shared_variable(), find_or_create_scalar_entity(), find_or_create_typed_entity(), FindEntity(), FindEntityFromLocalNameAndPrefix(), FindEntityFromLocalNameAndPrefixAndScope(), FindEntityFromUserName(), FindOrCreateEntityLikeModel(), gen_enter_tabulated(), gen_find_db_symbol(), gen_find_entity(), gen_find_opcodeClass(), generate_pseudo_formal_variable_for_formal_label(), generic_make_entity_copy_with_new_name(), get_time_ent(), get_variables_to_filter(), gfc2pips_check_entity_block_data_exists(), gfc2pips_check_entity_doesnt_exists(), gfc2pips_check_entity_exists(), gfc2pips_check_entity_module_exists(), gfc2pips_check_entity_program_exists(), gfc2pips_namespace(), global_name_to_entity(), global_new_value_to_global_old_value(), init_loop_ctrl(), init_new_df_ref(), init_new_do_loop(), local_name_to_top_level_entity(), local_name_to_variable(), loop_normalize_of_loop(), make_array_bounds(), make_array_entity(), make_bound(), make_constraint_expression(), make_derived_entity(), make_empty_module(), make_emulated_shared_variable(), make_func_op(), make_host_and_node_modules(), make_id_expression(), make_integer_constant_entity(), make_local_value_entity(), make_movements_loop_body_wp65(), make_op_exp(), make_rational_exp(), make_ref(), make_scalar_entity(), make_statement_copy_i(), make_tile_index_entity_n(), MakeAssignedOrComputedGotoInst(), MakeCurrentFunction(), MakeDiVar(), MakeDsiVar(), MakeLiVar(), MakeLoopCounter(), module_entity_to_compilation_unit_entity(), mpi_init_ctx(), my_build_new_ref(), name_to_variable(), NameToFunctionalEntity(), new_eng_loop(), new_param(), predicate_to_expression(), psystem_to_expression(), rational_op_exp(), recursive_rename_types(), replicate_declaration(), SafeFindOrCreateEntity(), sc_add_new_variable_name(), signed_integer_constant_expression_p(), simplify_minmax_contrainte(), step_function(), transformer_filter_subsumed_variables(), translate_global_value(), type_to_named_type(), undefined_pointer_value_entity(), unique_entity_name_p(), update_called_modules(), value_to_variable(), vect_gen_read(), and xml_TaskParameter().
void gen_full_free_list | ( | list | l | ) |
Definition at line 1023 of file genClib.c.
References CAR, cons::cdr, free_already_seen, gen_free(), hash_pointer, hash_table_free(), hash_table_make(), and newgen_free.
Referenced by __attribute__(), add_prettyprint_control_list_to_declaration_statement(), add_values_for_simple_effects_of_statement(), any_basic_update_operation_to_transformer(), apply_a_rule(), binary_arithmetic_operator_to_post_pv(), binary_intrinsic_call_to_points_to_sinks(), block_to_transformer_list(), c_convex_effects_on_actual_parameter_forward_translation(), c_convex_effects_on_formal_parameter_backward_translation(), c_text_entity(), call_flt(), cells_to_read_or_write_effects(), check_physical_resource_up_to_date(), check_proper_reductions(), clean_up_sequences_rewrite(), clean_up_transformer_list(), compute_recv_regions(), compute_send_regions(), condition_to_transformer(), conditional_operator_to_post_pv(), constant_reference_to_normalized_constant_reference(), convex_cell_reference_preceding_p(), dimensions_to_dma(), do_array_expansion(), do_atomize_call(), do_brace_expression_to_statements(), do_grouping_replace_reference_by_expression_walker(), do_linearize_array_init(), do_linearize_array_reference(), do_linearize_type(), do_loop_nest_unswitching(), do_outliner_smart_replacment(), do_resource_usage_check(), effects_to_dma(), eval_cell_with_points_to(), expr_level_of(), expression_effects_to_transformer(), expression_to_points_to(), expression_to_post_pv(), external_call_to_post_pv(), forloop_to_post_pv(), free_pv_results_paths(), free_to_post_pv(), freed_pointer_to_points_to(), generic_c_words_simplified_entity(), generic_effect_find_aliases_with_simple_pointer_values(), heap_intrinsic_to_post_pv(), hwac_replace_statement(), intrinsic_call_to_type(), invalidate_expressions_in_statement(), kill_pointer_values(), list_of_compatible_reductions(), live_in_paths_of_loop(), live_out_paths_from_loop_to_body(), logical_operator_to_post_pv(), loop_annotate(), loop_to_post_pv(), make_required(), module_initial_parameter_pv(), multiple_pointer_assignment_to_post_pv(), new_array_elements_backward_substitution_in_transformer(), opencl_generate_special_kernel_ops(), other_cool_enough_for_a_last_substitution(), outliner_smart_references_computation(), pointer_values_remove_var(), points_to_cell_to_upper_bound_points_to_cells(), print_qualifiers(), prune_singleton(), reductions_rewrite(), region_to_minimal_dimensions(), remove_interval_predecessors(), replace_field_by_reference_walker(), rmake(), safe_any_expression_to_transformer(), safe_expression_to_transformer(), safe_intrinsic_to_post_pv(), seq_flt(), simd_check_argType(), single_pointer_assignment_to_post_pv(), statement_clean_declarations_helper(), statement_insertion_fix_access(), statement_insertion_fix_access_in_callers(), statement_remove_extensions(), struct_variable_to_pointer_locations(), subscript_to_points_to_sinks(), subscripted_type_to_type(), successor_only_has_rr_conflict_p(), symbolic_tiling(), transformer_list_closure_to_precondition_depth_two(), transformer_list_closure_to_precondition_max_depth(), transformer_list_multiple_closure_to_precondition(), try_reorder_expressions(), two_addresses_code_generator(), undo_rename_reference(), unstructured_to_post_pv(), update_operator_to_post_pv(), update_preserved_resources(), whileloop_to_post_pv(), whileloop_to_postcondition(), and words_points_to_list().
apply fp to domain...
Definition at line 127 of file tabulated.c.
References gen_chunk_undefined, get_tabulated_from_domain(), gen_chunk::i, message_assert, gen_chunk::p, _gtp::size, and _gtp::table.
Referenced by gen_free_tabulated(), gen_read_and_check_tabulated(), gen_tabulated_consistent_p(), and gen_write_tabulated().
void* gen_reduce | ( | void * | , |
void * | *)(void *, const list, | ||
const | list | ||
) |
void gen_sweep_done | ( | gen_sweep_state | state | ) |
Definition at line 1166 of file list.c.
References free(), gen_sweep_update(), message_assert, __gen_sweep_state::phead, and __gen_sweep_state::ptail.
gen_sweep_state gen_sweep_init | ( | list | l, |
gen_sweep_direction | dir, | ||
list * | phead, | ||
list * | ptail | ||
) |
initialize list l sweep in direction dir, with pointers for head & tail
Definition at line 1060 of file list.c.
References abort, CDR, CONS, __gen_sweep_state::dir, __gen_sweep_state::done, fprintf(), gen_sweep_backward, gen_sweep_forward, __gen_sweep_state::head, if(), __gen_sweep_state::initial, __gen_sweep_state::last, LIST, malloc(), message_assert, NIL, __gen_sweep_state::phead, __gen_sweep_state::ptail, __gen_sweep_state::reversed, and __gen_sweep_state::tail.
bool gen_sweep_update | ( | gen_sweep_state | state | ) |
Definition at line 1108 of file list.c.
References abort, CAR, CDR, __gen_sweep_state::dir, __gen_sweep_state::done, fprintf(), free(), gen_sweep_backward, gen_sweep_forward, __gen_sweep_state::head, if(), __gen_sweep_state::last, LIST, NIL, __gen_sweep_state::phead, __gen_sweep_state::ptail, __gen_sweep_state::reversed, and __gen_sweep_state::tail.
Referenced by gen_sweep_done().