This repository was archived by the owner on Apr 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -332,18 +332,19 @@ isl::schedule_constraints makeScheduleConstraints(
332
332
const Scop& scop,
333
333
const SchedulerOptionsView& schedulerOptions,
334
334
isl::union_set restrictDomain = isl::union_set()) {
335
- auto firstChildNode = scop.scheduleRoot ()->child ({0 });
336
-
337
335
auto constraints = isl::schedule_constraints::on_domain (scop.domain ())
338
336
.set_validity (scop.dependences )
339
337
.set_proximity (scop.dependences )
340
338
.set_coincidence (scop.dependences );
341
339
if (restrictDomain) {
342
340
constraints = constraints.intersect_domain (restrictDomain);
343
341
}
344
- if (auto contextNode =
345
- firstChildNode->elemAs <detail::ScheduleTreeElemContext>()) {
346
- constraints = constraints.set_context (contextNode->context_ );
342
+ auto root = scop.scheduleRoot ();
343
+ if (root->numChildren () > 0 ) {
344
+ if (auto contextNode =
345
+ root->child ({0 })->elemAs <detail::ScheduleTreeElemContext>()) {
346
+ constraints = constraints.set_context (contextNode->context_ );
347
+ }
347
348
}
348
349
349
350
// Set up "add_schedule_constraints" and "merge_callback"
Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ TEST(TestCornerCases, E2) {
85
85
Succeed (" def f(float(1) a) -> (b) { b(i) = a(i) }" , {F (1 )}, {F (1 )});
86
86
}
87
87
88
- // free(): invalid next size (fast): 0x000000003b2d6230 ***
89
- TEST (TestCornerCases, DISABLED_E4 ) {
88
+ // Schedule tree that only consists of domain node
89
+ TEST (TestCornerCases, E4 ) {
90
90
Succeed (" def f(float a) -> (b) { b = a }" , {F ()}, {F ()});
91
91
}
92
92
You can’t perform that action at this time.
0 commit comments