GorNishanov closed this revision.
GorNishanov added a comment.
Commit: r298784
https://reviews.llvm.org/D30809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
GorNishanov updated this revision to Diff 93061.
GorNishanov added a comment.
Thank you very much for the review!
Merged with the top of the trunk and preparing to land
https://reviews.llvm.org/D30809
Files:
lib/CodeGen/CGCoroutine.cpp
lib/CodeGen/CGExprAgg.cpp
lib/CodeGen/CGExprComplex.
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
Looks great, thanks.
https://reviews.llvm.org/D30809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/ma
GorNishanov marked 2 inline comments as done.
GorNishanov added a comment.
Looks good now?
https://reviews.llvm.org/D30809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
GorNishanov marked 4 inline comments as done.
GorNishanov added inline comments.
Comment at: lib/CodeGen/CGCoroutine.cpp:26
+enum class AwaitKind { Init, Normal, Yield, Final };
+char const *AwaitKindStr[] = {"init", "await", "yield", "final"};
+}
majnemer wrote:
GorNishanov updated this revision to Diff 91790.
GorNishanov added a comment.
- reworked EmitAwait/Yield to has the signature similar to EmitAnyExpr
- await expresions now support _Complex types.
- s/Suffix/Prefix in buildCoroutineSuffix, since it was actually building a
prefix
- buildCoroutineSu
rjmccall added inline comments.
Comment at: lib/CodeGen/CGCoroutine.cpp:32
struct CGCoroData {
+ AwaitKind CurrentAwaitKind = AwaitKind::Init;
GorNishanov wrote:
> majnemer wrote:
> > Shouldn't this struct be in an anonymous namespace?
> It is forward declare
majnemer added inline comments.
Comment at: lib/CodeGen/CGCoroutine.cpp:85
+ unsigned No = 0;
+ StringRef AwaitKindStr = 0;
+ switch (Kind) {
I'd just let the default constructor do its thing.
https://reviews.llvm.org/D30809
__
GorNishanov marked an inline comment as done.
GorNishanov added inline comments.
Comment at: lib/CodeGen/CGCoroutine.cpp:85
+ unsigned No = 0;
+ const char* AwaitKindStr = 0;
+ switch (Kind) {
majnemer wrote:
> I'd use a StringRef here.
StringRef it is.
htt
GorNishanov updated this revision to Diff 91497.
GorNishanov added a comment.
Implemented review feedback: const char * => StringRef in buildSuspendSuffixStr
https://reviews.llvm.org/D30809
Files:
lib/CodeGen/CGCoroutine.cpp
lib/CodeGen/CGExprAgg.cpp
lib/CodeGen/CGExprScalar.cpp
lib/Cod
majnemer added inline comments.
Comment at: lib/CodeGen/CGCoroutine.cpp:85
+ unsigned No = 0;
+ const char* AwaitKindStr = 0;
+ switch (Kind) {
I'd use a StringRef here.
https://reviews.llvm.org/D30809
___
cfe-c
GorNishanov marked 4 inline comments as done.
GorNishanov added inline comments.
Comment at: lib/CodeGen/CGCoroutine.cpp:32
struct CGCoroData {
+ AwaitKind CurrentAwaitKind = AwaitKind::Init;
majnemer wrote:
> Shouldn't this struct be in an anonymous namespac
GorNishanov updated this revision to Diff 91486.
GorNishanov added a comment.
Addressed review feedback
- clang-format three functions in CGExprScalar.cpp
- got rid of AwaitKindStr array and select appropriate string in the switch
statement in buildAwaitKindPrefix
https://reviews.llvm.org/D308
majnemer added inline comments.
Comment at: lib/CodeGen/CGCoroutine.cpp:26
+enum class AwaitKind { Init, Normal, Yield, Final };
+char const *AwaitKindStr[] = {"init", "await", "yield", "final"};
+}
I'd move this into buildSuspendSuffixStr.
Com
GorNishanov added a comment.
+ @majnemer who is most familiar with LLVM Coroutines representation.
https://reviews.llvm.org/D30809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
GorNishanov created this revision.
Herald added a subscriber: mehdi_amini.
Emit suspend expression which roughly looks like:
auto && x = CommonExpr();
if (!x.await_ready()) {
llvm_coro_save();
x.await_suspend(...); (*)
llvm_coro_suspend(); (**)
}
x.await_resume();
wher
16 matches
Mail list logo