Default to the job's optimize parameter in code_llvm#773
Open
christiangnrd wants to merge 1 commit intomasterfrom
Open
Default to the job's optimize parameter in code_llvm#773christiangnrd wants to merge 1 commit intomasterfrom
code_llvm#773christiangnrd wants to merge 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 |
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 desired