This is an archive of the discontinued LLVM Phabricator instance.

[Clang][Coroutines] Implement P2014R0 Option 1 behind -fcoroutines-aligned-alloc
AbandonedPublic

Authored by ychen on May 9 2021, 8:34 PM.

Details

Summary

Default off.

The allocation/deallocation function overload resolutions are following
the Issue #4 of http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2014r0.pdf.

Diff Detail

Event Timeline

ychen created this revision.May 9 2021, 8:34 PM
ychen requested review of this revision.May 9 2021, 8:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 9 2021, 8:34 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Since D97915 would fix the problem that the variables in the frame may not be aligned, I think this option fcoroutines-aligned-alloc won't affect normal programmers other than language lawyers. Do you think so?

ychen added a comment.EditedMay 10 2021, 8:28 AM

Since D97915 would fix the problem that the variables in the frame may not be aligned, I think this option fcoroutines-aligned-alloc won't affect normal programmers other than language lawyers. Do you think so?

I think that's right that if all a user want is alignment, then fcoroutines-aligned-alloc may not be necessary. However if they define customed aligned allocators/dealllocators, this is needed to make it work.

Since D97915 would fix the problem that the variables in the frame may not be aligned, I think this option fcoroutines-aligned-alloc won't affect normal programmers other than language lawyers. Do you think so?

I think that's right that if all a user want is alignment, then fcoroutines-aligned-alloc may not be necessary. However if they define customed aligned allocators/dealllocators, this is needed to make it work.

I see. The overall idea looks good. I would try to look into the details.

ychen updated this revision to Diff 344609.May 11 2021, 5:25 PM
  • rebase
ychen abandoned this revision.Sep 23 2022, 5:28 PM

327141f was landed as an alternative.

Herald added a project: Restricted Project. · View Herald TranscriptSep 23 2022, 5:28 PM
Herald added a subscriber: MaskRay. · View Herald Transcript