[polly] r286050 - IslNodeBuilder: Ensure newly generated memory accesses are well-defined
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 5 14:46:02 PDT 2016
Author: grosser
Date: Sat Nov 5 16:46:01 2016
New Revision: 286050
URL: http://llvm.org/viewvc/llvm-project?rev=286050&view=rev
Log:
IslNodeBuilder: Ensure newly generated memory accesses are well-defined
Add some additional asserts that ensure newly code-generated memory accesses
are defined on all domain and schedule domain instances.
Modified:
polly/trunk/lib/CodeGen/IslNodeBuilder.cpp
Modified: polly/trunk/lib/CodeGen/IslNodeBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslNodeBuilder.cpp?rev=286050&r1=286049&r2=286050&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslNodeBuilder.cpp (original)
+++ polly/trunk/lib/CodeGen/IslNodeBuilder.cpp Sat Nov 5 16:46:01 2016
@@ -724,6 +724,24 @@ IslNodeBuilder::createNewAccesses(ScopSt
"Generating new index expressions to indirect arrays not working");
auto Schedule = isl_ast_build_get_schedule(Build);
+
+#ifndef NDEBUG
+ auto Dom = Stmt->getDomain();
+ auto SchedDom = isl_set_from_union_set(
+ isl_union_map_domain(isl_union_map_copy(Schedule)));
+ auto AccDom = isl_map_domain(MA->getAccessRelation());
+ Dom = isl_set_intersect_params(Dom, Stmt->getParent()->getContext());
+ SchedDom =
+ isl_set_intersect_params(SchedDom, Stmt->getParent()->getContext());
+ assert(isl_set_is_subset(SchedDom, AccDom) &&
+ "Access relation not defined on full schedule domain");
+ assert(isl_set_is_subset(Dom, AccDom) &&
+ "Access relation not defined on full domain");
+ isl_set_free(AccDom);
+ isl_set_free(SchedDom);
+ isl_set_free(Dom);
+#endif
+
auto PWAccRel = MA->applyScheduleToAccessRelation(Schedule);
auto AccessExpr = isl_ast_build_access_from_pw_multi_aff(Build, PWAccRel);
More information about the llvm-commits
mailing list