PIPS
|
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdint.h>
#include <setjmp.h>
#include "genC.h"
#include "newgen_include.h"
Go to the source code of this file.
Data Structures | |
struct | _gtp |
Macros | |
#define | TABULATED_ELEMENTS_SIZE (500) |
table of tabulated elements. More... | |
#define | TABULATED_ELEMENTS_INCR (10000) |
Functions | |
static gen_tabulated_p | get_tabulated_from_domain (int domain) |
gen_tabulated_p | gen_init_tabulated (int domain) |
static void | extends_tabulated (gen_tabulated_p gtp) |
gen_chunk * | gen_tabulated_fake_object_hack (int domain) |
WARNING: it is not reentrant... More... | |
void | gen_mapc_tabulated (void(*fp)(gen_chunk *), int domain) |
apply fp to domain... More... | |
list | gen_filter_tabulated (bool(*filter)(gen_chunk *), int domain) |
returns the list of entities with this caracteristics. More... | |
static int | gen_put_tabulated (int domain, gen_chunk *gc) |
add tabulated in table. More... | |
static void | gen_put_tabulated_name (int domain, char *id, _int number) |
static void | gen_delete_tabulated_name (gen_chunk *obj) |
deletes obj from the tabulated names... More... | |
static _int | gen_get_tabulated_name_basic (int domain, const char *id) |
void * | gen_find_tabulated (const char *key, int domain) |
static void | positive_number (gen_chunk *o) |
int | gen_read_and_check_tabulated (FILE *file, int create_p) |
void | gen_clear_tabulated_element (gen_chunk *obj) |
GEN_CLEAR_TABULATED_ELEMENT only clears the entry for object OBJ in the gen_tabulated_ and gen_tabulated_names tables. More... | |
gen_chunk * | gen_do_enter_tabulated (int domain, string id, gen_chunk *cp, bool is_a_ref) |
gen_chunk * | gen_enter_tabulated (int domain, string id, gen_chunk *cp, bool allow_ref) |
ENTER_TABULATED_DEF enters a new definition (previous refs are allowed if ALLOW_REF) in the INDEX tabulation table of the DOMAIN, with the unique ID and value CHUNKP. More... | |
#define TABULATED_ELEMENTS_INCR (10000) |
Definition at line 48 of file tabulated.c.
#define TABULATED_ELEMENTS_SIZE (500) |
table of tabulated elements.
I guess it could be stored directly in the gen_binding, and the index could be dropped.
Definition at line 47 of file tabulated.c.
|
static |
Definition at line 88 of file tabulated.c.
References gen_chunk_undefined, message_assert, gen_chunk::p, _gtp::size, _gtp::table, and TABULATED_ELEMENTS_INCR.
Referenced by gen_put_tabulated().
void gen_clear_tabulated_element | ( | gen_chunk * | obj | ) |
GEN_CLEAR_TABULATED_ELEMENT only clears the entry for object OBJ in the gen_tabulated_ and gen_tabulated_names tables.
Definition at line 251 of file tabulated.c.
References gen_chunk_undefined, gen_delete_tabulated_name(), get_tabulated_from_domain(), message_assert, gen_chunk::p, quick_domain_index, _gtp::table, and _gtp::used.
Referenced by clean_statement_label(), do_recompile_module(), free_obj_in(), RenameFunctionEntity(), and spire_distributed_unstructured_to_structured().
|
static |
deletes obj from the tabulated names...
Definition at line 198 of file tabulated.c.
References fatal(), get_tabulated_from_domain(), hash_delget(), HASH_UNDEFINED_VALUE, gen_chunk::i, and _gtp::names.
Referenced by gen_clear_tabulated_element().
stores - if ref
Definition at line 265 of file tabulated.c.
References cp, gen_put_tabulated(), gen_put_tabulated_name(), and message_assert.
Referenced by gen_enter_tabulated(), and make_ref().
ENTER_TABULATED_DEF enters a new definition (previous refs are allowed if ALLOW_REF) in the INDEX tabulation table of the DOMAIN, with the unique ID and value CHUNKP.
already in, redefine
Definition at line 279 of file tabulated.c.
References cp, fprintf(), free(), gen_chunk_undefined, gen_do_enter_tabulated(), gen_find_tabulated(), gen_size(), gen_chunk::i, message_assert, and same_string_p.
Referenced by gen_alloc(), and make_def().
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().
Definition at line 212 of file tabulated.c.
References get_tabulated_from_domain(), hash_get(), and _gtp::names.
Referenced by gen_find_tabulated().
gen_tabulated_p gen_init_tabulated | ( | int | domain | ) |
Definition at line 66 of file tabulated.c.
References alloc(), _gtp::domain, gen_chunk_undefined, hash_string, hash_table_make(), _gtp::names, _gtp::size, _gtp::table, TABULATED_ELEMENTS_SIZE, and _gtp::used.
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().
add tabulated in table.
returns its index.
should not get there
Definition at line 162 of file tabulated.c.
References extends_tabulated(), fatal(), gen_chunk_undefined, get_tabulated_from_domain(), message_assert, gen_chunk::p, _gtp::size, _gtp::table, and _gtp::used.
Referenced by gen_do_enter_tabulated().
Definition at line 188 of file tabulated.c.
References get_tabulated_from_domain(), hash_put(), message_assert, and _gtp::names.
Referenced by gen_do_enter_tabulated().
Definition at line 239 of file tabulated.c.
References gen_mapc_tabulated(), gen_read_tabulated(), and positive_number().
WARNING: it is not reentrant...
max_tabulated_elements()
Definition at line 107 of file tabulated.c.
References domain::ar, domain::dimensions, gen_binding::domain, Domains, domain::element, get_tabulated_from_domain(), gen_chunk::i, gen_chunk::p, and Tabulated_bp.
Referenced by gen_write_tabulated().
|
static |
Definition at line 59 of file tabulated.c.
References check_domain, Domains, IS_TABULATED, message_assert, and gen_binding::tabulated.
Referenced by gen_clear_tabulated_element(), gen_delete_tabulated_name(), gen_filter_tabulated(), gen_find_tabulated(), gen_get_tabulated_name_basic(), gen_mapc_tabulated(), gen_put_tabulated(), gen_put_tabulated_name(), and gen_tabulated_fake_object_hack().
|
static |
Definition at line 234 of file tabulated.c.
References message_assert.
Referenced by gen_read_and_check_tabulated().