PIPS
|
provide several layour for program constants grouping More...
#include <ctype.h>
#include "genC.h"
#include "ri-util.h"
#include "effects.h"
#include "effects-util.h"
#include "pipsdbm.h"
#include "resources.h"
#include "properties.h"
#include "misc.h"
#include "control.h"
#include "effects-generic.h"
#include "effects-convex.h"
#include "accel-util.h"
Go to the source code of this file.
Data Structures | |
struct | grouping_context |
Enumerations | |
enum | grouping_layout { TERAPIX_GROUPING , GROUPING_UNDEFINED } |
Variables | |
static entity | constant_holder |
provide several layour for program constants grouping
Definition in file group_constants.c.
enum grouping_layout |
Do not touch to the prettyprint control list.
Might be better to avoid it... at least for functions if not control units.
Definition at line 338 of file group_constants.c.
References call_function, ENTITY_CONTINUE_P, and f().
Referenced by group_constants().
Definition at line 178 of file group_constants.c.
References basic_undefined, CAR, CDR, do_group_basics_maximum_reduce(), ENDP, ENTITY, entity_basic(), and gen_reduce().
Referenced by do_group_constants_terapix().
|
static |
Definition at line 173 of file group_constants.c.
References basic_maximum(), CAR, ENTITY, and entity_basic().
Referenced by do_group_basics_maximum().
|
static |
Definition at line 47 of file group_constants.c.
References call_function, entity_initial, exp, expression_call(), expression_call_p(), get_bool_property(), set_add_element(), value_constant_p, and value_symbolic_p.
Referenced by group_constants().
as of now, put everything in an array, no matter of the real type, yes it is horrible, but it matches my needs for terapix, where everything as the same type later on, you may want to use a structure to pass parameters
Definition at line 320 of file group_constants.c.
References do_group_constants_terapix(), get_grouping_layout(), GROUPING_UNDEFINED, pips_user_error, and TERAPIX_GROUPING.
Referenced by group_constants().
it may not be possible to initialize statically the array, so use loop initialization to be more general
Definition at line 251 of file group_constants.c.
References AddLocalEntityToDeclarations(), basic_overloaded_p, basic_undefined_p, compare_entities(), CONS, constant_holder, copy_basic(), copy_expression(), DEFAULT_INTEGER_TYPE_SIZE, DIMENSION, dimension_to_range(), do_group_basics_maximum(), do_group_count_elements(), do_grouping_filter_out_self(), do_grouping_replace_reference_by_expression(), ENTITY, entity_constant_p, entity_empty_label(), entity_scalar_p(), entity_to_expression(), entity_type, entity_variable_p, EXPRESSION, FOREACH, gen_copy_seq(), gen_free_list(), gen_nreverse(), get_current_module_entity(), get_string_property(), indices, insert_statement(), instruction_to_statement(), int_to_expression(), make_assign_statement(), make_basic_int(), make_block_statement(), make_dimension(), make_execution_sequential(), make_expression_list, make_instruction_loop(), make_loop(), make_new_array_variable_with_prefix(), make_new_scalar_variable_with_prefix(), make_op_exp(), make_reference(), max, MINUS_OPERATOR_NAME, NIL, PLUS_OPERATOR_NAME, reference_indices, reference_offset(), reference_to_expression(), replace_entity_by_expression_with_filter(), set_to_sorted_list(), SizeOfDimensions(), STATEMENT, type_variable, ultimate_type(), and variable_dimensions.
Referenced by do_group_constants().
|
static |
Definition at line 193 of file group_constants.c.
References do_group_count_elements_reduce(), gen_reduce(), and int_to_expression().
Referenced by do_group_constants_terapix().
|
static |
Definition at line 184 of file group_constants.c.
References CAR, copy_expression(), ENTITY, entity_constant_p, entity_scalar_p(), entity_type, entity_variable_p, int_to_expression(), make_op_exp(), PLUS_OPERATOR_NAME, SizeOfDimensions(), type_variable, ultimate_type(), and variable_dimensions.
Referenced by do_group_count_elements().
gather all entities that are read and constant in statement s
in the set of
constant entities
first gather all written entities
then search among all read and not written variables those who have constant phis
we have found the right vector, now check for other vectors
check the size too : small means mask
then prune this set, because it contains the preconditions too
eventually filter out some entities involved in range computation
Definition at line 84 of file group_constants.c.
References contrainte_succ, contrainte_vecteur, do_group_statement_constant_filter(), do_group_statement_constant_prune(), EXPRESSION, expression_integer_value(), expression_to_entity(), FOREACH, free_expression(), gen_context_recurse, gen_free_list(), gen_null2(), get_bool_property(), intptr_t, load_rw_effects_list(), polynome_free(), polynome_to_expression(), POLYNOME_UNDEFINED_P, range_domain, ref, reference_indices, reference_variable, REGION, region_any_reference, region_enumerate(), region_system, regions_read_regions(), regions_write_regions(), sc_dup(), sc_transform_eg_in_ineg(), set_add_element(), set_belong_p(), set_free(), set_make(), set_pointer, VALUE_ZERO, Svecteur::var, VARIABLE_DEFINED_P, vect_coeff(), vect_del_var(), vect_rm(), and vect_size().
Referenced by group_constants().
remove entities involved in a range from the set of constants
Definition at line 63 of file group_constants.c.
References get_referenced_entities(), ref, set_difference(), and set_free().
Referenced by do_group_statement_constant().
remove entities that are never referenced by st
from s
Definition at line 75 of file group_constants.c.
References entity_not_constant_or_intrinsic_p(), get_referenced_entities_filtered(), not_type_chunk_p(), ref, set_free(), and set_intersection().
Referenced by do_group_statement_constant().
|
static |
Definition at line 205 of file group_constants.c.
References constant_holder, exp, expression_reference(), expression_reference_p(), gen_get_ancestor(), get_bool_property(), range_domain, ref, reference_variable, and same_entity_p().
Referenced by do_group_constants_terapix(), and do_grouping_filter_out_self2().
|
static |
Definition at line 217 of file group_constants.c.
References do_grouping_filter_out_self().
Referenced by do_grouping_replace_reference_by_expression().
|
static |
Definition at line 245 of file group_constants.c.
References do_grouping_filter_out_self2(), do_grouping_replace_reference_by_expression_walker(), expression_domain, gen_context_recurse, and offset.
Referenced by do_group_constants_terapix().
|
static |
compute new index
perform substitution
Definition at line 228 of file group_constants.c.
References copy_expression(), exp, expression_reference(), expression_reference_p(), gen_full_free_list(), make_expression_list, make_op_exp(), grouping_context::new, grouping_context::offset, grouping_context::old, PLUS_OPERATOR_NAME, ref, reference_indices, reference_offset(), reference_variable, and same_entity_p().
Referenced by do_grouping_replace_reference_by_expression().
|
static |
Definition at line 166 of file group_constants.c.
References get_string_property(), GROUPING_UNDEFINED, same_string_p, and TERAPIX_GROUPING.
Referenced by do_group_constants().
Definition at line 198 of file group_constants.c.
References get_bool_property(), and pips_assert.
Referenced by group_constants().
bool group_constants | ( | const | string | ) |
Dependences for accel-util.h.
cproto-generated files group_constants.c
prelude
f entities
gather statement constants
gather constants
pack all constants and perform replacement
validate
ostlude
module_name | odule_name |
Definition at line 347 of file group_constants.c.
References call_domain, db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, declaration_filter(), do_group_constant_entity(), do_group_constants(), do_group_statement_constant(), expression_domain, find_statement_from_label_name(), gen_context_multi_recurse(), gen_false(), gen_null(), gen_true(), get_current_module_statement(), get_string_property(), group_constant_range_filter(), module_name(), module_name_to_entity(), module_reorder(), range_domain, reference_domain, reset_current_module_entity(), reset_current_module_statement(), reset_rw_effects(), set_current_module_entity(), set_current_module_statement(), set_free(), set_make(), set_pointer, set_rw_effects(), and statement_undefined_p.
|
static |
Definition at line 70 of file group_constants.c.
References INSTANCE_OF.
Referenced by do_group_statement_constant_prune().
|
static |
Definition at line 204 of file group_constants.c.
Referenced by do_group_constants_terapix(), and do_grouping_filter_out_self().