You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 28, 2023. It is now read-only.
ScheduleTreeElem*: inherit from ScheduleTree instead of ScheduleTreeElemBase
The existing implementation of TC schedule trees, inherited from the
prehistory, chose to have an abstract tree node type (ScheduleTree) with
a unique pointer to a specific node element (ScheduleTreeElem*) as
payload. It is unclear now why this structure was chosen, possible
reasons include: the duality between isl_schedule_tree and
isl_schedule_node in isl internals; gradual movement from raw pointers,
to shared, to unique pointers; an attempt to separate tree memory
management (unique pointers to children in ScheduleTree) from data
(fields in ScheduleTreeElem*). However, the resulting structure ended
up being unnecessarily complex. Conceptually, a specific node type
_is-a_ tree node, so it makes sense to have specific nodes inherit from
a generic one. isl C++ API already provides this structure and it
proved to be more convenient. In particular, it enables functions to
specify that they expect a certain type of node statically as a part of
their signature rather than dynamically through CHECK macros.
Make ScheduleTreeElem* classes inherit from ScheduleTree instead of
ScheduleTreeElemBase and remove the "elem_" field from ScheduleTree (the
tree class itself can now be casted to a subclass). This change
resulted in changes to copy and static constructors of the ScheduleTree*
classes. In particular, Sequence, Set and ThreadSpecificMarker elements
now use the global isl context in construction since the ScheduleTree
constructor requires an isl context. This will be cleaned up in an
upcoming commit.
Note that this commit does not rename elem-related functions for the
sake of diff minimization. These changes will be performed in
subsequent commits.
0 commit comments