@@ -121,21 +121,13 @@ bool SuspendCrossingInfo::computeBlockData(
121121 B.Consumes |= P.Consumes ;
122122 B.Kills |= P.Kills ;
123123
124- // If block P is a suspend block, it should propagate kills into block
125- // B for every block P consumes.
126- if (P.Suspend )
124+ if (P.AlwaysKill )
127125 B.Kills |= P.Consumes ;
128126 }
129127
130- if (B.Suspend ) {
131- // If block B is a suspend block, it should kill all of the blocks it
132- // consumes.
128+ if (B.AlwaysKill ) {
133129 B.Kills |= B.Consumes ;
134- } else if (B.End ) {
135- // If block B is an end block, it should not propagate kills as the
136- // blocks following coro.end() are reached during initial invocation
137- // of the coroutine while all the data are still available on the
138- // stack or in the registers.
130+ } else if (B.NeverKill ) {
139131 B.Kills .reset ();
140132 } else {
141133 // This is reached when B block it not Suspend nor coro.end and it
@@ -177,7 +169,7 @@ SuspendCrossingInfo::SuspendCrossingInfo(
177169 assert (CE->getParent ()->getFirstInsertionPt () == CE->getIterator () &&
178170 CE->getParent ()->size () <= 2 && " CoroEnd must be in its own BB" );
179171
180- getBlockData (CE->getParent ()).End = true ;
172+ getBlockData (CE->getParent ()).NeverKill = true ;
181173 }
182174
183175 // Mark all suspend blocks and indicate that they kill everything they
@@ -187,7 +179,7 @@ SuspendCrossingInfo::SuspendCrossingInfo(
187179 auto markSuspendBlock = [&](IntrinsicInst *BarrierInst) {
188180 BasicBlock *SuspendBlock = BarrierInst->getParent ();
189181 auto &B = getBlockData (SuspendBlock);
190- B.Suspend = true ;
182+ B.AlwaysKill = true ;
191183 B.Kills |= B.Consumes ;
192184 };
193185 for (auto *CSI : CoroSuspends) {
0 commit comments