-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add simple IR printer for the verifier. #54973
base: master
Are you sure you want to change the base?
Conversation
print(Core.stderr, "Block ") | ||
print(Core.stderr, block_for_inst(ir, i)) | ||
print(Core.stderr, " ") | ||
print(Core.stderr, "%") | ||
print(Core.stderr, i) | ||
print(Core.stderr, " = ") |
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.
print(Core.stderr, "Block ") | |
print(Core.stderr, block_for_inst(ir, i)) | |
print(Core.stderr, " ") | |
print(Core.stderr, "%") | |
print(Core.stderr, i) | |
print(Core.stderr, " = ") | |
print(Core.stderr, "[", block_for_inst(ir, i), "] %", i, " = ") |
print(Core.stderr, " :: ") | ||
print(Core.stderr, ir.stmts[i][:type]) | ||
println(Core.stderr, "") |
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.
print(Core.stderr, " :: ") | |
print(Core.stderr, ir.stmts[i][:type]) | |
println(Core.stderr, "") | |
println(Core.stderr, "::", ir.stmts[i][:type]) |
print(Core.stderr, " sptypes ") | ||
println(Core.stderr, ir.sptypes) |
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.
I think we can exclude these sptypes
after all (esp. since their array prints poorly)
print(Core.stderr, "Verification error in IR for function ") | ||
print(Core.stderr, ir.argtypes[1]) | ||
print(Core.stderr, " with args ") | ||
println(Core.stderr, ir.argtypes[2:end]) |
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.
This should probably either do its own array printing like you do below, or we should go ahead and finally fix how Array
is printed in Core
Sounds fine, though I sort of think the full way to do this is to write a parser for the precise output that we do now (for using in a functional julia session) which converts that content back into Expr, then use the standard IR printer |
This is useful for debugging during bootstrapping.