platform/upstream/SPIRV-Tools.git
8 years agoPull out the number parsing logic
qining [Thu, 1 Sep 2016 18:27:04 +0000 (14:27 -0400)]
Pull out the number parsing logic

Pull out the number parsing logic from
AssemblyContext::binaryEncodeNumericLiteral() to utilities.

The new utility function: `ParseAndEncodeNumber()` now accepts:
  * number text to parse
  * number type
  * a emit function, which is a function which will be called with each
    parsed uint32 word.
  * a pointer to std::string to be overwritten with error messages.
    (pass nullptr if expect no error message)
and returns:
  * an enum result type to indicate the status

Type/Structs moved to utility:
  * template<typename T> class ClampToZeroIfUnsignedType

New type:
* enum EncodeNumberStatus: success or error code
* NumberType: hold the number type information for the number to be parsed.
 * several helper functions are also added for NumberType.

Functions moved to utility:
  * Helpers:
    * template<typename T> checkRangeAndIfHexThenSignExtend() -> CheckRangeAndIfHex....()
  * Interfaces:
    * template<typename T> parseNumber() -> ParseNumber()
    * binaryEncodeIntegerLiteral() -> ParseAndEncodeIntegerNumber()
    * binaryEncodeFloatingPointLiteral() -> ParseAndEncodeFloatingPointNumber()
    * binaryEncodeNumericLiteral() -> ParseAndEncodeNumber()

Tests added/moved to test/ParseNumber.cpp, including tests for:
* ParseNumber(): This is moved from TextToBinary.cpp to ParseNumber.cpp
* ParseAndEncodeIntegerNumber(): New added
* ParseAndEncodeFloatingPointNumber(): New added
* ParseAndEncodeNumber(): New added

Note that the error messages are kept almost the same as before, but
they may be inappropriate for an utility function. Those will be fixed
in another CL.

8 years agoMerge diagnostic tests and single them out in a separate binary.
Lei Zhang [Thu, 8 Sep 2016 21:26:53 +0000 (17:26 -0400)]
Merge diagnostic tests and single them out in a separate binary.

8 years agoCreate separate binaries for validation tests.
Lei Zhang [Wed, 7 Sep 2016 21:43:15 +0000 (17:43 -0400)]
Create separate binaries for validation tests.

8 years agoPrefix test binaries with `test_`, rename UnitSPIRV, update README.
Lei Zhang [Wed, 7 Sep 2016 21:26:18 +0000 (17:26 -0400)]
Prefix test binaries with `test_`, rename UnitSPIRV, update README.

8 years agoTravis CI: mark build as finished once a job failed.
Lei Zhang [Mon, 5 Sep 2016 20:17:33 +0000 (16:17 -0400)]
Travis CI: mark build as finished once a job failed.

8 years agoKill the spvCheck macro which is just alias to if-statement.
Lei Zhang [Mon, 5 Sep 2016 21:11:44 +0000 (17:11 -0400)]
Kill the spvCheck macro which is just alias to if-statement.

8 years agoUpdate README about the optimization library and tool.
Lei Zhang [Fri, 2 Sep 2016 14:15:47 +0000 (10:15 -0400)]
Update README about the optimization library and tool.

8 years agoSay contributors have to click through the CLA
David Neto [Fri, 2 Sep 2016 14:29:14 +0000 (10:29 -0400)]
Say contributors have to click through the CLA

8 years agoAdd test for presence of copyrights and license terms
David Neto [Fri, 2 Sep 2016 13:29:52 +0000 (09:29 -0400)]
Add test for presence of copyrights and license terms

8 years agoStart v2016.5-dev
David Neto [Thu, 1 Sep 2016 19:38:53 +0000 (15:38 -0400)]
Start v2016.5-dev

8 years agoRelicense SPIRV-Tools under Apache 2.0
David Neto [Thu, 1 Sep 2016 19:33:59 +0000 (15:33 -0400)]
Relicense SPIRV-Tools under Apache 2.0

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

Finalize v2016.4

8 years agoAdd check_copyright to check or update copyright.
David Neto [Thu, 1 Sep 2016 18:49:14 +0000 (14:49 -0400)]
Add check_copyright to check or update copyright.

It will also replace an MIT or Khronos free use license with
the Apache license notice.

8 years agoFix Google copyright lines
David Neto [Thu, 1 Sep 2016 17:04:00 +0000 (13:04 -0400)]
Fix Google copyright lines

8 years agoKill the spvCheckReturn macro.
Lei Zhang [Fri, 2 Sep 2016 13:51:44 +0000 (09:51 -0400)]
Kill the spvCheckReturn macro.

8 years agoKill diagnostic_helper & the wrapping DIAGNOSTIC macro.
Lei Zhang [Fri, 2 Sep 2016 13:49:56 +0000 (09:49 -0400)]
Kill diagnostic_helper & the wrapping DIAGNOSTIC macro.

8 years agoTests for preserving line debug insts even killing its affecting targets.
Lei Zhang [Wed, 31 Aug 2016 23:37:13 +0000 (19:37 -0400)]
Tests for preserving line debug insts even killing its affecting targets.

8 years agoUnify constants pass
qining [Wed, 17 Aug 2016 21:19:48 +0000 (17:19 -0400)]
Unify constants pass

De-duplicate constants and unifies the uses of constants for a SPIR-V
module. If two constants are defined exactly the same, only one of them
will be kept and all the uses of the removed constant will be redirected
to the kept one.

This pass handles normal constants (defined with
OpConstant{|True|False|Composite}), some spec constants (those defined
with OpSpecConstant{Op|Composite}) and null constants (defined with
OpConstantNull).

There are several cases not handled by this pass:

  1) If there are decorations for the result id of a constant defining
  instruction, that instruction will not be processed. This means the
  instruction won't be used to replace other instructions and other
  instructions won't be used to replace it either.

  2) This pass does not unify null constants (defined with
  OpConstantNull instruction) with their equivalent zero-valued normal
  constants (defined with OpConstant{|False|Composite} with zero as the
  operand values or component values).

8 years agoRefactor CapabilitySet into templated class EnumSet
David Neto [Wed, 31 Aug 2016 18:35:58 +0000 (14:35 -0400)]
Refactor CapabilitySet into templated class EnumSet

8 years agoAdd forwarding so that passes' ctor can have args.
qining [Wed, 31 Aug 2016 16:44:49 +0000 (12:44 -0400)]
Add forwarding so that passes' ctor can have args.

Also removed the default argument value of `skip_nop` for function
`SinglePassRunAndCheck()` and `SinglePassRunAndDisassemble()`. This is
required to support variadic arguments.

8 years agoHandle capabilities larger than value 63
David Neto [Mon, 29 Aug 2016 18:49:00 +0000 (14:49 -0400)]
Handle capabilities larger than value 63

Use libspirv::CapabilitySet instead of a 64-bit mask.

Remove dead function spvOpcodeRequiresCapability and its tests.

The JSON grammar parser is simplified since it just writes the
list of capabilities as a braced list, and takes advantage of
the CapabilitySet intializer-list constructor.

8 years agoAdd libspirv::CapabilitySet
David Neto [Sat, 27 Aug 2016 18:49:53 +0000 (14:49 -0400)]
Add libspirv::CapabilitySet

It's optimized for the common case, where capabilities have value
at most 63.

8 years agoGet annotation instructions of a given id.
qining [Mon, 29 Aug 2016 22:05:24 +0000 (18:05 -0400)]
Get annotation instructions of a given id.

8 years agoAdd AppendNames() interface for AssemblyBuilder
qining [Mon, 29 Aug 2016 20:09:40 +0000 (16:09 -0400)]
Add AppendNames() interface for AssemblyBuilder

8 years agoCreate a separate header and source file for each pass.
Lei Zhang [Mon, 29 Aug 2016 19:46:09 +0000 (15:46 -0400)]
Create a separate header and source file for each pass.

8 years agoFold spec constants to normal constants (values fixed)
qining [Thu, 4 Aug 2016 17:24:08 +0000 (13:24 -0400)]
Fold spec constants to normal constants (values fixed)

For the spec constants defined by OpSpecConstantOp and
OpSpecContantComposite, if all of their operands are constants with
determined values (normal constants whose values are fixed), calculate
the correct values of the spec constants and re-define them as normal
constants.

In short, this pass replaces all the spec constants defined by
OpSpecContantOp and OpSpecConstantComposite with normal constants when
possible. So far not all valid operations of OpSpecConstantOp are
supported, we have several constriction here:

1) Only 32-bit integer and boolean (both scalar and vector) are
supported for any arithmetic operations. Integers in other width (like
64-bit) are not supported.
2) OpSConvert, OpFConvert, OpQuantizeToF16, and all the
operations under Kernel capability, are not supported.
3) OpCompositeInsert is not supported.

Note that this pass does not unify normal constants. This means it is
possible to have new generatd constants defining the same values.

8 years agoPass manager recomputes Id bound automatically.
David Neto [Thu, 25 Aug 2016 22:36:03 +0000 (18:36 -0400)]
Pass manager recomputes Id bound automatically.

Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/371
in the sense that the id bound is correct after all the passes
have been run.  But it might be inconsistent between passes.

8 years agoCreate const overloads for begin() and end() in Instruction.
Lei Zhang [Fri, 26 Aug 2016 20:52:16 +0000 (16:52 -0400)]
Create const overloads for begin() and end() in Instruction.

8 years agoFix typo in spirv-opt help
David Neto [Fri, 26 Aug 2016 20:25:40 +0000 (16:25 -0400)]
Fix typo in spirv-opt help

8 years agoAdd Module::ComputeIdBound
David Neto [Tue, 23 Aug 2016 15:41:28 +0000 (11:41 -0400)]
Add Module::ComputeIdBound

When IDs change, something should use this utility method
and Module::SetIdBound before writing out the binary.

8 years agoAdd tests for decoration_empty().
Lei Zhang [Fri, 26 Aug 2016 18:02:40 +0000 (14:02 -0400)]
Add tests for decoration_empty().

8 years agoAdd a method in the types to check whether there is no decoration on a
qining [Fri, 26 Aug 2016 15:54:36 +0000 (11:54 -0400)]
Add a method in the types to check whether there is no decoration on a
type.

8 years agoTest ir::Instruction::GetOperand and GetInOperand
David Neto [Fri, 26 Aug 2016 14:33:41 +0000 (10:33 -0400)]
Test ir::Instruction::GetOperand and GetInOperand

8 years agoIrLoader gracefully handles incomplete blocks and functions
David Neto [Thu, 25 Aug 2016 20:42:36 +0000 (16:42 -0400)]
IrLoader gracefully handles incomplete blocks and functions

This lets us write smaller test cases with the IrLoader, avoiding
boilerplate for function begin/end, and basic block begin/end.

Also ForEachInst is more forgiving of cases where a basic block
doesn't have a label, and when a function doesn't have a defining
or end instruction.

8 years agoAdd Instruction begin and end mutable iterators
David Neto [Thu, 25 Aug 2016 21:45:08 +0000 (17:45 -0400)]
Add Instruction begin and end mutable iterators

Refactored the instuction test.

8 years agoAdd Instruction cbegin and cend to access operands
David Neto [Thu, 25 Aug 2016 16:55:44 +0000 (12:55 -0400)]
Add Instruction cbegin and cend to access operands

8 years agoForEachInst optionally runs on attached debug line insts
David Neto [Sat, 20 Aug 2016 13:47:00 +0000 (09:47 -0400)]
ForEachInst optionally runs on attached debug line insts

Also:
- Add const forms of ForEachInst
- Rewrite Module::ToBinary in terms of ForEachInst
- Add Instruction::ToBinaryWithoutAttachedDebugInsts
- Delete the ToBinary method on Function, BasicBlock, and Instruction
  since it can now be implemented with ForEachInst in a less confusing
  way, e.g. without recursion.
- Preserve debug line instructions on OpFunctionEnd (and store that
  instruction as a unique-pointer, for regularity).

8 years agoTravis CI: add build configuration for Android NDK with cmake.
Lei Zhang [Wed, 17 Aug 2016 14:34:53 +0000 (10:34 -0400)]
Travis CI: add build configuration for Android NDK with cmake.

8 years agoStart v2016.4-dev
David Neto [Wed, 24 Aug 2016 15:18:16 +0000 (11:18 -0400)]
Start v2016.4-dev

8 years agoFinalize v2016.3
David Neto [Wed, 24 Aug 2016 15:17:07 +0000 (11:17 -0400)]
Finalize v2016.3

8 years agoAdd spirv-lesspipe.sh
David Neto [Mon, 22 Aug 2016 15:38:18 +0000 (11:38 -0400)]
Add spirv-lesspipe.sh

Idea suggested by @steve-lunarg in issue 359.

8 years agoMere mention of PointSize BuiltIn does not require Shader capability
David Neto [Wed, 24 Aug 2016 13:47:49 +0000 (09:47 -0400)]
Mere mention of PointSize BuiltIn does not require Shader capability

Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/365 which
was reopened for this.

8 years agoAdd a home brewed make_unique to ease creating unique_ptrs.
Lei Zhang [Fri, 19 Aug 2016 03:16:21 +0000 (23:16 -0400)]
Add a home brewed make_unique to ease creating unique_ptrs.

8 years agoRemove some unused macros and functions.
Lei Zhang [Sat, 20 Aug 2016 15:12:57 +0000 (11:12 -0400)]
Remove some unused macros and functions.

8 years agoCHANGES captures fix for issue 365
David Neto [Tue, 23 Aug 2016 22:44:26 +0000 (18:44 -0400)]
CHANGES captures fix for issue 365

8 years agoRelax ClipDistance, CullDistance capability check in all environments
David Neto [Tue, 23 Aug 2016 22:18:17 +0000 (18:18 -0400)]
Relax ClipDistance, CullDistance capability check in all environments

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

8 years agoAdd opt::ir::Module::SetIdBound
David Neto [Sat, 20 Aug 2016 09:51:15 +0000 (05:51 -0400)]
Add opt::ir::Module::SetIdBound

8 years agoGet the number of elements for Vector and Matrix type
qining [Tue, 23 Aug 2016 15:34:24 +0000 (11:34 -0400)]
Get the number of elements for Vector and Matrix type

8 years agoRefine the DefUseManager
qining [Tue, 16 Aug 2016 17:06:03 +0000 (13:06 -0400)]
Refine the DefUseManager

* Fix the behavior when analyzing an individual instruction:
  * exisiting instruction:
      Clear the original records and re-analyze it as a new instruction.
  * new instruction with exisiting result id:
      Clear the original records of the exisiting result id. This means
      the records of the analyzed result-id-defining instruction will be
      overwritten by the record of the new instruction with the same
      result id.
  * new instruction with new result id or without result id:
      Just update the internal records to incorperate the new
      instruction.
* Add tests for analyzing individual instruction w/o an exisiting module.
* Refactor ClearInst() implementation
* Remove ClearDef() function.
* Fixed a bug in DefUseManager::ReplaceAllUsesWith() that OpName
  instruction may trigger the assertion incorrectly.
* update the blurbs for EraseUseRecordsOfOperandIds()

8 years agoGet the width from integer and float type
qining [Wed, 17 Aug 2016 20:44:38 +0000 (16:44 -0400)]
Get the width from integer and float type

8 years agoReplace the SetOperand() with SetInOperand() and SetResultType()
qining [Tue, 16 Aug 2016 15:04:32 +0000 (11:04 -0400)]
Replace the SetOperand() with SetInOperand() and SetResultType()

8 years agoMake clear that we are using ptrdiff_t as the iterator difference type.
Lei Zhang [Tue, 16 Aug 2016 15:19:34 +0000 (11:19 -0400)]
Make clear that we are using ptrdiff_t as the iterator difference type.

And ptrdiff_t is a implementation defined signed type. Comparing it
with unsigned number literal causes compiler warnings.

8 years agoDerive iterator from std::iterator to reap standarad algorithms.
Lei Zhang [Mon, 15 Aug 2016 15:13:25 +0000 (11:13 -0400)]
Derive iterator from std::iterator to reap standarad algorithms.

By deriving from std::iterator, iterator_traits will be properly
set up for our custom iterator type, thus we can use algorithms
from STL with our custom iterators.

8 years agoMake analyses RAII-like and turn disable copy/move constructors.
Lei Zhang [Mon, 15 Aug 2016 17:41:47 +0000 (13:41 -0400)]
Make analyses RAII-like and turn disable copy/move constructors.

8 years agoAvoid integer modulo by 1, to avoid warning
David Neto [Mon, 15 Aug 2016 15:27:13 +0000 (11:27 -0400)]
Avoid integer modulo by 1, to avoid warning

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

8 years agoAvoid race on mkdir
David Neto [Fri, 12 Aug 2016 18:19:17 +0000 (14:19 -0400)]
Avoid race on mkdir

Should fix https://github.com/KhronosGroup/SPIRV-Tools/issues/340

8 years agoAllow OpUndef appearing in the type and global variable section.
Lei Zhang [Fri, 12 Aug 2016 18:59:56 +0000 (14:59 -0400)]
Allow OpUndef appearing in the type and global variable section.

Also clean up API functions for adding instructions into the
type and global values section.

8 years agoAdd another construtor for opt::ir::Instruction
qining [Fri, 12 Aug 2016 21:26:35 +0000 (17:26 -0400)]
Add another construtor for opt::ir::Instruction

8 years agoTest INotEqual for OpSpecConstantOp in asm, disasm
David Neto [Fri, 12 Aug 2016 18:47:26 +0000 (14:47 -0400)]
Test INotEqual for OpSpecConstantOp in asm, disasm

8 years agoAdd iterator getter interface for types_values_
qining [Fri, 12 Aug 2016 17:12:43 +0000 (13:12 -0400)]
Add iterator getter interface for types_values_

8 years agoOpUndef can appear in type declaration section
Umar Arshad [Fri, 12 Aug 2016 18:28:17 +0000 (14:28 -0400)]
OpUndef can appear in type declaration section

8 years agoTurn off modifying methods for const iterators.
Lei Zhang [Thu, 11 Aug 2016 23:58:42 +0000 (19:58 -0400)]
Turn off modifying methods for const iterators.

8 years agoClear old def-use record when re-analyze an ID
qining [Fri, 12 Aug 2016 14:43:26 +0000 (10:43 -0400)]
Clear old def-use record when re-analyze an ID

8 years agoAdd make_range() & make_const_range() for creating iterator ranges.
Lei Zhang [Fri, 12 Aug 2016 14:04:23 +0000 (10:04 -0400)]
Add make_range() & make_const_range() for creating iterator ranges.

8 years agoAvoid non-oneliner definition in class and add missing iterators.
Lei Zhang [Fri, 12 Aug 2016 13:13:04 +0000 (09:13 -0400)]
Avoid non-oneliner definition in class and add missing iterators.

8 years agoMove the def-use analysis for single inst to public
qining [Fri, 12 Aug 2016 14:05:58 +0000 (10:05 -0400)]
Move the def-use analysis for single inst to public

8 years agoAdd getter for pointee, element type
qining [Thu, 11 Aug 2016 23:32:43 +0000 (19:32 -0400)]
Add getter for pointee, element type

8 years agoCreate an iterator class for in-memory representation.
Lei Zhang [Wed, 10 Aug 2016 14:02:28 +0000 (10:02 -0400)]
Create an iterator class for in-memory representation.

8 years agoMake the lookup up of type id accepts const arg
qining [Thu, 11 Aug 2016 22:19:50 +0000 (18:19 -0400)]
Make the lookup up of type id accepts const arg

8 years agoReuse the iterator on Id and type lookup
David Neto [Thu, 11 Aug 2016 19:34:26 +0000 (15:34 -0400)]
Reuse the iterator on Id and type lookup

8 years agoAdd the const version of AsXXtype() interface.
qining [Thu, 11 Aug 2016 21:13:43 +0000 (17:13 -0400)]
Add the const version of AsXXtype() interface.

8 years agoAdd GetId(Type* type) API to the type manager
qining [Thu, 11 Aug 2016 19:10:09 +0000 (15:10 -0400)]
Add GetId(Type* type) API to the type manager

8 years agoAvoid double-copy of NameMapper object.
David Neto [Thu, 11 Aug 2016 16:11:36 +0000 (12:11 -0400)]
Avoid double-copy of NameMapper object.

8 years agoUse friendly names for Ids
David Neto [Wed, 10 Aug 2016 19:28:11 +0000 (15:28 -0400)]
Use friendly names for Ids

8 years agoAdd spirv-cfg to dump a GraphViz graph of the CFG
David Neto [Wed, 3 Aug 2016 15:55:14 +0000 (11:55 -0400)]
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.

8 years agoAdd back the missing msg about --eliminate-dead-const
qining [Wed, 10 Aug 2016 20:02:18 +0000 (16:02 -0400)]
Add back the missing msg about --eliminate-dead-const

8 years agoFix build error about passing initializer-list to constructor.
Lei Zhang [Wed, 10 Aug 2016 20:10:14 +0000 (16:10 -0400)]
Fix build error about passing initializer-list to constructor.

VS2013 is not happy with using initializer-list to initialize
vector parameters to explicit constructors taking one vector.

8 years agoMake type manager RAII-like w.r.t. the module to be analyzed.
Lei Zhang [Wed, 10 Aug 2016 16:37:19 +0000 (12:37 -0400)]
Make type manager RAII-like w.r.t. the module to be analyzed.

8 years agoOptimization: Add type manager.
Lei Zhang [Thu, 28 Jul 2016 16:15:14 +0000 (12:15 -0400)]
Optimization: Add type manager.

Type manager will construct a map of types gradually from
instructions.

8 years agoOptimization: Add type class hierarchy.
Lei Zhang [Thu, 28 Jul 2016 16:11:01 +0000 (12:11 -0400)]
Optimization: Add type class hierarchy.

8 years agoAppveyor: also test on Visual Studio 2013.
Lei Zhang [Wed, 10 Aug 2016 14:12:14 +0000 (10:12 -0400)]
Appveyor: also test on Visual Studio 2013.

8 years agoFix paths in the README.
David Neto [Tue, 9 Aug 2016 21:57:18 +0000 (17:57 -0400)]
Fix paths in the README.

8 years agoChange the interfaces of in-memory representation to use pointers.
Lei Zhang [Tue, 9 Aug 2016 23:20:35 +0000 (19:20 -0400)]
Change the interfaces of in-memory representation to use pointers.

Previously we use vectors of objects and move semantics to handle
ownership. That approach has the flaw that inserting an object into
the middle of a vector, which may trigger a vector reallocation,
can invalidate some addresses taken from instructions.

Now the in-memory representation internally uses vector of unique
pointers to handle ownership. Since objects are explicitly heap-
allocated now, pointers to them won't be invalidated by vector
resizing anymore.

8 years agoUpdate CHANGES to say issue 288 is fixed
David Neto [Wed, 10 Aug 2016 14:40:59 +0000 (10:40 -0400)]
Update CHANGES to say issue 288 is fixed

8 years agoFixed the build for MSVC.
Andrew Woloszyn [Wed, 10 Aug 2016 13:45:15 +0000 (09:45 -0400)]
Fixed the build for MSVC.

assembly_builder was missing an include for cstdint.

8 years agoManually create move the constructor/assignment for Instruction.
Lei Zhang [Tue, 9 Aug 2016 20:57:36 +0000 (16:57 -0400)]
Manually create move the constructor/assignment for Instruction.

This is because some old visual studio versions (e.g., 2013) do
not support automatically generating move constructors/assignments.

8 years agoFix compilation. My bad
David Neto [Tue, 9 Aug 2016 22:23:40 +0000 (18:23 -0400)]
Fix compilation. My bad

The API changed, and I forgot to submit this patch.

8 years agoCheck dominance of OpPhi parent and variable pairs
Umar Arshad [Sat, 6 Aug 2016 17:40:01 +0000 (13:40 -0400)]
Check dominance of OpPhi parent and variable pairs

8 years agoRemoved dead code/const_casts/lists
Umar Arshad [Tue, 9 Aug 2016 18:05:03 +0000 (14:05 -0400)]
Removed dead code/const_casts/lists

8 years agoSeparate pass.h from passes.h
qining [Tue, 9 Aug 2016 20:02:21 +0000 (16:02 -0400)]
Separate pass.h from passes.h

Future pass implementations should only need to include pass.h

8 years agoUse NEW behavior for policy CMP0054.
Lei Zhang [Mon, 8 Aug 2016 02:49:00 +0000 (22:49 -0400)]
Use NEW behavior for policy CMP0054.

The NEW behavior is to not dereference variables or interpret keywords
that have been quoted or bracketed.

For more information, see
https://cmake.org/cmake/help/v3.1/policy/CMP0054.html.

This is to suppress a warning when using CMake 3.1.3+.

8 years agoRefactor Id -> Instruction
Umar Arshad [Sat, 6 Aug 2016 17:29:33 +0000 (13:29 -0400)]
Refactor Id -> Instruction

8 years agoFix minor mistakes in the tests of dead-const-elim
qining [Tue, 9 Aug 2016 16:09:53 +0000 (12:09 -0400)]
Fix minor mistakes in the tests of dead-const-elim

8 years agoPrint the shader when module building failed
qining [Mon, 8 Aug 2016 21:09:30 +0000 (17:09 -0400)]
Print the shader when module building failed

8 years agoDead constant elimination
qining [Fri, 29 Jul 2016 15:35:58 +0000 (11:35 -0400)]
Dead constant elimination

A pass to remove dead constants, including both front-end constants and spec
constants.

This pass does not handle dead variables and types.

8 years agoRemove unnecessary headers
Umar Arshad [Sat, 6 Aug 2016 17:25:02 +0000 (13:25 -0400)]
Remove unnecessary headers

8 years agoRemove needless copies. Delete copy constructor.
Umar Arshad [Sat, 6 Aug 2016 16:24:19 +0000 (12:24 -0400)]
Remove needless copies. Delete copy constructor.

* Deletes the ValidationState_t copy constructor
* Removes needless copies of the copy constructor

8 years agoAdd target envs for OpenCL, OpenGL
David Neto [Fri, 5 Aug 2016 22:19:30 +0000 (18:19 -0400)]
Add target envs for OpenCL, OpenGL

Covers: OpenCL 2.1, OpenCL 2.2
Covers: OpenGL 4.0, OpenGL 4.1, OpenGL 4.2, OpenGL 4.3, OpenGL 4.5.
The OpenGL environments assume the use of GL_ARB_gl_spirv, of course.

8 years agoStart v2016.3-dev
David Neto [Fri, 5 Aug 2016 21:10:36 +0000 (17:10 -0400)]
Start v2016.3-dev

8 years agoFinalize v2016.2
David Neto [Fri, 5 Aug 2016 21:07:34 +0000 (17:07 -0400)]
Finalize v2016.2

Document recently fixed bugs.

8 years agoHide implementations of BasicBlock::dominates,postdominates
David Neto [Fri, 5 Aug 2016 19:20:59 +0000 (15:20 -0400)]
Hide implementations of BasicBlock::dominates,postdominates