PIPS
|
Go to the source code of this file.
Typedefs | |
typedef enum dead_test | dead_test |
Enumerations | |
enum | dead_test { nothing_about_test , then_is_dead , else_is_dead , nothing_about_test , then_is_dead , else_is_dead } |
Warning! Do not modify this file that is automatically generated! More... | |
Variables | |
entity | selected_label |
interactive_loop_transformation.c More... | |
Definition at line 1 of file transformations.h.
enum dead_test |
Warning! Do not modify this file that is automatically generated!
Modify src/Libs/transformations/transformations-local.h instead, to add your own modifications. header file built by cproto transformations-local.h What is returned by dead_test_filter :
Enumerator | |
---|---|
nothing_about_test | |
then_is_dead | |
else_is_dead | |
nothing_about_test | |
then_is_dead | |
else_is_dead |
Definition at line 35 of file transformations.h.
bool array_privatizer | ( | const | string | ) |
string | odule_name |
bool array_resizing_bottom_up | ( | char * | ) |
bool array_resizing_full_bottom_up | ( | char * | ) |
bool array_resizing_statistic | ( | const | string | ) |
string | odule_name |
bool array_resizing_top_down | ( | const char * | ) |
bool array_section_privatizer | ( | const | string | ) |
string | odule_name |
bool cast_at_call_sites | ( | const | string | ) |
string | od_name |
bool check_initialize_vla_with_effects | ( | const | string | ) |
string | odule_name |
bool check_initialize_vla_with_preconditions | ( | const | string | ) |
string | odule_name |
bool check_initialize_vla_with_regions | ( | const | string | ) |
string | odule_name |
A phase to remove the declaration of useless variables.
It recursively calls statement_remove_unused_declarations on all module statement
[in] | module_name | is the name of the module to process |
prelude
first remove any statement that writes only variable that are never read
body
ostlude
module_name | odule_name |
Definition at line 155 of file declarations.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, gen_recurse, gen_true(), get_current_module_entity(), get_current_module_statement(), module_clean_declarations(), module_name(), module_name_to_entity(), remove_unread_variables(), reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), and statement_domain.
bool clean_labels | ( | const | string | ) |
string | od_name |
Definition at line 238 of file util.c.
References clean_statement_label(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, gen_null(), gen_recurse, module_name_to_entity(), reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), statement_domain, and strdup().
bool coarse_grain_parallelization | ( | const | string | ) |
coarse_grain_parallelization.c
string | odule_name |
bool coarse_grain_parallelization_with_reduction | ( | const | string | ) |
string | odule_name |
bool constant_array_scalarization | ( | const | string | ) |
string | odule_name |
bool dead_code_elimination | ( | char * | ) |
bool dead_code_elimination_with_out_regions | ( | char * | ) |
bool declarations_privatizer | ( | const | string | ) |
string | od_name |
void do_loop_unroll | ( | statement | loop_statement, |
int | rate, | ||
void(*)(statement) | statement_post_processor | ||
) |
loop_statement | oop_statement |
rate | ate |
Definition at line 714 of file loop_unroll.c.
References do_loop_unroll_with_epilogue(), do_loop_unroll_with_prologue(), expression_integer_value(), get_bool_property(), instruction_loop, instruction_loop_p, intptr_t, loop_range, pips_assert, pips_debug, range_increment, and statement_instruction.
Referenced by loop_unroll(), and simd_loop_unroll().
remove all entities declared in module but never used in s
module | module to check |
s | statement where entites may be used |
to keep backward compatibility with hpfc
module | odule |
Definition at line 177 of file util.c.
References entity_declarations, entity_generate_missing_declarations(), entity_undefined, entity_undefined_p, fortran_module_p(), get_current_module_entity(), module, reset_current_module_entity(), same_entity_p(), set_current_module_entity(), and statement_clean_declarations_helper().
Referenced by compile_module(), and module_clean_declarations().
label | abel |
Definition at line 218 of file util.c.
References find_loop_from_label_walker(), flfl::found, gen_context_recurse, gen_null2(), flfl::label, loop_domain, and statement_undefined.
Referenced by full_unroll(), loop_auto_unroll(), loop_expansion(), loop_expansion_init(), loop_pragma(), module_loops(), print_loopnest_dependence_cone(), simdizer_auto_tile(), symbolic_tiling(), and unroll().
put a label on each doloop without label
module_name |
prelude
run loop labeler
validate
ostlude
module_name | odule_name |
Definition at line 191 of file interactive_loop_transformation.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, flag_loop(), gen_context_recurse, gen_true2(), get_current_module_statement(), flag_loop_param_t::loops, make_callees(), module_name(), module_name_to_entity(), flag_loop_param_t::new_label_created, NIL, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), and statement_domain.
Pipsmake 'flatten_code' phase.
This function is be composed of several steps:
1 flatten declarations inside statement: declarations are moved as high as possible in the control structure; this may serialize parallel loops, but this pass was designed for sequential code.
2 clean_up_sequences: remove useless braces when they are nested.
3 unroll looops with statically known iteration number.
4 clean_up_sequences: remove useless braces when they are nested.
It is assumed that the function main statement will contain at least one local variable. This is used to preserve the scoping mechanism used by the parser. Thus, "void foo(void){{{}}}" cannot be flatten. Note that clean_up_sequences could be used first to avoid such cases. Function "void foo(void){{{extern int i;}}}" cannot be flatten either, but clean_up_sequences might help.
Is it a top-level entity?
module_name | odule_name |
Definition at line 648 of file flatten_code.c.
References clean_up_sequences(), code_declarations, db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, dependent_type_p(), ENTITY, entity_formal_p(), entity_initial, entity_local_name(), entity_type, entity_user_name(), FOREACH, gen_recurse, gen_true(), get_bool_property(), get_current_module_entity(), get_current_module_statement(), local_name_to_scope(), module, module_name(), module_name_to_entity(), module_reorder(), pips_debug, pips_user_warning, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), statement_domain, statement_flatten_declarations(), statement_purge_declarations(), strdup(), unroll_loops_in_statement(), and value_code.
bool force_loop_fusion | ( | const | string | ) |
string | odule_name |
bool force_register_declarations | ( | const char * | ) |
bool freeze_variables | ( | char * | ) |
void full_loop_unroll | ( | statement | loop_statement | ) |
get rid of the loop by body replication;
the loop body is replicated as many times as there are iterations
FI: could be improved to handle symbolic lower bounds (18 January 1993)
final loop body label
Start debug in Newgen
Validity of transformation should be checked
ie.: - pas d'effets de bords dans les expressions duplique'es
Instruction block is created and will contain everything
get rid of labels in loop body: don't worry, useful labels have been transformed into arcs by controlizer, you just loose loop labels. However, the label of the last statement in the loop body might be used by an outer loop and, in doubt, should be preserved.
FI: clone_statement() has been used above to perform flatten_code. Hence the declarations are no longer accessible from "transformed_stmt". And when dependent types are used, they are not updated.
Try to update dependent types. Too bad the declarations are scanned again and again.
Add the transformated old loop body (transformed_stmt) at the end of the loop
Generate a CONTINUE to carry the final loop body label in case an outer loop uses it
Generate a statement to reinitialize old index
SG: only needed if index is not private
Free old instruction and replace with block
FI: according to me, gen_copy_tree() does not create a copy sharing nothing with its actual parameter; if the free is executed, Pvecteur normalized_linear is destroyed (18 January 1993)
Do not forget to move forbidden information associated with block:
?? Bad condition
Stop debug in Newgen
loop_statement | oop_statement |
Definition at line 788 of file loop_unroll.c.
References clean_up_sequences(), clear_labels(), clone_statement(), CONS, copy_expression(), ENDP, ENTITY, entity_empty_label_p(), entity_in_list_p(), entity_initial, entity_to_expression(), entity_type, entity_undefined, expression_consistent_p(), expression_integer_value(), find_final_statement_label(), fix_sequence_statement_attributes(), FOREACH, free_clone_context(), free_expression(), free_instruction(), GEN_DBG_CHECK, gen_debug, gen_nconc(), gen_nreverse(), get_bool_property(), get_current_module_entity(), get_current_module_statement(), get_debug_level(), ifdebug, instruction_block, instruction_loop, int_to_expression(), intptr_t, label_local_name(), loop_body, loop_index, loop_label, loop_locals, loop_range, make_assign_statement(), make_clone_context(), make_continue_statement(), make_instruction_block(), make_ref_expr(), NIL, pips_assert, pips_debug, pips_user_error, print_statement(), range_increment, range_lower, range_upper, replace_entity_by_expression(), STATEMENT, statement_block_p, statement_consistent_p(), statement_declarations, statement_instruction, value_expression, and value_expression_p.
Referenced by apply_full_loop_unroll(), find_unroll_pragma_and_fully_unroll(), full_unroll(), simd_loop_unroll(), terapixify_loops(), unroll_loops_in_statement(), and unroll_recursive().
bool full_unroll | ( | const | string | ) |
user interaction
prelude
do the job
Reorder the module, because new statements have been generated.
ostlude
Reorder the module, because new statements have been generated.
string | od_name |
Definition at line 1077 of file loop_unroll.c.
References apply_full_loop_unroll(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, empty_string_p(), entity_undefined, entity_undefined_p, find_label_entity(), find_loop_from_label(), full_loop_unroll(), gen_null(), gen_recurse, get_string_property_or_ask(), module_name_to_entity(), module_reorder(), pips_debug, pips_user_error, pips_user_warning, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), statement_domain, statement_undefined, statement_undefined_p, string_undefined, and user_log().
bool full_unroll_pragma | ( | const | string | ) |
Keep track of effects on code
Perform the loop unrollings
Perform the transformation bottom up to reduce the scanning and the number of unrollings
Reorder the module, because new statements have been generated.
Provide statistics about changes performed
string | od_name |
Definition at line 1170 of file loop_unroll.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug(), debug_off, debug_on, find_unroll_pragma_and_fully_unroll(), gen_recurse, gen_true(), module_name_to_entity(), module_reorder(), number_of_requested_unrollings, number_of_unrolled_loops, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), statement_domain, statement_undefined, and user_log().
int get_vector_register_length | ( | void | ) |
int get_vector_register_number | ( | void | ) |
bool identity_elimination | ( | const char * | ) |
bool identity_elimination_with_points_to | ( | const char * | ) |
bool index_set_splitting | ( | const | string | ) |
string | odule_name |
bool induction_substitution | ( | const | string | ) |
string | odule_name |
bool initialize_vla_with_effects | ( | const char * | ) |
bool initialize_vla_with_preconditions | ( | const char * | ) |
bool initialize_vla_with_regions | ( | const char * | ) |
bool interactive_loop_transformation | ( | const char * | module_name, |
statement(*)(list, bool(*)(statement)) | loop_transformation | ||
) |
DBR_CODE will be changed: argument "pure" should take false but this would be useless since there is only one version of code; a new version will be put back in the data base after transforming the loops
Get the loop label from the user
Reorder the module, because new statements have been generated.
module_name | odule_name |
Definition at line 73 of file interactive_loop_transformation.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, entity_module_p(), entity_undefined_p, find_label_entity(), get_string_property_or_ask(), look_for_nested_loop_statements(), module, module_name(), module_name_to_entity(), module_reorder(), pips_assert, pips_user_error, reset_current_module_entity(), reset_current_module_statement(), selected_label, selected_loop_p(), set_current_module_entity(), set_current_module_statement(), statement_undefined, strdup(), and string_undefined_p.
Referenced by loop_hyperplane(), loop_tiling(), and parallel_loop_tiling().
bool internalize_parallel_code | ( | const | string | ) |
string | od_name |
bool limit_nested_parallelism | ( | const | string | ) |
string | odule_name |
bool limit_parallelism_using_complexity | ( | const | string | ) |
string | odule_name |
bool linearize_loop_range | ( | const char * | ) |
bool localize_declaration | ( | const | string | ) |
string | od_name |
bool loop_bound_minimization_with_out_regions | ( | const char * | ) |
Definition at line 753 of file loop_unroll.c.
References arguments_intersection(), ENDP, expression_integer_value(), gen_free_list(), get_string_property(), intptr_t, loop_body, loop_range, pips_debug, range_increment, range_lower, range_upper, statement_to_called_user_entities(), and string_to_user_modules().
Referenced by unroll_loops_in_statement().
bool loop_fusion | ( | char * | ) |
bool loop_fusion_with_regions | ( | char * | ) |
bool loop_interchange | ( | const | string | ) |
string | odule_name |
bool loop_normalize | ( | const | string | ) |
string | od_name |
void loop_normalize_statement | ( | statement | ) |
char* loop_pragma | ( | const char * | module_name, |
const char * | parent_loop | ||
) |
module_name | odule_name |
parent_loop | arent_loop |
Definition at line 225 of file interactive_loop_transformation.c.
References db_get_memory_resource(), entity_undefined_p, extensions_to_string(), find_label_entity(), find_loop_from_label(), get_current_module_statement(), module_name(), module_name_to_entity(), pips_user_error, reset_current_module_entity(), reset_current_module_statement(), safe_make(), set_current_module_entity(), set_current_module_statement(), statement_extensions, statement_undefined_p, strdup(), and string_undefined_p.
Sharing is (theoretically) avoided when the AST is built
Assumption:
compute the expression for the chunk size
make sure that the outer loop does not use a continue that will end up in the inner loop body
derive a new loop index (FI: only one name :-(
build the inner loop preserving the initial index set
update the outer loop
loop_statement | oop_statement |
chunk_size | hunk_size |
chunk_number | hunk_number |
Definition at line 64 of file strip_mine.c.
References AddEntityToDeclarations(), copy_expression(), debug(), DIVIDE_OPERATOR_NAME, entity_empty_label(), entity_intrinsic(), entity_to_expression(), entity_undefined, execution_sequential_p, expression_undefined, get_current_module_entity(), get_debug_level(), ifdebug, instruction_loop, instruction_to_statement(), int_to_expression(), is_execution_parallel, is_execution_sequential, is_instruction_loop, loop_body, loop_execution, loop_increment_value(), loop_index, loop_label, loop_range, loop_undefined, make_execution(), make_instruction(), make_loop(), make_new_index_entity(), make_op_exp(), make_range(), MakeBinaryCall(), MIN_OPERATOR_NAME, MINUS_OPERATOR_NAME, NIL, pips_assert, pips_debug, PLUS_OPERATOR_NAME, print_expression(), print_statement(), range_increment, range_lower, range_upper, statement_consistent_p(), statement_instruction, statement_undefined, user_error, and UU.
Referenced by do_kernelize(), and loop_chunk_size_and_strip_mine().
fallbacks on do_loop_unroll without statement post processing
loop_statement | oop_statement |
rate | ate |
Definition at line 748 of file loop_unroll.c.
References do_loop_unroll().
Referenced by unroll().
declarations.c
module | odule |
module_statement | odule_statement |
Definition at line 140 of file declarations.c.
References entity_clean_declarations(), gen_recurse, gen_true(), module, module_statement, statement_clean_declarations(), and statement_domain.
Referenced by clean_declarations(), and do_scalar_renaming().
char* module_loops | ( | const char * | module_name, |
const char * | parent_loop | ||
) |
gather the list of enclosing loops expect flag_loops has been called before
module_name | module we want the loops of |
parent_loop | null if we wat to gather outer loops, a loop_label if we want to gather enclosed loops |
this function is needed by pyps?
module_name | odule_name |
parent_loop | arent_loop |
Definition at line 259 of file interactive_loop_transformation.c.
References db_get_memory_resource(), empty_string_p(), entity_undefined_p, find_label_entity(), find_loop_from_label(), gen_context_recurse, gen_free_list(), gen_nreverse(), gen_null2(), get_current_module_statement(), list_to_string(), loop_body, loops, module_loops_walker(), module_name(), module_name_to_entity(), NIL, out, pips_user_error, reset_current_module_entity(), reset_current_module_statement(), safe_make(), set_current_module_entity(), set_current_module_statement(), statement_domain, statement_loop(), statement_undefined, and statement_undefined_p.
bool nest_parallelization | ( | const char * | ) |
bool partial_redundancy_elimination | ( | const | string | ) |
partial_redundancy_elimination.c
string | odule_name |
bool print_c_code | ( | const char * | module_name | ) |
C indentation thru indent.
module_name | odule_name |
Definition at line 2262 of file cprettyprinter.c.
References concatenate(), CPRETTY, db_build_file_resource_name(), db_get_current_workspace_directory(), db_get_memory_resource(), DB_PUT_FILE_RESOURCE, free(), INDENT, module_name(), safe_system(), and strdup().
bool print_code_privatized_regions | ( | const | string | ) |
string | odule_name |
bool print_crough | ( | const char * | module_name | ) |
save to file
module_name | odule_name |
Definition at line 2194 of file cprettyprinter.c.
References build_written_list(), c_code_string(), concatenate(), CROUGH, db_build_file_resource_name(), db_get_current_workspace_directory(), db_get_memory_resource(), DB_PUT_FILE_RESOURCE, debug_off, debug_on, effects_to_list(), entity_name, fprintf(), free(), gen_free_list(), gen_free_string_list(), l_entity, l_name, l_rename, l_type, l_written, module, module_name(), module_name_to_entity(), NIL, out, pips_debug, reset_current_module_entity(), reset_current_module_statement(), safe_fclose(), safe_fopen(), set_current_module_entity(), set_current_module_statement(), and strdup().
bool print_interface | ( | const char * | module_name | ) |
save to file
module_name | odule_name |
Definition at line 2151 of file cprettyprinter.c.
References concatenate(), db_build_file_resource_name(), db_get_current_workspace_directory(), db_get_memory_resource(), DB_PUT_FILE_RESOURCE, debug_off, debug_on, entity_name, fprintf(), free(), INTERFACE, interface_code_string(), module, module_name(), module_name_to_entity(), out, pips_debug, reset_current_module_entity(), reset_current_module_statement(), safe_fclose(), safe_fopen(), set_current_module_entity(), set_current_module_statement(), and strdup().
bool print_loops | ( | const | string | ) |
prelude
do the job
ostlude
string | odule_name |
Definition at line 152 of file interactive_loop_transformation.c.
References ADD_SENTENCE_TO_TEXT, callees_callees, concatenate(), db_build_file_resource_name(), db_get_current_workspace_directory(), db_get_memory_resource(), DB_PUT_FILE_RESOURCE, FOREACH, free(), free_text(), full, loops, MAKE_ONE_WORD_SENTENCE, make_text(), module_name(), module_name_to_entity(), NIL, print_text(), reset_current_module_entity(), reset_current_module_statement(), safe_fclose(), safe_fopen(), set_current_module_entity(), set_current_module_statement(), strdup(), and STRING.
bool print_parallelizedcray_code | ( | char * | ) |
bool privatize_module | ( | const | string | ) |
string | od_name |
bool privatize_module_even_globals | ( | const | string | ) |
string | od_name |
bool quick_scalarization | ( | const | string | ) |
string | odule_name |
bool recover_for_loop | ( | const | string | ) |
string | odule_name |
bool reduction_variable_expansion | ( | const char * | ) |
bool remove_useless_label | ( | const | string | ) |
string | odule_name |
Referenced by do_unfolding().
bool scalarization | ( | const | string | ) |
string | odule_name |
SG+EC 2010: The loop_label(statement_loop(s)) is kept for compatibility reasons but is invalid and should eventually be removed
Definition at line 63 of file interactive_loop_transformation.c.
References loop_label, selected_label, statement_label, statement_loop(), and statement_loop_p().
Referenced by interactive_loop_transformation(), and strip_mine().
bool set_return_type_as_typedef | ( | const | string | ) |
string | od_name |
bool simplify_control | ( | const | string | ) |
string | od_name |
bool simplify_control_directly | ( | const | string | ) |
string | od_name |
bool split_initializations | ( | const char * | module_name | ) |
Pipsmake 'split_initializations' phase.
Save modified code to database
module_name | odule_name |
Definition at line 742 of file flatten_code.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, get_current_module_statement(), module_name(), module_name_to_entity(), module_reorder(), pips_debug, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), statement_split_initializations(), and strdup().
void split_update_call | ( | call | c | ) |
Definition at line 772 of file flatten_code.c.
References ASSIGN_OPERATOR_NAME, basic_of_expression(), basic_pointer_p, binary_call_lhs, binary_call_rhs, call_arguments, call_function, call_to_expression(), call_undefined, CAR, CDR, copy_expression(), entity_intrinsic(), ENTITY_MINUS_C_P, ENTITY_PLUS_C_P, entity_undefined_p, exp, EXPRESSION, expression_syntax, FOREACH, free_basic(), free_expression(), ifdebug, MakeBinaryCall(), MINUS_OPERATOR_NAME, pips_debug, PLUS_OPERATOR_NAME, print_expression(), syntax_call, and update_operator_to_regular_operator().
Referenced by check_if_conv_call(), simd_supported_stat_p(), split_update_operator(), and split_update_operator_statement_walker().
bool split_update_operator | ( | const char * | module_name | ) |
Save modified code to database
module_name | odule_name |
Definition at line 834 of file flatten_code.c.
References call_domain, db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, gen_multi_recurse(), gen_true(), get_current_module_statement(), module_name(), module_name_to_entity(), pips_debug, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), split_update_call(), split_update_operator_statement_walker(), and statement_domain.
void statement_clean_declarations | ( | statement | s | ) |
cproto-generated files
util.c
cproto-generated files
s | statement to check |
Definition at line 164 of file util.c.
References statement_block_p, statement_clean_declarations_helper(), and statement_declarations.
Referenced by module_clean_declarations().
For the time being, we handle only blocks with declarations
Can we find out what the local scope of statement s is?
FI: Shouldn't it be "0`"?
current scope for se
module | odule |
Definition at line 509 of file flatten_code.c.
References compute_renamings(), ENTITY, entity_declarations, entity_local_name(), entity_name, entity_user_name(), FOREACH, free(), gen_context_multi_recurse(), gen_free_list(), gen_true(), HASH_DEFAULT_SIZE, hash_pointer, hash_table_fprintf(), hash_table_free(), hash_table_make(), ifdebug, instruction_to_declarations(), local_name_to_scope(), loop_domain, module, module_name(), NIL, pips_debug, reference_domain, rename_loop_index(), rename_reference(), rename_statement_declarations(), replace_entities(), same_string_p, statement_block_p, statement_domain, statement_instruction, and string_undefined.
Referenced by delay_communications(), delay_load_communications(), delay_store_communications(), and flatten_code().
void statement_split_initializations | ( | statement | s | ) |
Recurse through the statements of s and split local declarations.
For the time being, we handle only blocks with declarations.
NOTE: Statement s is modified in-place.
This function can be called from another module to apply transformation directly.
Is it still useful?
Definition at line 733 of file flatten_code.c.
References clean_up_sequences(), gen_recurse, gen_true(), split_initializations_in_statement(), and statement_domain.
Referenced by process_true_stat(), promote_local_entities(), and split_initializations().
bool stf | ( | const | string | ) |
string | od_name |
Referenced by block_to_transformer(), block_to_transformer_list(), declarations_to_transformer(), declarations_to_transformer_list(), EnterScope(), propagate_preconditions_in_declarations(), and statement_to_transformer().
bool strength_reduction | ( | const | string | ) |
string | odule_name |
bool strip_mine | ( | const | string | ) |
Top-level function.
Get the loop label form the user
DBR_CODE will be changed: argument "pure" should take false but this would be useless since there is only one version of code; a new version will be put back in the data base after strip_mineing
Reorder the module, because new statements have been generated.
string | od_name |
Definition at line 233 of file strip_mine.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug(), debug_off, debug_on, entity_undefined_p, find_label_entity(), get_string_property_or_ask(), look_for_nested_loop_statements(), loop_chunk_size_and_strip_mine(), module, module_name_to_entity(), module_reorder(), reset_current_module_entity(), reset_current_module_statement(), selected_label, selected_loop_p(), set_current_module_entity(), set_current_module_statement(), user_error, and user_log().
bool suppress_dead_code | ( | const | string | ) |
string | od_name |
bool suppress_trivial_test | ( | const | string | ) |
string | od_name |
bool transformation_test | ( | const | string | ) |
string | od_name |
bool unroll | ( | const | string | ) |
Top-level functions.
Get the loop label form the user
Get the unrolling factor from the user
User asked to cancel:
Sets the current module to "mod_name".
current_module(module_name_to_entity(mod_name));
DBR_CODE will be changed: argument "pure" should take false but this would be useless since there is only one version of code; a new version will be put back in the data base after unrolling
prelude
Validity of transformation should be checked
ie.: - no side effects in replicated expressions
No dependent types in C
do the job
Reorder the module, because new statements have been generated.
ostlude
string | od_name |
Definition at line 960 of file loop_unroll.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, dependent_type_p(), empty_string_p(), ENTITY, entity_type, entity_undefined_p, find_label_entity(), find_loop_from_label(), FOREACH, get_int_property(), get_string_property_or_ask(), instruction_loop, loop_body, loop_unroll(), module_name_to_entity(), module_reorder(), pips_debug, pips_user_error, pips_user_warning, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), statement_declarations, statement_instruction, statement_undefined_p, user_error, user_log(), and user_request().
bool use_def_elimination | ( | char * | ) |
bool variable_expansion | ( | const char * | ) |
|
extern |
interactive_loop_transformation.c
interactive_loop_transformation.c
Definition at line 61 of file interactive_loop_transformation.c.
Referenced by interactive_loop_transformation(), and selected_loop_p().