If we have two back-to-back loops with block arguments, the OpPhi
instructions generated for the second loop's block arguments should
have use the merge block of the first SPIR-V loop structure as
their incoming parent block.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp | ||
---|---|---|
99 | Just to clarify, this loop executes at most 1 iteration? If so can we avoid having a while loop? That makes it more confusing IMO |
mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp | ||
---|---|---|
99 | Not necessary. This actually scans all previous ops before this loop op. For example, you can have the following: spv.loop { ... } // loop1 spv.Load spv.Bla spv.Store spv.loop { ... } // loop2 Here if loop2 has some block arguments that require phi nodes, the incoming parent block should be loop1's merge block. loop1 is multiple ops away so we need while loop here. |
clang-format-diff not found in user's PATH; not linting file.