From a5fb869640c0f35bd6b02e223ec03d7187a80c49 Mon Sep 17 00:00:00 2001 From: Sathya Gunasekaran Date: Thu, 27 Oct 2022 16:43:34 +0100 Subject: [PATCH] [hir] Skip backedges when handling phis These will be handled later during Environment.merge, no need to set an empty Set as value. --- compiler/forget/src/HIR/InferReferenceEffects.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/forget/src/HIR/InferReferenceEffects.ts b/compiler/forget/src/HIR/InferReferenceEffects.ts index 34985dbaed..7b8a126f3a 100644 --- a/compiler/forget/src/HIR/InferReferenceEffects.ts +++ b/compiler/forget/src/HIR/InferReferenceEffects.ts @@ -410,7 +410,10 @@ class Environment { values.add(v); } } - this.#variables.set(phi.id.id, values); + + if (values.size > 0) { + this.#variables.set(phi.id.id, values); + } } }