PIPS
|
Defines a static mapping from orderings to statements. More...
#include <stdio.h>
#include "linear.h"
#include "genC.h"
#include "ri.h"
#include "misc.h"
#include "ri-util.h"
Go to the source code of this file.
Functions | |
bool | ordering_to_statement_initialized_p () |
Test if the ordering to statement is initialized. More... | |
void | print_ordering_to_statement (void) |
Dump the ordering with the corresponding statement address. More... | |
static statement | apply_ordering_to_statement (hash_table ots, _int o) |
Get the statement from an ordering in a given ordering to statement table. More... | |
statement | ordering_to_statement (int o) |
Get the statement associated to a given ordering. More... | |
static bool | add_ordering_of_the_statement (statement stat, hash_table ots) |
Add the statement for its ordering, if any, in the hash-map. More... | |
bool | add_ordering_of_the_statement_to_current_mapping (statement stat) |
Add the statement for its ordering, if any, in the hash-map. More... | |
bool | overwrite_ordering_of_the_statement_to_current_mapping (statement stat) |
Overwrite the statement for its ordering, if any, in the hash-map. More... | |
static void | rinitialize_ordering_to_statement (hash_table ots, statement s) |
Initialize the ordering to statement mapping by iterating from a given statement. More... | |
hash_table | set_ordering_to_statement (statement s) |
To be used instead of initialize_ordering_to_statement() to make sure that the hash table ots is in sync with the current module. More... | |
void | reset_ordering_to_statement (void) |
Reset the mapping from ordering to statement. More... | |
Variables | |
static hash_table | OrderingToStatement = hash_table_undefined |
a hash table to map orderings (integer) to statements (pointers) assumed to be valid for the current module returned by get_current_module_entity(). More... | |
Defines a static mapping from orderings to statements.
must be initialize_ordering_to_statement, and afterwards reset_ordering_to_statement.
For information on ordering, see control/reorder.c
Definition in file ordering.c.
|
static |
Add the statement for its ordering, if any, in the hash-map.
Definition at line 120 of file ordering.c.
References hash_put(), pips_assert, statement_ordering, and STATEMENT_ORDERING_UNDEFINED.
Referenced by rinitialize_ordering_to_statement().
Add the statement for its ordering, if any, in the hash-map.
stat | tat |
Definition at line 130 of file ordering.c.
References hash_put(), OrderingToStatement, pips_assert, statement_ordering, and STATEMENT_ORDERING_UNDEFINED.
|
static |
Get the statement from an ordering in a given ordering to statement table.
Definition at line 87 of file ordering.c.
References hash_get(), hash_table_undefined, ORDERING_NUMBER, ORDERING_STATEMENT, pips_assert, pips_internal_error, STATEMENT_ORDERING_UNDEFINED, and statement_undefined.
Referenced by ordering_to_statement().
Get the statement associated to a given ordering.
It is useful for retrieve the statements associated with the arcs in the dependence graphs for example.
Definition at line 111 of file ordering.c.
References apply_ordering_to_statement(), and OrderingToStatement.
Referenced by adg_number_to_statement(), adg_only_call_WR_dependence(), adg_reorder_statement_number(), adg_vertex_to_statement(), AK_ignore_this_vertex(), guard_elimination(), imprime_quast(), LowlinkCompute(), pipsdbm_read_statement_function(), pipsdbm_read_statement_mapping(), process_reduced_loops(), and vertex_to_statement().
bool ordering_to_statement_initialized_p | ( | void | ) |
Test if the ordering to statement is initialized.
Definition at line 63 of file ordering.c.
References hash_table_undefined, and OrderingToStatement.
Referenced by module_body_reorder(), module_reorder(), and step_parser().
Overwrite the statement for its ordering, if any, in the hash-map.
The difference with add_ordering_of_the_statement_to_current_mapping() is that this version won't trigger a warning if the mapping already exist
stat | tat |
Definition at line 142 of file ordering.c.
References hash_overwrite(), OrderingToStatement, pips_assert, statement_ordering, and STATEMENT_ORDERING_UNDEFINED.
void print_ordering_to_statement | ( | void | ) |
Dump the ordering with the corresponding statement address.
Definition at line 71 of file ordering.c.
References fprintf(), HASH_MAP, ORDERING_NUMBER, ORDERING_STATEMENT, OrderingToStatement, and statement_identification().
Referenced by prettyprint_dependence_graph(), prettyprint_dot_dependence_graph(), and xml_Chain_Graph().
void reset_ordering_to_statement | ( | void | ) |
Reset the mapping from ordering to statement.
Definition at line 185 of file ordering.c.
References hash_table_free(), hash_table_undefined, OrderingToStatement, and pips_assert.
Referenced by add_aliases_for_current_caller(), alias_check(), array_bound_check_bottom_up(), array_bound_check_interprocedural(), array_bound_check_top_down(), bdsc_code_instrumentation(), chains(), copy_value_of_write(), copy_value_of_write_with_cumulated_regions(), deatomizer(), delay_communications(), delay_load_communications(), delay_store_communications(), do_it(), dsc_code_parallelization(), eliminate_original_variables(), flinter(), forward_substitute(), hbdsc_parallelization(), if_conversion_compact(), impact_check(), invariant_code_motion(), module_reorder(), mpi_conversion(), mpi_task_generation(), old_array_bound_check_instrumentation(), openmp_task_generation(), parallel_tiling(), pipsdbm_read_statement_function(), pipsdbm_read_statement_mapping(), print_dependence_or_chains_graph(), print_dot_dependence_or_chains_graph(), print_filtered_dg_or_dvdg(), print_loopnest_dependence_cone(), process_reduced_loops(), reduction_detection(), reduction_propagation(), redundant_load_store_elimination(), regions_to_loops(), rice_dependence_graph(), scalar_renaming(), sequence_dependence_graph(), simdizer(), spire_distributed_unstructured_to_structured(), spire_shared_unstructured_to_structured(), step_analyse(), step_parser(), used_before_set(), variable_replication(), wp65(), and xml_Chains().
|
static |
Initialize the ordering to statement mapping by iterating from a given statement.
ots | is ordering to statement hash-table to fill |
s | is the statement to start with. Typically the module statement. |
Simplify this with a gen_recurse to avoid dealing with all the new cases by hand (for-loops...).
Apply a prefix hash-map add to be compatible with previous implementation and avoid different hash-map iteration later.
Definition at line 159 of file ordering.c.
References add_ordering_of_the_statement(), gen_context_recurse, gen_null2(), and statement_domain.
Referenced by set_ordering_to_statement().
hash_table set_ordering_to_statement | ( | statement | s | ) |
To be used instead of initialize_ordering_to_statement() to make sure that the hash table ots is in sync with the current module.
Definition at line 172 of file ordering.c.
References hash_int, hash_table_make(), hash_table_undefined, OrderingToStatement, pips_assert, and rinitialize_ordering_to_statement().
Referenced by add_aliases_for_current_caller(), alias_check(), array_bound_check_bottom_up(), array_bound_check_interprocedural(), array_bound_check_top_down(), bdsc_code_instrumentation(), chains(), copy_value_of_write(), copy_value_of_write_with_cumulated_regions(), deatomizer(), delay_communications(), delay_load_communications(), delay_store_communications(), do_it(), dsc_code_parallelization(), eliminate_original_variables(), flinter(), forward_substitute(), hbdsc_parallelization(), if_conversion_compact(), impact_check(), invariant_code_motion(), module_reorder(), mpi_conversion(), mpi_task_generation(), old_array_bound_check_instrumentation(), openmp_task_generation(), parallel_tiling(), pipsdbm_read_statement_function(), pipsdbm_read_statement_mapping(), print_dependence_or_chains_graph(), print_dot_dependence_or_chains_graph(), print_filtered_dg_or_dvdg(), print_loopnest_dependence_cone(), process_reduced_loops(), reduction_detection(), reduction_propagation(), redundant_load_store_elimination(), regions_to_loops(), rice_dependence_graph(), scalar_renaming(), sequence_dependence_graph(), simdizer(), spire_distributed_unstructured_to_structured(), spire_shared_unstructured_to_structured(), step_analyse(), used_before_set(), variable_replication(), wp65(), and xml_Chains().
|
static |
a hash table to map orderings (integer) to statements (pointers) assumed to be valid for the current module returned by get_current_module_entity().
This is assumed to hold when pipsmake issues a request to lower level libraries.
db_get_current_module() returns the module used in the request to pipsmake and is usually different.
It would be possible to expose a lower level interface to manage several ordering_to_statement hash tables
Definition at line 58 of file ordering.c.
Referenced by add_ordering_of_the_statement_to_current_mapping(), ordering_to_statement(), ordering_to_statement_initialized_p(), overwrite_ordering_of_the_statement_to_current_mapping(), print_ordering_to_statement(), reset_ordering_to_statement(), and set_ordering_to_statement().