spirv-fuzz: function outlining fuzzer pass#3078
Conversation
paulthomson
left a comment
There was a problem hiding this comment.
Looks great!
My only thought is maybe we could avoid some of the complexity (and re-use some of the tricky logic) by splitting the potential entry and exit blocks in advance, so that the actual entry and exit blocks become trivial, and then only performing outlining of sections that e.g. don't start with OpPhis, don't start/end with loop header/merge blocks, etc. We could then even end up merging some of these blocks afterwards; the splitting and merging could also be used as independent transformations (well, we already have split block, but perhaps it would need to be extended).
|
Hmm, that's an interesting idea regarding doing some splitting to just avoid the complex cases. If we do that, I wonder whether we should have the outliner pass emit the splitting transformations - i.e. decide what it would like to outline, do any splitting if necessary to make outlining possible, and then do the outlining. Or instead we could just leave it to chance that "split blocks" will sometimes have been run by the fuzzer by chance in a way that makes more outlining opportunities possible. What do you think? |
|
I assume we would want the outliner pass to emit the splitting transformations. The splits need to happen in a certain way (I think): the original entry block will get a fresh successor block (that becomes the new entry block), while the exit block will probably need a fresh predecessor block (that becomes the new exit block). |
|
Not sure about the case of inlining a single block. |
487a4dd to
6f575ad
Compare
Roll third_party/glslang/ 0de87ee..6c47979 (4 commits) KhronosGroup/glslang@0de87ee...6c47979 $ git log 0de87ee..6c47979 --date=short --no-merges --format='%ad %ae %s' 2019-12-09 cepheus Fix KhronosGroup#2020: PR KhronosGroup#1977 broke HLSL member consistency, this finishes it... 2019-12-09 cepheus Fix: KhronosGroup#2014: Don't do "extension-on && version >= ..." keyword checks. 2019-12-09 cepheus Fix KhronosGroup#2007: Fix a couple relative header paths in header files. 2019-12-09 cepheus Fix KhronosGroup#1993: Fully exclude ftransform() from SPIR-V semantics. Roll third_party/googletest/ ae8d1fc81..78fdd6c00 (6 commits) google/googletest@ae8d1fc...78fdd6c $ git log ae8d1fc81..78fdd6c00 --date=short --no-merges --format='%ad %ae %s' 2019-12-05 absl-team Googletest export 2019-12-05 absl-team Googletest export 2019-12-05 absl-team Googletest export 2019-11-27 krystian.kuzniarek Revert "remove MSVC workaround: wmain link error in the static library" 2019-11-27 krystian.kuzniarek Revert "unify googletest and googlemock main functions" 2019-11-17 krystian.kuzniarek remove MSVC workaround: cease const dropping Roll third_party/re2/ bb8e77755..6a86f6b3f (1 commit) google/re2@bb8e777...6a86f6b $ git log bb8e77755..6a86f6b3f --date=short --no-merges --format='%ad %ae %s' 2019-12-09 junyer Simplify the bytecode for the 80-10FFFF rune range. Roll third_party/spirv-cross/ 15b860eb1..f912c3289 (2 commits) KhronosGroup/SPIRV-Cross@15b860e...f912c32 $ git log 15b860eb1..f912c3289 --date=short --no-merges --format='%ad %ae %s' 2019-12-10 post GLSL: Fix array of input patch variables. 2019-12-09 post GLSL: Fix EmitStreamVertex/Primitive. Roll third_party/spirv-tools/ e82a428..0a2b38d (2 commits) KhronosGroup/SPIRV-Tools@e82a428...0a2b38d $ git log e82a428..0a2b38d --date=short --no-merges --format='%ad %ae %s' 2019-12-10 afdx spirv-fuzz: function outlining fuzzer pass (KhronosGroup#3078) 2019-12-06 afdx spirv-fuzz: Use validator to check break/continue dominance conditions (KhronosGroup#3089) Created with: roll-dep third_party/effcee third_party/glslang third_party/googletest third_party/re2 third_party/spirv-cross third_party/spirv-headers third_party/spirv-tools
A new transformation and associated fuzzer pass in spirv-fuzz that
selects single-entry single-exit control flow graph regions and for
each selected region outlines the region into a new function and
replaces the original region with a call to this function.