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

@code_llvm with debuginfo=:none does not remove all debug info on Julia 1.11 #54577

Open
MilesCranmer opened this issue May 25, 2024 · 4 comments

Comments

@MilesCranmer
Copy link
Member

julia> f(x) = x;

julia> @code_llvm debuginfo=:none f(1)
; Function Signature: f(Int64)
define i64 @julia_f_3669(i64 signext %"x::Int64") #0 {
top:
  ret i64 %"x::Int64"
}

The ; Function Signature: f(Int64) is debug info so should not be printed here.

On 1.10:

julia> f(x) = x;

julia> @code_llvm debuginfo=:none f(1)
define i64 @julia_f_787(i64 signext %0) #0 {
top:
  ret i64 %0
}
@giordano
Copy link
Contributor

For what is worth, the signature line was introduced in v1.11, it doesn't appear in v1.10 because it wasn't there in the first place. Agreed that it may be considered "debug info".

@MilesCranmer
Copy link
Member Author

I figured that, just wanted to point out it wasn't being removed by the filter

@giordano
Copy link
Contributor

This was introduced by #50630, but as far as I understand debug level is part of jl_codegen_params_t, but I don't see that used at all in that file, so I have no clue how one would conditionally print the signature depending on the debug level if codegen params are never available at that point.

@MilesCranmer
Copy link
Member Author

No idea

In my LLVM IR unittest I just made it filter any line starting with ; so it would be compatible with 1.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants