diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2263e89..08ec40e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,7 +10,7 @@ jobs: fail-fast: false matrix: version: - - '1.7' + - '1' - '1.6' - 'nightly' os: diff --git a/src/passes.jl b/src/passes.jl index 4731a24..5959242 100644 --- a/src/passes.jl +++ b/src/passes.jl @@ -12,7 +12,12 @@ The default julia optimization pass. """ function default_julia_pass(ir::IRCode, sv::OptimizationState) ir = compact!(ir) - ir = ssa_inlining_pass!(ir, ir.linetable, sv.inlining, sv.src.propagate_inbounds) + if VERSION < v"1.9-" + ir = ssa_inlining_pass!(ir, ir.linetable, sv.inlining, sv.src.propagate_inbounds) + else + ir = ssa_inlining_pass!(ir, sv.inlining, sv.src.propagate_inbounds) + end + ir = compact!(ir) @static if VERSION < v"1.8-" diff --git a/src/patches.jl b/src/patches.jl index f94795b..da9d21d 100644 --- a/src/patches.jl +++ b/src/patches.jl @@ -82,10 +82,12 @@ end end # move this to Base? -Base.iterate(ic::Core.Compiler.IncrementalCompact) = Core.Compiler.iterate(ic) -Base.iterate(ic::Core.Compiler.IncrementalCompact, st) = Core.Compiler.iterate(ic, st) -Base.getindex(ic::Core.Compiler.IncrementalCompact, idx) = Core.Compiler.getindex(ic, idx) -Base.setindex!(ic::Core.Compiler.IncrementalCompact, v, idx) = Core.Compiler.setindex!(ic, v, idx) +@static if VERSION < v"1.9-" + Base.iterate(ic::Core.Compiler.IncrementalCompact) = Core.Compiler.iterate(ic) + Base.iterate(ic::Core.Compiler.IncrementalCompact, st) = Core.Compiler.iterate(ic, st) + Base.getindex(ic::Core.Compiler.IncrementalCompact, idx) = Core.Compiler.getindex(ic, idx) + Base.setindex!(ic::Core.Compiler.IncrementalCompact, v, idx) = Core.Compiler.setindex!(ic, v, idx) +end Base.getindex(ic::Core.Compiler.Instruction, idx) = Core.Compiler.getindex(ic, idx) Base.setindex!(ic::Core.Compiler.Instruction, v, idx) = Core.Compiler.setindex!(ic, v, idx) diff --git a/src/typeinf.jl b/src/typeinf.jl index 37d41b4..dfb4069 100644 --- a/src/typeinf.jl +++ b/src/typeinf.jl @@ -12,8 +12,14 @@ return ret ``` """ function typeinf_lock(f) - ccall(:jl_typeinf_begin, Cvoid, ()) - ret = f() - ccall(:jl_typeinf_end, Cvoid, ()) + @static if VERSION < v"1.9-" + ccall(:jl_typeinf_begin, Cvoid, ()) + ret = f() + ccall(:jl_typeinf_end, Cvoid, ()) + else + ccall(:jl_typeinf_timing_begin, Cvoid, ()) + ret = f() + ccall(:jl_typeinf_timing_end, Cvoid, ()) + end return ret end