From 99dc7820c76ad4a011c78007f0d6715759bd7605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pasteur?= Date: Mon, 22 Apr 2013 18:11:10 +0200 Subject: [PATCH] Avoid crash in memalloc Check if both variables are optmized --- compiler/minils/analysis/interference.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/minils/analysis/interference.ml b/compiler/minils/analysis/interference.ml index d03cfb4..8a42ae5 100644 --- a/compiler/minils/analysis/interference.ml +++ b/compiler/minils/analysis/interference.ml @@ -257,7 +257,7 @@ end (** Helper functions to work with the multiple interference graphs *) let by_ivar def f x y = - if World.is_optimized x then ( + if World.is_optimized x && World.is_optimized y then ( let igx, nodex = World.node_for_ivar x in let igy, nodey = World.node_for_ivar y in if igx == igy then @@ -268,7 +268,7 @@ let by_ivar def f x y = def let by_name def f x y = - if World.is_optimized (Ivar x) then ( + if World.is_optimized (Ivar x) && World.is_optimized (Ivar y) then ( let igx, nodex = World.node_for_name x in let igy, nodey = World.node_for_name y in if igx == igy then