Skip to content

Commit

Permalink
Further absint improvements (#2140)
Browse files Browse the repository at this point in the history
* Further absint improvements

* Update Project.toml

---------

Co-authored-by: William Moses <[email protected]>
  • Loading branch information
wsmoses and William Moses authored Nov 28, 2024
1 parent 30b6b2d commit 6746e5a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
20 changes: 14 additions & 6 deletions src/absint.jl
Original file line number Diff line number Diff line change
Expand Up @@ -576,12 +576,20 @@ function abs_typeof(
end
end
if !seen && typed_fieldcount(typ) > 0
offset = offset - typed_fieldoffset(typ, lasti)
typ = typed_fieldtype(typ, lasti)
@assert Base.isconcretetype(typ)
if !Base.allocatedinline(typ)
legal = false
end
offset = offset - typed_fieldoffset(typ, lasti)
typ = typed_fieldtype(typ, lasti)
if offset == 0
if !Base.allocatedinline(typ)
if byref != GPUCompiler.BITS_VALUE
legal = false
end
byref = GPUCompiler.MUT_REF
end
else
if !Base.isconcretetype(typ) || !Base.allocatedinline(typ)
legal = false
end
end
seen = true
end
if !seen
Expand Down
2 changes: 1 addition & 1 deletion src/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6177,7 +6177,7 @@ function GPUCompiler.codegen(
)
params = job.config.params
if params.run_enzyme
@assert eltype(params.rt) != Union{}
# @assert eltype(params.rt) != Union{}
end
expectedTapeType = params.expectedTapeType
mode = params.mode
Expand Down

0 comments on commit 6746e5a

Please sign in to comment.