-
Notifications
You must be signed in to change notification settings - Fork 804
Added debug info for localized global variables for inlined scopes. #7799
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
base: main
Are you sure you want to change the base?
Conversation
✅ With the latest revision this PR passed the C/C++ code formatter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better if this were an IR to IR test rather than HLSL to IR running the full pipeline.
DXC's hacked up SROA is quite messy and massively under tested. The ExtractIRForPassTest.py
script should be able to turn this source into an IR test pretty easily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing. Can I also keep this HLSL test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an IR test. I want to keep the HLSL test too just to verify end-to-end.
Previously, global variables converted to
alloca
's, their debug info is written as adbg.value
for a fake local variable prefixed with "global.". This was only done for the entry function'sDISubprogram
, which makes the variable inaccessible for all inlined function scopes.This change creates a
dbg.value
for each inlinedDISubprogram
, each pointing to a newDILocalVariable
with the inlinedDISubprogram
as its scope.