[PATCH] D38799: [mips] Add MIPS ABI enumeration and getter function to the Triple class

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 23 14:38:09 PDT 2017


rengolin added a comment.

In https://reviews.llvm.org/D38799#904251, @atanasyan wrote:

> This patch is really MIPS specific. But I think the problem is actually more general. Now, for example, we have three "environment" GNU, EABI, and Musl and "HF" ABI variants for each of this environment. If we support more C libraries, we will have to add new `Environment` items for each supported environment+ABI pair. Something like NewLib, NewLibHF etc. The idea of this patch is to separate notions of Environment and ABI and escape growing the `Environment` enumeration if we need to add new ABI for existing "environment".


I agree that we could clean up a lot of crud by separating environment from ABI, but this is not what this patch is doing, at least for every other non-Mips architecture. Adding more special treatments to the already special Triple class won't help.

I also agree that ARM hasn't made that easy to begin with, and a lot of it is ARM's fault (the arch, not the company:).

@echristo do you have any visibility on Triple changes that would help this cleanup to happen soon?

cheers,
--renato


Repository:
  rL LLVM

https://reviews.llvm.org/D38799





More information about the llvm-commits mailing list