Skip to content

Commit 5339bf5

Browse files
committed
Fix stale comment referencing removed parent backpointer model
1 parent 7007bf9 commit 5339bf5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

csrc/fusion.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,9 @@ void Fusion::swap(Fusion& a, Fusion& b) noexcept {
112112
// will only swap the ptrs NOT the contents.
113113
IrContainer::swap(*(a.ir_container()), *(b.ir_container()));
114114

115-
// Fix parent pointers after swapping containers
116-
// After swap, each Fusion owns a different IrContainer, so we must
117-
// update the parent backpointers in those containers to point to their new
118-
// owners
115+
// After swapping container contents, update Statement::ir_container_
116+
// pointers so each Statement points to the Fusion whose container now
117+
// holds it.
119118
if (a.ir_container_) {
120119
for (auto val : a.vals()) {
121120
val->ir_container_ = &a;

0 commit comments

Comments
 (0)