diff --git a/src/main/java/dk/camelot64/kickc/Compiler.java b/src/main/java/dk/camelot64/kickc/Compiler.java index a0cc5a532..5318b1162 100644 --- a/src/main/java/dk/camelot64/kickc/Compiler.java +++ b/src/main/java/dk/camelot64/kickc/Compiler.java @@ -79,7 +79,7 @@ public class Compiler { program.getLog().append(program.getRegisterUpliftProgram().toString((program.getVariableRegisterWeights()))); // Attempt uplifting registers through a lot of combinations - new Pass3RegisterUpliftCombinations(program).performUplift(10_000); + new Pass3RegisterUpliftCombinations(program).performUplift(30_000); // Attempt uplifting registers one at a time to catch remaining potential not realized by combination search new Pass3RegisterUpliftRemains(program).performUplift(); diff --git a/src/main/java/dk/camelot64/kickc/icl/RegisterCombination.java b/src/main/java/dk/camelot64/kickc/icl/RegisterCombination.java index 6afc162c1..af95320de 100644 --- a/src/main/java/dk/camelot64/kickc/icl/RegisterCombination.java +++ b/src/main/java/dk/camelot64/kickc/icl/RegisterCombination.java @@ -19,6 +19,10 @@ public class RegisterCombination { allocation.put(equivalenceClass, register); } + public RegisterAllocation.Register getRegister(LiveRangeEquivalenceClass equivalenceClass) { + return allocation.get(equivalenceClass); + } + /** * Allocate the registers of the combination into the programs register allocation */ diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass3RegisterUpliftCombinations.java b/src/main/java/dk/camelot64/kickc/passes/Pass3RegisterUpliftCombinations.java index 54905c085..025dc5462 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass3RegisterUpliftCombinations.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass3RegisterUpliftCombinations.java @@ -28,6 +28,9 @@ public class Pass3RegisterUpliftCombinations extends Pass2Base { int countCombinations = 0; while (combinationIterator.hasNext() && countCombinations