From ab6127037a7f7d3a666fb9b52864de544d8e04a6 Mon Sep 17 00:00:00 2001 From: Roger-luo Date: Thu, 3 Nov 2022 14:51:42 -0400 Subject: [PATCH 1/5] try to fix 1.9 --- src/typeinf.jl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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 From 15a41edb7b4a1d3cfe2d0c8b10d6fc73fb22d51b Mon Sep 17 00:00:00 2001 From: Roger-luo Date: Thu, 3 Nov 2022 14:52:33 -0400 Subject: [PATCH 2/5] update CI julia versions to only test on LTS, stable and nightly --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: From 2da9c7b6f8f7101caca4113d85b2efde47452805 Mon Sep 17 00:00:00 2001 From: Roger-luo Date: Thu, 3 Nov 2022 15:01:49 -0400 Subject: [PATCH 3/5] fix inline pass --- src/passes.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/passes.jl b/src/passes.jl index 4731a24..a981171 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, ci.propagate_inbounds) + end + ir = compact!(ir) @static if VERSION < v"1.8-" From 0cf06fe00f7fcfd6ce9c5f8865b37347a77d1375 Mon Sep 17 00:00:00 2001 From: Roger-luo Date: Thu, 3 Nov 2022 17:17:53 -0400 Subject: [PATCH 4/5] fix undef var --- src/passes.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/passes.jl b/src/passes.jl index a981171..5959242 100644 --- a/src/passes.jl +++ b/src/passes.jl @@ -15,7 +15,7 @@ function default_julia_pass(ir::IRCode, sv::OptimizationState) 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, ci.propagate_inbounds) + ir = ssa_inlining_pass!(ir, sv.inlining, sv.src.propagate_inbounds) end ir = compact!(ir) From 30b34000aadfb559a0802dc6f3d38dd382db490e Mon Sep 17 00:00:00 2001 From: Roger-luo Date: Thu, 3 Nov 2022 17:30:35 -0400 Subject: [PATCH 5/5] rm patches for 1.9 --- src/patches.jl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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)