Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 6a4ffc9

Browse files
committed
ScheduleTreeElemThreadSpecificMarker: require isl::ctx in constructor
Since ScheduleTreeElemThreadSpecificMarker is now a subclass of ScheduleTree, it needs an isl::ctx to construct the ScheduleTree. It is available in all callsites of the ScheduleTreeElemThreadSpecificMarker constructor. Pass it as an argument.
1 parent fd6bc3c commit 6a4ffc9

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

tc/core/polyhedral/schedule_tree.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ std::unique_ptr<ScheduleTree> ScheduleTree::makeExtension(
304304
std::unique_ptr<ScheduleTree> ScheduleTree::makeThreadSpecificMarker(
305305
isl::ctx ctx,
306306
std::vector<ScheduleTreeUPtr>&& children) {
307-
auto res =
308-
std::unique_ptr<ScheduleTree>(new ScheduleTreeElemThreadSpecificMarker());
307+
auto res = std::unique_ptr<ScheduleTree>(
308+
new ScheduleTreeElemThreadSpecificMarker(ctx));
309309
res->type_ = detail::ScheduleTreeType::ThreadSpecificMarker;
310310
res->appendChildren(std::move(children));
311311
return res;

tc/core/polyhedral/schedule_tree_elem.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,8 @@ struct ScheduleTreeElemBand : public ScheduleTree {
256256
struct ScheduleTreeElemThreadSpecificMarker : public ScheduleTree {
257257
static constexpr detail::ScheduleTreeType NodeType =
258258
detail::ScheduleTreeType::ThreadSpecificMarker;
259-
explicit ScheduleTreeElemThreadSpecificMarker()
260-
: ScheduleTree(isl::with_exceptions::globalIslCtx(), {}, NodeType) {
261-
} // FIXME: accept a ctx instead of using the global ctx
259+
explicit ScheduleTreeElemThreadSpecificMarker(isl::ctx ctx)
260+
: ScheduleTree(ctx, {}, NodeType) {}
262261
virtual ~ScheduleTreeElemThreadSpecificMarker() override {}
263262
bool operator==(const ScheduleTreeElemThreadSpecificMarker& other) const {
264263
return true;

0 commit comments

Comments
 (0)