PIPS
|
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "ri-util.h"
#include "effects-util.h"
#include "misc.h"
#include "effects-generic.h"
#include "effects-simple.h"
#include "control.h"
#include "callgraph.h"
#include "pipsdbm.h"
#include "resources.h"
Go to the source code of this file.
Functions | |
static bool | mark_loop_to_outline (const statement s) |
static void | gpu_ify_statement (statement s, int depth) |
bool | old__gpu_ify (const string module_name) |
Variables | |
list | loop_nests_to_outline |
Store the loop nests found that meet the spec to be executed on a GPU. More... | |
First outline the innermost code (the kernel itself) to avoid spoiling its memory effects if we start with the outermost code first:
Definition at line 60 of file localize_memory.c.
References build_new_top_level_module_name(), CONS, depth, ifdebug, NIL, outliner(), perfectly_nested_loop_to_body_at_depth(), pips_debug, print_statement(), and STATEMENT.
Referenced by old__gpu_ify().
An interesting loop must be parallel first...
We recurse on statements instead of loops in order to pick informations on the statement itself, such as pragmas
Since we only outline outermost loop-nest, stop digging further in this statement:
Definition at line 34 of file localize_memory.c.
References CONS, depth_of_parallel_perfect_loop_nest(), ifdebug, loop_nests_to_outline, pips_debug, print_statement(), STATEMENT, and statement_number.
Referenced by old__gpu_ify().
Outline the previous marked loop nests. First put the statements to outline in the good order:
Definition at line 79 of file localize_memory.c.
References compute_callees(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, depth_of_parallel_perfect_loop_nest(), FOREACH, gen_free_list(), gen_identity(), gen_nreverse(), gen_recurse, get_current_module_statement(), gpu_ify_statement(), loop_nests_to_outline, mark_loop_to_outline(), module_name(), module_statement, NIL, PIPS_PHASE_POSTLUDE, PIPS_PHASE_PRELUDE, reset_cumulated_rw_effects(), set_cumulated_rw_effects(), STATEMENT, and statement_domain.
list loop_nests_to_outline |
Store the loop nests found that meet the spec to be executed on a GPU.
Use a list and not a set or hash_map to have always the same order
Definition at line 30 of file localize_memory.c.
Referenced by mark_loop_to_outline(), and old__gpu_ify().