From 9f5efab3ee3b4661349b327dd4958dca29aa592a Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Mon, 7 Aug 2017 17:17:14 +0200 Subject: [PATCH] Less logging during uplift. --- .../java/dk/camelot64/kickc/Compiler.java | 2 +- .../kickc/icl/RegisterCombination.java | 4 + .../Pass3RegisterUpliftCombinations.java | 39 +- .../passes/Pass3RegisterUpliftRemains.java | 44 +- .../dk/camelot64/kickc/test/ref/voronoi.asm | 79 +- .../dk/camelot64/kickc/test/ref/voronoi.log | 10769 +--------------- .../dk/camelot64/kickc/test/ref/voronoi.sym | 54 +- 7 files changed, 324 insertions(+), 10667 deletions(-) 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