PIPS
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "ri-util.h"
#include "prettyprint.h"
#include "effects-util.h"
#include "alias_private.h"
#include "database.h"
#include "pipsdbm.h"
#include "resources.h"
#include "misc.h"
#include "properties.h"
#include "effects-generic.h"
#include "instrumentation.h"
#include "text-util.h"
Go to the source code of this file.
Data Structures | |
struct | alias_context_t |
Macros | |
#define | PREFIX1 "$ALIAS_CHECK" |
TO AMELIORATE : for the moment, we only use trivial_expression_p to compare offsets + array sizes CAN TAKE MORE INFORMATION from array declarations, A(l:u) => u>l not precondtitions (corrupted) More... | |
#define | PREFIX2 "$ALIAS_CHECK_END" |
#define | ALIAS_FLAG "ALIAS_FLAG" |
#define | ALIAS_FUNCTION "DYNAMIC_ALIAS_CHECK" |
Typedefs | |
typedef struct alias_context_t * | alias_context_p |
Variables | |
static entity | current_mod = entity_undefined |
static entity | current_caller = entity_undefined |
static const char * | caller_name |
static call | current_call = call_undefined |
static list | l_module_aliases = NIL |
static statement | module_statement = statement_undefined |
static statement | current_statement = statement_undefined |
static int | current_ordering = 0 |
static FILE * | out |
static entity | alias_flag = entity_undefined |
static entity | alias_function = entity_undefined |
static list | l_dynamic_check = NIL |
This list tells us if two variables have been checked dynamically or not. More... | |
static int | unique_flag_number = 0 |
static int | number_of_tests = 0 |
static int | number_of_calls = 0 |
static int | number_of_processed_modules = 0 |
static bool | written = false |
static entity | current_entity = entity_undefined |
#define ALIAS_FLAG "ALIAS_FLAG" |
Definition at line 104 of file alias_check.c.
#define ALIAS_FUNCTION "DYNAMIC_ALIAS_CHECK" |
Definition at line 105 of file alias_check.c.
#define PREFIX1 "$ALIAS_CHECK" |
TO AMELIORATE : for the moment, we only use trivial_expression_p to compare offsets + array sizes CAN TAKE MORE INFORMATION from array declarations, A(l:u) => u>l not precondtitions (corrupted)
for words_to_string
Definition at line 102 of file alias_check.c.
#define PREFIX2 "$ALIAS_CHECK_END" |
Definition at line 103 of file alias_check.c.
typedef struct alias_context_t * alias_context_p |
bool alias_check | ( | char * | module_name | ) |
File instrument.out is used to store alias checks and flags
We do not add the line "INCLUDE alias_flags.h" into code_decls_text because of repeated bug for module with ENTRY. 09/11/2001 : do not add INCLUDE any more, because there are modules that do not need this INCLUDE => use script: if a module is modified => add INCLUDE line fprintf(out, "AC: %s (%d,%d)\n",module_local_name(current_mod),0,1); fprintf(out," INCLUDE 'alias_flags.h'\n"); fprintf(out, "ACEND \n");
if the list of alias associations of module is NIL, do nothing
Compute the list of direct and indirect callees of current module
Get the proper and cumulated effects of the module, we have to take both kinds of effects because of their difference for an elementary statement: V(I) = I => cumulated effect : <may be written> V(*) => proper effect : <must be written> V(I) If a cumulated effect for elementary statements = proper effect => we need only cumulated effect
Looking for another formal variable in the list of alias associations that has same section and included call path. If this variable is checked dynamically with e1 => no need to continue
Looking for common variables in module or callee of modules to check for alias violation ...
For this moment, only for common variable of module ========> add for chain of callees
Check for write on common variables in callee, keep call path also => to insert test
formal parameter has a same section with other common variable
If u1 is defined (different to -1) and u1<l2, there is no alias violation The same for: l1 is defined (different to -1) and u2<l1
The common variable always have a good offset off2
module_name | odule_name |
Definition at line 1994 of file alias_check.c.
References ALIAS_ASSOCIATION, alias_association_call_chain, alias_association_lower_offset, alias_association_offset, alias_association_section, alias_association_upper_offset, alias_association_variable, alias_associations_list, alias_check_two_variables(), ALIAS_FLAG, alias_flag, ALIAS_FUNCTION, alias_function, array_entity_p(), CAR, CDR, code_declarations, concatenate(), copy_language(), current_mod, db_get_current_workspace_directory(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, display_alias_check_statistics(), dynamic_checked_p(), ENDP, ENTITY, entity_code(), entity_domain, entity_name, entity_storage, entity_type, entity_undefined, entity_undefined_p, fprintf(), free(), gen_find_tabulated(), gen_length(), ifdebug, included_call_chain_p(), initialize_dynamic_check_list(), int_to_expression(), is_type_variable, l_dynamic_check, l_module_aliases, local_name_to_top_level_entity(), make_basic_logical(), make_empty_subroutine(), make_entity, make_type(), make_variable(), MAP, module_language, module_name(), MODULE_SEP_STRING, module_statement, NIL, number_of_processed_modules, out, pips_debug, print_list_of_alias_associations(), ram_offset, ram_section, reset_cumulated_rw_effects(), reset_current_module_entity(), reset_ordering_to_statement(), reset_proper_rw_effects(), safe_fclose(), safe_fopen(), same_entity_p(), set_cumulated_rw_effects(), set_current_module_entity(), set_ordering_to_statement(), set_proper_rw_effects(), SizeOfArray(), SizeOfElements(), statement_undefined, storage_ram, storage_undefined, strdup(), TOP_LEVEL_MODULE_NAME, type_variable, user_log(), value_undefined, variable_basic, and variable_in_common_p().
|
static |
Attention : <may be written> V(*,*) => what kind of indices ???
Translate subval2 to the frame of caller, in order to compare with offsets
off1 == ref2 is false => Okay, no write on aliased variable
k = 0 or 1
We can not translate subval to the frame of caller => use dynamic check
The variable is not in the list of write effects => OK
Definition at line 1231 of file alias_check.c.
References action_write_p, alias_flag, and_expression, approximation_exact_p, binary_intrinsic_expression, clean_all_normalized(), CONS, copy_expression(), current_call, current_caller, current_mod, EFFECT, effect_action, effect_any_reference, effect_approximation, eq_expression, EXPRESSION, expression_equal_integer_p(), expression_undefined_p, fprintf(), ifdebug, insert_check_alias_before_statement(), insert_test_before_caller(), insert_test_before_statement(), int_to_expression(), load_cumulated_rw_effects_list(), load_proper_rw_effects_list(), make_reference(), make_true_expression(), MAP, NIL, PLUS_OPERATOR_NAME, print_expression(), reference_indices, reference_to_expression(), reference_variable, same_entity_p(), same_expression_p(), simplify_relational_expression(), statement_call_p(), subscript_value_stride(), translate_to_module_frame(), trivial_expression_p(), true_expression_p(), and unique_flag_number.
Referenced by alias_check_scalar_and_array_variables_in_caller().
|
static |
Attention : <may be written> V(*,*) => what kind of indices ???
off1 == ref2 is false => Okay, no write on aliased variable
k = 0 or 1
The variable is not in the list of write effects => OK
Definition at line 696 of file alias_check.c.
References action_write_p, approximation_exact_p, binary_intrinsic_expression, clean_all_normalized(), copy_expression(), EFFECT, effect_action, effect_any_reference, effect_approximation, eq_expression, expression_equal_integer_p(), insert_test_before_statement(), int_to_expression(), load_cumulated_rw_effects_list(), load_proper_rw_effects_list(), make_true_expression(), MAP, NIL, PLUS_OPERATOR_NAME, reference_indices, reference_variable, same_entity_p(), same_expression_p(), simplify_relational_expression(), statement_call_p(), subscript_value_stride(), and trivial_expression_p().
Referenced by alias_check_scalar_and_array_variables_in_module().
|
static |
REATED ? CASE READ *,ARRAY
Attention : <may be written> V(*,*) => what kind of indices ???
Translate subval1 to the frame of caller, in order to compare with offsets
off2 <= ref1 is false => Okay, no write on aliased variable
Test of assumed-size array has been carried out before Translate size2 to the frame of caller, in order to compare with offsets
ref1 <= off2+size_stride2 is false => Okay, no write on aliased variable
k1 = 0 or 1, k2 = 0 or 1
We can not translate size2 to the frame of caller => create new common variable
We can not translate subval1 to the frame of caller => use dynamic check
The variable is not in the list of write effects => OK
Definition at line 1331 of file alias_check.c.
References action_write_p, alias_flag, and_expression, approximation_exact_p, array_size_stride(), binary_intrinsic_expression, clean_all_normalized(), CONS, copy_expression(), current_call, current_caller, current_mod, EFFECT, effect_action, effect_any_reference, effect_approximation, EXPRESSION, expression_equal_integer_p(), expression_undefined, expression_undefined_p, fprintf(), ge_expression, ifdebug, insert_check_alias_before_statement(), insert_test_before_caller(), insert_test_before_statement(), int_to_expression(), k1, k2, le_expression, load_cumulated_rw_effects_list(), load_proper_rw_effects_list(), make_reference(), make_true_expression(), MAP, NIL, pips_user_warning, PLUS_OPERATOR_NAME, print_expression(), reference_indices, reference_to_expression(), reference_variable, same_entity_p(), same_expression_p(), simplify_relational_expression(), statement_call_p(), subscript_value_stride(), translate_to_module_frame(), trivial_expression_p(), true_expression_p(), and unique_flag_number.
Referenced by alias_check_two_array_variables_in_caller().
|
static |
Attention : <may be written> V(*,*) => what kind of indices ???
off2 <= ref1 is false => Okay, no write on aliased variable
ref1 <= off2+size_stride2 is false => Okay, no write on aliased variable
k1 = 0 or 1, k2 = 0 or 1
The variable is not in the list of write effects => OK
Definition at line 773 of file alias_check.c.
References action_write_p, and_expression, approximation_exact_p, array_size_stride(), binary_intrinsic_expression, clean_all_normalized(), copy_expression(), EFFECT, effect_action, effect_any_reference, effect_approximation, expression_equal_integer_p(), ge_expression, insert_test_before_statement(), int_to_expression(), k1, k2, le_expression, load_cumulated_rw_effects_list(), load_proper_rw_effects_list(), make_true_expression(), MAP, NIL, PLUS_OPERATOR_NAME, reference_indices, reference_variable, same_entity_p(), same_expression_p(), simplify_relational_expression(), statement_call_p(), subscript_value_stride(), and trivial_expression_p().
Referenced by alias_check_two_array_variables_in_module().
|
static |
Definition at line 1788 of file alias_check.c.
References alias_check_scalar_and_array_variables_in_caller(), alias_check_two_array_variables_in_caller(), alias_check_two_scalar_variables_in_caller(), and entity_scalar_p().
Referenced by alias_check_two_variables().
|
static |
There are 3 cases:
Definition at line 1161 of file alias_check.c.
References alias_check_scalar_and_array_variables_in_module(), alias_check_two_array_variables_in_module(), alias_check_two_scalar_variables_in_module(), and entity_scalar_p().
Referenced by alias_check_two_variables().
|
static |
off2 <= off1 is false => Okay, no alias between these 2 variables
Translate size2 to the frame of caller, in order to compare with offsets
off1 <= off2+size_stride2 is false => Okay, no alias between these 2 variables
k1 = 0 or 1, k2 = 0 or 1 insert flag before each call site in call path and for the current caller, we add the condition
Attention: there are differences between scalar and array variables when adding test/flag before current statement and current caller. For array variable, we must take into account the ref (reference), it must be sure if this reference is written or not. So new flag is inserted to guarantee if the reference is written.
Assumed-size or pointer-type array, the size of dummy array can be derived from the size of actual argument, as we have the corresponding call chain
Definition at line 1546 of file alias_check.c.
References alias_check_array_and_scalar_variable_in_caller_flt(), alias_check_scalar_variable_in_caller_flt(), and_expression, array_size_stride(), binary_intrinsic_expression, CAR, CDR, clean_all_normalized(), copy_expression(), current_call, current_caller, current_mod, ENDP, entity_undefined, EXPRESSION, expression_equal_integer_p(), expression_list_to_conjonction(), expression_undefined, expression_undefined_p, fprintf(), gen_context_recurse, gen_null2(), ifdebug, insert_flag_before_call_site(), insert_test_before_caller(), int_to_expression(), k1, k2, le_expression, make_list_of_flags(), make_true_expression(), module_statement, NIL, pips_user_warning, PLUS_OPERATOR_NAME, same_expression_p(), simplify_relational_expression(), statement_domain, translate_to_module_frame(), trivial_expression_p(), and variable_is_written_p().
Referenced by alias_check_in_caller().
|
static |
off2 <= off1 is false => Okay, no alias between these 2 variables
off1 <= off2+size_stride2 is false => Okay, no alias between these 2 variables
k1 = 0 or 1, k2 = 0 or 1 insert flags before each call site in call path
Assumed-size or pointer-type array, the size of dummy array can be derived from the size of actual argument, as we have the corresponding call chain
Definition at line 955 of file alias_check.c.
References alias_check_array_and_scalar_variable_in_module_flt(), alias_check_scalar_variable_in_module_flt(), and_expression, array_size_stride(), binary_intrinsic_expression, clean_all_normalized(), copy_expression(), entity_undefined, expression_equal_integer_p(), expression_list_to_conjonction(), expression_undefined, expression_undefined_p, fprintf(), gen_context_recurse, gen_null2(), ifdebug, insert_flag_before_call_site(), int_to_expression(), k1, k2, le_expression, make_list_of_flags(), make_true_expression(), module_statement, NIL, pips_user_warning, PLUS_OPERATOR_NAME, same_expression_p(), simplify_relational_expression(), statement_domain, and trivial_expression_p().
Referenced by alias_check_in_module().
|
static |
The variable is not in the list of write effects => OK
Definition at line 1190 of file alias_check.c.
References action_write_p, approximation_exact_p, EFFECT, effect_action, effect_any_reference, effect_approximation, insert_test_before_statement(), load_cumulated_rw_effects_list(), load_proper_rw_effects_list(), make_true_expression(), MAP, NIL, reference_variable, same_entity_p(), and statement_call_p().
Referenced by alias_check_scalar_and_array_variables_in_caller(), and alias_check_two_scalar_variables_in_caller().
|
static |
The variable is not in the list of write effects => OK
Definition at line 654 of file alias_check.c.
References action_write_p, approximation_exact_p, EFFECT, effect_action, effect_any_reference, effect_approximation, insert_test_before_statement(), load_cumulated_rw_effects_list(), load_proper_rw_effects_list(), MAP, NIL, reference_variable, same_entity_p(), and statement_call_p().
Referenced by alias_check_scalar_and_array_variables_in_module(), and alias_check_two_scalar_variables_in_module().
|
static |
Translate size2 to the frame of caller, in order to compare with offsets
off1>off2+size_stride2 is true => Okay, no alias between these 2 variables
Translate size1 to the frame of caller, in order to compare with offsets
off2 > off1+size_stride1 is true => Okay, no alias between these 2 variables
insert flag before each call site in call path
Assumed-size or pointer-type array, the size of dummy array can be derived from the size of actual argument, as we have the corresponding call chain
Assumed-size or pointer-type array, the size of dummy array can be derived from the size of actual argument, as we have the corresponding call chain
Definition at line 1678 of file alias_check.c.
References alias_check_array_variable_in_caller_flt(), array_size_stride(), binary_intrinsic_expression, CDR, clean_all_normalized(), copy_expression(), current_call, current_caller, current_mod, ENDP, entity_undefined, expression_equal_integer_p(), expression_list_to_conjonction(), expression_undefined, expression_undefined_p, fprintf(), gen_context_recurse, gen_null2(), gt_expression, ifdebug, insert_flag_before_call_site(), k1, k2, make_list_of_flags(), make_true_expression(), module_statement, NIL, pips_user_warning, PLUS_OPERATOR_NAME, statement_domain, translate_to_module_frame(), and trivial_expression_p().
Referenced by alias_check_in_caller().
|
static |
off1> off2+size_stride2 is true => Okay, no alias between these 2 variables
off2 > off1+size_stride1 is true => Okay, no alias between these 2 variables
insert flags before each call site in call path
Assumed-size or pointer-type array, the size of dummy array can be derived from the size of actual argument, as we have the corresponding call chain
Assumed-size or pointer-type array, the size of dummy array can be derived from the size of actual argument, as we have the corresponding call chain
Definition at line 1062 of file alias_check.c.
References alias_check_array_variable_in_module_flt(), array_size_stride(), binary_intrinsic_expression, clean_all_normalized(), copy_expression(), entity_undefined, expression_equal_integer_p(), expression_list_to_conjonction(), expression_undefined, expression_undefined_p, fprintf(), gen_context_recurse, gen_null2(), gt_expression, ifdebug, insert_flag_before_call_site(), k1, k2, make_list_of_flags(), module_statement, NIL, pips_user_warning, PLUS_OPERATOR_NAME, statement_domain, and trivial_expression_p().
Referenced by alias_check_in_module().
|
static |
Should we use also formal and actual binding / precondition ???
off1 != off2 => Okay, no alias between these 2 variables
insert flags before each call site in call path and for the current caller, we add the condition
Definition at line 1481 of file alias_check.c.
References alias_check_scalar_variable_in_caller_flt(), CAR, CDR, clean_all_normalized(), entity_undefined, eq_expression, EXPRESSION, expression_list_to_conjonction(), expression_undefined, fprintf(), gen_context_recurse, gen_null2(), ifdebug, insert_flag_before_call_site(), insert_test_before_caller(), make_list_of_flags(), make_true_expression(), module_statement, NIL, simplify_relational_expression(), statement_domain, and trivial_expression_p().
Referenced by alias_check_in_caller().
|
static |
Should we use also formal and actual binding / precondition ???
off1 != off2 => Okay, no alias between these 2 variables
insert flags before each call site in call path
Definition at line 894 of file alias_check.c.
References alias_check_scalar_variable_in_module_flt(), clean_all_normalized(), entity_undefined, eq_expression, expression_list_to_conjonction(), expression_undefined, fprintf(), gen_context_recurse, gen_null2(), ifdebug, insert_flag_before_call_site(), make_list_of_flags(), make_true_expression(), module_statement, NIL, simplify_relational_expression(), statement_domain, and trivial_expression_p().
Referenced by alias_check_in_module().
|
static |
e1 or e2 is written => check for alias violation
As we do not have exact offsets of variables, we have to go to the caller's frame to check for alias violations. The direct caller is CAR(call_path) because of the following concatenation in alias_propagation: path = CONS(CALL_SITE,cs,gen_full_copy_list(alias_association_call_chain(aa)));
To find a call site from its ordering, we have to do a gen_recurse in the caller module.
Try with special cases : CALL FOO(R(TR(K)),R(TR(K))) ??????? Does this case exist when we create special section + offset for same actual arguments ???
use dynamic alias check
Definition at line 1918 of file alias_check.c.
References alias_check_in_caller(), alias_check_in_module(), CALL_SITE, call_site_function, call_site_ordering, call_undefined, caller_name, CAR, current_call, current_caller, current_ordering, current_statement, db_get_memory_resource(), dynamic_alias_check_flt(), entity_undefined, expression_undefined_p, gen_context_recurse, gen_null(), gen_null2(), gen_recurse, module_local_name(), module_statement, offset_in_caller(), pips_user_warning, search_statement_by_ordering_flt(), set_dynamic_checked(), statement_call(), statement_call_p(), statement_domain, statement_undefined, statement_undefined_p, and variable_is_written_p().
Referenced by alias_check().
|
static |
else return expression_undefined with assumed-size or pointer-type array
Definition at line 338 of file alias_check.c.
References assumed_size_array_p(), binary_intrinsic_expression, copy_expression(), dimension_lower, dimension_upper, entity_type, exp, expression_constant_p(), expression_to_int(), expression_undefined, expression_undefined_p, find_ith_dimension(), fprintf(), gen_length(), ifdebug, int_to_expression(), MINUS_OPERATOR_NAME, MULTIPLY_OPERATOR_NAME, PLUS_OPERATOR_NAME, pointer_type_array_p(), print_expression(), SizeOfElements(), type_variable, variable_basic, and variable_dimensions.
Referenced by alias_check_array_variable_in_caller_flt(), alias_check_array_variable_in_module_flt(), alias_check_scalar_and_array_variables_in_caller(), alias_check_scalar_and_array_variables_in_module(), alias_check_two_array_variables_in_caller(), alias_check_two_array_variables_in_module(), and dynamic_alias_check_flt().
|
static |
Definition at line 167 of file alias_check.c.
References number_of_calls, number_of_processed_modules, number_of_tests, unique_flag_number, and user_log().
Referenced by alias_check().
|
static |
Assumed-size or pointer-type array, the size of dummy array can not be derived from the size of actual argument as we have no corresponding call chain
The variable is not in the list of write effects => OK
Definition at line 603 of file alias_check.c.
References action_write_p, approximation_exact_p, array_entity_p(), array_size_stride(), EFFECT, effect_action, effect_any_reference, effect_approximation, expression_undefined_p, insert_check_alias_before_statement(), int_to_expression(), load_cumulated_rw_effects_list(), load_proper_rw_effects_list(), MAP, NIL, pips_user_warning, reference_indices, reference_variable, same_entity_p(), statement_call_p(), and subscript_value_stride().
Referenced by alias_check_two_variables().
Definition at line 209 of file alias_check.c.
References DYNAMIC_CHECK, dynamic_check_checked, dynamic_check_first, dynamic_check_second, l_dynamic_check, and MAP.
Referenced by alias_check().
This function returns true if c is an user-defined function/subroutine.
Definition at line 506 of file alias_check.c.
References call_function, and entity_module_p().
Referenced by variable_is_written_by_statement_flt().
l1 | 1 |
l2 | 2 |
Definition at line 246 of file alias_check.c.
References CALL_SITE, CAR, CDR, ENDP, and same_call_site_p().
Referenced by alias_check(), same_section_formal_variable_in_list_p(), and tail_call_path_p().
|
static |
search for formal parameters in the declaration list
Definition at line 175 of file alias_check.c.
References code_declarations, CONS, current_mod, DYNAMIC_CHECK, ENTITY, entity_code(), formal_parameter_p(), gen_nconc(), l_commons, l_dynamic_check, make_dynamic_check(), MAP, NIL, and variable_in_common_p().
Referenced by alias_check().
|
static |
Definition at line 563 of file alias_check.c.
References alias_function, call_to_statement, concatenate(), CONS, current_mod, db_get_directory_name_for_module(), db_get_memory_resource(), entity_local_name(), entity_to_expression(), EXPRESSION, file_name, fprint_statement(), fprintf(), free(), make_call(), MakeCharacterConstantExpression(), module_local_name(), NIL, number_of_calls, ORDERING_NUMBER, ORDERING_STATEMENT, out, pips_basename(), PREFIX1, PREFIX2, statement_ordering, strdup(), user_file, and WORKSPACE_SRC_SPACE.
Referenced by alias_check_array_and_scalar_variable_in_caller_flt(), alias_check_array_variable_in_caller_flt(), and dynamic_alias_check_flt().
Definition at line 428 of file alias_check.c.
References CALL_SITE, call_site_function, call_site_ordering, CAR, CDR, concatenate(), db_get_directory_name_for_module(), db_get_memory_resource(), ENDP, EXPRESSION, file_name, fprint_statement(), fprintf(), free(), make_assign_statement(), make_true_expression(), module_local_name(), ORDERING_NUMBER, ORDERING_STATEMENT, out, pips_basename(), PREFIX1, PREFIX2, strdup(), user_file, and WORKSPACE_SRC_SPACE.
Referenced by alias_check_scalar_and_array_variables_in_caller(), alias_check_scalar_and_array_variables_in_module(), alias_check_two_array_variables_in_caller(), alias_check_two_array_variables_in_module(), alias_check_two_scalar_variables_in_caller(), and alias_check_two_scalar_variables_in_module().
|
static |
Definition at line 458 of file alias_check.c.
References caller_name, concatenate(), current_caller, current_ordering, db_get_directory_name_for_module(), db_get_memory_resource(), file_name, fprint_statement(), fprintf(), free(), make_assign_statement(), make_block_statement(), make_test(), make_true_expression(), module_local_name(), NIL, number_of_tests, ORDERING_NUMBER, ORDERING_STATEMENT, out, pips_basename(), PREFIX1, PREFIX2, strdup(), test_to_statement, true_expression_p(), user_file, and WORKSPACE_SRC_SPACE.
Referenced by alias_check_array_and_scalar_variable_in_caller_flt(), alias_check_array_variable_in_caller_flt(), alias_check_scalar_and_array_variables_in_caller(), and alias_check_two_scalar_variables_in_caller().
|
static |
Definition at line 387 of file alias_check.c.
References and_expression, concatenate(), copy_expression(), current_mod, db_get_directory_name_for_module(), db_get_memory_resource(), entity_local_name(), file_name, fprint_statement(), fprintf(), free(), get_bool_property(), make_block_statement(), make_print_statement(), make_stop_statement(), make_test(), module_local_name(), NIL, number_of_tests, ORDERING_NUMBER, ORDERING_STATEMENT, out, pips_basename(), PREFIX1, PREFIX2, print_call_path(), statement_ordering, strdup(), test_to_statement, true_expression_p(), user_file, and WORKSPACE_SRC_SPACE.
Referenced by 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(), and alias_check_scalar_variable_in_module_flt().
Definition at line 484 of file alias_check.c.
References alias_flag, CONS, EXPRESSION, fprintf(), gen_length(), gen_nconc(), ifdebug, int, int_to_expression(), make_reference(), NIL, print_expression(), reference_to_expression(), and unique_flag_number.
Referenced by alias_check_scalar_and_array_variables_in_caller(), alias_check_scalar_and_array_variables_in_module(), alias_check_two_array_variables_in_caller(), alias_check_two_array_variables_in_module(), alias_check_two_scalar_variables_in_caller(), and alias_check_two_scalar_variables_in_module().
|
static |
compute the subscript value, return expression_undefined if if the actual argument is a scalar variable or array name
The actual argument has a ram storage
The actual argument is a formal parameter of the current caller, we must take the alias_associations of the caller
Definition at line 1877 of file alias_check.c.
References call_arguments, current_call, entity_name, entity_storage, expression_reference(), f(), find_ith_argument(), formal_offset, formal_parameter_p(), fprintf(), ifdebug, int_to_expression(), ram_offset, rank, reference_indices, reference_variable, storage_formal, storage_formal_offset(), storage_formal_p, storage_ram, storage_ram_offset(), storage_ram_p, and subscript_value_stride().
Referenced by alias_check_two_variables().
void print_alias_association | ( | alias_association | aa | ) |
aa | a |
Definition at line 301 of file alias_check.c.
References alias_association_call_chain, alias_association_lower_offset, alias_association_offset, alias_association_section, alias_association_upper_offset, alias_association_variable, entity_name, exp, fprintf(), print_call_path(), and print_expression().
Referenced by formal_variable_add_aliases(), print_list_of_alias_associations(), ram_variable_add_aliases(), and same_or_equivalence_argument_add_aliases().
This function prints the call path , including names of caller functions and orderings of call sites in their corresponding functions.
Definition at line 277 of file alias_check.c.
References CALL_SITE, call_site_function, call_site_ordering, CHAIN_SWORD, int2a(), MAP, module_local_name(), NIL, ORDERING_NUMBER, ORDERING_STATEMENT, and words_to_string().
Referenced by insert_test_before_statement(), and print_alias_association().
void print_list_of_alias_associations | ( | list | l | ) |
Definition at line 324 of file alias_check.c.
References ALIAS_ASSOCIATION, MAP, and print_alias_association().
Referenced by alias_check().
Definition at line 228 of file alias_check.c.
References call_site_function, call_site_ordering, f2(), and same_entity_p().
Referenced by included_call_chain_p(), and tail_call_path_p().
Definition at line 1908 of file alias_check.c.
References current_ordering, current_statement, and statement_ordering.
Referenced by alias_check_two_variables().
Definition at line 219 of file alias_check.c.
References DYNAMIC_CHECK, dynamic_check_checked, dynamic_check_first, dynamic_check_second, l_dynamic_check, and MAP.
Referenced by alias_check_two_variables().
expression simplify_relational_expression | ( | expression | e | ) |
If e is a relational expression
Definition at line 139 of file alias_check.c.
References binary_intrinsic_expression, call_arguments, call_function, CAR, CDR, entity_local_name(), EXPRESSION, expression_syntax, expression_undefined_p, int_to_expression(), NORMALIZE_EXPRESSION, normalized_linear, normalized_linear_p, Pvecteur_to_expression(), relational_expression_p(), syntax_call, vect_normalize(), and vect_substract().
Referenced by 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_and_array_variables_in_caller(), alias_check_scalar_and_array_variables_in_module(), alias_check_two_scalar_variables_in_caller(), and alias_check_two_scalar_variables_in_module().
|
static |
Definition at line 1838 of file alias_check.c.
References ALIAS_ASSOCIATION, alias_association_call_chain, alias_association_offset, alias_association_variable, alias_associations_list, binary_intrinsic_expression, caller_name, copy_expression(), db_get_memory_resource(), exp, expression_equal_integer_p(), expression_undefined, expression_undefined_p, MAP, PLUS_OPERATOR_NAME, same_entity_p(), and tail_call_path_p().
Referenced by offset_in_caller().
|
static |
Definition at line 1812 of file alias_check.c.
References binary_intrinsic_expression, copy_expression(), exp, expression_equal_integer_p(), int_to_expression(), PLUS_OPERATOR_NAME, ram_offset, and storage_ram.
Referenced by offset_in_caller().
Definition at line 265 of file alias_check.c.
References CALL_SITE, CAR, CDR, gen_length(), included_call_chain_p(), and same_call_site_p().
Referenced by storage_formal_offset().
This function returns true if the variable is written directly in the current module, not by its callees (do not take into account the effects on X,Y of statement like CALL FOO(X,Y))
Definition at line 518 of file alias_check.c.
References action_write_p, current_entity, EFFECT, effect_action, effect_any_reference, entity_name, fprintf(), functional_call_p(), ifdebug, load_proper_rw_effects_list(), MAP, reference_variable, same_entity_p(), statement_call(), statement_call_p(), and written.
Referenced by variable_is_written_p().
Definition at line 553 of file alias_check.c.
References current_entity, entity_undefined, gen_null(), gen_recurse, module_statement, statement_domain, variable_is_written_by_statement_flt(), and written.
Referenced by alias_check_scalar_and_array_variables_in_caller(), and alias_check_two_variables().
|
static |
Definition at line 129 of file alias_check.c.
Referenced by alias_check(), alias_check_array_and_scalar_variable_in_caller_flt(), alias_check_array_variable_in_caller_flt(), and make_list_of_flags().
|
static |
Definition at line 130 of file alias_check.c.
Referenced by alias_check(), and insert_check_alias_before_statement().
|
static |
Definition at line 122 of file alias_check.c.
Referenced by add_alias_pairs_for_this_caller(), alias_check_two_variables(), alias_pairs(), callers_to_statements(), delay_communications_interprocedurally(), do_inlining(), insert_test_before_caller(), kernel_load_store_engine(), live_out_paths_from_caller_to_callee(), live_out_summary_paths_engine(), module_is_called_by_main_program_p(), ordinary_summary_precondition(), out_regions_from_caller_to_callee(), run_inlining(), statement_insertion_fix_access_in_callers(), storage_formal_offset(), summary_total_postcondition(), verify_formal_and_common_variables(), and wrap_kernel_argument().
|
static |
Definition at line 123 of file alias_check.c.
Referenced by alias_check_array_and_scalar_variable_in_caller_flt(), alias_check_array_variable_in_caller_flt(), alias_check_scalar_and_array_variables_in_caller(), alias_check_two_array_variables_in_caller(), alias_check_two_variables(), and offset_in_caller().
|
static |
Definition at line 121 of file alias_check.c.
Referenced by alias_check_array_and_scalar_variable_in_caller_flt(), alias_check_array_variable_in_caller_flt(), alias_check_scalar_and_array_variables_in_caller(), alias_check_two_array_variables_in_caller(), alias_check_two_variables(), impact_check_two_variables(), insert_test_before_caller(), and module_is_called_by_main_program_p().
|
static |
Definition at line 513 of file alias_check.c.
Referenced by current_entity_is_updated_before_p(), current_entity_is_used_later_p(), variable_is_written_by_statement_flt(), and variable_is_written_p().
|
static |
Definition at line 120 of file alias_check.c.
Referenced by alias_check(), alias_check_array_and_scalar_variable_in_caller_flt(), alias_check_array_variable_in_caller_flt(), alias_check_scalar_and_array_variables_in_caller(), alias_check_two_array_variables_in_caller(), cell_reference_compare(), current_module(), initialize_dynamic_check_list(), insert_check_alias_before_statement(), and insert_test_before_statement().
|
static |
Definition at line 127 of file alias_check.c.
Referenced by alias_check_two_variables(), insert_test_before_caller(), and search_statement_by_ordering_flt().
|
static |
Definition at line 126 of file alias_check.c.
Referenced by alias_check_two_variables(), and search_statement_by_ordering_flt().
This list tells us if two variables have been checked dynamically or not.
Definition at line 132 of file alias_check.c.
Referenced by alias_check(), dynamic_checked_p(), initialize_dynamic_check_list(), and set_dynamic_checked().
Definition at line 124 of file alias_check.c.
Referenced by alias_check(), and impact_check().
|
static |
Definition at line 125 of file alias_check.c.
Referenced by add_pragma(), alias_check(), alias_check_scalar_and_array_variables_in_caller(), alias_check_scalar_and_array_variables_in_module(), alias_check_two_array_variables_in_caller(), alias_check_two_array_variables_in_module(), alias_check_two_scalar_variables_in_caller(), alias_check_two_scalar_variables_in_module(), alias_check_two_variables(), array_bound_check_bottom_up(), array_bound_check_interprocedural(), array_bound_check_top_down(), bottom_up_abc_statement(), copy_value_of_write(), copy_value_of_write_with_cumulated_regions(), copy_write_statement_with_cumulated_regions(), do_recompile_module(), do_scalar_renaming(), eliminate_original_variables(), enclose_in_a_parallel_loop(), finalization(), for_loop_to_do_loop(), for_loop_to_while_loop(), full_spaghettify_module(), gen_multi_recurse_explorer(), gpu_clear_annotations_on_loop_nest(), gpu_ify(), gpu_loop_nest_annotate(), gpu_memory(), gpu_parallelize_annotated_loop_nest(), gpu_xml_dump(), html_prettyprint(), initial_code_abc_statement(), initilization(), interprocedural_abc_statement(), live_out_region_engine(), live_paths_engine(), make_array_communication_module(), make_declaration_replication(), make_eliminate_original_variables(), make_mpi_conversion(), make_scalar_communication_module(), make_scalar_communication_modules(), make_start_ru_module(), make_task_mapping(), make_wait_ru_module(), module_clean_declarations(), mpi_conversion(), old__gpu_ify(), old_array_bound_check_instrumentation(), one_thread_parallelize(), partial_eval(), pips_code_abc_statement(), prepend_call(), prepend_comment(), replicate_declaration(), safescale_module_analysis(), scalopify(), scalopragma(), sesam_buffers_processing(), sesam_servers_processing(), simple_xpath_test(), statements_localize_declarations(), store_new_module(), task_mapping(), top_down_abc_statement(), variable_is_written_p(), and variable_replication().
|
static |
Definition at line 135 of file alias_check.c.
Referenced by display_alias_check_statistics(), and insert_check_alias_before_statement().
|
static |
Definition at line 136 of file alias_check.c.
Referenced by alias_check(), and display_alias_check_statistics().
|
static |
Definition at line 134 of file alias_check.c.
Referenced by display_alias_check_statistics(), insert_test_before_caller(), and insert_test_before_statement().
|
static |
Definition at line 128 of file alias_check.c.
Referenced by actual_symbol_table_dump(), alias_check(), apply_eole_on_statement(), atomize_this_expression(), basic_of_expressions(), boolean_intrinsic_call_condition_to_points_to(), brace_expression_to_statements(), call_condition_to_points_to(), condition_to_points_to(), control_to_points_to(), csplit(), cstrsplit(), cyclic_graph_to_points_to(), dag_append_freia_call(), dag_compute_outputs(), dag_dot(), dag_dot_dump(), dag_dump(), dag_terapix_measures(), dagvtx_copy_list_dot(), dagvtx_dot(), dagvtx_dot_node(), dagvtx_dump(), dagvtx_list_dot(), dagvtx_nb_dump(), davinci_dump_all_expressions(), davinci_dump_expression(), davinci_dump_expression_rc(), davinci_dump_expressions(), do_brace_expression_to_statements(), do_simdizer_auto_tile_int_to_list(), effects_to_dma(), entity_list_dump(), equal_condition_to_points_to(), expression_to_string(), expressions_to_vector(), extended_regions_must_convex_hull(), extract_matching_statements(), f95split(), filter_formal_out_context_according_to_formal_in_context(), fir(), freia_spoc_pipeline(), freia_terapix_call(), full_copy_pt_map(), full_copy_simple_pt_map(), full_graph_of_calls(), fuse_points_to_sink_cells(), gen_fprint(), generate_access_members(), generate_safe_definition(), generate_simd_code(), generate_struct_members(), generate_union_type_descriptor(), generate_wiring(), generic_print_xml_application(), get_eole_command(), get_statement_matching_types(), graph_of_calls(), guess_potential_reduction(), handle_file(), handle_file_name(), handle_include_file(), html_output(), insert_check_alias_before_statement(), insert_flag_before_call_site(), insert_test_before_caller(), insert_test_before_statement(), intrinsic_call_condition_to_points_to(), main(), make_shuffle_statement(), memory_leak_to_more_memory_leaks(), module_loops(), mppa_helper_args_params(), new_points_to_unstructured(), newgen_lexer_position(), node(), non_equal_condition_to_points_to(), null_equal_condition_to_points_to(), null_non_equal_condition_to_points_to(), order_condition_to_points_to(), order_isomorphic_statements_list(), outliner_patch_parameters(), pips_log_file(), pips_process_file(), pips_split_file(), pips_stop_file(), points_to_graph_assign(), points_to_to_context_points_to(), print_code_smalltalk(), print_crough(), print_domain(), print_domainlist(), print_domains(), print_interface(), print_number_of_loop_statistics(), print_op_schedule(), print_persistant(), print_xml_code(), print_xml_code_with_explicit_motif(), process_bang_comments_and_hollerith(), prune_non_constant(), recursive_append(), reference_condition_to_points_to(), reference_to_string(), relational_intrinsic_call_condition_to_points_to(), remove_unreachable_heap_vertices_in_points_to_graph(), remove_unreachable_stub_vertices_in_points_to_graph(), remove_unreachable_vertices_in_points_to_graph(), sac_statement_to_expressions(), safe_append(), safe_cat(), safe_copy(), safe_copy_line_interval(), sc_delimiter(), set_fprint(), sharp_else(), sharp_endif(), sharp_ifopt(), single_image_assignement_p(), sreference_offset(), step_compile_generated_module(), step_install(), string_buffer_to_file(), struct_initialization_to_points_to(), terapix_macro_code(), try_all_permutations(), unsplit_internal(), user_call_condition_to_points_to(), variable_to_dimensions(), where_to_perform_operation(), and write_list_of_rhs().
|
static |
Definition at line 133 of file alias_check.c.
Referenced by alias_check_array_and_scalar_variable_in_caller_flt(), alias_check_array_variable_in_caller_flt(), display_alias_check_statistics(), and make_list_of_flags().
Definition at line 512 of file alias_check.c.
Referenced by check_ref(), compute_points_to_kill_set(), fsi_seq_flt(), reference_written_p(), related_effect(), set_add_scalars(), statement_depends_p(), update_written_variables(), variable_is_written_by_statement_flt(), and variable_is_written_p().