[llvm-branch-commits] [llvm] RuntimeLibcalls: Stop using defset for default calls (PR #147651)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jul 8 22:17:46 PDT 2025
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/147651
This is redundant with the IsDefault field, so avoid a really
long enclosing pair of braces. This will make it easier to gradually
remove calls from the default set.
>From cab40d42c0720b6ad474b9919e6295578a4cbc00 Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Wed, 9 Jul 2025 14:06:33 +0900
Subject: [PATCH] RuntimeLibcalls: Stop using defset for default calls
This is redundant with the IsDefault field, so avoid a really
long enclosing pair of braces. This will make it easier to gradually
remove calls from the default set.
---
llvm/include/llvm/IR/RuntimeLibcalls.td | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index 61b082b8a6101..ee4892ee186cd 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -402,7 +402,6 @@ def MEMCPY_ALIGN_4 : RuntimeLibcall;
// Define implementation default libcalls
//--------------------------------------------------------------------
-defset list<RuntimeLibcallImpl> AllDefaultRuntimeLibcallImpls = {
let IsDefault = true in {
//--------------------------------------------------------------------
@@ -908,7 +907,6 @@ def memset : RuntimeLibcallImpl<MEMSET>;
def calloc : RuntimeLibcallImpl<CALLOC>;
} // End let IsDefault = true
-} // End defset AllDefaultRuntimeLibcallImpls
//--------------------------------------------------------------------
// Define implementation other libcalls
@@ -999,8 +997,8 @@ defset list<RuntimeLibcallImpl> LibmF128FiniteLibcalls = {
// unreasonable defaults like reporting f80 calls on most targets when
// they are relevant to only one.
-defvar AllDefaultLibCalls =
- !foreach(entry, AllDefaultRuntimeLibcallImpls, entry.Provides);
+defvar AllDefaultRuntimeLibcallImpls
+ = !filter(entry, !instances<RuntimeLibcallImpl>(), entry.IsDefault);
// Exist in libgcc and compiler-rt for 64-bit targets, or if
// COMPILER_RT_ENABLE_SOFTWARE_INT128.
More information about the llvm-branch-commits
mailing list