[LLVMdev] Target specific info available to Clang (and others)

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Oct 24 05:13:25 PDT 2014


> One way I could think of, but it's controversial, is to generate two
> files: ARMGenSubtargetInfo.inc and  ARMGenSubtargetInfoPublic.inc, the
> former in the current directory, the latter in a shared include path
> for all tools. That way, not only LLVM, but also Clang, llc, lld etc
> would be able to use the same parsing mechanism and understand the
> generated data (enums, structures) in the exact same way.

I think this should move a bit further. One feature that we have now
and people seem to find desirable is that clang can produce .ll files
for target X even if target X is not compiled.

In general the problem we have then is that there is a tiny bit of
information about a given target that we want to build even when the
target is not enabled. This means we should probably have something
like

lib/Target/ARM: only built if the ARM target is enabled.
lib/TargetInfo/ARM: always build. Include only info that clang wants
to use: parse fpu name, construct the datalayout.

Cheers,
Rafael



More information about the llvm-dev mailing list