Skip to content

1.11 opaque pointer fix#2778

Merged
wsmoses merged 3 commits intomainfrom
op
Nov 14, 2025
Merged

1.11 opaque pointer fix#2778
wsmoses merged 3 commits intomainfrom
op

Conversation

@wsmoses
Copy link
Member

@wsmoses wsmoses commented Nov 13, 2025

No description provided.

@wsmoses wsmoses requested a review from vchuravy November 13, 2025 20:36
@github-actions
Copy link
Contributor

github-actions bot commented Nov 13, 2025

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

Click here to view the suggested changes.
diff --git a/src/compiler.jl b/src/compiler.jl
index b5f82d39..1450d178 100644
--- a/src/compiler.jl
+++ b/src/compiler.jl
@@ -410,7 +410,7 @@ const JuliaEnzymeNameMap = Dict{String,Any}(
     "enz_no_derivative_exc" => EnzymeNoDerivativeError{Nothing, Nothing},
     "enz_no_derivative_mi_exc" => EnzymeNoDerivativeError{Core.MethodInstance, UInt},
     "enz_non_const_kwarg_exc" => NonConstantKeywordArgException,
-    "enz_callconv_mismatch_exc"=> CallingConventionMismatchError{Cstring},
+    "enz_callconv_mismatch_exc" => CallingConventionMismatchError{Cstring},
     "enz_illegal_ta_exc" => IllegalTypeAnalysisException,
     "enz_illegal_first_pointer_exc" => IllegalFirstPointerException,
     "enz_internal_exc" => EnzymeInternalError,
diff --git a/src/errors.jl b/src/errors.jl
index 7e8e3c10..2d3fe382 100644
--- a/src/errors.jl
+++ b/src/errors.jl
@@ -170,7 +170,7 @@ function Base.showerror(io::IO, ece::CallingConventionMismatchError)
         printstyled(io, "Hint"; bold = true, color = :cyan)
         printstyled(
             io,
-            ": You are currently on Julia 1.12, which changed its calling convention. Tracking issue for Enzyme adapting to this new calling convention is https://github.com/EnzymeAD/Enzyme.jl/issues/2707.\n"; 
+            ": You are currently on Julia 1.12, which changed its calling convention. Tracking issue for Enzyme adapting to this new calling convention is https://github.com/EnzymeAD/Enzyme.jl/issues/2707.\n";
             color = :cyan,
         )
     else
@@ -184,7 +184,7 @@ function Base.showerror(io::IO, ece::CallingConventionMismatchError)
     println(io)
 
 
-    if ece.backtrace isa Cstring
+    return if ece.backtrace isa Cstring
         Base.println(io, Base.unsafe_string(ece.backtrace))
     else
         Base.println(io, ece.backtrace)
diff --git a/src/llvm/transforms.jl b/src/llvm/transforms.jl
index bf7237ac..52be9b5a 100644
--- a/src/llvm/transforms.jl
+++ b/src/llvm/transforms.jl
@@ -944,11 +944,11 @@ function nodecayed_phis!(mod::LLVM.Module)
                                 B = LLVM.IRBuilder()
                                 position!(B, v)
 
-                                sPT = if !LLVM.is_opaque(value_type(v))
-                                    LLVM.PointerType(eltype(value_type(v)), 10)
-                                else
-                                    LLVM.PointerType(10)
-                                end
+                                    sPT = if !LLVM.is_opaque(value_type(v))
+                                        LLVM.PointerType(eltype(value_type(v)), 10)
+                                    else
+                                        LLVM.PointerType(10)
+                                    end
                                 vphi = phi!(B, sPT, "nondecay.vphi."*LLVM.name(v))
                                 ophi = phi!(B, value_type(offset), "nondecay.ophi"*LLVM.name(v))
 				phicache[v] = (vphi, ophi)

@github-actions
Copy link
Contributor

github-actions bot commented Nov 13, 2025

Benchmark Results

main 379cd51... main / 379cd51...
basics/make_zero/namedtuple 0.0538 ± 0.0016 μs 0.0515 ± 0.0025 μs 1.05 ± 0.06
basics/make_zero/struct 0.25 ± 0.0054 μs 0.259 ± 0.0042 μs 0.965 ± 0.026
basics/overhead 5.56 ± 0.92 ns 4.7 ± 0.92 ns 1.18 ± 0.3
basics/remake_zero!/namedtuple 0.24 ± 0.0076 μs 0.233 ± 0.0066 μs 1.03 ± 0.044
basics/remake_zero!/struct 0.233 ± 0.0077 μs 0.24 ± 0.0072 μs 0.969 ± 0.043
fold_broadcast/multidim_sum_bcast/1D 10.3 ± 0.24 μs 10.3 ± 0.34 μs 1 ± 0.041
fold_broadcast/multidim_sum_bcast/2D 12.1 ± 0.25 μs 12.1 ± 0.23 μs 1 ± 0.028
time_to_load 1.23 ± 0.0049 s 1.23 ± 0.0054 s 0.996 ± 0.0059

Benchmark Plots

A plot of the benchmark results has been uploaded as an artifact at https://github.com/EnzymeAD/Enzyme.jl/actions/runs/19351472566/artifacts/4563620900.

@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

❌ Patch coverage is 18.75000% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.99%. Comparing base (05d589a) to head (379cd51).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/errors.jl 0.00% 9 Missing ⚠️
src/rules/activityrules.jl 0.00% 2 Missing ⚠️
src/rules/customrules.jl 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2778      +/-   ##
==========================================
+ Coverage   68.94%   68.99%   +0.04%     
==========================================
  Files          58       58              
  Lines       19961    19963       +2     
==========================================
+ Hits        13763    13774      +11     
+ Misses       6198     6189       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wsmoses wsmoses merged commit e74473e into main Nov 14, 2025
49 of 54 checks passed
@wsmoses wsmoses deleted the op branch November 14, 2025 03:33
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.

2 participants