28faded3432d20cc2e9b9e58b4706031bd6ea9c9 |
|
22-Feb-2017 |
Yang Ni <yangni@google.com> |
Added support for global variables Bug: 30964317 Pass necessary metadata about global variables--i.e., offsets of each global variable in the synthesized global buffer--from the compiler to the driver. This metadata is encoded as an OpString in the generated SPIR-V code. The driver also creates the global buffer to store all global variables. Added support for sharing globals between invokes and kernels. rs2spirv also does global variable access to global buffer field access transformation for the CPU code, so that CPU and GPU access the same global buffer resident in shared memory assuming the same data layout. Added in the compiler support to handle global variable intializers, and contantant expressions. Removed capability Address, since Vulkan validation rules disallow it. Converted OpInBoundsPtrAccessChain into OpInBoundsAccessChain, since the former requires capability Address. OpInBoundsPtrAccessChain instructions get generated for accesses to global variables, which are now fields in the global buffer. Added an RSoV test for global variables. Adjusted lit tests to check the new OpString. This CL is limited to non-allocation global variables, as global rs_allocations are handled in separate CLs. This CL does not handle constant globals either, which will be dealt with in followup CLs. Test: lit tests and RSoVTest Change-Id: Ia8f44c4ffa22046a72a58a26942ced595b3f5f53
/frameworks/rs/rsov/compiler/RemoveNonkernelsPass.cpp
|
eb6548743c40f4129ca55a58ff2d5254f22e95e1 |
|
22-Feb-2017 |
Yang Ni <yangni@google.com> |
Reorganized metadata related code in rs2spirv Bug: 30964317 Added a Context class, which is a singleton that is shared across all LLVM and Spirit compiler passes for rs2spirv. Inside Context, there is a bcinfo::MetadataExtractor, as well as data structures for quick lookup of information about foreach kernels and exported variables. Cleaned up passes which used to use MetadataExtractor to use this new Context. Test: lit tests Change-Id: I3c88f8e8e75b354d87c155312176544fb660526b
/frameworks/rs/rsov/compiler/RemoveNonkernelsPass.cpp
|
b83f1f4d77c7624b9e8dc11beec8f796ff841918 |
|
02-Mar-2017 |
I-Jui (Ray) Sung <ijsung@google.com> |
Fix build failures of RSoV compiler with DISABLE_NDEBUG Uses of the DEBUG() macro in some parts of RSoV compiler triggered a build failure with DISABLE_NDEBUG. This simple CL fixed these. Bug: 30964317 Test: mm Change-Id: Ieb28ef6dbbb50c6668468ca2a69565095bcc4bfe
/frameworks/rs/rsov/compiler/RemoveNonkernelsPass.cpp
|
c7b3a43821ccf0f2b13840246e1895744799cf6b |
|
01-Mar-2017 |
Yang Ni <yangni@google.com> |
Clean up rs2spirv code Bug: 30964317 Moved tests/globals/getdimx.ll and rewrite_getdim.ll into tests/rs_allocation. Removed unneeded #include's, and adjusted #include order. Removed print-as-words command-line option. Removed some dead code. Test: lit tests and RSoVTest Change-Id: I263987597b8c1ec7aa5593157580aa3ad65861a1
/frameworks/rs/rsov/compiler/RemoveNonkernelsPass.cpp
|
7974fc03e11f3a8dd40f794f3b33b4889483090c |
|
09-Feb-2017 |
Rahul Chaudhry <rahulchaudhry@google.com> |
frameworks/rs: fix typos and clang-tidy warnings This change fixes a few typos and clang tidy warnings related to the "llvm-namespace-comment" checks. Bug: 26936282 Test: WITH_TIDY=1 WITH_TIDY_CHECKS="llvm-namespace-comment" mm Change-Id: Ic65182e5b4999fbd48d6a8ad7172e4bfeeb541f4
/frameworks/rs/rsov/compiler/RemoveNonkernelsPass.cpp
|
3523b2f99da3f443ab5e7e09061773c836b0e89b |
|
20-Jan-2017 |
I-Jui (Ray) Sung <ijsung@google.com> |
Strip non-kernel functions from RS2SPIRV compilation Added a pass to trim out non-kernel functions from the rest of SPIR-V compilation passes. Also changed/enforced the pass ordering so that dead globals exposed by this pass are removed prior of SPIR-V compilation. Bug: 30964317 Test: RSoV, RSTest, RSoV LIT tests on Angler Change-Id: I689758ae0977bca694341e948842b668f68caac8
/frameworks/rs/rsov/compiler/RemoveNonkernelsPass.cpp
|