llvm-project/clang/utils/TableGen
Simon Tatham a12f588ebb [ARM,MVE] Add intrinsics for contiguous load/stores.
This patch adds the ACLE intrinsics for all the MVE load and store
instructions not already handled by D69791. These ones don't need new
IR intrinsics, because they can be implemented in terms of standard
LLVM IR constructions.

Some of the load and store instructions access less than 128 bits of
memory, sign/zero extending each value to a wider vector lane on load
or truncating it on store. These are represented in IR by a load of a
shorter vector followed by a zext/sext, and conversely, a trunc
followed by a short store. Existing ISel patterns already recognize
those combinations and turn them into the right MVE instructions.

The predicated forms of all these instructions are represented in the
same way, except that the ordinary load/store operation is replaced
with the existing intrinsics @llvm.masked.{load,store}. These are
currently only code-generated as predicated MVE load/store
instructions if you give LLVM the `-enable-arm-maskedldst` option; so
I've done that in the LLVM codegen test. When we make that the
default, that option can be removed.

In the Tablegen backend, I've had to add a handful of extra support
features:

* We need to be able to make clang::Address objects out of a
  pointer and an alignment (previously we only needed these when the
  user passed us an existing one).

* We can now specify vector types that aren't 128 bits wide (for use
  in those intermediate values in IR), the parametrized type system
  can make one starting from two existing vector types (using the lane
  count of one and the element type of the other).

* I've added support for code generation of pointer casts, and for
  specifying LLVM types as operands to IRBuilder operations (for zext
  and sext, though I think they'll come in useful again).

* Now not all IR construction operations need to be specified as
  Builder.CreateFoo; some don't involve a Builder at all, and one
  passes it as a parameter to a tiny static helper function in
  CGBuiltin.cpp.

Reviewers: ostannard, MarkMurrayARM, dmgreen

Subscribers: kristof.beyls, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D70088
2019-11-13 12:47:00 +00:00
..
CMakeLists.txt Fix file-ordering nit in D67161. 2019-10-25 09:22:07 +01:00
ClangASTEmitters.h [NFC] Add a tablegen node for the root of the AST node hierarchies. 2019-10-25 16:39:21 -07:00
ClangASTNodesEmitter.cpp [NFC] Add a tablegen node for the root of the AST node hierarchies. 2019-10-25 16:39:21 -07:00
ClangAttrEmitter.cpp [NFC] Add a tablegen node for the root of the AST node hierarchies. 2019-10-25 16:39:21 -07:00
ClangCommentCommandInfoEmitter.cpp Use scope qualifiers in Clang's tblgen backends to get useful 2019-10-01 23:12:57 +00:00
ClangCommentHTMLNamedCharacterReferenceEmitter.cpp Use scope qualifiers in Clang's tblgen backends to get useful 2019-10-01 23:12:57 +00:00
ClangCommentHTMLTagsEmitter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangDataCollectorsEmitter.cpp Use scope qualifiers in Clang's tblgen backends to get useful 2019-10-01 23:12:57 +00:00
ClangDiagnosticsEmitter.cpp Fix uninitialized variable warnings. NFCI. 2019-11-02 18:03:21 +00:00
ClangOpcodesEmitter.cpp Use scope qualifiers in Clang's tblgen backends to get useful 2019-10-01 23:12:57 +00:00
ClangOpenCLBuiltinEmitter.cpp [OpenCL] Group builtin functions by prototype 2019-11-05 10:26:47 +00:00
ClangOptionDocEmitter.cpp Use scope qualifiers in Clang's tblgen backends to get useful 2019-10-01 23:12:57 +00:00
ClangSACheckersEmitter.cpp Use scope qualifiers in Clang's tblgen backends to get useful 2019-10-01 23:12:57 +00:00
ClangTypeNodesEmitter.cpp [NFC] Add a tablegen node for the root of the AST node hierarchies. 2019-10-25 16:39:21 -07:00
MveEmitter.cpp [ARM,MVE] Add intrinsics for contiguous load/stores. 2019-11-13 12:47:00 +00:00
NeonEmitter.cpp NeonEmitter: remove special 'a' type modifier. 2019-11-06 10:23:36 +00:00
TableGen.cpp [NFC] Add a tablegen node for the root of the AST node hierarchies. 2019-10-25 16:39:21 -07:00
TableGenBackends.h [clang,ARM] Initial ACLE intrinsics for MVE. 2019-10-24 16:33:13 +01:00