[all-commits] [llvm/llvm-project] 7e2218: [StrTable] Mechanically convert Hexagon builtins t...
Chandler Carruth via All-commits
all-commits at lists.llvm.org
Tue Jan 28 00:07:59 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7e22180c20fa3b4e0add41ad620d2eaac2b47fcc
https://github.com/llvm/llvm-project/commit/7e22180c20fa3b4e0add41ad620d2eaac2b47fcc
Author: Chandler Carruth <chandlerc at gmail.com>
Date: 2025-01-28 (Tue, 28 Jan 2025)
Changed paths:
R clang/include/clang/Basic/BuiltinsHexagon.def
A clang/include/clang/Basic/BuiltinsHexagon.td
R clang/include/clang/Basic/BuiltinsHexagonDep.def
M clang/include/clang/Basic/CMakeLists.txt
M clang/include/clang/Basic/TargetBuiltins.h
M clang/include/module.modulemap
M clang/lib/Basic/Targets/Hexagon.cpp
Log Message:
-----------
[StrTable] Mechanically convert Hexagon builtins to use TableGen (#123460)
This switches them to use the common builtin TableGen emission.
The fancy feature string preprocessor tricks are replaced with a fairly
direct translation into TableGen.
All of the actual definitions were created using a quite hack-y Python
script that was never intended to be productionized. It preserves the
order, spacing, and even comments from the original files. For
posterity, the script used is here:
https://gist.github.com/chandlerc/f53c7d735e33eecf388529bd9a6010df
The original `.def` file appears to be generated by some out-of-tree
`iset.py` script, which because it is out of tree I couldn't update. It
should be very straightforward though to update it to generate a similar
structure as was used to produce the `.td` file.
In addition to helping move towards TableGen for all of the builtins,
these builtins in particular can be *much* more efficiently handled
using TableGen when we start emitting string tables for them because it
allows de-duplicating all of the feature strings.
The commit sha parent at the time the PR was made is
7253c6fde498c4c9470b681df47d46e6930d6a02 and at that commit, the
resulting TableGen file produces a `.inc` file that only differs in
whitespace and the order of the builtins defined.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list