PIPS
|
Avoid useless data transfert by promoting sequential code on GPU. More...
#include <ctype.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "kernel_memory_mapping.h"
#include "effects.h"
#include "ri-util.h"
#include "prettyprint.h"
#include "semantics.h"
#include "effects-util.h"
#include "text.h"
#include "pipsdbm.h"
#include "resources.h"
#include "properties.h"
#include "misc.h"
#include "control.h"
#include "callgraph.h"
#include "effects-generic.h"
#include "effects-simple.h"
#include "effects-convex.h"
#include "text-util.h"
#include "parser_private.h"
#include "preprocessor.h"
#include "transformer.h"
#include "accel-util.h"
Go to the source code of this file.
Functions | |
static statement | promote_statement (list promoted_stmts, loop l) |
void | gpu_promote_sequential_on_sequence (sequence seq, loop l) |
Operate on a sequence and promote all sequential code in a trivial parallel loop. More... | |
static bool | gpu_promote_sequential_walker_in (loop l) |
void | gpu_promote_sequential_on_statement (statement s) |
bool | gpu_promote_sequential (const char *module_name) |
Avoid useless data transfert by promoting sequential code on GPU.
Definition in file gpu_promote_sequential.c.
bool gpu_promote_sequential | ( | const char * | module_name | ) |
Initialize set for each statement
module_name | odule_name |
Definition at line 143 of file gpu_promote_sequential.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, gpu_promote_sequential_on_statement(), local_name_to_top_level_entity(), module_name(), module_reorder(), reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), and set_current_module_statement().
Operate on a sequence and promote all sequential code in a trivial parallel loop.
The heuristic that trigger the promotion is quite simple at that time, all sequential code is promoted if a parallel loop is present in the sequence
seq | is the sequence on which to operate @loop l is an optionnal param that give the enclosing loop |
seq | eq |
Definition at line 83 of file gpu_promote_sequential.c.
References CONS, empty_statement_or_continue_p(), FOREACH, gen_nreverse(), ifdebug, NIL, parallel_loop_statement_p(), pips_debug, print_statement(), promote_statement(), and sequence_statements.
Referenced by gpu_promote_sequential_walker_in().
void gpu_promote_sequential_on_statement | ( | statement | s | ) |
Definition at line 139 of file gpu_promote_sequential.c.
References gen_null(), gen_recurse, gpu_promote_sequential_walker_in(), and loop_domain.
Referenced by gpu_promote_sequential().
Definition at line 129 of file gpu_promote_sequential.c.
References gpu_promote_sequential_on_sequence(), loop_body, loop_sequential_p(), statement_sequence(), and statement_sequence_p().
Referenced by gpu_promote_sequential_on_statement().
Definition at line 59 of file gpu_promote_sequential.c.
References CONS, gen_nreverse(), get_current_module_entity(), int_to_expression(), is_basic_int, loop_locals, loop_undefined_p, make_basic(), make_block_statement(), make_execution_parallel(), make_new_loop_statement(), and make_new_scalar_variable().
Referenced by gpu_promote_sequential_on_sequence().