Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPIRV] Generate OpSource for All Includes #6094

Merged

Conversation

SteveUrquhart
Copy link
Contributor

The current implementation generates SPIR-V OpSource instructions from within EmitVisitor::emitDebugLine(), part of OpLine processing, improperly tying the two together. Only files including instructions that generate an OpLine will generate an OpSource, meaning that many include files are missed. An included file may include nothing more than preprocessor macro definitions, but that should still generate an OpSource.

The SourceManager already tracks the correct and complete list of files generated by the preprocessor in LineTable. We therefore propose a new pair of SourceManager api's that expose the LineTable. SpirvEmitter::HandleTranslationUnit() may now simply and directly create all required OpSource instructions.

@s-perron s-perron enabled auto-merge (squash) January 15, 2024 16:28
@s-perron s-perron merged commit 2f00209 into microsoft:main Jan 15, 2024
10 checks passed
s-perron pushed a commit that referenced this pull request Sep 26, 2024
Previously, we fixed the SPIRV OpenCL debug info to always represent all
include files, even those that only have preprocessor definitions. This
work was merged in
#6094. This PR
applies the same fix to the NonSemantic debug info, and resolves
#6907
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants