[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

Peter Smith via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 13 10:10:13 PST 2024


smithp35 wrote:

> > front-end error/warning as this is a front-end/source-level mistake, with better diagnostic control options available.
> 
> There's a _lot_ of complicated logic required to determine, for each architecture, which target features affect the ABI in which ways. Are you suggesting that logic should be duplicated across all frontends? That seems like a huge waste of effort to me. Most frontends are inevitably going to get it subtly wrong, so in the end we have a ton more bugs than we did if there was a central location where such know-how could be properly encoded, and where there are enough people that can confidently answer ABI questions like this.

It is a tradeoff. Yes it means redoing effort in front-ends, but it can mean a better experience for the end-user, and to me that is often more important than the work that we do as toolchain developers. I'm not saying I've definitely got the balance right in this case which is why I invite more opinions :-)

An error in the backend does not have a lot of context. In some cases it may end up triggering on a large LTO build without any source file information given in the error message. 

https://github.com/llvm/llvm-project/pull/111334


More information about the cfe-commits mailing list