Skip to content

Commit ad8f1bc

Browse files
authored
Merge pull request #275 from JuliaCI/kf/dcebarrier
Make use of Base.donotdelete if available
2 parents 4da9aaf + 56df665 commit ad8f1bc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/execution.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,9 @@ function generate_benchmark_definition(eval_module, out_vars, setup_vars, quote_
479479
invocation = :($(Expr(:tuple, out_vars...)) = $(signature))
480480
core_body = :($(core); $(returns))
481481
end
482+
if isdefined(Base, :donotdelete)
483+
invocation = :(Base.donotdelete($invocation))
484+
end
482485
return Core.eval(eval_module, quote
483486
@noinline $(signature_def) = begin $(core_body) end
484487
@noinline function $(samplefunc)($(Expr(:tuple, quote_vars...)), __params::$BenchmarkTools.Parameters)
@@ -611,4 +614,4 @@ macro bprofile(args...)
611614
$BenchmarkTools.Profile.clear()
612615
$BenchmarkTools.@profile $BenchmarkTools.run($tmp)
613616
end)
614-
end
617+
end

0 commit comments

Comments
 (0)