PIPS
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "linear.h"
#include "genC.h"
#include "misc.h"
#include "ri.h"
#include "properties.h"
#include "ri-util.h"
Go to the source code of this file.
Data Structures | |
struct | deux_listes |
struct | get_referenced_entities_t |
Macros | |
#define | STATIC_ENTITY_CACHE_SIZE 128 |
#define | PREFIXES_SIZE 5 |
this function maps a local name, for instance P, to the corresponding TOP-LEVEL entity, whose name is TOP-LEVEL:P. More... | |
#define | declaration_formal_p(E) storage_formal_p(entity_storage(E)) |
#define | entity_to_offset(E) formal_offset(storage_formal(entity_storage(E))) |
Functions | |
void | set_std_static_entities () |
beware: cannot be called on creating the database More... | |
void | set_internal_static_entities () |
beware: cannot be called on creating the database More... | |
void | reset_internal_static_entities () |
void | reset_std_static_entities () |
void | reset_static_entities () |
void | register_static_entity (entity *e) |
add given entity to the set of entities that must reset upon workspace deletion practically, all static entities should be stored that way More... | |
void | print_entities (list l) |
void | print_entity_set (set s) |
entity | make_empty_module (const char *full_name, type r, language l) |
The source language is not specified. More... | |
entity | make_empty_program (const char *name, language l) |
entity | make_empty_subroutine (const char *name, language l) |
entity | make_empty_f95module (const char *name, language l) |
entity | make_empty_function (const char *name, type r, language l) |
entity | make_empty_blockdata (const char *name, language l) |
code | EntityCode (entity e) |
this function checks that e has an initial value code. More... | |
entity | make_label (const char *module_name, const char *local_name) |
void | reset_label_counter () |
char * | new_label_local_name (entity module) |
entity | make_new_label (entity module) |
This function returns a new label. More... | |
entity | make_loop_label (int __attribute__((unused)) desired_number, entity module) |
static bool | check_statement_for_label (statement s) |
bool | label_defined_in_statement_p (entity l, statement s) |
bool | label_defined_in_current_module_p (entity l) |
bool | label_string_defined_in_current_module_p (string ls) |
bool | label_string_defined_in_statement_p (string ls, statement s) |
string | safe_entity_name (entity e) |
predicates and functions for entities More... | |
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 that it was pertinent to remove the special care of constants there. More... | |
string | entity_global_name (entity e) |
Used instead of the macro to pass as formal argument. More... | |
const char * | entity_user_name (entity e) |
Since entity_local_name may contain PIPS special characters such as prefixes (label, common, struct, union, typedef, ...), this entity_user_name function is created to return the initial entity/variable name, as viewed by the user in his code. More... | |
string | empty_scope () |
Functions used to manage the block scoping in conjunction with ContextStack and yco ntext. More... | |
bool | empty_scope_p (string s) |
bool | string_struct_scope_p (string s) |
same kind of testing required for union as well More... | |
bool | string_block_scope_p (string s) |
string | entity_name_without_scope (entity e) |
allocates a new string More... | |
string | local_name_to_scope (const char *ln) |
allocates a new string More... | |
const char * | module_local_name (entity e) |
Returns the module local user name. More... | |
const char * | module_resource_name (entity e) |
Returns a pointer towards the resource name. More... | |
const char * | label_local_name (entity e) |
END_EOLE. More... | |
bool | label_name_conflict_with_labels (const char *n, list ll) |
const char * | entity_name_or_TCST (entity e) |
Return a name valid for sorting variables in vectors and constraint systems. More... | |
const char * | entity_and_common_name (entity e) |
See next function! More... | |
bool | entity_empty_label_p (entity e) |
bool | entity_return_label_p (entity e) |
bool | entity_label_p (entity e) |
bool | entity_module_p (entity e) |
bool | entity_f95use_p (entity e) |
bool | entity_main_module_p (entity e) |
bool | entity_f95module_p (entity e) |
bool | entity_blockdata_p (entity e) |
bool | entity_common_p (entity e) |
bool | entity_function_p (entity e) |
bool | entity_subroutine_p (entity e) |
bool | entity_pointer_p (entity e) |
bool | entity_array_p (entity e) |
Is e a variable with an array type? More... | |
bool | entity_register_p (entity e) |
void | set_register_qualifier (entity v) |
Assuming that v is of type variable, add a qualifier register. More... | |
bool | array_entity_p (entity e) |
bool | entity_variable_length_array_p (entity e) |
bool | assumed_size_array_p (entity e) |
bool | pointer_type_array_p (entity e) |
bool | unnormalized_array_p (entity e) |
bool | entity_field_p (entity e) |
e is the field of a structure More... | |
static entity | entity_field_to_entity (entity f, char prefix) |
f is a field of a structure: what is its structure? More... | |
entity | entity_field_to_entity_struct (entity f) |
entity | entity_field_to_entity_union (entity f) |
entity | entity_field_to_entity_struct_or_union (entity f) |
int | entity_field_rank (entity f) |
f is a field of a structure or of an union: what is its rank? More... | |
bool | entity_enum_p (entity e) |
bool | entity_enum_member_p (entity e) |
bool | entity_enum_variable_p (entity e) |
bool | entity_struct_p (entity e) |
Is entity e the entity corresponding to a struct declaration? More... | |
bool | same_struct_entity_p (const entity e0, const entity e1) |
bool | same_field_entity_p (const entity f1, const entity f2) |
bool | entity_union_p (entity e) |
Is entity e an entity representing the union declaration? More... | |
bool | derived_entity_p (entity e) |
bool | local_entity_of_module_p (entity e, entity module) |
This test shows that "e" has been declared in "module". More... | |
bool | entity_in_common_p (entity e) |
const char * | entity_module_name (entity e) |
See comments about module_name(). More... | |
code | entity_code (entity e) |
entity | entity_empty_label (void) |
bool | top_level_entity_p (entity e) |
Check if the scope of entity e is global. More... | |
bool | io_entity_p (entity e) |
Several implicit entities are declared to define the implicit effects of IO statements. More... | |
bool | io_luns_entity_p (entity e) |
bool | rand_effects_entity_p (entity e) |
bool | malloc_effect_entity_p (entity e) |
bool | memmove_effect_entity_p (entity e) |
bool | time_effect_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_NAME entity. More... | |
entity | get_stdin_entity () |
bool | stdin_entity_p (entity e) |
entity | get_stdout_entity () |
bool | stdout_entity_p (entity e) |
entity | get_stderr_entity () |
bool | stderr_entity_p (entity e) |
bool | std_file_entity_p (entity e) |
entity | std_file_entity_to_pointed_file_entity (entity e) |
Dummy standard files targets. More... | |
bool | intrinsic_entity_p (entity e) |
bool | symbolic_entity_p (entity e) |
bool | intrinsic_name_p (const char *local_name) |
entity | entity_intrinsic (const char *name) |
FI: I do not understand this function name (see next one!). More... | |
entity | CreateIntrinsic (string name) |
this function does not create an intrinsic function because they must all be created beforehand by the bootstrap phase (see bootstrap/bootstrap.c). More... | |
bool | same_entity_p (entity e1, entity e2) |
predicates on entities More... | |
int | compare_entities (const entity *pe1, const entity *pe2) |
Comparison function for qsort. More... | |
void | sort_list_of_entities (list l) |
sorted in place. More... | |
bool | lexicographic_order_p (entity var1, entity var2) |
true if var1 <= var2 More... | |
basic | entity_basic (entity e) |
return the basic associated to entity e if it's a function/variable/constant basic_undefined otherwise More... | |
list | entity_qualifiers (entity e) |
return the qualifiers associated to entity e if it's a variable NIL otherwise More... | |
bool | entity_basic_p (entity e, enum basic_utype basictag) |
return true if the basic associated with entity e matchs the passed tag More... | |
bool | entity_list_p (list el) |
Checks that el only contains entity. More... | |
entity | local_name_to_top_level_entity (const char *n) |
This function try to find a top-level entity from a local name. More... | |
entity | module_name_to_entity (const char *mn) |
This is an alias for local_name_to_top_level_entity. More... | |
entity | module_name_to_runtime_entity (const char *name) |
similar to module_name_to_entity but generates a warning and a stub if the entity is not found More... | |
entity | FindEntity (const char *package, const char *name) |
Retrieve an entity from its package/module name and its local name. More... | |
entity | global_name_to_entity (const char *name) |
Find an entity, if it exists, from its global name, a.k.a. More... | |
entity | FindEntityFromUserName (const char *package, const char *name) |
entity | CreateEntity (const char *package_name, const char *local_name) |
BEGIN_EOLE. More... | |
entity | FindOrCreateEntity (const char *package, const char *local_name) |
Problem: A functional global entity may be referenced without parenthesis or CALL keyword in a function or subroutine call. More... | |
entity | FindOrCreateTopLevelEntity (const char *name) |
Return a top-level entity. More... | |
expression | entity_ith_bounds (entity e, int i) |
FIND_MODULE returns entity. More... | |
bool | io_intrinsic_p (entity e) |
rue is a statement s is an io intrinsic More... | |
bool | arithmetic_intrinsic_p (entity e) |
true if e is an arithmetic instrinsic More... | |
entity | get_continue_entity () |
true if continue. More... | |
bool | entity_continue_p (entity f) |
list | common_members_of_module (entity common, entity module, bool only_primary) |
returns the list of entity to appear in the common declaration. More... | |
entity | make_new_common (string name, entity mod) |
This function creates a common for a given name in a given module. More... | |
entity | make_new_integer_scalar_common_variable (string name, entity mod, entity com) |
This function creates a common variable in a given common in a given module. More... | |
entity | find_ith_formal_parameter (entity the_fnct, int rank) |
This function gives back the ith formal parameter, which is found in the declarations of a call or a subroutine. More... | |
list | string_to_entity_list (string module, string names) |
of entity More... | |
bool | typedef_entity_p (entity e) |
bool | member_entity_p (entity e) |
bool | entity_formal_p (entity p) |
is p a formal parameter? More... | |
bool | dummy_parameter_entity_p (entity p) |
is p a dummy parameter? More... | |
entity | MakeCompilationUnitEntity (const char *name) |
This is useful for the C language only. More... | |
bool | extern_entity_p (entity module, entity e) |
bool | explicit_extern_entity_p (entity module, entity e) |
string | storage_to_string (storage s) |
entity | entity_to_module_entity (entity e) |
Find the enclosing module of an entity. More... | |
void | update_dummy_parameter (parameter p, entity ep) |
bool | parameter_passing_mode_p (entity f, int tag) |
Returns true when f has no parameters. More... | |
bool | parameter_passing_by_value_p (entity f) |
bool | parameter_passing_by_reference_p (entity f) |
char * | AddPackageToName (string p, string n) |
This function concatenate a package name and a local name to produce a global entity name. More... | |
entity | update_operator_to_regular_operator (entity op) |
Returns the binary operator associated to a C update operator such as +=. More... | |
bool | entity_equivalence_p (entity e) |
checks if an entity is an equivalent More... | |
bool | same_entity_name_p (entity e1, entity e2) |
compare entity names More... | |
bool | entity_in_list_p (entity ent, list ent_l) |
look for ent in ent_l More... | |
list | concat_new_entities (list l1, list l2) |
returns l1 after elements of l2 but not of l1 have been appended to l1. More... | |
bool | entity_used_in_declarations_p (entity e, list ldecl) |
check if e is used to declare one of the entities in entity list ldecl More... | |
bool | type_used_in_type_declarations_p (entity e, list ldecl) |
check if e is used to declare one of the entities in entity list ldecl More... | |
static entity | generic_make_entity_copy_with_new_name (entity e, string global_new_name, bool systematically_add_suffix, bool move_initialization_p) |
Create a copy of an entity, with (almost) identical type, storage and initial value if move_initialization_p is false, but with a slightly different name as entities are uniquely known by their names, and a different offset if the storage is ram (still to be done). More... | |
entity | make_entity_copy (entity e) |
Create a copy of an entity, with (almost) identical type, storage and initial value if move_initialization_p is false, but with a slightly different name as entities are uniquely known by their names, and a different offset if the storage is ram (still to be done). More... | |
entity | make_entity_copy_with_new_name (entity e, string global_new_name, bool move_initialization_p) |
Create a copy of an entity, with (almost) identical type, storage and initial value if move_initialization_p is false, but with a slightly different name as entities are uniquely known by their names, and a different offset if the storage is ram (still to be done). More... | |
entity | make_entity_copy_with_new_name_and_suffix (entity e, string global_new_name, bool move_initialization_p) |
Create a copy of an entity, with (almost) identical type, storage and initial value if move_initialization_p is false, but with a slightly different name as entities are uniquely known by their names, and a different offset if the storage is ram (still to be done). More... | |
void | add_thread_safe_variable (entity v) |
bool | thread_safe_variable_p (entity v) |
void | add_abstract_state_variable (entity v) |
bool | abstract_state_variable_p (entity v) |
bool | entities_p (list el) |
Make sure that an list is an homogeneous list of entities. More... | |
entity | operator_neutral_element (entity op) |
bool | commutative_call_p (call c) |
Test if we are allowed to commute operations. More... | |
list | entities_to_expressions (list l_ent) |
build a list of expressions from a list of entities More... | |
entity | find_enum_of_member (entity m) |
bool | c_module_p (entity m) |
Test if a module "m" is written in C. More... | |
bool | fortran_module_p (entity m) |
Test if a module is in Fortran. More... | |
static void | make_uniq_reference_list (reference r, deux_listes *l) |
list | extract_references_from_declarations (list decls) |
FI: this function has not yet been extended for C types!!! More... | |
Pbase | entity_list_to_base (list l) |
declarations updater | |
static void | do_get_referenced_entities_on_entity (entity e, get_referenced_entities_t *p) |
static void | do_get_referenced_entities_on_reference (reference r, get_referenced_entities_t *p) |
helper looking in a reference r for referenced entities More... | |
static void | do_get_referenced_entities_on_call (call c, get_referenced_entities_t *p) |
helper looking in a call for referenced entities More... | |
static void | do_get_referenced_entities_on_loop (loop l, get_referenced_entities_t *p) |
helper looking in a loop for referenced entities More... | |
static void | do_get_referenced_entities_on_list (list l, get_referenced_entities_t *p) |
helper looking in a list for referenced entities More... | |
static void | do_get_referenced_entities_on_ram (ram r, get_referenced_entities_t *p) |
helper looking in a ram for referenced entities More... | |
static void | do_get_referenced_entities_on_area (area a, get_referenced_entities_t *p) |
helper looking in an area for referenced entities More... | |
static void | do_get_referenced_entities_on_statement (statement s, get_referenced_entities_t *p) |
helper looking in a statement declaration for referenced entities More... | |
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 only enter consider entities directly involved in object matching chunk_filter \/!\ if you strip out statements, it will not consider declared entities, but it will consider their initial value. More... | |
bool | entity_not_constant_or_intrinsic_p (entity e) |
Default entity filter for get_referenced_entities() More... | |
set | get_referenced_entities (void *elem) |
retrieves the set of entities used in elem beware that this entities may be formal parameters, functions etc so consider filter this set depending on your need, using get_referenced_entities_filtered More... | |
bool | do_get_declared_entities (statement s, set declared_entities) |
Helper for get_declared_entities() Add all locally declared entity to the set given in argument. More... | |
set | get_declared_entities (void *elem) |
retrieves the set of entities declared in elem More... | |
bool | entity_local_variable_p (entity var, entity module) |
Check if a variable "var" is local to a module "module". More... | |
entity | FindOrCreateEntityLikeModel (const char *package, const char *name, entity model) |
hmmm... More... | |
entity | AddEntityToModule (entity e, entity module) |
!!! caution, it may not be a module, but a common... More... | |
void | fprint_entity_list (FILE *fp, list l) |
void fprint_entity_list(FILE *fp,list l): prints a list of entities on file fp. More... | |
bool | entity_in_formal_area_p (entity e) |
Formal parameters do not use the standard ram storage. More... | |
#define declaration_formal_p | ( | E | ) | storage_formal_p(entity_storage(E)) |
#define entity_to_offset | ( | E | ) | formal_offset(storage_formal(entity_storage(E))) |
#define PREFIXES_SIZE 5 |
Definition at line 2572 of file entity.c.
References abstract_state_entities, and gen_in_list_p().
Referenced by analyzable_scalar_entity_p().
void add_abstract_state_variable | ( | entity | v | ) |
This might happen when a workspace is closed and another one open or created within one session.
The package name of v could be checked... especially if package names are unified.
Definition at line 2558 of file entity.c.
References abstract_state_entities, CONS, ENTITY, gen_in_list_p(), gen_nconc(), and NIL.
Referenced by CreateHeapAbstractState(), CreateLogicalUnits(), CreateMemmoveAbstractState(), CreateRandomSeed(), and CreateTimeSeed().
void add_thread_safe_variable | ( | entity | v | ) |
This might happen when a workspace is closed and another one open or created within one session.
The package name of v could be checked... especially if package names are unified.
Definition at line 2525 of file entity.c.
References CONS, ENTITY, gen_in_list_p(), gen_nconc(), NIL, and thread_safe_entities.
Referenced by CreateHeapAbstractState(), and CreateMemmoveAbstractState().
!!! caution, it may not be a module, but a common...
module | odule |
Definition at line 3171 of file entity.c.
References AddEntityToDeclarations(), entity_local_name(), entity_module_p(), entity_name, FindOrCreateEntityLikeModel(), module, module_local_name(), and pips_debug.
Referenced by add_declaration_to_host_and_link(), AddCommonToModule(), AddEntityToHostAndNodeModules(), dimensions_to_dma(), and NormalizeCommonVariables().
This function concatenate a package name and a local name to produce a global entity name.
Previous comment: This function creates a fortran operator parameter, i.e. a zero dimension variable with an overloaded basic type.
Moved from bootstrap.c
Definition at line 2134 of file entity.c.
References gen_strndup(), and MODULE_SEP.
Referenced by CreateAbstractStateVariable(), CreateAreas(), CreateLogicalUnits(), and MakeIntrinsic().
true if e is an arithmetic instrinsic
Used to determine if a logical argument must be promoted to integer
FI: the arithmetic operator set is not fully defined. To be completed.
Definition at line 1702 of file entity.c.
References arithmetic_functions_set, DIVIDE_OPERATOR_NAME, entity_intrinsic(), MINUS_C_OPERATOR_NAME, MINUS_OPERATOR_NAME, MULTIPLY_OPERATOR_NAME, PLUS_C_OPERATOR_NAME, PLUS_OPERATOR_NAME, set_add_elements(), set_belong_p(), set_make(), set_pointer, set_undefined_p, UNARY_MINUS_OPERATOR_NAME, and UNARY_PLUS_OPERATOR_NAME.
Referenced by basic_of_intrinsic().
Definition at line 793 of file entity.c.
References entity_array_p().
Referenced by alias_check(), array_argument_p(), derived_formal_parameter_to_stub_points_to(), do_array_expansion(), dynamic_alias_check_flt(), formal_variable_add_aliases(), gen_may_constant_paths(), gen_must_constant_paths(), impact_check(), ram_variable_add_aliases(), region_range_nul_p(), same_or_equivalence_argument_add_aliases(), struct_variable_to_pointer_locations(), struct_variable_to_pointer_subscripts(), translate_to_module_frame(), typedef_formal_parameter_to_stub_points_to(), xml_Chain_Graph(), xml_Compute_and_Need(), xml_Pattern_Paving(), xml_references(), xml_Region_Parameter(), xml_Region_Range(), and xml_TaskParameter().
return true if e has an assumed-size array declarator (the upper bound of the last dimension is equal to * : REAL A(*) )
Definition at line 807 of file entity.c.
References entity_type, entity_variable_p, find_ith_dimension(), gen_length(), NIL, type_variable, unbounded_dimension_p(), and variable_dimensions.
Referenced by array_size_stride(), interprocedural_abc_call(), and unnormalized_array_p().
Test if a module "m" is written in C.
value_code_p(m) is not checked: is this code robust? Why not an if/else if/ else and a unique return statement?
All intrinsics, including Fortran intrinsics, are considered written in C.
Temporary fix for the too many make_unknown_language()...
Definition at line 2777 of file entity.c.
References code_language, entity_initial, language_c_p, language_unknown_p, pips_internal_error, value_code, value_intrinsic_p, and value_undefined_p.
Referenced by AddEntityToCompilationUnit(), AddEntityToCurrentModule(), AddEntityToCurrentModuleWithoutDeclaration(), begin_omp_construct(), call_to_postcondition(), compilation_unit_of_module(), compile_mpi(), compute_region(), controlizer(), convex_regions_forward_translation(), distributer(), ensure_comment_consistency(), entities_maymust_conflict_p(), entity_from_user_name(), entity_module_unambiguous_user_name(), entity_more_or_less_minimal_name(), generic_make_entity_copy_with_new_name(), generic_module_name_to_transformers(), GenericAddLocalEntityToDeclarations(), gpu_ify_statement(), inline_expression_call(), internal_print_icfg(), linearize_array_generic(), live_in_paths_of_statement(), make_exec_statement_from_name(), make_return_statement(), make_scalar_entity(), module_name_to_input_file_name(), module_to_all_declarations(), module_to_value_mappings(), new_controlizer(), new_label_local_name(), outliner(), outliner_file(), outliner_independent(), outliner_independent_recursively(), parameter_passing_mode_p(), phi_free_contraints_to_expressions(), print_code_semantics(), references_may_conflict_p(), RemoveEntityFromCompilationUnit(), rice(), SafeMakeConstant(), statement_remove_useless_label(), update_referenced_entities(), user_call_to_transformer(), user_function_call_to_transformer(), variable_entities_may_conflict_p(), and variable_to_dimensions().
Definition at line 380 of file entity.c.
References label_defined_in_statement, label_searched_in_statement, and statement_label.
Referenced by label_defined_in_statement_p().
returns the list of entity to appear in the common declaration.
of entity
drop equivalenced that come hereafter...
common | ommon |
module | odule |
only_primary | not the equivalenced... |
Definition at line 1741 of file entity.c.
References area_layout, CAR, CDR, CONS, ENDP, ENTITY, entity_area_p(), entity_name, entity_storage, entity_type, entity_undefined, gen_nreverse(), heap_area_p(), module, NIL, offset, pips_assert, pips_internal_error, ram_function, ram_offset, ram_section, SizeOfArray(), stack_area_p(), storage_ram, storage_ram_p, and type_area.
Referenced by check_common_inclusion(), insert_common_declaration(), MakeEntryCommon(), print_common_layout(), sentence_area(), and text_common_declaration().
Test if we are allowed to commute operations.
[in] | c | is the operation call |
Note that floating point operations are commutative, but since they are not associative due to rounding error , in a chain of operations, we cannot commute them. Of course, we should test whether an operation is alone or not to see if we are in this case...
Definition at line 2661 of file entity.c.
References basic_of_call(), basic_tag, call_function, ENTITY_AND_P, ENTITY_MULTIPLY_P, ENTITY_OR_P, ENTITY_PLUS_C_P, ENTITY_PLUS_P, free_basic(), get_bool_property(), is_basic_complex, is_basic_float, is_basic_int, is_basic_logical, is_basic_overloaded, is_basic_pointer, and pips_internal_error.
Referenced by _expression_similar_p(), do_simdizer_init(), and reorder_pointer_expression().
Comparison function for qsort.
FI: Which sorting do you want?
pe1 | e1 |
pe2 | e2 |
Definition at line 1328 of file entity.c.
References entity_name.
Referenced by compare_Pvecteur(), compile_reduction(), copy_from_statement(), copy_to_statement(), dagvtx_cmp_entity(), do_group_constants_terapix(), do_simdizer_init(), fprint_any_environment(), get_symbol_table(), inline_expression_call(), print_entity_task_buffers(), print_sesam_tasks_buffers_header(), promote_local_entities(), real_freia_scalar_rw_dep(), sort_entities_with_dep(), sort_list_of_entities(), statements_localize_declarations(), transfert_block(), transfert_loop(), transfert_statement(), and update_referenced_entities().
returns l1 after elements of l2 but not of l1 have been appended to l1.
l2 is freed append all elements of l2 not in l1 to l1 and free l2
l1 | list to append entities to |
l2 | list from which the new entities come |
l1 | 1 |
l2 | 2 |
Definition at line 2236 of file entity.c.
References CONS, ENTITY, FOREACH, gen_free_list(), gen_nconc(), gen_nreverse(), NIL, set_assign_list(), set_belong_p(), set_free(), set_make(), and set_pointer.
entity CreateEntity | ( | const char * | package_name, |
const char * | local_name | ||
) |
BEGIN_EOLE.
package_name | ackage_name |
local_name | ocal_name |
Definition at line 1572 of file entity.c.
References asprintf, local_name(), make_entity, MODULE_SEP_STRING, storage_undefined, type_undefined, and value_undefined.
Referenced by entity_all_module_locations(), and FindOrCreateEntity().
this function does not create an intrinsic function because they must all be created beforehand by the bootstrap phase (see bootstrap/bootstrap.c).
name | ame |
Definition at line 1311 of file entity.c.
References entity_undefined, FindOrCreateEntity(), intrinsic_entity_p(), pips_assert, and TOP_LEVEL_MODULE_NAME.
Referenced by add_loop_parallel_threshold(), bound_to_statement(), c_dim_string(), cast_constant(), convert_constant_from_double_to_dcomplex(), convert_constant_from_real_to_complex(), DeclarePointer(), dereference_expression(), dims_array_init(), do_brace_expression_to_statements(), FixCReturnStatements(), get_allocatable_data_expr(), get_cast_function_for_basic(), gfc2pips_array_ref2indices(), gfc2pips_buildCaseTest(), gfc2pips_code2instruction_(), gfc2pips_dumpSELECT(), gfc2pips_expr2expression(), gfc2pips_get_list_of_dimensions2(), gfc2pips_int2expression(), gfc2pips_real2expression(), gfc2pips_reduce_repeated_values(), gfc2pips_symbol2data_instruction(), make_address_of_expression(), make_assign_expression(), make_send_receive_conversion(), make_simple_Fortran_io_instruction(), make_unbounded_expression(), MakeArithmIfInst(), MakeAtom(), MakeBraceExpression(), MakeCommaExpression(), MakeDimension(), MakeImpliedDo(), MakeIoInstA(), MakeIoInstB(), MakeSimpleIoInst1(), MakeZeroOrOneArgCallInst(), merge_conditions(), omp_operator_entity(), pragma_build_if_condition(), pragma_if_as_expr(), pragma_omp_parallel_as_exprs(), pragma_omp_parallel_for_as_exprs(), pragma_private_as_expr_with_args(), recover_structured_while(), reduction_as_expr(), signed_constant_expression_p(), simplify_complex_expression(), split_complex_expression(), statement_has_omp_parallel_directive_p(), step_local_regionArray(), switch_generic_to_specific(), switch_specific_cmplx(), switch_specific_dcmplx(), words_dimension(), and words_substring_op().
Definition at line 1048 of file entity.c.
References entity_enum_p(), entity_struct_p(), and entity_union_p().
Referenced by add_prettyprint_control_list_to_declaration_statement(), c_text_related_entities(), filtered_declaration_list(), get_symbol_table(), and UpdateEntities().
Helper for get_declared_entities() Add all locally declared entity to the set given in argument.
declared_entities | eclared_entities |
Definition at line 3074 of file entity.c.
References FOREACH, set_add_element(), and statement_declarations.
Referenced by get_declared_entities().
|
static |
helper looking in an area for referenced entities
Definition at line 2948 of file entity.c.
References area_layout, get_referenced_entities_t::chunk_filter, and do_get_referenced_entities_on_list().
Referenced by get_referenced_entities_filtered().
|
static |
helper looking in a call for referenced entities
Definition at line 2906 of file entity.c.
References call_function, get_referenced_entities_t::chunk_filter, and do_get_referenced_entities_on_entity().
Referenced by get_referenced_entities_filtered().
|
static |
Definition at line 2886 of file entity.c.
References get_referenced_entities_t::entities, get_referenced_entities_t::entity_filter, and set_add_element().
Referenced by do_get_referenced_entities_on_call(), do_get_referenced_entities_on_list(), do_get_referenced_entities_on_loop(), and do_get_referenced_entities_on_reference().
|
static |
helper looking in a list for referenced entities
Definition at line 2930 of file entity.c.
References do_get_referenced_entities_on_entity(), ENTITY, and FOREACH.
Referenced by do_get_referenced_entities_on_area(), do_get_referenced_entities_on_ram(), and do_get_referenced_entities_on_statement().
|
static |
helper looking in a loop for referenced entities
Definition at line 2917 of file entity.c.
References get_referenced_entities_t::chunk_filter, do_get_referenced_entities_on_entity(), and loop_index.
Referenced by get_referenced_entities_filtered().
|
static |
helper looking in a ram for referenced entities
Definition at line 2939 of file entity.c.
References get_referenced_entities_t::chunk_filter, do_get_referenced_entities_on_list(), and ram_shared.
Referenced by get_referenced_entities_filtered().
|
static |
helper looking in a reference r
for referenced entities
Definition at line 2895 of file entity.c.
References get_referenced_entities_t::chunk_filter, do_get_referenced_entities_on_entity(), and reference_variable.
Referenced by get_referenced_entities_filtered().
|
static |
helper looking in a statement declaration for referenced entities
you skip the declarations, but not the value / type inside
Definition at line 2956 of file entity.c.
References get_referenced_entities_t::chunk_filter, do_get_referenced_entities_on_list(), get_referenced_entities_t::entities, ENTITY, get_referenced_entities_t::entity_filter, entity_initial, entity_type, FOREACH, get_referenced_entities_filtered(), set_free(), set_union(), and statement_declarations.
Referenced by get_referenced_entities_filtered().
is p a dummy parameter?
Definition at line 1941 of file entity.c.
References DUMMY_PARAMETER_PREFIX, entity_name, and pips_debug.
Referenced by add_implicit_interprocedural_write_effects(), module_formal_parameters(), RemoveDummyArguments(), SubstituteDummyParameters(), UpdateEntity(), UpdateEntity2(), UseFormalArguments(), and variable_to_abstract_location().
checks if an entity is an IO_EFFECTS_PACKAGE_NAME, a MALLOC_EFFECTS_NAME or a RAND_EFFECTS_PACKAGE_NAME entity.
These entities are used to model some internal effects of standard libraries and they do not conflict with other entities.
Definition at line 1181 of file entity.c.
References EFFECTS_PACKAGE, entity_kind, io_entity_p(), malloc_effect_entity_p(), memmove_effect_entity_p(), pips_assert, rand_effects_entity_p(), and time_effect_entity_p().
Referenced by analyzed_reference_p(), copy_n_statement(), copy_write_statement(), copy_write_statement_with_cumulated_regions(), create_values_for_simple_effect(), cumul_and_update_effects_of_statement(), entities_maymust_conflict_p(), generic_apply_effects_to_transformer(), module_to_value_mappings(), references_may_conflict_p(), xml_Chain_Graph(), xml_Compute_and_Need(), xml_GlobalVariables(), xml_TaskParameters(), and xml_Type_Entity().
string empty_scope | ( | void | ) |
Functions used to manage the block scoping in conjunction with ContextStack and yco ntext.
Definition at line 498 of file entity.c.
References strdup().
Referenced by CreateDefaultContext(), FindOrCreateCurrentEntity(), and local_name_to_scope().
Definition at line 500 of file entity.c.
Referenced by UpdateEntity().
Make sure that an list is an homogeneous list of entities.
el | l |
Definition at line 2580 of file entity.c.
References check_entity(), ENTITY, and FOREACH.
build a list of expressions from a list of entities
l_ent,the | list of entities |
FI: should have been placed in expression.c
FI: no check on arguments, robustness is doubtful; see entity_to_expression()
FI: somebody complaining about the PIPS code structuration in files and libraries might have added to the confusion?
l_ent | _ent |
Definition at line 2703 of file entity.c.
References CONS, ENTITY, entity_to_expression(), EXPRESSION, FOREACH, gen_nreverse(), and NIL.
Referenced by generate_copy_loop_nest(), lhs_subs_in_ins(), my_lhs_subs_in_ins(), and pragma_private_as_expr().
const char* entity_and_common_name | ( | entity | e | ) |
See next function!
Definition at line 654 of file entity.c.
References COMMON_PREFIX, concatenate(), entity_local_name(), entity_name, entity_storage, entity_undefined_p, get_current_module_entity(), MODULE_SEP_STRING, NIL, pips_assert, ram_section, and storage_ram.
Referenced by compare_effect_reference_in_common(), and effect_words_reference().
Is e a variable with an array type?
Definition at line 754 of file entity.c.
References array_type_p(), entity_type, entity_variable_p, and ultimate_type().
Referenced by add_pragma_to_sequence(), array_entity_p(), copy_from_call(), copy_from_test(), copy_to_call(), copy_to_test(), declarations_to_dimensions(), do_clone_entity(), do_gpu_qualify_pointers(), do_solve_hardware_constraints_on_nb_proc(), do_solve_hardware_constraints_on_volume(), do_terapix_warmup(), flow_sensitive_malloc_to_points_to_sinks(), get_variables_to_remove(), glc_ref(), initialization_list_to_statements(), offset_points_to_cell(), original_malloc_to_abstract_location(), promote_local_entities(), scalopify(), set_glopriv_qualifier(), split_initializations_in_statement(), step_translate_and_map(), variable_to_pointer_locations(), and wrap_argument().
return the basic associated to entity e if it's a function/variable/constant basic_undefined otherwise
Definition at line 1380 of file entity.c.
References basic_undefined, entity_type, entity_undefined, functional_result, type_functional, type_functional_p, type_variable, type_variable_p, and variable_basic.
Referenced by add_declaration_to_declaration_statement_p(), c_user_function_call_to_transformer(), call_to_complexity(), check_this_loop(), compile_one_reduction(), constant_entity_to_float(), constant_to_transformer(), convert_constant(), create_new_ent_list(), do_clone_entity(), do_group_basics_maximum(), do_group_basics_maximum_reduce(), do_outliner_smart_replacment(), do_scalar_renaming_in_vertex(), do_split_structure(), do_terapix_argument_handler(), entity_basic_p(), expression_basic(), find_or_create_newInd(), fsr_reference_flt(), generate_code_loop(), generate_parallel_body(), generate_read_of_ref_for_all(), generate_read_of_ref_for_computer(), generate_update_distributed_value_from_host(), hpfc_buffer_entity(), inline_expression_call(), is_string_constant(), make_special_value(), make_test_condition(), outliner_smart_references_computation(), promote_local_entities(), pvm_what_option_expression(), reduction_parameters(), sac_commenter(), sentence_basic_declaration(), simplification_conversion(), simplify_complex_entity(), st_generate_packing(), statements_localize_declarations(), switch_basic_type_to_overloaded(), this_entity_cdeclaration(), type_this_entity_if_needed(), type_this_expression(), verify_array_element(), verify_array_variable(), and verify_scalar_variable().
bool entity_basic_p | ( | entity | e, |
enum basic_utype | basictag | ||
) |
return true if the basic associated with entity e matchs the passed tag
basictag | asictag |
Definition at line 1405 of file entity.c.
References basic_tag, and entity_basic().
Referenced by find_or_create_scalar_entity(), and find_or_create_typed_entity().
Definition at line 712 of file entity.c.
References BLOCKDATA_PREFIX, entity_local_name(), and entity_module_p().
Referenced by AddVariableToCommon(), AnalyzeData(), entity_subroutine_p(), fix_storage(), initialize_and_verify_common_variable(), MakeExternalFunction(), sentence_head(), and sentence_tail().
Definition at line 1098 of file entity.c.
References entity_initial, pips_assert, value_code, and value_code_p.
Referenced by alias_check(), alias_propagation(), common_is_visible_p(), compile_module(), create_new_entity(), discard_module_declaration_text(), ensure_comment_consistency(), entity_from_user_name(), entity_to_formal_integer_parameters(), formal_array_resizing_bottom_up(), get_declaration_comments(), get_header_comments(), gfc2pips_code2instruction__TOP(), impact_check(), init_dynamic_check_list(), initialize_dynamic_check_list(), inline_expression_call(), insert_one_type_declaration(), interprocedural_abc_call(), MakeDataStatement(), module_formal_parameters(), module_to_callees(), module_to_formal_analyzable_parameters(), movement_computation(), my_build_new_ref(), NormalizeCommonVariables(), old_array_bound_check_instrumentation(), outliner_independent_recursively(), print_parallelizedCMF_code(), print_parallelizedCRAFT_code(), ProcessEntries(), SafeFindOrCreateEntity(), sc_entity_to_formal_integer_parameters(), simplify_complex_declaration(), text_declaration(), and translate_to_module_frame().
??????
Definition at line 718 of file entity.c.
References COMMON_PREFIX, entity_local_name(), and entity_module_p().
Referenced by make_common_entity().
Definition at line 1731 of file entity.c.
References f(), get_continue_entity(), and same_entity_p().
Referenced by declaration_statement_p(), and only_io_call().
entity entity_empty_label | ( | void | ) |
FI: it is difficult to memoize entity_empty_label because its value is changed when the symbol table is written and re-read from disk; Remi's memoizing scheme was fine as long as the entity table lasted as long as one run of pips, i.e. is not adequate for wpips
static entity empty = entity_undefined;
Definition at line 1105 of file entity.c.
References concatenate(), empty, EMPTY_LABEL_NAME, entity_domain, entity_undefined, gen_find_tabulated(), MODULE_SEP_STRING, pips_assert, and TOP_LEVEL_MODULE_NAME.
Referenced by __attribute__(), add_exec_mmcd(), add_test(), begin_omp_construct(), bound_generation(), build_first_comb(), build_third_comb(), C_MakeReturnStatement(), clean_statement_label(), clear_label(), cluster_stage_spire(), code_generation(), com_call(), comEngine_distribute_code(), compact_list(), controlize_distribution(), controlize_list(), controlizer(), copy_n_statement(), distribute_code(), do_clone_label(), do_group_constants_terapix(), do_loop_expansion_init(), do_loop_to_while_loop(), do_loop_unroll_with_epilogue(), do_loop_unroll_with_prologue(), do_symbolic_tiling(), enclose_in_a_parallel_loop(), fix_sequence_statement_attributes(), for_to_do_loop_conversion(), forloop_test(), full_spaghettify_module(), gather_and_remove_all_format_statements_rewrite(), gen_mpi_send_recv(), gen_omp_taskwait(), generate_code(), generate_code_loop(), generate_copy_loop_nest(), generate_full_copy(), generate_guarded_statement(), generate_loop_workchunk(), generic_insert_statement(), GenericAddLocalEntityToDeclarations(), gfc2pips_code2get_label(), gfc2pips_code2get_label2(), gfc2pips_code2get_label3(), gfc2pips_code2get_label4(), gfc2pips_code2instruction__TOP(), Hierarchical_tiling(), hpf_compile_loop(), insert_before_current_statement(), insert_endscop_after_stmt(), insert_endscop_before_stmt(), insert_endscop_in_sequence(), insert_rwt(), instruction_to_statement(), io_filter(), isolate_code_portion(), loop_normalize_of_loop(), loop_strip_mine(), loop_test(), make_binary_call_statement(), make_body_from_loop(), make_call_statement(), make_communication_statement(), make_condition_from_forloop(), make_condition_from_loop(), make_condition_from_test(), make_condition_from_whileloop(), make_exit_from_forloop(), make_exit_from_loop(), make_exit_from_test(), make_exit_from_whileloop(), make_forloop_statement(), make_fsm_from_statement(), make_global_common_and_initialize(), make_initialization_from_loop(), make_loop_skeleton(), make_loop_statement(), make_loop_step_stat(), make_loopPattern(), make_loopStat1(), make_movements_loop_body_wp65(), make_new_loop_statement(), make_plain_continue_statement(), make_scalar_communication_module(), make_start_ru_module(), make_state_variable_assignement_statement(), make_statement_operator(), make_test_statement(), make_transition_statement(), make_transStat(), make_undefined_list(), make_whileloop_statement(), MakeAssignInst(), MakeBlock(), MakeCaseStatement(), MakeDefaultStatement(), MakeForloop(), MakeGotoStatement(), MakeIoInstA(), MakeLoopAs(), makeloopbody(), MakeNewLabelledStatement(), Overlap_Analysis(), parallel_tiling(), ProcessEntry(), put_a_comment_on_a_statement(), re_do_it(), recover_structured_while(), ReuseLabelledStatement(), sa_do_it(), simd_insert_statement(), srwt(), statement_convert_to_statement_with_sequence_of_intruction(), statement_filter(), statement_remove_useless_label(), statement_to_label(), substitute_and_create(), systeme_to_loop_nest(), take_out_the_entry_node_of_the_unstructured(), Tiling2_buffer(), Tiling_buffer_allocation(), tiling_transformation(), update_statement_instruction(), usual_loop_tiling(), and whileloop_test().
Definition at line 666 of file entity.c.
References empty_label_p(), and entity_local_name().
Referenced by clean_statement_label(), collect_labels(), compact_list(), do_clone_label(), do_split_block_statements(), flag_loop(), full_loop_unroll(), fuse_2_control_nodes(), increase_number_of_use_by_1(), inlining_regenerate_labels(), insert_before_statement(), insert_rwt(), LinkInstToCurrentBlock(), loop_test(), MakeStatement(), NewStmt(), statement_may_have_control_effects_p(), statement_remove_useless_label(), statement_to_label(), substitute_statement_label(), text_block_elseif(), text_block_if(), text_loop(), text_loop_default(), text_test(), text_whileloop(), unlabelled_statement_p(), up_counter(), and whileloop_test().
SG: not all entities seem to have this field defined if not defined, assume it's not an enum, although i am unsure of the validity of this:
pips_assert("Value of e is defined", !value_undefined_p(ev));
Definition at line 980 of file entity.c.
References entity_initial, value_symbolic_p, and value_undefined_p.
Referenced by inline_expression_call(), and outliner_independent_recursively().
Base the predicate on the entity name as for struct and union.
Definition at line 968 of file entity.c.
References BLOCK_SEP_CHAR, DUMMY_ENUM_PREFIX, entity_local_name(), entity_name, ENUM_PREFIX, and ENUM_PREFIX_CHAR.
Referenced by basic_maximum(), derived_entity_p(), do_clone_entity(), entity_enum_variable_p(), filtered_declaration_list(), find_enum_of_member(), and get_symbol_table().
Definition at line 992 of file entity.c.
References basic_derived, basic_derived_p, basic_undefined, basic_undefined_p, entity_enum_p(), entity_type, type_variable, type_variable_p, ultimate_type(), and variable_basic.
Referenced by NormalizeReference().
checks if an entity is an equivalent
e | entity to check |
Definition at line 2194 of file entity.c.
References ENDP, entity_storage, ram_shared, storage_ram, and storage_ram_p.
Definition at line 707 of file entity.c.
References entity_local_name(), entity_module_p(), and F95MODULE_PREFIX.
Referenced by sentence_head(), and sentence_tail().
Definition at line 694 of file entity.c.
References entity_name, and F95_USE_LOCAL_NAME.
Referenced by text_entity_declaration().
e is the field of a structure
Definition at line 857 of file entity.c.
References entity_local_name(), and MEMBER_SEP_CHAR.
Referenced by c_convex_effects_on_actual_parameter_forward_translation(), constant_points_to_indices_p(), distance_between_entity(), do_atomize_call(), do_brace_expression_to_statements(), effect_words_reference(), entity_for_value_mapping_p(), entity_more_or_less_minimal_name(), extended_regions_must_convex_hull(), field_expression_p(), field_reference_expression_p(), get_dma_dimension(), get_sizeofexpression_for_region(), inline_expression_call(), isolate_patch_reference(), make_declarations_statement(), outliner_independent_recursively(), points_to_indices_to_subscript_indices(), points_to_indices_to_unbounded_indices(), points_to_reference_to_type(), proper_to_summary_simple_effect(), r_cell_reference_to_type(), reference_equal_p(), reference_to_field_disambiguator(), references_must_conflict_p(), safe_expression_to_transformer(), simple_reference_to_convex_reference_conversion(), store_independent_points_to_indices_p(), variable_references_may_conflict_p(), and variable_to_dimensions().
f is a field of a structure or of an union: what is its rank?
FI: positions are counted from 1 on; do we want to subtract 1?
Definition at line 940 of file entity.c.
References entity_field_to_entity_struct_or_union(), entity_name, entity_type, f(), gen_position(), list_undefined, pips_assert, pips_internal_error, rank, type_struct, type_struct_p, type_tag, type_union, and type_union_p.
Referenced by reference_to_field_disambiguator().
f is a field of a structure: what is its structure?
To get the structure name, we have to drop the field part of f's name and to insert a struct prefix before the struct name. Maybe, it would have been better to keep the struct prefix in the field name.
structure name
get rid of the field name
can be done in place because the field name is at least one character long and because we also gain the field marker
Definition at line 879 of file entity.c.
References entity_domain, entity_name, entity_undefined, f(), free(), gen_find_tabulated(), global_name_to_user_name(), MEMBER_SEP_CHAR, pips_assert, pips_debug, prefix, strdup(), and string_undefined.
Referenced by entity_field_to_entity_struct(), entity_field_to_entity_struct_or_union(), and entity_field_to_entity_union().
To be able to breakpoint effectively
Definition at line 905 of file entity.c.
References entity_field_to_entity(), entity_undefined_p, f(), pips_assert, and STRUCT_PREFIX_CHAR.
Referenced by offset_of_struct(), and same_struct_entity_p().
To be able to breakpoint effectively
Definition at line 925 of file entity.c.
References entity_field_to_entity(), entity_undefined_p, f(), pips_assert, STRUCT_PREFIX_CHAR, and UNION_PREFIX_CHAR.
Referenced by entity_field_rank(), inline_expression_call(), and outliner_independent_recursively().
To be able to breakpoint effectively
Definition at line 915 of file entity.c.
References entity_field_to_entity(), entity_undefined_p, f(), pips_assert, and UNION_PREFIX_CHAR.
is p a formal parameter?
Definition at line 1935 of file entity.c.
References formal_parameter_p().
Referenced by do_convert_this_array_to_pointer_p(), entities_maymust_conflict_p(), entity_more_or_less_minimal_name(), fix_loop_index_sign(), flatten_code(), inline_expression_call(), module_to_value_mappings(), outliner_independent_recursively(), references_may_conflict_p(), RemoveDummyArguments(), replace_expression_similar_to_pattern(), UseDummyArguments(), and UseFormalArguments().
Definition at line 724 of file entity.c.
References entity_module_p(), entity_type, functional_result, type_functional, type_functional_p, type_undefined, type_undefined_p, and type_void_p.
Referenced by call_selection(), do_gpu_qualify_pointers(), do_inlining(), entities_maymust_conflict_p(), entity_subroutine_p(), freia_create_helper_function(), make_host_and_node_modules(), MakeEntry(), outliner_parameters(), outliner_scan(), retype_formal_parameters(), run_inlining(), search_1r_function_call(), xml_Arguments(), xml_Call(), and xml_Chain_Graph().
Used instead of the macro to pass as formal argument.
Definition at line 464 of file entity.c.
References entity_name, entity_undefined_p, and pips_assert.
Referenced by compute_region_variables(), create_private_integer_variable_for_new_module(), create_private_variable_for_new_module(), declare_common_variables_in_module(), make_array_communication_statement(), make_scalar_communication_module(), make_start_ru_module(), make_wait_ru_module(), store_new_module(), transformer_filter(), and transformer_projection_with_redundancy_elimination_and_check().
Definition at line 1082 of file entity.c.
References entity_special_area_p(), entity_storage, ram_section, storage_ram, and storage_ram_p.
Referenced by compare_effect_reference_in_common(), debug_ref_rwt(), effect_words_reference(), entity_hpf_number(), hpfc_main_entity(), NormalizeCommonVariables(), and STATIC_LIST_OF_HPF_OBJECTS().
Formal parameters do not use the standard ram storage.
However, a formal area is used for points-to stubs
Definition at line 3196 of file entity.c.
References entity_storage, formal_area_p(), ram_section, storage_ram, and storage_ram_p.
Referenced by transformer_general_consistency_p().
look for ent in ent_l
ent | entity to find |
ent_l | list to scan |
ent | nt |
ent_l | nt_l |
Definition at line 2221 of file entity.c.
References gen_chunk_undefined_p, and gen_find_eq().
Referenced by array_bound_check_instrumentation(), copy_write_statement(), copy_write_statement_with_cumulated_regions(), entity_to_declaring_statement_aux(), full_loop_unroll(), initialize_and_verify_common_variable(), and prepare_context().
entity entity_intrinsic | ( | const char * | name | ) |
FI: I do not understand this function name (see next one!).
It seems to me that any common or user function or user subroutine would be returned. FI: assert condition made stronger (18 December 1998)
name | ame |
Definition at line 1292 of file entity.c.
References concatenate(), entity_domain, entity_undefined, gen_find_tabulated(), intrinsic_entity_p(), MODULE_SEP_STRING, pips_assert, and TOP_LEVEL_MODULE_NAME.
Referenced by add_exec_mmcd(), add_pvm_init_and_end(), alloc_instrumentation(), any_basic_update_operation_to_transformer(), any_basic_update_to_transformer_list(), arithmetic_intrinsic_p(), array_scalar_access_to_bank_communication(), basic_to_generic_conversion(), basic_update_reflhs_with_rhs_to_transformer(), binary_to_nary(), bound_to_statement(), buffer_full_condition(), build_flag_assign(), build_flag_test(), build_global_time_test_with_exp(), build_local_time_test(), c_reference(), call_flt(), call_STEP_subroutine3(), clean_statement(), compile_master(), compute_final_index_value(), compute_region(), constraint_to_bound(), constraints_to_loop_bound(), convert_bound_expression(), convert_pointer_to_array(), convert_pointer_to_array_aux(), copy_write_statement_with_cumulated_regions(), ctx_generate_new_statement_cluster_dependant(), derived_formal_parameter_to_stub_points_to(), dimensions_to_dma(), do_array_expansion(), do_array_to_pointer_walk_call_and_patch(), do_array_to_pointer_walk_expression(), do_check_isolate_statement_preconditions_on_call(), do_convert_to_c_operator(), do_convert_to_standard_operators(), do_isolate_statement_preconditions_satisified_p(), do_linearize_array_manage_callers(), do_linearize_pointer_is_expression(), do_loop_expansion(), do_loop_to_for_loop(), do_loop_to_while_loop(), do_loop_unroll_with_epilogue(), do_loop_unroll_with_prologue(), do_outliner_smart_replacment(), do_simplify_c_operator(), do_solve_hardware_constraints_on_nb_proc(), do_split_structure(), do_terapix_argument_handler(), do_terapix_loop_optimizer(), do_terapix_remove_divide(), do_terapix_warmup_patching(), expr_compute_local_index(), expression_list_to_conjonction(), expression_plusplus(), fcs_call_flt(), fix_if_condition(), forloop_test(), free_guards(), gen_if_rank(), generate_bminus(), Generate_C_ReturnStatement(), generate_compact(), generate_fifo_stat(), generate_mmcd_stat_from_ref(), generate_monome(), get_bounds_expression(), get_expression_addr(), get_fifoExp_from_ref(), gfc2pips_expr2expression(), guard_expanded_statement(), heap_intrinsic_to_post_pv(), hpfc_add_2(), hpfc_add_n(), hpfc_compile(), if_conv_init_statement(), incrementation_expression_to_increment(), initialization_list_to_statements(), initialize_array_variable(), inline_expression_call(), instruction_selection(), int_to_expression(), inv_call_flt(), inverse_operator_of(), io_intrinsic_p(), isolate_patch_reference(), loop_annotate(), loop_inc(), loop_strip_mine(), loop_test(), make_array_communication_statement(), make_assign_instruction(), make_binary_call_statement(), make_body_from_loop(), make_bound_expression(), make_call_statement(), make_condition_from_loop(), make_constraint_expression(), make_continue_instruction(), make_expression_with_state_variable(), make_factor_expression(), make_fields_assignment_instruction(), make_guard_expression(), make_increment_instruction(), make_increment_statement(), make_init_time(), make_lInitStats(), make_loadsave_statement(), make_loop_step_stat(), make_lSwitchStats(), make_max_expression(), make_min_expression(), make_mmcd_load_store_stat(), make_scalar_communication_module(), make_send_receive_conversion(), make_simple_Fortran_io_instruction(), make_start_ru_module(), make_state_variable_assignement_statement(), make_step_inc_statement(), make_toggle_inc_statement(), make_transStat(), make_vecteur_expression(), MakeAssignInst(), MakeAtom(), MakeCaseStatement(), MakeForloop(), makeTransfertSizeExpression(), MakeWhileDoInst(), merge_expressions(), mpic_make_generic_mpi_receive_call(), mpic_make_generic_mpi_send_call(), mpic_make_mpi_comm_rank(), mpic_make_mpi_comm_size(), mpic_make_mpi_finalize(), mpic_make_mpi_init(), normalize_microcode(), optimize_simplify_nary_patterns(), outliner_extract_loop_bound(), outliner_patch_parameters(), outliner_smart_references_computation(), partial_eval_binary_operator_old(), partial_eval_mult_operator(), partial_eval_plus_or_minus_operator(), phi_free_contraints_to_expressions(), process_innerStat1_proc(), Psysteme_to_expression(), Psysteme_to_loop_nest(), re_do_it(), reduction_operator_entity(), reference_filter(), regenerate_call(), regenerate_expression(), region_to_address(), region_to_minimal_dimensions(), remove_unread_variable(), rename_op(), replace_field_by_reference_walker(), replace_reductions_in_statement(), replace_subscript(), scalopify(), sesamify(), set_resources_for_module(), simdizer_auto_tile(), simplify_C_expression(), split_update_call(), st_make_nice_test(), st_send_to_computer_if_necessary(), statement_insertion_fix_access(), statement_phi_function_p(), string_to_expression(), switch_nary_to_binary(), terapix_loop_optimizer(), terapix_normalize_tests(), top_down_abc_not_exact_case(), try_reorder_expression_call(), typedef_formal_parameter_to_stub_points_to(), unsugared_loop_inc(), unsugared_loop_test(), update_indices_for_local_computation(), update_operator_to_regular_operator(), update_range(), update_test_condition(), variable_to_dimensions(), verify_array_variable(), and whileloop_test().
expression entity_ith_bounds | ( | entity | e, |
int | i | ||
) |
FIND_MODULE returns entity.
Argument is module_name This function should be replaced by local_name_to_top_level_entity() ntity FindEntity(_module(name) string name; { string full_name = concatenate(TOP_LEVEL_MODULE_NAME, MODULE_SEP_STRING, name, NULL); entity e = gen_find_tabulated(full_name, entity_domain);
return(e); } END_EOLE returns a range expression containing e's i-th bounds
Definition at line 1626 of file entity.c.
References copy_expression(), dimension_lower, dimension_upper, entity_ith_dimension(), int_to_expression(), is_syntax_range, make_expression(), make_range(), make_syntax(), and normalized_undefined.
Definition at line 678 of file entity.c.
References entity_type, and type_statement_p.
Referenced by find_implicit_goto(), is_label_statement(), and type_this_call().
Checks that el only contains entity.
el | l |
Definition at line 1411 of file entity.c.
References ENTITY, entity_domain, entity_domain_number, entity_undefined, FOREACH, pips_debug, and safe_entity_name().
Referenced by AddToExterns(), CheckExternList(), FindOrCreateCurrentEntity(), get_symbol_table(), and module_entities().
Definition at line 2860 of file entity.c.
References BASE_NULLE, ENTITY, FOREACH, gen_copy_seq(), gen_free_list(), gen_nreverse(), Svecteur::succ, VALUE_ONE, and vect_new().
Referenced by generate_remapping_code(), hpfc_algorithm_row_echelon(), hpfc_algorithm_tiling(), and verify_array_variable().
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 that it was pertinent to remove the special care of constants there.
So I added something here, to deal with the "null" entity which codes the constant. FC 28/11/94. SG: should return a const pointer
Definition at line 453 of file entity.c.
References entity_domain, entity_domain_number, entity_name, entity_undefined_p, local_name(), and pips_assert.
Referenced by abc_with_allocation_size(), abstract_locations_max(), add_array_dimension_bound_test(), add_call_to_callees(), add_conflicts(), add_constraint_on_x(), add_formal_to_actual_bindings(), add_loop_index_exit_value(), add_new_module_from_text(), add_non_declared_reference_to_declaration(), add_or_kill_equivalenced_variables(), add_parameter_variable_to_module(), add_private_variable_to_module(), add_reduction(), add_symbolic_constant_to_declaration(), add_synonym_values(), AddCommonToModule(), AddEntityToModule(), AddEntityToModuleCompilationUnit(), address_of_value_entity_p(), AddToCalledModules(), AddVariableToCommon(), adg_fprint_psysteme(), adg_fprint_sc_pvecteur(), adg_get_integer_entity(), adg_print_graph(), adg_rename_entities(), align_indices_p(), AnalyzeData(), anonymous_type_p(), any_assign_operation_to_transformer(), any_expression_to_transformer(), any_scalar_assign_to_transformer_list(), any_scalar_assign_to_transformer_without_effect(), any_use_statement(), arguments_are_something(), atinit(), atomizer_of_loop(), atomizer_of_test(), better_elim_var_with_eg(), binary_arithmetic_operator_to_post_pv(), binary_to_nary(), boolean_intrinsic_call_condition_to_points_to(), bottom_up_abc_base_reference_implied_do(), bottom_up_abc_reference(), bound_distribution(), bound_generation(), bound_parameter_name(), build_list_of_min(), build_new_ref(), build_sc_machine(), build_sc_with_several_uniform_ref(), build_third_comb(), build_written_list(), c_call(), c_entity_local_name(), c_io_function_to_post_pv(), c_return_to_transformer(), c_statement(), c_text_related_entities(), c_user_function_call_to_transformer(), call_instruction_to_communications(), call_rwt(), call_to_post_pv(), call_to_wp65_code(), CCompilationUnitMemoryAllocations(), check_io_list(), check_one_common(), check_range_wrt_precondition(), check_simple(), check_the_reference(), check_this_loop(), CheckLeftHandSide(), clean_distributed_io_system(), clean_shared_io_system(), CleanUpEntity(), common_variable_in_module_scope_p(), comp_regions_of_instruction(), comp_regions_of_loop(), comparable_entity_in_list_p(), compare_coeff(), complex_constant_expression_p(), compute_distribution_context(), compute_distribution_controlization_context(), compute_iteration_domain(), compute_points_to_kill_set(), compute_regions_union(), ComputeAddresses(), constant_to_transformer(), constraint_distribution(), constraint_to_bound(), constraints_to_loop_bound(), contexts_mapping_of_nest(), controlize_distribution(), convert_constant_from_double_to_real(), convert_constant_from_int_to_double(), convert_constant_from_int_to_real(), convert_constant_from_real_to_double(), convert_constant_from_real_to_int(), copy_from_call(), copy_from_statement(), copy_to_call(), copy_to_statement(), create_HRE_module(), create_init_common_param_for_arrays(), create_init_common_param_for_processors(), create_init_common_param_for_templates(), create_local_index(), create_local_index2(), create_new_ent_list(), create_scalar_stub_sink_cell(), create_stub_entity(), create_tile_basis(), CreateReturnEntity(), cute_convex_union(), dag_append_freia_call(), dag_normalize(), dagvtx_copy_list_dot(), dataflows_on_reference(), davinci_dump_expression_rc(), dead_fcd_directive_p(), declare_common_variables_in_module(), DeclarePointer(), DeclareVariable(), default_common_hook(), defs_elim_of_statement(), directive_filter(), distribution_format(), do_check_isolate_statement_preconditions_on_call(), do_gpu_qualify_pointers(), dprint(), dump_common_layout(), ecrit_coeff1(), ecrit_commentaire2(), ecrit_une_var(), ecrit_une_var_neg(), edge_weight(), effect_indices_first_pointer_dimension_rank(), egalite_debug(), entity_all_locations_p(), entity_all_module_heap_locations_typed(), entity_all_module_locations(), entity_all_module_locations_p(), entity_all_module_xxx_locations(), entity_all_module_xxx_locations_p(), entity_all_xxx_locations_p(), entity_allocatable_p(), entity_and_common_name(), entity_blockdata_p(), entity_common_p(), entity_empty_label_p(), entity_enum_p(), entity_f95module_p(), entity_field_p(), entity_flow_or_context_sentitive_heap_location_p(), entity_freia_api_p(), entity_heap_location_p(), entity_hpf_number(), entity_in_module(), entity_locations_max(), entity_module_unambiguous_user_name(), entity_more_or_less_minimal_name(), entity_struct_p(), entity_stub_sink_p(), entity_typed_anywhere_locations_p(), entity_typed_nowhere_locations_p(), entity_union_p(), entity_xml_parameter_p(), eov_add_entity_to_eliminate(), equiv_class_debug(), equivalent_entity_compare(), eval_var(), EvalConstant(), expand_call(), expression_equal_in_context_p(), expression_implied_do_p(), expression_int_scalar(), expression_less_than_in_context(), expression_list_directed_p(), expression_null_p(), expression_reference_number(), expression_to_float(), expression_to_int(), expression_to_polynome(), expression_to_post_pv(), external_call_to_post_pv(), external_value_name(), extract_lambda_list(), extract_stat_lunk(), fcd_directive_p(), fcs_count(), fill_HRE_module(), find_entity(), find_implicit_equation(), find_implicit_goto(), find_iteration_domain(), find_loop_with_name(), find_or_create_emulated_shared_variable(), find_or_create_newInd(), fix_sequence_statement_attributes(), fix_storage(), flatten_code(), for_to_do_loop_conversion(), formal_label_replacement_p(), fortran_library_entity_p(), fortran_user_call_to_transformer(), fortran_user_function_call_to_transformer(), fprint_bdt(), fprint_bdt_with_stat(), fprint_call(), fprint_coef_list(), fprint_entity_list(), fprint_message(), fprint_psysteme(), fprint_sc_pvecteur(), fprint_vv(), fprint_wp65_hash_tables(), freia_allocate_new_images_if_needed(), freia_cleanup_sequence_rec(), freia_data2d_field(), freia_image_variable_p(), freia_is_transpose_call(), freia_reduction_variable(), freia_spoc_pipeline(), fsi_seq_flt(), generate_all_liveness_but(), generate_code_loop(), generate_dynamic_liveness_for_primary(), generate_io_statements_for_shared_arrays(), generate_one_message(), generate_remapping_code(), generate_scalar_variables(), generate_scalar_variables_from_list(), generate_wiring(), GENERATION(), generic_c_words_simplified_entity(), generic_equality_to_transformer(), generic_function_to_return_value(), generic_stub_source_to_sinks(), GenericCleanEntities(), get_common_param_name(), get_controlized_statement_comment(), get_dynamic_variable_name(), get_externalized_function_param_name(), get_externalized_function_private_param_name(), get_function_common_name(), get_function_id_name(), get_in_param_id_name(), get_m_coef(), get_nlc_number(), get_number_of_ins(), get_operator_id(), get_out_param_id_name(), get_ppt(), get_receive_param_module_name(), get_ref_var_param_name(), get_send_param_module_name(), get_special_prettyprint_for_operator(), gfc2pips_add_to_callees(), gfc2pips_computeAdressesOfArea(), gfc2pips_generate_parameters_list(), gfc2pips_namespace(), gfc2pips_vars_(), global_intermediate_value_p(), global_old_value_p(), gpips_main(), handle_set_directive(), heap_cell_p(), heap_effect(), heap_effect_p(), heap_intrinsic_to_post_pv(), host_section_p(), hpf_directive_entity_p(), hpfc_intrinsic_like_function(), hpfc_io_like_function(), impact_check_two_scalar_variables_in_path(), implicit_type_p(), ImplicitType(), implied_do_reference_number(), inegalite_debug(), init_c_implicit_variables(), inline_expression_call(), inlining_regenerate_labels(), insert_check_alias_before_statement(), insert_impact_description_as_comment(), insert_one_type_declaration(), insert_test_before_statement(), interprocedural_abc_arrays(), interprocedural_abc_call(), interprocedural_mapping(), intrinsic_to_post_pv(), inv_call_flt(), io_comp_regions(), io_filter(), io_loop_nest_p(), Is_Associative_Commutative(), is_index_coeff_p(), is_mu_coeff_p(), is_mu_stat_in_sc(), IsBinaryOperator(), IsNaryOperator(), IsUnaryOperator(), lexicographic_order_p(), load_summary_transformer(), local_intermediate_value_entity_p(), local_old_value_entity_p(), local_temporary_value_entity_p(), local_tile_constraints(), look_for_the_best_counter(), loop_bounds_to_tile_bounds(), loop_iteration_domaine_to_sc(), loop_nest_movement_generation(), loop_nest_to_local_variables(), loop_nest_to_wp65_code(), loop_to_complexity(), make_array_communication_module(), make_array_communication_statement(), make_base_phi_variables(), make_bounds(), make_communication_statement(), make_context_of_loop(), make_emulated_shared_variable(), make_filtered_dg_or_dvdg(), make_global_common_and_initialize(), make_global_entity_from_local(), make_host_and_node_modules(), make_layout_statement(), make_load_blocks(), make_movement_scalar_wp65(), make_movements_loop_body_wp65(), make_new_entity(), make_new_local_variables(), make_new_simd_vector_with_prefix(), make_nlc_entity(), make_nsp_entity(), make_nub_entity(), make_return_statement(), make_scanning_over_one_tile(), make_scanning_over_tiles(), make_shared_statement(), make_start_ru_module(), make_statement_copy_i(), make_store_blocks(), make_tile_constraints(), MakeAssignInst(), MakeAtom(), MakeComplexConstant(), MakeCurrentFunction(), MakeCurrentModule(), MakeEntry(), MakeEntryCommon(), MakeEquivAtom(), MakeFormalParameter(), MakeIoInstA(), MakeParameter(), MakeReturn(), MakeStatement(), MakeVariableStatic(), malloc_arg_to_type(), maybe_unroll_while_rwt(), module_codefilename(), module_entitiesfilename(), module_fortranfilename(), module_name_to_preconditions(), module_name_to_total_preconditions(), module_par_codefilename(), module_par_fortranfilename(), module_pp_fortranfilename(), module_predicat_fortranfilename(), module_resource_name(), module_to_all_declarations(), module_to_callees(), module_to_dynamic_area(), module_to_heap_area(), module_to_value_mappings(), module_to_wp65_modules(), movement_computation(), my_build_new_ref(), nary_operator_p(), new_elim_var_with_eg(), new_local_image_variable(), new_synonym(), normal_expression_of_statement(), normal_loop_p(), nowhere_source_to_sinks(), null_source_to_sinks(), oi_call_rwt(), old_value_entity_p(), only_minor_statements_in_between(), operator_expression_p(), outliner_independent_recursively(), parametric_transformer_empty_p(), partial_eval_binary_operator(), partial_eval_binary_operator_old(), pip_solve_min_with_big(), pips_main(), pips_region_user_name(), place_holder_variable_p(), plc_elim_var_with_eg(), plc_fprint_proto(), plc_make_distance(), points_to_cell_translation(), points_to_compare_cells(), points_to_compare_ptr_cell(), points_to_reference_to_typed_index(), pragma_omp_p(), pragma_PRAGMA_DISTRIBUTED_p(), prepare_reindexing(), prettyprint_dependence_graph(), prettyprint_dependence_graph_view(), print_any_transformer(), print_common_layout(), print_fullname_base(), print_list_of_entities(), print_op_schedule(), print_or_dump_points_to(), print_points_to_cells(), print_reference_list(), process_static_initialization(), process_true_call_stat(), process_value_list(), propagation_on_remapping_graph(), proper_comp_regions_of_intrinsic(), pu_variable_name(), pu_vect_fprint(), put_variables_in_ordered_lists(), read_statement_with_write_effect_on_array_subscript(), readable_value_name(), realign_directive_p(), recursive_rename_types(), redistribute_directive_p(), ref_found_p(), ref_in_implied_do(), reference_conflicting_test_and_update(), reference_list_print(), reference_written_p(), referencenodeclfilter(), references_for_regions(), region_dynamic_var_elim(), region_entity_variable_to_new_declare_entity(), regions_transformer_apply(), related_effect(), related_images_p(), relation_to_transformer(), remapping_file_name(), remove_ghost_variable_entities(), remove_variables_from_system(), remove_variables_if_possible(), rename_directive_p(), rename_loop_index(), rename_reference(), rename_statement_declarations(), RenameFunctionEntity(), replicate_declaration(), retype_formal_parameters(), rewrite_modulo_expression(), rice_loop(), rice_update_dependence_graph(), sa_print_ins(), safe_load_primary_entity(), SafeLocalToGlobal(), same_entity_lname_p(), SaveChains(), SaveEntity(), sc_image_computation(), sc_proj_on_di(), sc_projection_optim_along_vecteur_ofl(), sc_syst_debug(), scalar_postlude(), sctc_call_rwt(), sentence_area(), sentence_basic_declaration(), sentence_data(), sentence_external(), sentence_f95use_declaration(), sentence_goto(), sentence_symbolic(), separate_variables(), separate_variables_2(), set_dimensions_of_local_variable_family(), simd_load_call_p(), simd_replace_parameters(), simd_store_call_p(), simd_work_call_p(), simple_addition_to_transformer(), simplify_C_expression(), simplify_relational_expression(), sio_call_flt(), sizeof_value_entity_p(), skip_cast_and_addop_expression(), sort_unknowns(), spire_distributed_unstructured_to_structured(), st_call(), st_declaration(), st_entity_local_name(), st_one_message(), statement_flatten_declarations(), statement_remove_omp_clauses(), statement_to_label(), statement_with_at_most_one_expression_integer(), statement_with_at_most_one_integer_or_character(), statement_without_argument(), static_controlize_call(), store_a_lower(), store_an_upper(), store_initial_value(), subarray_shift_assignment_p(), substitute_unbounded_call(), SubstituteDummyParameters(), swis_call_flt(), switch_generic_to_specific(), terapix_renamed_entity_p(), TestDiVariables(), text_entity_declaration(), text_equivalence_class(), text_equivalences(), text_loop(), text_loop_cmf(), text_loop_craft(), text_loop_default(), text_whileloop(), this_entity_xmldeclaration(), tile_hyperplane_constraints(), tile_membership(), tile_membership_constraints(), tiling_transformation(), tpips_init(), tpips_main(), transfert_statement(), transformer_add_integer_relation_information(), transformer_add_loop_index_incrementation(), transformer_combine(), transformer_general_consistency_p(), transformer_internal_consistency_p(), transformer_normalize(), translate_global_value(), translate_IO_ref(), translate_to_module_frame(), TranslateEntryFormals(), type_this_call(), type_this_entity_if_needed(), type_this_instruction(), type_to_named_type(), typing_arguments_of_user_function(), typing_buffer_inout(), typing_function_argument_type_to_return_type(), typing_implied_do(), typing_of_assign(), unary_minus_operation_to_transformer(), unbounded_dimension_p(), unbounded_entity_p(), undefined_pointer_value_entity_p(), update_called_modules(), update_functional_type_with_actual_arguments(), update_map(), update_operation_to_transformer(), update_operator_to_post_pv(), update_range(), update_runtime_for_remapping(), update_summary_precondition(), update_written_variables(), UpdateEntity(), UpdateEntity2(), UseFormalArguments(), user_call_to_points_to_sinks(), variable_in_declaration_module_p(), variable_list_update(), variable_to_abstract_location(), vect_debug(), verify_used_before_set_call(), what_operator(), where_to_perform_operation(), words_assign_op(), words_basic(), words_cmf_loop_range(), words_common_variable(), words_entity_list(), words_infix_binary_op(), words_infix_nary_op(), words_intrinsic_call(), words_intrinsic_precedence(), words_io_control(), words_io_inst(), words_loop_list(), words_loop_range(), words_nullary_op_c(), words_nullary_op_fortran(), words_omp_red(), words_parameters(), words_postfix_unary_op(), words_prefix_unary_op(), words_range(), words_regular_call(), words_stat_io_inst(), words_subscript_range(), wpips_main(), xml_Chain_Graph(), xml_Compute_and_Need(), xml_entity_local_name(), xml_loop_from_loop(), and xml_loop_from_sequence().
Check if a variable "var" is local to a module "module".
A variable is local to a module:
it might be better to check the parameter passing mode itself, via the module type
var | ar |
module | odule |
Definition at line 3104 of file entity.c.
References entity_module_name(), entity_name, entity_scalar_p(), entity_storage, entity_user_name(), formal_function, fortran_module_p(), module, pips_debug, ram_function, ram_section, same_entity_p(), same_string_p, storage_formal, storage_formal_p, storage_ram, and storage_ram_p.
Referenced by do_check_isolate_statement_preconditions_on_call().
Definition at line 700 of file entity.c.
References entity_module_p(), entity_name, and main_module_global_name_p().
Referenced by alias_propagation(), build_real_resources(), c_call(), c_head(), common_is_visible_p(), compile_module(), entity_subroutine_p(), generate_starpu_pragma(), generic_module_name_to_transformers(), generic_module_pointer_values(), generic_points_to_analysis(), get_main(), initial_code_abc_statement_rwt(), make_host_and_node_modules(), module_is_called_by_main_program_p(), module_name_to_total_preconditions(), old_array_bound_check_instrumentation(), pips_code_abc_statement_rwt(), sentence_head(), sentence_tail(), st_call(), statement_to_points_to(), step_compile_analysed_module(), step_update_comm(), summary_precondition(), summary_total_postcondition(), used_before_set(), and xml_Boxes().
const char* entity_module_name | ( | entity | e | ) |
See comments about module_name().
Its result is transient and must be strduped.
Definition at line 1092 of file entity.c.
References entity_name, and module_name().
Referenced by abstract_locations_max(), array_location_entity_of_module_p(), array_need_bound_check_p(), cell_reference_compare(), check_one_common(), clean_distributed_io_system(), clean_shared_io_system(), CleanUpEntity(), common_region_translation(), constant_memory_access_path_to_location_name(), create_stub_entity(), do_terapix_argument_handler(), dprint(), dump_common_layout(), effect_on_non_local_variable_p(), entity_all_locations_p(), entity_all_xxx_locations_p(), entity_any_module_p(), entity_hpfc_dummy_p(), entity_local_variable_p(), entity_more_or_less_minimal_name(), entity_name_without_scope(), entity_to_module_entity(), eov_add_entity_to_eliminate(), expression_reference_number(), FixCInternalLabels(), function_return_value_p(), Generate_C_ReturnLabel(), generic_make_entity_copy_with_new_name(), global_intermediate_value_p(), global_new_value_to_global_old_value(), global_old_value_p(), global_variable_p(), initialize_and_verify_common_variable(), inline_expression_call(), insert_common_declaration(), interprocedural_abc_arrays(), local_entity_of_current_function_p(), local_entity_of_module_p(), location_entity_of_module_p(), make_location_entity(), make_new_index_entity(), make_statement_copy_i(), new_synonym(), opgen_may_module(), opgen_must_module(), precondition_intra_to_inter(), print_C_common_layout(), print_common_layout(), print_fullname_base(), print_or_dump_points_to(), print_points_to_cells(), reference_to_address_entity(), remapping_file_name(), remove_variable_entity(), replicate_declaration(), return_value_p(), set_current_function(), split_initializations_in_statement(), static_global_variable_p(), top_level_entity_p(), transformer_general_consistency_p(), translate_global_value(), translate_to_module_frame(), undefined_pointer_value_entity_p(), UpdateFormalStorages(), used_before_set(), variable_in_module_p(), and variable_in_module_p2().
Functional typedef also have value code ...
Definition at line 683 of file entity.c.
References entity_initial, typedef_entity_p(), value_code_p, and value_undefined.
Referenced by add_common_variables_to_hash_table(), add_formal_parameters_to_hash_table(), add_formal_to_actual_bindings(), add_module_call_site_precondition(), add_parameter_variable_to_module(), add_private_variable_to_module(), AddEntityToModule(), c_text_related_entities(), compute_SENDRECV_regions(), current_module(), entity_blockdata_p(), entity_common_p(), entity_f95module_p(), entity_function_p(), entity_main_module_p(), entity_subroutine_p(), entity_to_formal_integer_parameters(), entity_to_module_entity(), expression_to_transformer(), find_ith_parameter(), formal_and_actual_parameters_association(), fprint_any_environment(), functional_call_p(), get_module_precondition(), get_referenced_entities_filtered(), get_symbol_table(), global_parallelization(), in_regions_of_external(), interactive_loop_transformation(), ith_parameter_p(), language_module_p(), load_body_effects(), load_module_intraprocedural_effects(), load_summary_effects(), load_summary_precondition(), load_summary_reductions(), load_summary_total_postcondition(), load_summary_transformer(), module_formal_parameters(), module_to_formal_analyzable_parameters(), module_to_value_mappings(), pr_call_flt(), print_module_name_to_toposorts(), pure_function_p(), put_summary(), regions_of_external(), remove_common_variables_from_hash_table(), remove_formal_parameters_from_hash_table(), remove_variable_entity(), replace_formal_parameters_by_real_ones(), sc_entity_to_formal_integer_parameters(), set_current_module_entity(), step_translate_and_map_step_regions(), text_initializations(), translate_reductions(), update_summary_precondition(), update_user_common_layouts(), user_call_to_transformer(), and verify_used_before_set_call().
const char* entity_name_or_TCST | ( | entity | e | ) |
Return a name valid for sorting variables in vectors and constraint systems.
Definition at line 627 of file entity.c.
References entity_name.
Referenced by make_bound_expression(), and vect_change_base().
allocates a new string
Definition at line 543 of file entity.c.
References BLOCK_SEP_CHAR, concatenate(), entity_module_name(), entity_name, MODULE_SEP_STRING, pips_debug, strdup(), and string_undefined.
Default entity filter for get_referenced_entities()
It filters out constants and intrinsics
It should have been named entity_neither_constant_nor_intrinsic_p()...
Definition at line 3050 of file entity.c.
References entity_constant_p, and intrinsic_entity_p().
Referenced by do_group_statement_constant_prune(), entity_for_value_mapping_p(), entity_not_undefined_nor_constant_nor_intrinsic_p(), get_referenced_entities(), skip_constants_intrinsics_members(), and wipeout_entity().
Definition at line 745 of file entity.c.
References basic_pointer_p, basic_undefined, basic_undefined_p, entity_type, type_variable, type_variable_p, ultimate_type(), and variable_basic.
Referenced by collect_glopriv_data(), do_array_to_pointer_walk_call_and_patch(), do_gpu_qualify_pointers(), do_isolate_statement_preconditions_satisified_p(), do_linearize_prepatch(), do_linearize_prepatch_subscript(), effects_to_dma(), expression_to_polynome(), freia_image_variable_p(), glc_ref(), inline_expression_call(), make_vecteur_expression(), normalize_microcode_anotate(), NormalizeReference(), pointer_candidate_p(), set_add_scalars(), and set_glopriv_qualifier().
return the qualifiers associated to entity e if it's a variable NIL otherwise
Definition at line 1394 of file entity.c.
References entity_type, entity_undefined, NIL, type_variable, type_variable_p, and variable_qualifiers.
Referenced by add_declaration_to_declaration_statement_p(), c_text_related_entities(), and split_initializations_in_statement().
See also entity_volatile_variable_p()
Definition at line 766 of file entity.c.
References entity_type, entity_variable_p, FOREACH, qualifier_register_p, type_variable, and variable_qualifiers.
Referenced by entities_maymust_conflict_p(), reference_to_complexity(), and set_register_qualifier().
Definition at line 673 of file entity.c.
References entity_name, and return_label_p().
Referenced by safe_print_statement(), srwt(), statement_does_return(), and update_statement_instruction().
Is entity e the entity corresponding to a struct declaration?
Note the difference with entity_array_p()
Definition at line 1002 of file entity.c.
References BLOCK_SEP_CHAR, DUMMY_STRUCT_PREFIX, entity_local_name(), entity_name, STRUCT_PREFIX, and STRUCT_PREFIX_CHAR.
Referenced by derived_entity_p(), do_clone_entity(), filtered_declaration_list(), get_symbol_table(), type_struct_variable_p(), type_used_in_type_declarations_p(), and wipeout_entity().
???
Definition at line 737 of file entity.c.
References entity_blockdata_p(), entity_function_p(), entity_main_module_p(), and entity_module_p().
Referenced by c_head(), call_selection(), do_inlining(), interface_code_string(), run_inlining(), search_1r_function_call(), xml_Arguments(), xml_Call(), and xml_Chain_Graph().
Find the enclosing module of an entity.
If an entity is a module, return e. If the entity is a top-level entity, return e. FI: I'm surprised this function does not exist already
Definition at line 2053 of file entity.c.
References entity_module_name(), entity_module_p(), entity_undefined, entity_undefined_p, module_name_to_entity(), pips_assert, and top_level_entity_p().
Referenced by compute_points_to_gen_set(), find_enum_of_member(), make_global_entity_from_local(), move_declaration_control_node_declarations_to_statement(), and points_to_cell_translation().
Is entity e an entity representing the union declaration?
See entity_struct_p(), but different from entity_array_p()
Definition at line 1038 of file entity.c.
References BLOCK_SEP_CHAR, DUMMY_UNION_PREFIX, entity_local_name(), entity_name, UNION_PREFIX, and UNION_PREFIX_CHAR.
Referenced by derived_entity_p(), do_clone_entity(), filtered_declaration_list(), get_symbol_table(), type_union_variable_p(), type_used_in_type_declarations_p(), and wipeout_entity().
check if e is used to declare one of the entities in entity list ldecl
e | entity to check |
ldecl | list of entities whose declaration may use e |
ldecl | decl |
Definition at line 2258 of file entity.c.
References ENTITY, entity_name, entity_type, FOREACH, gen_free_list(), gen_in_list_p(), NIL, pips_debug, and type_supporting_entities().
const char* entity_user_name | ( | entity | e | ) |
Since entity_local_name may contain PIPS special characters such as prefixes (label, common, struct, union, typedef, ...), this entity_user_name function is created to return the initial entity/variable name, as viewed by the user in his code.
In addition, all possible seperators (file, module, block, member) are taken into account.
Function strstr locates the occurence of the last special character which can appear just before the initial name, so the order of test is important.
01/08/2003 Nga Nguyen -
Definition at line 487 of file entity.c.
References entity_name, and global_name_to_user_name().
Referenced by actual_label_replacement_p(), add_address_of_value(), add_pragma_to_sequence(), add_prettyprint_control_list_to_declaration_statement(), AddEntityToCompilationUnit(), AddToDeclarations(), AddToExterns(), aliased_translation_p(), any_assign_operation_to_transformer(), any_expression_to_transformer(), any_scalar_assign_to_transformer_list(), any_scalar_assign_to_transformer_without_effect(), any_user_call_site_to_transformer(), array_location_entity_of_module_p(), bound_generation_compare_vector_component(), C_loop_range(), c_parser_error(), c_text_related_entities(), call_to_transformer(), callnodeclfilter(), can_terapixify_call_p(), CCompilationUnitMemoryAllocations(), cell_reference_compare(), check_C_function_type(), check_fortran_declaration_dependencies(), check_loop_distribution_feasability(), clean_statement_label(), clean_up_sequences_rewrite(), compilation_unit_text(), compute_points_to_binded_set(), constant_string_entity_p(), create_pointer_to_array_stub_points_to(), create_scalar_stub_sink_cell(), create_stub_entity(), CreateReturnEntity(), declaration_statement_to_points_to(), declaration_to_post_pv(), dereferencing_to_sinks(), do_check_isolate_statement_preconditions_on_call(), do_reduction_detection(), do_scalar_renaming_in_vertex(), do_slightly_rename_entities(), do_solve_hardware_constraints_on_nb_proc(), do_solve_hardware_constraints_on_volume(), do_terapix_argument_handler(), dump_common_layout(), effect_indices_first_pointer_dimension_rank(), effects_to_dma(), ensure_comment_consistency(), entities_maymust_conflict_p(), entities_type_and_name(), entity_dot_name(), entity_from_user_name(), entity_local_variable_p(), entity_module_unambiguous_user_name(), entity_more_or_less_minimal_name(), entity_sesam_buffer_p(), eov_add_entity_to_eliminate(), expression_allocatable_data_access_p(), expression_string_constant(), expression_to_float(), extended_source_to_sinks(), FILE_star_effect_reference_p(), find_field_in_field_list(), FindOrCreateCurrentEntity(), FindParameterEntity(), fix_loop_index_sign(), flag_loop(), flatten_code(), freed_list_to_points_to(), freia_alloc_call_p(), freia_stmt_free_p(), freia_terapix_call(), function_return_value_p(), gcd_and_constant_dependence_test(), generate_starpu_pragma(), generic_basic_equal_p(), generic_c_words_simplified_entity(), generic_clone_variable_with_unique_name(), generic_field_list_names_equal_p(), generic_function_to_return_value(), get_externalized_function_param_name(), get_externalized_function_private_param_name(), get_next_task_name(), get_statement_pragma_register(), global_source_to_sinks(), gpu_ify_statement(), gpu_xml_dump(), guess_potential_reduction(), has_similar_entity(), implicit_c_variable_p(), init_c_implicit_variables(), inline_calls(), inline_expression_call(), inline_statement_crawler(), intrinsic_call_to_points_to(), is_freia_this_call(), loadstore_type_conversion_string(), location_entity_of_module_p(), loop_rwt(), make_available_scalar(), make_bottom_up_abc_tests(), make_statement_copy_i(), MakeCurrentModule(), MakeFunctionExpression(), MakeParameterList(), MemberDerivedIdentifierToExpression(), module_initial_parameter_pv(), move_declaration_control_node_declarations_to_statement(), native_call_p(), new_array_element_backward_substitution_in_transformer(), normalize_microcode(), normalize_microcode_anotate(), NormalizeReference(), offset_cell(), offset_points_to_cell(), operator_neutral_element(), outliner_compilation_unit(), outliner_file(), outliner_independent_recursively(), outliner_parameters(), outliner_smart_references_computation(), parallel_tiling(), perform_array_element_substitutions_in_transformer(), pips_user_value_name(), pointer_arithmetic_to_points_to(), points_to_set_block_projection(), prepare_context(), print_call_precondition(), print_entity_task_buffers(), print_sesam_tasks_buffers_header(), promote_local_entities(), recursive_functional_type_supporting_entities(), redeclaration_enter_statement(), reference_add_field_dimension(), RenameFunctionEntity(), replace_sender_entity_by_receiver_entity_in_reference(), replicate_declaration(), return_value_p(), sac_aligned_entity_p(), sac_expression_reduction_p(), same_field_entity_p(), sentence_head(), sentence_tail(), sesam_buffer_to_server_entity(), sesam_task_label_p(), simd_vector_entity_p(), simplify_C_expression(), solve_name_clashes(), source_to_sinks(), split_initializations_in_statement(), statement_flatten_declarations(), statements_localize_declarations(), step_directives_init(), step_directives_save(), step_local_RT_Integer(), step_parameter(), step_translate_and_map_step_regions(), step_update_comm(), string_parameter_p(), string_to_entity(), stub_text(), substitute_scalar_stub_in_transformer(), SubstituteDummyParameters(), task_to_string(), TestCoupleOfReferences(), text_loop_default(), type_to_named_type(), unique_entity_name_p(), update_functional_type_result(), update_sesam_tasks_buffers(), UpdateEntity2(), UseFormalArguments(), user_call_to_points_to_interprocedural(), user_call_to_points_to_interprocedural_binding_set(), words_basic(), words_declaration(), words_enum(), words_goto_label(), words_omp_red(), words_points_to_reference(), Words_Reference(), words_reference(), words_regular_call(), words_variable_or_function(), xml_Application(), xml_Argument(), xml_Array(), xml_AssignArgument(), xml_Call(), xml_Chain_Graph(), xml_Compute_and_Need(), xml_declarations(), xml_Full_Type(), xml_loop(), xml_Loop(), xml_ParameterUseToArrayBound(), xml_Pattern_Paving(), xml_print_parameter(), xml_reference(), xml_Region_Parameter(), xml_Scalar(), xml_TaskParameter(), xml_tiling(), xml_Transposition(), and xml_Type_Entity().
Definition at line 798 of file entity.c.
References entity_type, entity_variable_p, ultimate_type(), and variable_length_array_type_p().
Referenced by do_convert_this_array_to_pointer_p().
this function checks that e has an initial value code.
if yes returns it, otherwise aborts.
Definition at line 301 of file entity.c.
References entity_initial, is_value_code, pips_assert, value_code, and value_tag.
Referenced by AddEntityToDeclarations(), append_data_current_stmt_buffer_to_declarations(), check_first_statement(), ComputeAddresses(), EndOfProcedure(), gfc2pips_computeAdressesOfArea(), gfc2pips_namespace(), gfc2pips_shiftAdressesOfArea(), outliner_file(), and outliner_independent_recursively().
There are two cases for "extern"
module | odule |
Definition at line 2016 of file entity.c.
References code_externs, compilation_unit_entity_p(), entity_initial, gen_in_list_p(), module, and value_code.
There are two cases for "extern"
bool isbelong = true; list ld = entity_declarations(m); ifdebug(1) { pips_assert("e is visible in module",gen_in_list_p(e,ld)); pips_assert("module is a module or compilation unit",entity_module_p(m)||compilation_unit_entity_p(m)); pips_assert("e is either variable or function", variable_entity_p(e),functional_entity_p(e)); } if(variable_entity_p(e)) { if (compilation_unit_entity_p(m){ return(strstr(entity_name(e), } else { return(strstr(entity_name(e),TOP_LEVEL_MODULE_NAME) != NULL); } } else return(static_module_name_p(e));
return ((compilation_unit_entity_p(module) && gen_in_list_p(e,ram_shared(storage_ram(entity_storage(module))))) ||(!compilation_unit_entity_p(module) && (strstr(entity_name(e),TOP_LEVEL_MODULE_NAME) != NULL)));
module | odule |
Definition at line 1977 of file entity.c.
References code_externs, compilation_unit_entity_p(), entity_initial, entity_name, gen_in_list_p(), module, TOP_LEVEL_MODULE_NAME, and value_code.
Referenced by inline_expression_call().
FI: this function has not yet been extended for C types!!!
decls | ecls |
Definition at line 2834 of file entity.c.
References CAR, CDR, CONS, DIMENSION, ENDP, ENTITY, entity_type, FOREACH, gen_context_recurse, gen_free_list(), gen_true2(), deux_listes::le, deux_listes::lr, make_uniq_reference_list(), NIL, reference_domain, type_variable, type_variable_p, VARIABLE, and variable_dimensions.
Referenced by UpdateEntity().
if m was declared in the compilation unit cu and used elsewhere, cu may not be parsed yet.
Not good in general, but should work for compilation units...
No, it does not...
Definition at line 2713 of file entity.c.
References code_declarations, compilation_unit_entity_p(), ENTITY, entity_declarations, entity_enum_p(), entity_initial, entity_name, entity_to_module_entity(), entity_type, entity_undefined, entity_undefined_p, FOREACH, fprintf(), gen_copy_seq(), gen_free_list(), gen_in_list_p(), gen_nconc(), ifdebug, list_undefined, NIL, pips_assert, pips_debug, print_entities(), type_enum, and value_code.
Referenced by constant_expression_supporting_references(), and generic_constant_expression_supporting_entities().
This function gives back the ith formal parameter, which is found in the declarations of a call or a subroutine.
the_fnct | he_fnct |
rank | ank |
Definition at line 1863 of file entity.c.
References CAR, CDR, code_declarations, current, declaration_formal_p, ENTITY, entity_initial, entity_name, entity_to_offset, entity_undefined, pips_internal_error, rank, and value_code.
Referenced by add_aliases_for_current_call_site(), check_call_one_mode(), compare_formal_parameters(), interprocedural_mapping(), real_regions_forward_translation(), same_or_equivalence_argument_add_aliases(), xml_Arguments(), xml_FormalVariables(), xml_ParameterUseToArrayBound(), and xml_TaskParameters().
entity FindEntity | ( | const char * | package, |
const char * | name | ||
) |
Retrieve an entity from its package/module name and its local name.
package | ackage |
name | ame |
Definition at line 1503 of file entity.c.
References concatenate(), entity_domain, gen_find_tabulated(), MODULE_SEP_STRING, and package.
Referenced by abstract_locations_max(), add_entity_to_declarations(), add_new_compilation_unit(), add_new_module_from_text(), alloc_instrumentation(), c_return_to_transformer(), c_user_function_call_to_transformer(), clean_up_sequences_rewrite(), create_private_integer_variable_for_new_module(), create_private_variable_for_new_module(), CreateAbstractStateVariable(), CreateLogicalUnits(), cstr_args_check(), do_split_structure(), entity_all_module_locations(), entity_in_module(), entity_locations_max(), entity_more_or_less_minimal_name(), find_or_create_allocatable_struct(), FindEntityFromLocalName(), FindEntityFromUserName(), FindOrCreateEntity(), FindOrMakeDefaultIntrinsic(), FindOrMakeIntrinsic(), fortran_user_function_call_to_transformer(), generate_compact(), generic_function_to_return_value(), generic_make_entity_copy_with_new_name(), GenericAddLocalEntityToDeclarations(), get_typedefed_array(), GetFullyDefinedReturnCodeVariable(), GetReturnCodeVariable(), gfc2pips_symbol2entity(), heap_effect(), inline_expression_call(), intrinsic_name_p(), io_comp_regions(), local_name_to_top_level_entity(), make_array_entity(), make_C_print_statement(), make_check_io_statement(), make_data_field(), make_emulated_shared_variable(), make_get_rc_statement(), make_global_entity_from_local(), make_new_entity(), make_new_local_variables(), make_return_statement(), make_scalar_entity(), make_scalar_integer_entity(), make_stderr_variable(), MakeCurrentFunction(), MakeDataStatement(), MakeDataValueSet(), MakeIoFileArray(), module_to_dynamic_area(), module_to_heap_area(), mpi_make_ctx(), NameToCommon(), new_label_local_name(), new_synonym(), outliner_independent(), rename_op(), RenameFunctionEntity(), replace_expression_similar_to_pattern(), replace_indices_region(), replace_indices_region_com(), retype_formal_parameters(), SafeFindOrCreateEntity(), sesam_buffer_to_server_entity(), set_rc_function(), set_std_static_entities(), sprintf_check_expression(), std_file_entity_to_pointed_file_entity(), string_to_entity(), and UpdateEntity2().
entity FindEntityFromUserName | ( | const char * | package, |
const char * | name | ||
) |
package | ackage |
name | ame |
Definition at line 1520 of file entity.c.
References BLOCK_SEP_STRING, concatenate(), entity_domain, entity_undefined_p, FindEntity(), gen_find_tabulated(), MODULE_SEP_STRING, and package.
Referenced by normalize_microcode_anotate(), sesam_buffer_to_server_entity(), and terapix_optimize_accumulator().
entity FindOrCreateEntity | ( | const char * | package, |
const char * | local_name | ||
) |
Problem: A functional global entity may be referenced without parenthesis or CALL keyword in a function or subroutine call.
package | package name |
local_name | entity name |
Definition at line 1586 of file entity.c.
References CreateEntity(), entity_undefined_p, FindEntity(), local_name(), and package.
Referenced by AddVariableToCommon(), adg_get_integer_entity(), adg_rename_entities(), cast_STEP_ARG(), CheckLeftHandSide(), CleanUpEntity(), create_pointer_to_array_stub_points_to(), create_stub_entity(), create_stub_points_to(), CreateEntityFromLocalNameAndPrefix(), CreateIntrinsic(), CreateReturnEntity(), entity_all_module_xxx_locations(), entity_all_module_xxx_locations_typed(), entity_all_xxx_locations(), entity_all_xxx_locations_typed(), entity_flow_or_context_sentitive_heap_location(), entity_null_locations(), expression_try_find_size(), FindOrCreateCurrentEntity(), FindOrCreateTopLevelEntity(), FixCInternalLabels(), freia_data2d_field(), get_current_compilation_unit_entity(), get_top_level_entity(), get_typedefed_array(), get_use_entities_list(), GetReturnCodeVariable(), gfc2pips_char2entity(), gfc2pips_expr2entity(), gfc2pips_expr2expression(), gfc2pips_exprIO3(), gfc2pips_getTypesDeclared(), gfc2pips_namespace(), gfc2pips_parameters(), gfc2pips_symbol2data_instruction(), gfc2pips_symbol2entity(), gfc2pips_symbol2top_entity(), gfc2pips_vars_(), IdentifierToExpression(), init_c_areas(), init_c_implicit_variables(), InitAreas(), inline_expression_call(), inlining_regenerate_labels(), make_C_or_Fortran_constant_entity(), make_empty_module(), make_get_rc_statement(), make_global_entity_from_local(), make_label(), make_movements_loop_body_wp65(), make_new_common(), make_new_simd_vector_with_prefix(), make_nlc_entity(), make_nsp_entity(), make_nub_entity(), make_predefined_C_entities(), make_stderr_variable(), MakeCLabel(), MakeCompilationUnitEntity(), MakeCurrentFunction(), MakeEntryCommon(), MakeIoFileArray(), MakeLabel(), MakeParameterList(), MakeStorageRam(), MakeTopLevelEntity(), module_initial_parameter_pv(), mpi_initialize(), mpi_make_ctx(), mpi_type_mpi_comm(), mpi_type_mpi_request(), mpi_type_mpi_status(), NameToCommon(), NameToFunctionalEntity(), outliner_parameters(), overlap_redefine_expression(), phrase_comEngine_distributor(), phrase_distributor(), phrase_distributor_control_code(), reference_to_address_entity(), RenameFunctionEntity(), SafeLocalToGlobal(), safescale_distributor(), same_or_equivalence_argument_add_aliases(), set_internal_static_entities(), set_rc_function(), simd_replace_parameters(), std_file_entity_to_pointed_file_entity(), step_local_RT_Integer(), step_parameter(), string_to_entity_list(), SubstituteDummyParameters(), TranslateEntryFormals(), UpdateEntity2(), and UseFormalArguments().
hmmm...
package | ackage |
name | ame |
model | odel |
Definition at line 3136 of file entity.c.
References area_size, area_undefined, concatenate(), copy_storage(), copy_string, copy_type(), copy_value(), entity_consistent_p(), entity_domain, entity_initial, entity_name, entity_storage, entity_type, entity_undefined_p, gen_find_tabulated(), ifdebug, is_type_area, make_area(), make_entity, make_type(), MODULE_SEP_STRING, NIL, package, pips_assert, pips_debug, type_area, and type_area_p.
Referenced by AddCommonToModule(), AddEntityToModule(), and new_synonym().
entity FindOrCreateTopLevelEntity | ( | const char * | name | ) |
Return a top-level entity.
name | of the entity to find/construct |
name | ame |
Definition at line 1603 of file entity.c.
References FindOrCreateEntity(), and TOP_LEVEL_MODULE_NAME.
Referenced by add_entity_to_declarations(), binary_intrinsic_call_to_points_to_sinks(), find_or_create_allocatable_struct(), intrinsic_call_to_points_to(), make_bound(), make_data_field(), make_strlen_expression(), set_internal_static_entities(), and std_file_entity_to_pointed_file_entity().
Test if a module is in Fortran.
Could be better factored in with C case
If this alternative did not exist, the source code should be moved to ri-util
Definition at line 2799 of file entity.c.
References code_language, entity_initial, language_fortran_p, pips_internal_error, value_code, value_intrinsic_p, and value_undefined_p.
Referenced by begin_omp_construct(), bound_to_statement(), call_STEP_subroutine3(), cast_STEP_ARG(), compile_omp(), convex_regions_forward_translation(), create_module_with_statement(), dimensions_to_dma(), do_linearize_array_reference(), do_linearize_type(), do_recompile_module(), emit_message_and_stop(), end_omp_construct(), ensure_comment_consistency(), entity_clean_declarations(), entity_from_user_name(), entity_local_variable_p(), gcd_and_constant_dependence_test(), generate_variable_with_unique_name_to_module(), generic_print_xml_application(), get_current_step_directive(), get_expression_addr(), get_module_name_directive_suffix(), internal_print_icfg(), linearize_array_generic(), loop_normalize_of_loop(), make_any_print_statement(), make_bottom_up_abc_tests(), make_global_entity_from_local(), make_increment_statement(), make_loadsave_statement(), make_new_scalar_variable_with_prefix(), make_scalar_integer_entity(), outline(), outliner_compilation_unit(), outliner_file(), outliner_independent(), outliner_parameters(), outliner_scan(), region_to_address(), region_to_minimal_dimensions(), sequence_rewrite(), simd_memory_packing(), statement_filter(), step_compile(), step_compile_analysed_module(), step_compile_generated_module(), step_directive_parser(), step_directive_print(), step_local_regionArray(), step_parameter(), and text_summary_complexity().
void fprint_entity_list | ( | FILE * | fp, |
list | l | ||
) |
void fprint_entity_list(FILE *fp,list l): prints a list of entities on file fp.
fp | p |
Definition at line 3188 of file entity.c.
References CAR, CDR, ENTITY, entity_local_name(), fprintf(), and NIL.
Referenced by analyze_quast(), better_elim_var_with_eg(), build_first_comb(), build_list_of_min(), build_third_comb(), cmf_layout_align(), craft_layout_align(), fprint_loop(), include_trans_on_LC_in_ref(), make_bounds(), mapping_on_broadcast(), new_elim_var_with_eg(), partial_broadcast_coefficients(), partition_unknowns(), plc_elim_var_with_eg(), prepare_reindexing(), prgm_mapping(), printf_loop(), prototype_dimension(), rm_non_x_var(), simplify_bdt(), simplify_dimension(), and valuer().
|
static |
Create a copy of an entity, with (almost) identical type, storage and initial value if move_initialization_p is false, but with a slightly different name as entities are uniquely known by their names, and a different offset if the storage is ram (still to be done).
Entity e must be defined or the function core dumps.
Depending on its storage, the new entity might have to be inserted in code_declarations (done) and the memory allocation recomputed (not done).
Depending on the language, the new entity might have to be inserted in statement declarations. This is left up to the user of this function.
For C, name collisions with the compilation unit are not checked here. They are unlikely, but should be checked by the caller.
/param e entity to copy /param global_new_name new name wished /param systematically_add_suffix if true, automatically add a suffix number /param move_initialization_p if true, also copy the initial value
Find the first matching non-already existent variable name:
Free the already allocated name in the previous iteration that was conflicting:
We are in trouble. Up to now, we have created a static alias of the variable e (it's a variable entity because of its storage). Note that static aliases do not exist in C.
FI: It would be better to perform the memory allocation right away, instead of waiting for a later core dump in chains or ricedg, but I'm in a hurry. -> fixed, BC.
I don't know if this can happen, and what we should do in such case. BC.
Definition at line 2341 of file entity.c.
References add_C_variable_to_area(), add_variable_to_area(), AddEntityToDeclarations(), asprintf, basic_tag, basic_undefined, basic_undefined_p, c_module_p(), copy_storage(), copy_type(), copy_value(), DYNAMIC_AREA_LOCAL_NAME, entity_basic_concrete_type(), entity_domain, entity_initial, entity_module_name(), entity_storage, entity_type, entity_undefined, FindEntity(), free(), gen_find_tabulated(), is_basic_overloaded, make_entity, make_value_unknown(), module_name(), module_name_to_entity(), offset, ram_function, ram_offset, storage_ram, storage_ram_p, strdup(), type_variable, type_variable_p, UNKNOWN_RAM_OFFSET, variable_basic, and variable_name().
Referenced by make_entity_copy(), make_entity_copy_with_new_name(), and make_entity_copy_with_new_name_and_suffix().
entity get_continue_entity | ( | void | ) |
true if continue.
See also macro ENTITY_CONTINUE_P
Definition at line 1726 of file entity.c.
References continue_ent, and set_internal_static_entities().
Referenced by entity_continue_p().
set get_declared_entities | ( | void * | elem | ) |
retrieves the set of entities declared in elem
elem | lem |
Definition at line 3086 of file entity.c.
References do_get_declared_entities(), gen_context_recurse, gen_null2(), set_make(), set_pointer, and statement_domain.
set get_referenced_entities | ( | void * | elem | ) |
retrieves the set of entities used in elem
beware that this entities may be formal parameters, functions etc so consider filter this set depending on your need, using get_referenced_entities_filtered
elem | element to check (any gen_recursifiable type is allowded) |
elem | lem |
Definition at line 3063 of file entity.c.
References entity_not_constant_or_intrinsic_p(), gen_true(), and get_referenced_entities_filtered().
Referenced by C_loop_range(), check_private_variables_call_walker(), do_group_statement_constant_filter(), do_loop_expansion(), do_loop_nest_unswitching(), do_remove_redundant_communications_in_anyloop(), do_terapix_pointer_initialized_from_a_mask_p(), do_terapix_warmup(), entity_generate_missing_declarations(), fix_loop_index_sign(), for_to_do_loop_conversion(), gather_local_indices(), get_loop_locals_and_remove_walker(), get_private_entities(), guard_expanded_statement_if_needed(), inline_expression_call(), promote_local_entities(), prune_non_constant(), solve_name_clashes(), statements_conflict_p(), terapix_loop_handler(), terapix_loop_optimizer(), terapixify_loop_purge(), and terapixify_loops().
set get_referenced_entities_filtered | ( | void * | elem, |
bool(*)(void *) | chunk_filter, | ||
bool(*)(entity) | entity_filter | ||
) |
Same as get_referenced_entities, but will only consider entities that fulfills entity_filter
and will only enter consider entities directly involved in object matching chunk_filter
\/!\ if you strip out statements, it will not consider declared entities, but it will consider their initial value.
if elem is an entity it self, add it
gather entities from elem
gather all entities referenced by referenced entities
not merged with earlier test to avoid infinite recursion
elem | lem |
Definition at line 2982 of file entity.c.
References area_domain, call_domain, do_get_referenced_entities_on_area(), do_get_referenced_entities_on_call(), do_get_referenced_entities_on_loop(), do_get_referenced_entities_on_ram(), do_get_referenced_entities_on_reference(), do_get_referenced_entities_on_statement(), ENTITY, entity_initial, entity_module_p(), entity_type, FOREACH, gen_chunk_undefined_p, gen_context_multi_recurse(), gen_free_list(), gen_true(), INSTANCE_OF, loop_domain, ram_domain, reference_domain, set_add_element(), set_free(), set_make(), set_pointer, set_to_list(), set_union(), statement_domain, and value_undefined_p.
Referenced by do_get_referenced_entities_on_statement(), do_group_statement_constant_prune(), get_referenced_entities(), module_to_value_mappings(), outliner_independent_recursively(), outliner_statements_referenced_entities(), sort_entities_with_dep(), and statement_clean_declarations_helper().
entity get_stderr_entity | ( | void | ) |
Definition at line 1220 of file entity.c.
References set_std_static_entities(), and stderr_ent.
Referenced by stderr_entity_p().
entity get_stdin_entity | ( | void | ) |
Definition at line 1197 of file entity.c.
References set_std_static_entities(), and stdin_ent.
Referenced by stdin_entity_p().
entity get_stdout_entity | ( | void | ) |
Definition at line 1209 of file entity.c.
References set_std_static_entities(), and stdout_ent.
Referenced by stdout_entity_p().
entity global_name_to_entity | ( | const char * | name | ) |
Find an entity, if it exists, from its global name, a.k.a.
its entity name.
Let's avoid Newgen interface, gen_find_tabulated(), in PIPS passes.
name | ame |
Definition at line 1516 of file entity.c.
References entity_domain, and gen_find_tabulated().
Definition at line 1272 of file entity.c.
References entity_initial, value_intrinsic_p, and value_undefined_p.
Referenced by AddToCalledModules(), AddVariableToCommon(), CheckLeftHandSide(), CreateIntrinsic(), DeclareIntrinsic(), do_reduction_detection(), entity_intrinsic(), entity_not_constant_or_intrinsic_p(), FindOrCreateCurrentEntity(), gfc2pips_add_to_callees(), intrinsic_name_p(), logical_expression_to_transformer(), MakeCurrentFunction(), MakeCurrentModule(), MakeFunctionExpression(), SafeFindOrCreateEntity(), TypeFunctionalEntity(), UpdateEntity(), and UpdateFunctionEntity().
bool intrinsic_name_p | ( | const char * | local_name | ) |
local_name | ocal_name |
Definition at line 1282 of file entity.c.
References entity_undefined_p, FindEntity(), intrinsic_entity_p(), local_name(), and TOP_LEVEL_MODULE_NAME.
Several implicit entities are declared to define the implicit effects of IO statements.
Definition at line 1139 of file entity.c.
References io_eof_ent, io_error_luns_ent, io_ptr_ent, luns_ent, same_entity_p(), and set_internal_static_entities().
Referenced by check_io_statement_p(), com_call(), common_region_translation(), effects_package_entity_p(), and text_test().
rue is a statement s is an io intrinsic
ool statement_contains_io_intrinsic_call_p(statement s) { IoElementDescriptor *pid = IoElementDescriptorTable; bool found = false;
while ((pid->name != NULL) && (!found)) { if (strcmp(pid->name, s) == 0) { found = true; return true; } } return false; } true if e is an io instrinsic
ortran
Definition at line 1655 of file entity.c.
References BACKSPACE_FUNCTION_NAME, BUFFERIN_FUNCTION_NAME, CLOSE_FUNCTION_NAME, ENDFILE_FUNCTION_NAME, entity_intrinsic(), FCLOSE_FUNCTION_NAME, FOPEN_FUNCTION_NAME, FORMAT_FUNCTION_NAME, FPRINTF_FUNCTION_NAME, GETS_FUNCTION_NAME, INQUIRE_FUNCTION_NAME, io_functions_set, ISOC99_SCANF_FUNCTION_NAME, ISOC99_SCANF_USER_FUNCTION_NAME, ISOC99_SSCANF_FUNCTION_NAME, ISOC99_SSCANF_USER_FUNCTION_NAME, OPEN_FUNCTION_NAME, PRINTF_FUNCTION_NAME, PUTS_FUNCTION_NAME, READ_FUNCTION_NAME, REWIND_FUNCTION_NAME, SCANF_FUNCTION_NAME, set_add_elements(), set_belong_p(), set_make(), set_pointer, set_undefined_p, SNPRINTF_FUNCTION_NAME, SSCANF_FUNCTION_NAME, VFPRINTF_FUNCTION_NAME, VFSCANF_FUNCTION_NAME, and WRITE_FUNCTION_NAME.
Referenced by cse_atom_call_flt(), icm_atom_call_flt(), only_io_call(), static_controlize_statement(), and xml_Arguments().
Definition at line 1146 of file entity.c.
References luns_ent, same_entity_p(), and set_internal_static_entities().
Referenced by io_effect_entity_p().
Definition at line 399 of file entity.c.
References get_current_module_statement(), and label_defined_in_statement_p().
Definition at line 388 of file entity.c.
References check_statement_for_label(), entity_undefined, gen_null(), gen_recurse, label_defined_in_statement, label_searched_in_statement, and statement_domain.
Referenced by label_defined_in_current_module_p(), label_string_defined_in_current_module_p(), and label_string_defined_in_statement_p().
const char* label_local_name | ( | entity | e | ) |
END_EOLE.
Definition at line 604 of file entity.c.
References entity_name, LABEL_PREFIX, and local_name().
Referenced by c_unstructured(), CheckAndInitializeStmt(), clean_up_sequences_rewrite(), clear_label(), ensure_comment_consistency(), find_label_entity(), FixCInternalLabels(), full_loop_unroll(), generate_alternate_return_targets(), generate_return_code_checks(), inlining_regenerate_labels(), label_name_conflict_with_labels(), LinkInstToCurrentBlock(), loop_test(), MakeNewLabelledStatement(), module_loops_walker(), ReuseLabelledStatement(), rice_loop(), text_block_elseif(), text_block_if(), text_io_block_if(), text_trail(), and whileloop_test().
ll | l |
Definition at line 610 of file entity.c.
References empty_label_p(), ENTITY, FOREACH, and label_local_name().
Referenced by FixCInternalLabels().
ls | s |
Definition at line 407 of file entity.c.
References entity_undefined_p, find_label_entity(), get_current_module_name(), get_current_module_statement(), label_defined_in_statement_p(), and pips_assert.
Referenced by words_regular_call().
ls | s |
Definition at line 417 of file entity.c.
References find_label_entity(), get_current_module_name(), and label_defined_in_statement_p().
true if var1 <= var2
TCST is before anything else
else there are two entities
var1 | ar1 |
var2 | ar2 |
Definition at line 1365 of file entity.c.
References entity_local_name(), and TCST.
This test shows that "e" has been declared in "module".
Well, "e" may not be declared in "module". For instance, "e" may be a value of a variable declared in "module".
This does not show in Fortran that e is a variable with effects local to the module because e can be allocated in a common. Variables with local effects are allocated either in the static or the dynamic or the stack area.
Variables with effects lost on return are allocated either in the dynamic or stack areas. Effects on static variables may or not escape.
Of course, this predicate returns false for some variables declared in "module", extern variables for instance.
module | odule |
Definition at line 1069 of file entity.c.
References debug(), entity_module_name(), entity_name, module, module_local_name(), and same_string_p.
Referenced by AddCommonToModule(), array_bound_check_instrumentation(), do_linearize_prepatch(), do_scalar_renaming(), fix_loop_index_sign(), precondition_intra_to_inter(), promote_local_entities(), and simplify_dg().
string local_name_to_scope | ( | const char * | ln | ) |
allocates a new string
ln | n |
Definition at line 563 of file entity.c.
References BLOCK_SEP_CHAR, empty_scope(), pips_debug, string_undefined, and strndup().
Referenced by eov_add_entity_to_eliminate(), flatten_code(), make_statement_copy_i(), RenameFunctionEntity(), replicate_declaration(), and statement_flatten_declarations().
entity local_name_to_top_level_entity | ( | const char * | n | ) |
This function try to find a top-level entity from a local name.
@description Because of static C function, the entity returned is not always a top-level entity.
Extension with C: the scope of a module can be its compilation unit if this is a static module, not only TOP-LEVEL.
Definition at line 1450 of file entity.c.
References concatenate(), entity_domain, entity_undefined, entity_undefined_p, FILE_SEP, FindEntity(), free(), gen_find_tabulated(), module, MODULE_SEP_STRING, prefixes, PREFIXES_SIZE, static_module_name_p(), strdup(), and TOP_LEVEL_MODULE_NAME.
Referenced by add_new_module_from_text(), alias_check(), alias_classes(), alias_lists(), alias_pairs(), alias_propagation(), alias_propagation_callers(), aliases_text(), array_bound_check_bottom_up(), array_bound_check_instrumentation(), array_bound_check_interprocedural(), array_bound_check_top_down(), array_dfg(), atomizer(), build_real_resources(), chains(), common_is_visible_p(), comp_regions(), compute_constant(), continuation_conditions(), cumulated_reductions(), dag_normalize(), distributer(), do_it(), do_point_to(), filter_proper_effects(), flinter(), forward_substitute(), freia_copy_image(), freia_create_helper_function(), freia_ok(), freia_trpx_compile_one_dag(), generate_starpu_pragma(), get_any_comp_regions_text(), get_continuation_condition_text(), get_main(), GetFullyDefinedReturnCodeVariable(), global_parallelization(), gpu_promote_sequential(), guard_elimination(), hpfc_common(), ikernel_load_store(), image_free(), impact_check(), initialize_and_verify_common_variable(), insert_common_declaration(), insert_new_declarations(), instruction_selection(), internal_print_icfg(), invariant_code_motion(), kernel_data_mapping(), loop_statistics(), lower_bound_generation(), main(), make_array_entity(), make_div_expression(), make_global_entity_from_local(), make_movements_loop_body_wp65(), make_scalar_entity(), make_scalar_integer_entity(), make_scanning_over_tiles(), make_start_ru_module(), MakeComplexConstantExpression(), MakeEntryCommon(), missing_file_initializer(), module_entity_to_compilation_unit_entity(), module_name_to_entity(), module_to_callees(), mpi_task_generation(), mppa_call_helper(), new_local_image_variable(), old_array_bound_check_instrumentation(), opencl_compile_mergeable_dag(), opencl_generate_special_kernel_ops(), optimize_expressions(), partial_eval(), pocc_prettyprinter(), pragma_outliner(), prgm_mapping(), print_any_reductions(), print_code_points_to(), print_code_static_control(), print_dependence_or_chains_graph(), print_dot_dependence_or_chains_graph(), print_filtered_dg_or_dvdg(), print_loopnest_dependence_cone(), print_module_name_to_toposorts(), print_parallelizedCMF_code(), print_parallelizedCRAFT_code(), print_statement_of_module(), process_reduced_loops(), proper_reductions(), put_summary(), regions_to_loops(), reindexing(), remove_ghost_variable_entities(), remove_module_entity(), remove_variable_entity(), restructure_control(), rice(), rice_dependence_graph(), rstream_interface(), SaveEntity(), sc_delimiter(), scalopify(), scheduling(), sctc_call_rwt(), sesamify(), set_aipo_call(), set_resources_for_module(), single_assign(), spaghettify(), static_controlize(), step_analyse(), step_compile(), step_compile_analysed_module(), step_compile_generated_module(), step_parser(), string_to_user_modules(), summary_reductions(), switch_vertex_to_assign(), taskify(), test_bound_generation(), tiling_sequence(), transformer_add_any_relation_information(), unspaghettify(), UpdateFormalStorages(), upper_bound_generation(), used_before_set(), and wrap_kernel_argument().
name | ame |
Definition at line 290 of file entity.c.
References BLOCKDATA_PREFIX, concatenate(), full_name, make_empty_module(), make_type_void(), MODULE_SEP_STRING, NIL, and TOP_LEVEL_MODULE_NAME.
Referenced by gfc2pips_symbol2entity().
name | ame |
Definition at line 275 of file entity.c.
References concatenate(), F95MODULE_PREFIX, full_name, language_fortran95_p, make_empty_module(), make_type_void(), MODULE_SEP_STRING, NIL, pips_assert, and TOP_LEVEL_MODULE_NAME.
Referenced by gfc2pips_symbol2entity().
name | ame |
Definition at line 283 of file entity.c.
References concatenate(), full_name, make_empty_module(), MODULE_SEP_STRING, and TOP_LEVEL_MODULE_NAME.
Referenced by atomic_function_of_operation(), freia_create_helper_function(), gfc2pips_symbol2entity(), MakeEntityFunction(), and MakeRunTimeSupportFunction().
The source language is not specified.
Might not work with C because of module_local_name. Also, the compilation unit is undefined.
It might be necessary to declare the four areas in code_declarations.
See also InitAreas() and init_c_areas(), which use global variables and hence cannot be used outside of the parsers. Beware of the consistency between this function and those two.
See also MakeCurrentFunction(), which is part of the Fortran parser.
FC: added to allow reintrance in HPFC
full_name | ull_name |
Definition at line 197 of file entity.c.
References ABSTRACT_LOCATION, AddEntityToDeclarations(), DYNAMIC_AREA_LOCAL_NAME, DynamicArea, entity_domain, ENTITY_DYNAMIC_AREA, ENTITY_HEAP_AREA, entity_initial, entity_kind, ENTITY_POINTER_DUMMY_TARGETS_AREA, ENTITY_STACK_AREA, ENTITY_STATIC_AREA, entity_storage, entity_type, entity_undefined, FindOrCreateEntity(), full_name, gen_find_tabulated(), HEAP_AREA_LOCAL_NAME, HeapArea, make_area(), make_code(), make_entity, make_functional(), make_sequence(), make_storage_rom(), make_type_area(), make_type_functional(), make_value_code(), make_value_unknown(), module_local_name(), NIL, pips_assert, pips_debug, POINTER_DUMMY_TARGETS_AREA_LOCAL_NAME, STACK_AREA_LOCAL_NAME, StackArea, STATIC_AREA_LOCAL_NAME, StaticArea, and strdup().
Referenced by make_empty_blockdata(), make_empty_f95module(), make_empty_function(), make_empty_program(), and make_empty_subroutine().
name | ame |
Definition at line 261 of file entity.c.
References concatenate(), full_name, MAIN_PREFIX, make_empty_module(), make_type_void(), MODULE_SEP_STRING, NIL, and TOP_LEVEL_MODULE_NAME.
Referenced by gfc2pips_symbol2entity(), hpfc_init(), and make_complexity_unknown().
name | ame |
Definition at line 268 of file entity.c.
References concatenate(), full_name, make_empty_module(), make_type_void(), MODULE_SEP_STRING, NIL, and TOP_LEVEL_MODULE_NAME.
Referenced by alias_check(), comEngine_generate_HRECode(), create_module_with_statement(), create_new_module_entity(), dimensions_to_dma(), generate_compact(), gfc2pips_symbol2entity(), make_array_communication_module(), make_dma_transfert(), make_host_and_node_modules(), make_HRE_empty_module(), make_scalar_communication_module(), make_start_ru_module(), make_wait_ru_module(), MakeRunTimeSupportSubroutine(), module_name_to_runtime_entity(), module_to_wp65_modules(), outliner(), and wrap_kernel_argument().
Create a copy of an entity, with (almost) identical type, storage and initial value if move_initialization_p is false, but with a slightly different name as entities are uniquely known by their names, and a different offset if the storage is ram (still to be done).
Entity e must be defined or the function core dumps.
Depending on its storage, the new entity might have to be inserted in code_declarations (done) and the memory allocation recomputed (not done).
Depending on the language, the new entity might have to be inserted in statement declarations. This is left up to the user of this function.
For C, name collisions with the compilation unit are not checked here. They are unlikely, but should be checked by the caller.
/param e entity to copy
Definition at line 2433 of file entity.c.
References entity_name, and generic_make_entity_copy_with_new_name().
Referenced by make_shuffle_statement().
entity make_entity_copy_with_new_name | ( | entity | e, |
string | global_new_name, | ||
bool | move_initialization_p | ||
) |
Create a copy of an entity, with (almost) identical type, storage and initial value if move_initialization_p is false, but with a slightly different name as entities are uniquely known by their names, and a different offset if the storage is ram (still to be done).
Entity e must be defined or the function core dumps.
Depending on its storage, the new entity might have to be inserted in code_declarations (done) and the memory allocation recomputed (not done).
Depending on the language, the new entity might have to be inserted in statement declarations. This is left up to the user of this function.
For C, name collisions with the compilation unit are not checked here. They are unlikely, but should be checked by the caller.
/param e entity to copy /param global_new_name new name wished /param move_initialization_p if true, also copy the initial value
global_new_name | lobal_new_name |
move_initialization_p | ove_initialization_p |
Definition at line 2463 of file entity.c.
References generic_make_entity_copy_with_new_name().
Referenced by clean_up_sequences_rewrite(), do_split_structure(), do_terapix_argument_handler(), outliner_patch_parameters(), recursive_rename_types(), redeclaration_enter_statement(), replace_indices_region(), replace_indices_region_com(), replicate_declaration(), and terapix_loop_handler().
entity make_entity_copy_with_new_name_and_suffix | ( | entity | e, |
string | global_new_name, | ||
bool | move_initialization_p | ||
) |
Create a copy of an entity, with (almost) identical type, storage and initial value if move_initialization_p is false, but with a slightly different name as entities are uniquely known by their names, and a different offset if the storage is ram (still to be done).
Entity e must be defined or the function core dumps.
Depending on its storage, the new entity might have to be inserted in code_declarations (done) and the memory allocation recomputed (not done).
Depending on the language, the new entity might have to be inserted in statement declarations. This is left up to the user of this function.
For C, name collisions with the compilation unit are not checked here. They are unlikely, but should be checked by the caller.
/param e entity to copy /param global_new_name new name wished /param move_initialization_p if true, also copy the initial value
global_new_name | lobal_new_name |
move_initialization_p | ove_initialization_p |
Definition at line 2495 of file entity.c.
References generic_make_entity_copy_with_new_name().
Referenced by clean_up_sequences_rewrite().
entity make_label | ( | const char * | module_name, |
const char * | local_name | ||
) |
module_name | odule_name |
local_name | ocal_name |
Definition at line 308 of file entity.c.
References entity_initial, entity_storage, entity_type, FindOrCreateEntity(), local_name(), make_constant_litteral(), make_storage_rom(), make_value_constant(), MakeTypeStatement(), module_name(), and type_undefined_p.
Referenced by Generate_C_ReturnLabel(), gfc2pips_int2label(), make_new_label(), and make_return_statement().
entity make_loop_label | ( | int __attribute__((unused)) | desired_number, |
entity | module | ||
) |
Definition at line 370 of file entity.c.
References make_new_label(), and module.
Referenced by array_scalar_access_to_bank_communication(), array_scalar_access_to_compute_communication(), bound_generation(), loop_nest_to_wp65_code(), make_scanning_over_one_tile(), and make_scanning_over_tiles().
This function creates a common for a given name in a given module.
This is an entity with the following fields : Example: SUBROUTINE SUB1 COMMON /FOO/ W1,V1
name = top_level:~name (TOP-LEVEL:~FOO) type = area with size = 8 [2*8], layout = NIL [SUB1:W,SUB1:V] storage = ram with function = module (TOP-LEVEL:SUB1) (first occurence ? SUB2,SUB3,..) section = TOP-LEVEL:~FOO (recursive ???) offset = undefined shared = NIL initial = unknown
The area size and area layout must be updated each time when a common variable is added to this common
name | ame |
mod | od |
Definition at line 1806 of file entity.c.
References COMMON_PREFIX, concatenate(), FindOrCreateEntity(), is_storage_ram, is_type_area, make_area(), make_code(), make_entity, make_language_fortran(), make_ram(), make_sequence(), make_storage(), make_type(), make_value_code(), MODULE_SEP_STRING, NIL, STATIC_AREA_LOCAL_NAME, StaticArea, strdup(), string_undefined, and TOP_LEVEL_MODULE_NAME.
Referenced by create_externalized_function_common(), gfc2pips_namespace(), and make_global_common_and_initialize().
This function creates a common variable in a given common in a given module.
This is an entity with the following fields : name = module_name:name (SUB1:W1) type = variable with basic = int, dimension = NIL storage = ram with function = module (TOP-LEVEL:SUB1) section = common (TOP-LEVEL:~FOO) offset = 0 shared = initial = unknown
The common must be updated with new area size and area layout
name | ame |
mod | od |
com | om |
Definition at line 1843 of file entity.c.
References concatenate(), is_storage_ram, is_type_variable, make_basic_int(), make_entity, make_ram(), make_storage(), make_type(), make_value_unknown(), make_variable(), module_local_name(), MODULE_SEP_STRING, NIL, and strdup().
This function returns a new label.
FI: do labels have to be declared?
FI: it's crazy; the name is usually derived from the entity by the caller and here the entity is retrieved from its name!
module | odule |
Definition at line 357 of file entity.c.
References entity_undefined_p, GENERATED_LABEL_MODULE_NAME, local_name(), make_label(), module, module_local_name(), module_name(), and new_label_local_name().
Referenced by do_clone_label(), do_loop_unroll_with_prologue(), flag_loop(), inline_expression_call(), inlining_regenerate_labels(), make_loop_label(), and MakeEntry().
|
static |
Add reference r only once
Definition at line 2818 of file entity.c.
References CONS, ENTITY, entity_initial, entity_storage, entity_type, gen_in_list_p(), deux_listes::le, deux_listes::lr, NIL, REFERENCE, reference_variable, storage_rom_p, type_functional_p, value_symbolic_p, and value_undefined_p.
Referenced by extract_references_from_declarations().
entity MakeCompilationUnitEntity | ( | const char * | name | ) |
This is useful for the C language only.
Normally, the storage must be rom but in order to store the list of entities declared with extern, we use the ram storage to put this list in ram_shared
name | ame |
Definition at line 1954 of file entity.c.
References compilation_unit_p(), entity_initial, entity_storage, entity_type, FindOrCreateEntity(), free_storage(), free_type(), free_value(), is_storage_rom, is_value_code, make_code(), make_functional(), make_language_c(), make_sequence(), make_storage(), make_type_functional(), make_type_unknown(), make_value(), NIL, pips_assert, storage_undefined_p, strdup(), TOP_LEVEL_MODULE_NAME, type_undefined_p, UU, and value_undefined_p.
Referenced by add_new_compilation_unit(), add_new_module_from_text(), MakeCurrentCompilationUnitEntity(), and outliner_independent().
Definition at line 1158 of file entity.c.
References malloc_effect_ent, same_entity_p(), and set_internal_static_entities().
Referenced by effects_package_entity_p(), malloc_cell_p(), malloc_effect_p(), and malloc_reference_p().
Its name must contain the MEMBER_PREFIX after the MODULE_SEP_STRING
Definition at line 1921 of file entity.c.
References entity_name, MEMBER_SEP_CHAR, and MODULE_SEP.
Referenced by FindOrCreateCurrentEntity(), skip_constants_intrinsics_members(), and update_unstructured_declarations().
Definition at line 1165 of file entity.c.
References memmove_effect_ent, same_entity_p(), and set_internal_static_entities().
Referenced by effects_package_entity_p().
const char* module_local_name | ( | entity | e | ) |
Returns the module local user name.
No difference between modules and other entities, except for prefixes
Definition at line 582 of file entity.c.
References BLOCKDATA_PREFIX, COMMON_PREFIX, entity_name, F95MODULE_PREFIX, local_name(), and MAIN_PREFIX.
Referenced by add_alias_pairs_for_this_caller(), add_common_variables_to_hash_table(), add_declaration_information(), add_entity_to_declarations(), add_formal_parameters_to_hash_table(), add_formal_to_actual_bindings(), add_module_call_site_precondition(), add_non_declared_reference_to_declaration(), add_symbolic_constant_to_declaration(), AddEntityToCompilationUnit(), AddEntityToModule(), AddVariableToCommon(), alias_check_two_variables(), alias_propagation_callers(), allocatable_area_p(), AnalyzeData(), argument_bound_entity(), c_convex_effects_on_actual_parameter_forward_translation(), c_data_to_prec_for_variables(), c_user_function_call_to_transformer(), call_flt(), call_site_to_module_precondition_text(), call_to_complexity(), call_to_polynome(), cell_reference_compare(), check_call_mode_consistency(), check_one_common(), check_overlap_in_common(), common_is_visible_p(), common_region_translation(), comp_regions_of_call(), comp_regions_of_instruction(), compile_a_pure_function(), compile_a_special_io_function(), complexity_sigma(), constant_entity_to_float(), constant_to_transformer(), create_init_common_param_for_arrays(), create_local_index(), create_local_index2(), create_new_common_variable(), create_parameters_h(), create_tile_basis(), declare_common_variables_in_module(), DeclareExternalFunction(), DeclareVariable(), delay_communications_init(), delay_communications_interprocedurally(), do_kernelize(), do_linearize_array_manage_callers(), do_recompile_module(), dynamic_area_p(), EndOfProcedure(), entity_more_or_less_minimal_name(), evaluate_var_to_complexity(), external_statement_identification(), external_value_name(), find_operator(), fix_storage(), float_constant_to_double(), formal_and_actual_parameters_association(), formal_area_p(), fortran_data_to_prec_for_variables(), fortran_user_call_to_transformer(), fortran_user_function_call_to_transformer(), fprint_any_environment(), generate_variable_with_unique_name_to_module(), generic_module_name_to_transformers(), generic_program_pointer_values(), GenericAddLocalEntityToDeclarations(), get_current_module_name(), get_module_precondition(), get_symbol_table(), gfc2pips_namespace(), heap_area_p(), hpfc_common_hook(), hpfc_entity_reduction_p(), hpfc_main_entity_name(), impact_check_two_variables(), in_regions_of_external(), initialize_and_verify_common_variable(), initialize_and_verify_local_variable(), inlining_regenerate_labels(), insert_check_alias_before_statement(), insert_common_declaration(), insert_flag_before_call_site(), insert_test_before_caller(), insert_test_before_statement(), instruction_to_wp65_code(), is_must_be_written_var(), kernel_load_store_generator(), language_module_p(), live_out_paths_from_caller_to_callee(), live_out_summary_paths_engine(), load_body_effects(), load_summary_effects(), load_summary_precondition(), load_summary_reductions(), load_summary_total_postcondition(), load_summary_transformer(), local_entity_of_module_p(), loop_to_complexity(), main_summary_precondition(), make_empty_module(), make_emulated_shared_variable(), make_new_array_variable_with_prefix(), make_new_derived_entity_with_prefix(), make_new_entity(), make_new_integer_scalar_common_variable(), make_new_label(), make_new_local_variables(), make_new_module_variable(), make_new_scalar_variable_with_prefix(), make_nlc_entity(), make_nsp_entity(), make_nub_entity(), make_scanning_over_one_tile(), make_scanning_over_tiles(), MakeCurrentFunction(), MakeEntry(), MakeEntryCommon(), MakeEquivAtom(), MakeVariableStatic(), module_entity_to_compilation_unit_entity(), module_is_called_by_main_program_p(), module_name_to_total_preconditions(), module_to_value_mappings(), module_to_wp65_modules(), mpi_make_ctx(), new_add_formal_to_actual_bindings(), new_label_local_name(), new_local_image_variable(), noms_var(), old_name(), out_regions_from_caller_to_callee(), parser_macro_expansion(), phrase_comEngine_distributor(), phrase_distributor(), phrase_distributor_control_code(), pointer_dummy_targets_area_p(), precondition_intra_to_inter(), print_call_path(), print_common_layout(), print_module_icfg(), print_program_precondition(), process_call_for_summary_precondition(), ProcessEntries(), ProcessEntry(), program_points_to(), program_postcondition(), program_precondition(), put_generated_resources_for_common(), put_generated_resources_for_module(), pvecteur_to_polynome(), reduction_parameters(), reference_to_complexity(), reference_to_polynome(), regions_of_external(), relation_to_transformer(), remove_common_variables_from_hash_table(), remove_formal_parameters_from_hash_table(), remove_from_called_modules(), RemoveEntityFromCompilationUnit(), replace_indices_region(), replace_indices_region_com(), retype_formal_parameters(), safescale_distributor(), sc_add_new_variable_name(), sentence_area(), sentence_data_statement(), set_control_to_label(), set_current_function(), set_resources_for_module(), simplify_sc_to_complexity(), stack_area_p(), statement_identification(), statement_to_complexity(), static_area_p(), string_to_entity(), stub_head(), substitute_ghost_variable_in_expression(), text_area_included(), text_complexity(), text_summary_complexity(), Tiling_buffer_allocation(), transformer_add_call_condition_information_updown(), translate_global_value(), translate_to_module_frame(), TranslateEntryFormals(), unique_entity_name_p(), update_common_layout(), update_common_sizes(), update_functional_type_with_actual_arguments(), update_precondition_with_call_site_preconditions(), update_summary_precondition(), update_user_common_layouts(), UpdateFunctionalType(), user_call_to_points_to_fast_interprocedural(), user_call_to_points_to_interprocedural(), user_call_to_points_to_interprocedural_binding_set(), variable_in_module_p(), variable_in_module_p2(), verify_used_before_set_expression(), verify_used_before_set_statement_flt(), and wrap_call_argument().
entity module_name_to_entity | ( | const char * | mn | ) |
This is an alias for local_name_to_top_level_entity.
mn | n |
Definition at line 1479 of file entity.c.
References local_name_to_top_level_entity().
Referenced by actual_symbol_table_dump(), add_control_counters(), add_new_module_from_text(), any_complexities(), array_expansion(), bdsc_code_instrumentation(), build_new_top_level_module_name(), clean_declarations(), clean_labels(), clear_pragma(), clone_variable_with_new_name(), common_region_translation(), compilation_unit_of_module(), computation_intensity(), compute_distribution_controlization_context(), controlize_distribution(), controlizer(), copy_value_of_write(), copy_value_of_write_with_cumulated_regions(), create_HRE_module(), create_state_variable(), create_stub_entity(), deatomizer(), delay_communications(), delay_communications_interprocedurally(), delay_load_communications(), delay_store_communications(), dimensions_to_dma(), do_gpu_qualify_pointers(), do_inlining(), dowhile_to_while(), dprint(), dsc_code_parallelization(), eliminate_original_variables(), entity_to_callees(), entity_to_module_entity(), expression_substitution(), fetch_callees_complexities(), flag_loops(), flatten_code(), for_loop_to_do_loop(), for_loop_to_while_loop(), formal_array_resizing_bottom_up(), freia_compiler(), freia_remove_scalar_ww_deps(), freia_unroll_while(), fsm_generation(), fsm_merge_states(), fsm_split_state(), full_fsm_generation(), full_spaghettify(), full_unroll(), full_unroll_pragma(), gen_multi_recurse_explorer(), generate_two_addresses_code(), generic_make_entity_copy_with_new_name(), generic_module_initial_pointer_values(), generic_module_name_to_transformers(), generic_module_pointer_values(), generic_points_to_analysis(), generic_print_code_pv(), generic_print_xml_application(), generic_program_pointer_values(), get_loop_execution_parallel(), get_module_language(), get_semantic_text(), get_text_complexities(), gpu_qualify_pointers(), gpu_xml_dump(), group_constants(), hbdsc_parallelization(), hpfc_compile(), hpfc_directives_handler(), html_prettyprint(), if_conversion(), if_conversion_compact(), if_conversion_init(), init_convex_in_out_regions(), init_convex_rw_regions(), init_convex_summary_in_out_regions(), init_convex_summary_rw_regions(), init_points_to_analysis(), initial_points_to(), initial_precondition(), inline_calls(), inline_expression_call(), interactive_loop_transformation(), isolate_statement(), kernel_load_store_engine(), kernelize(), linearize_array_generic(), live_in_summary_paths_engine(), live_out_region_engine(), live_out_summary_paths_engine(), live_paths_engine(), loop_auto_unroll(), loop_expansion(), loop_expansion_init(), loop_nest_unswitching(), loop_pragma(), make_dma_transfert(), make_location_entity(), make_new_index_entity(), make_scalar_entity(), MakeRunTimeSupportSubroutine(), module_is_called_by_main_program_p(), module_loops(), module_name_to_input_file_name(), module_name_to_preconditions(), module_name_to_runtime_entity(), module_name_to_total_preconditions(), module_to_value_mappings(), mpi_conversion(), mpi_task_generation(), new_atomizer(), new_controlizer(), normalize_microcode(), omp_loop_parallel_threshold_set(), omp_merge_pragma(), one_thread_parallelize(), openmp_task_generation(), ordinary_summary_precondition(), outline(), outliner_independent(), outliner_independent_recursively(), outliner_scan(), phrase_comEngine_distributor(), phrase_distributor(), phrase_distributor_control_code(), phrase_distributor_init(), phrase_remove_dependences(), print_code_or_source(), print_code_or_source_comp(), print_code_semantics(), print_code_smalltalk(), print_crough(), print_decorated_call_graph(), print_initial_precondition(), print_interface(), print_loops(), print_or_dump_points_to(), print_parallelized_code_common(), print_points_to_cells(), print_program_precondition(), print_xml_code(), print_xml_code_with_explicit_motif(), program_points_to(), program_postcondition(), program_precondition(), recompile_module(), reduction_atomization(), reduction_detection(), reduction_propagation(), redundant_load_store_elimination(), remove_simple_scalar_pointers(), rename_operator(), run_inlining(), safescale_distributor(), safescale_distributor_init(), safescale_module_analysis(), scalar_renaming(), sequence_dependence_graph(), sesamify(), set_loop_execution_parallel(), simd_atomizer(), simd_memory_packing(), simd_remove_reductions(), simdizer(), simdizer_auto_tile(), simdizer_auto_unroll(), simdizer_init(), simplify_complex(), simplify_constant_address_expressions(), simplify_subscripts(), solve_hardware_constraints(), spire_distributed_unstructured_to_structured(), spire_shared_unstructured_to_structured(), split_initializations(), split_structures(), split_update_operator(), statement_insertion(), statement_insertion_fix_access_in_callers(), static_controlize(), step_compile_generated_module(), strip_mine(), summary_precondition(), summary_total_postcondition(), symbolic_tiling(), task_mapping(), terapix_remove_divide(), terapix_warmup(), type_checker(), unroll(), update_referenced_entities(), variable_replication(), wp65(), wrap_kernel_argument(), xml_Application(), xml_Boxes(), and xml_Task().
entity module_name_to_runtime_entity | ( | const char * | name | ) |
similar to module_name_to_entity but generates a warning and a stub if the entity is not found
name | ame |
Definition at line 1485 of file entity.c.
References copy_language(), entity_undefined_p, get_current_module_entity(), make_empty_subroutine(), module_language, module_name_to_entity(), and pips_user_warning.
Referenced by comEngine_generate_procCode(), generate_fifo_stat(), make_exec_mmcd(), make_exec_statement_from_name(), make_mmcd_load_store_stat(), make_phi_assign_instruction(), make_read_write_fifo_stat(), make_shuffle_statement(), and make_wait_step_statement().
const char* module_resource_name | ( | entity | e | ) |
Returns a pointer towards the resource name.
The resource name is the module local name: it may include the
Definition at line 593 of file entity.c.
References BLOCKDATA_PREFIX, COMMON_PREFIX, entity_local_name(), F95MODULE_PREFIX, and MAIN_PREFIX.
Referenced by callgraph_module_name(), and module_to_callgraph().
char* new_label_local_name | ( | entity | module | ) |
loop
module | odule |
Definition at line 326 of file entity.c.
References asprintf, c_module_p(), entity_undefined, entity_undefined_p, FindEntity(), free(), GENERATED_LABEL_MODULE_NAME, init, LABEL_PREFIX, local_name(), module, module_local_name(), module_name(), pips_assert, and pips_internal_error.
Referenced by make_new_label(), set_control_to_label(), and text_io_block_if().
op | p |
Definition at line 2593 of file entity.c.
References AND_OPERATOR_NAME, BITWISE_AND_OPERATOR_NAME, BITWISE_AND_UPDATE_OPERATOR_NAME, BITWISE_OR_OPERATOR_NAME, BITWISE_OR_UPDATE_OPERATOR_NAME, DIVIDE_UPDATE_OPERATOR_NAME, entity_undefined, entity_user_name(), LEFT_SHIFT_UPDATE_OPERATOR_NAME, make_integer_constant_entity(), MAX_OPERATOR_NAME, MIN_OPERATOR_NAME, MINUS_UPDATE_OPERATOR_NAME, MULTIPLY_OPERATOR_NAME, MULTIPLY_UPDATE_OPERATOR_NAME, OR_OPERATOR_NAME, pips_user_warning, PLUS_C_OPERATOR_NAME, PLUS_OPERATOR_NAME, PLUS_UPDATE_OPERATOR_NAME, RIGHT_SHIFT_UPDATE_OPERATOR_NAME, and same_string_p.
Referenced by partial_eval_binary_operator().
Definition at line 2121 of file entity.c.
References f(), is_mode_reference, and parameter_passing_mode_p().
Definition at line 2116 of file entity.c.
References f(), is_mode_value, and parameter_passing_mode_p().
Returns true when f has no parameters.
Calls thru pointers require syntax_application
It is assumed that all parameters are passed the same way, either by valule or by reference
We are in trouble... because we have to call a higher-level function from the preprocessor library.
Definition at line 2089 of file entity.c.
References c_module_p(), CAR, ENDP, entity_type, f(), functional_parameters, int, is_mode_reference, is_mode_value, mode_tag, PARAMETER, parameter_mode, pips_assert, type_functional, type_functional_p, and ultimate_type().
Referenced by parameter_passing_by_reference_p(), and parameter_passing_by_value_p().
return true if e has a pointer-type array declarator (the upper bound of the last dimension is equal to 1: REAL A(1) )
Definition at line 826 of file entity.c.
References dimension_upper, entity_type, entity_variable_p, exp, expression_equal_integer_p(), find_ith_dimension(), gen_length(), NIL, type_variable, and variable_dimensions.
Referenced by array_size_stride(), and unnormalized_array_p().
void print_entities | ( | list | l | ) |
Definition at line 167 of file entity.c.
References ENTITY, entity_name, FOREACH, and fprintf().
Referenced by actual_c_parser(), add_prettyprint_control_list_to_declaration_statement(), alias_propagation(), basic_supporting_entities(), basic_supporting_types(), c_code_string(), clean_up_sequences_rewrite(), compilation_unit_text(), controlize(), controlize_list(), copy_from_call(), copy_from_test(), cusq_ctxt_init(), enum_supporting_entities(), filtered_declaration_list(), find_enum_of_member(), generic_constant_expression_supporting_entities(), initialized_by_equivalent_variable_p(), insert_common_declaration(), kernel_data_mapping(), loop_nest_to_local_variables(), loop_private_variables_as_entites(), MakeBlock(), merge_on_outer(), module_declarations(), outliner_scan(), outliner_statements_referenced_entities(), recursive_functional_type_supporting_entities(), recursive_functional_type_supporting_types(), recursive_type_supporting_entities(), recursive_type_supporting_types(), redeclaration_enter_statement(), region_dynamic_var_elim(), region_exact_projection_along_parameters(), region_exact_projection_along_variables(), region_non_exact_projection_along_parameters(), region_non_exact_projection_along_variables(), regions_transformer_apply(), sesamify(), smalltalk_code_string(), TakeDerivedEntities(), transformer_formal_parameter_projection(), transformer_projection_with_redundancy_elimination_and_check(), transformer_return_value_projection(), update_referenced_entities(), update_unstructured_declarations(), UseFormalArguments(), variable_private_to_loop_p(), variable_type_supporting_entities(), variable_type_supporting_types(), and xml_code_string().
void print_entity_set | ( | set | s | ) |
For some reason, here entity is not capitalized.
Definition at line 174 of file entity.c.
References entity_name, fprintf(), and SET_FOREACH.
Definition at line 1152 of file entity.c.
References rand_gen_ent, same_entity_p(), and set_internal_static_entities().
Referenced by common_region_translation(), and effects_package_entity_p().
void register_static_entity | ( | entity * | e | ) |
add given entity to the set of entities that must reset upon workspace deletion practically, all static entities should be stored that way
Definition at line 156 of file entity.c.
References pips_assert, static_entity_cache, STATIC_ENTITY_CACHE_SIZE, and static_entity_size.
Referenced by entity_nowhere_locations(), and entity_null_locations().
void reset_internal_static_entities | ( | void | ) |
Definition at line 119 of file entity.c.
References continue_ent, entity_undefined, internal_static_entities_initialized_p, io_eof_ent, io_error_luns_ent, io_ptr_ent, luns_ent, malloc_effect_ent, memmove_effect_ent, rand_gen_ent, static_entity_cache, static_entity_size, and time_effect_ent.
Referenced by reset_static_entities().
void reset_label_counter | ( | void | ) |
Definition at line 322 of file entity.c.
References init.
Referenced by close_workspace(), ensure_comment_consistency(), fprint_statement(), print_statement_of_module(), and statement_to_text().
void reset_static_entities | ( | void | ) |
Definition at line 146 of file entity.c.
References reset_internal_static_entities(), and reset_std_static_entities().
Referenced by close_workspace(), create_workspace(), and open_workspace().
void reset_std_static_entities | ( | void | ) |
Definition at line 138 of file entity.c.
References entity_undefined, std_static_entities_initialized_p, stderr_ent, stdin_ent, and stdout_ent.
Referenced by reset_current_phase_context(), reset_static_entities(), and set_current_phase_context().
predicates and functions for entities
BEGIN_EOLE
Definition at line 433 of file entity.c.
References entity_domain, entity_domain_number, entity_name, entity_undefined_p, and string_undefined.
Referenced by dag_compute_outputs(), dagvtx_dump(), entity_list_dump(), entity_list_p(), IdentifierToExpression(), print_dependence_cone(), and print_loopnest_dependence_cone().
compare entity names
e1 | first entity |
e2 | second entity |
e1 | 1 |
e2 | 2 |
Definition at line 2208 of file entity.c.
References entity_name, and same_string_p.
Referenced by has_entity_with_same_name().
predicates on entities
e1 | 1 |
e2 | 2 |
Definition at line 1321 of file entity.c.
Referenced by _expression_similar_p(), abstract_locations_max(), alias_check(), alias_check_array_and_scalar_variable_in_caller_flt(), alias_check_array_and_scalar_variable_in_module_flt(), alias_check_array_variable_in_caller_flt(), alias_check_array_variable_in_module_flt(), alias_check_scalar_variable_in_caller_flt(), alias_check_scalar_variable_in_module_flt(), apply_farkas(), attach_ref_to_loop(), basic_concrete_types_compatible_for_effects_interprocedural_translation_p(), call_flt(), cell_reference_compare(), check_loop_distribution_feasability(), code_has_write_eff_ref_p(), common_is_visible_p(), compose_vvs(), compute_regions_union(), conflict_is_a_real_conflict_p(), controlize(), convert_pointer_to_array_aux(), convex_cell_reference_preceding_p(), convex_cells_inclusion_p(), convex_in_effect_loop_range_fix(), da_process_list(), di_polynome_var_subst_null(), distance_between_entity(), do_clone_label(), do_delay_communications_interprocedurally(), do_expression_reduction(), do_grouping_filter_out_self(), do_grouping_replace_reference_by_expression_walker(), do_isolate_statement_preconditions_satisified_p(), do_kernelize(), do_linearize_remove_dereferencment_walker(), do_outliner_smart_replacment(), do_reduction_propagation(), do_remove_entity_from_private(), do_scalar_renaming_in_successors(), do_split_structure_return_hook_walker(), do_terapix_argument_handler(), do_terapix_loop_optimizer(), do_terapix_pointer_initialized_from_a_mask_p(), do_terapix_warmup_patching(), dynamic_alias_check_flt(), effect_may_read_or_write_memory_paths_from_entity_p(), effects_to_dma(), entities_maymust_conflict_p(), entity_anywhere_locations_p(), entity_clean_declarations(), entity_continue_p(), entity_in_ref_list(), entity_local_variable_p(), entity_nowhere_locations_p(), entity_null_locations_p(), entity_used_in_calls_walker(), entity_used_in_reference_walker(), entity_written_p(), expand_reference(), expr_has_write_eff_ref_p(), find_calls_to_function_walker(), find_effect_actions_for_entity(), find_entity_macro(), find_region_on_entity(), find_statements_with_label_walker(), first_reference_certainly_includes_second_reference_p(), formal_variable_add_aliases(), free_to_post_pv(), gather_call_sites(), generic_basic_equal_p(), generic_effect_find_aliases_with_simple_pointer_values(), guess_loop_increment_walker(), guess_loop_lower_bound(), guess_write_effect_on_entity_walker(), impact_check(), index_of_a_loop_p(), indice_p(), interprocedural_mapping(), io_entity_p(), io_luns_entity_p(), is_entity_in_list_p(), isolate_patch_reference(), kill_pointer_value(), list_of_same_or_equivalence_arguments(), loadstore_type_conversion_string(), make_send_receive_conversion(), malloc_effect_entity_p(), memmove_effect_entity_p(), offset_of_struct(), old_prototype_factorize(), outline_remove_duplicates(), outliner_smart_references_computation(), partial_eval_binary_operator(), phrase_check_reference(), pointer_values_remove_var(), process_ref_list(), prototype_factorize(), prototype_var_subst(), rand_effects_entity_p(), real_regions_forward_translation(), references_may_conflict_p(), replace_entity_by_expression_expression_walker(), replace_field_by_reference_walker(), same_call_site_p(), same_callst_p(), same_entities(), same_section_common_variable_in_list_p(), same_section_formal_variable_in_list_p(), same_struct_entity_p(), sc_to_vvs(), set_array_dimension_checked(), simple_cell_reference_preceding_p(), simple_cells_inclusion_p(), simple_pv_translate(), simplify_complex_expression(), stat_has_write_eff_ref_p(), statement_has_omp_parallel_directive_p(), statement_phi_function_p(), std_file_entity_p(), stderr_entity_p(), stdin_entity_p(), stdout_entity_p(), storage_formal_offset(), substitute_entity_in_call(), substitute_expressions(), substitute_variable_in_reference(), successor_conflicts_on_entity_p(), terapix_loop_handler(), terapix_optimize_accumulator(), test_dependence_using_regions(), time_effect_entity_p(), top_down_abc_array(), top_down_abc_call(), translate_to_module_frame(), true_dependence_with_entity_p(), undo_rename_reference(), variable_entities_may_conflict_p(), variable_in_list_p(), variable_is_written_by_statement_flt(), variable_references_may_conflict_p(), vecteur_mult(), verify_formal_and_common_variables(), verify_used_before_set_call(), verify_used_before_set_expression(), verify_used_before_set_statement_flt(), vvs_on_polynome(), vvs_on_vvs(), words_points_to_reference(), xml_Pattern_Paving(), and xml_TaskParameter().
f1 | 1 |
f2 | 2 |
Definition at line 1019 of file entity.c.
References entity_type, entity_user_name(), f2(), same_string_p, and type_structurally_equal_p().
Referenced by reference_equal_p().
e0 | 0 |
e1 | 1 |
Definition at line 1012 of file entity.c.
References entity_field_to_entity_struct(), s1, and same_entity_p().
Referenced by distance_between_entity().
void set_internal_static_entities | ( | void | ) |
beware: cannot be called on creating the database
Definition at line 92 of file entity.c.
References continue_ent, CONTINUE_FUNCTION_NAME, FindOrCreateEntity(), FindOrCreateTopLevelEntity(), internal_static_entities_initialized_p, IO_EFFECTS_ARRAY_NAME, IO_EFFECTS_PACKAGE_NAME, IO_EFFECTS_PTR_NAME, IO_EOF_ARRAY_NAME, io_eof_ent, IO_ERROR_ARRAY_NAME, io_error_luns_ent, io_ptr_ent, luns_ent, malloc_effect_ent, MALLOC_EFFECTS_NAME, MALLOC_EFFECTS_PACKAGE_NAME, memmove_effect_ent, MEMMOVE_EFFECTS_NAME, MEMMOVE_EFFECTS_PACKAGE_NAME, RAND_EFFECTS_PACKAGE_NAME, RAND_GEN_EFFECTS_NAME, rand_gen_ent, time_effect_ent, TIME_EFFECTS_PACKAGE_NAME, and TIME_EFFECTS_VARIABLE_NAME.
Referenced by get_continue_entity(), io_entity_p(), io_luns_entity_p(), malloc_effect_entity_p(), memmove_effect_entity_p(), rand_effects_entity_p(), and time_effect_entity_p().
void set_register_qualifier | ( | entity | v | ) |
Assuming that v is of type variable, add a qualifier register.
Definition at line 778 of file entity.c.
References CONS, entity_register_p(), entity_type, gen_nconc(), make_qualifier_register(), NIL, pips_internal_error, QUALIFIER, type_variable, type_variable_p, and variable_qualifiers.
void set_std_static_entities | ( | void | ) |
beware: cannot be called on creating the database
entity.c
Definition at line 80 of file entity.c.
References FindEntity(), std_static_entities_initialized_p, stderr_ent, stdin_ent, stdout_ent, and TOP_LEVEL_MODULE_NAME.
Referenced by get_stderr_entity(), get_stdin_entity(), get_stdout_entity(), and std_file_entity_p().
void sort_list_of_entities | ( | list | l | ) |
sorted in place.
Definition at line 1358 of file entity.c.
References compare_entities(), and gen_sort_list().
Referenced by dump_common_layout(), entity_generate_missing_declarations(), loop_private_variables_as_entites(), loop_sort_locals(), print_C_common_layout(), print_common_layout(), update_common_sizes(), and update_user_common_layouts().
Definition at line 1232 of file entity.c.
References same_entity_p(), set_std_static_entities(), stderr_ent, stdin_ent, and stdout_ent.
Referenced by cumul_and_update_effects_of_statement(), declaration_to_post_pv(), references_may_conflict_p(), std_file_cell_p(), std_file_effect_p(), xml_Chain_Graph(), xml_Compute_and_Need(), xml_GlobalVariables(), xml_TaskParameters(), and xml_Type_Entity().
Dummy standard files targets.
Definition at line 1243 of file entity.c.
References asprintf, basic_pointer, EFFECTS_PACKAGE, entity_kind, entity_storage, entity_type, FindEntity(), FindOrCreateEntity(), FindOrCreateTopLevelEntity(), IO_EFFECTS_PACKAGE_NAME, is_storage_ram, make_ram(), make_storage(), NIL, STATIC_AREA_LOCAL_NAME, stdin_entity_p(), stdout_entity_p(), type_undefined_p, type_variable, and variable_basic.
Referenced by declaration_to_post_pv().
Definition at line 1226 of file entity.c.
References get_stderr_entity(), and same_entity_p().
Definition at line 1203 of file entity.c.
References get_stdin_entity(), and same_entity_p().
Referenced by com_call(), and std_file_entity_to_pointed_file_entity().
Definition at line 1215 of file entity.c.
References get_stdout_entity(), and same_entity_p().
Referenced by std_file_entity_to_pointed_file_entity().
Definition at line 2030 of file entity.c.
References pips_internal_error, storage_formal_p, storage_ram_p, storage_return_p, storage_rom_p, storage_undefined_p, and string_undefined.
Referenced by add_or_kill_equivalenced_variables(), and UpdateEntity().
Definition at line 511 of file entity.c.
References BLOCK_SEP_CHAR, and pips_debug.
Referenced by CreateEntityFromLocalNameAndPrefix(), CreateMemberScope(), EnterScope(), FindEntityFromLocalNameAndPrefix(), FindOrCreateCurrentEntity(), FindOrCreateEntityFromLocalNameAndPrefixAndScope(), pop_block_scope(), and scope_to_block_scope().
same kind of testing required for union as well
Full testing would require a module_name, a block_scope and a struct name
Just lookup the struct identifier
Definition at line 503 of file entity.c.
References MEMBER_SEP_CHAR.
of entity
module | the name of the module for the entities |
names | a string of comma-separated of entity names |
module | odule |
names | ames |
Definition at line 1887 of file entity.c.
References CONS, ENTITY, FindOrCreateEntity(), module, and NIL.
Definition at line 1277 of file entity.c.
References entity_initial, value_symbolic_p, and value_undefined_p.
Definition at line 2539 of file entity.c.
References gen_in_list_p(), and thread_safe_entities.
Referenced by AK_ignore_this_successor().
Definition at line 1170 of file entity.c.
References same_entity_p(), set_internal_static_entities(), and time_effect_ent.
Referenced by effects_package_entity_p().
Check if the scope of entity e is global.
People are likely to look for global_entity_p(), entity_global_p() or, slightly different, global_variable_p(), variable_global_p(), or still slightly different, global_function_p(),...
Definition at line 1130 of file entity.c.
References entity_module_name(), and TOP_LEVEL_MODULE_NAME.
Referenced by add_any_variable_to_area(), CCompilationUnitMemoryAllocations(), cell_out_of_scope_p(), cell_reference_compare(), common_region_translation(), ComputeAddresses(), create_stub_entity(), cumul_and_update_effects_of_statement(), CurrentOffsetOfArea(), dead_fcd_directive_p(), entity_to_module_entity(), fcd_directive_p(), fortran_library_entity_p(), generate_starpu_pragma(), hpf_directive_entity_p(), interprocedural_mapping(), match_call(), new_add_any_variable_to_area(), normalize_intrinsic(), NormalizeIntrinsic(), outliner_independent_recursively(), outliner_scan(), points_to_set_block_projection(), potential_out_effects_p(), realign_directive_p(), redistribute_directive_p(), SafeLocalToGlobal(), set_current_function(), source_to_sinks(), statements_localize_declarations(), translate_global_value(), update_common_layout(), update_referenced_entities(), UseFormalArguments(), xml_Chain_Graph(), xml_Compute_and_Need(), xml_GlobalVariables(), and xml_Region_Parameter().
check if e is used to declare one of the entities in entity list ldecl
e | entity to check |
ldecl | list of entities whose declaration may use e |
The dummy declaration may be hidden in a struct or a union declaration. Maybe it could also be hidden in a function declaration.
ldecl | decl |
Definition at line 2289 of file entity.c.
References ENTITY, entity_name, entity_struct_p(), entity_type, entity_union_p(), FOREACH, gen_free_list(), gen_in_list_p(), pips_debug, type_functional_p, and type_supporting_types().
Referenced by c_text_entities().
Its name must contain the TYPEDEF_PREFIX just after the MODULE_SEP_STRING and the scope information
If there is no scope information, use the module separator
Definition at line 1902 of file entity.c.
References BLOCK_SEP_CHAR, entity_name, MODULE_SEP, and TYPEDEF_PREFIX_CHAR.
Referenced by add_prettyprint_control_list_to_declaration_statement(), AddEntityToCompilationUnit(), analyzable_scalar_entity_p(), declarable_type_p(), declaration_to_post_pv(), do_clone_entity(), entity_for_value_mapping_p(), entity_module_p(), FindOrCreateCurrentEntity(), get_symbol_table(), outliner_independent_recursively(), RemoveDummyArguments(), RenameFunctionEntity(), this_entity_cdeclaration(), UpdateEntity(), UseDummyArguments(), UseFormalArguments(), and wipeout_entity().
return true if e is an assumed-size array or a pointer-type array
Definition at line 846 of file entity.c.
References assumed_size_array_p(), and pointer_type_array_p().
Referenced by formal_array_resizing_bottom_up().
Note that free_entity(dummy_identifier(d)) should be performed...
ep | p |
Definition at line 2072 of file entity.c.
References dummy_identifier, dummy_unknown_p, entity_name, free_dummy(), make_dummy_identifier(), parameter_dummy, and pips_debug.
Referenced by RemoveDummyArguments().
Returns the binary operator associated to a C update operator such as +=.
If the operator is unknown, an undefined entity is returned.
op | p |
Definition at line 2154 of file entity.c.
References BITWISE_AND_OPERATOR_NAME, BITWISE_OR_OPERATOR_NAME, BITWISE_XOR_OPERATOR_NAME, C_MODULO_OPERATOR_NAME, DIVIDE_OPERATOR_NAME, ENTITY_BITWISE_AND_UPDATE_P, ENTITY_BITWISE_OR_UPDATE_P, ENTITY_BITWISE_XOR_UPDATE_P, ENTITY_DIVIDE_UPDATE_P, entity_intrinsic(), ENTITY_LEFT_SHIFT_UPDATE_P, ENTITY_MINUS_UPDATE_P, ENTITY_MODULO_UPDATE_P, ENTITY_MULTIPLY_UPDATE_P, ENTITY_PLUS_UPDATE_P, ENTITY_RIGHT_SHIFT_UPDATE_P, entity_undefined, LEFT_SHIFT_OPERATOR_NAME, MINUS_C_OPERATOR_NAME, MULTIPLY_OPERATOR_NAME, PLUS_C_OPERATOR_NAME, and RIGHT_SHIFT_OPERATOR_NAME.
Referenced by any_update_to_transformer_list(), call_flt(), split_update_call(), update_operation_to_transformer(), and update_reflhs_with_rhs_to_transformer().
FI: hidden variables added to take into account the side effects in the libc.
Without them, dead code elimination would remove calls to rand or malloc. However, there is no useful information to be computed about them. Except perhard, the number of frees wrt the number of malloc. Hence, they are not taken into account by the semantics analysis.
This set may not be a superset of the set of thread-safe variables.
Definition at line 2555 of file entity.c.
Referenced by abstract_state_variable_p(), and add_abstract_state_variable().
|
static |
Definition at line 165 of file entity.c.
Referenced by arithmetic_intrinsic_p().
|
static |
continue statement
Definition at line 62 of file entity.c.
Referenced by get_continue_entity(), reset_internal_static_entities(), and set_internal_static_entities().
|
static |
Maximal value set for Fortran 77.
Definition at line 320 of file entity.c.
Referenced by add_loop_index_initialization(), add_ref_entities_in_init(), add_stat_called_in_inits(), any_loop_to_points_to(), C_comment_p(), c_forloop(), collect_glopriv_data(), dag_fix_image_reuse(), dag_or_cycle_to_flow_sensitive_postconditions_or_transformers(), do_split_structure(), effects_to_dma(), for_to_do_loop_conversion(), for_to_while_loop_conversion(), forloop_to_points_to(), forloop_to_post_pv(), freia_aipo_compile_calls(), freia_allocate_new_images_if_needed(), freia_mppa_compile_calls(), freia_opencl_compile_calls(), freia_terapix_call(), gen_read_spec(), gfc2pips_symbol2data_instruction(), global_source_to_sinks(), guess_late_read_effect_on_entity(), guess_loop_lower_bound(), hpfc_initsend(), init_points_to_context(), loop_to_points_to(), make_forloop_statement(), make_send_receive_conversion(), MakeForloop(), MakeForloopWithIndexDeclaration(), new_any_loop_to_points_to(), new_label_local_name(), put_generated_resources_for_program(), reset_label_counter(), sc_delimiter(), st_forloop(), step_directive_basic_workchunk_index(), and write_string().
Functions closely related to the entity class, constructors, predicates,...
Static variable to memoïze some entities for performance reasons variables to store internal entities created at bootstrap beware: these variables are intialized during the parser phase
Definition at line 50 of file entity.c.
Referenced by reset_internal_static_entities(), and set_internal_static_entities().
|
static |
Definition at line 58 of file entity.c.
Referenced by io_entity_p(), reset_internal_static_entities(), and set_internal_static_entities().
|
static |
Definition at line 59 of file entity.c.
Referenced by io_entity_p(), reset_internal_static_entities(), and set_internal_static_entities().
|
static |
Definition at line 164 of file entity.c.
Referenced by io_intrinsic_p().
|
static |
Definition at line 57 of file entity.c.
Referenced by io_entity_p(), reset_internal_static_entities(), and set_internal_static_entities().
Definition at line 377 of file entity.c.
Referenced by check_statement_for_label(), and label_defined_in_statement_p().
|
static |
Definition at line 378 of file entity.c.
Referenced by check_statement_for_label(), and label_defined_in_statement_p().
|
static |
Definition at line 56 of file entity.c.
Referenced by io_entity_p(), io_luns_entity_p(), reset_internal_static_entities(), and set_internal_static_entities().
|
static |
Definition at line 53 of file entity.c.
Referenced by malloc_effect_entity_p(), reset_internal_static_entities(), and set_internal_static_entities().
|
static |
Definition at line 54 of file entity.c.
Referenced by memmove_effect_entity_p(), reset_internal_static_entities(), and set_internal_static_entities().
|
static |
Definition at line 1433 of file entity.c.
Referenced by FindEntityFromLocalName(), local_name_to_top_level_entity(), NameToCommon(), and VASNPRINTF().
|
static |
effects package entities
Definition at line 52 of file entity.c.
Referenced by rand_effects_entity_p(), reset_internal_static_entities(), and set_internal_static_entities().
|
static |
Definition at line 76 of file entity.c.
Referenced by register_static_entity(), and reset_internal_static_entities().
|
static |
Definition at line 77 of file entity.c.
Referenced by register_static_entity(), and reset_internal_static_entities().
variables to store entities from standard includes
As they are not created at bootstrap as the internal entities, they cannot be initialized at the same time because the corresponding entities may not have been already created
Definition at line 69 of file entity.c.
Referenced by reset_std_static_entities(), and set_std_static_entities().
|
static |
Definition at line 73 of file entity.c.
Referenced by get_stderr_entity(), reset_std_static_entities(), set_std_static_entities(), and std_file_entity_p().
|
static |
stdio files entities
Definition at line 71 of file entity.c.
Referenced by get_stdin_entity(), reset_std_static_entities(), set_std_static_entities(), and std_file_entity_p().
|
static |
Definition at line 72 of file entity.c.
Referenced by get_stdout_entity(), reset_std_static_entities(), set_std_static_entities(), and std_file_entity_p().
FI: it is assumed that thread safe entities are invariant with respect to workspaces.
Another mechanism will be needed if user variables updated within a critical section also are added to the thread safe variable set.
Thread safe entities are supposed to be updated within critical sections. Hence their dependence arcs may be ignored during parallelization. There is not gaurantee that the semantics is unchanged, for isntance pointer values are likely to differ, but havoc should be avoided and the semantics of programs that are not dependent on pointer values should be preserved.
For the time begin, the set is implemented as a list because very few libc hidden variables are added.
Definition at line 2523 of file entity.c.
Referenced by add_thread_safe_variable(), and thread_safe_variable_p().
|
static |
Definition at line 55 of file entity.c.
Referenced by reset_internal_static_entities(), set_internal_static_entities(), and time_effect_entity_p().