yuxuanchen1997 wrote:
> I still feel it would be simpler to lookup the function for `await_suspend`
> in the awaiter and look for its return type. Then we don't need to care about
> the type of the expression.
After reading a bit, I think it's possible to do this by duplicating a little
bit o
https://github.com/yuxuanchen1997 closed
https://github.com/llvm/llvm-project/pull/119978
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yuxuanchen1997 wrote:
May I understand what's the intention of this? I would prefer that the original
author figures out a solution that doesn't depend on system linker, which is
what I would consider a proper fix.
https://github.com/llvm/llvm-project/pull/119978
__
https://github.com/yuxuanchen1997 created
https://github.com/llvm/llvm-project/pull/119978
See discussion on
https://github.com/llvm/llvm-project/pull/117475#issuecomment-2543223954
This test currently invokes the system ld, which can cause issues on some CI
systems where system ld only works
yuxuanchen1997 wrote:
> @SahilPatidar, could you help us with this?
Can we temporarily disable this test when @SahilPatidar is looking for a
solution?
https://github.com/llvm/llvm-project/pull/117475
___
cfe-commits mailing list
cfe-commits@lists.llv
@@ -0,0 +1,20 @@
+// REQUIRES: host-supports-jit, x86_64-linux
+
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+//
+// RUN: split-file %s %t
+//
+// RUN: %clang++ -std=c++20 -fPIC -c %t/vec.cpp -o %t/vec.o
+// RUN: %clang++ -shared %t/vec.o -o %t/vec.so
yuxuanchen1997 w
@@ -0,0 +1,20 @@
+// REQUIRES: host-supports-jit, x86_64-linux
+
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+//
+// RUN: split-file %s %t
+//
+// RUN: %clang++ -std=c++20 -fPIC -c %t/vec.cpp -o %t/vec.o
+// RUN: %clang++ -shared %t/vec.o -o %t/vec.so
yuxuanchen1997 w
@@ -0,0 +1,20 @@
+// REQUIRES: host-supports-jit, x86_64-linux
+
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+//
+// RUN: split-file %s %t
+//
+// RUN: %clang++ -std=c++20 -fPIC -c %t/vec.cpp -o %t/vec.o
+// RUN: %clang++ -shared %t/vec.o -o %t/vec.so
yuxuanchen1997 w
@@ -0,0 +1,20 @@
+// REQUIRES: host-supports-jit, x86_64-linux
+
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+//
+// RUN: split-file %s %t
+//
+// RUN: %clang++ -std=c++20 -fPIC -c %t/vec.cpp -o %t/vec.o
+// RUN: %clang++ -shared %t/vec.o -o %t/vec.so
+//
+// RUN: cat %t/Test.cpp | LD
https://github.com/yuxuanchen1997 edited
https://github.com/llvm/llvm-project/pull/117475
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 commented:
I landed my previous fix but I found that this test to be more problematic than
I originally anticipated. I left some comments. I may send more patches to fix
it until I am satisfied.
https://github.com/llvm/llvm-project/pull/117475
___
https://github.com/yuxuanchen1997 closed
https://github.com/llvm/llvm-project/pull/119903
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 edited
https://github.com/llvm/llvm-project/pull/119903
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 edited
https://github.com/llvm/llvm-project/pull/119903
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/119903
>From 449459edf130c842d57b672799927f158f0b92cb Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Fri, 13 Dec 2024 09:09:14 -0800
Subject: [PATCH] [clang] test should not depend on system header
---
clang
https://github.com/yuxuanchen1997 created
https://github.com/llvm/llvm-project/pull/119903
https://github.com/llvm/llvm-project/commit/30ad53b92cec0cff9679d559edcc5b933312ba0c
introduced a new test that includes from the system include path
without honoring environment variables that may prov
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/85684
>From b843c2f71a1a43cb897b557f783d60c6bf26f687 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 18 Mar 2024 10:45:20 -0700
Subject: [PATCH] Check if Coroutine await_suspend type returns the right type
@@ -418,39 +448,60 @@ static ReadySuspendResumeResult buildCoawaitCalls(Sema
&S, VarDecl *CoroPromise,
return Calls;
}
Expr *CoroHandle = CoroHandleRes.get();
- CallExpr *AwaitSuspend = cast_or_null(
- BuildSubExpr(ACT::ACT_Suspend, "await_suspend", CoroHandle));
https://github.com/yuxuanchen1997 closed
https://github.com/llvm/llvm-project/pull/73564
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 closed
https://github.com/llvm/llvm-project/pull/78801
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 closed
https://github.com/llvm/llvm-project/pull/118522
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yuxuanchen1997 wrote:
> > > so we don't need to carry around multiple implementations of
> > > machine-readable diagnostic information.
> >
> >
> > I just realized that we also have `-diagnostic-log-file` as a cc1 flag.
> > This logs into an XML. Is this preferred to the binary format or no?
yuxuanchen1997 wrote:
> so we don't need to carry around multiple implementations of machine-readable
> diagnostic information.
I just realized that we also have `-diagnostic-log-file` as a cc1 flag. This
logs into an XML. Is this preferred to the binary format or no?
https://github.com/llvm
yuxuanchen1997 wrote:
> I'd like to understand the motivation for the tool a bit better. IMO, the
> goal should be to deprecate serialized diagnostics because we are now able to
> emit diagnostics to SARIF instead, and the whole point to SARIF is to be a
> machine-readable interchange format f
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/118522
>From 5860f5f25e04930c72dcdb9f0ee4d7386cbcb3d3 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 2 Dec 2024 15:15:30 -0800
Subject: [PATCH 01/12] start working on the new tool
---
.../clang-read-dia
yuxuanchen1997 wrote:
> > Looking at the test failure, it appears that when only building
> > `check-clang-tools`, no `clang` binary was built. So the test driver cannot
> > find `clang`. Maybe this diagnostics binary file should be checked in for
> > the test? That will not catch future error
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/118522
>From 5860f5f25e04930c72dcdb9f0ee4d7386cbcb3d3 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 2 Dec 2024 15:15:30 -0800
Subject: [PATCH 01/11] start working on the new tool
---
.../clang-read-dia
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/118522
>From 5860f5f25e04930c72dcdb9f0ee4d7386cbcb3d3 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 2 Dec 2024 15:15:30 -0800
Subject: [PATCH 01/10] start working on the new tool
---
.../clang-read-dia
yuxuanchen1997 wrote:
Looking at the test failure, it appears that when only building
`check-clang-tools`, no `clang` binary was built. So the test driver cannot
find `clang`. Maybe this diagnostics binary file should be checked in for the
test? That will not catch future errors if the diagnos
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/118522
>From 5860f5f25e04930c72dcdb9f0ee4d7386cbcb3d3 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 2 Dec 2024 15:15:30 -0800
Subject: [PATCH 1/8] start working on the new tool
---
.../clang-read-diagn
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/118522
>From 5860f5f25e04930c72dcdb9f0ee4d7386cbcb3d3 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 2 Dec 2024 15:15:30 -0800
Subject: [PATCH 1/7] start working on the new tool
---
.../clang-read-diagn
@@ -0,0 +1,10 @@
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
yuxuanchen1997 wrote:
Oops... Copied from a boilerplate.
https://github.com/llvm/llvm-project/pull/118522
___
cfe-commits mailing list
cfe-commits@
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/118522
>From 5860f5f25e04930c72dcdb9f0ee4d7386cbcb3d3 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 2 Dec 2024 15:15:30 -0800
Subject: [PATCH 1/6] start working on the new tool
---
.../clang-read-diagn
https://github.com/yuxuanchen1997 created
https://github.com/llvm/llvm-project/pull/118522
As of today, one can make clang serialize diagnostics to a file with the flag
`-serialize-diagnostics`. For example:
```
// file errors_and_warning.c
#include
int forgot_return() {}
int main() {
pri
https://github.com/yuxuanchen1997 closed
https://github.com/llvm/llvm-project/pull/108474
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/108474
>From c32b36e249cb1062cc05618181bf4cb4fdcd2133 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Thu, 12 Sep 2024 17:13:57 -0700
Subject: [PATCH] [Clang] Propagate elide safe context through
[[clang::coro
https://github.com/yuxuanchen1997 edited
https://github.com/llvm/llvm-project/pull/108474
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 edited
https://github.com/llvm/llvm-project/pull/108474
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -84,4 +84,35 @@ Task nonelidable() {
co_return 1;
}
+// CHECK-LABEL: define{{.*}} @_Z8addTasksO4TaskIiES1_{{.*}} {
+Task addTasks([[clang::coro_must_await]] Task &&t1, Task &&t2) {
+ int i1 = co_await t1;
+ int i2 = co_await t2;
+ co_return i1 + i2;
+}
+
+// CHECK-LABE
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/108474
>From a1783d336a915c64af3533566b470ac3d55e4297 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Thu, 12 Sep 2024 17:13:57 -0700
Subject: [PATCH] [Clang] Propagate elide safe context through
[[clang::coro
@@ -880,14 +898,12 @@ ExprResult
Sema::BuildUnresolvedCoawaitExpr(SourceLocation Loc, Expr *Operand,
}
auto *RD = Promise->getType()->getAsCXXRecordDecl();
- bool AwaitElidable =
- isCoroAwaitElidableCall(Operand) &&
- isAttributedCoroAwaitElidable(
-
@@ -8261,12 +8261,19 @@ def CoroAwaitElidableDoc : Documentation {
The ``[[clang::coro_await_elidable]]`` is a class attribute which can be
applied
to a coroutine return type.
-When a coroutine function that returns such a type calls another coroutine
function,
-the compiler
@@ -249,7 +249,10 @@ Attribute Changes in Clang
(#GH106864)
- Introduced a new attribute ``[[clang::coro_await_elidable]]`` on coroutine
return types
- to express elideability at call sites where the coroutine is co_awaited as a
prvalue.
+ to express elideability at call
@@ -880,14 +898,12 @@ ExprResult
Sema::BuildUnresolvedCoawaitExpr(SourceLocation Loc, Expr *Operand,
}
auto *RD = Promise->getType()->getAsCXXRecordDecl();
- bool AwaitElidable =
- isCoroAwaitElidableCall(Operand) &&
- isAttributedCoroAwaitElidable(
-
@@ -8261,12 +8261,19 @@ def CoroAwaitElidableDoc : Documentation {
The ``[[clang::coro_await_elidable]]`` is a class attribute which can be
applied
to a coroutine return type.
-When a coroutine function that returns such a type calls another coroutine
function,
-the compiler
@@ -249,7 +249,10 @@ Attribute Changes in Clang
(#GH106864)
- Introduced a new attribute ``[[clang::coro_await_elidable]]`` on coroutine
return types
- to express elideability at call sites where the coroutine is co_awaited as a
prvalue.
+ to express elideability at call
@@ -849,12 +849,30 @@ static bool isAttributedCoroAwaitElidable(const QualType
&QT) {
return Record && Record->hasAttr();
}
-static bool isCoroAwaitElidableCall(Expr *Operand) {
- if (!Operand->isPRValue()) {
-return false;
+static void applySafeElideContext(Expr *Oper
https://github.com/yuxuanchen1997 ready_for_review
https://github.com/llvm/llvm-project/pull/108474
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/108474
>From dc6239934105cad1f90b7b6185e6bfa8f30d5544 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Thu, 12 Sep 2024 17:13:57 -0700
Subject: [PATCH] [Clang] Propagate elide safe context through
[[clang::coro
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/108474
>From 73e3d278eca1c9b47cb9c6aa436a82d495d03f83 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Thu, 12 Sep 2024 17:13:57 -0700
Subject: [PATCH] [Clang] Propagate elide safe context through
[[clang::coro
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/108474
>From b2cd6f3e0bd1b3aefa84c7d733d1119303551d42 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Thu, 12 Sep 2024 17:13:57 -0700
Subject: [PATCH] [Clang] Propagate elide safe context through
[[clang::coro
https://github.com/yuxuanchen1997 created
https://github.com/llvm/llvm-project/pull/108474
None
>From a4736c1effa479692157dbe735fa873b233f98bd Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Thu, 12 Sep 2024 17:13:57 -0700
Subject: [PATCH] [Clang] Propagate elide safe context through
[[clang
yuxuanchen1997 wrote:
Fix-forward for this patch: https://github.com/llvm/llvm-project/pull/107897
https://github.com/llvm/llvm-project/pull/99285
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/c
https://github.com/yuxuanchen1997 closed
https://github.com/llvm/llvm-project/pull/99285
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 edited
https://github.com/llvm/llvm-project/pull/99285
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 closed
https://github.com/llvm/llvm-project/pull/99283
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 edited
https://github.com/llvm/llvm-project/pull/99283
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 closed
https://github.com/llvm/llvm-project/pull/99282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99282
>From c47f9218c5672f6cb38492b692114da2976b Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Tue, 4 Jun 2024 23:22:00 -0700
Subject: [PATCH] [Clang] C++20 Coroutines: Introduce Frontend Attribute
[[cla
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99282
>From ef2b868666579df534d63daeebd2b201600ce292 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Tue, 4 Jun 2024 23:22:00 -0700
Subject: [PATCH] [Clang] C++20 Coroutines: Introduce Frontend Attribute
[[cla
@@ -523,6 +523,12 @@ void CodeGenFunction::FinishFunction(SourceLocation
EndLoc) {
NormalCleanupDest = Address::invalid();
}
+ if (getLangOpts().Coroutines && isCoroutine()) {
+auto *Record = FnRetTy->getAsCXXRecordDecl();
+if (Record && Record->hasAttr())
+
@@ -523,6 +523,12 @@ void CodeGenFunction::FinishFunction(SourceLocation
EndLoc) {
NormalCleanupDest = Address::invalid();
}
+ if (getLangOpts().Coroutines && isCoroutine()) {
+auto *Record = FnRetTy->getAsCXXRecordDecl();
+if (Record && Record->hasAttr())
+
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99282
>From 7c350747d4481e0d95c51ac2a157809fa630d188 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Tue, 4 Jun 2024 23:22:00 -0700
Subject: [PATCH] [Clang] C++20 Coroutines: Introduce Frontend Attribute
[[cla
yuxuanchen1997 wrote:
Hello! Requesting upstream to take a look again as I believe all feedback at
the moment has been addressed. Please let me know if I still miss anything.
https://github.com/llvm/llvm-project/pull/99282
___
cfe-commits mailing lis
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99282
>From 9c8163db0df6f3d89f32239fbbd6dd47f5eec1a6 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Tue, 4 Jun 2024 23:22:00 -0700
Subject: [PATCH] [Clang] Introduce [[clang::coro_await_elidable]]
---
clang/
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99282
>From 92966fb0939574c78ccfd6b9a7b38035dae9d2e7 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Tue, 4 Jun 2024 23:22:00 -0700
Subject: [PATCH] [Clang] Introduce [[clang::coro_await_elidable]]
---
clang/
https://github.com/yuxuanchen1997 closed
https://github.com/llvm/llvm-project/pull/104822
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 edited
https://github.com/llvm/llvm-project/pull/104822
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 created
https://github.com/llvm/llvm-project/pull/104822
Fixes https://github.com/llvm/llvm-project/issues/104810.
Clang currently crashes on the following program:
```
struct S {
int i;
};
auto [a] = S{1};
void foo() {
a;
}
```
when `-fopenmp` is enabl
yuxuanchen1997 wrote:
A noob question but I wanted to make sure that this patch actually intended to
reject program like this one?
```
#include
#include
class K {
public:
template
K(const std::vector& v) {
static_assert(!std::is_same::value, "Error!");
}
};
void foo(std::vector&
https://github.com/yuxuanchen1997 reopened
https://github.com/llvm/llvm-project/pull/99282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 closed
https://github.com/llvm/llvm-project/pull/99282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99282
>From 5578fde5d3225b24d5e8b140f2654ed8075eec92 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Tue, 4 Jun 2024 23:22:00 -0700
Subject: [PATCH] [Clang] Introduce [[clang::coro_await_elidable]]
---
clang/
@@ -8119,6 +8119,35 @@ but do not pass them to the underlying coroutine or pass
them by value.
}];
}
+def CoroAwaitElidableDoc : Documentation {
+ let Category = DocCatDecl;
+ let Content = [{
+The ``[[clang::coro_await_elidable]]`` is a class attribute which can be
applie
https://github.com/yuxuanchen1997 deleted
https://github.com/llvm/llvm-project/pull/99282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8119,6 +8119,35 @@ but do not pass them to the underlying coroutine or pass
them by value.
}];
}
+def CoroAwaitElidableDoc : Documentation {
+ let Category = DocCatDecl;
+ let Content = [{
+The ``[[clang::coro_await_elidable]]`` is a class attribute which can be
applie
@@ -8119,6 +8119,35 @@ but do not pass them to the underlying coroutine or pass
them by value.
}];
}
+def CoroAwaitElidableDoc : Documentation {
+ let Category = DocCatDecl;
+ let Content = [{
+The ``[[clang::coro_await_elidable]]`` is a class attribute which can be
applie
@@ -848,7 +862,21 @@ ExprResult Sema::BuildUnresolvedCoawaitExpr(SourceLocation
Loc, Expr *Operand,
}
auto *RD = Promise->getType()->getAsCXXRecordDecl();
- auto *Transformed = Operand;
+ bool InplaceCall =
+ isCoroInplaceCall(Operand) &&
+ isAttributedCoroInp
https://github.com/yuxuanchen1997 edited
https://github.com/llvm/llvm-project/pull/99282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1217,6 +1217,14 @@ def CoroDisableLifetimeBound : InheritableAttr {
let SimpleHandler = 1;
}
+def CoroAwaitElidable : InheritableAttr {
yuxuanchen1997 wrote:
I am adding this
```
- Introduced a new attribute ``[[clang::coro_await_elidable]]`` on corout
https://github.com/yuxuanchen1997 edited
https://github.com/llvm/llvm-project/pull/99282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8119,6 +8119,35 @@ but do not pass them to the underlying coroutine or pass
them by value.
}];
}
+def CoroAwaitElidableDoc : Documentation {
+ let Category = DocCatDecl;
+ let Content = [{
+The ``[[clang::coro_await_elidable]]`` is a class attribute which can be
applie
@@ -8119,6 +8119,35 @@ but do not pass them to the underlying coroutine or pass
them by value.
}];
}
+def CoroAwaitElidableDoc : Documentation {
+ let Category = DocCatDecl;
+ let Content = [{
+The ``[[clang::coro_await_elidable]]`` is a class attribute which can be
applie
@@ -5443,24 +5444,38 @@ RValue CodeGenFunction::EmitRValueForField(LValue LV,
//======//
RValue CodeGenFunction::EmitCallExpr(const CallExpr *E,
- ReturnValueSlot ReturnValu
@@ -848,7 +862,21 @@ ExprResult Sema::BuildUnresolvedCoawaitExpr(SourceLocation
Loc, Expr *Operand,
}
auto *RD = Promise->getType()->getAsCXXRecordDecl();
- auto *Transformed = Operand;
+ bool InplaceCall =
+ isCoroInplaceCall(Operand) &&
+ isAttributedCoroInp
@@ -1217,6 +1217,14 @@ def CoroDisableLifetimeBound : InheritableAttr {
let SimpleHandler = 1;
}
+def CoroAwaitElidable : InheritableAttr {
yuxuanchen1997 wrote:
Will do.
https://github.com/llvm/llvm-project/pull/99282
@@ -15,6 +15,7 @@
#include "CoroutineStmtBuilder.h"
#include "clang/AST/ASTLambda.h"
+#include "clang/AST/ComputeDependence.h"
yuxuanchen1997 wrote:
Sorry. Seems like an IDE auto include.
https://github.com/llvm/llvm-project/pull/99282
_
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99282
>From 55e27fdace4dabc0748c20ae5271b735dcc22e3e Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Tue, 4 Jun 2024 23:22:00 -0700
Subject: [PATCH] [Clang] Introduce [[clang::coro_await_elidable]]
---
clang/
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99282
>From 8d9c2cc4313a36058ef2ac29bd9e3cd33603da10 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Tue, 4 Jun 2024 23:22:00 -0700
Subject: [PATCH] [Clang] Introduce [[clang::coro_await_elidable]]
---
clang/
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99282
>From c6e8d1f1a98174b8ca7d2f94a51d9a245eae58eb Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Tue, 4 Jun 2024 23:22:00 -0700
Subject: [PATCH] [Clang] Introduce [[clang::coro_await_elidable]]
---
clang/
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99282
>From eb1b3560a0ed3ab14f07997cbc37158496a03343 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Tue, 4 Jun 2024 23:22:00 -0700
Subject: [PATCH] [Clang] Introduce [[clang::coro_await_elidable]]
---
clang/
@@ -8108,6 +8108,24 @@ but do not pass them to the underlying coroutine or pass
them by value.
}];
}
+def CoroAwaitElidableDoc : Documentation {
+ let Category = DocCatDecl;
+ let Content = [{
+The ``[[clang::coro_await_elidable]]`` is a class attribute which can be
applie
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99282
>From 5aa5ba4d768c09663acdb394b9485bc2362a217a Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Tue, 4 Jun 2024 23:22:00 -0700
Subject: [PATCH] [Clang] Introduce [[clang::coro_await_elidable]]
---
clang/
https://github.com/yuxuanchen1997 edited
https://github.com/llvm/llvm-project/pull/99282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 edited
https://github.com/llvm/llvm-project/pull/99282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99282
>From dfb903c47573a01c25a67ea1025fdc3c268673c8 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Tue, 4 Jun 2024 23:22:00 -0700
Subject: [PATCH] [Clang] Introduce [[clang::coro_await_elidable]]
---
clang/
yuxuanchen1997 wrote:
Deprecated in favor of https://github.com/llvm/llvm-project/pull/99282
https://github.com/llvm/llvm-project/pull/98971
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
https://github.com/yuxuanchen1997 closed
https://github.com/llvm/llvm-project/pull/98971
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yuxuanchen1997 created
https://github.com/llvm/llvm-project/pull/99282
This patch is the frontend implementation of the coroutine elide improvement
project detailed in this discourse post:
https://discourse.llvm.org/t/language-extension-for-better-more-deterministic-halo-for
yuxuanchen1997 wrote:
> how do you think about the suggestion to split the middle end patch?
Can do that sure. I will send out new stacked PRs.
https://github.com/llvm/llvm-project/pull/98974
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
1 - 100 of 327 matches
Mail list logo