Commit Graph

88 Commits

Author SHA1 Message Date
David Neto
736103404e Start v2017.3-dev 2017-12-15 18:24:41 -05:00
David Neto
1ccfb5803a Finalize v2017.2 2017-12-15 18:23:49 -05:00
Stephen McGroarty
8ba68fa9b9 Dominator Tree Analysis (#3)
Support for dominator and post dominator analysis on ir::Functions. This patch contains a DominatorTree class for building the tree and DominatorAnalysis and DominatorAnalysisPass classes for interfacing and caching the built trees.
2017-12-05 22:59:43 -05:00
Andrey Tuganov
c170afd93b Relaxed OpImageWrite texel type check 2017-11-24 14:31:08 -05:00
David Neto
e1a6f8d1c3 Update CHANGES to mention fixes for 1007 and 1009 2017-11-24 10:17:13 -05:00
Alan Baker
0cae89e79e Notify the context of instructions that are being erased.
Fixes use-after-free error in RemoveDuplicatesPass

Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/1004
2017-11-23 23:43:25 -05:00
David Neto
b0a7037886 Start v2017.2-dev 2017-11-23 18:16:41 -05:00
David Neto
493c0883af Finalize 2017.1
Updated CHANGES to cover main updates since 2017.0
2017-11-23 18:16:04 -05:00
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
David Neto
6eaaf7b5f2 Update CHANGES to reflect fix for #827 2017-09-27 10:03:20 -04:00
Andrey Tuganov
64d5e5214f Add bitwise operations validator pass
The pass checks correctness of operand types of all bitwise instructions
(opcode range from SpvOpShiftRightLogical to SpvOpBitCount).
2017-09-26 14:22:37 -04:00
David Neto
d84df94608 Update CHANGES with recent news 2017-09-26 11:30:57 -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
a91cecfefc Recognize SPV_AMD_shader_fragment_mask 2017-09-14 10:37:18 -04:00
David Neto
4442102247 Update CHANGES for OpModuleProcessed validation rule 2017-09-08 09:16:15 -04:00
David Neto
40e9c60ffe spirv-as: Fail for unrecognized long option
Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/798
2017-09-05 19:49:59 -04:00
David Neto
25ddfec08e Inliner: Fix LoopMerge when inline into loop header of multi block loop
This adapts the fix for the single-block loop.  Split the loop like
before.  But when we move the OpLoopMerge back to the loop header,
redirect the continue target only when the original loop was a single
block loop.

Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/800
2017-09-05 19:46:24 -04:00
Andrey Tuganov
82df4bbd68 Add validation pass for arithmetic operations
The pass checks if arithmetic operations (such as OpFMul) receive
correct operands.
2017-09-05 12:21:53 -04:00
David Neto
7e2d26c77b Starge v2017.1-dev 2017-09-01 16:28:22 -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
David Neto
a0977e8632 Finalize v2016.7 2017-09-01 16:14:25 -04:00
David Neto
f241374301 Update CHANGES for recent inliner fixes 2017-09-01 16:13:12 -04:00
David Neto
d843cae48b Update CHANGES for fix to 781 2017-09-01 10:15:42 -04:00
David Neto
fc60d1e758 Update CHANGES for fix to 776 2017-08-30 14:25:23 -04:00
David Neto
9090da5fac Update changes for fix to issue 782 2017-08-29 23:22:07 -04:00
David Neto
720869bb52 Update CHANGE to list fix for issue 755 2017-08-10 13:13:33 -04:00
David Neto
95a600cd8d Update CHANGES with common uniform loads pass 2017-08-04 17:48:22 -04:00
David Neto
15612fe028 Update CHANGES with recently added optimizations 2017-08-02 13:21:16 -04:00
David Neto
35a0695844 Include memory and semantics IDs when iterating over inbound IDs
Fixes Instruction::ForEachInId so it covers
SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID and SPV_OPERAND_TYPE_SCOPE_ID.
Future proof a bit by using the common spvIsIdType routine.

Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/697
2017-07-05 10:36:57 -04:00
David Neto
826d968a63 Update CHANGES to say we use GNUIntallDirs 2017-07-04 12:28:11 -04:00
David Neto
0b0454c42c Update CHANGES
- Describe support for AMD extensions
- Describe recently added optimizer passes
2017-06-22 10:22:55 -04:00
David Neto
dbc2049aa3 Add SPIR-V 1.2 support, for OpenCL 2.2 2017-05-15 17:10:07 -04:00
David Neto
51b6778379 Update CHANGES: note fix of issue 629 2017-05-12 17:35:18 -04:00
David Neto
1d8efb02ed Update CHANGES with recent news 2017-04-20 15:54:10 -04:00
David Neto
11a867f412 Add FlattenDecoration transform
Add --flatten-decorations to spirv-opt

Flattens decoration groups.  That is, replace OpDecorationGroup
and its uses in OpGroupDecorate and OpGroupMemberDecorate with
ordinary OpDecorate and OpMemberDecorate instructions.

Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/602
2017-04-06 11:19:56 -04:00
David Neto
afc60bbebf Fix optimizer on when to write the binary
The spvtools::Optimizer::Run method should also write the output binary
if optimization succeeds without changes but the output binary vector
does not have exactly the same contents as the input binary.
We have to check both the base pointer of the storage and the size of
the vector

Added a test for this too.

Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/611
2017-04-03 15:48:50 -04:00
David Neto
6cd4517730 Mention inliner in CHANGES 2017-03-29 18:02:40 -04:00
Ehsan Nasiri
da4ae05638 Add command line options struct for the validator
The limit for the number of struct members is parameterized using
command line options.

Add --max-struct-depth command line option.
Add --max-switch-branches command line option.
Add --max-function-args command line option.
Add --max-control-flow-nesting-depth option.
Add --max-access-chain-indexes option.
2017-02-28 12:00:06 -05:00
David Neto
e3632a26b4 Update CHANGES for SPV_KHR_16bit_storage validator 2017-02-28 11:53:05 -05:00
Adam Van Ymeren
c0949703b1 Fixes issue #548
Add validation checks for the reserved OpImageSparseSampleProj* opcodes.
2017-02-16 16:32:33 -05:00
David Neto
dadd5161bb Check strict domination of merge block
If a merge block is reachable, then it must be *strictly* dominated
by its header.  Until now we've allowed the header and the merge
block to be the same.

Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/551

Also: Use dominates and postdominates methods on BasicBlock to
improve readability.
2017-02-10 12:26:10 -05:00
David Neto
699943d297 Say why we allow override of build timestamp
It's for reproducible builds.

Also, fix Python formatting.
2017-01-17 15:42:02 -05:00
Ehsan Nasiri
109ce225c9 Fixes bug #517.
entry_block_to_construct_ maps an entry block to its construct. The key
in this map (the entry block) is not unique, and therefore the entry for
the continue construct gets overwritten when the selection construct is
discovered.

Since a given block may be the entry block of different types of
constructs, the (basic_block, construct_type) pair should be able to
uniquely identify the construct.

Adds test:
- In this test, a basic block is the entry block of a continue construct
  as well as the entry block of a selection construct.
  It can be shown that this unit test would crash without the fix in this
  PR and passes with the fix in this PR.
2017-01-06 14:23:17 -05:00
David Neto
37422e9dba Support building under CYGWIN
- Parse CHANGES file with Universal Python line endings in case
  the source tree was checked out with Windows line endings.
- Use our own clone of strnlen_s which might not be available
  everywhere.

Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/508
2016-12-21 10:34:23 -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
68c5f0436f Start v2016.7-dev 2016-12-13 11:49:50 -05:00
David Neto
5f5fa3a3f1 Finalize v2016.6 2016-12-13 11:49:09 -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
David Neto
ee6c877b53 Test SPV_KHR_shader_draw_parameters support
In assembler, disassembler, parser.
2016-10-12 10:47:28 -04:00