Skip to content

spirv-fuzz: FuzzerPassPropagateInstructionsUp#3478

Merged
paulthomson merged 18 commits intoKhronosGroup:masterfrom
Vasniktel:copy_instructions
Aug 11, 2020
Merged

spirv-fuzz: FuzzerPassPropagateInstructionsUp#3478
paulthomson merged 18 commits intoKhronosGroup:masterfrom
Vasniktel:copy_instructions

Conversation

@Vasniktel
Copy link
Copy Markdown
Collaborator

@Vasniktel Vasniktel commented Jun 30, 2020

Part of #3458.

@Vasniktel Vasniktel marked this pull request as draft June 30, 2020 15:59
@Vasniktel Vasniktel force-pushed the copy_instructions branch from e3eb97e to b7a61fd Compare July 7, 2020 17:00
@Vasniktel Vasniktel force-pushed the copy_instructions branch from b7a61fd to 9e44b81 Compare July 28, 2020 16:17
@Vasniktel Vasniktel changed the title spirv-fuzz: TransformationCopyInstruction spirv-fuzz: FuzzerPassPropagateInstructions Jul 28, 2020
afd
afd previously requested changes Jul 29, 2020
Copy link
Copy Markdown
Contributor

@afd afd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm very excited about this transformation!

When you write tests, can you be sure to thoroughly test the case where the block is a loop header with 2+ non-back-edge predecessors as well as a back-edge predecessor?

And (as well as a standard loop example) can you check the case where the back-edge predecessor is unreachable? (E.g. a loop of the form while(c) { break; })

I think these should all work fine, but the really interesting case for propagation is where the block dominates its predecessor.

Also, can you check the case of a single-node loop, where the loop header is the continue target and back-edge block?

@Vasniktel Vasniktel force-pushed the copy_instructions branch from a8c9a5f to 62b2c95 Compare July 29, 2020 15:36
@Vasniktel Vasniktel changed the title spirv-fuzz: FuzzerPassPropagateInstructions spirv-fuzz: FuzzerPassPropagateInstructionsUp Jul 29, 2020
@Vasniktel Vasniktel force-pushed the copy_instructions branch from 62b2c95 to 3048770 Compare July 29, 2020 17:16
@Vasniktel Vasniktel requested a review from afd July 30, 2020 11:53
@Vasniktel Vasniktel force-pushed the copy_instructions branch from 48b2933 to 129f41b Compare July 30, 2020 17:29
Copy link
Copy Markdown
Contributor

@afd afd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation. One more comment from me.

@paulthomson I suggest merging once @Vasniktel has tests done.

@Vasniktel Vasniktel force-pushed the copy_instructions branch from 129f41b to 72681e0 Compare July 31, 2020 14:10
@Vasniktel Vasniktel marked this pull request as ready for review August 3, 2020 15:15
@Vasniktel Vasniktel requested a review from paulthomson August 3, 2020 15:15
Copy link
Copy Markdown
Contributor

@paulthomson paulthomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! I am excited to see this transformation in action. I have one main refactoring suggestion.

Copy link
Copy Markdown
Contributor

@paulthomson paulthomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed one more (minor) potential issue!

@Vasniktel Vasniktel requested a review from paulthomson August 5, 2020 14:30
@Vasniktel Vasniktel force-pushed the copy_instructions branch 2 times, most recently from d76e5e5 to 4f62f1a Compare August 6, 2020 15:57
Copy link
Copy Markdown
Contributor

@paulthomson paulthomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome

@paulthomson paulthomson merged commit b7056e7 into KhronosGroup:master Aug 11, 2020
@Vasniktel Vasniktel deleted the copy_instructions branch August 11, 2020 09:32
dnovillo pushed a commit to dnovillo/SPIRV-Tools that referenced this pull request Aug 19, 2020
Given an instruction (that may use an OpPhi result from the same block as an input operand), try to clone the instruction into each predecessor block, replacing the input operand with the corresponding OpPhi input operand in each case, if necessary.

Fixes KhronosGroup#3458.
dneto0 pushed a commit to dneto0/SPIRV-Tools that referenced this pull request Sep 14, 2024
Roll third_party/glslang/ b60e067..f257e0e (11 commits)

KhronosGroup/glslang@b60e067...f257e0e

$ git log b60e067..f257e0e --date=short --no-merges --format='%ad %ae %s'
2020-08-14 john Build: fix a build warning
2020-08-14 rafael.fariasmarinheiro Use --test-root to pass files to Bazel tests.
2020-08-14 john Fix KhronosGroup#2366, fix KhronosGroup#2358, correctly separate out numerical feature checking
2020-08-14 john Non-functional (almost): Refactor when 'extensionRequested' is called.
2020-08-14 john Non-functional: Remove reinventing the scalar type, note code issues
2020-08-11 john Non-functional: spellings of "destinaton" and "addPairConversion"
2020-08-12 alanbaker Update test expectations
2020-08-12 alanbaker Update SPIRV-Tools and SPIRV-Headers known good
2020-08-10 ezdiy GLSLANG_EXPORT for C APIs.
2020-08-07 john Non-functional: correctly do GL_EXT_buffer_reference2 semantic checking
2020-08-06 john Non-functional: consistently use 'const TSourceLoc&' to pass location.

Created with:
  roll-dep third_party/glslang

Roll third_party/googletest/ 3af06fe16..adeef1929 (4 commits)

google/googletest@3af06fe...adeef19

$ git log 3af06fe16..adeef1929 --date=short --no-merges --format='%ad %ae %s'
2020-08-12 krzysio Googletest export
2020-08-11 absl-team Googletest export
2020-08-11 dmauro Googletest export
2020-08-10 absl-team Googletest export

Created with:
  roll-dep third_party/googletest

Roll third_party/spirv-cross/ 82d1c43e4..4c7944bb4 (1 commit)

KhronosGroup/SPIRV-Cross@82d1c43...4c7944b

$ git log 82d1c43e4..4c7944bb4 --date=short --no-merges --format='%ad %ae %s'
2020-08-13 lehoangq Fix KhronosGroup#1445: MSL: Enclose args when convert distance(a,b) to abs(a-b)

Created with:
  roll-dep third_party/spirv-cross

Roll third_party/spirv-tools/ 2990a21..b8de4f5 (19 commits)

KhronosGroup/SPIRV-Tools@2990a21...b8de4f5

$ git log 2990a21..b8de4f5 --date=short --no-merges --format='%ad %ae %s'
2020-08-16 jaebaek Allow DebugTypeTemplate for Type operand (KhronosGroup#3702)
2020-08-14 antonikarp spirv-fuzz: Improve code coverage of tests (KhronosGroup#3686)
2020-08-14 stefanomil spirv-fuzz: Fuzzer pass to randomly apply loop preheaders (KhronosGroup#3668)
2020-08-14 vasniktel spirv-fuzz: Support identical predecessors in TransformationPropagateInstructionUp (KhronosGroup#3689)
2020-08-13 alanbaker Improve non-semantic instruction handling in the optimizer (KhronosGroup#3693)
2020-08-13 vasniktel Fix the bug (KhronosGroup#3680)
2020-08-12 andreperezmaselco.developer spirv-fuzz: Check integer and float width capabilities (KhronosGroup#3670)
2020-08-12 andreperezmaselco.developer spirv-fuzz: consider additional access chain instructions (KhronosGroup#3672)
2020-08-12 andreperezmaselco.developer spirv-fuzz: Ignore specialization constants (KhronosGroup#3664)
2020-08-12 vasniktel Fix the bug (KhronosGroup#3683)
2020-08-12 vasniktel spirv-fuzz: Fix width in FuzzerPassAddEquationInstructions (KhronosGroup#3685)
2020-08-12 jaebaek Preserve debug info in dead-insert-elim pass (KhronosGroup#3652)
2020-08-12 jaebaek Validate more OpenCL.DebugInfo.100 instructions (KhronosGroup#3684)
2020-08-11 alanbaker Only validation locations for appropriate execution models (KhronosGroup#3656)
2020-08-11 andreperezmaselco.developer spirv-fuzz: Fix in operand type assertion (KhronosGroup#3666)
2020-08-11 andreperezmaselco.developer spirv-opt: Add spvOpcodeIsAccessChain (KhronosGroup#3682)
2020-08-11 vasniktel spirv-fuzz: FuzzerPassPropagateInstructionsUp (KhronosGroup#3478)
2020-08-10 stevenperron Handle no index access chain in local access chain convert (KhronosGroup#3678)
2020-08-10 rharrison Roll 2 dependencies (KhronosGroup#3677)

Created with:
  roll-dep third_party/spirv-tools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants