PIPS
|
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "resources.h"
#include "misc.h"
#include "ri-util.h"
#include "effects-util.h"
#include "pipsdbm.h"
#include "reductions.h"
#include "expressions.h"
#include "dg.h"
#include "graph.h"
#include "ricedg.h"
#include "control.h"
Go to the source code of this file.
Typedefs | |
typedef dg_arc_label | arc_label |
typedef dg_vertex_label | vertex_label |
Functions | |
static void | do_reduction_propagation (graph dg) |
sg: this function does a huge pattern matching :) and is not very smart More... | |
bool | reduction_propagation (const char *mod_name) |
now try to backward propagate the reduction, if it is meaningful. More... | |
static reference | guess_potential_reduction (successor su, conflict *relevant) |
static bool | potential_reduction_substitution_valid_p (list sus, conflict legal_conflict, reference ref) |
static bool | do_reduction_detection (graph dg) |
sg: this function does a huge pattern matching :) and is not very smart More... | |
bool | reduction_detection (const char *mod_name) |
typedef dg_arc_label arc_label |
Definition at line 44 of file propagation.c.
typedef dg_vertex_label vertex_label |
Definition at line 45 of file propagation.c.
sg: this function does a huge pattern matching :) and is not very smart
lazy ... s = f(sigma)
lazier , only scalar on lhs
lazier, only intrinsic call on rhs
look for a potential reduction
even lazier
verify validity of the substitution
Definition at line 187 of file propagation.c.
References assignment_statement_p(), binary_call_lhs, binary_call_rhs, call_function, conflict_undefined, dg, entity_user_name(), expression_call(), expression_call_p(), expression_reference(), expression_scalar_p, FOREACH, get_current_module_entity(), get_current_module_statement(), graph_vertices, guess_potential_reduction(), intrinsic_entity_p(), pips_debug, potential_reduction_substitution_valid_p(), reference_equal_p(), reference_undefined, reference_undefined_p, reference_variable, RemoveLocalEntityFromDeclarations(), replace_reference(), seen, set_add_element(), set_belong_p(), set_free(), set_make(), set_pointer, statement_call(), SUCCESSOR, successor_vertex, VERTEX, vertex_successors, and vertex_to_statement().
Referenced by reduction_detection().
|
static |
sg: this function does a huge pattern matching :) and is not very smart
lazy ... s = f(sigma)
lazier
even lazier
we got some simple reductions here, try to propagate them backward
Definition at line 57 of file propagation.c.
References assignment_statement_p(), binary_call_lhs, binary_call_rhs, call_arguments, call_function, CAR, CONFLICT, conflict_sink, conflict_source, copy_reference(), dg, dg_arc_label_conflicts, effect_any_reference, effect_read_p, effect_write_p, EXPRESSION, expression_call(), expression_call_p(), expression_reference(), expression_reference_p(), expression_scalar_p, expression_syntax, FOREACH, free_expression(), free_reference(), gen_length(), graph_vertices, load_proper_reductions(), pips_user_warning, REDUCTION, reduction_op, reduction_operator_entity(), reduction_reference, reductions_list, reference_equal_p(), reference_scalar_p(), reference_to_expression(), reference_undefined, reference_variable, replace_entity_by_expression(), replace_reference(), same_entity_p(), seen, set_add_element(), set_belong_p(), set_free(), set_make(), set_pointer, statement_call(), SUCCESSOR, successor_arc_label, successor_vertex, syntax_reference, VERTEX, vertex_successors, and vertex_to_statement().
Referenced by reduction_propagation().
this looks like a potential reduction to me
Definition at line 154 of file propagation.c.
References anywhere_effect_p(), CONFLICT, conflict_sink, conflict_source, dg_arc_label_conflicts, effect_any_reference, effect_read_p, effect_write_p, entity_user_name(), FOREACH, out, pips_debug, reference_scalar_p(), reference_undefined, reference_variable, and successor_arc_label.
Referenced by do_reduction_detection().
|
static |
sus | f successors |
Definition at line 172 of file propagation.c.
References CONFLICT, conflict_sink, conflict_source, dg_arc_label_conflicts, effect_any_reference, FOREACH, ref, reference_equal_p(), SUCCESSOR, and successor_arc_label.
Referenced by do_reduction_detection().
bool reduction_detection | ( | const char * | mod_name | ) |
get the resources
do the job
validate computation
update/release resources
mod_name | od_name |
Definition at line 245 of file propagation.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, dependence_graph, do_reduction_detection(), module_name_to_entity(), module_reorder(), reset_current_module_entity(), reset_current_module_statement(), reset_ordering_to_statement(), set_current_module_entity(), set_current_module_statement(), and set_ordering_to_statement().
bool reduction_propagation | ( | const char * | mod_name | ) |
now try to backward propagate the reduction, if it is meaningful.
the pattern checked is a = b + c; r = r + a; which should become r = r +b ; r = r +c ;
get the resources
do the job
validate computation
update/release resources
mod_name | od_name |
Definition at line 125 of file propagation.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, dependence_graph, do_reduction_propagation(), get_current_module_statement(), module_name_to_entity(), module_reorder(), reset_current_module_entity(), reset_current_module_statement(), reset_ordering_to_statement(), reset_proper_reductions(), set_current_module_entity(), set_current_module_statement(), set_ordering_to_statement(), set_proper_reductions(), and simplify_c_operator().