Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polyhedral unroll #20

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/clay/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#define CLAY_FUNCTION_ISS 6
#define CLAY_FUNCTION_STRIPMINE 7
#define CLAY_FUNCTION_UNROLL 8
#define CLAY_FUNCTION_UNROLL_NOEPILOG 9
#define CLAY_FUNCTION_SIEVE 9
#define CLAY_FUNCTION_TILE 10
#define CLAY_FUNCTION_SHIFT 11
#define CLAY_FUNCTION_PEEL 12
Expand Down
3 changes: 2 additions & 1 deletion include/clay/transformation.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int clay_iss(osl_scop_p, clay_array_p, clay_list_p, clay_array_p*,
clay_options_p);
int clay_stripmine(osl_scop_p, clay_array_p, unsigned int, unsigned int,
clay_options_p);
int clay_unroll(osl_scop_p, clay_array_p, unsigned int, int, clay_options_p);
int clay_unroll(osl_scop_p, clay_array_p, unsigned int, clay_options_p);
int clay_tile(osl_scop_p, clay_array_p, unsigned int, unsigned int,
unsigned int, clay_options_p);
int clay_shift(osl_scop_p scop, clay_array_p beta, unsigned int depth,
Expand All @@ -85,6 +85,7 @@ int clay_linearize(osl_scop_p, clay_array_p, int depth, clay_options_p);
int clay_reshape(osl_scop_p, clay_array_p, int, int, int, clay_options_p);
int clay_embed(osl_scop_p, clay_array_p, clay_options_p);
int clay_unembed(osl_scop_p, clay_array_p, clay_options_p);
int clay_sieve(osl_scop_p, clay_array_p, int, clay_options_p);

# if defined(__cplusplus)
}
Expand Down
7 changes: 4 additions & 3 deletions source/functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ int clay_function_collapse_type[] = {ARRAY_T};
int clay_function_linearize_type[] = {ARRAY_T, INTEGER_T};
int clay_function_embed_type[] = {ARRAY_T};
int clay_function_unembed_type[] = {ARRAY_T};
int clay_function_sieve_type[] = {ARRAY_T, INTEGER_T};


// That is just the prototype of each functions, so there are no data for args
Expand Down Expand Up @@ -125,9 +126,9 @@ const clay_prototype_t functions[CLAY_FUNCTIONS_TOTAL] =
VOID_T, clay_function_unroll_type, 2
},
{
"unroll_noepilog",
"void unroll_noepilog(array beta_loop, uint factor)",
VOID_T, clay_function_unroll_type, 2
"sieve",
"void sieve(array beta_loop, uint grain)",
VOID_T, clay_function_sieve_type, 2
},
{
"tile",
Expand Down
18 changes: 8 additions & 10 deletions source/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,14 @@ int clay_parser_exec_function(char *name) {
clay_parser_options);
break;

case CLAY_FUNCTION_SIEVE:
status_result = clay_sieve(
clay_parser_scop,
clay_parser_stack.stack[top-1].data.obj,
clay_parser_stack.stack[top].data.integer,
clay_parser_options);
break;

case CLAY_FUNCTION_SKEW:
status_result = clay_skew(
clay_parser_scop,
Expand Down Expand Up @@ -636,16 +644,6 @@ int clay_parser_exec_function(char *name) {
clay_parser_scop,
clay_parser_stack.stack[top-1].data.obj,
clay_parser_stack.stack[top].data.integer,
1,
clay_parser_options);
break;

case CLAY_FUNCTION_UNROLL_NOEPILOG:
status_result = clay_unroll(
clay_parser_scop,
clay_parser_stack.stack[top-1].data.obj,
clay_parser_stack.stack[top].data.integer,
0,
clay_parser_options);
break;

Expand Down
Loading