Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to https://github.com/JuliaLang/julia/pull/42082 #224

Merged
merged 1 commit into from
Sep 6, 2021

Conversation

aviatesk
Copy link
Member

@aviatesk aviatesk commented Sep 4, 2021

No description provided.

@@ -84,12 +84,19 @@ end

# branch on https://github.com/JuliaLang/julia/pull/41328
@static if isdefined(Compiler, :is_stmt_inline)
function Compiler.inlining_policy(interp::CthulhuInterpreter, @nospecialize(src), stmt_flag::UInt8)
Copy link
Member Author

Choose a reason for hiding this comment

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

The CIs are failing now because 1.8.0-DEV.472 doesn't seem to arrive at the nightly channel yet.
Still I'd like to drop the support for dev versions between JuliaLang/julia#41328 and 1.8.0-DEV.472.

@aviatesk aviatesk closed this Sep 4, 2021
@aviatesk aviatesk reopened this Sep 4, 2021
@codecov-commenter
Copy link

codecov-commenter commented Sep 4, 2021

Codecov Report

Merging #224 (b0775c8) into master (30ac9f5) will increase coverage by 1.35%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #224      +/-   ##
==========================================
+ Coverage   50.43%   51.78%   +1.35%     
==========================================
  Files           7        7              
  Lines         924      925       +1     
==========================================
+ Hits          466      479      +13     
+ Misses        458      446      -12     
Impacted Files Coverage Δ
src/interpreter.jl 79.54% <50.00%> (+23.73%) ⬆️
src/Cthulhu.jl 42.30% <100.00%> (+0.42%) ⬆️
src/callsite.jl 31.74% <0.00%> (+0.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 30ac9f5...b0775c8. Read the comment docs.

@aviatesk aviatesk closed this Sep 6, 2021
@aviatesk aviatesk reopened this Sep 6, 2021
@aviatesk
Copy link
Member Author

aviatesk commented Sep 6, 2021

@simeonschaub do you have any idea on why this test case now produces Expr(:code_coverage_effect) statements ... ?

Cthulhu.jl/test/runtests.jl

Lines 104 to 116 in 7ded0c9

Base.@propagate_inbounds function f(x)
@boundscheck error()
end
g(x) = @inbounds f(x)
h(x) = f(x)
(_,CI, _, _, _, _) = process(g, Tuple{Vector{Float64}})
for (i, stmt) in enumerate(CI.stmts.inst)
@show i, stmt
end
@test all(CI.stmts.inst) do stmt
isa(stmt, Core.GotoNode) || (isa(stmt, Core.ReturnNode) && isdefined(stmt, :val)) || Base.Meta.isexpr(stmt, :code_coverage_effect, 0)
end

@simeonschaub
Copy link
Collaborator

simeonschaub commented Sep 6, 2021

Not sure why that changed, but you could use PerformanceTestTools.@include to work around it, as is already done here:

using PerformanceTestTools

Comment on lines -102 to +127
if Base.JLOptions().check_bounds ∈ (0, 2)
@testset "DCE & boundscheck" begin
Base.@propagate_inbounds function f(x)
@boundscheck error()
end
g(x) = @inbounds f(x)
h(x) = f(x)

(_,CI, _, _, _, _) = process(g, Tuple{Vector{Float64}})
@test all(CI.stmts.inst) do stmt
isa(stmt, Core.GotoNode) || (isa(stmt, Core.ReturnNode) && isdefined(stmt, :val)) || Base.Meta.isexpr(stmt, :code_coverage_effect, 0)
end

(_,CI, _, _, _, _) = process(h, Tuple{Vector{Float64}})
i = 1
while CI.stmts.inst[i] === nothing || Base.Meta.isexpr(CI.stmts.inst[i], :code_coverage_effect, 0)
i += 1
end
@test length(CI.stmts) - i + 1 == 2
stmt = CI.stmts.inst[end]
@test isa(stmt, Core.ReturnNode) && !isdefined(stmt, :val)
end
end
# # TODO run this testset in a separate process
# # julia --check-bounds=auto --code-coverage=none
# @testset "DCE & boundscheck" begin
# M = Module()
# @eval M begin
# Base.@propagate_inbounds function f(x)
# @boundscheck error()
# end
# g(x) = @inbounds f(x)
# h(x) = f(x)
# end
#
# let
# (_,CI, _, _, _, _) = process(M.g, Tuple{Vector{Float64}})
# @test all(CI.stmts.inst) do stmt
# isa(stmt, Core.GotoNode) || (isa(stmt, Core.ReturnNode) && isdefined(stmt, :val))
# end
# end
#
# let
# (_,CI, _, _, _, _) = process(M.h, Tuple{Vector{Float64}})
# @test count(!isnothing, CI.stmts.inst) == 2
# stmt = CI.stmts.inst[end]
# @test isa(stmt, Core.ReturnNode) && !isdefined(stmt, :val)
# end
# end
Copy link
Member Author

Choose a reason for hiding this comment

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

It turns out that this testset hasn't been ran so far. Running it in a separate process with --check-bounds=auto --code-coverage=none options will solve issues, but I will leave it for another PR.

@aviatesk aviatesk merged commit f7b78c8 into master Sep 6, 2021
@aviatesk aviatesk deleted the avi/update branch September 6, 2021 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants