rfc and [patch]: Unify -mfpu and .fpu handling, let .fpu toggle features

Renato Golin renato.golin at linaro.org
Fri Aug 15 01:12:16 PDT 2014

On 15 August 2014 01:30, Rafael Avila de Espindola
<rafael.espindola at gmail.com> wrote:
> Short of creating a small libTargetInfo for each target your approach is
> probably the best. We discussed doing something like it for solving the data
> layout duplication, but I never got around to implementing it :-(

Rafael, Nico,

I agree with both of you that we need a common library for resolving
sub-arch features on all our tools, and even discussed that in the GNU
cauldron, but this is not the right way of doing it.

Clang and external tools depend on LLVM's APIs, containers and
algorithms, but they're all (or should be) in a highly accessible
area, and most certainly *not* in a source area. This is a long time
design decision of LLVM that every header in a source directory cannot
leak outside of it.

Moving that header to include/llvm/SubTarget/ARMSubTargetCommon.h
would be the best, with probably the cpp file into a similar place
under lib. This might be the first one to be there, but we should move
*all* sub-target algorithms, constants, and tablegen to those places,
so that all tools can share the implementation.

Otherwise, the solution might be worse than the current problem.


More information about the cfe-commits mailing list