Page MenuHomePhabricator

[coroutines] Promote cleanup.dest.slot allocas to registers to avoid storing it in the coroutine frame

Authored by GorNishanov on Nov 7 2017, 3:55 PM.



We don't want to store cleanup dest slot saved into the coroutine frame (as some of the cleanup code may
access them after coroutine frame destroyed).

This is an alternative to

It is possible to do this for all functions, but, cursory check showed that in -O0, we get slightly longer function (by 1-3 instructions), thus, we are only limiting cleanup.dest.slot elimination to coroutines.

Diff Detail


Event Timeline

GorNishanov created this revision.Nov 7 2017, 3:55 PM
eric_niebler accepted this revision.Nov 10 2017, 9:29 PM

Looks ok to me.

This revision is now accepted and ready to land.Nov 10 2017, 9:29 PM
This revision was automatically updated to reflect the committed changes.