Conversation
This reverts commit fe4b643.
Contributor
|
Your PR requires formatting changes to meet the project's style guidelines. Click here to view the suggested changes.diff --git a/src/compiler.jl b/src/compiler.jl
index d8e0d29d..bdfc7b8b 100644
--- a/src/compiler.jl
+++ b/src/compiler.jl
@@ -592,7 +592,7 @@ function prepare_llvm(interp, mod::LLVM.Module, job, meta)
if !Base.isvarargtype(mi.specTypes.parameters[end])
dl = string(LLVM.datalayout(LLVM.parent(llvmfn)))
ctx = LLVM.context(llvmfn)
-
+
# Since this is prepare_llvm, no parameters can be removed yet.
empty_parms = UInt64[]
jlargs = classify_arguments(
@@ -681,7 +681,7 @@ function prepare_llvm(interp, mod::LLVM.Module, job, meta)
end
if llRT !== nothing &&
- LLVM.return_type(LLVM.function_type(llvmfn)) != LLVM.VoidType()
+ LLVM.return_type(LLVM.function_type(llvmfn)) != LLVM.VoidType()
rest = if llRT == Ptr{RT}
typeTree = copy(typetree(RT, ctx, dl))
merge!(typeTree, TypeTree(API.DT_Pointer, ctx))
@@ -1233,7 +1233,7 @@ end
return
end
-function set_module_types!(interp, mod::LLVM.Module, primalf::Union{Nothing, LLVM.Function}, job, edges, run_enzyme, mode::API.CDerivativeMode)::Tuple{Dict{String,LLVM.API.LLVMLinkage}, HandlerState}
+ return function set_module_types!(interp, mod::LLVM.Module, primalf::Union{Nothing, LLVM.Function}, job, edges, run_enzyme, mode::API.CDerivativeMode)::Tuple{Dict{String, LLVM.API.LLVMLinkage}, HandlerState}
custom = Dict{String,LLVM.API.LLVMLinkage}()
world = job.world
@@ -1251,11 +1251,11 @@ function set_module_types!(interp, mod::LLVM.Module, primalf::Union{Nothing, LLV
)
for fname in LLVM.name.(functions(mod))
- if !haskey(functions(mod), fname) || startswith(fname, "japi3") || startswith(fname, "japi1")
+ if !haskey(functions(mod), fname) || startswith(fname, "japi3") || startswith(fname, "japi1")
continue
end
fn = functions(mod)[fname]
- mi, RT = enzyme_custom_extract_mi(fn, false)
+ mi, RT = enzyme_custom_extract_mi(fn, false)
if mi !== nothing && RT !== nothing
handle_compiled(state, edges, run_enzyme, mode, world, method_table, custom, mod, mi, fname, RT)
end
@@ -4498,7 +4498,7 @@ function lower_convention(
if arg.arg_i in removedRoots
continue
end
-
+
# Copy immutable attributes
push!(
parameter_attributes(wrapper_f, wrapper_idx),
diff --git a/src/typeutils/jltypes.jl b/src/typeutils/jltypes.jl
index 939a7a74..51888f6c 100644
--- a/src/typeutils/jltypes.jl
+++ b/src/typeutils/jltypes.jl
@@ -274,8 +274,8 @@ function classify_arguments(
parmsRemoved::Vector{UInt64},
mi::Core.MethodInstance,
world::UInt,
- llvm_f::LLVM.Function,
- called_at_start::Bool,
+ llvm_f::LLVM.Function,
+ called_at_start::Bool,
)
if called_at_start
@assert isempty(parmsRemoved) "called_at_start=true but parmsRemoved is not empty" |
Contributor
Benchmark Results
Benchmark PlotsA plot of the benchmark results has been uploaded as an artifact at https://github.com/EnzymeAD/Enzyme.jl/actions/runs/28308154242/artifacts/7930142236. |
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.
This reverts commit fe4b643.
I landed the wrong pr by accident