https://github.com/yuxuanchen1997 created
https://github.com/llvm/llvm-project/pull/99283
This patch is the middle end implementation for the coroutine HALO improvement
project published on discourse:
https://discourse.llvm.org/t/language-extension-for-better-more-deterministic-halo-for-c-coro
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99283
>From 7c14a807d0140c638b056a59a9c8c3f9fcf90e57 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] Implement noalloc in CoroSplit
---
llvm/lib/Transforms/Cor
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99285
>From 08760faf31683e8372322305846465a810198ce3 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] add CoroAnnotationElidePass
---
.../Coroutines/CoroAnnotat
@@ -1455,6 +1462,64 @@ struct SwitchCoroutineSplitter {
setCoroInfo(F, Shape, Clones);
}
+ static Function *createNoAllocVariant(Function &F, coro::Shape &Shape,
+SmallVectorImpl &Clones) {
+auto *OrigFnTy = F.getFunctionType(
@@ -1967,22 +2047,13 @@ splitCoroutine(Function &F, SmallVectorImpl
&Clones,
for (DbgVariableRecord *DVR : DbgVariableRecords)
coro::salvageDebugInfo(ArgToAllocaMap, *DVR, Shape.OptimizeFrame,
false /*UseEntryValue*/);
- return Shape;
-}
-//
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99283
>From d42ce99fac00de6d35e423490f2603796a10 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] Implement noalloc in CoroSplit
---
llvm/lib/Transforms/Cor
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99285
>From 48c436e668a6b89aef09d300f3260e35b6960dfc Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] add CoroAnnotationElidePass
Summary:
Test Plan:
Reviewers
@@ -0,0 +1,135 @@
+//===- CoroSplit.cpp - Converts a coroutine into a state machine
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -1967,22 +2047,13 @@ splitCoroutine(Function &F, SmallVectorImpl
&Clones,
for (DbgVariableRecord *DVR : DbgVariableRecords)
coro::salvageDebugInfo(ArgToAllocaMap, *DVR, Shape.OptimizeFrame,
false /*UseEntryValue*/);
- return Shape;
-}
-//
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99283
>From f1b66d6376ad890119449b93e20e9cdc36c770a6 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] Implement noalloc in CoroSplit
---
llvm/lib/Transforms/Cor
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99285
>From 3421b3f7ba207c864d8e71ad9adf5bebc91f3f2d Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] add CoroAnnotationElidePass
Summary:
Test Plan:
Reviewers
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99283
>From 2c3902bbcc80bbd546b3a47c7d20a0fcf0c2c127 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] Implement noalloc in CoroSplit
---
llvm/lib/Transforms/Cor
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99285
>From 828463c9951daff698db417d1f2e2b8fe24d6243 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] add CoroAnnotationElidePass
Summary:
Test Plan:
Reviewers
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99283
>From f8bb0f44f026540c7ae620e6b5bb7583e1078c67 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] Implement noalloc in CoroSplit
---
llvm/lib/Transforms/Cor
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99285
>From d2fac21c4e9e5302fa2bee5365ab8be01dd024ea Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] add CoroAnnotationElidePass
Summary:
Test Plan:
Reviewers
@@ -1967,22 +2047,13 @@ splitCoroutine(Function &F, SmallVectorImpl
&Clones,
for (DbgVariableRecord *DVR : DbgVariableRecords)
coro::salvageDebugInfo(ArgToAllocaMap, *DVR, Shape.OptimizeFrame,
false /*UseEntryValue*/);
- return Shape;
-}
-//
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99283
>From dcd98a941d3edb3e5b96d7feeca50f99ea8309d2 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] Implement noalloc in CoroSplit
---
llvm/lib/Transforms/Cor
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99285
>From 30f8875990935c24b7a3e3111a46d05bc9b902ab Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] add CoroAnnotationElidePass
Summary:
Test Plan:
Reviewers
@@ -1455,6 +1462,62 @@ struct SwitchCoroutineSplitter {
setCoroInfo(F, Shape, Clones);
}
+ static Function *createNoAllocVariant(Function &F, coro::Shape &Shape,
+SmallVectorImpl &Clones) {
+auto *OrigFnTy = F.getFunctionType(
@@ -1455,6 +1462,64 @@ struct SwitchCoroutineSplitter {
setCoroInfo(F, Shape, Clones);
}
+ static Function *createNoAllocVariant(Function &F, coro::Shape &Shape,
+SmallVectorImpl &Clones) {
+auto *OrigFnTy = F.getFunctionType(
@@ -5,7 +5,7 @@
define nonnull ptr @f(i32 %n) presplitcoroutine {
; CHECK-LABEL: @f(
; CHECK-NEXT: entry:
-; CHECK-NEXT:[[ID:%.*]] = call token @llvm.coro.id(i32 0, ptr null, ptr
null, ptr @f.resumers)
+; CHECK-NEXT:[[ID:%.*]] = call token @llvm.coro.id(i32 0, ptr nul
@@ -5,7 +5,7 @@
define nonnull ptr @f(i32 %n) presplitcoroutine {
; CHECK-LABEL: @f(
; CHECK-NEXT: entry:
-; CHECK-NEXT:[[ID:%.*]] = call token @llvm.coro.id(i32 0, ptr null, ptr
null, ptr @f.resumers)
+; CHECK-NEXT:[[ID:%.*]] = call token @llvm.coro.id(i32 0, ptr nul
https://github.com/yuxuanchen1997 closed
https://github.com/llvm/llvm-project/pull/99283
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/yuxuanchen1997 reopened
https://github.com/llvm/llvm-project/pull/99283
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99285
>From d3b68e89d672f5eef0f6cca011787f18ffcc70d6 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] add CoroAnnotationElidePass
Summary:
Test Plan:
Reviewers
@@ -1967,22 +2047,13 @@ splitCoroutine(Function &F, SmallVectorImpl
&Clones,
for (DbgVariableRecord *DVR : DbgVariableRecords)
coro::salvageDebugInfo(ArgToAllocaMap, *DVR, Shape.OptimizeFrame,
false /*UseEntryValue*/);
- return Shape;
-}
-//
@@ -1455,6 +1462,62 @@ struct SwitchCoroutineSplitter {
setCoroInfo(F, Shape, Clones);
}
+ static Function *createNoAllocVariant(Function &F, coro::Shape &Shape,
yuxuanchen1997 wrote:
This is done. Thanks.
https://github.com/llvm/llvm-project/pull/99
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99283
>From be91ecd53679df7536616132b3492d53a0642ef4 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]]
---
llvm/d
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99285
>From 7ca8d8b7d1dfd1d901721dd45f83f861068f9ea0 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] add CoroAnnotationElidePass
Summary:
Test Plan:
Reviewers
yuxuanchen1997 wrote:
@ChuanqiXu9 I have changed this patch to only conditionally create the
`.noalloc` variant based on an attribute (which is controlled by FE). Let me
know if this is good to go.
https://github.com/llvm/llvm-project/pull/99283
___
@@ -968,8 +969,8 @@ PassBuilder::buildInlinerPipeline(OptimizationLevel Level,
// it's been modified since.
MainCGPipeline.addPass(createCGSCCToFunctionPassAdaptor(
RequireAnalysisPass()));
-
MainCGPipeline.addPass(CoroSplitPass(Level != OptimizationLevel::O0));
+
@@ -2049,6 +2055,22 @@ the coroutine must reach the final suspend point when it
get destroyed.
This attribute only works for switched-resume coroutines now.
+coro_must_elide
+---
+
+When a Call or Invoke instruction is marked with `coro_must_elide`,
+CoroAnnotati
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99283
>From 05529de18e825c0357a4fdfbaeead577fc20cb91 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]]
---
llvm/d
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99283
>From 99d925c0aa2414bb791e94a2a8824e887dc2f367 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]]
---
llvm/d
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99285
>From 17f5922762c0f5203cccda6f3d09ac1b2623078f Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] add CoroAnnotationElidePass
Summary:
Test Plan:
Reviewers
@@ -2049,6 +2055,22 @@ the coroutine must reach the final suspend point when it
get destroyed.
This attribute only works for switched-resume coroutines now.
+coro_must_elide
+---
+
+When a Call or Invoke instruction is marked with `coro_must_elide`,
+CoroAnnotati
https://github.com/yuxuanchen1997 edited
https://github.com/llvm/llvm-project/pull/99285
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/yuxuanchen1997 edited
https://github.com/llvm/llvm-project/pull/99285
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/yuxuanchen1997 edited
https://github.com/llvm/llvm-project/pull/99283
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99285
>From 0b3fc71e900e5bff749699411d3a76b2395b1202 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] [LLVM][Coroutines] Transform "coro_elide_safe" calls to
swi
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99283
>From 4084de77bf05708e9a38b328af1f9717d28b202c Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Tue, 4 Jun 2024 23:22:00 -0700
Subject: [PATCH] [LLVM][Coroutines] Create `.noalloc` variant of switch ABI
c
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99285
>From 0b3fc71e900e5bff749699411d3a76b2395b1202 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] [LLVM][Coroutines] Transform "coro_elide_safe" calls to
swi
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99283
>From 4084de77bf05708e9a38b328af1f9717d28b202c Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Tue, 4 Jun 2024 23:22:00 -0700
Subject: [PATCH] [LLVM][Coroutines] Create `.noalloc` variant of switch ABI
c
@@ -0,0 +1,147 @@
+//===- CoroAnnotationElide.cpp - Elide attributed safe coroutine calls
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,147 @@
+//===- CoroAnnotationElide.cpp - Elide attributed safe coroutine calls
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,147 @@
+//===- CoroAnnotationElide.cpp - Elide attributed safe coroutine calls
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -2049,6 +2055,21 @@ the coroutine must reach the final suspend point when it
get destroyed.
This attribute only works for switched-resume coroutines now.
+coro_elide_safe
+---
+
+When a Call or Invoke instruction is marked with `coro_elide_safe`,
+CoroAnnotati
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99285
>From d6f2e78230c0907db95568e5b920d574ce6b4758 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] [LLVM][Coroutines] Transform "coro_elide_safe" calls to
swi
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99283
>From e2a6027dd2af62f4fbfa92795873f0489fd35cfd Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Tue, 4 Jun 2024 23:22:00 -0700
Subject: [PATCH] [LLVM][Coroutines] Create `.noalloc` variant of switch ABI
c
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99283
>From e2a6027dd2af62f4fbfa92795873f0489fd35cfd Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Tue, 4 Jun 2024 23:22:00 -0700
Subject: [PATCH] [LLVM][Coroutines] Create `.noalloc` variant of switch ABI
c
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99285
>From d6f2e78230c0907db95568e5b920d574ce6b4758 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] [LLVM][Coroutines] Transform "coro_elide_safe" calls to
swi
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99285
>From 68a410d159fdb96e7580a7f3fe035df00b893f3c Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] [LLVM][Coroutines] Transform "coro_elide_safe" calls to
swi
https://github.com/yuxuanchen1997 updated
https://github.com/llvm/llvm-project/pull/99285
>From 5b18641d2b59adf11810f71fe5ab3204a94a7a56 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen
Date: Mon, 15 Jul 2024 15:01:39 -0700
Subject: [PATCH] [LLVM][Coroutines] Transform "coro_elide_safe" calls to
swi
53 matches
Mail list logo