Open
Description
julia/base/compiler/ssair/passes.jl
Lines 579 to 584 in a400a24
Since the key type of lifting_cache
is Pair{AnySSAValue, Any}
, this query of cache key existence is broken,
and so lifting_cache
is actually never be used at this moment.
Though the fix doesn't seem to be that easy. I tried the following diff, but failed to bootstrap.
diff --git a/base/compiler/ssair/passes.jl b/base/compiler/ssair/passes.jl
index 51b5ec076f..137985ac8e 100644
--- a/base/compiler/ssair/passes.jl
+++ b/base/compiler/ssair/passes.jl
@@ -552,15 +552,15 @@ function perform_lifting!(compact::IncrementalCompact,
# Insert PhiNodes
lifted_phis = LiftedPhi[]
for item in visited_phinodes
- # FIXME this cache retrieval is obviously broken
- if (item, cache_key) in keys(lifting_cache)
- ssa = lifting_cache[Pair{AnySSAValue, Any}(item, cache_key)]
+ ckey = Pair{AnySSAValue, Any}(item, cache_key)
+ if ckey in keys(lifting_cache)
+ ssa = lifting_cache[ckey]
push!(lifted_phis, LiftedPhi(ssa, compact[ssa]::PhiNode, false))
continue
end
n = PhiNode()
ssa = insert_node!(compact, item, effect_free(NewInstruction(n, result_t)))
- lifting_cache[Pair{AnySSAValue, Any}(item, cache_key)] = ssa
+ lifting_cache[ckey] = ssa
push!(lifted_phis, LiftedPhi(ssa, n, true))
end
/cc @Keno
Activity