[llvm] [Coroutines][NFC] Remove @llvm.coro.id.async intrinsics from CoroElide (PR #92956)

Yuxuan Chen via llvm-commits llvm-commits at lists.llvm.org
Tue May 21 12:43:36 PDT 2024


https://github.com/yuxuanchen1997 created https://github.com/llvm/llvm-project/pull/92956

Easy change. There's no mentioning of `coro.id.async` in the code. Cleaning this up. 

>From 18503f00c83e4189cf066cc48c4ec8dfb0744f5b Mon Sep 17 00:00:00 2001
From: Yuxuan Chen <ych at meta.com>
Date: Tue, 21 May 2024 12:40:57 -0700
Subject: [PATCH] [Coroutines] Remove @llvm.coro.id.async intrinsics from
 CoroElide

---
 llvm/lib/Transforms/Coroutines/CoroElide.cpp | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/llvm/lib/Transforms/Coroutines/CoroElide.cpp b/llvm/lib/Transforms/Coroutines/CoroElide.cpp
index bb244489e4c2c..74b5ccb7b9b71 100644
--- a/llvm/lib/Transforms/Coroutines/CoroElide.cpp
+++ b/llvm/lib/Transforms/Coroutines/CoroElide.cpp
@@ -464,13 +464,9 @@ bool CoroIdElider::attemptElide() {
   return true;
 }
 
-static bool declaresCoroElideIntrinsics(Module &M) {
-  return coro::declaresIntrinsics(M, {"llvm.coro.id", "llvm.coro.id.async"});
-}
-
 PreservedAnalyses CoroElidePass::run(Function &F, FunctionAnalysisManager &AM) {
   auto &M = *F.getParent();
-  if (!declaresCoroElideIntrinsics(M))
+  if (!coro::declaresIntrinsics(M, {"llvm.coro.id"}))
     return PreservedAnalyses::all();
 
   FunctionElideInfo FEI{&F};



More information about the llvm-commits mailing list