Page MenuHomePhabricator
Feed Advanced Search

Apr 3 2018

GorNishanov added a comment to D45121: [coroutines] Add noop_coroutine to <experimental/coroutine>.

@EricWF , gentle ping. Super tini-tiny change. Last piece missing to be post-Jax 2018 compilant

Apr 3 2018, 10:32 AM

Apr 2 2018

GorNishanov closed D45120: [coroutines] Add __builtin_coro_noop => llvm.coro.noop.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328993 91177308-0d34-0410-b5e6-96231b3b80d8

Apr 2 2018, 10:40 AM
GorNishanov committed rC328993: [coroutines] Add __builtin_coro_noop => llvm.coro.noop.
[coroutines] Add __builtin_coro_noop => llvm.coro.noop
Apr 2 2018, 10:39 AM
GorNishanov committed rL328993: [coroutines] Add __builtin_coro_noop => llvm.coro.noop.
[coroutines] Add __builtin_coro_noop => llvm.coro.noop
Apr 2 2018, 10:39 AM
GorNishanov committed rL328986: [coroutines] Add support for llvm.coro.noop intrinsics.
[coroutines] Add support for llvm.coro.noop intrinsics
Apr 2 2018, 9:58 AM
GorNishanov closed D45114: [coroutines] Add support for llvm.coro.noop intrinsics.
Apr 2 2018, 9:58 AM

Mar 31 2018

GorNishanov created D45121: [coroutines] Add noop_coroutine to <experimental/coroutine>.
Mar 31 2018, 7:21 AM
GorNishanov created D45120: [coroutines] Add __builtin_coro_noop => llvm.coro.noop.
Mar 31 2018, 7:16 AM
GorNishanov updated the diff for D45114: [coroutines] Add support for llvm.coro.noop intrinsics.

added a test that verifies lowering of llvm.coro.noop

Mar 31 2018, 7:08 AM

Mar 30 2018

GorNishanov created D45114: [coroutines] Add support for llvm.coro.noop intrinsics.
Mar 30 2018, 4:04 PM
GorNishanov requested changes to D43242: [Coroutines] PR34897: Fix incorrect elisions.

I believe that this check is too aggressive. It prevents http://godbolt.org/g/26viuZ from optimizing as well.
I think a distinction should be made for exceptional paths and happy path.
We need to make sure that we call coro.destroy on all happy paths.

Mar 30 2018, 11:11 AM
GorNishanov accepted D44552: [Coroutines] Find custom allocators in class scope.

LGTM with some stylistic suggestions

Mar 30 2018, 9:23 AM

Mar 28 2018

GorNishanov closed D37115: [coroutines] Do not attempt to typo-correct when coroutine is looking for required members.

Fixed:
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328663 91177308-0d34-0410-b5e6-96231b3b80d8

Mar 28 2018, 8:31 PM
GorNishanov added a comment to D44185: [Coroutines] Avoid assert splitting hidden coros.

Looks good to me, but, adding @rnk and @majnemer, just in case.

Mar 28 2018, 8:26 PM
GorNishanov added reviewers for D44185: [Coroutines] Avoid assert splitting hidden coros: majnemer, rnk.
Mar 28 2018, 8:26 PM
GorNishanov accepted D43927: [Coroutines] Schedule coro-split before asan.

LGTM!

Mar 28 2018, 8:22 PM

Mar 27 2018

GorNishanov committed rC328663: [coroutines] Do not attempt to typo-correct when coroutine is looking for….
[coroutines] Do not attempt to typo-correct when coroutine is looking for…
Mar 27 2018, 1:41 PM
GorNishanov committed rL328663: [coroutines] Do not attempt to typo-correct when coroutine is looking for….
[coroutines] Do not attempt to typo-correct when coroutine is looking for…
Mar 27 2018, 1:41 PM
GorNishanov added a reviewer for D37115: [coroutines] Do not attempt to typo-correct when coroutine is looking for required members: modocache.
Mar 27 2018, 9:48 AM

Feb 15 2018

GorNishanov accepted D42606: [Coroutines] Use allocator overload when available.

LGTM

Feb 15 2018, 9:46 AM
GorNishanov accepted D43000: [Coroutines] Don't move stores for allocator args.

LGTM!

Feb 15 2018, 9:43 AM

Feb 13 2018

GorNishanov added inline comments to D42606: [Coroutines] Use allocator overload when available.
Feb 13 2018, 9:51 AM
GorNishanov added inline comments to D42606: [Coroutines] Use allocator overload when available.
Feb 13 2018, 9:49 AM
GorNishanov requested changes to D43000: [Coroutines] Don't move stores for allocator args.
Feb 13 2018, 9:08 AM

Feb 12 2018

GorNishanov accepted D42605: [Sema] Toggle diags when finding allocators (NFCI).

LGTM

Feb 12 2018, 2:43 PM

Feb 1 2018

GorNishanov added inline comments to D42606: [Coroutines] Use allocator overload when available.
Feb 1 2018, 5:37 PM
GorNishanov requested changes to D42606: [Coroutines] Use allocator overload when available.
Feb 1 2018, 4:58 PM

Jan 29 2018

GorNishanov accepted D42343: [coroutines] Fix application of NRVO to Coroutine "Gro" or return object..

LGTM

Jan 29 2018, 9:19 AM

Jan 23 2018

GorNishanov accepted D41820: [coroutines] Pass coro func args to promise ctor.

LGTM!

Jan 23 2018, 3:59 PM

Jan 12 2018

GorNishanov added a comment to D41820: [coroutines] Pass coro func args to promise ctor.

Is this behavior specified somewhere? Or are we simply adding an extension to Clang? If so I would really prefer to add my co_promise solution (but I need to write a paper in favor of it first).

Jan 12 2018, 4:24 PM

Jan 10 2018

GorNishanov requested changes to D41820: [coroutines] Pass coro func args to promise ctor.

Thank you for doing this change!

Jan 10 2018, 4:51 PM

Nov 20 2017

GorNishanov updated the summary of D40273: [coroutine] Respect alloca alignment requirements..
Nov 20 2017, 4:31 PM
GorNishanov updated the summary of D40273: [coroutine] Respect alloca alignment requirements..
Nov 20 2017, 4:27 PM
GorNishanov created D40273: [coroutine] Respect alloca alignment requirements..
Nov 20 2017, 4:19 PM

Nov 11 2017

GorNishanov abandoned D37093: [coroutines] Promote cleanup.dest.slot-like allocas to registers to avoid storing them in the coroutine frame.

Abandoned in favor of https://reviews.llvm.org/rL317981

Nov 11 2017, 9:28 AM
GorNishanov committed rL317981: [coroutines] Promote cleanup.dest.slot allocas to registers to avoid storing it….
[coroutines] Promote cleanup.dest.slot allocas to registers to avoid storing it…
Nov 11 2017, 9:01 AM
GorNishanov closed D39768: [coroutines] Promote cleanup.dest.slot allocas to registers to avoid storing it in the coroutine frame by committing rL317981: [coroutines] Promote cleanup.dest.slot allocas to registers to avoid storing it….
Nov 11 2017, 9:01 AM

Nov 9 2017

GorNishanov added a reviewer for D39768: [coroutines] Promote cleanup.dest.slot allocas to registers to avoid storing it in the coroutine frame: eric_niebler.
Nov 9 2017, 9:12 AM

Nov 7 2017

GorNishanov added a comment to D37093: [coroutines] Promote cleanup.dest.slot-like allocas to registers to avoid storing them in the coroutine frame.

@rjmccall suggested to do the cleanup dest slot elimination wholesale for all functions in clang. (Not specific for coroutines).
That is a sweeping change :-), so, I don't mind still having this here to unblock Facebook and when the clang change lands, remove this part from llvm.

Well, I said that I wouldn't be opposed to cleaning up the cleanup dest slot unconditionally. I expressed no opinion about whether that was a reasonable way to fix this problem in your representation. (This doesn't affect my lowering as coro.end is always a terminator.)

I think you probably do need to solve this problem more generally, as it sounds like any use of an alloca in the post-coro.end section of the function will lead to miscompiles. It sounds like you have some control of the post-coro.end generated code, so maybe allocas don't normally affect you there — but from the fact that you have uses of the cleanup dest, I assume you're branching through cleanups, which means you have calls, which means you can have arbitrary code there if the callee is marked always_inline.

Nov 7 2017, 3:57 PM
GorNishanov created D39768: [coroutines] Promote cleanup.dest.slot allocas to registers to avoid storing it in the coroutine frame.
Nov 7 2017, 3:55 PM

Oct 31 2017

GorNishanov added a reviewer for D37112: [coroutines] Always place escaped allocas into the coroutine frame: lewissbaker.
Oct 31 2017, 3:39 PM

Oct 30 2017

GorNishanov updated subscribers of D37093: [coroutines] Promote cleanup.dest.slot-like allocas to registers to avoid storing them in the coroutine frame.

@rjmccall suggested to do the cleanup dest slot elimination wholesale for all functions in clang. (Not specific for coroutines).
That is a sweeping change :-), so, I don't mind still having this here to unblock Facebook and when the clang change lands, remove this part from llvm.

Oct 30 2017, 11:06 AM

Oct 18 2017

GorNishanov added a comment to D37115: [coroutines] Do not attempt to typo-correct when coroutine is looking for required members.

@rsmith , here is a fix for the funny diagnostics you mentioned.

Oct 18 2017, 10:36 AM

Oct 3 2017

GorNishanov added a comment to D35046: [coroutines] Include "this" type when looking up coroutine_traits.

@toby-allsopp: You mentioned that @EricWF already got this in. Can you close ("abandon") this patch if it is no longer needed.

Oct 3 2017, 8:53 AM
GorNishanov abandoned D37433: [cxx_status] Mark coroutine TS support as clang 5.0 and change class from svn to full for P0096R4.
Oct 3 2017, 8:50 AM

Oct 2 2017

GorNishanov added a comment to D37112: [coroutines] Always place escaped allocas into the coroutine frame.

gentle ping

Oct 2 2017, 10:54 AM
GorNishanov added a comment to D37115: [coroutines] Do not attempt to typo-correct when coroutine is looking for required members.

ping

Oct 2 2017, 10:54 AM
GorNishanov updated the diff for D37093: [coroutines] Promote cleanup.dest.slot-like allocas to registers to avoid storing them in the coroutine frame.

Added the test case

Oct 2 2017, 10:53 AM
GorNishanov updated the diff for D37093: [coroutines] Promote cleanup.dest.slot-like allocas to registers to avoid storing them in the coroutine frame.

Moved the promotion to CoroEarly to make sure no optimization passes can intervene.

Oct 2 2017, 10:52 AM

Oct 1 2017

GorNishanov added inline comments to D38154: [PassManager] Run global opts after the inliner.
Oct 1 2017, 8:22 PM

Sep 5 2017

GorNishanov added a comment to D37093: [coroutines] Promote cleanup.dest.slot-like allocas to registers to avoid storing them in the coroutine frame.

How about, for all uses of alloca after the original call to @llvm.coro.free, you should create a new alloca in the foo.destroy function, copy the value from the frame into that new alloca, and then use that alloca in the later code? Like this:

Sep 5 2017, 4:25 PM
GorNishanov committed rL312565: [coroutines] Make sure auto return type of await_resume is properly handled.
[coroutines] Make sure auto return type of await_resume is properly handled
Sep 5 2017, 12:34 PM
GorNishanov closed D37454: [coroutines] Make sure auto return type of await_resume is properly handled by committing rL312565: [coroutines] Make sure auto return type of await_resume is properly handled.
Sep 5 2017, 12:34 PM
GorNishanov added inline comments to D37454: [coroutines] Make sure auto return type of await_resume is properly handled.
Sep 5 2017, 11:42 AM

Sep 4 2017

GorNishanov added inline comments to D37454: [coroutines] Make sure auto return type of await_resume is properly handled.
Sep 4 2017, 8:57 PM
GorNishanov updated the diff for D37454: [coroutines] Make sure auto return type of await_resume is properly handled.

use isVoidType() and isBooleantType() instead of cruft that used to be there before

Sep 4 2017, 8:57 PM
GorNishanov added a comment to D37093: [coroutines] Promote cleanup.dest.slot-like allocas to registers to avoid storing them in the coroutine frame.

That's fine, but does not in itself explain why the variable cannot be extracted from the frame, or otherwise made available to the cleanup code. I'm not worried about the size of the stack frame at -O0 being larger than necessary (it will, compared to optimized code, be larger regardless). Moreover, the lowering algorithm must be sound at the IR level (not just in a state where it happens to work for some patterns that Clang happens to create).

Sep 4 2017, 8:49 PM
GorNishanov created D37454: [coroutines] Make sure auto return type of await_resume is properly handled.
Sep 4 2017, 5:12 PM
GorNishanov added a reviewer for D37115: [coroutines] Do not attempt to typo-correct when coroutine is looking for required members: rsmith.
Sep 4 2017, 5:07 PM
GorNishanov added a comment to D37093: [coroutines] Promote cleanup.dest.slot-like allocas to registers to avoid storing them in the coroutine frame.

I still don't see what checking that the type is an integer or the value is a constant buys you. Why can't you look for allocas that are used after the call to llvm.coro.free? Isn't that the relevant factor?

Sep 4 2017, 10:45 AM

Sep 3 2017

GorNishanov created D37433: [cxx_status] Mark coroutine TS support as clang 5.0 and change class from svn to full for P0096R4.
Sep 3 2017, 10:26 PM
GorNishanov added a comment to D37093: [coroutines] Promote cleanup.dest.slot-like allocas to registers to avoid storing them in the coroutine frame.

Seems fragile. What if we run optimizations and transform the IR to another, different, version of the IR but the alloca is not promotable anymore? On occasion, the compiler can pessimize a code sequence and coroutine lowering should be resilient to such things.

I agree. If we take a step back, what's necessary to make the current algorithm sound in general?

Sep 3 2017, 9:16 PM
GorNishanov added a comment to D37093: [coroutines] Promote cleanup.dest.slot-like allocas to registers to avoid storing them in the coroutine frame.

Seems fragile. What if we run optimizations and transform the IR to another, different, version of the IR but the alloca is not promotable anymore? On occasion, the compiler can pessimize a code sequence and coroutine lowering should be resilient to such things.

Sep 3 2017, 9:13 PM

Sep 1 2017

GorNishanov added a comment to D37093: [coroutines] Promote cleanup.dest.slot-like allocas to registers to avoid storing them in the coroutine frame.

How are integer allocas special?

Sep 1 2017, 9:30 AM

Aug 25 2017

GorNishanov added inline comments to D37093: [coroutines] Promote cleanup.dest.slot-like allocas to registers to avoid storing them in the coroutine frame.
Aug 25 2017, 1:47 PM

Aug 24 2017

GorNishanov committed rL311762: [coroutines] Support coroutine-handle returning await-suspend (i.e symmetric….
[coroutines] Support coroutine-handle returning await-suspend (i.e symmetric…
Aug 24 2017, 9:48 PM
GorNishanov closed D37131: [coroutines] Support coroutine-handle returning await-suspend (i.e symmetric control transfer) by committing rL311762: [coroutines] Support coroutine-handle returning await-suspend (i.e symmetric….
Aug 24 2017, 9:48 PM
GorNishanov accepted D37131: [coroutines] Support coroutine-handle returning await-suspend (i.e symmetric control transfer).

LGTM

Aug 24 2017, 9:12 PM
GorNishanov created D37131: [coroutines] Support coroutine-handle returning await-suspend (i.e symmetric control transfer).
Aug 24 2017, 9:11 PM
GorNishanov committed rL311751: [coroutines] Add support for symmetric control transfer (musttail on coro..
[coroutines] Add support for symmetric control transfer (musttail on coro.
Aug 24 2017, 7:26 PM
GorNishanov closed D37125: [coroutines] Add support for symmetric control transfer (musttail on coro.resumes followed by a suspend) by committing rL311751: [coroutines] Add support for symmetric control transfer (musttail on coro..
Aug 24 2017, 7:26 PM
GorNishanov accepted D37125: [coroutines] Add support for symmetric control transfer (musttail on coro.resumes followed by a suspend).

LGTM

Aug 24 2017, 7:23 PM
GorNishanov updated the diff for D37125: [coroutines] Add support for symmetric control transfer (musttail on coro.resumes followed by a suspend).

On the way to ret instruction track the incoming values of PHINodes and select correct case branch for SwitchInst which is used to implement a suspend point

Aug 24 2017, 7:23 PM
GorNishanov planned changes to D37125: [coroutines] Add support for symmetric control transfer (musttail on coro.resumes followed by a suspend).

Need to handle PHI nodes as well on the way to SwitchInst representing the suspend.

Aug 24 2017, 5:21 PM
GorNishanov created D37125: [coroutines] Add support for symmetric control transfer (musttail on coro.resumes followed by a suspend).
Aug 24 2017, 3:59 PM
GorNishanov created D37115: [coroutines] Do not attempt to typo-correct when coroutine is looking for required members.
Aug 24 2017, 11:35 AM
GorNishanov created D37112: [coroutines] Always place escaped allocas into the coroutine frame.
Aug 24 2017, 8:56 AM

Aug 23 2017

GorNishanov created D37093: [coroutines] Promote cleanup.dest.slot-like allocas to registers to avoid storing them in the coroutine frame.
Aug 23 2017, 10:52 PM
GorNishanov committed rL311556: [coroutines] CoroBegin from inner coroutines should be considered for spills.
[coroutines] CoroBegin from inner coroutines should be considered for spills
Aug 23 2017, 7:49 AM
GorNishanov closed D37062: [coroutines] CoroBegin from inner coroutines should be considered for spills by committing rL311556: [coroutines] CoroBegin from inner coroutines should be considered for spills.
Aug 23 2017, 7:49 AM
GorNishanov updated the summary of D37050: [coroutines] Self-review: two combined fixes.
Aug 23 2017, 7:06 AM
GorNishanov updated the summary of D37062: [coroutines] CoroBegin from inner coroutines should be considered for spills.
Aug 23 2017, 7:06 AM
GorNishanov created D37062: [coroutines] CoroBegin from inner coroutines should be considered for spills.
Aug 23 2017, 7:01 AM

Aug 22 2017

GorNishanov created D37050: [coroutines] Self-review: two combined fixes.
Aug 22 2017, 9:45 PM

Jul 30 2017

GorNishanov accepted D36070: [coroutines] Evaluate the operand of void `co_return` expressions..

LGTM

Jul 30 2017, 8:37 PM

Jul 25 2017

GorNishanov committed rL308996: [coroutines] Add serialization/deserialization of coroutines.
[coroutines] Add serialization/deserialization of coroutines
Jul 25 2017, 11:03 AM
GorNishanov closed D35383: [coroutines] Add serialization/deserialization of coroutines by committing rL308996: [coroutines] Add serialization/deserialization of coroutines.
Jul 25 2017, 11:03 AM
GorNishanov updated the diff for D35383: [coroutines] Add serialization/deserialization of coroutines.

Thank you for the review. Feedback implemented. Preparing to land

Jul 25 2017, 10:19 AM

Jul 24 2017

GorNishanov added a comment to D35383: [coroutines] Add serialization/deserialization of coroutines.

@rsmith, ping. Would be good to get this in for clang 5.0

Jul 24 2017, 11:42 AM

Jul 13 2017

GorNishanov created D35383: [coroutines] Add serialization/deserialization of coroutines.
Jul 13 2017, 1:29 PM

Jul 9 2017

GorNishanov committed rL307418: [cloning] Do not duplicate types when cloning functions.
[cloning] Do not duplicate types when cloning functions
Jul 9 2017, 6:16 AM
GorNishanov closed D35106: [cloning] Do not duplicate types when cloning functions by committing rL307418: [cloning] Do not duplicate types when cloning functions.
Jul 9 2017, 6:15 AM
GorNishanov added a comment to D35106: [cloning] Do not duplicate types when cloning functions.

Thank you for the review. Preparing to land.

Jul 9 2017, 6:13 AM
GorNishanov added a comment to D35106: [cloning] Do not duplicate types when cloning functions.

The implementation of this looks good to me. I guess I'm not entirely sure why it's necessary for that type to be distinct in the first place, but that's probably a different discussion from just fixing this bug.

Jul 9 2017, 6:13 AM

Jul 6 2017

GorNishanov created D35106: [cloning] Do not duplicate types when cloning functions.
Jul 6 2017, 9:52 PM

Jun 15 2017

GorNishanov accepted D34216: [coroutines] Remove pass-through operator co_await; Replace it with the input expression.

LGTM

Jun 15 2017, 10:52 AM
GorNishanov added inline comments to D34194: [coroutines] Allow co_await and co_yield expressions that return an lvalue to compile.
Jun 15 2017, 10:26 AM
GorNishanov added a comment to D34194: [coroutines] Allow co_await and co_yield expressions that return an lvalue to compile.

Added John McCall as he made great suggestions last time I touched emitSuspendExpression

Jun 15 2017, 10:24 AM
GorNishanov updated subscribers of D34194: [coroutines] Allow co_await and co_yield expressions that return an lvalue to compile.
Jun 15 2017, 10:23 AM
GorNishanov accepted D34194: [coroutines] Allow co_await and co_yield expressions that return an lvalue to compile.

LGTM with changes

Jun 15 2017, 10:12 AM