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

via llvm-commits llvm-commits at lists.llvm.org
Tue May 21 12:44:07 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-transforms

Author: Yuxuan Chen (yuxuanchen1997)

<details>
<summary>Changes</summary>

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

---
Full diff: https://github.com/llvm/llvm-project/pull/92956.diff


1 Files Affected:

- (modified) llvm/lib/Transforms/Coroutines/CoroElide.cpp (+1-5) 


``````````diff
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};

``````````

</details>


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


More information about the llvm-commits mailing list