PIPS
|
#include "all.h"
Go to the source code of this file.
Data Structures | |
struct | IoElementDescriptor |
{{ banner More... | |
struct | IntrinsicEffectDescriptor |
the following data structure describes an intrinsic function: its name and the function to apply on a call to this intrinsic to get the effects of the call More... | |
Typedefs | |
typedef struct IoElementDescriptor | IoElementDescriptor |
{{ banner More... | |
Functions | |
list | comp_regions_of_intrinsic (entity e, list args, transformer context) |
}} More... | |
list | proper_comp_regions_of_intrinsic (entity e, list args, transformer context) |
}} More... | |
list | no_write_comp_regions (entity __attribute__((unused)) e, list args, transformer context) |
}} More... | |
list | affect_comp_regions (entity __attribute__((unused)) e, list args, transformer context) |
}} More... | |
static IoElementDescriptor * | SearchIoElement (char *s, char *i) const |
}} More... | |
list | io_comp_regions (entity e, list args, transformer context) |
}} More... | |
list | comp_regions_of_ioelem (expression exp, tag act, transformer context) |
}} More... | |
list | comp_regions_of_iolist (list exprs, tag act, transformer context) |
}} More... | |
list | comp_regions_of_implied_do (expression exp, tag act, transformer context) |
}} More... | |
Variables | |
static IoElementDescriptor | IoElementDescriptorUndefined |
static IoElementDescriptor | IoElementDescriptorTable [] |
static IntrinsicEffectDescriptor | IntrinsicDescriptorTable [] |
typedef struct IoElementDescriptor IoElementDescriptor |
{{ banner
package regions : Alexis Platonoff, 22 Aout 1990
This File contains the main functions that compute the regions of a call to an intrinsic function : "+", "COS", etc... }} {{ data structures for handling descriptors the following data structure indicates whether an io element generates a read regions or a write region. the kind of region depends on the instruction type: for instance, access generates a read region if used within an open statement, and a write region when used inside an inquire statement
list affect_comp_regions | ( | entity __attribute__((unused)) | e, |
list | args, | ||
transformer | context | ||
) |
}}
{{ affect_comp_regions ==============================================================================
Definition at line 332 of file myintrinsics.c.
References CAR, CDR, comp_regions_of_expression(), comp_regions_of_write(), CompRegionsExactUnion(), debug(), effects_same_action_p(), EXPRESSION, expression_syntax, NIL, pips_internal_error, syntax_reference, and syntax_reference_p.
list comp_regions_of_implied_do | ( | expression | exp, |
tag | act, | ||
transformer | context | ||
) |
}}
{{ comp_regions_of_implied_do an implied do is a call to an intrinsic function named IMPLIED-DO; its first argument is the loop index, the second one is a range, and the remaining ones are expressions to be written or references to be read, or another implied_do (BA).
loop index
range
regions of implied do index it is must_written but may read because the implied loop might execute no iteration.
the loop index is must-written
Read effects are masked by the first write to the implied-do loop variable
regions of implied-loop bounds and increment
the preconditions of the current statement don't include those induced by the implied_do, because they are local to the statement. But we need them to properly calculate the regions. the solution is to add to the current context the preconditions due to the current implied_do (think of nested implied_do). the regions are calculated, and projected along the index. BA, September 27, 1993.
on a un autre implied_do imbrique'
indices are removed from regions because this is a loop
exp | xp |
act | ct |
context | ontext |
Definition at line 544 of file myintrinsics.c.
References add_index_range_conditions(), arguments_add_entity(), call_arguments, CAR, CDR, comp_regions_of_expression(), comp_regions_of_implied_do(), comp_regions_of_write(), CompRegionsExactUnion(), debug(), effects_same_action_p(), entity_to_new_value(), exp, EXPRESSION, expression_implied_do_p(), expression_syntax, fprintf(), gen_free_list(), ifdebug, is_action_write, make_reference(), MAP, NIL, pips_assert, precondition_to_string(), print_regions(), project_regions_along_loop_index(), ref, reference_variable, REGION, region_add_to_regions(), region_entity, region_free(), syntax_call, syntax_range, syntax_range_p, syntax_reference, syntax_reference_p, transformer_arguments, transformer_dup(), transformer_free(), and transformer_undefined.
Referenced by comp_regions_of_implied_do(), and comp_regions_of_iolist().
list comp_regions_of_intrinsic | ( | entity | e, |
list | args, | ||
transformer | context | ||
) |
}}
{{ comp_regions_of_intrinsic list comp_regions_of_intrinsic(entity e, list args, transformer context) input : a intrinsic function name, the list or arguments, and the calling context. output : the corresponding list of regions. modifies : nothing. comment :
args | rgs |
context | ontext |
Definition at line 270 of file myintrinsics.c.
References proper_comp_regions_of_intrinsic().
Referenced by comp_regions_of_call().
list comp_regions_of_ioelem | ( | expression | exp, |
tag | act, | ||
transformer | context | ||
) |
}}
{{ comp_regions_of_io_element ==============================================================================
exp | xp |
act | ct |
context | ontext |
Definition at line 461 of file myintrinsics.c.
References comp_regions_of_expression(), comp_regions_of_write(), debug(), exp, expression_syntax, is_action_write, pips_assert, syntax_reference, and syntax_reference_p.
Referenced by io_comp_regions().
list comp_regions_of_iolist | ( | list | exprs, |
tag | act, | ||
transformer | context | ||
) |
}}
{{ comp_regions_of_io_list ==============================================================================
There is a bug with effects of io list
READ *,N,(T(I),I=1,N)
there is write effect on N but for the io list, we don't have this effect !
Cause : there is no loop for the list exprs !!! /NN:2000/
exprs | xprs |
act | ct |
context | ontext |
Definition at line 489 of file myintrinsics.c.
References CAR, CDR, comp_regions_of_expression(), comp_regions_of_implied_do(), comp_regions_of_write(), CompRegionsExactUnion(), debug(), effects_same_action_p(), ENDP, exp, EXPRESSION, expression_implied_do_p(), expression_syntax, is_action_write, NIL, pips_assert, syntax_reference, and syntax_reference_p.
Referenced by io_comp_regions().
list io_comp_regions | ( | entity | e, |
list | args, | ||
transformer | context | ||
) |
}}
{{ io_comp_regions
regions effects on logical units - taken from effects/io.c
We simulate actions on files by read/write actions to a static integer array GO: It is necessary to do a read and and write action to the array, because it updates the file-pointer so it reads it and then writes it ...
args | rgs |
context | ontext |
Definition at line 378 of file myintrinsics.c.
References approximation_tag, call_function, CAR, CDR, comp_regions_of_ioelem(), comp_regions_of_iolist(), comp_regions_of_read(), comp_regions_of_write(), CompRegionsExactUnion(), CONS, debug(), effect_approximation, effects_same_action_p(), entity_local_name(), entity_undefined, EXPRESSION, expression_syntax, FindEntity(), gen_nconc(), get_bool_property(), indices, IO_EFFECTS_ARRAY_NAME, IoElementDescriptor::IoElementName, is_approximation_may, make_reference(), MAP, IoElementDescriptor::MayOrMust, NIL, pips_assert, IoElementDescriptor::ReadOrWrite, ref, REGION, SearchIoElement(), syntax_call, syntax_call_p, and TOP_LEVEL_MODULE_NAME.
list no_write_comp_regions | ( | entity __attribute__((unused)) | e, |
list | args, | ||
transformer | context | ||
) |
}}
{{ no_write_comp_regions ==============================================================================
Definition at line 315 of file myintrinsics.c.
References comp_regions_of_expressions(), and debug().
list proper_comp_regions_of_intrinsic | ( | entity | e, |
list | args, | ||
transformer | context | ||
) |
}}
{{ proper_comp_regions_of_intrinsic list proper_comp_regions_of_intrinsic(entity e, list args, transformer context) input : a intrinsic function name, the list or arguments, and the calling context. output : the corresponding list of regions. modifies : nothing. comment :
args | rgs |
context | ontext |
Definition at line 286 of file myintrinsics.c.
References debug(), entity_local_name(), IntrinsicEffectDescriptor::f, IntrinsicDescriptorTable, IntrinsicEffectDescriptor::name, NIL, and pips_internal_error.
Referenced by comp_regions_of_intrinsic().
|
static |
}}
{{ SearchIoElements
Never reaches this point. Only to avoid a warning at compile time. BC.
Definition at line 361 of file myintrinsics.c.
References IoElementDescriptorTable, IoElementDescriptorUndefined, IoElementDescriptor::IoElementName, pips_internal_error, and IoElementDescriptor::StmtName.
Referenced by io_comp_regions().
|
static |
Definition at line 125 of file myintrinsics.c.
Referenced by proper_comp_regions_of_intrinsic().
|
static |
Definition at line 50 of file myintrinsics.c.
Referenced by SearchIoElement().
|
static |
Definition at line 48 of file myintrinsics.c.
Referenced by SearchIoElement().