llvm-project/llvm
Florian Hahn 8f3f88d2f5 [Matrix] Implement matrix index expressions ([][]).
This patch implements matrix index expressions
(matrix[RowIdx][ColumnIdx]).

It does so by introducing a new MatrixSubscriptExpr(Base, RowIdx, ColumnIdx).
MatrixSubscriptExprs are built in 2 steps in ActOnMatrixSubscriptExpr. First,
if the base of a subscript is of matrix type, we create a incomplete
MatrixSubscriptExpr(base, idx, nullptr). Second, if the base is an incomplete
MatrixSubscriptExpr, we create a complete
MatrixSubscriptExpr(base->getBase(), base->getRowIdx(), idx)

Similar to vector elements, it is not possible to take the address of
a MatrixSubscriptExpr.
For CodeGen, a new MatrixElt type is added to LValue, which is very
similar to VectorElt. The only difference is that we may need to cast
the type of the base from an array to a vector type when accessing it.

Reviewers: rjmccall, anemet, Bigcheese, rsmith, martong

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D76791
2020-06-01 20:08:49 +01:00
..
benchmarks
bindings Fix go bindings after FixedVectorType -> VectorType change. 2020-05-15 16:37:57 -07:00
cmake Remove SVN logic from find_first_existing_vc_file 2020-05-29 20:31:55 +05:30
docs [AMDGPU] Add loaded code object path URI definition to AMDGPUUsage 2020-05-29 19:52:52 -04:00
examples StoreInst should store Align, not MaybeAlign 2020-05-15 12:26:58 -07:00
include [Matrix] Implement matrix index expressions ([][]). 2020-06-01 20:08:49 +01:00
lib [InstCombine] fix use of base VectorType; NFC 2020-06-01 14:28:31 -04:00
projects
resources
runtimes
test [LiveDebugValues] Speed up removeEntryValue, NFC 2020-06-01 11:02:36 -07:00
tools [Object] Add DF_1_PIE 2020-06-01 08:56:02 -07:00
unittests [LiveDebugValues] Speed up removeEntryValue, NFC 2020-06-01 11:02:36 -07:00
utils [utils] change default nameless value to "TMP" 2020-06-01 06:54:45 -04:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Automatically configure MLIR when flang is enabled 2020-05-27 07:31:49 +00:00
CODE_OWNERS.TXT Add self as code owner for SCEV and IndVars 2020-05-26 17:35:54 -07:00
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.