Skip to content

Commit 72bfb1b

Browse files
committed
ircode: avoid serializing ssaflags in the common case when they are all zero
When not all-zero, run-length encoding would also probably be great here for lowered code (before inference).
1 parent 9286471 commit 72bfb1b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

0 commit comments

Comments
 (0)