Skip to content

Commit

Permalink
Merge branch 'main' into fix-cholesky
Browse files Browse the repository at this point in the history
  • Loading branch information
simsurace authored Mar 16, 2024
2 parents c259980 + 2f6d564 commit d7c04d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1563,7 +1563,7 @@ function julia_sanitize(orig::LLVM.API.LLVMValueRef, val::LLVM.API.LLVMValueRef,
end
end
# val =
call!(B, fn, LLVM.Value[val, globalstring_ptr!(B, stringv)])
call!(B, FT, fn, LLVM.Value[val, globalstring_ptr!(B, stringv)])
end
return val.ref
end
Expand Down
11 changes: 7 additions & 4 deletions src/compiler/orcv2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ import GPUCompiler
import ..Compiler
import ..Compiler: API, cpu_name, cpu_features

@inline function use_ojit()
return LLVM.has_julia_ojit() && !Sys.iswindows()
end

export get_trampoline

@static if LLVM.has_julia_ojit()
@static if use_ojit()
struct CompilerInstance
jit::LLVM.JuliaOJIT
lctm::Union{LLVM.LazyCallThroughManager, Nothing}
Expand Down Expand Up @@ -75,7 +78,7 @@ function __init__()
LLVM.asm_verbosity!(tempTM, true)
tm[] = tempTM

lljit = if !LLVM.has_julia_ojit()
lljit = @static if !use_ojit()
tempTM = LLVM.JITTargetMachine(LLVM.triple(), cpu_name(), cpu_features(); optlevel)
LLVM.asm_verbosity!(tempTM, true)

Expand Down Expand Up @@ -129,7 +132,7 @@ function __init__()
end

atexit() do
if !LLVM.has_julia_ojit()
@static if !use_ojit()
ci = jit[]
dispose(ci)
end
Expand Down Expand Up @@ -213,7 +216,7 @@ function get_trampoline(job)

tsm = move_to_threadsafe(mod)

il = if LLVM.has_julia_ojit()
il = @static if use_ojit()
LLVM.IRCompileLayer(lljit)
else
LLVM.IRTransformLayer(lljit)
Expand Down

0 comments on commit d7c04d0

Please sign in to comment.