Skip to content

RuntimeLibcalls: Stop using defset for default calls #147651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: users/arsenm/hexagon/move-runtime-libcall-config-tablegen
Choose a base branch
from

Conversation

arsenm
Copy link
Contributor

@arsenm arsenm commented Jul 9, 2025

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.

Copy link
Contributor Author

arsenm commented Jul 9, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@llvmbot
Copy link
Member

llvmbot commented Jul 9, 2025

@llvm/pr-subscribers-llvm-selectiondag
@llvm/pr-subscribers-llvm-ir

@llvm/pr-subscribers-backend-hexagon

Author: Matt Arsenault (arsenm)

Changes

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.


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

1 Files Affected:

  • (modified) llvm/include/llvm/IR/RuntimeLibcalls.td (+2-4)
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.

@arsenm arsenm force-pushed the users/arsenm/hexagon/move-runtime-libcall-config-tablegen branch from 8c552af to 48350d5 Compare July 9, 2025 08:19
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.
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/stop-using-defset-default-libcall-impls branch from cab40d4 to 170b353 Compare July 9, 2025 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants