mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-19 07:16:43 +00:00

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.