Skip to content

Commit

Permalink
Fix non data type
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Dec 31, 2024
1 parent 1b19f39 commit 94620d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ function zero_single_allocation(builder::LLVM.IRBuilder, @nospecialize(jlType::D
T_prjlvalue = LLVM.PointerType(T_jlvalue, Tracked)
T_prjlvalue_UT = LLVM.PointerType(T_jlvalue)

todo = Tuple{Vector{LLVM.Value},LLVM.LLVMType,DataType}[(
todo = Tuple{Vector{LLVM.Value},LLVM.LLVMType,Type}[(
LLVM.Value[idx],
LLVMType,
jlType,
Expand Down Expand Up @@ -803,6 +803,7 @@ function zero_single_allocation(builder::LLVM.IRBuilder, @nospecialize(jlType::D
continue
end
if isa(ty, LLVM.ArrayType)
@assert jlty isa DataType
for i = 1:length(ty)
npath = copy(path)
push!(npath, LLVM.ConstantInt(LLVM.IntType(32), i - 1))
Expand All @@ -811,6 +812,7 @@ function zero_single_allocation(builder::LLVM.IRBuilder, @nospecialize(jlType::D
continue
end
if isa(ty, LLVM.VectorType)
@assert jlty isa DataType
for i = 1:size(ty)
npath = copy(path)
push!(npath, LLVM.ConstantInt(LLVM.IntType(32), i - 1))
Expand All @@ -820,6 +822,7 @@ function zero_single_allocation(builder::LLVM.IRBuilder, @nospecialize(jlType::D
end
if isa(ty, LLVM.StructType)
i = 1
@assert jlty isa DataType
for ii = 1:fieldcount(jlty)
jlet = typed_fieldtype(jlty, ii)
if isghostty(jlet) || Core.Compiler.isconstType(jlet)
Expand Down

0 comments on commit 94620d4

Please sign in to comment.