llvm-project/clang/tools
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
..
arcmt-test Revert "Use InitLLVM to setup a pretty stack printer" 2019-11-25 21:06:56 -05:00
c-arcmt-test [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
c-index-test Expose AtomicType in the libclang C API. 2020-04-16 08:06:58 -04:00
clang-check Revert "Use InitLLVM to setup a pretty stack printer" 2019-11-25 21:06:56 -05:00
clang-diff Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
clang-extdef-mapping Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
clang-format [clang-format][PR46043] Parse git config w/ implicit values 2020-05-24 20:32:54 -04:00
clang-format-vs clang-format-vs : Fix Unicode formatting 2019-11-27 09:58:59 +01:00
clang-fuzzer [clang-objc-fuzzer] Add LLVMFuzzerInitialize to fix msvc builds (PR44414) 2020-04-14 13:37:27 +01:00
clang-import-test Avoid including FileManager.h from SourceManager.h 2020-03-11 13:53:12 -07:00
clang-offload-bundler [Clang][Bundler][NFC] Replace SmallString<...> with StringRef 2020-01-30 12:50:04 -08:00
clang-offload-wrapper [clang-offload-wrapper] Lower priority of __tgt_register_lib in favor of __tgt_register_requires 2020-03-03 12:31:40 -08:00
clang-refactor Avoid including FileManager.h from SourceManager.h 2020-03-11 13:53:12 -07:00
clang-rename Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC 2019-08-05 05:43:48 +00:00
clang-scan-deps Upgrade some instances of std::sort to llvm::sort. NFC. 2020-03-28 19:23:29 +01:00
clang-shlib [cmake] Fix clang builds with BUILD_SHARED=ON and CLANG_LINK_CLANG_DYLIB=ON 2020-02-04 14:15:16 -08:00
diag-build
diagtool [diagtool] Install diagtool when LLVM_INSTALL_TOOLCHAIN_ONLY is ON. 2020-05-29 16:25:06 -07:00
driver Simplify string joins. NFCI. 2020-04-11 17:20:11 +02:00
libclang [Matrix] Implement matrix index expressions ([][]). 2020-06-01 20:08:49 +01:00
scan-build [analyzer] Get scan-view executable from environment. 2020-05-20 14:55:56 +03:00
scan-build-py [scan-build-py] Set of small fixes 2019-12-05 09:00:16 -08:00
scan-view [clang] [cmake] Add distribution install targets for remaining components 2019-10-04 05:43:20 +00:00
CMakeLists.txt [Clang][OpenMP Offload] Add new tool for wrapping offload device binaries 2019-10-09 20:42:58 +00:00