From 110b4f031aea36445250d79c7257a57f15fb7b82 Mon Sep 17 00:00:00 2001 From: bd-912 Date: Sun, 21 Apr 2024 01:17:31 -0600 Subject: Fix bugs in LiveInterval, successfully calculate (gapless) LIR --- vaporize/library/LIRVar.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'vaporize/library/LIRVar.java') diff --git a/vaporize/library/LIRVar.java b/vaporize/library/LIRVar.java index 4fab8c8..eb3508b 100644 --- a/vaporize/library/LIRVar.java +++ b/vaporize/library/LIRVar.java @@ -23,10 +23,9 @@ public class LIRVar implements Comparable { } @Override public boolean equals(Object other) { - LIRVar o; return (other instanceof LIRVar && - ((o = (LIRVar) other)).alias.equals(this.alias) && - o.interval.equals(this.interval)) || + ((LIRVar) other).alias.equals(this.alias) && + ((LIRVar) other).interval.equals(this.interval)) || (other instanceof String && this.alias.equals((String) other)); } @@ -55,6 +54,11 @@ public class LIRVar implements Comparable { if (ret) this.interval.last_use = last_use; + else + MinimalLogger.info(String.format("Bad order! %s %d >= %d", + this.alias, + this.interval.last_use, + last_use)); return ret; } -- cgit v1.2.3