This is an archive of the discontinued LLVM Phabricator instance.

[Coroutines][1/6] New pass manager: coro-early
ClosedPublic

Authored by modocache on Dec 26 2019, 6:23 AM.

Details

Summary

The first in a series of patches that ports the LLVM coroutines passes
to the new pass manager infrastructure. This patch implements
'coro-early'.

NB: All coroutines passes begin by checking that coroutine intrinsics are
declared within the LLVM IR module they're operating on. To do so, they call
coro::declaresIntrinsics. The next 3 patches in this series, which add new
pass manager implementations of the 'coro-split', 'coro-elide', and
'coro-cleanup' passes, use a similar pattern as the one used here: a static
function is shared across both old and new passes to detect if relevant
coroutine intrinsics are delcared. To make this pattern easier to read, this
patch adds const keywords to the parameters of coro::declaresIntrinsics.

Event Timeline

modocache created this revision.Dec 26 2019, 6:23 AM
Herald added a project: Restricted Project. · View Herald Transcript
wenlei added a subscriber: wenlei.Dec 26 2019, 7:44 AM
ychen added a subscriber: ychen.Dec 26 2019, 7:39 PM
modocache updated this revision to Diff 235809.Jan 1 2020, 7:04 PM

As per one of the review comments on D71899, I split out the trivial parts of this patch, such as the 'legacy' pass renaming, and committed them separately. Here's an updated version of this patch without those 'NFC' changes.

modocache updated this revision to Diff 236675.Jan 7 2020, 1:21 PM

Use clang-format, re-add retcon instrinsics that I'd removed accidentally.

wenlei accepted this revision.Feb 6 2020, 11:12 PM

LGTM. We've tested this stack of coroutine patches with multiple large services internally at facebook, all working as expected.

This revision is now accepted and ready to land.Feb 6 2020, 11:12 PM
This revision was automatically updated to reflect the committed changes.