Got it, thanks!
I now do it on the large_function
in my case called RunSimulation
,
@report_opt target_modules=(@__MODULE__,)
:
βββββ 18 possible errors found βββββ
β kwcall(::@NamedTuple{FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}}, ::typeof(RunSimulation)) @ Main c:\git\SPHExample\example\MainSimulation.jl:58
ββ RunSimulation(; FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}) @ Main c:\git\SPHExample\example\MainSimulation.jl:74
ββ runtime dispatch detected: Core.kwcall(%16::@NamedTuple{NumberOfParticles::Int64}, %14::Type{SimulationDataResults{3, _A}} where _A)::SimulationDataResults{3}
ββββββββββββββββββββββ
ββ RunSimulation(; FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}) @ Main c:\git\SPHExample\example\MainSimulation.jl:78
ββ runtime dispatch detected: vcat(%53::AbstractVector, %54::AbstractVector)::Any
ββββββββββββββββββββββ
ββ RunSimulation(; FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}) @ Main c:\git\SPHExample\example\MainSimulation.jl:78
ββ runtime dispatch detected: Array(%55::Any)::Any
ββββββββββββββββββββββ
ββ RunSimulation(; FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}) @ Main c:\git\SPHExample\example\MainSimulation.jl:78
ββ runtime dispatch detected: Base.broadcasted(identity, %56::Any)::Any
ββββββββββββββββββββββ
ββ RunSimulation(; FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}) @ Main c:\git\SPHExample\example\MainSimulation.jl:78
ββ runtime dispatch detected: Base.materialize!(%20::Vector, %57::Any)::Any
ββββββββββββββββββββββ
ββ RunSimulation(; FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}) @ Main c:\git\SPHExample\example\MainSimulation.jl:95
ββ runtime dispatch detected: create_vtp_file(SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}, %17::SimulationDataResults{3})::Any
ββββββββββββββββββββββ
ββ RunSimulation(; FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}) @ Main c:\git\SPHExample\example\MainSimulation.jl:102ββ runtime dispatch detected: zeros(%3::DataType, %718::Tuple{Int64})::Vector
ββββββββββββββββββββββ
ββ RunSimulation(; FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}) @ Main c:\git\SPHExample\example\MainSimulation.jl:103ββ runtime dispatch detected: zeros(%734::Union{Type{Any}, Type{E} where E<:(SVector{3})}, %720::Tuple{Int64})::Vector{T} where T<:(SVector{3})
ββββββββββββββββββββββ
ββ RunSimulation(; FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}) @ Main c:\git\SPHExample\example\MainSimulation.jl:105ββ runtime dispatch detected: zeros(%3::DataType, %718::Tuple{Int64})::Vector
ββββββββββββββββββββββ
ββ RunSimulation(; FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}) @ Main c:\git\SPHExample\example\MainSimulation.jl:106ββ runtime dispatch detected: zeros(%734::Union{Type{Any}, Type{E} where E<:(SVector{3})}, %720::Tuple{Int64})::Vector{T} where T<:(SVector{3})
ββββββββββββββββββββββ
ββ RunSimulation(; FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}) @ Main c:\git\SPHExample\example\MainSimulation.jl:107ββ runtime dispatch detected: zeros(%734::Union{Type{Any}, Type{E} where E<:(SVector{3})}, %720::Tuple{Int64})::Vector{T} where T<:(SVector{3})
ββββββββββββββββββββββ
ββ RunSimulation(; FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}) @ Main c:\git\SPHExample\example\MainSimulation.jl:109ββ runtime dispatch detected: zeros(%3::DataType, %718::Tuple{Int64})::Vector
ββββββββββββββββββββββ
ββ RunSimulation(; FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}) @ Main c:\git\SPHExample\example\MainSimulation.jl:112ββ runtime dispatch detected: zeros(%734::Union{Type{Any}, Type{E} where E<:(SVector{3})}, %720::Tuple{Int64})::Vector{T} where T<:(SVector{3})
ββββββββββββββββββββββ
ββ RunSimulation(; FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}) @ Main c:\git\SPHExample\example\MainSimulation.jl:113ββ runtime dispatch detected: zeros(%734::Union{Type{Any}, Type{E} where E<:(SVector{3})}, %720::Tuple{Int64})::Vector{T} where T<:(SVector{3})
ββββββββββββββββββββββ
ββ RunSimulation(; FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}) @ Main c:\git\SPHExample\example\MainSimulation.jl:114ββ runtime dispatch detected: zeros(%3::DataType, %718::Tuple{Int64})::Vector
ββββββββββββββββββββββ
ββ RunSimulation(; FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}) @ Main c:\git\SPHExample\example\MainSimulation.jl:115ββ runtime dispatch detected: zeros(%3::DataType, %718::Tuple{Int64})::Vector
ββββββββββββββββββββββ
ββ RunSimulation(; FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}) @ Main c:\git\SPHExample\example\MainSimulation.jl:117ββ runtime dispatch detected: zeros(%3::DataType, %718::Tuple{Int64})::Vector
ββββββββββββββββββββββ
ββ RunSimulation(; FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}) @ Main c:\git\SPHExample\example\MainSimulation.jl:120ββ runtime dispatch detected: Core.kwcall(%791::NamedTuple{(:x, :cutoff, :parallel), <:Tuple{Array{SVector{3, _A}, 1} where _A, Float64, Bool}}, InPlaceNeighborList)::InPlaceNeighborList{B, _A, _B, CellListMap.NeighborList{Float64}} where {B<:(Box{NonPeriodicCell}), _A, _B}
ββββββββββββββββββββββ
@report_call target_modules=(@__MODULE__,)
:
No errors detected
@code_warntype
:
MethodInstance for Core.kwcall(::@NamedTuple{FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}}, ::typeof(RunSimulation))
from kwcall(::NamedTuple, ::typeof(RunSimulation)) @ Main c:\git\SPHExample\example\MainSimulation.jl:58
Arguments
_::Core.Const(Core.kwcall)
@_2::@NamedTuple{FluidCSV::String, BoundCSV::String, SimulationMetaData::SimulationMetaData, SimulationConstants::SimulationConstants{Float64}}
@_3::Core.Const(RunSimulation)
Locals
@_4::Union{SimulationConstants{Float64}, String, SimulationMetaData}
FluidCSV::String
BoundCSV::String
SimulationMetaData::SimulationMetaData
SimulationConstants::SimulationConstants{Float64}
Body::Bool
1 ββ Core.NewvarNode(:(@_4))
β %2 = Core.isdefined(@_2, :FluidCSV)::Core.Const(true)
ββββ goto #6 if not %2
2 ββ %4 = Core.getfield(@_2, :FluidCSV)::String
β %5 = (%4 isa Main.String)::Core.Const(true)
ββββ goto #4 if not %5
3 ββ goto #5
4 ββ Core.Const(:(%new(Core.TypeError, Symbol("keyword argument"), :FluidCSV, Main.String, %4)))
ββββ Core.Const(:(Core.throw(%8)))
5 ββ (@_4 = %4)
ββββ goto #7
6 ββ Core.Const(:(Core.UndefKeywordError(:FluidCSV)))
ββββ Core.Const(:(@_4 = Core.throw(%12)))
7 ββ %14 = @_4::String
β (FluidCSV = %14)
β %16 = Core.isdefined(@_2, :BoundCSV)::Core.Const(true)
ββββ goto #12 if not %16
8 ββ %18 = Core.getfield(@_2, :BoundCSV)::String
β %19 = (%18 isa Main.String)::Core.Const(true)
ββββ goto #10 if not %19
9 ββ goto #11
10 β Core.Const(:(%new(Core.TypeError, Symbol("keyword argument"), :BoundCSV, Main.String, %18)))
ββββ Core.Const(:(Core.throw(%22)))
11 β (@_4 = %18)
ββββ goto #13
12 β Core.Const(:(Core.UndefKeywordError(:BoundCSV)))
ββββ Core.Const(:(@_4 = Core.throw(%26)))
13 β %28 = @_4::String
β (BoundCSV = %28)
β %30 = Core.isdefined(@_2, :SimulationMetaData)::Core.Const(true)
ββββ goto #18 if not %30
14 β %32 = Core.getfield(@_2, :SimulationMetaData)::SimulationMetaData
β %33 = (%32 isa Main.SimulationMetaData)::Core.Const(true)
ββββ goto #16 if not %33
15 β goto #17
16 β Core.Const(:(%new(Core.TypeError, Symbol("keyword argument"), :SimulationMetaData, Main.SimulationMetaData, %32)))
ββββ Core.Const(:(Core.throw(%36)))
17 β (@_4 = %32)
ββββ goto #19
18 β Core.Const(:(Core.UndefKeywordError(:SimulationMetaData)))
ββββ Core.Const(:(@_4 = Core.throw(%40)))
19 β %42 = @_4::SimulationMetaData
β (SimulationMetaData = %42)
β %44 = Core.isdefined(@_2, :SimulationConstants)::Core.Const(true)
ββββ goto #24 if not %44
20 β %46 = Core.getfield(@_2, :SimulationConstants)::SimulationConstants{Float64}
β %47 = (%46 isa Main.SimulationConstants)::Core.Const(true)
ββββ goto #22 if not %47
21 β goto #23
22 β Core.Const(:(%new(Core.TypeError, Symbol("keyword argument"), :SimulationConstants, Main.SimulationConstants, %46)))
ββββ Core.Const(:(Core.throw(%50)))
23 β (@_4 = %46)
ββββ goto #25
24 β Core.Const(:(Core.UndefKeywordError(:SimulationConstants)))
ββββ Core.Const(:(@_4 = Core.throw(%54)))
25 β %56 = @_4::SimulationConstants{Float64}
β (SimulationConstants = %56)
β %58 = (:FluidCSV, :BoundCSV, :SimulationMetaData, :SimulationConstants)::Core.Const((:FluidCSV, :BoundCSV, :SimulationMetaData, :SimulationConstants))
β %59 = Core.apply_type(Core.NamedTuple, %58)::Core.Const(NamedTuple{(:FluidCSV, :BoundCSV, :SimulationMetaData, :SimulationConstants)})
β %60 = Base.structdiff(@_2, %59)::Core.Const(NamedTuple())
β %61 = Base.pairs(%60)::Core.Const(Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}())
β %62 = Base.isempty(%61)::Core.Const(true)
ββββ goto #27 if not %62
26 β goto #28
27 β Core.Const(:(Base.kwerr(@_2, @_3)))
28 β %66 = Main.:(var"#RunSimulation#25")(FluidCSV, BoundCSV, SimulationMetaData, SimulationConstants, @_3)::Core.Const(false)
ββββ return %66
Is this more a long the lines what you asked for?