Skip to content
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

[StrTable] Fix modules build and clean up stale files #125979

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

chandlerc
Copy link
Member

I missed a few places to tidy up from before using the tablengen files directly for the builtins. I didn't remove all of the modulemap entries and there were two small .def files left lingering. This should clean all of that up. I went through to cross check the list of files and it looks correct now.

I missed a few places to tidy up from before using the tablengen files
directly for the builtins. I didn't remove all of the modulemap entries
and there were two small `.def` files left lingering. This should clean
all of that up. I went through to cross check the list of files and it
looks correct now.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Feb 6, 2025
chandlerc referenced this pull request Feb 6, 2025
… tables

This leverages the sharded structure of the builtins to make it easy to
directly tablegen most of the AArch64 and ARM builtins while still using
X-macros for a few edge cases. It also extracts common prefixes as part
of that.

This makes the string tables for these targets dramatically smaller.
This is especially important as the SVE builtins represent (by far) the
largest string table and largest builtin table across all the targets in
Clang.
@llvmbot
Copy link
Member

llvmbot commented Feb 6, 2025

@llvm/pr-subscribers-clang

Author: Chandler Carruth (chandlerc)

Changes

I missed a few places to tidy up from before using the tablengen files directly for the builtins. I didn't remove all of the modulemap entries and there were two small .def files left lingering. This should clean all of that up. I went through to cross check the list of files and it looks correct now.


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

3 Files Affected:

  • (removed) clang/include/clang/Basic/BuiltinsSME.def (-21)
  • (removed) clang/include/clang/Basic/BuiltinsSVE.def (-22)
  • (modified) clang/include/module.modulemap (-4)
diff --git a/clang/include/clang/Basic/BuiltinsSME.def b/clang/include/clang/Basic/BuiltinsSME.def
deleted file mode 100644
index 180ee20295ccdb..00000000000000
--- a/clang/include/clang/Basic/BuiltinsSME.def
+++ /dev/null
@@ -1,21 +0,0 @@
-//===--- BuiltinsSME.def - SME Builtin function database --------*- C++ -*-===//
-//
-//  Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-//  See https://llvm.org/LICENSE.txt for license information.
-//  SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines the SME-specific builtin function database.  Users of
-// this file must define the BUILTIN macro to make use of this information.
-//
-//===----------------------------------------------------------------------===//
-
-// The format of this database matches clang/Basic/Builtins.def.
-
-#define GET_SME_BUILTINS
-#include "clang/Basic/arm_sme_builtins.inc"
-#undef GET_SME_BUILTINS
-
-#undef BUILTIN
-#undef TARGET_BUILTIN
diff --git a/clang/include/clang/Basic/BuiltinsSVE.def b/clang/include/clang/Basic/BuiltinsSVE.def
deleted file mode 100644
index a83f1c8f82dd09..00000000000000
--- a/clang/include/clang/Basic/BuiltinsSVE.def
+++ /dev/null
@@ -1,22 +0,0 @@
-//===--- BuiltinsSVE.def - SVE Builtin function database --------*- C++ -*-===//
-//
-//  Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-//  See https://llvm.org/LICENSE.txt for license information.
-//  SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines the SVE-specific builtin function database.  Users of
-// this file must define the BUILTIN macro to make use of this information.
-//
-//===----------------------------------------------------------------------===//
-
-// The format of this database matches clang/Basic/Builtins.def.
-
-#define GET_SVE_BUILTINS
-#include "clang/Basic/arm_sve_builtins.inc"
-#include "clang/Basic/BuiltinsAArch64NeonSVEBridge.def"
-#undef GET_SVE_BUILTINS
-
-#undef BUILTIN
-#undef TARGET_BUILTIN
diff --git a/clang/include/module.modulemap b/clang/include/module.modulemap
index e2bc941d3143a6..4e2d22f13e0547 100644
--- a/clang/include/module.modulemap
+++ b/clang/include/module.modulemap
@@ -49,11 +49,7 @@ module Clang_Basic {
   textual header "clang/Basic/BuiltinsLoongArchLASX.def"
   textual header "clang/Basic/BuiltinsLoongArchLSX.def"
   textual header "clang/Basic/BuiltinsMips.def"
-  textual header "clang/Basic/BuiltinsNEON.def"
   textual header "clang/Basic/BuiltinsPPC.def"
-  textual header "clang/Basic/BuiltinsRISCVVector.def"
-  textual header "clang/Basic/BuiltinsSME.def"
-  textual header "clang/Basic/BuiltinsSVE.def"
   textual header "clang/Basic/BuiltinsSystemZ.def"
   textual header "clang/Basic/BuiltinsVE.def"
   textual header "clang/Basic/BuiltinsVEVL.gen.def"

@chandlerc chandlerc requested review from rnk and dwblaikie February 6, 2025 09:00
@chandlerc chandlerc merged commit da083e2 into llvm:main Feb 6, 2025
11 checks passed
@chandlerc chandlerc deleted the fix-strtable branch February 6, 2025 21:21
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
I missed a few places to tidy up from before using the tablengen files
directly for the builtins. I didn't remove all of the modulemap entries
and there were two small `.def` files left lingering. This should clean
all of that up. I went through to cross check the list of files and it
looks correct now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants