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 "ri-util.h"
#include "text-util.h"
#include "control.h"
#include "conversion.h"
#include "pipsmake.h"
#include "prettyprint.h"
#include "transformations.h"
Go to the source code of this file.
Data Structures | |
struct | flag_loop_param_t |
Functions | |
bool | selected_loop_p (statement s) |
bool | interactive_loop_transformation (const char *module_name, statement(*loop_transformation)(list, bool(*)(statement))) |
static void | flag_loop (statement st, flag_loop_param_t *flp) |
bool | print_loops (const string module_name) |
bool | flag_loops (const string module_name) |
put a label on each doloop without label More... | |
static bool | module_loops_walker (statement s, list *l) |
char * | loop_pragma (const char *module_name, const char *parent_loop) |
char * | module_loops (const char *module_name, const char *parent_loop) |
gather the list of enclosing loops expect flag_loops has been called before More... | |
Variables | |
entity | selected_label |
Interface with pipsmake for interactive loop transformations: loop interchange, hyperplane method,... More... | |
|
static |
Definition at line 133 of file interactive_loop_transformation.c.
References CONS, entity_empty_label_p(), entity_user_name(), get_bool_property(), get_current_module_entity(), instruction_forloop_p, instruction_loop_p, flag_loop_param_t::loops, make_new_label(), flag_loop_param_t::new_label_created, statement_instruction, statement_label, strdup(), and STRING.
Referenced by flag_loops().
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.
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().
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.
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.
Definition at line 213 of file interactive_loop_transformation.c.
References asprintf, CONS, label_local_name(), statement_label, statement_loop_p(), and STRING.
Referenced by module_loops().
prelude
do the job
ostlude
module_name | 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.
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().
entity selected_label |
Interface with pipsmake for interactive loop transformations: loop interchange, hyperplane method,...
interactive_loop_transformation.c
Definition at line 61 of file interactive_loop_transformation.c.
Referenced by interactive_loop_transformation(), print_loopnest_dependence_cone(), selected_loop_p(), and strip_mine().