r348209 - NFC: Add .vscode to .gitignore

2018-12-03 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon Dec 3 14:51:07 2018 New Revision: 348209 URL: http://llvm.org/viewvc/llvm-project?rev=348209&view=rev Log: NFC: Add .vscode to .gitignore Modified: cfe/trunk/.gitignore Modified: cfe/trunk/.gitignore URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/.gitignor

r333379 - [coroutines] Pass implicit object parameter to promise ctor (fix BUG37604)

2018-05-28 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon May 28 11:08:47 2018 New Revision: 79 URL: http://llvm.org/viewvc/llvm-project?rev=79&view=rev Log: [coroutines] Pass implicit object parameter to promise ctor (fix BUG37604) Summary: Complete the implementation of p0914r1. Implicit object parameter should be

[libcxx] r329245 - [coroutines] libcxx, noop_coroutine, make bots even more happy

2018-04-04 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Wed Apr 4 17:18:37 2018 New Revision: 329245 URL: http://llvm.org/viewvc/llvm-project?rev=329245&view=rev Log: [coroutines] libcxx, noop_coroutine, make bots even more happy Modified: libcxx/trunk/include/experimental/coroutine libcxx/trunk/test/std/experimenta

[libcxx] r329240 - [coroutines] libcxx noop_coroutine. Make bots happier

2018-04-04 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Wed Apr 4 16:43:50 2018 New Revision: 329240 URL: http://llvm.org/viewvc/llvm-project?rev=329240&view=rev Log: [coroutines] libcxx noop_coroutine. Make bots happier Modified: libcxx/trunk/test/std/experimental/language.support/support.coroutines/coroutine.handle/co

[libcxx] r329239 - [coroutines] Allow compilation under c++03

2018-04-04 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Wed Apr 4 15:51:57 2018 New Revision: 329239 URL: http://llvm.org/viewvc/llvm-project?rev=329239&view=rev Log: [coroutines] Allow compilation under c++03 Modified: libcxx/trunk/include/experimental/coroutine Modified: libcxx/trunk/include/experimental/coroutine URL

[libcxx] r329237 - [coroutines] Add noop_coroutine to

2018-04-04 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Wed Apr 4 15:18:03 2018 New Revision: 329237 URL: http://llvm.org/viewvc/llvm-project?rev=329237&view=rev Log: [coroutines] Add noop_coroutine to A recent addition to Coroutines TS (https://wg21.link/p0913) adds a pre-defined coroutine noop_coroutine that does nothing.

r328993 - [coroutines] Add __builtin_coro_noop => llvm.coro.noop

2018-04-02 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon Apr 2 10:35:37 2018 New Revision: 328993 URL: http://llvm.org/viewvc/llvm-project?rev=328993&view=rev Log: [coroutines] Add __builtin_coro_noop => llvm.coro.noop A recent addition to Coroutines TS (https://wg21.link/p0913) adds a pre-defined coroutine noop_coroutine

r328663 - [coroutines] Do not attempt to typo-correct when coroutine is looking for required members

2018-03-27 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Tue Mar 27 13:38:19 2018 New Revision: 328663 URL: http://llvm.org/viewvc/llvm-project?rev=328663&view=rev Log: [coroutines] Do not attempt to typo-correct when coroutine is looking for required members When SemaCoroutine looks for await_resume, it means it. No need for

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

2017-11-11 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Sat Nov 11 09:00:43 2017 New Revision: 317981 URL: http://llvm.org/viewvc/llvm-project?rev=317981&view=rev Log: [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

r312565 - [coroutines] Make sure auto return type of await_resume is properly handled

2017-09-05 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Tue Sep 5 12:31:52 2017 New Revision: 312565 URL: http://llvm.org/viewvc/llvm-project?rev=312565&view=rev Log: [coroutines] Make sure auto return type of await_resume is properly handled Reviewers: rsmith, EricWF Reviewed By: rsmith Subscribers: javed.absar, cfe-commi

r311762 - [coroutines] Support coroutine-handle returning await-suspend (i.e symmetric control transfer)

2017-08-24 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Thu Aug 24 21:46:54 2017 New Revision: 311762 URL: http://llvm.org/viewvc/llvm-project?rev=311762&view=rev Log: [coroutines] Support coroutine-handle returning await-suspend (i.e symmetric control transfer) Summary: If await_suspend returns a coroutine_handle, as in the

r308996 - [coroutines] Add serialization/deserialization of coroutines

2017-07-25 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Tue Jul 25 11:01:49 2017 New Revision: 308996 URL: http://llvm.org/viewvc/llvm-project?rev=308996&view=rev Log: [coroutines] Add serialization/deserialization of coroutines Reviewers: rsmith Reviewed By: rsmith Subscribers: EricWF, cfe-commits Differential Revision: h

Re: [PATCH] D33750: CGCleanup: (NFC) add a test that used to trigger broken IR

2017-06-07 Thread Gor Nishanov via cfe-commits
Sure thing. I'll expand the test to verify that frontend emit expected IR for this case. Thank you for the feedback On Mon, Jun 5, 2017 at 9:58 AM, David Blaikie wrote: > > > On Wed, May 31, 2017 at 5:45 PM Gor Nishanov via Phabricator via > cfe-commits wrote: > >> GorNishanov created this revi

Re: [libcxx] r304591 - Mark two coroutine tests as unsupported under ubsan, again

2017-06-02 Thread Gor Nishanov via cfe-commits
Cool. Thanks for checking. On Fri, Jun 2, 2017 at 1:12 PM, Vedant Kumar wrote: > Hm, sorry, the compiler on the bot could not have picked up r304518, so I > jumped the gun here. I'll try again later and report back in PR33271. > > vedant > > > On Jun 2, 2017, at 1:09 PM, Vedant Kumar via cfe-com

r304380 - CGCleanup: (NFC) add another test for r304335 - Don't try to spill static allocas

2017-05-31 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Wed May 31 20:15:25 2017 New Revision: 304380 URL: http://llvm.org/viewvc/llvm-project?rev=304380&view=rev Log: CGCleanup: (NFC) add another test for r304335 - Don't try to spill static allocas Summary: Coroutine related test that used to trigger broken IR prior to r304

Re: r303714 - [coroutines] Fix leak in CGCoroutine.cpp

2017-05-29 Thread Gor Nishanov via cfe-commits
if the creation >>> can't be avoided, maybe it's OK to 'delete FinalBB' here, rather than >>> adding it for it to be removed later?) >>> >>> (also bracing seems off - could you run your changes through >>> clang-format? I'd exp

r304176 - CGCoroutine.cpp: (NFC) clang-format misplaced brace

2017-05-29 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon May 29 16:15:31 2017 New Revision: 304176 URL: http://llvm.org/viewvc/llvm-project?rev=304176&view=rev Log: CGCoroutine.cpp: (NFC) clang-format misplaced brace Modified: cfe/trunk/lib/CodeGen/CGCoroutine.cpp Modified: cfe/trunk/lib/CodeGen/CGCoroutine.cpp URL:

Re: r303714 - [coroutines] Fix leak in CGCoroutine.cpp

2017-05-29 Thread Gor Nishanov via cfe-commits
n't be avoided, maybe it's OK to 'delete FinalBB' here, rather than > adding it for it to be removed later?) > > (also bracing seems off - could you run your changes through clang-format? > I'd expect '} else {' on the same line. > > On Tue, M

r304092 - [coroutines] www/cxx_status.html: add non-breaking hyphen

2017-05-28 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Sun May 28 12:35:23 2017 New Revision: 304092 URL: http://llvm.org/viewvc/llvm-project?rev=304092&view=rev Log: [coroutines] www/cxx_status.html: add non-breaking hyphen Reviewers: GorNishanov Reviewed By: GorNishanov Subscribers: EricWF, rsmith, cfe-commits Different

r304091 - [coroutines] www/cxx_status.html: add non-breaking hyphen

2017-05-28 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Sun May 28 11:25:31 2017 New Revision: 304091 URL: http://llvm.org/viewvc/llvm-project?rev=304091&view=rev Log: [coroutines] www/cxx_status.html: add non-breaking hyphen Reviewers: GorNishanov Reviewed By: GorNishanov Subscribers: EricWF, rsmith, cfe-commits Different

r304081 - [coroutines] Mark cxx_status.html of Coroutines TS as (SVN)

2017-05-27 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Sat May 27 17:54:52 2017 New Revision: 304081 URL: http://llvm.org/viewvc/llvm-project?rev=304081&view=rev Log: [coroutines] Mark cxx_status.html of Coroutines TS as (SVN) Summary: It is time! Reviewers: GorNishanov, rsmith Reviewed By: GorNishanov, rsmith Subscribers

r303803 - [coroutines] Add support for coroutines with non-scalar parameters

2017-05-24 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Wed May 24 15:09:14 2017 New Revision: 303803 URL: http://llvm.org/viewvc/llvm-project?rev=303803&view=rev Log: [coroutines] Add support for coroutines with non-scalar parameters Summary: Simple types like int are handled by LLVM Coroutines just fine. But for non-scalar

r303764 - [coroutines] Make generic lambda coroutines work

2017-05-24 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Wed May 24 10:44:57 2017 New Revision: 303764 URL: http://llvm.org/viewvc/llvm-project?rev=303764&view=rev Log: [coroutines] Make generic lambda coroutines work Summary: 1. Coroutine cannot be constexpr (added a check in SemaLambda.cpp not to mark coroutine as constexpr

r303752 - [coroutines] Improved diagnostics when unhandled_exception is missing in the promise_type

2017-05-24 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Wed May 24 09:34:19 2017 New Revision: 303752 URL: http://llvm.org/viewvc/llvm-project?rev=303752&view=rev Log: [coroutines] Improved diagnostics when unhandled_exception is missing in the promise_type Summary: Now we helpfully provide a note pointing at the promise_typ

r303748 - [coroutines] [NFC] Add tests for return_void, unhandled_exception and promise dtor

2017-05-24 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Wed May 24 09:19:48 2017 New Revision: 303748 URL: http://llvm.org/viewvc/llvm-project?rev=303748&view=rev Log: [coroutines] [NFC] Add tests for return_void, unhandled_exception and promise dtor Summary: * Test that coroutine promise destructor is called. * Test that we

r303716 - [coroutines] Implement correct GRO lifetime

2017-05-23 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Tue May 23 21:38:26 2017 New Revision: 303716 URL: http://llvm.org/viewvc/llvm-project?rev=303716&view=rev Log: [coroutines] Implement correct GRO lifetime Summary: Sema creates a declaration for gro variable as: auto $gro = $promise.get_return_object(); However, gro v

r303714 - [coroutines] Fix leak in CGCoroutine.cpp

2017-05-23 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Tue May 23 20:54:37 2017 New Revision: 303714 URL: http://llvm.org/viewvc/llvm-project?rev=303714&view=rev Log: [coroutines] Fix leak in CGCoroutine.cpp FinalBB need to be emitted even when unused to make sure it is deleted Modified: cfe/trunk/lib/CodeGen/CGCoroutin

r303605 - [coroutines] Skip over passthrough operator co_await

2017-05-22 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Tue May 23 00:25:31 2017 New Revision: 303605 URL: http://llvm.org/viewvc/llvm-project?rev=303605&view=rev Log: [coroutines] Skip over passthrough operator co_await https://reviews.llvm.org/D31627 Modified: cfe/trunk/lib/CodeGen/CGCoroutine.cpp cfe/trunk/test/Co

r303603 - [coroutines] Add emission of initial and final suspends

2017-05-22 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Tue May 23 00:04:01 2017 New Revision: 303603 URL: http://llvm.org/viewvc/llvm-project?rev=303603&view=rev Log: [coroutines] Add emission of initial and final suspends https://reviews.llvm.org/D31608 Modified: cfe/trunk/lib/CodeGen/CGCoroutine.cpp cfe/trunk/test

r303599 - [coroutines] Add support for deallocation elision

2017-05-22 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon May 22 23:21:27 2017 New Revision: 303599 URL: http://llvm.org/viewvc/llvm-project?rev=303599&view=rev Log: [coroutines] Add support for deallocation elision Wrap deallocation code with: if (auto *mem = coro.free()) Deallocate When backend decides to elide alloca

r303598 - [coroutines] Replace all coro.frame builtins with an SSA value of coro.begin

2017-05-22 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon May 22 22:46:59 2017 New Revision: 303598 URL: http://llvm.org/viewvc/llvm-project?rev=303598&view=rev Log: [coroutines] Replace all coro.frame builtins with an SSA value of coro.begin SemaCoroutine forms expressions referring to the coroutine frame of the enclosing

r303596 - [coroutines] Add support for allocation elision

2017-05-22 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon May 22 20:13:17 2017 New Revision: 303596 URL: http://llvm.org/viewvc/llvm-project?rev=303596&view=rev Log: [coroutines] Add support for allocation elision Summary: We wrap allocation code so that backend can elide it if necessary. llvm.coro.alloc intrinsic returns t

r303584 - [coroutines] Fix coro-eh-cleanup.cpp test

2017-05-22 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon May 22 17:41:28 2017 New Revision: 303584 URL: http://llvm.org/viewvc/llvm-project?rev=303584&view=rev Log: [coroutines] Fix coro-eh-cleanup.cpp test Modified: cfe/trunk/test/CodeGenCoroutines/coro-eh-cleanup.cpp Modified: cfe/trunk/test/CodeGenCoroutines/coro-e

r303583 - [coroutines] Wrap the body of the coroutine in try-catch

2017-05-22 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon May 22 17:33:17 2017 New Revision: 303583 URL: http://llvm.org/viewvc/llvm-project?rev=303583&view=rev Log: [coroutines] Wrap the body of the coroutine in try-catch Summary: If unhandled_exception member function is present in the coroutine promise, wrap the body of

r303573 - [coroutines] Build GRO declaration and return GRO statement

2017-05-22 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon May 22 15:22:23 2017 New Revision: 303573 URL: http://llvm.org/viewvc/llvm-project?rev=303573&view=rev Log: [coroutines] Build GRO declaration and return GRO statement Summary: 1. build declaration of the gro local variable that keeps the result of get_return_object

r299510 - [coroutines] Add coro.end handling

2017-04-04 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Tue Apr 4 23:55:03 2017 New Revision: 299510 URL: http://llvm.org/viewvc/llvm-project?rev=299510&view=rev Log: [coroutines] Add coro.end handling Summary: For WinEH, We add a funclet bundle to a coro.end call, so that CoroSplit in LLVM can replace it with cleanup ret a

r299281 - [coroutines] Add cleanup for compiler injected objects/allocations in coroutine body

2017-03-31 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Fri Mar 31 19:22:47 2017 New Revision: 299281 URL: http://llvm.org/viewvc/llvm-project?rev=299281&view=rev Log: [coroutines] Add cleanup for compiler injected objects/allocations in coroutine body Summary: * Use pushCleanup to emit freeing coroutine memory on normal and

r298893 - Use BuildReturnStmt in SemaCoroutine to unbreak sanitizer tests.

2017-03-27 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon Mar 27 21:51:45 2017 New Revision: 298893 URL: http://llvm.org/viewvc/llvm-project?rev=298893&view=rev Log: Use BuildReturnStmt in SemaCoroutine to unbreak sanitizer tests. FIXME: ActOnReturnStmt expects a scope that is inside of the function, due to CheckJumpOutOf

r298891 - [coroutines] Handle get_return_object_on_allocation_failure

2017-03-27 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon Mar 27 18:36:59 2017 New Revision: 298891 URL: http://llvm.org/viewvc/llvm-project?rev=298891&view=rev Log: [coroutines] Handle get_return_object_on_allocation_failure Summary: If promise_type has get_return_object_on_allocation_failure defined, check if an allocatio

r298784 - [coroutines] Add codegen for await and yield expressions

2017-03-25 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Sat Mar 25 21:18:05 2017 New Revision: 298784 URL: http://llvm.org/viewvc/llvm-project?rev=298784&view=rev Log: [coroutines] Add codegen for await and yield expressions Details: Emit suspend expression which roughly looks like: auto && x = CommonExpr(); if (!x.await_re

r297541 - [coroutines] Refactor SuspendExpr to create just one OpaqueValue (almost NFC)

2017-03-10 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Fri Mar 10 19:30:17 2017 New Revision: 297541 URL: http://llvm.org/viewvc/llvm-project?rev=297541&view=rev Log: [coroutines] Refactor SuspendExpr to create just one OpaqueValue (almost NFC) Summary: Create only one OpaqueValue for await_ready/await_suspend/await_resume.

r297356 - [coroutines] Build and pass coroutine_handle to await_suspend

2017-03-08 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Wed Mar 8 21:09:43 2017 New Revision: 297356 URL: http://llvm.org/viewvc/llvm-project?rev=297356&view=rev Log: [coroutines] Build and pass coroutine_handle to await_suspend Summary: This patch adds passing a coroutine_handle object to await_suspend calls. It builds the

r297224 - [coroutines] update coro_end builtin to match llvm

2017-03-07 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Tue Mar 7 15:01:08 2017 New Revision: 297224 URL: http://llvm.org/viewvc/llvm-project?rev=297224&view=rev Log: [coroutines] update coro_end builtin to match llvm Summary: llvm.coro.end intrinsic now returns bool. Updating clang to match it. Reviewers: GorNishanov, rsmi

r297076 - [coroutines] Add co_return statement emission

2017-03-06 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon Mar 6 15:12:54 2017 New Revision: 297076 URL: http://llvm.org/viewvc/llvm-project?rev=297076&view=rev Log: [coroutines] Add co_return statement emission Summary: Added co_return statement emission. Tweaked coro-alloc.cpp test to use co_return to trigger coroutine p

r294933 - [coroutines] NFC: Refactor Sema::CoroutineBodyStmt construction.

2017-02-12 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Sun Feb 12 23:05:02 2017 New Revision: 294933 URL: http://llvm.org/viewvc/llvm-project?rev=294933&view=rev Log: [coroutines] NFC: Refactor Sema::CoroutineBodyStmt construction. Summary: Sema::CheckCompletedCoroutineBody was growing unwieldy with building all of the subs

r291513 - [coroutines] Sema: Allow co_return all by itself.

2017-01-09 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon Jan 9 18:08:31 2017 New Revision: 291513 URL: http://llvm.org/viewvc/llvm-project?rev=291513&view=rev Log: [coroutines] Sema: Allow co_return all by itself. Reviewers: rsmith, EricWF Subscribers: mehdi_amini, llvm-commits, EricWF Differential Revision: https://rev

r285306 - [coroutines] Add allocation and deallocation substatements.

2016-10-27 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Thu Oct 27 11:28:31 2016 New Revision: 285306 URL: http://llvm.org/viewvc/llvm-project?rev=285306&view=rev Log: [coroutines] Add allocation and deallocation substatements. Summary: SemaCoroutine: Add allocation / deallocation substatements. CGCoroutine/Test: Emit allocat

[PATCH] D25258: [coroutines] Create allocation and deallocation sub-statements.

2016-10-20 Thread Gor Nishanov via cfe-commits
GorNishanov abandoned this revision. GorNishanov added a comment. I'll simplify and split it into super tiny microscopic patches to have a better chance of being reviewed. https://reviews.llvm.org/D25258 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D25258: [coroutines] Create allocation and deallocation sub-statements.

2016-10-17 Thread Gor Nishanov via cfe-commits
GorNishanov added a comment. friendly ping https://reviews.llvm.org/D25258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25258: [coroutines] Create allocation and deallocation sub-statements.

2016-10-17 Thread Gor Nishanov via cfe-commits
GorNishanov added a comment. friendly ping https://reviews.llvm.org/D25258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25349: [coroutines] Build fallthrough and set_exception statements.

2016-10-17 Thread Gor Nishanov via cfe-commits
GorNishanov added a comment. @rsmith, I am wondering what were your thoughts on where to generate try { body } catch (...) { p.set_exception(std::exception()); } Would it be in SemaCoroutine.cpp? Essentially, add something like this: ` bool makeBody() { if (!OnException) ret

[PATCH] D25349: [coroutines] Build fallthrough and set_exception statements.

2016-10-06 Thread Gor Nishanov via cfe-commits
GorNishanov added a comment. LGTM, but, will need to wait for @rsmith to sign off. https://reviews.llvm.org/D25349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25349: [coroutines] Build fallthrough and set_exception statements.

2016-10-06 Thread Gor Nishanov via cfe-commits
GorNishanov added a comment. shipit > coreturn.cpp:36 > + suspend_always final_suspend(); > + awaitable yield_value(int); > + void return_void(); No need to hve yield_value here, unless you want to use co_yield expression in the coroutine

[PATCH] D25258: [coroutines] Create allocation and deallocation sub-statements.

2016-10-06 Thread Gor Nishanov via cfe-commits
GorNishanov updated this revision to Diff 73835. GorNishanov added a comment. Addressed review comments. Anything else, @rsmith? 1. compute default new align and pass it to coro.id 2. fix typo in comment https://reviews.llvm.org/D25258 Files: include/clang/AST/StmtCXX.h include/clang/Basic

[PATCH] D25296: [coroutines] Fix co_return statement for initializer list arguments

2016-10-06 Thread Gor Nishanov via cfe-commits
GorNishanov added a comment. LGTM, but, I cannot approve clang patches. Let's wait on @rsmith to give the go ahead. https://reviews.llvm.org/D25296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

[PATCH] D25258: [coroutines] Create allocation and deallocation sub-statements.

2016-10-04 Thread Gor Nishanov via cfe-commits
GorNishanov added inline comments. > majnemer wrote in CGCoroutine.cpp:68-69 > I think that's just `CGM.getContext().getTargetInfo().getSuitableAlign() / > CGM.getContext().getTargetInfo().getCharWidth()` Yay! One less FIXME. I think I will make it to match __STDCPP_DEFAULT_NEW_ALIGNMENT__:

[PATCH] D25258: [coroutines] Create allocation and deallocation sub-statements.

2016-10-04 Thread Gor Nishanov via cfe-commits
GorNishanov created this revision. GorNishanov added reviewers: rsmith, EricWF. GorNishanov added a subscriber: cfe-commits. Herald added a subscriber: mehdi_amini. 1. Sema: Add allocation / deallocation substatements. 2. Sema: Add labels to final-suspend and deallocation substatements. 3. Sema: A

[PATCH] D25068: [coroutines] Switch to using std::experimental namespace per P0057R5

2016-10-03 Thread Gor Nishanov via cfe-commits
GorNishanov closed this revision. GorNishanov added a comment. Closed by: r283170 - [coroutines] Switch to using std::experimental namespace per P0057R5 https://reviews.llvm.org/D25068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

r283170 - [coroutines] Switch to using std::experimental namespace per P0057R5

2016-10-03 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon Oct 3 19:31:16 2016 New Revision: 283170 URL: http://llvm.org/viewvc/llvm-project?rev=283170&view=rev Log: [coroutines] Switch to using std::experimental namespace per P0057R5 Summary: Look for coroutine_traits and friends in std::experimental namespace. Patch (most

[PATCH] D25068: [coroutines] Switch to using std::experimental namespace per P0057R5

2016-10-03 Thread Gor Nishanov via cfe-commits
GorNishanov updated this revision to Diff 73378. GorNishanov marked an inline comment as done. GorNishanov added a comment. Implemented review feedback. Landing is imminent. https://reviews.llvm.org/D25068 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sem

[PATCH] D24373: [coroutines] Adding builtins for coroutine intrinsics and backendutil support.

2016-10-03 Thread Gor Nishanov via cfe-commits
GorNishanov closed this revision. GorNishanov added a comment. Closed by commit r283155 - [coroutines] Adding builtins for coroutine intrinsics and backendutil support. For some reason phabricator did not close it automatically. https://reviews.llvm.org/D24373 __

r283155 - [coroutines] Adding builtins for coroutine intrinsics and backendutil support.

2016-10-03 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon Oct 3 17:44:48 2016 New Revision: 283155 URL: http://llvm.org/viewvc/llvm-project?rev=283155&view=rev Log: [coroutines] Adding builtins for coroutine intrinsics and backendutil support. Summary: With this commit simple coroutines can be created in plain C using coro

[PATCH] D24373: [coroutines] Adding builtins for coroutine intrinsics and backendutil support.

2016-10-03 Thread Gor Nishanov via cfe-commits
GorNishanov updated this revision to Diff 73350. GorNishanov added a comment. Herald added a subscriber: modocache. 1. https://reviews.llvm.org/owners/package/2/ test removed 2. Update LanguageExtensions.rst with suggested edits 3. coro-builtins.c test now passes useful arguments and pattern match

[PATCH] D25068: [coroutines] Switch to using std::experimental namespace per P0057R5

2016-10-03 Thread Gor Nishanov via cfe-commits
GorNishanov requested changes to this revision. GorNishanov added a comment. This revision now requires changes to proceed. > coroutines.cpp:1 > // RUN: %clang_cc1 -std=c++14 -fcoroutines -verify %s > Change to -fcoroutines-ts https://reviews.llvm.org/D25068 ___

[PATCH] D24373: [coroutines] Adding builtins for coroutine intrinsics and backendutil support.

2016-10-01 Thread Gor Nishanov via cfe-commits
GorNishanov updated this revision to Diff 73213. GorNishanov added a comment. rebase on top of the trunk https://reviews.llvm.org/D24373 Files: docs/LanguageExtensions.rst include/clang/Basic/Builtins.def lib/CodeGen/BackendUtil.cpp lib/CodeGen/CGBuiltin.cpp lib/CodeGen/CGCoroutine.cp

[PATCH] D25130: [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts

2016-10-01 Thread Gor Nishanov via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL283064: [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts (authored by GorNishanov). Changed prior to commit: https://reviews.llvm.org/D25130?vs=73206&id=73208#toc Repository: rL LLVM

r283064 - [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts

2016-10-01 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Sat Oct 1 22:31:58 2016 New Revision: 283064 URL: http://llvm.org/viewvc/llvm-project?rev=283064&view=rev Log: [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts Summary: Also makes -fcoroutines_ts to be both a Driver and CC1 flag. Patch mostly by EricWF.

[PATCH] D25130: [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts

2016-10-01 Thread Gor Nishanov via cfe-commits
GorNishanov updated this revision to Diff 73206. GorNishanov marked an inline comment as done. GorNishanov added a comment. rename .m and .mm to .c and .cpp https://reviews.llvm.org/D25130 Files: include/clang/Basic/LangOptions.def include/clang/Driver/CC1Options.td include/clang/Driver/O

[PATCH] D25130: [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts

2016-10-01 Thread Gor Nishanov via cfe-commits
GorNishanov marked an inline comment as done. GorNishanov added inline comments. > rsmith wrote in coroutines.m:1 > Is there any reason you're testing Objective-C and Objective-C++ inputs here > (`.m` and `.mm`) rather than C and C++ inputs? No particular reason (cut and paste from module tests

[PATCH] D24373: [Coroutines] Adding builtins for coroutine intrinsics and backendutil support.

2016-09-30 Thread Gor Nishanov via cfe-commits
GorNishanov added reviewers: rnk, EricWF. GorNishanov updated this revision to Diff 73155. GorNishanov marked an inline comment as done. GorNishanov added a comment. Improved diagnostics in CGCoroutine and ping... https://reviews.llvm.org/D24373 Files: docs/LanguageExtensions.rst include/cl

Re: [PATCH] [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts

2016-09-30 Thread Gor Nishanov via cfe-commits
Uploaded to phabricator as https://reviews.llvm.org/D25130 __cpp_coroutines stays as it is. On Fri, Sep 30, 2016 at 10:11 AM, Gor Nishanov wrote: > I noticed that other TSes has experimental in their SD-6 macro name, > hence, I changed it to match the concepts TS macro > __cpp_experimental_conc

[PATCH] D25130: [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts

2016-09-30 Thread Gor Nishanov via cfe-commits
GorNishanov created this revision. GorNishanov added reviewers: rsmith, rnk, EricWF, cfe-commits. Herald added a subscriber: mehdi_amini. Also makes -fcoroutines_ts to be both a Driver and CC1 flag. Patch mostly by EricWF. https://reviews.llvm.org/D25130 Files: include/clang/Basic/LangOption

[PATCH] D25078: [coroutines] Diagnose when 'main' is declared as a coroutine.

2016-09-30 Thread Gor Nishanov via cfe-commits
GorNishanov added a comment. LGTM I am happy either way. Fixes for co_return can come later. https://reviews.llvm.org/D25078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts

2016-09-30 Thread Gor Nishanov via cfe-commits
I noticed that other TSes has experimental in their SD-6 macro name, hence, I changed it to match the concepts TS macro __cpp_experimental_concepts. We are reviewing the wording coming Monday and can tweak the SD-6 macro as needed. Also, Richard mentioned in the feedback that: >> However, we *sho

[PATCH] D25078: [Coroutines] Diagnose when 'main' is declared as a coroutine.

2016-09-30 Thread Gor Nishanov via cfe-commits
GorNishanov added inline comments. > DiagnosticSemaKinds.td:8569 >"'%0' cannot be used in a varargs function">; > def ext_coroutine_without_co_await_co_yield : ExtWarn< >"'co_return' used in a function " I am wondering, if we can handle all four cases when function can be a coroutine.

[PATCH] [Request, 69 lines] D25068: [coroutines] Switch to using std::experimental namespace per P0057R5

2016-09-29 Thread Gor Nishanov via cfe-commits
GorNishanov created this revision.GorNishanov added reviewers: EricWF, rsmith, cfe-commits.Herald added a subscriber: mehdi_amini. View RevisionLook for coroutine_traits and friends in std::experimental namespace. Patch (mostly) by EricWF.https://reviews.llvm.org/D25068Files:include/clang/Basic/Dia

Re: [PATCH] [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts

2016-09-29 Thread Gor Nishanov via cfe-commits
You beat me to it, Eric. :) I'll add mine for review, too. Let's see which one Richard will respond :) . 1. Remove __has_feature 2. Rename fcoroutines => fcoroutines_TS 3. Rename __cpp_coroutines => __cpp_experimental_coroutines Since phabricator is down, here is a handy diff on a github https://

Re: [PATCH] [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts

2016-09-29 Thread Gor Nishanov via cfe-commits
Let's see if renaming the attachment to *.txt helps. On Thu, Sep 29, 2016 at 5:42 PM, Gor Nishanov wrote: > Currently the -fcoroutines flag is a CC1 only flag. It really should be > both a Driver and CC1 flag. This patch fixes the option and adds tests for > the new options. > > Also adds a __ha

[PATCH] [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts

2016-09-29 Thread Gor Nishanov via cfe-commits
Currently the -fcoroutines flag is a CC1 only flag. It really should be both a Driver and CC1 flag. This patch fixes the option and adds tests for the new options. Also adds a __has_feature for coroutines. Patch is mostly by Eric Fiselier . Meticulous and painstaking extraction from the larger cor

Re: [PATCH] D25045: [Coroutines] Add proper mangling for operator co_await for MicrosoftABI

2016-09-28 Thread Gor Nishanov via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL282645: [Coroutines] Add proper mangling for operator co_await for MicrosoftABI (authored by GorNishanov). Changed prior to commit: https://reviews.llvm.org/D25045?vs=72900&id=72916#toc Repository: r

r282645 - [Coroutines] Add proper mangling for operator co_await for MicrosoftABI

2016-09-28 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Wed Sep 28 17:37:17 2016 New Revision: 282645 URL: http://llvm.org/viewvc/llvm-project?rev=282645&view=rev Log: [Coroutines] Add proper mangling for operator co_await for MicrosoftABI Reviewers: rnk, rsmith Subscribers: mehdi_amini, cfe-commits Differential Revision: h

[PATCH] D25045: [Coroutines] Add proper mangling for operator co_await for MicrosoftABI

2016-09-28 Thread Gor Nishanov via cfe-commits
GorNishanov created this revision. GorNishanov added reviewers: rsmith, rnk. GorNishanov added a subscriber: cfe-commits. Herald added a subscriber: mehdi_amini. https://reviews.llvm.org/D25045 Files: lib/AST/MicrosoftMangle.cpp test/CodeGenCoroutines/microsoft-abi-operator-coawait.cpp Index

Re: [PATCH] D24373: [Coroutines] Adding builtins for coroutine intrinsics and backendutil support.

2016-09-27 Thread Gor Nishanov via cfe-commits
GorNishanov marked an inline comment as done. Comment at: include/clang/Basic/Builtins.def:1293 @@ +1292,3 @@ + +BUILTIN(__builtin_coro_id, "v*Iiv*v*v*", "n") +BUILTIN(__builtin_coro_alloc, "bv*", "n") rsmith wrote: > I don't really like having builtins which will

Re: [PATCH] D24373: [Coroutines] Adding builtins for coroutine intrinsics and backendutil support.

2016-09-27 Thread Gor Nishanov via cfe-commits
GorNishanov updated the summary for this revision. GorNishanov removed a reviewer: majnemer. GorNishanov updated this revision to Diff 72732. GorNishanov added a comment. Herald added a subscriber: mgorny. 1. Added documentation for builtins 2. Added a couple of tests with -disable-llvm-passes to

[PATCH] D24373: [Coroutines] Adding builtins for coroutine intrinsics and backendutil support.

2016-09-09 Thread Gor Nishanov via cfe-commits
GorNishanov created this revision. GorNishanov added reviewers: rsmith, majnemer. GorNishanov added a subscriber: cfe-commits. Herald added subscribers: beanz, mehdi_amini. With this commit simple coroutines can be created in plain C using coroutine builtins (see coro.c and coro.h for an example)