summaryrefslogtreecommitdiff
path: root/vaporize/library/LIRVar.java
diff options
context:
space:
mode:
authorbd-912 <bdunahu@colostate.edu>2024-04-21 01:17:31 -0600
committerbd-912 <bdunahu@colostate.edu>2024-04-21 01:17:31 -0600
commit110b4f031aea36445250d79c7257a57f15fb7b82 (patch)
treeb4c03e84b05a009e1c9b978f13c5887de2b59764 /vaporize/library/LIRVar.java
parent04fd097fb51346f655c7bdc0c88b85e29359ef1c (diff)
Fix bugs in LiveInterval, successfully calculate (gapless) LIR
Diffstat (limited to 'vaporize/library/LIRVar.java')
-rw-r--r--vaporize/library/LIRVar.java10
1 files changed, 7 insertions, 3 deletions
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<LIRVar> {
}
@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<LIRVar> {
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;
}