Default to the job's optimize parameter in code_llvm#773
Merged
christiangnrd merged 1 commit intomasterfrom Mar 22, 2026
Merged
Default to the job's optimize parameter in code_llvm#773christiangnrd merged 1 commit intomasterfrom
code_llvm#773christiangnrd merged 1 commit intomasterfrom
Conversation
Contributor
|
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/src/reflection.jl b/src/reflection.jl
index a180f2f..1b29bf6 100644
--- a/src/reflection.jl
+++ b/src/reflection.jl
@@ -183,7 +183,8 @@ The following keyword arguments are supported:
See also: [`@device_code_llvm`](@ref), `InteractiveUtils.code_llvm`
"""
-function code_llvm(io::IO, @nospecialize(job::CompilerJob); optimize::Bool=job.config.optimize, raw::Bool=false,
+function code_llvm(
+ io::IO, @nospecialize(job::CompilerJob); optimize::Bool = job.config.optimize, raw::Bool = false,
debuginfo::Symbol=:default, dump_module::Bool=false, kwargs...)
# NOTE: jl_dump_function_ir supports stripping metadata, so don't do it in the driver
config = CompilerConfig(job.config; validate=false, strip=false, optimize)
@@ -383,7 +384,7 @@ macro device_code(ex...)
end
open(joinpath(dir, "$fn.opt.ll"), "w") do io
- code_llvm(io, job; dump_module=true, raw=true, optimize=true)
+ code_llvm(io, job; dump_module = true, raw = true, optimize = true)
end
open(joinpath(dir, "$fn.asm"), "w") do io |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #773 +/- ##
=======================================
Coverage 74.79% 74.79%
=======================================
Files 24 24
Lines 3781 3781
=======================================
Hits 2828 2828
Misses 953 953 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dc3395a to
0e32b9a
Compare
maleadt
approved these changes
Mar 22, 2026
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.
The backends don't propagate their
optimizekwarg because it gets slurped up bysplit_kwargs. This defaults to using that parameter, but it can still be overwritten if needed.