PIPS
|
#include "local.h"
Go to the source code of this file.
Macros | |
#define | GRAPH_IS_DG |
Name : adg_summary.c Package : array_dfg Author : Arnauld LESERVOT Date : 94/02/10 Modified : Documents: "Le Calcul de l'Array Data Flow Graph dans PIPS
Partie II : Implantation dans PIPS" A. More... | |
#define | NEXT(cp) (((cp) == NIL) ? NIL : (cp)->cdr) |
Local defines. More... | |
Functions | |
Pentity_vertices | pev_new () |
====================================================================== More... | |
list | adg_get_read_entity_vertices (graph in_dg, list in_l) |
====================================================================== More... | |
list | adg_get_write_entity_vertices (graph in_dg) |
====================================================================== More... | |
graph | adg_dataflowgraph_with_extremities (statement mod_stat, statement_mapping stco_map, graph dup_dg) |
====================================================================== More... | |
Variables | |
hash_table | Gvertex_number_to_statement |
Global variables. More... | |
int | Gcount_re |
External variables. More... | |
statement_mapping | Gstco_map |
list | Gstructural_parameters |
int | my_pip_count |
#define GRAPH_IS_DG |
Name : adg_summary.c Package : array_dfg Author : Arnauld LESERVOT Date : 94/02/10 Modified : Documents: "Le Calcul de l'Array Data Flow Graph dans PIPS Partie II : Implantation dans PIPS" A.
LESERVOT "Dataflow Analysis of Array and Scalar References" P. FEAUTRIER Comments :
Definition at line 38 of file adg_summary.c.
Local defines.
Definition at line 42 of file adg_summary.c.
graph adg_dataflowgraph_with_extremities | ( | statement | mod_stat, |
statement_mapping | stco_map, | ||
graph | dup_dg | ||
) |
======================================================================
graph adg_dataflowgraph_with_extremities(
(statement) module_statement, (statement_mapping) static_control_map, (graph) reversed_dg ) AL 94/02/10
We first put entry node in the return list
Make exit_v : the exit node
For debug purpose
Compute source quast for the exit node
Dim des tableaux
Indices of Exit
Get write entity and vertices that write it
Build reference associated to destination entity
No sources : ENTRY writes it
No sources : Comes from Entry point
Debugging
Get context of destination entity
We run over all possible candidates and compute to see how it could contribute to the source
Get possible source vertex and informations linked to it
If this candidate is not possible, see the next. if candidate is not valid with the present source.
Not a possible source => get the next candidate
For debug purpose
Get the f(u) = g(b) psystem We first duplicate arguments expressions, then we rename entities that are at a deeper depth than sou_d and forward subsitute those new entities in the expressions
Make corresponding indices equal in source and dest F(u) = g(b) and put it in sou_ps.
Build source Psysteme (IF and DO contraints). Build the context and rename variables .
Get predicate that comes from an IF statement
Get predicate that comes from enclosing DO
Append sous_ps (F(u) = g(b) and seq. predicate) with prov_ps (IF and DO constraints).
Compute the new candidate source. We try to call PIP only if necesary.
If there is no condition on source...
Order the psysteme according to ent_l
Find the new source and simplify it
Fill "quast_undefined" part of the source with ENTRY node.
Build the new Data Flow Graph with the new source
For debug purpose
Compute source quast for the entry node
Dim des tableaux
Indices of Exit
Get read entity and vertices that read it
Build reference associated to destination entity
No sources : EXIT reads it
No sources : Comes from exit point
Debugging
Get context of destination entity
We run over all possible candidates and compute to see how it could contribute to the source
Get possible source vertex and informations linked to it
If this candidate is not possible, see the next. if candidate is not valid with the present source.
Not a possible source => get the next candidate
Build source Psysteme (IF and DO contraints).
Get predicate that comes from an IF statement
Get predicate that comes from enclosing DO
Get all different effects that reads dest_ent
Put in ent_l variables readen by ver
Current effect
variable readden by effect eff
For debug purpose
Get the f(u) = g(b) psystem We first duplicate arguments expressions, then we rename entities that are at a deeper depth than sou_d and forward subsitute those new entities in the expressions
Make corresponding indices equal in source and dest F(u) = g(b) and put it in sou_ps.
Append sous_ps (F(u) = g(b) and seq. predicate) with prov_ps (IF and DO constraints).
Compute the new candidate source. We try to call PIP only if necesary.
If there is no condition on source...
Order the psysteme according to ent_l
Find the new source and simplify it
Fill "quast_undefined" part of the source with EXIT node.
Build the new Data Flow Graph with the new source
Definition at line 230 of file adg_summary.c.
References action_read_p, ADD_ELEMENT_TO_LIST, adg_compact_quast(), adg_decreasing_stat_order_sort(), adg_enrichir(), adg_fill_with_quast(), adg_get_integer_entity(), adg_get_loop_indices(), adg_get_predicate_of_loops(), adg_get_read_entity_vertices(), adg_get_write_entity_vertices(), adg_increasing_stat_order_sort(), adg_list_to_vect(), adg_path_max_source(), adg_path_possible_source(), adg_sc_dup(), adg_suppress_2nd_in_1st_ps(), adg_update_dfg(), adg_vertex_to_statement(), Ssysteme::base, call_arguments, CAR, CHUNK, contrainte_make(), CONTRAINTE_UNDEFINED, copy_expression(), debug(), dfg_vertex_label_exec_domain, dfg_vertex_label_statement, DIMENSION, dimension_lower, dimension_upper, EFFECT, effect_action, effect_any_reference, ENDP, Sentity_vertices::ent, entity_to_expression(), entity_type, ENTRY_ORDER, EXIT_ORDER, EXPRESSION, EXPRESSION_PVECTEUR, expression_syntax, fprint_dfg(), fprint_psysteme(), fprintf(), gen_length(), get_debug_level(), GET_STATEMENT_MAPPING, graph_undefined, Gstructural_parameters, Gvertex_number_to_statement, hash_put(), if(), imprime_special_quast(), instruction_call, int, is_entity_in_list_p(), is_pa_empty_p, is_quast_value_conditional, is_quast_value_quast_leaf, Sentity_vertices::lis, load_proper_rw_effects_list(), make_conditional(), make_dfg_vertex_label(), make_graph(), make_leaf_label(), make_predicate(), make_quast(), make_quast_leaf(), make_quast_value(), make_reference(), make_vertex(), my_pip_count, my_sc_faisabilite(), NIL, pa_full(), PA_UNDEFINED, Sposs_source::pat, pip_integer_max(), POP, predicate_system, predicate_undefined, print_statement(), print_words(), Spath::psys, pu_vect_fprint(), Sposs_source::qua, quast_leaf_undefined, quast_undefined, reference_indices, reference_variable, sc_append(), sc_dup(), sc_make(), sccflags_undefined, statement_instruction, statement_ordering, static_control_loops, static_control_params, syntax_reference, TAKE_FIRST, TAKE_LAST, type_variable, VALUE_ONE, variable_dimensions, vect_new(), vect_substract(), VERTEX, vertex_vertex_label, and words_effect().
Referenced by array_dfg().
======================================================================
list adg_get_read_entity_vertices( (graph) in_dg ) AL 94/02/10
Returns a list of Pentity_vertices, that represents all variables read in the input graph and vertices that read each of these variables. We do not keep entities that are in in_l, which represent structural parameters. PRIVATE use.
Initialization
Run over all vertices to take their read variables
Current vertex
Statement of vertex
effects linked to ver
variable read by ver
Take current vertex and effects links to it
Put in ent_l variables readen by ver
Current effect
variable readden by effect eff
Update our list
We scan over the readen variables in ent_l...
... to see if it is already in our ret_list
We find it : we update pev2
entity ent is not in our ret_list : we add it
Definition at line 79 of file adg_summary.c.
References action_read_p, ADD_ELEMENT_TO_LIST, adg_vertex_to_statement(), CAR, CHUNK, debug(), EFFECT, effect_action, effect_any_reference, ENDP, Sentity_vertices::ent, ENTITY, graph_vertices, is_entity_in_list_p(), Sentity_vertices::lis, load_proper_rw_effects_list(), NIL, pev_new(), POP, reference_variable, and VERTEX.
Referenced by adg_dataflowgraph_with_extremities().
======================================================================
list adg_get_write_entity_vertices( (graph) in_dg ) AL 94/02/10
Returns a list of Pentity_vertices, that represents all variables written in the input graph and vertices that write each of these variables. PRIVATE use.
Initialization
Run over all vertices to take their write variable
Current vertex
statement of ver
effects linked of sta
variable written by sta
Take current vertex and effects links to it
Put in ent_l variables readen by ver
Current effect
variable readden by effect eff
Update our list
Is w_ent already in our ret_list ?
We find it : we update pev2
entity w_ent is not in our ret_list : we add it
Definition at line 159 of file adg_summary.c.
References action_write_p, ADD_ELEMENT_TO_LIST, adg_vertex_to_statement(), assignment_statement_p(), CAR, CHUNK, debug(), EFFECT, effect_action, effect_any_reference, ENDP, Sentity_vertices::ent, graph_vertices, Sentity_vertices::lis, load_proper_rw_effects_list(), NIL, pev_new(), POP, reference_variable, and VERTEX.
Referenced by adg_dataflowgraph_with_extremities().
Pentity_vertices pev_new | ( | ) |
======================================================================
Pentity_vertices pev_new() AL 15/02/94 Allocates a Pentity_vertices.
Definition at line 56 of file adg_summary.c.
References Sentity_vertices::ent, exit, fprintf(), Sentity_vertices::lis, and malloc().
Referenced by adg_get_read_entity_vertices(), and adg_get_write_entity_vertices().
|
extern |
External variables.
Definition at line 45 of file array_dfg.c.
|
extern |
Definition at line 47 of file array_dfg.c.
|
extern |
Definition at line 48 of file array_dfg.c.
Referenced by adg_dataflowgraph_with_extremities(), and array_dfg().
|
extern |
Global variables.
Definition at line 42 of file adg_graph.c.
Referenced by adg_dataflowgraph_with_extremities().
|
extern |
Definition at line 50 of file array_dfg.c.
Referenced by adg_dataflowgraph(), adg_dataflowgraph_with_extremities(), and array_dfg().