PIPS
|
#include <stdio.h>
#include <string.h>
#include <setjmp.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "database.h"
#include "ri-util.h"
#include "prettyprint.h"
#include "effects-util.h"
#include "constants.h"
#include "misc.h"
#include "semantics.h"
#include "text.h"
#include "text-util.h"
#include "sommet.h"
#include "ray_dte.h"
#include "sg.h"
#include "sc.h"
#include "polyedre.h"
#include "transformer.h"
#include "pipsdbm.h"
#include "resources.h"
#include "effects-generic.h"
#include "effects-convex.h"
#include "effects-simple.h"
Go to the source code of this file.
Macros | |
#define | IS_EG true |
package regions : Alexis Platonoff, 22 Aout 1990, Be'atrice Creusillet 10/94 More... | |
#define | NOT_EG false |
#define | PHI_FIRST true |
#define | NOT_PHI_FIRST false |
#define | BACKWARD true |
#define | FORWARD false |
#define | min(a, b) (((a)<(b))?(a):(b)) |
#define | max(a, b) (((a)>(b))?(a):(b)) |
Functions | |
void | convex_regions_translation_init (entity callee, list real_args, bool backward_p) |
jmp_buf overflow_error; More... | |
void | convex_regions_translation_end () |
void | reset_out_summary_regions_list () |
void | update_out_summary_regions_list (list l_out) |
list | get_out_summary_regions_list () |
static bool | stmt_filter (statement s) |
list | out_regions_from_caller_to_callee (entity caller, entity callee) |
void | out_regions_from_call_site_to_callee (call c) |
void out_regions_from_call_site_to_callee(call c) input : a potential call site for current_callee. More... | |
list | in_regions_of_external (entity func, list real_args, transformer context) |
list in_regions_of_external(entity func, list real_args, transformer context) input : an external function func, and the list of real arguments used in the calling function. More... | |
list | regions_of_external (entity func, list real_args, transformer context, bool proper) |
list regions_of_external(entity func, list real_args, transformer context) input : an external function func, and the list of real arguments used in the calling function. More... | |
list | convex_regions_backward_translation (entity func, list real_args, list l_reg, transformer context) |
of effects More... | |
list | convex_regions_forward_translation (entity callee, list real_args, list l_reg, transformer context) |
of effects More... | |
static list | formal_regions_backward_translation (entity func, list real_args, list func_regions, transformer context) |
static list formal_regions_backward_translation(entity func, list real_args, func_regions, transformer context) input : an external function func, its real arguments at call site (real_args), its summary regions (with formal args), and the calling context. More... | |
static list | common_regions_backward_translation (entity func, list func_regions) |
static list | common_region_translation (entity callee, region reg, bool backward) |
static list common_region_translation(entity func, region reg, bool backward) input : func is the called function, real_args are the real arguments, reg is the region to translate (it concerns an array in a common), and backward indicates the direction of the translation. More... | |
list | regions_backward_translation (entity func, list real_args, list func_regions, transformer context, bool proper) |
list regions_backward_tranlation(entity func, list real_args, list func_regions, transformer context) input : an external function func, and the list of real arguments used in the calling function. More... | |
list | c_convex_effects_on_formal_parameter_backward_translation (list l_sum_eff, expression real_arg, transformer context) |
static list | real_regions_forward_translation (entity func, list real_args, list l_reg, transformer context) |
static list real_regions_forward_translation(entity func, list real_args, l_reg, transformer context) input : the called function func, the real arguments of the call, the list of regions to translate, and the context of the call. More... | |
static list | common_regions_forward_translation (entity func, list real_regions) |
static list common_regions_forward_translation (entity func, list real_regions) input : the called function, the list of real arguments at call site, and the list of regions to translate. More... | |
list | regions_forward_translation (entity func, list real_args, list l_reg, transformer context) |
list regions_forward_translation(entity func, list real_args, l_reg, transformer context input : the called function func, the real arguments of the call, the list of regions to translate, and the context of the call. More... | |
list | c_convex_effects_on_actual_parameter_forward_translation (entity callee, expression real_exp, entity formal_ent, list l_reg, transformer context) |
Variables | |
static statement | current_stmt = statement_undefined |
static entity | current_callee = entity_undefined |
static list | l_sum_out_reg = list_undefined |
#define BACKWARD true |
Definition at line 85 of file interprocedural.c.
#define FORWARD false |
Definition at line 86 of file interprocedural.c.
#define IS_EG true |
package regions : Alexis Platonoff, 22 Aout 1990, Be'atrice Creusillet 10/94
This File contains the main functions that compute the interprocedural translation of regions (forward and backward).
Vocabulary : _ A variable refered as a "region" is in fact of the NEWGEN type "effect". The use of the word "region" allows to keep the difference with the effects package. _ The word "func" always refers to the external called subroutine. _ The word "real" always refers to the calling subroutine
Definition at line 79 of file interprocedural.c.
#define max | ( | a, | |
b | |||
) | (((a)>(b))?(a):(b)) |
Definition at line 89 of file interprocedural.c.
#define min | ( | a, | |
b | |||
) | (((a)<(b))?(a):(b)) |
Definition at line 88 of file interprocedural.c.
#define NOT_EG false |
Definition at line 80 of file interprocedural.c.
#define NOT_PHI_FIRST false |
Definition at line 83 of file interprocedural.c.
#define PHI_FIRST true |
Definition at line 82 of file interprocedural.c.
list c_convex_effects_on_actual_parameter_forward_translation | ( | entity | callee, |
expression | real_exp, | ||
entity | formal_ent, | ||
list | l_reg, | ||
transformer | context | ||
) |
it's an intrinsic : FI, cannot it be a constant?
first we compute a SIMPLE effect on the argument of the address_of operator. This is to distinguish between the general case and the case where the operand of the & operator is an array element. Simple effect indices are easier to retrieve.
there should be a FOREACH here to scan the whole list
there are indices but we don't know if they represent array dimensions, struct/union/enum fields, or pointer dimensions.
we build the constraint PHI_nb_phi_real >= last index of eff_real
well, not strictly necessary : forward propagation is only for OUT regions
now we compute a convex effect on the argument of the address_of operator and modify it's last dimension according to the fact that there is an addressing operator
here should be a FOREACH to handle all elements
array element operand : we replace the constraint on the last phi variable with
First we have to test if the eff_real access path leads to the eff_orig access path
to do that, if the entities are the same (well in fact we should also take care of aliasing), we add the constraints of eff_real to those of eff_orig, and the system must be feasible. We should also take care of linearization here.
I guess we could reuse convex_cell_reference_with_address_of_cell_reference_translation
At least part of the original effect corresponds to the actual argument : we need to translate it
first we translate the predicate in the callee's name space
Then we remove the phi variables common to the two regions except the last one if we are not in the general case
This is only valid when there is no linearization ; in the general case a translation system should be built
if not in the general case, we add the constraint phi_nb_phi_real == psi_nb_phi_real - exp_nb_phi_real
Finally, we must rename remaining phi variables from 2 add a PHI1==0 constraint in the general case, or, in the contrary, rename remaining phi variables from 1. We must also change the resulting region entity for the formal entity in all cases.
add PHI1 == 0
else of the if (sc_empty_p)
if(effect_entity(eff_orig) == effect_entity(eff_real) ...)
FOREACH
first we compute an effect on the real_arg
here should be a foreach to scan all the elements
First we have to test if the eff_real access path leads to the eff_orig access path
to do that, if the entities are the same (well in fact we should also take care of aliasing), we add the constraints of eff_real to those of eff_orig, and the system must be feasible.
At least part of the original effect corresponds to the actual argument : we need to translate it
first we perform the path translation
then we translate the predicate in the callee's name space
else of the if (sc_empty_p)
if(effect_entity(eff_orig) == effect_entity(eff_real) ...)
FOREACH
switch
callee | allee |
real_exp | eal_exp |
formal_ent | ormal_ent |
l_reg | _reg |
context | ontext |
Definition at line 1163 of file interprocedural.c.
References _FALLTHROUGH_, basic_concrete_types_compatible_for_effects_interprocedural_translation_p(), c_actual_argument_to_may_summary_effects(), c_convex_effects_on_actual_parameter_forward_translation(), call_arguments, call_function, callee, CAR, cast_expression, CDR, cell_indices(), cell_reference, CONS, contrainte_make(), convex_cell_reference_with_value_of_cell_reference_translation(), convex_region_descriptor_translation(), copy_action(), copy_approximation(), copy_expression(), EFFECT, effect_action, effect_any_reference, effect_approximation, effect_cell, effect_descriptor, effect_undefined, effect_undefined_p, effects_same_action_p(), ENDP, ENTITY_ADDRESS_OF_P, ENTITY_ASSIGN_P, entity_basic_concrete_type(), entity_field_p(), entity_initial, entity_name, entity_to_expression(), entity_type, EXPRESSION, expression_reference(), expression_reference_p(), expression_syntax, expression_to_type(), expression_undefined, expression_undefined_p, FOREACH, free_effect(), free_expression(), free_reference(), free_type(), gen_free_list(), gen_full_free_list(), gen_length(), gen_nconc(), gen_nth(), generic_proper_effects_of_complex_address_expression(), get_current_module_entity(), in_out_methods_p(), init_convex_inout_prettyprint(), int, int_to_expression(), IS_EG, is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, make_action_write_memory(), make_approximation_may(), make_cell_reference(), make_effect(), make_phi_entity(), make_phi_expression(), make_psi_entity(), make_reference(), make_reference_region(), module_local_name(), NIL, NORMALIZE_EXPRESSION, normalized_linear, normalized_linear_p, NOT_EG, NOT_PHI_FIRST, path_preceding_p(), PHI_FIRST, pips_assert, pips_debug, pips_debug_effect, pips_debug_effects, pips_internal_error, pips_user_error, pips_user_warning, POP, reference_indices, reference_variable, region_exact_projection_along_variable(), region_remove_psi_variables(), region_sc_append_and_normalize(), region_system, RegionsMustUnion(), sc_add_phi_equation(), sc_constraint_add(), sc_empty_p(), sc_free(), sc_new(), sc_variable_rename(), set_methods_for_convex_in_out_effects(), set_methods_for_convex_rw_effects(), set_methods_for_proper_simple_effects(), simple_effect_reference_type(), syntax_call, syntax_cast, syntax_reference, syntax_reference_p, syntax_tag, transformer_undefined, type_functional_p, type_undefined, type_undefined_p, type_variable, type_variable_p, ultimate_type(), value_code_p, VALUE_ONE, variable_dimensions, vect_add(), vect_copy(), vect_new(), vect_rm(), and vect_substract().
Referenced by c_convex_effects_on_actual_parameter_forward_translation(), set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().
list c_convex_effects_on_formal_parameter_backward_translation | ( | list | l_sum_eff, |
expression | real_arg, | ||
transformer | context | ||
) |
l_sum_eff | is a list of effects on a C function formal parameter. These effects must be visible from the caller, which means that their reference has at leat one index. |
real_arg | is an expression. It's the real argument corresponding to the formal parameter which memory effects are represented by l_sum_eff. |
context | is the transformer translating the callee's neame space into the caller's name space. |
the result
if it's a pointer or a partially indexed array We should do more testing here to check if types are compatible...
the test here may not be right. I guess I should use basic_concrete_type here BC
Then we compute the region corresponding to the real argument
this could easily be made generic BC.
FI: I add the restriction on store regions, but they should have been eliminated before translation is attempted
we translate the initial region descriptor into the caller's name space
and then perform the translation
shouldn't it be a union ? BC
if (pointer_type_p(real_arg_t))
else
case is_syntax_reference
first we compute an effect on the argument of the address_of operator (to treat cases like &(n->m))
we translate the initial region descriptor into the caller's name space
if(!ENDP(eff_ind))
else du if (effect_undefined_p(eff_real) || ...)
FOREACH(EFFECT, eff, l_sum_eff)
FOREACH (EFFECT, eff_real, l_eff_real)
if it's a pointer or a partially indexed array We should do more testing here to check if types are compatible...
first compute the region corresponding to the real argument
this could easily be made generic BC.
FI: I add the restriction on store regions, but they should have been eliminated before translation is attempted
we translate the initial region descriptor into the caller's name space
and then perform the translation
shouldn't it be a union ? BC
if (pointer_type_p(real_arg_t))
else
first we compute an effect on the real_arg
first we translate the formal region predicate
Then we append the formal region to the real region
Well this is valid only in the general case : we should verify that types are compatible.
else du if (effect_undefined_p(eff_real))
shouldn't it be a union ? BC
FOREACH(EFFECT, eff, l_sum_eff)
BC : do not generate effects on HEAP
n_eff = heap_effect(get_current_module_entity(), copy_action(effect_action(eff)));
case is_syntax_call
we should test here the compatibility of the casted expression type with the formal entity type. It is not available here, however, I think it's equivalent to test the compatibility with the real arg expression type since the current function is called after testing the compatilibty between the real expression type and the formal parameter type.
let us at least generate effects on all memory locations reachable from the cast expression
switch
free_type(real_arg_t);
l_sum_eff | _sum_eff |
real_arg | eal_arg |
context | ontext |
Definition at line 523 of file interprocedural.c.
References anywhere_effect_p(), c_actual_argument_to_may_summary_effects(), c_convex_effects_on_formal_parameter_backward_translation(), call_arguments, call_function, CAR, cast_expression, CDR, CONS, convex_cell_reference_with_address_of_cell_reference_translation(), convex_cell_reference_with_value_of_cell_reference_translation(), convex_region_descriptor_translation(), copy_action(), copy_approximation(), copy_reference(), EFFECT, effect_action, effect_action_tag, effect_any_reference, effect_approximation, effect_approximation_tag, effect_descriptor, effect_undefined, effect_undefined_p, effect_write_p, ENDP, ENTITY_ADDRESS_OF_P, entity_all_locations_p(), ENTITY_ASSIGN_P, ENTITY_DEREFERENCING_P, ENTITY_FIELD_P, ENTITY_MALLOC_SYSTEM_P, ENTITY_POINT_TO_P, entity_type, EXPRESSION, expression_syntax, expression_to_string(), expression_to_type(), FOREACH, free_effect(), free_reference(), gen_free_list(), gen_full_free_list(), gen_length(), gen_nconc(), generic_proper_effects_of_complex_address_expression(), ifdebug, is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, make_action_read_memory(), make_action_write_memory(), make_anywhere_effect(), make_approximation_may(), make_cell_reference(), make_effect(), NIL, pips_debug, pips_debug_effect, pips_debug_effects, pips_internal_error, pips_user_error, pips_user_warning, pointer_type_p(), print_regions(), reference_indices, reference_variable, region_append(), store_effect_p(), syntax_call, syntax_cast, syntax_reference, syntax_tag, transformer_undefined_p, type_depth(), type_to_string(), type_variable, types_compatible_for_effects_interprocedural_translation_p(), and variable_dimensions.
Referenced by c_convex_effects_on_formal_parameter_backward_translation(), set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().
static list common_region_translation(entity func, region reg, bool backward) input : func is the called function, real_args are the real arguments, reg is the region to translate (it concerns an array in a common), and backward indicates the direction of the translation.
output : a list of regions, that are the translation of the initial region. modifies : nothing: duplicates the original region. comment : the algorithm is the following
Scan the variables of the common that belong to the target function For each variable do if it has elements in common with the variable of the initial region if both variables have the same layout in the common perform the translation using array_region-translation else use the subscript values, and take into account the relative offset of the variables in the common add to the translated region the declaration system of the target variable to have a smaller region. until all the elements of the initial variable have been translated.
If the entity is a top-level entity, no translation; It is the case for variables dexcribing I/O effects (LUNS).
First, we search if the common is declared in the target function; if not, we have to deterministically choose an arbitrary function in which the common is declared. It will be our reference. By deterministically, I mean that this function shall be chosen whenever we try to translate from this common to a routine where it is not declared.
If common not declared in caller, use the subroutine of the first entity that appears in the common layout. (not really deterministic: I should take the first name in lexical order. BC.
first, we calculate the offset and size of the region entity
then, we perform the translation
these entities have elements in common
Definition at line 1656 of file interprocedural.c.
References area_layout, array_size(), callee, CAR, CDR, CONS, EFFECT, effects_same_action_p(), ENDP, ENTITY, entity_module_name(), entity_name, entity_storage, entity_type, get_current_module_entity(), ifdebug, io_entity_p(), max, min, module_local_name(), module_name_to_entity(), NIL, offset, pips_debug, print_regions(), ram_offset, ram_section, rand_effects_entity_p(), reference_undefined, region, region_entity, region_to_string(), region_translation(), RegionsMustUnion(), storage_ram, top_level_entity_p(), and type_area.
Referenced by common_regions_backward_translation(), and common_regions_forward_translation().
we are only interested in regions concerning common variables. They are the entities with a ram storage. They can not be dynamic variables, because these latter were eliminated of the code_regions (cf. region_of_module).
Definition at line 486 of file interprocedural.c.
References BACKWARD, common_region_translation(), EFFECT, effects_same_action_p(), entity_storage, MAP, NIL, region_entity, RegionsMustUnion(), and storage_ram_p.
Referenced by regions_backward_translation().
static list common_regions_forward_translation (entity func, list real_regions) input : the called function, the list of real arguments at call site, and the list of regions to translate.
output : the translated list of regions. modifies : nothing. comment :
we are only interested in regions concerning common variables. They are the entities with a ram storagethat are not dynamic variables
Definition at line 1138 of file interprocedural.c.
References common_region_translation(), dynamic_area_p(), EFFECT, effects_same_action_p(), entity_storage, FORWARD, heap_area_p(), MAP, NIL, ram_section, region_entity, RegionsMustUnion(), stack_area_p(), storage_ram, and storage_ram_p.
Referenced by regions_forward_translation().
list convex_regions_backward_translation | ( | entity | func, |
list | real_args, | ||
list | l_reg, | ||
transformer | context | ||
) |
of effects
func | unc |
real_args | eal_args |
l_reg | _reg |
context | ontext |
Definition at line 298 of file interprocedural.c.
References NIL, and regions_backward_translation().
Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().
list convex_regions_forward_translation | ( | entity | callee, |
list | real_args, | ||
list | l_reg, | ||
transformer | context | ||
) |
of effects
callee | allee |
real_args | eal_args |
l_reg | _reg |
context | ontext |
Definition at line 309 of file interprocedural.c.
References c_module_p(), callee, fortran_module_p(), generic_c_effects_forward_translation(), get_current_module_entity(), NIL, and regions_forward_translation().
Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().
void convex_regions_translation_end | ( | void | ) |
Definition at line 108 of file interprocedural.c.
References reset_arguments_to_eliminate(), and reset_translation_context_sc().
Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().
jmp_buf overflow_error;
interprocedural.c
callee | allee |
real_args | eal_args |
backward_p | ackward_p |
Definition at line 98 of file interprocedural.c.
References callee, set_backward_arguments_to_eliminate(), set_forward_arguments_to_eliminate(), and set_interprocedural_translation_context_sc().
Referenced by set_methods_for_convex_effects(), and set_methods_for_convex_rw_pointer_effects().
|
static |
static list formal_regions_backward_translation(entity func, list real_args, func_regions, transformer context) input : an external function func, its real arguments at call site (real_args), its summary regions (with formal args), and the calling context.
output : the translated formal regions. modifies : ? comment :
let func_regions be the list of the regions on variables of func let real_regions be the list of the translated regions on common variables
real_regions = empty FOR each expression real_exp IN real_args arg_num = number in the list of the function real arguments FOR each func_reg IN func_regions func_ent = entity of the region func_reg IF func_ent is the formal parameter numbered arg_num IF real_exp is an lhs (expression with one entity) real_reg = translation of the region func_reg real_regions = (real_regions) U {real_reg} ELSE real_regions = (real_regions) U (regions of the expression real_exp) ENDIF ENDIF ENDFOR ENDFOR
If the formal parameter corresponds to the real argument then we perform the translation.
If the real argument is a reference to an entity, then we translate the regions of the corresponding formal parameter
The indices of the reference are always evaluated
Else, the real argument is a complex expression, which is merely evaluated during execution of the program; Since Fortran forbids write effects on expressions passed as arguments, the regions on the formal parameter are merely ignored. The regions computed are those of the real parameter expression.
Definition at line 414 of file interprocedural.c.
References BACKWARD, CAR, CDR, EFFECT, ENDP, EXPRESSION, expression_syntax, gen_nconc(), generic_proper_effects_of_expression(), get_current_module_entity(), ifdebug, ith_parameter_p(), MAP, NIL, pips_debug, print_regions(), proper_regions_of_expressions(), reference_indices, reference_undefined, reference_variable, region, region_entity, region_translation(), regions_add_region(), syntax_reference, syntax_reference_p, and VALUE_ZERO.
Referenced by regions_backward_translation().
list get_out_summary_regions_list | ( | void | ) |
list in_regions_of_external | ( | entity | func, |
list | real_args, | ||
transformer | context | ||
) |
list in_regions_of_external(entity func, list real_args, transformer context) input : an external function func, and the list of real arguments used in the calling function.
output : the corresponding list of regions, at call site. modifies : nothing. comment : The effects of "func" are computed into externals effects, ie. ‘translated’. The translation is made in two phases : _ regions on formal parameters _ regions on common parameters
Get the regions of "func".
translate them
func | unc |
real_args | eal_args |
context | ontext |
Definition at line 232 of file interprocedural.c.
References db_get_memory_resource(), effects_to_list(), entity_module_p(), module_local_name(), NIL, pips_debug, pips_internal_error, regions_backward_translation(), and SUMMARY.
void out_regions_from_call_site_to_callee | ( | call | c | ) |
void out_regions_from_call_site_to_callee(call c) input : a potential call site for current_callee.
output : nothing modifies : l_sum_out_reg becomes the may union of l_sum_out_reg and the translated out regions of the current call site. comment :
Definition at line 205 of file interprocedural.c.
References call_arguments, call_function, current_callee, current_stmt, load_statement_out_regions(), load_statement_precondition(), NIL, regions_forward_translation(), and update_out_summary_regions_list().
Referenced by out_regions_from_caller_to_callee().
All we need to perform the translation
caller | aller |
callee | allee |
Definition at line 150 of file interprocedural.c.
References call_domain, callee, caller_name, current_callee, db_get_memory_resource(), free_value_mappings(), gen_multi_recurse(), gen_null(), l_sum_out_reg, module_local_name(), module_to_value_mappings(), out_regions_from_call_site_to_callee(), pips_debug, reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), reset_out_effects(), reset_precondition_map(), reset_proper_rw_effects(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), set_out_effects(), set_precondition_map(), set_proper_rw_effects(), statement_domain, and stmt_filter().
|
static |
static list real_regions_forward_translation(entity func, list real_args, l_reg, transformer context) input : the called function func, the real arguments of the call, the list of regions to translate, and the context of the call.
output : the list of translated regions correponding to the formal arguments of the called function. modifies : l_reg and the regions it contains. comment : for each real argument in real_args if it is a reference for each region in l_reg if the current region concerns the current real argument if the corresponding formal parameter is a scalar the translated region is a scalar region, which reference is the formal argument, and which action and approximation are those of the initial region. else it is an array, and the tranlation is performed by another procedure. endfor else, it is a complex expression we search the regions in l_reg corresponding to the elements accessed in the complex expression. and we make a read region corresponding to the formal scalar parameter. endif endfor
for each actual parameter expression, we search in the actual regions the corresponding elements. If it exists, we make the corresponding regions, and translate them
if
REVOIR ICI
else
for
Definition at line 1045 of file interprocedural.c.
References CAR, CDR, CONS, EFFECT, effect_to_may_effect(), effects_dup(), effects_same_action_p(), ENDP, entity_name, EXPRESSION, expression_syntax, find_ith_formal_parameter(), FORWARD, free_action(), get_current_module_entity(), ifdebug, make_action_read_memory(), make_regions_reference(), MAP, NIL, pips_debug, print_regions(), reference_undefined, reference_variable, reference_whole_region(), region, region_entity, region_translation(), regions_free(), regions_of_expression(), RegionsIntersection(), RegionsMustUnion(), same_entity_p(), syntax_reference, syntax_reference_p, and VALUE_ZERO.
Referenced by regions_forward_translation().
list regions_backward_translation | ( | entity | func, |
list | real_args, | ||
list | func_regions, | ||
transformer | context, | ||
bool | proper | ||
) |
list regions_backward_tranlation(entity func, list real_args, list func_regions, transformer context) input : an external function func, and the list of real arguments used in the calling function.
output : the corresponding list of regions, at call site. modifies : nothing. comment : The effects of "func" are computed into externals effects, ie. ‘translated’. The translation is made in two phases : _ regions on formal parameters _ regions on common parameters
Compute the regions on formal variables.
Compute the regions on common variables (static & global variables).
FI: add local precondition (7 December 1992)
func | unc |
real_args | eal_args |
func_regions | unc_regions |
context | ontext |
proper | roper |
Definition at line 341 of file interprocedural.c.
References common_regions_backward_translation(), effects_same_action_p(), formal_regions_backward_translation(), gen_nconc(), ifdebug, NIL, pips_debug, print_regions(), regions_add_context(), RegionsMustUnion(), reset_arguments_to_eliminate(), reset_translation_context_sc(), set_backward_arguments_to_eliminate(), and set_interprocedural_translation_context_sc().
Referenced by convex_regions_backward_translation(), in_regions_of_external(), and regions_of_external().
list regions_forward_translation | ( | entity | func, |
list | real_args, | ||
list | l_reg, | ||
transformer | context | ||
) |
list regions_forward_translation(entity func, list real_args, l_reg, transformer context input : the called function func, the real arguments of the call, the list of regions to translate, and the context of the call.
output : the translated list of regions : real arguments are translated into formal arguments, and common variables of the caller into common variables of the callee. modifies : nothing. comment :
func | unc |
real_args | eal_args |
l_reg | _reg |
context | ontext |
Definition at line 980 of file interprocedural.c.
References common_regions_forward_translation(), effects_same_action_p(), ifdebug, NIL, pips_debug, print_regions(), real_regions_forward_translation(), RegionsMustUnion(), reset_arguments_to_eliminate(), reset_translation_context_sc(), set_forward_arguments_to_eliminate(), and set_interprocedural_translation_context_sc().
Referenced by convex_regions_forward_translation(), and out_regions_from_call_site_to_callee().
list regions_of_external | ( | entity | func, |
list | real_args, | ||
transformer | context, | ||
bool | proper | ||
) |
list regions_of_external(entity func, list real_args, transformer context) input : an external function func, and the list of real arguments used in the calling function.
output : the corresponding list of regions, at call site. modifies : nothing. comment : The effects of "func" are computed into externals effects, ie. ‘translated’. The translation is made in two phases : _ regions on formal parameters _ regions on common parameters
Get the regions of "func".
translate them
func | unc |
real_args | eal_args |
context | ontext |
proper | roper |
Definition at line 271 of file interprocedural.c.
References db_get_memory_resource(), effects_to_list(), entity_module_p(), module_local_name(), NIL, pips_debug, pips_internal_error, and regions_backward_translation().
void reset_out_summary_regions_list | ( | void | ) |
Definition at line 121 of file interprocedural.c.
References l_sum_out_reg, and list_undefined.
Referenced by regions_to_loops().
Definition at line 140 of file interprocedural.c.
References current_stmt, pips_debug, and statement_number.
Referenced by out_regions_from_caller_to_callee().
void update_out_summary_regions_list | ( | list | l_out | ) |
l_out | _out |
Definition at line 126 of file interprocedural.c.
References effects_same_action_p(), l_sum_out_reg, list_undefined_p, and RegionsMayUnion().
Referenced by out_regions_from_call_site_to_callee().
|
static |
Definition at line 118 of file interprocedural.c.
Referenced by common_is_visible_p(), interprocedural_abc_arrays(), out_regions_from_call_site_to_callee(), and out_regions_from_caller_to_callee().
|
static |
Definition at line 117 of file interprocedural.c.
Referenced by live_in_paths_of_loop(), live_in_paths_of_whileloop(), live_out_paths_from_call_site_to_callee(), live_out_paths_from_forloop_to_body(), live_out_paths_from_loop_to_body(), live_out_paths_from_test_to_branches(), live_out_paths_from_unstructured_to_nodes(), live_out_paths_from_whileloop_to_body(), make_sensitivity_information(), out_regions_from_call_site_to_callee(), put_stmt_in_Block(), and stmt_filter().
|
static |
Definition at line 119 of file interprocedural.c.
Referenced by get_out_summary_regions_list(), out_regions_from_caller_to_callee(), reset_out_summary_regions_list(), and update_out_summary_regions_list().