Let ADCE pass check DebugScope#3703
Merged
s-perron merged 2 commits intoKhronosGroup:masterfrom Aug 18, 2020
Merged
Conversation
s-perron
requested changes
Aug 14, 2020
| if (inst->GetDebugInlinedAt() != kNoInlinedAt) { | ||
| auto* inlined_at = get_def_use_mgr()->GetDef(inst->GetDebugInlinedAt()); | ||
| AddToWorklist(inlined_at); | ||
| } |
Collaborator
There was a problem hiding this comment.
This is not the right place for this. This should be in the loop where we process and instruction. Probably somewhere around here. The design is that the work list is the list of instructions that need to be processed. We do not process it when adding it to the work list, but when we remove it from the work list.
Contributor
Author
|
Thank you for the code review! PTAL |
In the existing code, ADCE pass does not check DebugScope of an instruction when it checks the users of each instruction, which results in removing OpenCL.Debug.100 instructions that are only used by DebugScope. This commit lets ADCE pass add DebugScope of an instruction to the live instruction set when the instruction is added to the live instruction set.
a9b031b to
52e908d
Compare
s-perron
approved these changes
Aug 18, 2020
dnovillo
pushed a commit
to dnovillo/SPIRV-Tools
that referenced
this pull request
Aug 19, 2020
In the existing code, ADCE pass does not check DebugScope of an instruction when it checks the users of each instruction, which results in removing OpenCL.Debug.100 instructions that are only used by DebugScope. This commit lets ADCE pass add DebugScope of an instruction to the live instruction set when the instruction is added to the live instruction set.
dneto0
pushed a commit
to dneto0/SPIRV-Tools
that referenced
this pull request
Sep 14, 2024
Roll third_party/glslang/ f257e0e..983698b (2 commits) KhronosGroup/glslang@f257e0e...983698b $ git log f257e0e..983698b --date=short --no-merges --format='%ad %ae %s' 2020-08-23 john Revert "Merge pull request KhronosGroup#2371 from RafaelMarinheiro/master" 2020-08-21 julius.ikkala Obey ENABLE_PCH CMake option Created with: roll-dep third_party/glslang Roll third_party/googletest/ adeef1929..1e315c5b1 (14 commits) google/googletest@adeef19...1e315c5 $ git log adeef1929..1e315c5b1 --date=short --no-merges --format='%ad %ae %s' 2020-08-20 absl-team Googletest export 2020-08-17 absl-team Googletest export 2020-08-12 robert.earhart Export LICENSE 2020-08-03 amatanhead Remove ThrowsMessageHasSubstr and fix some nits after review 2020-07-13 amatanhead Cleanup a bulky expression, document implementation details 2020-07-07 amatanhead Fix build under msvc 2020-07-07 amatanhead Update tests after changing an error message 2020-07-07 amatanhead Fix build under msvc 2020-07-07 amatanhead Add a test to ensure that the `Throws` matcher only invokes its argument once. 2020-07-07 amatanhead Add a test for duplicate catch clauses in throw matchers, fix a couple of nitpicks. 2020-07-03 amatanhead Add missing documentation piece 2020-06-20 amatanhead Small improvements: code style and property name 2020-06-20 amatanhead Add matchers for testing exception properties 2018-05-01 lantw44 Avoid using environ on FreeBSD Created with: roll-dep third_party/googletest Roll third_party/spirv-cross/ 4c7944bb4..685f86471 (6 commits) KhronosGroup/SPIRV-Cross@4c7944b...685f864 $ git log 4c7944bb4..685f86471 --date=short --no-merges --format='%ad %ae %s' 2020-08-24 post Run format_all.sh. 2020-08-24 post Work around annoying warning on GCC 10.2. 2020-08-21 post Overhaul how we deal with reserved identifiers. 2020-08-20 post HLSL: Fix FragCoord.w. 2020-08-20 post HLSL: Deal with partially filled 16-byte word in cbuffers. 2020-08-20 post HLSL: Fix bug in is_packing_standard for cbuffer. Created with: roll-dep third_party/spirv-cross Roll third_party/spirv-tools/ b8de4f5..4dd1223 (9 commits) KhronosGroup/SPIRV-Tools@b8de4f5...4dd1223 $ git log b8de4f5..4dd1223 --date=short --no-merges --format='%ad %ae %s' 2020-08-21 andreperezmaselco.developer spirv-fuzz: Add words instead of logical operands (KhronosGroup#3728) 2020-08-20 dnovillo CCP should mark IR changed if it created new constants. (KhronosGroup#3732) 2020-08-19 antonikarp spirv-fuzz: add FuzzerPassAddCompositeInserts (KhronosGroup#3606) 2020-08-19 antonikarp spirv-fuzz: Support pointer types in FuzzerPassAddParameters (KhronosGroup#3627) 2020-08-18 jaebaek Let ADCE pass check DebugScope (KhronosGroup#3703) 2020-08-18 andreperezmaselco.developer spirv-opt: Implement opt::Function::HasEarlyReturn function (KhronosGroup#3711) 2020-08-17 andreperezmaselco.developer spirv-fuzz: Check termination instructions when donating modules (KhronosGroup#3710) 2020-08-17 jackoalan Fix -Wrange-loop-analysis warning (KhronosGroup#3712) 2020-08-17 andreperezmaselco.developer spirv-fuzz: Check header dominance when adding dead block (KhronosGroup#3694) Created with: roll-dep third_party/spirv-tools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the existing code, ADCE pass does not check DebugScope of an
instruction when it checks the users of each instruction, which results
in removing OpenCL.Debug.100 instructions that are only used by
DebugScope. This commit lets ADCE pass add DebugScope of an instruction
to the live instruction set when the instruction is added to the live
instruction set.