[llvm] [TTI] Add missing no-cost coroutine intrinsics (PR #203816)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 14 20:50:02 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-coroutines
Author: Weibo He (NewSigma)
<details>
<summary>Changes</summary>
These intrinsics are lowered in the CoroCleanup pass and don't represent actual code. This patch adds them to the no-cost list so they do not contribute to the cost of inlining and optimization.
---
Full diff: https://github.com/llvm/llvm-project/pull/203816.diff
1 Files Affected:
- (modified) llvm/include/llvm/Analysis/TargetTransformInfoImpl.h (+6)
``````````diff
diff --git a/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h b/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
index 89fd4a1e7628e..a18a0a6c7f410 100644
--- a/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
+++ b/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
@@ -944,6 +944,12 @@ class LLVM_ABI TargetTransformInfoImplBase {
case Intrinsic::coro_alloc:
case Intrinsic::coro_begin:
case Intrinsic::coro_begin_custom_abi:
+ case Intrinsic::coro_dead:
+ case Intrinsic::coro_id:
+ case Intrinsic::coro_id_async:
+ case Intrinsic::coro_id_retcon:
+ case Intrinsic::coro_id_retcon_once:
+ case Intrinsic::coro_noop:
case Intrinsic::coro_free:
case Intrinsic::coro_end:
case Intrinsic::coro_frame:
``````````
</details>
https://github.com/llvm/llvm-project/pull/203816
More information about the llvm-commits
mailing list