[PATCH] Always build all back-end table-gen files

Renato Golin renato.golin at linaro.org
Tue Mar 10 04:16:27 PDT 2015


Hi rnk, rafael, chandlerc, doug.gregor,

This commit allows all table-gen files to be generated irrespective of the 
back-ends that were requested to be built. The purpose of this change is to
allow target-specific behaviour to be included in a generic target description
library that will always be built and be accessible to LLVM internal libraries
such as the assemblers and generic code-gen, as well all external tools, such
as Clang, lli, llc, lld, lldb, etc.

With this information available, the external tools will be able to use the 
target-specific knowledge LLVM already has, externalised via the target
description API, to query, parse and understand architecture behaviour and 
propseties without carrying such knowledge themselves.

This would ultimately common up *all* knowledge of all targets, so not only
we reduce the amount of duplication, but also we get it right on every tool,
not just the ones that we happened to coincide.

The biggest beneficiary of this change will be Clang, especially related to
the driver (for parsing and undertanding command-line options), as well as
ABI decisions and specific target behaviour during IR generation.

There is an obvious addition of compile time, but since table generation is
only a small part of the total compilation time (no more than 5% if all tables
are built), it won't amount to any significant change, even on slow targets,
such as ARM boards. Also, no generated file will be included if not strictly
needed, so the additional space taken on final binaries will be zero.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8195

Files:
  cmake/modules/TableGen.cmake
  lib/Target/AArch64/CMakeLists.txt
  lib/Target/AArch64/CMakeTblGen.txt
  lib/Target/ARM/CMakeLists.txt
  lib/Target/ARM/CMakeTblGen.txt
  lib/Target/BPF/CMakeLists.txt
  lib/Target/BPF/CMakeTblGen.txt
  lib/Target/CMakeLists.txt
  lib/Target/Hexagon/CMakeLists.txt
  lib/Target/Hexagon/CMakeTblGen.txt
  lib/Target/MSP430/CMakeLists.txt
  lib/Target/MSP430/CMakeTblGen.txt
  lib/Target/Mips/CMakeLists.txt
  lib/Target/Mips/CMakeTblGen.txt
  lib/Target/NVPTX/CMakeLists.txt
  lib/Target/NVPTX/CMakeTblGen.txt
  lib/Target/PowerPC/CMakeLists.txt
  lib/Target/PowerPC/CMakeTblGen.txt
  lib/Target/R600/CMakeLists.txt
  lib/Target/R600/CMakeTblGen.txt
  lib/Target/Sparc/CMakeLists.txt
  lib/Target/Sparc/CMakeTblGen.txt
  lib/Target/SystemZ/CMakeLists.txt
  lib/Target/SystemZ/CMakeTblGen.txt
  lib/Target/X86/CMakeLists.txt
  lib/Target/X86/CMakeTblGen.txt
  lib/Target/XCore/CMakeLists.txt
  lib/Target/XCore/CMakeTblGen.txt

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8195.21562.patch
Type: text/x-patch
Size: 23163 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150310/942a01ff/attachment.bin>


More information about the cfe-commits mailing list