Fix empty DW_AT_location for reused loop variables#811
Open
jiel-nv wants to merge 3 commits intoNVIDIA:mainfrom
Open
Fix empty DW_AT_location for reused loop variables#811jiel-nv wants to merge 3 commits intoNVIDIA:mainfrom
jiel-nv wants to merge 3 commits intoNVIDIA:mainfrom
Conversation
Contributor
|
Automatic reviews are disabled for this repository. |
|
Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Contributor
Author
|
/ok to test 3c986d5 |
Contributor
Author
|
/ok to test 518d94b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nvbug5886953 exposes an issue that reused loop index variables have a DWARF location list with corrupted entries.
The root cause is in the base class
Lower.loadvar, which suppresses!dbgmetadata on loads of function argument variables. This causes NVVM to emit.loc line 0between the loops, andptxasbuilds a multi-entry location list where the line-0 ranges inserted between entries corrupt it, producing an emptyDW_AT_locationin the final DWARF.This PR overrides
loadvarinCUDALowerto skip the suppression. The suppression is unnecessary becauseloadvaris never called during the prologue — arg unpacking inlower_assignandstorevaralready handle suppression there.Also add
test_arg_load_has_dbg_locationregression test.Fixes nvbug5886953.