Skip to content

Commit

Permalink
ircode: cleanup code crud (#56724)
Browse files Browse the repository at this point in the history
 - support gc running
 - don't duplicate field 4
- remove some unused code only previously needed for handling cycles
(which are not valid in IR)
- avoid serializing ssaflags, which are very large (relative to the rest
of the IR) and usually all zeros

sysimg : 159 MB => 157 MB => 154 MB
du -sh usr/share/julia/compiled : 260M => 256 MB => 254 MB
  • Loading branch information
vtjnash authored Dec 4, 2024
2 parents e48bf8c + 1b37a2f commit 35976df
Show file tree
Hide file tree
Showing 5 changed files with 306 additions and 212 deletions.
6 changes: 3 additions & 3 deletions Compiler/test/interpreter_exec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let m = Meta.@lower 1 + 1
]
nstmts = length(src.code)
src.ssavaluetypes = nstmts
src.ssaflags = fill(UInt8(0x00), nstmts)
src.ssaflags = fill(zero(UInt32), nstmts)
src.debuginfo = Core.DebugInfo(:none)
Compiler.verify_ir(Compiler.inflate_ir(src))
global test29262 = true
Expand Down Expand Up @@ -63,7 +63,7 @@ let m = Meta.@lower 1 + 1
]
nstmts = length(src.code)
src.ssavaluetypes = nstmts
src.ssaflags = fill(UInt8(0x00), nstmts)
src.ssaflags = fill(zero(UInt32), nstmts)
src.debuginfo = Core.DebugInfo(:none)
m.args[1] = copy(src)
Compiler.verify_ir(Compiler.inflate_ir(src))
Expand Down Expand Up @@ -103,7 +103,7 @@ let m = Meta.@lower 1 + 1
]
nstmts = length(src.code)
src.ssavaluetypes = nstmts
src.ssaflags = fill(UInt8(0x00), nstmts)
src.ssaflags = fill(zero(UInt32), nstmts)
src.debuginfo = Core.DebugInfo(:none)
Compiler.verify_ir(Compiler.inflate_ir(src))
global test29262 = true
Expand Down
3 changes: 2 additions & 1 deletion src/clangsa/GCChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,8 @@ bool GCChecker::isGCTrackedType(QualType QT) {
Name.ends_with_insensitive("jl_vararg_t") ||
Name.ends_with_insensitive("jl_opaque_closure_t") ||
Name.ends_with_insensitive("jl_globalref_t") ||
// Probably not technically true for these, but let's allow it
// Probably not technically true for these, but let's allow it as a root
Name.ends_with_insensitive("jl_ircode_state") ||
Name.ends_with_insensitive("typemap_intersection_env") ||
Name.ends_with_insensitive("interpreter_state") ||
Name.ends_with_insensitive("jl_typeenv_t") ||
Expand Down
Loading

0 comments on commit 35976df

Please sign in to comment.