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

[DWARF] Add logging to range building #9969

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SingleAccretion
Copy link
Contributor

This helps one gain insight into how and why variables ranges end up as they do. #9900 is an example of an investigation using this code.

Sample output:

Building ranges for values in scope: [0..186)
L#0   : %r13@[49..68)
L#2   : %rbx@[59..68) %rbx@[72..145)
L#5   : %rax@[100..105)
L#8   : %rax@[116..121)
L#11  : %rax@[132..142)
L#12  : %r9@[137..142)
L#13  : %rax@[142..157)
VMCTX : %rdi@[49..100) %r14@[100..157)    
Intersecting with L#2    
Intersecting with VMCTX    
Built ranges:    
[L#2:%rbx, VMCTX:%rdi]@[59..68)    
[L#2:%rbx, VMCTX:%rdi]@[72..100)    
[L#2:%rbx, VMCTX:%r14]@[100..145)    

impl<'a> fmt::Debug for ValueLocSummary<'a> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
if let LabelValueLoc::Reg(reg) = self.loc {
// TODO-DebugInfo-Cleanup: ideally, 'pretty_print_reg' would be a method on ISA.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preferences on doing this in this change?

@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:area:x64 Issues related to x64 codegen labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:area:x64 Issues related to x64 codegen cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant