PIPS
|
#include "local.h"
Go to the source code of this file.
Functions | |
static void | flint_initialize_statement_def_use_variables (graph dependence_graph) |
Build the tables relating a statement with the variables it uses that have been initialized elsewhere. More... | |
static void | flint_free_statement_def_use_variables () |
Remove the flint_statement_def_use_variables data structure: More... | |
static bool | flint_variable_uninitialize_elsewhere (statement s, entity a_variable) |
Return true if a_variable is not initialized elsewhere: More... | |
static bool | flint_check_uninitialized_variables_in_statement (statement s) |
Warn about uninitialized variables in this statement: More... | |
void | flint_uninitialized_variables (graph dependence_graph, statement module_stat) |
Warn about conservatively uninitialized variables in the module: More... | |
Variables | |
static hash_table | flint_statement_def_use_variables |
static bool | flint_no_uninitialized_variable_ouput_yet |
Warn about uninitialized variables in this statement:
It appears that effects are packed by statement number or ordering. I assume that to factorize the prettyprint:
Nothing has been output yet: add a banner:
Go on recursion...
Definition at line 167 of file uninitialized_variables.c.
References a_variable, action_read_p, EFFECT, effect_action, effect_any_reference, entity_minimal_name(), flint_no_uninitialized_variable_ouput_yet, flint_variable_uninitialize_elsewhere(), load_proper_rw_effects_list(), MAP, ORDERING_NUMBER, ORDERING_STATEMENT, raw_flint_message(), reference_variable, statement_number, and statement_ordering.
Referenced by flint_uninitialized_variables().
|
static |
Remove the flint_statement_def_use_variables data structure:
Definition at line 133 of file uninitialized_variables.c.
References flint_statement_def_use_variables, HASH_MAP, hash_table_free(), and set_free().
Referenced by flint_uninitialized_variables().
|
static |
Build the tables relating a statement with the variables it uses that have been initialized elsewhere.
This function is heavily inspired by build_statement_to_statement_dependence_mapping() in the use-def elimination transformation:
Try to find at least one of the use-def chains between s and a successor:
Something is useful for the current statement if it writes something that is used in the current statement:
The dependance is not a use-def one, look forward...
FI: it looks more like a def-use...
Mark that we will visit the node that defined a source for this statement, if not already visited:
FI: in Fortran, with static aliasing, this is not really safe. a_variable is not uniquely defined
It is the first dependence found for use. Create the set.
Mark the fact that s2 create something useful for s1:
One use-def is enough for this variable couple:
Definition at line 46 of file uninitialized_variables.c.
References a_variable, action_read_p, action_write_p, CONFLICT, conflict_sink, conflict_source, dependence_graph, dg_arc_label_conflicts, dg_vertex_label_statement, effect_action, effect_any_reference, entity_minimal_name(), flint_statement_def_use_variables, FOREACH, fprintf(), graph_vertices, hash_get(), hash_pointer, hash_put(), hash_table_make(), HASH_UNDEFINED_VALUE, ifdebug, pips_debug, print_words(), reference_variable, s1, set_add_element(), set_make(), set_pointer, statement_ordering, SUCCESSOR, successor_arc_label, successor_vertex, VERTEX, vertex_successors, vertex_to_statement(), vertex_vertex_label, and words_effect().
Referenced by flint_uninitialized_variables().
Warn about conservatively uninitialized variables in the module:
dependence_graph | ependence_graph |
module_stat | odule_stat |
Definition at line 210 of file uninitialized_variables.c.
References dependence_graph, flint_check_uninitialized_variables_in_statement(), flint_free_statement_def_use_variables(), flint_initialize_statement_def_use_variables(), flint_no_uninitialized_variable_ouput_yet, gen_null(), gen_recurse, raw_flint_message(), and statement_domain.
Referenced by flinter().
Return true if a_variable is not initialized elsewhere:
There is no variable for this statement with previously initialized value. Just return TRUE:
OK, looks like the variable have been previously initialized:
Definition at line 147 of file uninitialized_variables.c.
References a_variable, flint_statement_def_use_variables, hash_get(), HASH_UNDEFINED_VALUE, and set_belong_p().
Referenced by flint_check_uninitialized_variables_in_statement().
|
static |
Definition at line 37 of file uninitialized_variables.c.
Referenced by flint_check_uninitialized_variables_in_statement(), and flint_uninitialized_variables().
|
static |
Definition at line 36 of file uninitialized_variables.c.
Referenced by flint_free_statement_def_use_variables(), flint_initialize_statement_def_use_variables(), and flint_variable_uninitialize_elsewhere().