25 #include "pips_config.h"
93 #include "constants.h"
98 #include "resources.h"
103 #define OPENPAREN "("
104 #define CLOSEPAREN ")"
207 if(other_loop != l) {
302 bool first_iteration =
true;
315 first_iteration =
false;
326 " Loop nest P4A end\n",
448 "GPU_IFY_DEBUG_LEVEL");
468 && (NULL != strstr(
comment,
"Loop nest P4A end")|| NULL != strstr(
comment,
"Loop nest P4A begin"))) {
480 "GPU_IFY_DEBUG_LEVEL");
expression copy_expression(expression p)
EXPRESSION.
reference make_reference(entity a1, list a2)
test make_test(expression a1, statement a2, statement a3)
void free_expression(expression p)
void remove_preferences(void *)
delay.c
static statement module_statement
struct _newgen_struct_statement_ * statement
static string c_loop(loop l)
list proper_effects_of_expression(expression)
bool effects_read_variable_p(list, entity)
const char * module_name(const char *s)
Return the module part of an entity name.
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
static void comment(string_buffer code, spoc_hardware_type hw, dagvtx v, int stage, int side, bool flip)
#define gen_context_recurse(start, ctxt, domain_number, flt, rwt)
#define gen_recurse(start, domain_number, flt, rwt)
void gen_full_free_list(list l)
statement make_empty_block_statement(void)
Build an empty statement (block/sequence)
void replace_entity_by_expression(void *s, entity ent, expression exp)
replace all reference to entity ent by expression exp in s.
gen_chunk * gen_get_ancestor(int, const void *)
return the first ancestor object found of the given type.
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
bool loop_parallel_p(loop l)
Test if a loop is parallel.
int depth_of_perfect_loop_nest(statement s)
Compute the depth of a perfect loop-nest.
int depth_of_parallel_perfect_loop_nest(statement s)
Compute the depth of a parallel perfect loop-nest.
#define POP(l)
Modify a list pointer to point on the next element of the list.
#define NIL
The empty list (nil in Lisp)
size_t gen_length(const list l)
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
void gen_free_list(list l)
free the spine of the list
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
#define PIPS_PHASE_POSTLUDE(new_module_statement)
End a transformation phase by putting back into PIPS the (possibly) modified statement.
#define PIPS_PHASE_PRELUDE(module_name, debug_env_var)
Start a phase that use a module CODE.
loop statement_loop(statement)
Get the loop of a statement.
bool statement_loop_p(statement)
char ** find_first_statement_comment(statement)
Find the first non-empty comment of a statement, if any returns a pointer to the comment if found,...
bool empty_comments_p(const char *)
bool expression_constant_p(expression)
HPFC module by Fabien COELHO.
enum language_utype get_prettyprint_language_tag()
static void loop_annotate(loop l, gpu_lna_context *p)
Do the real annotation work on previously marked loops bottom-up.
bool clear_annotated_loop_nest(statement s)
Callback for gen_recurse Remove annotation on a loop nest.
static bool parallelize_annotated_loop_nest(statement s)
Callback for gen_recurse Parallelize perfectly nested loop nest, till we reach the magic comment.
#define COMMA
Loop nests transformation phase for par4all :
bool gpu_parallelize_annotated_loop_nest(const string mod_name)
Parallelize the launcher based on loop nest annotate sentinels.
bool gpu_loop_nest_annotate_on_statement(statement s)
annotates loop nests in the following way :
bool gpu_loop_nest_annotate(const char *module_name)
bool gpu_clear_annotations_on_loop_nest(const string mod_name)
Remove all annotations on a loop nest.
static bool loop_push(loop l, gpu_lna_context *p)
Push a loop that matches the criterion for annotation.
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_user_warning
string concatenate(const char *,...)
Return the concatenation of the given strings.
string expression_to_string(expression e)
string get_comment_sentinel()
Start a single line comment.
#define C_LESS_OR_EQUAL_OPERATOR_NAME
#define C_AND_OPERATOR_NAME
#define MINUS_OPERATOR_NAME
#define PLUS_OPERATOR_NAME
#define test_to_statement(t)
#define AND_OPERATOR_NAME
FI: intrinsics are defined at a third place after bootstrap and effects! I guess the name should be d...
#define LESS_OR_EQUAL_OPERATOR_NAME
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
expression reference_to_expression(reference r)
bool simplify_expression(expression *pexp)
use polynomials to simplify an expression in some cases this operation can change the basic of the ex...
int expression_to_int(expression exp)
================================================================
expression make_min_expression(expression e1, expression e2, enum language_utype lang)
expression MakeBinaryCall(entity f, expression eg, expression ed)
Creates a call expression to a function with 2 arguments.
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
expression make_op_exp(char *op_name, expression exp1, expression exp2)
================================================================
expression make_max_expression(expression e1, expression e2, enum language_utype lang)
#define loop_execution(x)
#define loop_domain
newgen_language_domain_defined
#define statement_domain
newgen_sizeofexpression_domain_defined
#define range_increment(x)
#define EXPRESSION(x)
EXPRESSION.
#define expression_undefined
#define expression_undefined_p(x)
#define statement_comments(x)
The structure used to build lists in NewGen.
In modern PIPS programming, all is passed through a context instead of having a global variable.
bool gpu_loop_nest_annotate_parallel_p
True if we only deal with parallel loop nests.
bool fail_p
The generation may fail because of an unhandled case for isntance.
expression guard_expression
bool inner_reached
True only when we reach the inner annotated loop: