Skip to content

Commit 0c209e2

Browse files
authored
Revert "Identify used SSAValues from within :struct_type Exprs (#30936)" (#33082)
This reverts commit c1e2760.
1 parent 2af5c86 commit 0c209e2

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

base/compiler/ssair/ir.jl

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -394,26 +394,11 @@ iterate(it::UseRefIterator) = (it.use[1].op = 0; iterate(it, nothing))
394394
end
395395
end
396396

397-
function scan_ssa_use_recursive!(push!, used, @nospecialize(a))
398-
if isa(a, SSAValue)
399-
push!(used, a.id)
400-
elseif isa(a, Expr)
401-
for aa in a.args
402-
scan_ssa_use_recursive!(push!, used, aa)
403-
end
404-
end
405-
return used
406-
end
407-
408397
# This function is used from the show code, which may have a different
409398
# `push!`/`used` type since it's in Base.
410399
function scan_ssa_use!(push!, used, @nospecialize(stmt))
411400
if isa(stmt, SSAValue)
412401
push!(used, stmt.id)
413-
elseif isexpr(stmt, :struct_type)
414-
for a in stmt.args
415-
scan_ssa_use_recursive!(push!, used, a)
416-
end
417402
end
418403
for useref in userefs(stmt)
419404
val = useref[]

test/compiler/ssair.jl

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -81,23 +81,6 @@ let
8181
# XXX: missing @test
8282
end
8383

84-
let
85-
ex = quote
86-
function fouter(x)
87-
finner(::Float16) = 2x
88-
return finner(Float16(1))
89-
end
90-
end
91-
thunk1 = Meta.lower(Main, ex)
92-
thunk2 = thunk1.args[1].code[2]
93-
code = thunk2.args[1]
94-
used = BitSet()
95-
for stmt in code.code
96-
Compiler.scan_ssa_use!(push!, used, stmt)
97-
end
98-
@test !isempty(used)
99-
end
100-
10184
for compile in ("min", "yes")
10285
cmd = `$(Base.julia_cmd()) --compile=$compile interpreter_exec.jl`
10386
if !success(pipeline(Cmd(cmd, dir=@__DIR__); stdout=stdout, stderr=stderr))

0 commit comments

Comments
 (0)