Skip to content

BoundsError in dce! #54

Closed
Closed
@YingboMa

Description

@YingboMa

MWE:

using BandedMatrices, BlockArrays, BlockBandedMatrices, Cthulhu
A = BandedBlockBandedMatrix(Ones(10000, 10000), (fill(100, 100), fill(100, 100)), (1, 1), (1, 1))
λ,μ = subblockbandwidths(A)
J=Block.(1:nblocks(A,2))[1]; K=BlockBandedMatrices.blockcolrange(A,J)[1]
V = view(A,K,J)
data = BlockBandedMatrices.bandeddata(V)
@descend data[1]
julia> @descend data[1]
ERROR: BoundsError: attempt to access 0-element Array{Core.Compiler.NewNode,1} at index [7]
Stacktrace:
 [1] getindex at ./array.jl:742 [inlined]
 [2] getindex at ./compiler/ssair/ir.jl:738 [inlined]
 [3] abstract_eval_ssavalue at ./compiler/ssair/queries.jl:68 [inlined]
 [4] argextype(::Any, ::Core.Compiler.IncrementalCompact, ::Array{Any,1}, ::Array{Any,1}) at ./compiler/utilities.jl:173
 [5] argextype at ./compiler/utilities.jl:159 [inlined]
 [6] stmt_effect_free(::Any, ::Any, ::Core.Compiler.IncrementalCompact, ::Array{Any,1}) at ./compiler/ssair/queries.jl:37
 [7] maybe_erase_unused!(::Array{Int64,1}, ::Core.Compiler.IncrementalCompact, ::Int64, ::getfield(Core.Compiler, Symbol("##224#225"))) at ./compiler/ssair/ir.jl:1175
 [8] maybe_erase_unused! at ./compiler/ssair/ir.jl:1170 [inlined]
 [9] simple_dce!(::Core.Compiler.IncrementalCompact) at ./compiler/ssair/ir.jl:1262
 [10] finish at ./compiler/ssair/ir.jl:1285 [inlined]
 [11] dce!(::Core.CodeInfo, ::Core.MethodInstance) at /home/scheme/.julia/dev/Cthulhu/src/reflection.jl:164
 [12] preprocess_ci!(::Core.CodeInfo, ::Core.MethodInstance, ::Bool) at /home/scheme/.julia/dev/Cthulhu/src/reflection.jl:192
 [13] #_descend#38(::Bool, ::Core.Compiler.Params, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Cthulhu._descend), ::Core.MethodInstance) at /home/scheme/.julia/dev/Cthulhu/src/Cthulhu.jl:122
 [14] #_descend at ./none:0 [inlined]
 [15] #_descend#43(::Core.Compiler.Params, ::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:iswarn,),Tuple{Bool}}}, ::typeof(Cthulhu._descend), ::Any, ::Any) at /home/scheme/.julia/dev/Cthulhu/src/Cthulhu.jl:211
 [16] #_descend at ./none:0 [inlined]
 [17] #_descend_with_error_handling#37(::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:iswarn,),Tuple{Bool}}}, ::typeof(Cthulhu._descend_with_error_handling), ::Function, ::Any) at /home/scheme/.julia/dev/Cthulhu/src/Cthulhu.jl:88
 [18] #_descend_with_error_handling at ./none:0 [inlined]
 [19] #descend_code_typed#35 at /home/scheme/.julia/dev/Cthulhu/src/Cthulhu.jl:62 [inlined]
 [20] descend_code_typed(::Function, ::Any) at /home/scheme/.julia/dev/Cthulhu/src/Cthulhu.jl:62
 [21] top-level scope at REPL[21]:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions