Commit Graph

70 Commits

Author SHA1 Message Date
dan sinclair
324be76b9c Fixup BUILD.gn file (#1886) 2018-09-11 09:34:42 -04:00
Corentin Wallez
21bcb9d8b9 BUILD.gn: Make a better interface with dependents. (#1877)
This splits the spvtools_config into a public and private part to avoid
leaking internal bits to dependents. A new target is added for the
public headers so that "gn check" works for dependents.

Also formats test/fuzzers/BUILD.gn
2018-09-06 10:50:27 -04:00
dan sinclair
b27d084b01
Revert "BUILD.gn: Make a better interface with dependents. (#1875)" (#1876)
This reverts commit 3cddf9131d.

This breaks the Chrome roll:

ERROR Unresolved dependencies.
//third_party/SPIRV-Tools/src/test/fuzzers:fuzzer_config(//build/toolchain/linux:clang_x64)
needs //third_party/SPIRV-Tools/src:spvtools_config(//build/toolchain/linux:clang_x64)
GN gen failed: 1
2018-09-05 14:21:01 -04:00
Corentin Wallez
3cddf9131d BUILD.gn: Make a better interface with dependents. (#1875)
This splits the spvtools_config into a public and private part to avoid
leaking internal bits to dependents. A new target is added for the
public headers so that "gn check" works for dependents.
2018-09-05 13:37:12 -04:00
Alan Baker
c5b38062ec Moving constant opcode validation into a new file
* Split constant opcode validation out of idUsage and into
validate_constants.cpp
 * minor style fixes
 * reduced duplication
 * fixed an issue with array sizing
2018-08-21 17:30:26 -04:00
dan sinclair
1bdade77ea
Add GN rules to build spriv-as (#1842) 2018-08-15 15:26:28 -04:00
dan sinclair
ef678672fb
Remove source/message.h (#1838)
The code in source/message was only used in a single set of tests to
format the output results. This CL changes the test to verify the
message instead of all the error values and removes the source/message
code.
2018-08-14 15:41:21 -04:00
dan sinclair
1553025f4c
Move make_unique to source/util. (#1836)
This MakeUnique code is used in places other then source/opt so move it
to source/utils.
2018-08-14 12:44:54 -04:00
dan sinclair
5fc011b453
Move bit_stream, move_to_front and huffman_codec. (#1833)
bit_stream, move_to_front and huffman_codec are only used by
source/tools. Move into that directory to make the usage clearer.
2018-08-14 09:52:05 -04:00
Alan Baker
e7fdcdba75 Split function opcode validation into new files.
* Moved function opcode validation out of idUsage and into new files
 * minor style changes
 * General opcode checking is in validate_function.cpp
 * Execution limitation checking is in
 validate_execution_limitations.cpp
* Execution limitations was split into a new pass as it requires other
validation to register those limitations first.
2018-08-13 17:04:57 -04:00
Alan Baker
714bf84e58 Split mode setting opcode validation into new file.
* Moved mode setting opcode validation out of idUsage and into a new
pass
 * minor style updates
2018-08-08 15:45:53 -04:00
Alan Baker
7d4b0464a3 Split annotation opcode validation into new file.
* Moves annotation opcode checks from idUsage into a new pass
 * minor style updates
2018-08-08 15:43:11 -04:00
Alan Baker
ca7278cff7 Split debug opcode validation into new file
* Removes debug opcode validation from idUsage and puts it in a separate
file
 * minor updates
2018-08-08 13:47:09 -04:00
Alan Baker
f2a990022a Move type instruction validation into separate file
* Moved type instruction validation out of validation idUsage into a new
file
* Consolidate type unique pass into new file
* Removed one bad test
* Reworked validation ordering
2018-08-08 12:55:39 -04:00
dan sinclair
eda2cfbe12
Cleanup includes. (#1795)
This Cl cleans up the include paths to be relative to the top level
directory. Various include-what-you-use fixes have been added.
2018-08-03 15:06:09 -04:00
Corentin Wallez
2d9a325264 Refactor BUILD.gn so can easily be embedded in other projects
1.
BUILD.gn: Don't use the extra Chromium clang warnings

Also removes the unused .gn secondary_sources.

2.

Move fuzzers in test/ instead of testing/

This frees up testing/ to be the git subtree of Chromium's src/testing/
that contains test.gni, gtest, gmock and libfuzzer

3.

DEPS: get the whole testing/ subtree of Chromium

4.

BUILD.gn: Simplify the standalone gtest targets

These targets definitions are inspired from ANGLE's and add a variable
that is the path of the googletest directory so that it can be made
overridable in future commits.

6.

BUILD.gn: Add overridable variables for deps dirs

This avoids hardcoded paths to dependencies that make it hard to
integrate SPIRV-Tools in other GN projects.
2018-08-03 10:06:11 -04:00
dan sinclair
de9496e9f1
Add more fuzzers for Optimizer. (#1788)
This Cl adds the legalization and size fuzzers for the optimizer. The
main optimizer is renamed to the performance optimizer.
2018-08-02 14:36:43 -04:00
Alan Baker
d49bedcaa6 Move memory class instructions to new pass
* Refactored the Memory class of instructions in the spec out Id
validation and into a new pass
 * Tests unmodified
 * some minor disassembly changes
 * minor style changes
2018-08-01 16:10:11 -04:00
dan sinclair
a97c1d911a
Fixup BUILD.gn to use a group for SPIRV-Tools (#1779)
The SPIRV-Tools target doesn't build anything, it just depends on the other libraries. As such, there is no static_library generated and this should be a group() instead.
2018-08-01 14:28:10 -04:00
Dan Sinclair
a114e1f30c Add support for Chromium GN build
Build test

Add Fuzzer group

Add libfuzzer
2018-07-24 11:31:14 -04:00