-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fix scope overlapping in NAOT DWARF info #444
Conversation
We currently create a new lexical scope for each live variable range as reported by the JIT. Liveness ranges, however, are not the same as lexical scopes. In particular, lexical scopes are never partially overlapping. Liveness ranges are. Overlapping scopes produce errors in llvm-dwarfdump --verify. This change maps the objwriter behavior to use one lexical scope for the whole method, which is the semantic used in IL. This is overly broad, but correct according to the DWARF spec. We can add support for proper lexical scopes using the PDB information in the future.
/// there is only one scope for the whole method. We could be more precise | ||
/// in the future by pulling the scope information from the PDB. |
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.
Do you know how the lexical scope information is used by debugger? I suppose it allows the debugger to provide the values of only the subset of locals that are relevant in the current context of the function?
Note that the JIT will shorten and lengthen the live ranges of locals in arbitrary ways when optimizing, but presumably the debugger handles the live ranges and the lexical scopes as two separate sources of "which local values should be displayed here".
In debug the JIT will extend the live range of all IL locals to the full function, regardless of when they are last used (both as a throughput optimization and for diagnostic purposes). Without having these lexical scopes I assume it means that the debugger may display multiple separate locals of the same name (e.g. think two i
induction variables from separate loops). If I understand correctly this is what makes having these lexical scopes desirable.
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.
Yes that description sounds right to me.
We currently create a new lexical scope for each live variable range as reported by the JIT. Liveness ranges, however, are not the same as lexical scopes. In particular, lexical scopes are never partially overlapping. Liveness ranges are. Overlapping scopes produce errors in llvm-dwarfdump --verify. This change maps the objwriter behavior to use one lexical scope for the whole method, which is the semantic used in IL. This is overly broad, but correct according to the DWARF spec. We can add support for proper lexical scopes using the PDB information in the future. (cherry picked from commit 8e95993)
We currently create a new lexical scope for each live variable range as reported by the JIT. Liveness ranges, however, are not the same as lexical scopes. In particular, lexical scopes are never partially overlapping. Liveness ranges are. Overlapping scopes produce errors in llvm-dwarfdump --verify. This change maps the objwriter behavior to use one lexical scope for the whole method, which is the semantic used in IL. This is overly broad, but correct according to the DWARF spec. We can add support for proper lexical scopes using the PDB information in the future. (cherry picked from commit 8e95993)
We currently create a new lexical scope for each live variable range as reported by the JIT. Liveness ranges, however, are not the same as lexical scopes. In particular, lexical scopes are never partially overlapping. Liveness ranges are. Overlapping scopes produce errors in llvm-dwarfdump --verify. This change maps the objwriter behavior to use one lexical scope for the whole method, which is the semantic used in IL. This is overly broad, but correct according to the DWARF spec. We can add support for proper lexical scopes using the PDB information in the future. (cherry picked from commit 8e95993)
We currently create a new lexical scope for each live variable range as reported by the JIT. Liveness ranges, however, are not the same as lexical scopes. In particular, lexical scopes are never partially overlapping. Liveness ranges are. Overlapping scopes produce errors in llvm-dwarfdump --verify. This change maps the objwriter behavior to use one lexical scope for the whole method, which is the semantic used in IL. This is overly broad, but correct according to the DWARF spec. We can add support for proper lexical scopes using the PDB information in the future. (cherry picked from commit 8e95993)
We currently create a new lexical scope for each live variable range as reported by the JIT. Liveness ranges, however, are not the same as lexical scopes. In particular, lexical scopes are never partially overlapping. Liveness ranges are. Overlapping scopes produce errors in llvm-dwarfdump --verify. This change maps the objwriter behavior to use one lexical scope for the whole method, which is the semantic used in IL. This is overly broad, but correct according to the DWARF spec. We can add support for proper lexical scopes using the PDB information in the future. (cherry picked from commit 8e95993)
We currently create a new lexical scope for each live variable range as reported by the JIT. Liveness ranges, however, are not the same as lexical scopes. In particular, lexical scopes are never partially overlapping. Liveness ranges are. Overlapping scopes produce errors in llvm-dwarfdump --verify. This change maps the objwriter behavior to use one lexical scope for the whole method, which is the semantic used in IL. This is overly broad, but correct according to the DWARF spec. We can add support for proper lexical scopes using the PDB information in the future. (cherry picked from commit 8e95993)
We currently create a new lexical scope for each live variable range as reported by the JIT. Liveness ranges, however, are not the same as lexical scopes. In particular, lexical scopes are never partially overlapping. Liveness ranges are. Overlapping scopes produce errors in llvm-dwarfdump --verify. This change maps the objwriter behavior to use one lexical scope for the whole method, which is the semantic used in IL. This is overly broad, but correct according to the DWARF spec. We can add support for proper lexical scopes using the PDB information in the future. (cherry picked from commit 8e95993)
We currently create a new lexical scope for each live variable range as reported by the JIT. Liveness ranges, however, are not the same as lexical scopes. In particular, lexical scopes are never partially overlapping. Liveness ranges are. Overlapping scopes produce errors in llvm-dwarfdump --verify. This change maps the objwriter behavior to use one lexical scope for the whole method, which is the semantic used in IL. This is overly broad, but correct according to the DWARF spec. We can add support for proper lexical scopes using the PDB information in the future.