SPIRV-Tools/source
Pierre Moreau 7183ad526e Linker code cleanups
Turn `Linker::Link()` into free functions

  As very little information was kept in the Linker class, we can get rid
  of the whole class and have the `Link()` as free functions instead; the
  environment target as well as the consumer are passed along through an
  `spv_context` object.
  The resulting linked_binary is passed as a pointer rather than a
  reference to follow the Google C++ Style guidelines.

  Addresses remaining comments from
  https://github.com/KhronosGroup/SPIRV-Tools/pull/693 about the SPIR-V
  linker.

Fix variable naming in the linker

  Some of the variables were using mixed case, which did not follow the
  Google C++ Style guidelines.

Linker: Use EXPECT_EQ when possible and update some test

* Replace occurrences of ASSERT_EQ by EXPECT_EQ when possible;
* Reformulated some of the error messages;
* Added the symbol name in the error message when there is a type or
  decoration mismatch between the imported and exported declarations.

Opt: List all duplicates removed by RemoveDuplicatePass in the header

Opt: Make the const version of GetLabelInst() return a pointer

  For consistency with the non-const version, as well as other similar
  functions.

Opt: Rename function_end to EndInst()

  As pointed out by dneto0 the previous name was quite confusing and could
  be mistaken with a function returning an end iterator.
  Also change the return type of the const version to a pointer rather
  than a reference, for consistency.

Opt: Add performance comment to RemoveDuplicateTypes and decorations

  This comment was requested during the review of
  https://github.com/KhronosGroup/SPIRV-Tools/pull/693.

Opt: Add comments and fix variable naming in RemoveDuplicatePass

* Add missing comments to private functions;
* Rename variables that were using mixed case;
* Add TODO for moving AreTypesEqual out.

Linker: Remove commented out code and add TODOs

Linker: Merged together strings that were too much splitted

Implement a C++ RAII wrapper around spv_context
2018-01-05 13:28:44 -05:00
..
comp Remove concept of FIRST_CONCRETE_* operand types 2017-12-18 09:48:51 -05:00
link Linker code cleanups 2018-01-05 13:28:44 -05:00
opt Linker code cleanups 2018-01-05 13:28:44 -05:00
util Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
val Refactor include of latest spir-v header versions 2017-12-14 11:18:20 -05:00
assembly_grammar.cpp Convert pattern stack from deque to vector, and share it 2017-07-04 12:02:26 -04:00
assembly_grammar.h Refactor include of latest spir-v header versions 2017-12-14 11:18:20 -05:00
binary.cpp Add asm, dis support for DebugInfo extended instruction set 2017-12-22 09:39:36 -05:00
binary.h Support building under CYGWIN 2016-12-21 10:34:23 -05:00
cfa.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
CMakeLists.txt Add ExtInst validation pass (GLSL only for now) 2018-01-02 16:53:25 -05:00
diagnostic.cpp Move SetContextMessageConsumer into libspirv namespace 2017-11-23 13:56:12 -05:00
diagnostic.h DiagnosticStream move ctor moves output duties to new object 2017-10-03 11:23:54 -04:00
disassemble.cpp Add asm, dis support for DebugInfo extended instruction set 2017-12-22 09:39:36 -05:00
enum_set.h Refactor include of latest spir-v header versions 2017-12-14 11:18:20 -05:00
enum_string_mapping.cpp Autogenererating enum-string mappings from grammar 2017-03-16 15:29:17 -04:00
enum_string_mapping.h Turn all function static non-POD variables into global POD variables 2017-10-25 15:44:19 -04:00
ext_inst.cpp Add asm, dis support for DebugInfo extended instruction set 2017-12-22 09:39:36 -05:00
ext_inst.h Relicense SPIRV-Tools under Apache 2.0 2016-09-02 10:00:29 -04:00
extensions.cpp Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
extensions.h Turn all function static non-POD variables into global POD variables 2017-10-25 15:44:19 -04:00
extinst.debuginfo.grammar.json Add asm, dis support for DebugInfo extended instruction set 2017-12-22 09:39:36 -05:00
extinst.spv-amd-gcn-shader.grammar.json Fix spelling in SPV_AMD_gcn_shader support 2017-04-03 14:59:18 -04:00
extinst.spv-amd-shader-ballot.grammar.json Add support for SPV AMD extensions 2017-06-21 15:08:07 -04:00
extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json Add support for SPV AMD extensions 2017-06-21 15:08:07 -04:00
extinst.spv-amd-shader-trinary-minmax.grammar.json Add support for SPV AMD extensions 2017-06-21 15:08:07 -04:00
id_descriptor.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
id_descriptor.h Add new compression algorithm and models 2017-11-21 17:32:58 -05:00
instruction.h Refactor include of latest spir-v header versions 2017-12-14 11:18:20 -05:00
latest_version_glsl_std_450_header.h Refactor include of latest spir-v header versions 2017-12-14 11:18:20 -05:00
latest_version_opencl_std_header.h Refactor include of latest spir-v header versions 2017-12-14 11:18:20 -05:00
latest_version_spirv_header.h Refactor include of latest spir-v header versions 2017-12-14 11:18:20 -05:00
libspirv.cpp Linker code cleanups 2018-01-05 13:28:44 -05:00
macro.h Relicense SPIRV-Tools under Apache 2.0 2016-09-02 10:00:29 -04:00
message.cpp spirv-val prints warnings 2017-03-17 12:48:51 -04:00
message.h Clean up header dependency. 2016-09-22 18:15:23 -04:00
name_mapper.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
name_mapper.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
opcode.cpp Handle execution termination instructions when building edges. 2018-01-03 15:25:03 -05:00
opcode.h Handle execution termination instructions when building edges. 2018-01-03 15:25:03 -05:00
operand.cpp Add asm, dis support for DebugInfo extended instruction set 2017-12-22 09:39:36 -05:00
operand.h Remove concept of FIRST_CONCRETE_* operand types 2017-12-18 09:48:51 -05:00
parsed_operand.cpp Extract EmitNumericLiteral from disassembler 2016-11-15 14:05:03 -05:00
parsed_operand.h Extract EmitNumericLiteral from disassembler 2016-11-15 14:05:03 -05:00
print.cpp Support outputting ANSI color escape sequences in library 2017-12-01 09:03:35 -05:00
print.h Support outputting ANSI color escape sequences in library 2017-12-01 09:03:35 -05:00
software_version.cpp Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
spirv_constant.h Refactor include of latest spir-v header versions 2017-12-14 11:18:20 -05:00
spirv_definition.h Refactor include of latest spir-v header versions 2017-12-14 11:18:20 -05:00
spirv_endian.cpp Relicense SPIRV-Tools under Apache 2.0 2016-09-02 10:00:29 -04:00
spirv_endian.h Relicense SPIRV-Tools under Apache 2.0 2016-09-02 10:00:29 -04:00
spirv_stats.cpp Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
spirv_stats.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
spirv_target_env.cpp Support OpenCL 1.2 and 2.0 target environments 2017-12-12 11:35:39 -05:00
spirv_target_env.h Relicense SPIRV-Tools under Apache 2.0 2016-09-02 10:00:29 -04:00
spirv_validator_options.cpp Add option to relax validation of store types. 2017-10-28 18:48:21 -04:00
spirv_validator_options.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
table.cpp Support OpenCL 1.2 and 2.0 target environments 2017-12-12 11:35:39 -05:00
table.h Refactor include of latest spir-v header versions 2017-12-14 11:18:20 -05:00
text_handler.cpp Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
text_handler.h Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
text.cpp Add asm, dis support for DebugInfo extended instruction set 2017-12-22 09:39:36 -05:00
text.h Relicense SPIRV-Tools under Apache 2.0 2016-09-02 10:00:29 -04:00
validate_arithmetics.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
validate_atomics.cpp Add validation rules for atomic instructions 2017-12-13 18:29:38 -05:00
validate_bitwise.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
validate_capability.cpp Support OpenCL 1.2 and 2.0 target environments 2017-12-12 11:35:39 -05:00
validate_cfg.cpp Add validation checks for Execution Model 2017-11-23 23:38:03 -05:00
validate_composites.cpp Validator checks out of bounds composite access 2018-01-04 14:02:38 -05:00
validate_conversion.cpp Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
validate_datarules.cpp Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
validate_decorations.cpp Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
validate_derivatives.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
validate_ext_inst.cpp Add ExtInst validation pass (GLSL only for now) 2018-01-02 16:53:25 -05:00
validate_id.cpp Validator checks out of bounds composite access 2018-01-04 14:02:38 -05:00
validate_image.cpp Disallow Dim=SubpassData for OpImageSparseRead 2017-12-22 09:45:15 -05:00
validate_instruction.cpp Fix validation of group ops in SPV_AMD_shader_ballot 2017-11-30 10:26:04 -05:00
validate_layout.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
validate_literals.cpp validate & test of literal's upper bits 2017-12-19 13:19:56 -05:00
validate_logicals.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
validate_primitives.cpp More validation on primitive instructions 2017-12-19 13:26:07 -05:00
validate_type_unique.cpp Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
validate.cpp Add ExtInst validation pass (GLSL only for now) 2018-01-02 16:53:25 -05:00
validate.h Add ExtInst validation pass (GLSL only for now) 2018-01-02 16:53:25 -05:00