[PATCH] D113959: [llvm][RISC-V] Use floating-point ABI by default if possible

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 18 02:03:07 PST 2021


asb added a comment.

I think anyone producing LLVM IR for RISC-V should explicitly set the ABI and of course any target features (-mattr for llc). The default rv32/rv64 target of course isn't very useful - most cores implement at least some of the standard extensions.

I'd also be very wary of users depending on the default ABI selection.

So I agree with @jrtc27 here - if any LLVM IR producing frontends aren't explicitly setting the ABI or providing a way to do so, they really need to. You need to be aware of the target ABI when generating IR of course - many things will appear fine if you don't, but you'll run in to corner cases. See clang/lib/CodeGen/TargetInfo.cpp for how Clang handles this. It's come up many times in the LLVM community that it would be nice to avoid the need for this, but nobody has taken it on so far.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113959/new/

https://reviews.llvm.org/D113959



More information about the llvm-commits mailing list