[clang] [Clang] Propagate elide safe context through [[clang::coro_await_elidable_argument]] (PR #108474)

2024-09-17 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang commented: Looks good to me, but at the same time: I am not experienced in the clang-frontend, so please wait for an approval of a more experienced clang-frontend contributor https://github.com/llvm/llvm-project/pull/108474 __

[clang] [Clang] Propagate elide safe context through [[clang::coro_await_elidable_argument]] (PR #108474)

2024-09-16 Thread Adrian Vogelsgesang via cfe-commits
@@ -880,14 +898,12 @@ ExprResult Sema::BuildUnresolvedCoawaitExpr(SourceLocation Loc, Expr *Operand, } auto *RD = Promise->getType()->getAsCXXRecordDecl(); - bool AwaitElidable = - isCoroAwaitElidableCall(Operand) && - isAttributedCoroAwaitElidable( -

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-16 Thread Adrian Vogelsgesang via cfe-commits
@@ -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

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-16 Thread Adrian Vogelsgesang via cfe-commits
@@ -880,14 +898,12 @@ ExprResult Sema::BuildUnresolvedCoawaitExpr(SourceLocation Loc, Expr *Operand, } auto *RD = Promise->getType()->getAsCXXRecordDecl(); - bool AwaitElidable = - isCoroAwaitElidableCall(Operand) && - isAttributedCoroAwaitElidable( -

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-15 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang 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

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-14 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang 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

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-14 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang commented: Thanks for implementing this! Looking forward to using it 🙂 https://github.com/llvm/llvm-project/pull/108474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-14 Thread Adrian Vogelsgesang via cfe-commits
@@ -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

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-14 Thread Adrian Vogelsgesang via cfe-commits
@@ -880,14 +898,12 @@ ExprResult Sema::BuildUnresolvedCoawaitExpr(SourceLocation Loc, Expr *Operand, } auto *RD = Promise->getType()->getAsCXXRecordDecl(); - bool AwaitElidable = - isCoroAwaitElidableCall(Operand) && - isAttributedCoroAwaitElidable( -

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-14 Thread Adrian Vogelsgesang via 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

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-14 Thread Adrian Vogelsgesang via cfe-commits
@@ -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. vogelsgesang wrote: ```suggestion to a coroutine return type. It provides a hint to

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-14 Thread Adrian Vogelsgesang via 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

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-14 Thread Adrian Vogelsgesang via cfe-commits
@@ -8281,8 +8288,62 @@ Example: co_await t; } -The behavior is undefined if the caller coroutine is destroyed earlier than the -callee coroutine. +Such elision replaces the heap allocated activation frame of the callee coroutine +with a local variable within the enclosi

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-14 Thread Adrian Vogelsgesang via cfe-commits
@@ -8281,8 +8288,62 @@ Example: co_await t; } -The behavior is undefined if the caller coroutine is destroyed earlier than the -callee coroutine. +Such elision replaces the heap allocated activation frame of the callee coroutine +with a local variable within the enclosi

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-14 Thread Adrian Vogelsgesang via cfe-commits
@@ -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

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-14 Thread Adrian Vogelsgesang via cfe-commits
@@ -8281,8 +8288,62 @@ Example: co_await t; } -The behavior is undefined if the caller coroutine is destroyed earlier than the -callee coroutine. +Such elision replaces the heap allocated activation frame of the callee coroutine +with a local variable within the enclosi

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-14 Thread Adrian Vogelsgesang via cfe-commits
@@ -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

[clang] [llvm] Introduce -defer-thinlto-prelink-coro-split that skips Coro passes in ThinLTO pre-link pipeline (PR #107153)

2024-09-13 Thread Adrian Vogelsgesang via cfe-commits
vogelsgesang wrote: > Unfortunately, it seems we have an "either-or" decision here Although... Is this even an either-or decision? Could we add coro-split to the llc unconditionally, also for non-thin-lto pipelines? Afaict, coro-split is a no-op pass if coroutines were already split previousl

[clang] [llvm] Introduce -defer-thinlto-prelink-coro-split that skips Coro passes in ThinLTO pre-link pipeline (PR #107153)

2024-09-13 Thread Adrian Vogelsgesang via cfe-commits
vogelsgesang wrote: My 2cts: I think it would be best for clang-users, if HALO / coroutine optimizations work out-of-the-box in as many cases as possible. Unfortunately, it seems we have an "either-or" decision here. Either, the "thin-lto + HALO" work out-of-the-box or the llc-code-generation

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-07-22 Thread Adrian Vogelsgesang via cfe-commits
@@ -1217,6 +1217,14 @@ def CoroDisableLifetimeBound : InheritableAttr { let SimpleHandler = 1; } +def CoroAwaitElidable : InheritableAttr { vogelsgesang wrote: does this also warrant an entry in `clang/docs/ReleaseNotes.rst`? https://github.com/llvm/llvm-p

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-07-19 Thread Adrian Vogelsgesang via cfe-commits
@@ -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

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-07-19 Thread Adrian Vogelsgesang via cfe-commits
@@ -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

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-07-19 Thread Adrian Vogelsgesang via cfe-commits
@@ -825,6 +826,32 @@ ExprResult Sema::BuildOperatorCoawaitLookupExpr(Scope *S, SourceLocation Loc) { return CoawaitOp; } +static bool isAttributedCoroInplaceTask(const QualType &QT) { + auto *Record = QT->getAsCXXRecordDecl(); + return Record && Record->hasAttr(); +} + +s

[clang] [llvm] [Clang][Coroutines] Introducing the `[[clang::coro_inplace_task]]` attribute (PR #94693)

2024-06-18 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Coroutines] Introducing the `[[clang::coro_inplace_task]]` attribute (PR #94693)

2024-06-18 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Coroutines] Introducing the `[[clang::coro_inplace_task]]` attribute (PR #94693)

2024-06-18 Thread Adrian Vogelsgesang via cfe-commits
@@ -0,0 +1,84 @@ +// This file tests the coro_structured_concurrency attribute semantics. +// RUN: %clang_cc1 -std=c++20 -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s + +#include "Inputs/coroutine.h" +#include "Inputs/utility.h" + +template +struct [[clang::coro_struct

[clang] [llvm] [Clang][Coroutines] Introducing the `[[clang::coro_inplace_task]]` attribute (PR #94693)

2024-06-17 Thread Adrian Vogelsgesang via cfe-commits
@@ -0,0 +1,84 @@ +// This file tests the coro_structured_concurrency attribute semantics. +// RUN: %clang_cc1 -std=c++20 -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s + +#include "Inputs/coroutine.h" +#include "Inputs/utility.h" + +template +struct [[clang::coro_struct

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-30 Thread Adrian Vogelsgesang via cfe-commits
@@ -167,7 +167,7 @@ C++2c implementation status Disallow Binding a Returned Glvalue to a Temporary https://wg21.link/P2748R5";>P2748R5 - No + Clang 19 vogelsgesang wrote: Ah, I just saw this was already fixed in the meantime - nevermind 🙂 https://git

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-30 Thread Adrian Vogelsgesang via cfe-commits
@@ -167,7 +167,7 @@ C++2c implementation status Disallow Binding a Returned Glvalue to a Temporary https://wg21.link/P2748R5";>P2748R5 - No + Clang 19 vogelsgesang wrote: Should be `class="unreleased"` instead of `class="full"` https://github.com/llvm

[clang] [Clang] Address post commit feedbacks in #89906 (PR #90495)

2024-04-29 Thread Adrian Vogelsgesang via cfe-commits
@@ -187,7 +187,7 @@ C++2c implementation status Trivial infinite loops are not Undefined Behavior https://wg21.link/P2809R3";>P2809R3 (DR) - Clang 19 + No vogelsgesang wrote: unreleased -> none https://github.com/llvm/llvm-project/pull/90495 _

[clang] [Clang] Address post commit feedbacks in #89906 (PR #90495)

2024-04-29 Thread Adrian Vogelsgesang via cfe-commits
@@ -177,7 +177,7 @@ C++2c implementation status Attributes for Structured Bindings https://wg21.link/P0609R3";>P0609R3 - No + Clang 19 vogelsgesang wrote: none -> unreleased But maybe just fix this together when landing #90066... https://github.com/l

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-29 Thread Adrian Vogelsgesang via cfe-commits
@@ -187,7 +187,7 @@ C++2c implementation status Trivial infinite loops are not Undefined Behavior https://wg21.link/P2809R3";>P2809R3 (DR) - No + Clang 19 vogelsgesang wrote: the wrong paper was marked as implemented https://github.com/llvm/llvm-proje

[clang-tools-extra] fda7778 - [clang-tidy] Update tests to include C++23 and C++26

2023-08-07 Thread Adrian Vogelsgesang via cfe-commits
Author: Adrian Vogelsgesang Date: 2023-08-07T21:25:22Z New Revision: fda777849b0088ba83e28683c53c5c8321ef2558 URL: https://github.com/llvm/llvm-project/commit/fda777849b0088ba83e28683c53c5c8321ef2558 DIFF: https://github.com/llvm/llvm-project/commit/fda777849b0088ba83e28683c53c5c8321ef2558.diff

[libunwind] c9cffdd - [libunwind] Fix usage of `_dl_find_object` on 32-bit x86

2022-09-16 Thread Adrian Vogelsgesang via cfe-commits
Author: Adrian Vogelsgesang Date: 2022-09-16T06:29:49-07:00 New Revision: c9cffdde393f646acf62d6160e7fa6613e038508 URL: https://github.com/llvm/llvm-project/commit/c9cffdde393f646acf62d6160e7fa6613e038508 DIFF: https://github.com/llvm/llvm-project/commit/c9cffdde393f646acf62d6160e7fa6613e038508

[clang] 9138900 - [LLDB] Add data formatter for std::coroutine_handle

2022-08-24 Thread Adrian Vogelsgesang via cfe-commits
Author: Adrian Vogelsgesang Date: 2022-08-24T14:40:53-07:00 New Revision: 91389000abe8ef5d06d98cbbefd3fa03ac7e4480 URL: https://github.com/llvm/llvm-project/commit/91389000abe8ef5d06d98cbbefd3fa03ac7e4480 DIFF: https://github.com/llvm/llvm-project/commit/91389000abe8ef5d06d98cbbefd3fa03ac7e4480

[libunwind] df9a23e - [libunwind] Use `_dl_find_object` if available

2022-08-09 Thread Adrian Vogelsgesang via cfe-commits
Author: Adrian Vogelsgesang Date: 2022-08-09T16:19:13-07:00 New Revision: df9a23e2feda18f0308b6d4dbd591ebe6b605aa4 URL: https://github.com/llvm/llvm-project/commit/df9a23e2feda18f0308b6d4dbd591ebe6b605aa4 DIFF: https://github.com/llvm/llvm-project/commit/df9a23e2feda18f0308b6d4dbd591ebe6b605aa4