HomePhabricator

[coroutines] Promote cleanup.dest.slot allocas to registers to avoid storing it…

Description

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

Summary:
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 https://reviews.llvm.org/D37093

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.

Reviewers: rjmccall, hfinkel, eric_niebler

Reviewed By: eric_niebler

Subscribers: EricWF, cfe-commits

Differential Revision: https://reviews.llvm.org/D39768

Details

Committed
GorNishanovNov 11 2017, 9:00 AM
Reviewer
eric_niebler
Differential Revision
D39768: [coroutines] Promote cleanup.dest.slot allocas to registers to avoid storing it in the coroutine frame
Branches
Unknown
Tags
Unknown