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

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

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
@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
@arsenm arsenm force-pushed the users/arsenm/hexagon/move-runtime-libcall-config-tablegen branch from 48350d5 to bf2e5ce Compare July 10, 2025 10:40
@arsenm arsenm force-pushed the users/arsenm/runtime-libcalls/stop-using-defset-default-libcall-impls branch from 170b353 to 652b9c5 Compare July 10, 2025 10:41
Copy link
Contributor Author

arsenm commented Jul 13, 2025

Merge activity

  • Jul 13, 1:37 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 13, 1:45 AM UTC: Graphite rebased this pull request as part of a merge.
  • Jul 13, 1:47 AM UTC: @arsenm merged this pull request with Graphite.

@arsenm arsenm force-pushed the users/arsenm/hexagon/move-runtime-libcall-config-tablegen branch from bf2e5ce to cd5f438 Compare July 13, 2025 01:42
Base automatically changed from users/arsenm/hexagon/move-runtime-libcall-config-tablegen to main July 13, 2025 01:44
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 652b9c5 to cf3a31e Compare July 13, 2025 01:45
@arsenm arsenm merged commit 77bcde6 into main Jul 13, 2025
7 of 9 checks passed
@arsenm arsenm deleted the users/arsenm/runtime-libcalls/stop-using-defset-default-libcall-impls branch July 13, 2025 01:47
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