-
Notifications
You must be signed in to change notification settings - Fork 805
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. |
tools/clang/test/HLSLFileCheck/dxil/debug/local_global_inline_scope.hlsl
Show resolved
Hide resolved
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.
LGTM
FWIW, I wasn't sure what the .ll test was testing (mostly through my ignorance), but I checked out the branch and reverted the functional changes and that test started failing, which convinced me at least that it is testing something.
I would recommend getting a review from someone more familiar with the codebase than I am!
Previously, global variables converted to
alloca's, their debug info is written as adbg.valuefor 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.valuefor each inlinedDISubprogram, each pointing to a newDILocalVariablewith the inlinedDISubprogramas its scope.