Skip to content

Commit

Permalink
compute dep satisfaction levels from withing detect_trans..properties
Browse files Browse the repository at this point in the history
Signed-off-by: Uday Reddy <udayreddy@gmail.com>
  • Loading branch information
bondhugula committed Feb 21, 2012
1 parent 4c716fb commit e3280cc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
9 changes: 4 additions & 5 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
/* Auto transformation */
if (!options->identity) {
pluto_auto_transform(prog);
}else{
/* No need to recompute satisfaction levels if auto-transform was run
*/
pluto_compute_dep_satisfaction(prog);
}

pluto_detect_transformation_properties(prog);

if (!options->silent) {
Expand Down Expand Up @@ -327,6 +322,10 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
if (options->parallel) {
/* Generate meta info for insertion of OpenMP pragmas */
pluto_omp_parallelize(prog);
if (options->moredebug) {
pluto_detect_transformation_properties(prog);
pluto_print_dep_directions(prog->deps, prog->ndeps, prog->num_hyperplanes);
}
}

if (options->unroll || options->polyunroll) {
Expand Down
14 changes: 9 additions & 5 deletions src/pluto.c
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,9 @@ void pluto_detect_transformation_properties(PlutoProg *prog)

assert(prog->num_hyperplanes == stmts[0]->trans->nrows);

/* First compute satisfaction levels */
pluto_compute_dep_satisfaction(prog);

for (i=0; i<prog->ndeps; i++) {
if (deps[i]->dirvec != NULL) {
free(deps[i]->dirvec);
Expand Down Expand Up @@ -1481,9 +1484,9 @@ int generate_declarations(const PlutoProg *prog, FILE *outfp)
fprintf(outfp, "\n");

/* Scattering iterators. */
if (stmts[0]->trans != NULL) {
if (prog->num_hyperplanes >= 1) {
fprintf(outfp, "\t\tint ");
for (i=0; i<stmts[0]->trans->nrows; i++) {
for (i=0; i<prog->num_hyperplanes; i++) {
if (i!=0) fprintf(outfp, ", ");
fprintf(outfp, "t%d", i+1);
if (prog->hProps[i].unroll) {
Expand Down Expand Up @@ -1550,6 +1553,7 @@ int pluto_gen_cloog_code(const PlutoProg *prog, FILE *cloogfp, FILE *outfp)
cloogOptions->l = -1;
}
}

if (!options->silent) {
printf("[Pluto] using Cloog -f/-l options: %d %d\n", cloogOptions->f, cloogOptions->l);
}
Expand Down Expand Up @@ -1855,6 +1859,7 @@ void pluto_print_hyperplane_properties(const PlutoProg *prog)
break;
}
fprintf(stdout, " (band %d)", hProps[j].band_num);
fprintf(stdout, hProps[j].unroll? "ujam":"no-ujam");
fprintf(stdout, "\n");
}
fprintf(stdout, "\n");
Expand Down Expand Up @@ -1922,11 +1927,10 @@ PlutoConstraints *pluto_stmt_get_schedule(const Stmt *stmt)
{
int i;

PlutoMatrix *sched;
PlutoMatrix *sched, *trans;
PlutoConstraints *schedcst;

const PlutoMatrix *trans = stmt->trans;

trans = stmt->trans;
sched = pluto_matrix_dup(trans);

for (i=0; i<sched->nrows; i++) {
Expand Down

0 comments on commit e3280cc

Please sign in to comment.