[PATCH] D33362: [Polly][WIP]JSCoP Importer: support for multi-valued schedules
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 6 12:04:35 PDT 2017
Meinersbur added a comment.
I currently cannot apply you diff, I get errors:
$ arc patch D33362
Checking patch test/ScopDetect/recomputation_unbound.ll...
error: test/ScopDetect/recomputation_unbound.ll: does not exist in index
Checking patch test/ScopDetect/recomputation.ll...
error: test/ScopDetect/recomputation.ll: does not exist in index
Checking patch test/ScopDetect/double_convolution___%for.cond1.preheader---%for.end37.jscop.recompute...
error: test/ScopDetect/double_convolution___%for.cond1.preheader---%for.end37.jscop.recompute: does not exist in index
Checking patch test/ScopDetect/double_convolution___%for.cond1.preheader---%for.end37.jscop.notbound...
error: test/ScopDetect/double_convolution___%for.cond1.preheader---%for.end37.jscop.notbound: does not exist in index
Checking patch lib/Exchange/JSONExporter.cpp...
Hunk #3 succeeded at 326 (offset 37 lines).
Hunk #4 succeeded at 521 (offset 71 lines).
Hunk #5 succeeded at 875 (offset 139 lines).
Checking patch lib/Analysis/ScopInfo.cpp...
Hunk #1 succeeded at 1643 (offset 70 lines).
error: while searching for:
return isl_multi_union_pw_aff_from_union_pw_multi_aff(Data.Res);
}
void Scop::addScopStmt(BasicBlock *BB, Loop *SurroundingLoop) {
assert(BB && "Unexpected nullptr!");
Stmts.emplace_back(*this, *BB, SurroundingLoop);
error: patch failed: lib/Analysis/ScopInfo.cpp:4441
Checking patch include/polly/ScopInfo.h...
error: while searching for:
ScopStmt(const ScopStmt &) = delete;
const ScopStmt &operator=(const ScopStmt &) = delete;
/// Create the ScopStmt from a BasicBlock.
ScopStmt(Scop &parent, BasicBlock &bb, Loop *SurroundingLoop);
error: patch failed: include/polly/ScopInfo.h:1112
Hunk #2 succeeded at 2196 (offset 108 lines).
Applied patch lib/Exchange/JSONExporter.cpp cleanly.
Applying patch lib/Analysis/ScopInfo.cpp with 1 reject...
Hunk #1 applied cleanly.
Rejected hunk #2.
Applying patch include/polly/ScopInfo.h with 1 reject...
Rejected hunk #1.
Hunk #2 applied cleanly.
Can you update the patch? It also seems your new files are not marked as being created. What are you using to create the diff?
In https://reviews.llvm.org/D33362#770414, @Mike_Jongen wrote:
> There is a problem with setting the schedule of the new scops. When using getschedule on a new schedule (after the schedule is set), no schedule is found. The problem is caused by:
>
> Schedule = isl_union_map_intersect_domain(Schedule, isl_union_set_from_set(isl_set_copy(Domain)));
>
> Schedule is empty when this is used on a copied statement (but not when used on a not copied statement). if we print the domain and the schedule, we can see that the domain is present is the schedule:
This could mean that `Domain` is something different than you expect. What should it be? The domain of the original statement or new one?
> Domain:
> { Stmt_for_end_copy_no_2[i0] : 2 <= i0 <= 93 }
>
> Schedule:
> { Stmt_for_inc29[i0, i1] -> [i0, 1, 0, 1, i1]; Stmt_for_cond1_preheader_copy_no_1[i0] -> [-1 + i0, 0, i0, 0, 0] : 2 <= i0 <= 94; Stmt_for_cond1_preheader_copy_no_1[i0 = 1] -> [1, 0, 1, 0, 0]; Stmt_for_cond17_preheader[i0] -> [i0, 1, 0, 0, 0]; Stmt_for_cond1_preheader_copy_no_2[i0] -> [i0, 0, i0, 0, 0] : 2 <= i0 <= 93; Stmt_for_inc[i0, i1] -> [0, 0, i0, 1, i1] : 0 <= i0 <= 1; Stmt_for_inc[i0, i1] -> [-2 + i0, 0, i0, 1, i1] : 2 <= i0 <= 95; Stmt_for_inc_copy_no_1[i0, i1] -> [-1 + i0, 0, i0, 1, i1] : 2 <= i0 <= 94; Stmt_for_inc_copy_no_1[i0 = 1, i1] -> [1, 0, 1, 1, i1]; Stmt_for_end31[i0] -> [i0, 1, 0, 2, 0]; Stmt_for_end_copy_no_1[i0] -> [-1 + i0, 0, i0, 2, 0] : 2 <= i0 <= 94; Stmt_for_end_copy_no_1[i0 = 1] -> [1, 0, 1, 2, 0]; Stmt_for_inc_copy_no_2[i0, i1] -> [i0, 0, i0, 1, i1] : 2 <= i0 <= 93; Stmt_for_end[i0] -> [0, 0, i0, 2, 0] : 0 <= i0 <= 1; Stmt_for_end[i0] -> [-2 + i0, 0, i0, 2, 0] : 2 <= i0 <= 95; Stmt_for_cond1_preheader[i0] -> [0, 0, i0, 0, 0] : 0 <= i0 <= 1; Stmt_for_cond1_preheader[i0] -> [-2 + i0, 0, i0, 0, 0] : 2 <= i0 <= 95; **Stmt_for_end_copy_no_2[i0] -> [i0, 0, i0, 2, 0] : 2 <= i0 <= 93** }
>
> Is there another variable in the domain or schedule that might be not set or incorrectly set, such that it can cause the intersect to fail? Or is there a way to check why the intersect fails?
That looks like `isl_union_map_intersect_domain` should return something non-empty. There is the possibility that the user-pointer of an `isl_id` is different in Domain and Schedule (E.g. having the new name, but the user-pointer referring to the original `polly::ScopStmt` instance).
I would like to debug this, but as mentionend I cannot apply the patch.
================
Comment at: test/ScopDetect/recomputation_unbound.ll:1
+; RUN: opt -basicaa -polly-import-jscop -polly-import-jscop-dir=%S -polly-import-jscop-postfix=notbound -polly-ast -analyze -disable-polly-legality -debug < %s 2>&1 | FileCheck %s
+
----------------
Try to avoid checking lines in stdout (`-analyze`) and stderr (`-debug`) in the same output, their interleaving order is undefined.
https://reviews.llvm.org/D33362
More information about the llvm-commits
mailing list