<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/112093>112093</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Need `.td`s for libm and runtime libcall API for ~all LLVM targets
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
workingjubilee
</td>
</tr>
</table>
<pre>
This was raised as a concern in https://github.com/llvm/llvm-project/pull/111269 and I am opening an issue to make sure it is not lost as a desired followup.
Basically, there are two contending needs for a list of libm functions:
- Frontends want to know what builtin functions LLVM will need to call at runtime
- LLVM wants to keep track of actual calls to libm functions for LTO purposes
Frontends see RuntimeLibcalls.def as suiting the former, but LLVM has lately grown some... appropriations of the `.def` as the latter. However, RuntimeLibcalls.def is inadequate for the latter, even if it has proven a convenient start. It could use being promoted to a proper TableGen file that can better handle the obviously parameterized cases here.
It might need to be multiple files, given the distinct usages, but hopefully we can avoid complete duplication.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUlM-O4zYMxp_GuRBr2EomaQ4-zHaRdoDpHxSD3imLtrkjS6pExZge-uyF5G5nF-illwSWxI8_UR-JKfHsiIbm4WPz8OmAWRYfh83HV3bz56zZEh20N2_Dy8IJNkwQkRMZwAQIo3cjRQfsYBEJqTk-NurWqNvMsmTdjn5t1M3a-5e_DyH6zzRKo24hW9uoW9_36nwFdAaeAFfwgRy7GdABp5QJxMOKrwQpRwIW4ATOC1ifZIcwlDiSgclb67cc2qb71HSP--9HTDyitW-N-h5koUiAkUA2X-CFnCnJHJFJMPkICJaTgJ_Asl5hym4U9q7erAp-gFvcA0s5nBS-V-c32BYU0JmtsHuPg-fn33-Cja2tScrpggMoELMTXumL7H4QnaQqSRRAIo6vhQVHyWhrZN39lq2CP7_8AiHH4BOlrwvwTpuI4Lc95zPrqtUamkoRU2YpdZCFithKsZRLZ9mpFkxgUci-wRz95iD5ldq2BQwh-hAZdw4_VYXm3BXh5twV7bJiUYRiCz_6je67-H-RcAJ2aOiPjFJBvgouMXQnBzwVFxSkEH1ZqDa8k2NyAkkwSgtPAqPP1kBOBJrK3UL0q5f9CbB8BYrwgtrSD-RgYksg5QlHdKCppIQFnanLBF7f2edk3yBgxJWEIv9JBkZMlKD46hvbPQmsPC_y76NrgjVb4WCp5krlPjMX_iJvOAm7USAnnPfNUv3FB5qytW-wUQXDu2cDo1-DJSEwOVgea_XbgxmO5nq84oGG_qK-uxyP58v1sAz98TyOU4_HsdPX01lfrupCeEH1YLru4UQHHlSnTn3Xq74_XR6u7VHr7ooax9NlQjr3zamjFdm2pYVbH-dDbc2h71V3PR4sarKpzhClHG174zZKlZESh9r3Os-pOXWludK7jLBYGn4uNSqmEdOcu93O1eFlKPzTJWWhNs7jr0_1wF_lo7pTMM4k6ZCjHf73FKqoqc6hepf7oP4OAAD__yTvvfQ">