llvm-project/clang
Tomas Matheson e83f1502f1 [AArch64] Improve TargetParser API
Re-land with constexpr StringRef::substr():

The TargetParser depends heavily on a collection of macros and enums to tie
together information about architectures, CPUs and extensions. Over time this
has led to some pretty awkward API choices. For example, recently a custom
operator-- has been added to the enum, which effectively turns iteration into
a graph traversal and makes the ordering of the macro calls in the header
significant. More generally there is a lot of string <-> enum conversion
going on. I think this shows the extent to which the current data structures
are constraining us, and the need for a rethink.

Key changes:

 - Get rid of Arch enum, which is used to bind fields together. Instead of
   passing around ArchKind, use the named ArchInfo objects directly or via
   references.

 - The list of all known ArchInfo becomes an array of pointers.

 - ArchKind::operator-- is replaced with ArchInfo::implies(), which defines
   which architectures are predecessors to each other. This allows features
   from predecessor architectures to be added in a more intuitive way.

 - Free functions of the form f(ArchKind) are converted to ArchInfo::f(). Some
   functions become unnecessary and are deleted.

 - Version number and profile are added to the ArchInfo. This makes comparison
   of architectures easier and moves a couple of functions out of clang and
   into AArch64TargetParser.

 - clang::AArch64TargetInfo ArchInfo is initialised to Armv8a not INVALID.

 - AArch64::ArchProfile which is distinct from ARM::ArchProfile

 - Give things sensible names and add some comments.

Differential Revision: https://reviews.llvm.org/D138792
2022-12-01 15:30:07 +00:00
..
bindings Add clang_CXXMethod_isMoveAssignmentOperator to libclang 2022-11-14 15:21:36 +01:00
cmake Add version to all LLVM cmake package 2022-11-25 21:57:58 +00:00
docs Revert "Implement CWG2631" 2022-11-30 16:03:05 +01:00
examples
include [AMX] Support AMX-FP16 new intrinsic interface 2022-12-01 09:47:53 +08:00
lib [AArch64] Improve TargetParser API 2022-12-01 15:30:07 +00:00
runtime [clang] Only use major version in resource dir 2022-11-10 15:02:03 +01:00
test [PS4/PS5] Canonicalize tests to use 'target=.*-(ps4|ps5)' 2022-12-01 07:21:07 -08:00
tools [LinkerWrapper] Ignore OFK_None kinds for building registration code 2022-11-29 09:46:51 -06:00
unittests [clang][TargetInfo] Use LangAS for getPointer{Width,Align}() 2022-11-30 20:24:01 +00:00
utils [CMake] Support injecting extra dependencies for perf-training 2022-11-30 06:13:33 +00:00
www [clang] Add test for CWG360 2022-12-01 17:23:26 +03:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [cmake] Fix _GNU_SOURCE being added unconditionally 2022-11-14 12:28:21 -08:00
CodeOwners.rst [code-owners] Add Vassil as a code owner for clang incremental compilation. 2022-11-15 08:56:16 +00:00
INSTALL.txt
LICENSE.TXT
ModuleInfo.txt
NOTES.txt
README.txt

README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source-level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:             http://clang.llvm.org/
Building and using Clang:         http://clang.llvm.org/get_started.html
Clang Static Analyzer:            http://clang-analyzer.llvm.org/
Information on the LLVM project:  http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang forums:
  https://discourse.llvm.org/c/clang/

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/