microsoft / microsoft/DirectXShaderCompiler
DXC should fail gracefully when unable to allocate signature elements in available space.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
Is your feature request related to a problem? Please describe.
There are some llvm_unreachable statements when a failure is detected in allocating signature elements in the available space. These are located in HLSLSignatureLower.cpp:AllocateDxilInputOutputs().
Describe the solution you'd like
Instead, the compiler should fail gracefully, without using llvm_unreachable. Perhaps emitting a diagnostic would be more desirable?
Describe alternatives you've considered
Emitting a diagnostic seems to be the most direct solution to the problem, however there doesn't seem to be any diagnostic engine in HLSignatureLower.cpp, and so it may not be an appropriate location to introduce diagnostics.
Additional context
Add any other context or screenshots about the feature request here.
https://github.com/microsoft/DirectXShaderCompiler/pull/6482#discussion_r1546706074
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with HLSLSignatureLower.cpp, specifically AllocateDxilInputOutputs(), and review the linked pull request discussion for the existing llvm_unreachable cases. Determine how allocation failure should be reported without introducing unsupported diagnostics there. Done means the compiler fails gracefully when signature elements cannot fit, rather than reaching llvm_unreachable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100