Updated spirv-tools.

This commit is contained in:
Бранимир Караџић
2020-09-25 19:56:23 -07:00
parent 4b802cb2ab
commit 1385c024d2
4 changed files with 61 additions and 4 deletions

View File

@@ -1,7 +1,56 @@
Revision history for SPIRV-Tools
v2020.5 2020-07-22
- Start SPIRV-Tools v2020.5
v2020.6 2020-09-24
- Start SPIRV-Tools v2020.6
v2020.5 2020-09-22
- General
- Enable building with BUILD_SHARED_LIBS=1 (#3490)
- Avoid using /MP4 for clang on windows. (#3662)
- Fix compiler error on macOS with XCode12. (#3836)
- Optimizer
- Preserve OpenCL.DebugInfo.100 through private-to-local pass (#3571)
- Preserve debug info in scalar replacement pass (#3461)
- Debug info preservation in loop-unroll pass (#3548)
- Preserve debug info in dead-insert-elim pass (#3652)
- Improve non-semantic instruction handling in the optimizer (#3693)
- Let ADCE pass check DebugScope (#3703)
- Add undef for inlined void function (#3720)
- Fix SSA-rewrite to remove DebugDeclare for variables without loads (#3719)
- Handle DebugScope in compact-ids pass (#3724)
- Add buffer oob check to bindless instrumentation (#3800)
- Validator
- Update OpenCL capabilities validation (#3149)
- Validator support for non-semantic clspv reflection (#3618)
- OpenCL.DebugInfo.100 DebugTypeArray with variable size (#3549)
- Only validation locations for appropriate execution models (#3656)
- Validate more OpenCL.DebugInfo.100 instructions (#3684)
- Allow DebugTypeTemplate for Type operand (#3702)
- spirv-val: Add Vulkan VUID labels to BuiltIn (#3756)
- Allow SPV_KHR_8bit_storage extension. (#3780)
- Validate SPIRV Version number when parsing binary header (#3834)
- Reduce
- Support reducing a specific function (#3774)
- Fuzz
- adds TransformationReplaceCopyObjectWithStoreLoad (#3567)
- adds TransformationReplaceCopyMemoryWithLoadStore (#3575)
- adds TransformationReplaceLoadStoreWithCopyMemory (#3586)
- Implement the OpOuterProduct linear algebra case (#3617)
- Pass to replace int operands with ints of opposite signedness (#3612)
- TransformationMoveInstructionDown (#3477)
- Add TransformationMakeVectorOperationDynamic (#3597)
- TransformationReplaceAddSubMulWithCarryingExtended (#3598)
- FuzzerPassPropagateInstructionsUp (#3478)
- add FuzzerPassAddCompositeInserts (#3606)
- Add inline function transformation (#3517)
- Transformation to replace the use of an irrelevant id (#3697)
- Add SPIRV_FUZZ_PROTOC_COMMAND (#3789)
- Add TransformationDuplicateRegionWithSelection (#3773)
- Transformation to flatten conditional branch (#3667)
- Handle OpPhis in TransformationInlineFunction (#3833)
- Create synonym of int constant using a loop (#3790)
- Support dead blocks in TransformationAddSynonym (#3832)
- Linker
v2020.4 2020-07-22
- General

View File

@@ -1 +1 @@
"v2020.5", "SPIRV-Tools v2020.5 b2259d7c11768aa4bcafa242d63802e9ca427764"
"v2020.6", "SPIRV-Tools v2020.6 c0bce01cc910732f92772dde968d6611431e9d09"

View File

@@ -45,6 +45,14 @@ spv_result_t spvBinaryHeaderGet(const spv_const_binary binary,
// TODO: Validation checking?
pHeader->magic = spvFixWord(binary->code[SPV_INDEX_MAGIC_NUMBER], endian);
pHeader->version = spvFixWord(binary->code[SPV_INDEX_VERSION_NUMBER], endian);
// Per 2.3.1 version's high and low bytes are 0
if ((pHeader->version & 0x000000ff) || pHeader->version & 0xff000000)
return SPV_ERROR_INVALID_BINARY;
// Minimum version was 1.0 and max version is defined by SPV_VERSION.
if (pHeader->version < SPV_SPIRV_VERSION_WORD(1, 0) ||
pHeader->version > SPV_VERSION)
return SPV_ERROR_INVALID_BINARY;
pHeader->generator =
spvFixWord(binary->code[SPV_INDEX_GENERATOR_NUMBER], endian);
pHeader->bound = spvFixWord(binary->code[SPV_INDEX_BOUND], endian);

View File

@@ -127,7 +127,7 @@ class CFA {
template <class BB>
bool CFA<BB>::FindInWorkList(const std::vector<block_info>& work_list,
uint32_t id) {
for (const auto& b : work_list) {
for (auto& b : work_list) {
if (b.block->id() == id) return true;
}
return false;