Skip to content

Default to the job's optimize parameter in code_llvm#773

Open
christiangnrd wants to merge 1 commit intomasterfrom
codellvm
Open

Default to the job's optimize parameter in code_llvm#773
christiangnrd wants to merge 1 commit intomasterfrom
codellvm

Conversation

@christiangnrd
Copy link
Member

The backends don't propagate their optimize kwarg because it gets slurped up by split_kwargs. This defaults to using that parameter, but it can still be overwritten if needed desired

@github-actions
Copy link
Contributor

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic master) to apply these changes.

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

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

Successfully merging this pull request may close these issues.

1 participant