Commit Graph

98 Commits

Author SHA1 Message Date
David Neto
76555bd4ba Tests: Add optional dependency on Effcee stateful matcher
Add Effcee as an optional dependency for use in tests.  In future it will
be a required dependency.

Effcee is a stateful pattern matcher that has much of the functionality
of LLVM's FileCheck, except in library form.  Effcee makes it much easier
to write tests for optimization passes.

Demonstrate its use in a test for the strength-reduction pass.

Update README.md with example commands of how to get sources.

Update Appveyor and Travis-CI build rules.

Also: Include test libraries if not SPIRV_SKIP_TESTS
- SPIRV_SKIP_TESTS is implied by SPIRV_SKIP_EXECUTABLES
2017-11-13 11:34:21 -05:00
David Neto
1affe5a3ee Describe public_spirv_tools_dev@khronos.org mailing list 2017-11-06 11:07:46 -05:00
Pierre Moreau
86627f7b3f Implement Linker (module combiner)
Add extra iterators for ir::Module's sections
Add extra getters to ir::Function
Add a const version of BasicBlock::GetLabelInst()

Use the max of all inputs' version as version

Split debug in debug1 and debug2
- Debug1 instructions have to be placed before debug2 instructions.

Error out if different addressing or memory models are found

Exit early if no binaries were given

Error out if entry points are redeclared

Implement copy ctors for Function and BasicBlock
- Visual Studio ends up generating copy constructors that call deleted
  functions while compiling the linker code, while GCC and clang do not.
  So explicitly write those functions to avoid Visual Studio messing up.

Move removing duplicate capabilities to its own pass

Add functions running on all IDs present in an instruction

Remove duplicate SpvOpExtInstImport

Give default options value for link functions

Remove linkage capability if not making a library

Check types before allowing to link

Detect if two types/variables/functions have different decorations

Remove decorations of imported variables/functions and their types

Add a DecorationManager

Add a method for removing all decorations of id

Add methods for removing operands from instructions

Error out if one of the modules has a non-zero schema

Update README.md to talk about the linker

Do not freak out if an imported built-in variable has no export
2017-10-06 18:33:53 -04:00
Andrey Tuganov
c25b5bea35 Add SPIRV_SPIRV_COMPRESSION option to cmake
The option is off by default.
cmake -DSPIRV_BUILD_COMPRESSION=ON ..
enables the compression lib, executable, and test build.

Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/834
2017-09-25 14:37:08 -04:00
David Neto
d16403afb2 Create v2017.0
Update README to describe that we understand SPIR-V syntax based on the
grammar files included from the SPIRV-Headers repo.

(Also, it's high time we issue a v2017 release!
2017-09-01 16:26:09 -04:00
GregF
cdeb669541 README: Add reference to SPIR-V size reduction white paper 2017-08-25 15:11:24 -04:00
Lei Zhang
768d9b42d3 Support supplying extra definitions via CMAKE variable 2017-08-16 17:38:48 -04:00
GregF
0bd8300fc2 Update README.md with new code-reduction passes 2017-08-04 17:47:41 -04:00
Greg Fischer
04fcc66743 Add exhaustive function call inlining to spirv-opt
Inlining is done for all functions designated as entry points.

Add optional validation to test fixture method SinglePassRunAndCheck.
2017-03-29 18:02:40 -04:00
Kenneth Benzie (Benie)
f980d8c671 Add vim-spirv plugin description to the README
Fixes #359
2017-02-01 21:43:01 +00:00
David Neto
ab03b879ca Encourage use of the validator 2017-01-29 22:53:50 -05:00
David Neto
f8cc397573 Generate spvasm.vim
Generate a vim syntax file for SPIR-V assembly.
Copy the resulting spvasm.vim into your $HOME/.vim/syntax directory
to get syntax highlighting in Vim.

Also, suggest that the grammar file include information
about what opcodes can be used in OpSpecConstantOp.
2016-12-20 11:36:41 -05:00
David Neto
945e9fc4b4 Document the use of the GitHub Project feature 2016-12-08 18:22:26 -05:00
David Neto
5f2d40915e Say how the validator checks universal limits
Indicate it's future work to allow parameterization of those
limits.
2016-11-30 15:48:39 -05:00
Lei Zhang
689df65966 Add examples to demo C++ library APIs. 2016-09-28 15:24:00 -04:00
Lei Zhang
620f05e679 Publish the C++ interface. 2016-09-21 14:41:47 -04:00
steve-lunarg
6accefc3a4 add spirv-dis/spirv-as support for emacs when loading .spv binaries 2016-09-11 09:55:15 -06:00
Lei Zhang
ef600df16e Prefix test binaries with test_, rename UnitSPIRV, update README. 2016-09-07 17:26:18 -04:00
Lei Zhang
53c84333f0 Update README about the optimization library and tool. 2016-09-07 11:11:56 -04:00
David Neto
dcd7fed5af Say contributors have to click through the CLA 2016-09-07 11:04:56 -04:00
David Neto
9fc8658ef3 Relicense SPIRV-Tools under Apache 2.0
Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/383

Finalize v2016.4
2016-09-02 10:00:29 -04:00
David Neto
a7a84bd50d Finalize v2016.3 2016-08-24 11:17:07 -04:00
David Neto
3c35b6321e Add spirv-lesspipe.sh
Idea suggested by @steve-lunarg in issue 359.
2016-08-24 10:39:04 -04:00
David Neto
996a814ae3 Add spirv-cfg to dump a GraphViz graph of the CFG
This is experimental, and has not tests.
It's been used to debug validation of structured control flow.

- Has a legend describing special arcs to merge blocks and continue
  targets.
- Labels the function entry block, with the Id of the function.
2016-08-11 11:24:51 -04:00
David Neto
75c6db0746 Fix paths in the README. 2016-08-10 12:18:22 -04:00
Lei Zhang
1e7c5cbe90 Finalize v2016.1. 2016-07-19 16:50:34 -04:00
Lei Zhang
cbdba0323c Mention the steps to pull dependencies when building in README. 2016-07-07 15:07:31 -04:00
David Neto
84058939b0 Finalize v2016.0 2016-07-04 16:02:52 -04:00
Lei Zhang
18a263e763 Appveyor: Pull SPIRV-Headers for building and update README link. 2016-06-22 12:12:44 -04:00
Lei Zhang
10dba91781 Use SPIR-V headers from the KhronosGroup/SPIRV-Headers repo. 2016-06-10 08:48:37 -04:00
Lei Zhang
c7551e1f07 Add Appveyor configuration for Windows build. 2016-05-17 09:48:48 -04:00
David Neto
9166854ac9 Add CHANGES file with high level software history
Add a high level version number for SPIRV-Tools, beginning
with v2016.0-dev.  The README describes the format of the
version number.

The high level version number is extracted from the CHANGES
file.  That works around:
 - stale-bait for when we don't add tags to the repository
 - our inability to add tags to the repository

Option --version causes spirv-as, spirv-dis, and spirv-val to
show the high level version number.

Add spvSoftwareVersionString to return the C-string for
the high level version number.

Add spvSoftwareVersionDetailsString() so that clients can get
more information if they want to.
Also allows us to clean up the uses in the tool executables files,
so now only one file includes build-version.inc.

Move the update-build-version logic to the only
CMakeLists file that needs it.

The update build version script takes a new argument
to name the output file.
2016-04-22 15:19:45 -04:00
Dejan Mircevski
2d975d54ae Mention 1.1 support in the README. 2016-04-20 12:58:59 -04:00
Lei Zhang
29ca6f9894 Use footnotes for links in README.md. 2016-04-14 14:13:28 -04:00
Lei Zhang
bd354d442a Document SPIR-V binary and assembly file naming convention. 2016-02-18 16:35:24 -05:00
David Neto
e4853e8508 Fix the source organization section in README.md
It now reflects the new header file organization.
It also tells API clients what to add to the search
include path.
2016-02-17 22:30:50 -05:00
David Neto
4d2f2239bf SPIR-V Tools fully supports SPIR-V 1.0 Rev3
- Update version numbers in libspirv.h.
  Add a test for the relevant macros.
- Update the README
2016-02-17 16:01:39 -05:00
David Neto
31c0870367 Configure gmock locally only if not already configured.
Allows an enclosing project to have already configured gmock, even
if the developer has placed the googletest sources under this
project's external/googletest directory.

Describe how to enable the tests in the two essential scenarios:
where SPIR-V Tools is standalone, or where SPIR-V Tools is configured
as a part of a larger project.
2016-02-16 11:52:15 -05:00
Dejan Mircevski
6428933408 Enable ctest. 2016-02-02 16:05:11 -05:00
Lei Zhang
866b6ab9da Add configuration for Travis CI. 2016-01-14 16:38:04 -05:00
Andrew Woloszyn
43401d2ed0 Support 16-bit float in assembler and disassembler
This adds half-precision constants to spirv-tools.
16-bit floats are always disassembled into hex-float format,
but can be assembled from floating point or hex-float inputs.
2016-01-08 10:48:39 -05:00
Dejan Mircevski
b6fe02fc39 Extend copyright to 2016. 2016-01-07 13:44:22 -05:00
David Neto
411de16386 Fix setting of off-by-default cmake options
An enclosing CMake project should be able to set the
off-by-default CMake options in SPIRV-Tools by just doing:
  set(SPIRV_SKIP_EXECUTABLES ON)
instead of
  set(SPIRV_SKIP_EXECUTABLES ON CACHE BOOL "" FORCE)

Also, fix the SPIRV_WARN_EVERYTHING so it understands which options
to send to Clang vs. GCC.

Note: With SPIRV_WARN_EVERYTHING enabled, the code doesn't
compil with either Clang or GCC.
2015-12-10 10:33:51 -05:00
David Neto
292acb5b41 Don't add -frtti for tests. Use newer googletest.
Using -frtti caused link failures when both of the following are
in effect:
	-DDISABLE_EXCEPTIONS=ON
	-DDISABLE_RTTI=ON

The correct fix is to use tip-of-tree googletest.
Specifically, we need a version of googletest with the fix in
https://github.com/google/googletest/pull/612
In particular, it must be later than googletest 1.7.0.
2015-12-01 12:19:09 -05:00
Lei Zhang
9e53117061 Fix paths for binaries to match changes in CMake configuration. 2015-11-20 09:44:13 -05:00
Andrew Woloszyn
3a4bc7e61a Turned warnings-as-errors on by default.
Fixed a few warnings that appear in builds on VS2013 and VS2015.
2015-11-19 09:46:59 -05:00
David Neto
287cfc1dd7 Fix grammar: "The SPIR-V Tools project provides" 2015-11-14 08:24:59 -06:00
David Neto
56fb3f016b Revamp the README for public release.
Reorganize the README, and update its contents to more accurately
reflect the public release.
Remove the incremental "Changes" section.

Rename readme.md to README.md
Rename license.txt to LICENSE

Update the assembler tool to support -h, and make its help look
more consistent with the disassembler.

Change the target and library name to SPIRV-Tools.  To better
match the GitHub repo name.  Also, it's not SHOUTING.
2015-11-13 12:35:39 -06:00