via llvm-dev
2021-Oct-01 15:40 UTC
[llvm-dev] RFC: Checking TargetLibraryInfo against actual libraries
I've written a small program that sets up TargetLibraryInfo for a specified triple, and compares its opinion of which libcalls are "available" against the functions actually provided by some set of library files. This has been helpful in tidying up TLI's opinion about which calls are available where, and I've committed a couple of patches (6185ad0, 56e681a) to do some general fixup; I'm working on a patch to get the PS4 set completely correct. I was originally intending to use this tool in our downstream testsuite, but... It occurred to me that the tool might be useful to people who are interested in tidying up TLI for other targets (which I'm not, really, it's just that part of my effort happens to help others). Right now the tool can only handle ELF files, but it should be straightforward to extend to COFF/MachO if people interested in those targets think it would be useful. Is there interest in a tool like this? Thanks, --paulr
Alex Bradbury via llvm-dev
2021-Oct-04 17:57 UTC
[llvm-dev] RFC: Checking TargetLibraryInfo against actual libraries
On Fri, 1 Oct 2021 at 16:40, via llvm-dev <llvm-dev at lists.llvm.org> wrote:> > I've written a small program that sets up TargetLibraryInfo for a > specified triple, and compares its opinion of which libcalls are > "available" against the functions actually provided by some set > of library files. > > This has been helpful in tidying up TLI's opinion about which > calls are available where, and I've committed a couple of patches > (6185ad0, 56e681a) to do some general fixup; I'm working on a > patch to get the PS4 set completely correct. I was originally > intending to use this tool in our downstream testsuite, but... > > It occurred to me that the tool might be useful to people who are > interested in tidying up TLI for other targets (which I'm not, > really, it's just that part of my effort happens to help others). > Right now the tool can only handle ELF files, but it should be > straightforward to extend to COFF/MachO if people interested in > those targets think it would be useful. > > Is there interest in a tool like this?The tool sounds useful to me, thinking from the RISC-V backend's perspective. Just ELF is fine for that use case. If it's not a huge amount of additional work to make it fit for public consumption I think it would be worth sharing. Best, Alex