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/compiler.jl b/src/compiler.jl
index 0c3e82d0..88780d2b 100644
--- a/src/compiler.jl
+++ b/src/compiler.jl
@@ -1446,23 +1446,23 @@ function julia_sanitize(
bad = BasicBlock(fn, "bad")
position!(builder, entry)
inp, sval = collect(parameters(fn))
- cmp = nothing
- @show value_type(inp), isa(value_type(inp), LLVM.ArrayType)
-
- if isa(value_type(inp), LLVM.ArrayType)
- nelem = length(value_type(inp))
- for i in 1:nelem
- e0 = extract_value!(builder, inp, i - 1)
- cmp0 = fcmp!(builder, LLVM.API.LLVMRealUNO, e0, e0)
- if cmp == nothing
- cmp = cmp0
- else
- cmp = or!(builder, cmp, cmp0)
- end
- end
- else
- cmp = fcmp!(builder, LLVM.API.LLVMRealUNO, inp, inp)
- end
+ cmp = nothing
+ @show value_type(inp), isa(value_type(inp), LLVM.ArrayType)
+
+ if isa(value_type(inp), LLVM.ArrayType)
+ nelem = length(value_type(inp))
+ for i in 1:nelem
+ e0 = extract_value!(builder, inp, i - 1)
+ cmp0 = fcmp!(builder, LLVM.API.LLVMRealUNO, e0, e0)
+ if cmp == nothing
+ cmp = cmp0
+ else
+ cmp = or!(builder, cmp, cmp0)
+ end
+ end
+ else
+ cmp = fcmp!(builder, LLVM.API.LLVMRealUNO, inp, inp)
+ end
br!(builder, cmp, bad, good)
@@ -1475,17 +1475,17 @@ function julia_sanitize(
unreachable!(builder)
dispose(builder)
end
- if LLVM.API.LLVMVerifyFunction(fn, LLVM.API.LLVMReturnStatusAction) != 0
- msg = sprint() do io
- println(
- io,
- LLVM.API.LLVMVerifyFunction(fn, LLVM.API.LLVMPrintMessageAction),
- )
- println(io, string(fn))
- println(io, "Broken julia.sanitize")
- end
- throw(LLVM.LLVMException(msg))
- end
+ if LLVM.API.LLVMVerifyFunction(fn, LLVM.API.LLVMReturnStatusAction) != 0
+ msg = sprint() do io
+ println(
+ io,
+ LLVM.API.LLVMVerifyFunction(fn, LLVM.API.LLVMPrintMessageAction),
+ )
+ println(io, string(fn))
+ println(io, "Broken julia.sanitize")
+ end
+ throw(LLVM.LLVMException(msg))
+ end
end
# val =
call!(B, FT, fn, LLVM.Value[val, globalstring_ptr!(B, stringv)]) |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2952 +/- ##
==========================================
- Coverage 66.76% 66.70% -0.06%
==========================================
Files 65 65
Lines 21522 21539 +17
==========================================
- Hits 14369 14368 -1
- Misses 7153 7171 +18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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/21551963631/artifacts/5330725041. |
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.
@ptiede