[llvm] [TTI] Add missing no-cost coroutine intrinsics (PR #203816)
Weibo He via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 14 20:49:28 PDT 2026
https://github.com/NewSigma created https://github.com/llvm/llvm-project/pull/203816
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.
>From de6d96e408c40223ca43a176d83879ae1ae8c5f6 Mon Sep 17 00:00:00 2001
From: NewSigma <NewSigma at 163.com>
Date: Sat, 23 May 2026 20:58:06 +0800
Subject: [PATCH] [TTI] Add missing no-cost coroutine intrinsics
---
llvm/include/llvm/Analysis/TargetTransformInfoImpl.h | 6 ++++++
1 file changed, 6 insertions(+)
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:
More information about the llvm-commits
mailing list