Skip to content

Commit 35976df

Browse files
authored
ircode: cleanup code crud (#56724)
- 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
2 parents e48bf8c + 1b37a2f commit 35976df

File tree

5 files changed

+306
-212
lines changed

5 files changed

+306
-212
lines changed

Compiler/test/interpreter_exec.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ let m = Meta.@lower 1 + 1
2323
]
2424
nstmts = length(src.code)
2525
src.ssavaluetypes = nstmts
26-
src.ssaflags = fill(UInt8(0x00), nstmts)
26+
src.ssaflags = fill(zero(UInt32), nstmts)
2727
src.debuginfo = Core.DebugInfo(:none)
2828
Compiler.verify_ir(Compiler.inflate_ir(src))
2929
global test29262 = true
@@ -63,7 +63,7 @@ let m = Meta.@lower 1 + 1
6363
]
6464
nstmts = length(src.code)
6565
src.ssavaluetypes = nstmts
66-
src.ssaflags = fill(UInt8(0x00), nstmts)
66+
src.ssaflags = fill(zero(UInt32), nstmts)
6767
src.debuginfo = Core.DebugInfo(:none)
6868
m.args[1] = copy(src)
6969
Compiler.verify_ir(Compiler.inflate_ir(src))
@@ -103,7 +103,7 @@ let m = Meta.@lower 1 + 1
103103
]
104104
nstmts = length(src.code)
105105
src.ssavaluetypes = nstmts
106-
src.ssaflags = fill(UInt8(0x00), nstmts)
106+
src.ssaflags = fill(zero(UInt32), nstmts)
107107
src.debuginfo = Core.DebugInfo(:none)
108108
Compiler.verify_ir(Compiler.inflate_ir(src))
109109
global test29262 = true

src/clangsa/GCChecker.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,8 @@ bool GCChecker::isGCTrackedType(QualType QT) {
847847
Name.ends_with_insensitive("jl_vararg_t") ||
848848
Name.ends_with_insensitive("jl_opaque_closure_t") ||
849849
Name.ends_with_insensitive("jl_globalref_t") ||
850-
// Probably not technically true for these, but let's allow it
850+
// Probably not technically true for these, but let's allow it as a root
851+
Name.ends_with_insensitive("jl_ircode_state") ||
851852
Name.ends_with_insensitive("typemap_intersection_env") ||
852853
Name.ends_with_insensitive("interpreter_state") ||
853854
Name.ends_with_insensitive("jl_typeenv_t") ||

0 commit comments

Comments
 (0)