Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
- "1.10"
- "1.11"
- "1.12"
- "~1.13.0-0"
# - 'nightly'
os:
- ubuntu-24.04
Expand Down
17 changes: 14 additions & 3 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,14 @@ function Core.Compiler.optimize(
opt.src, opt, caller
)
Core.Compiler.ipo_dataflow_analysis!(interp, ir, caller)
else
elseif VERSION < v"1.13-"
Core.Compiler.@timeit "optimizer" ir = Core.Compiler.run_passes_ipo_safe(
opt.src, opt
)
Core.Compiler.ipo_dataflow_analysis!(interp, opt, ir, caller)
else
Core.Compiler.@zone "optimizer" ir = Core.Compiler.run_passes_ipo_safe(opt.src, opt)
Core.Compiler.ipo_dataflow_analysis!(interp, opt, ir, caller)
end
mi = opt.linfo
if DEBUG_INTERP[]
Expand All @@ -64,7 +67,11 @@ function Core.Compiler.optimize(
safe_print("post rewrite_insts", ir)
end
Core.Compiler.verify_ir(ir)
res = Core.Compiler.finish(interp, opt, ir, caller)
@static if VERSION < v"1.13-"
res = Core.Compiler.finish(interp, opt, ir, caller)
else
res = Core.Compiler.finishopt!(interp, opt, ir)
end

return res
end
Expand Down Expand Up @@ -196,7 +203,11 @@ const __skip_rewrite_func_set = Set([
typeof(Base.StackTraces.show_spec_sig),
typeof(Core.throw_inexacterror),
typeof(Base.throw_boundserror),
typeof(Base._shrink),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am confused what the reasoning for removing this line entirely is for shouldn't this be wrapped in an @static if Version < 1.13 block instead?

@static(
if VERSION < v"1.13-"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if VERSION < v"1.13-"
if v"1.11-" <= VERSION < v"1.13-"

Memoryref wass only introduced in 1.11 which causes the CI to fail on 1.10.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a copy-pasted mistake, logic about Base.memoryref for 1.11 still exists in later context, thanks for remind!

typeof(Base._shrink)
end
),
typeof(Base._shrink!),
typeof(Base.ht_keyindex),
typeof(Base.checkindex),
Expand Down
Loading