PIPS
|
#include <stdio.h>
#include <string.h>
#include "genC.h"
#include "linear.h"
#include "misc.h"
#include "pipsdbm.h"
#include "properties.h"
#include "ri.h"
#include "text.h"
#include "ri-util.h"
#include "prettyprint.h"
#include "text-util.h"
#include "control.h"
#include "conversion.h"
#include "transformations.h"
Go to the source code of this file.
Functions | |
statement | loop_strip_mine (statement loop_statement, int chunk_size, int chunk_number) |
loop_strip_mine(): More... | |
static statement | loop_chunk_size_and_strip_mine (list lls, __attribute__((unused)) bool(*unused)(statement)) |
Hmmm... More... | |
bool | strip_mine (const string mod_name) |
Top-level function. More... | |
Variables | |
entity | selected_label |
Interface with pipsmake for interactive loop transformations: loop interchange, hyperplane method,... More... | |
char * | current_module_name |
|
static |
Hmmm...
I am not sure it is a good idea to put the user_request()s here. Did the author want to be able to apply loop_chunk_size_and_strip_mine() several times on different loops with different strip mining parameters?
Get the strip_mining kind from the user
Get the strip_mining factor from the user
Return the statement unchanged:
Definition at line 165 of file strip_mine.c.
References cancel, CAR, empty_string_p(), gen_last(), get_int_property(), loop_strip_mine(), pips_debug, pips_user_error, STATEMENT, user_error, user_log(), and user_request().
Referenced by strip_mine().
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().
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.
mod_name | 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().
|
extern |
|
extern |
Interface with pipsmake for interactive loop transformations: loop interchange, hyperplane method,...
Definition at line 61 of file interactive_loop_transformation.c.
Referenced by strip_mine().