Page MenuHomePhabricator

[coroutines][PR40979] Ignore unreachable uses across suspend points

Authored by modocache on Mar 6 2019, 6:49 PM.



Depends on describes a bug in which the
-coro-split pass would assert that a use was across a suspend point from
a definition. Normally this would mean that a value would "spill" across
a suspend point and thus need to be stored in the coroutine frame. However,
in this case the use was unreachable, and so it would not be necessary
to store the definition on the frame.

To prevent the assert, simply remove unreachable basic blocks from a
coroutine function before computing spills. This avoids the assert
reported in PR40979.

Diff Detail


Event Timeline

modocache created this revision.Mar 6 2019, 6:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 6 2019, 6:49 PM
modocache edited the summary of this revision. (Show Details)Mar 6 2019, 6:51 PM
GorNishanov accepted this revision.Mar 7 2019, 1:13 PM

LGTM with a tiny suggestion

931 ↗(On Diff #189638)

I suggest to move it inside of the splitCoroutine function.

This revision is now accepted and ready to land.Mar 7 2019, 1:13 PM

Thanks @GorNishanov! I moved the call into splitCoroutine. I'll land this now.

This revision was automatically updated to reflect the committed changes.