Skip to content

Commit e922fb9

Browse files
#57 If the interference does not exist then return early.
The eq() function illustrates a scenario that causes rename() call to interference graph for non-existent interference. This occurs with the Boissinot simple SSA destruction but not with the Briggs version.
1 parent d71d2a7 commit e922fb9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

optvm/src/main/java/com/compilerprogramming/ezlang/compiler/InterferenceGraph.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ public boolean interfere(Integer from, Integer to) {
6262
public void rename(Integer source, Integer target) {
6363
// Move all interferences
6464
var fromSet = edges.remove(source);
65+
if (fromSet == null) {
66+
// FIXME figure out why
67+
// Test case testSSA21 / when run using Boissinot SSA Destruction without coalescing
68+
// This is eq() function in mergesort test case
69+
return;
70+
}
6571
var toSet = edges.get(target);
6672
if (toSet == null) {
6773
//throw new RuntimeException("Cannot find edge " + target + " from " + source);

0 commit comments

Comments
 (0)