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

Fix @test_inlined on nightly #1112

Merged
merged 1 commit into from
Dec 5, 2022
Merged
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
13 changes: 11 additions & 2 deletions test/testutil.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,17 @@ macro test_inlined(ex, should_inline=true)
ex_orig = ex
ex = macroexpand(@__MODULE__, :(@code_llvm $ex))
expr = quote
code_str = sprint() do io
code_llvm(io, $(map(esc, ex.args[2:end])...))
@static if hasfield(Base.CodegenParams, :safepoint_on_entry)
code_str = let params = Base.CodegenParams(safepoint_on_entry=false),
f = $(esc(ex.args[2])),
t = $(esc(ex.args[3]))
d = InteractiveUtils._dump_function(f, t, false, false, true, false, :att, true, :none, false, params)
sprint(print, d)
end
else
code_str = sprint() do io
code_llvm(io, $(map(esc, ex.args[2:end])...))
end
end
# Crude detection of call instructions remaining within what should be
# fully inlined code.
Expand Down