Go to file
Nicolai Haehnle 7a9c03f484 AMDGPU: Select MIMG instructions manually in SITargetLowering
Summary:
Having TableGen patterns for image intrinsics is hitting limitations:
for D16 we already have to manually pre-lower the packing of data
values, and we will have to do the same for A16 eventually.

Since there is already some custom C++ code anyway, it is arguably easier
to just do everything in C++, now that we can use the beefed-up generic
tables backend of TableGen to provide all the required metadata and map
intrinsics to corresponding opcodes. With this approach, all image
intrinsic lowering happens in SITargetLowering::lowerImage. That code is
dense due to all the cases that it handles, but it should still be easier
to follow than what we had before, by virtue of it all being done in a
single location, and by virtue of not relying on the TableGen pattern
magic that very few people really understand.

This means that we will have MachineSDNodes with MIMG instructions
during DAG combining, but that seems alright: previously we had
intrinsic nodes instead, but those are similarly opaque to the generic
CodeGen infrastructure, and the final pattern matching just did a 1:1
translation to machine instructions anyway. If anything, the fact that
we now merge the address words into a vector before DAG combine should
be an advantage.

Change-Id: I417f26bd88f54ce9781c1668acc01f3f99774de6

Reviewers: arsenm, rampitec, rtaylor, tstellar

Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

Differential Revision: https://reviews.llvm.org/D48017

llvm-svn: 335228
2018-06-21 13:36:57 +00:00
clang Fix line endings in recently updated test file 2018-06-21 12:39:24 +00:00
clang-tools-extra [clangd] Expose 'shouldCollectSymbol' helper from SymbolCollector. 2018-06-21 12:12:26 +00:00
compiler-rt [TSan] fix build and couple of unit tests on FreeBSD 2018-06-20 20:17:44 +00:00
debuginfo-tests [debuginfo-tests] Always use the system python to invoke llgdb.py. 2018-06-10 19:38:26 +00:00
libclc Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
libcxx [CMake] Convert paths to the right form in standalone builds on Windows 2018-06-20 21:03:34 +00:00
libcxxabi [CMake] Convert paths to the right form in standalone builds on Windows 2018-06-20 20:59:18 +00:00
libunwind [CMake] Convert paths to the right form in standalone builds on Windows 2018-06-20 20:53:19 +00:00
lld [WebAssembly] Error on mismatched function signature in final output 2018-06-21 00:12:25 +00:00
lldb Improve SBThread's stepping API using SBError parameter. 2018-06-20 21:43:16 +00:00
llgo Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm AMDGPU: Select MIMG instructions manually in SITargetLowering 2018-06-21 13:36:57 +00:00
openmp minor: fixed typo in debug print 2018-06-20 15:54:11 +00:00
parallel-libs Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
polly Move ScopInfo to isl++ 2018-06-19 08:13:53 +00:00
README.md

README.md

Low Level Virtual Machine (LLVM)

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