The collection of library function names in TargetLibraryInfo faces similar challenges as RuntimeLibCalls in the IR component. The number of function names is large, there are numerous customizations based on the triple (including alternate names), and there is a lot of replicated data in the signature table. The ultimate goal would be to capture all lbrary function related information in a .td file. This PR brings the current .def file to TableGen, almost as a 1:1 replacement. However, there are some improvements which are not possible in the current implementation: - the function names are now stored as a long string together with an offset table. - the table of signatures is now deduplicated, using an offset table for access. The size of the object file decreases about 34kB with these changes. The hash table of all function names is still constructed dynamically. A static table like for RuntimeLibCalls is the next logical step. The main motivation for this change is that I have to add a large number of custom names for z/OS (like in RuntimeLibCalls.td), and the current infrastructur does not support this very well.
4.1 KiB
4.1 KiB