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 "effects-generic.h"
#include "transformations.h"
#include "control.h"
#include "sac.h"
#include "hyperplane.h"
#include "properties.h"
#include <limits.h>
Go to the source code of this file.
Data Structures | |
struct | MinMaxVar |
see if the statement can be SIMDized
and if so, to what extent it may benefit from unrolling
Definition at line 197 of file unroll.c.
References effective_variables_width(), FOREACH, get_subwordSize_from_opcode(), MATCH, match_statement(), match_type, MinMaxVar::max, MinMaxVar::min, OPCODE, opcode_vectorSize, opcodeClass_opcodes, and statement_instruction.
Referenced by full_simd_unroll_loop_filter().
Definition at line 90 of file unroll.c.
References effective_variables_width(), MinMaxVar::max, min, MinMaxVar::min, and statement_instruction.
Referenced by simple_simd_unroll_rate().
|
static |
duplicate effects for the copied statement
Definition at line 365 of file unroll.c.
References clone_statement(), copy_effects(), cp, do_simdizer_auto_tile_int_to_list(), do_symbolic_tiling(), expression_undefined_p, FOREACH, free_clone_context(), get_current_module_entity(), get_current_module_statement(), load_cumulated_rw_effects(), LOOP, loop_body, make_clone_context(), NIL, statement_loop(), and store_cumulated_rw_effects().
Referenced by simdizer_auto_tile_generate_all_tests().
Definition at line 354 of file unroll.c.
References CONS, EXPRESSION, int_to_expression(), NIL, out, and simple_simd_unroll_rate().
Referenced by do_simdizer_auto_tile_generate_all_tests().
If this is not a loop, keep on recursing
Can only simdize certain loops
can't do anything
look at each of the statements in the body
Decide between min and max unroll factor, and unroll
Do not recursively analyse the loop
Definition at line 218 of file unroll.c.
References compute_parallelism_factor(), gen_context_recurse, gen_true2(), get_bool_property(), instruction_loop, instruction_loop_p, loop_body, MinMaxVar::max, MinMaxVar::min, should_unroll_p(), simd_loop_unroll(), statement_domain, and statement_instruction.
Referenced by simd_unroll_as_needed().
Definition at line 339 of file unroll.c.
References CAR, ENDP, EXPRESSION, gen_last(), get_referenced_entities(), indices, reference_indices, set_free(), set_union(), and x.
Referenced by simdizer_auto_tile().
Definition at line 349 of file unroll.c.
References CONS, STATEMENT, and statement_loop_p().
Referenced by simdizer_auto_tile().
bool loop_auto_unroll | ( | const char * | mod_name | ) |
do the job
mod_name | od_name |
Definition at line 270 of file unroll.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, entity_undefined_p, find_label_entity(), find_loop_from_label(), get_current_module_statement(), get_string_property_or_ask(), module_name_to_entity(), module_reorder(), pips_assert, pips_user_error, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), simple_simd_unroll_loop_filter(), statement_consistent_p(), and statement_undefined_p.
|
static |
Definition at line 53 of file unroll.c.
References CAR, CDR, instruction_sequence, instruction_tag, is_instruction_call, is_instruction_goto, is_instruction_loop, is_instruction_sequence, is_instruction_test, is_instruction_unstructured, is_instruction_whileloop, NIL, sequence_statements, STATEMENT, and statement_instruction.
Referenced by full_simd_unroll_loop_filter(), and simple_simd_unroll_loop_filter().
Definition at line 101 of file unroll.c.
References AddEntityToCurrentModule(), do_loop_unroll(), entity_to_expression(), entity_undefined, entity_undefined_p, expression_integer_value(), expression_normalized, free_expression(), full_loop_unroll(), get_bool_property(), insert_statement(), intptr_t, loop_index, loop_normalize_statement(), loop_range, make_assign_statement(), make_new_index_entity(), NORMALIZE_EXPRESSION, normalized_complex_p, range_lower, range_to_expression(), range_to_nbiter, range_upper, set_bool_property(), simplify_expression(), and statement_loop().
Referenced by full_simd_unroll_loop_filter(), and simple_simd_unroll_loop_filter().
|
static |
Choose algorithm to use, and use it
Definition at line 251 of file unroll.c.
References db_get_memory_resource(), full_simd_unroll_loop_filter(), gen_null(), gen_recurse, get_bool_property(), reset_simd_operator_mappings(), reset_simd_treematch(), set_simd_operator_mappings(), set_simd_treematch(), simple_simd_unroll_loop_filter(), and statement_domain.
Referenced by simdizer_auto_unroll().
bool simdizer_auto_tile | ( | const char * | module_name | ) |
do the job
retrieve loop indices that are referenced as last element
build tests
iterate over all possible combination of tests
create the if's recursively
validate
module_name | odule_name |
Definition at line 409 of file unroll.c.
References CAR, db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, entity_intrinsic(), entity_undefined_p, expression_undefined, find_label_entity(), find_loop_from_label(), FOREACH, gather_local_indices(), gen_context_recurse, gen_copy_seq(), gen_free_list(), gen_length(), gen_recurse, gen_remove_once(), gen_true(), gen_true2(), get_current_module_statement(), get_string_property_or_ask(), GREATER_THAN_OPERATOR_NAME, indices, int_to_expression(), keep_loop_indices(), loop_index, loop_label, loop_range, loops, MakeBinaryCall(), module_name(), module_name_to_entity(), module_reorder(), NIL, perfectly_nested_loop_p(), pips_user_error, POP, range_to_expression(), range_to_nbiter, reference_domain, reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), set_assign_list(), set_belong_p(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), set_free(), set_make(), set_pointer, simdizer_auto_tile_generate_all_tests(), simple_simd_unroll_rate(), STATEMENT, statement_domain, statement_loop(), statement_undefined_p, and stmt_rm_labels().
|
static |
Definition at line 400 of file unroll.c.
References do_simdizer_auto_tile_generate_all_tests().
Referenced by simdizer_auto_tile().
bool simdizer_auto_unroll | ( | char * | mod_name | ) |
mod_name | od_name |
Definition at line 310 of file unroll.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, module_name_to_entity(), module_reorder(), pips_assert, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), simd_unroll_as_needed(), and statement_consistent_p().
If this is not a loop, keep on recursing
Can only simdize certain loops
can't do anything
Unroll as many times as needed by the variables width
Do not recursively analyse the loop
Definition at line 173 of file unroll.c.
References instruction_loop, instruction_loop_p, loop_body, should_unroll_p(), simd_loop_unroll(), simple_simd_unroll_rate(), and statement_instruction.
Referenced by loop_auto_unroll(), and simd_unroll_as_needed().
Compute variable size
Decide between min and max unroll factor
Round up varwidth to a power of 2
Unroll as many times as needed by the variables width
Definition at line 141 of file unroll.c.
References compute_variable_size(), gen_context_recurse, gen_true2(), get_bool_property(), get_int_property(), loop_body, MinMaxVar::max, MinMaxVar::min, and statement_domain.
Referenced by do_simdizer_auto_tile_int_to_list(), simdizer_auto_tile(), and simple_simd_unroll_loop_filter().
|
static |
Definition at line 404 of file unroll.c.
References statement_remove_useless_label().
Referenced by simdizer_auto_tile().