From db6c1f54db858587eba4312073693f2f01f6811f Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Fri, 29 Dec 2017 13:53:16 +0100 Subject: [PATCH] Improved log format slightly --- src/main/java/dk/camelot64/kickc/Compiler.java | 15 ++++++++------- .../dk/camelot64/kickc/test/TestPrograms.java | 2 ++ .../dk/camelot64/kickc/test/ref/arrays-init.log | 2 +- .../dk/camelot64/kickc/test/ref/asm-clobber.log | 4 ++-- .../camelot64/kickc/test/ref/bitmap-bresenham.log | 4 ++-- .../camelot64/kickc/test/ref/bitmap-plotter.log | 4 ++-- .../dk/camelot64/kickc/test/ref/bresenham.log | 4 ++-- .../dk/camelot64/kickc/test/ref/bresenhamarr.log | 4 ++-- .../camelot64/kickc/test/ref/callconstparam.log | 4 ++-- .../java/dk/camelot64/kickc/test/ref/casting.log | 4 ++-- .../java/dk/camelot64/kickc/test/ref/chargen.log | 4 ++-- .../kickc/test/ref/const-identification.log | 4 ++-- .../dk/camelot64/kickc/test/ref/constabsmin.log | 2 +- .../kickc/test/ref/constant-string-concat.log | 4 ++-- .../dk/camelot64/kickc/test/ref/constantmin.log | 4 ++-- .../dk/camelot64/kickc/test/ref/constants.log | 4 ++-- .../dk/camelot64/kickc/test/ref/double-import.log | 2 +- .../java/dk/camelot64/kickc/test/ref/fibmem.log | 4 ++-- .../dk/camelot64/kickc/test/ref/fillscreen.log | 4 ++-- .../dk/camelot64/kickc/test/ref/flipper-rex2.log | 4 ++-- .../dk/camelot64/kickc/test/ref/forclassicmin.log | 4 ++-- .../kickc/test/ref/forincrementassign.log | 4 ++-- .../dk/camelot64/kickc/test/ref/forrangemin.log | 4 ++-- .../java/dk/camelot64/kickc/test/ref/halfscii.log | 4 ++-- .../java/dk/camelot64/kickc/test/ref/ifmin.log | 4 ++-- .../java/dk/camelot64/kickc/test/ref/immzero.log | 4 ++-- .../dk/camelot64/kickc/test/ref/importing.log | 2 +- .../java/dk/camelot64/kickc/test/ref/incd020.log | 4 ++-- .../camelot64/kickc/test/ref/incrementinarray.log | 4 ++-- .../dk/camelot64/kickc/test/ref/inline-asm.log | 2 +- .../kickc/test/ref/inline-assignment.log | 4 ++-- .../dk/camelot64/kickc/test/ref/inline-string.log | 4 ++-- .../dk/camelot64/kickc/test/ref/inline-word.log | 4 ++-- .../kickc/test/ref/inlinearrayproblem.log | 4 ++-- .../kickc/test/ref/inmem-const-array.log | 4 ++-- .../dk/camelot64/kickc/test/ref/inmemarray.log | 4 ++-- .../dk/camelot64/kickc/test/ref/inmemstring.log | 4 ++-- .../dk/camelot64/kickc/test/ref/iterarray.log | 4 ++-- .../java/dk/camelot64/kickc/test/ref/literals.log | 4 ++-- .../kickc/test/ref/liverange-call-problem.log | 2 +- .../dk/camelot64/kickc/test/ref/liverange.log | 2 +- .../dk/camelot64/kickc/test/ref/local-string.log | 4 ++-- .../java/dk/camelot64/kickc/test/ref/loopmin.log | 4 ++-- .../java/dk/camelot64/kickc/test/ref/loopnest.log | 4 ++-- .../dk/camelot64/kickc/test/ref/loopnest2.log | 4 ++-- .../dk/camelot64/kickc/test/ref/loopsplit.log | 4 ++-- .../dk/camelot64/kickc/test/ref/modglobal.log | 2 +- .../dk/camelot64/kickc/test/ref/modglobalmin.log | 2 +- .../java/dk/camelot64/kickc/test/ref/multiply.log | 4 ++-- .../kickc/test/ref/overlap-allocation-2.log | 4 ++-- .../kickc/test/ref/overlap-allocation.log | 4 ++-- .../dk/camelot64/kickc/test/ref/print-problem.log | 2 +- .../java/dk/camelot64/kickc/test/ref/printmsg.log | 4 ++-- .../dk/camelot64/kickc/test/ref/ptr-complex.log | 4 ++-- .../java/dk/camelot64/kickc/test/ref/ptrtest.log | 4 ++-- .../dk/camelot64/kickc/test/ref/ptrtestmin.log | 4 ++-- .../camelot64/kickc/test/ref/scroll-clobber.log | 4 ++-- .../java/dk/camelot64/kickc/test/ref/scroll.log | 4 ++-- .../dk/camelot64/kickc/test/ref/scrollbig.log | 4 ++-- .../dk/camelot64/kickc/test/ref/signed-bytes.log | 4 ++-- .../dk/camelot64/kickc/test/ref/signed-words.log | 4 ++-- .../dk/camelot64/kickc/test/ref/sinus-basic.log | 4 ++-- .../dk/camelot64/kickc/test/ref/sinus-sprites.log | 4 ++-- .../java/dk/camelot64/kickc/test/ref/summin.log | 2 +- .../kickc/test/ref/true-inline-words.log | 2 +- .../dk/camelot64/kickc/test/ref/unused-method.log | 2 +- .../dk/camelot64/kickc/test/ref/unused-vars.log | 4 ++-- .../dk/camelot64/kickc/test/ref/useglobal.log | 2 +- .../java/dk/camelot64/kickc/test/ref/voronoi.log | 4 ++-- .../java/dk/camelot64/kickc/test/ref/wordexpr.log | 4 ++-- .../dk/camelot64/kickc/test/ref/zpparammin.log | 4 ++-- .../java/dk/camelot64/kickc/test/ref/zpptr.log | 4 ++-- 72 files changed, 136 insertions(+), 133 deletions(-) diff --git a/src/main/java/dk/camelot64/kickc/Compiler.java b/src/main/java/dk/camelot64/kickc/Compiler.java index 42617164d..ebe137149 100644 --- a/src/main/java/dk/camelot64/kickc/Compiler.java +++ b/src/main/java/dk/camelot64/kickc/Compiler.java @@ -126,8 +126,8 @@ public class Compiler { //getLog().append("CONTROL FLOW GRAPH"); //getLog().append(program.getGraph().toString(program)); - new Pass1ModifiedVarsAnalysis(program).execute(); getLog().append("PROCEDURE MODIFY VARIABLE ANALYSIS"); + new Pass1ModifiedVarsAnalysis(program).execute(); getLog().append(program.getProcedureModifiedVars().toString(program)); new Pass1ProcedureCallParameters(program).generate(); @@ -140,6 +140,7 @@ public class Compiler { //getLog().append(program.getGraph().toString(program)); program.setGraph(new Pass1ProcedureCallsReturnValue(program).generate()); + getLog().append("\nCONTROL FLOW GRAPH SSA WITH ASSIGNMENT CALL & RETURN"); getLog().append(program.getGraph().toString(program)); @@ -220,8 +221,8 @@ public class Compiler { new Pass3AddNopBeforeCallOns(program).generate(); new PassNStatementIndices(program).generateStatementIndices(); - new Pass3CallGraphAnalysis(program).findCallGraph(); getLog().append("CALL GRAPH"); + new Pass3CallGraphAnalysis(program).findCallGraph(); getLog().append(program.getCallGraph().toString()); //getLog().setVerboseLiveRanges(true); @@ -259,20 +260,20 @@ public class Compiler { private void pass4RegisterAllocation() { - new Pass3DominatorsAnalysis(program).findDominators(); getLog().append("DOMINATORS"); + new Pass3DominatorsAnalysis(program).findDominators(); getLog().append(program.getDominators().toString()); - new Pass3LoopAnalysis(program).findLoops(); getLog().append("NATURAL LOOPS"); + new Pass3LoopAnalysis(program).findLoops(); getLog().append(program.getLoopSet().toString()); - new Pass3LoopDepthAnalysis(program).findLoopDepths(); getLog().append("NATURAL LOOPS WITH DEPTH"); + new Pass3LoopDepthAnalysis(program).findLoopDepths(); getLog().append(program.getLoopSet().toString()); - new Pass3VariableRegisterWeightAnalysis(program).findWeights(); getLog().append("\nVARIABLE REGISTER WEIGHTS"); + new Pass3VariableRegisterWeightAnalysis(program).findWeights(); getLog().append(program.getScope().toString(program, Variable.class)); new Pass4LiveRangeEquivalenceClassesFinalize(program).allocate(); @@ -295,8 +296,8 @@ public class Compiler { getLog().append(program.getRegisterPotentials().toString()); // Find register uplift scopes - new Pass4RegisterUpliftScopeAnalysis(program).findScopes(); getLog().append("REGISTER UPLIFT SCOPES"); + new Pass4RegisterUpliftScopeAnalysis(program).findScopes(); getLog().append(program.getRegisterUpliftProgram().toString((program.getVariableRegisterWeights()))); // Attempt uplifting registers through a lot of combinations diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index a2fba6f57..492065450 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -392,6 +392,8 @@ public class TestPrograms extends TestCase { success &= helper.testOutput(fileName, ".cfg", program.getGraph().toString(program)); success &= helper.testOutput(fileName, ".log", program.getLog().toString()); if (!success) { + System.out.println("\nCOMPILE LOG"); + System.out.println(program.getLog().toString()); fail("Output does not match reference!"); } } diff --git a/src/test/java/dk/camelot64/kickc/test/ref/arrays-init.log b/src/test/java/dk/camelot64/kickc/test/ref/arrays-init.log index 45fa7fcc2..9d321e3b8 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/arrays-init.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/arrays-init.log @@ -191,9 +191,9 @@ main::@return dominated by main::@return @1 @begin main NATURAL LOOPS +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] -NATURAL LOOPS WITH DEPTH VARIABLE REGISTER WEIGHTS diff --git a/src/test/java/dk/camelot64/kickc/test/ref/asm-clobber.log b/src/test/java/dk/camelot64/kickc/test/ref/asm-clobber.log index c1ff9fa2d..dacf7f11a 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/asm-clobber.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/asm-clobber.log @@ -393,6 +393,7 @@ main::@4 dominated by @1 @begin main::@1 main::@2 main main::@5 main::@3 main:: main::@7 dominated by @1 main::@7 @begin main::@1 main::@2 main main::@5 main::@3 main::@4 main::@return dominated by main::@return @1 main::@7 @begin main::@1 main::@2 main main::@5 main::@3 main::@4 +NATURAL LOOPS Found back edge: Loop head: main::@2 tails: main::@2 blocks: null Found back edge: Loop head: main::@1 tails: main::@5 blocks: null Found back edge: Loop head: main::@4 tails: main::@4 blocks: null @@ -401,19 +402,18 @@ Populated: Loop head: main::@2 tails: main::@2 blocks: main::@2 Populated: Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@2 main::@1 Populated: Loop head: main::@4 tails: main::@4 blocks: main::@4 Populated: Loop head: main::@3 tails: main::@7 blocks: main::@7 main::@4 main::@3 -NATURAL LOOPS Loop head: main::@2 tails: main::@2 blocks: main::@2 Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@2 main::@1 Loop head: main::@4 tails: main::@4 blocks: main::@4 Loop head: main::@3 tails: main::@7 blocks: main::@7 main::@4 main::@3 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 4 loops in scope [main] Loop head: main::@2 tails: main::@2 blocks: main::@2 Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@2 main::@1 Loop head: main::@4 tails: main::@4 blocks: main::@4 Loop head: main::@3 tails: main::@7 blocks: main::@7 main::@4 main::@3 -NATURAL LOOPS WITH DEPTH Loop head: main::@2 tails: main::@2 blocks: main::@2 depth: 2 Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@2 main::@1 depth: 1 Loop head: main::@4 tails: main::@4 blocks: main::@4 depth: 2 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log b/src/test/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log index c9a3cd1ae..d2a3e7116 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log @@ -3840,6 +3840,7 @@ init_screen::@1 dominated by main @begin init_screen init_screen::@1 @10 init_screen::@2 dominated by main @begin init_screen init_screen::@2 init_screen::@1 @10 init_screen::@return dominated by main @begin init_screen init_screen::@2 init_screen::@1 @10 init_screen::@return +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@5 blocks: null Found back edge: Loop head: lines::@1 tails: lines::@3 blocks: null Found back edge: Loop head: line_ydxi::@1 tails: line_ydxi::@2 blocks: null @@ -3860,7 +3861,6 @@ Populated: Loop head: init_plot_tables::@1 tails: init_plot_tables::@2 blocks: i Populated: Loop head: init_plot_tables::@3 tails: init_plot_tables::@4 blocks: init_plot_tables::@4 init_plot_tables::@3 init_plot_tables::@7 Populated: Loop head: init_screen::@1 tails: init_screen::@1 blocks: init_screen::@1 Populated: Loop head: init_screen::@2 tails: init_screen::@2 blocks: init_screen::@2 -NATURAL LOOPS Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@1 Loop head: lines::@1 tails: lines::@3 blocks: lines::@3 lines::@1 Loop head: line_ydxi::@1 tails: line_ydxi::@2 blocks: line_ydxi::@2 line_ydxi::@3 line_ydxi::@5 line_ydxi::@1 @@ -3872,6 +3872,7 @@ Loop head: init_plot_tables::@3 tails: init_plot_tables::@4 blocks: init_plot_ta Loop head: init_screen::@1 tails: init_screen::@1 blocks: init_screen::@1 Loop head: init_screen::@2 tails: init_screen::@2 blocks: init_screen::@2 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@1 @@ -3893,7 +3894,6 @@ Found 1 loops in scope [line_xdyd] Found 1 loops in scope [line_ydxd] Loop head: line_ydxd::@1 tails: line_ydxd::@2 blocks: line_ydxd::@2 line_ydxd::@3 line_ydxd::@5 line_ydxd::@1 Found 0 loops in scope [plot] -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@1 depth: 1 Loop head: lines::@1 tails: lines::@3 blocks: lines::@3 lines::@1 depth: 2 Loop head: line_ydxi::@1 tails: line_ydxi::@2 blocks: line_ydxi::@2 line_ydxi::@3 line_ydxi::@5 line_ydxi::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/bitmap-plotter.log b/src/test/java/dk/camelot64/kickc/test/ref/bitmap-plotter.log index 75c6cd3e3..4a4e356d2 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/bitmap-plotter.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/bitmap-plotter.log @@ -1545,6 +1545,7 @@ init_screen::@1 dominated by main init_screen::@1 @begin init_screen @5 init_screen::@2 dominated by main init_screen::@2 init_screen::@1 @begin init_screen @5 init_screen::@return dominated by main init_screen::@2 init_screen::@1 @begin init_screen::@return init_screen @5 +NATURAL LOOPS Found back edge: Loop head: main::@2 tails: main::@2 blocks: null Found back edge: Loop head: main::@2 tails: main::@7 blocks: null Found back edge: Loop head: plots::@1 tails: plots::@3 blocks: null @@ -1559,7 +1560,6 @@ Populated: Loop head: init_plot_tables::@1 tails: init_plot_tables::@2 blocks: i Populated: Loop head: init_plot_tables::@3 tails: init_plot_tables::@4 blocks: init_plot_tables::@4 init_plot_tables::@3 init_plot_tables::@7 Populated: Loop head: init_screen::@1 tails: init_screen::@1 blocks: init_screen::@1 Populated: Loop head: init_screen::@2 tails: init_screen::@2 blocks: init_screen::@2 -NATURAL LOOPS Loop head: main::@2 tails: main::@2 blocks: main::@2 Loop head: main::@2 tails: main::@7 blocks: main::@7 main::@3 main::@2 Loop head: plots::@1 tails: plots::@3 blocks: plots::@3 plots::@1 @@ -1568,6 +1568,7 @@ Loop head: init_plot_tables::@3 tails: init_plot_tables::@4 blocks: init_plot_ta Loop head: init_screen::@1 tails: init_screen::@1 blocks: init_screen::@1 Loop head: init_screen::@2 tails: init_screen::@2 blocks: init_screen::@2 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 2 loops in scope [main] Loop head: main::@2 tails: main::@2 blocks: main::@2 @@ -1581,7 +1582,6 @@ Found 2 loops in scope [init_plot_tables] Found 1 loops in scope [plots] Loop head: plots::@1 tails: plots::@3 blocks: plots::@3 plots::@1 Found 0 loops in scope [plot] -NATURAL LOOPS WITH DEPTH Loop head: main::@2 tails: main::@2 blocks: main::@2 depth: 2 Loop head: main::@2 tails: main::@7 blocks: main::@7 main::@3 main::@2 depth: 1 Loop head: plots::@1 tails: plots::@3 blocks: plots::@3 plots::@1 depth: 2 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/bresenham.log b/src/test/java/dk/camelot64/kickc/test/ref/bresenham.log index 1d67b42ef..84559b001 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/bresenham.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/bresenham.log @@ -524,15 +524,15 @@ main::@3 dominated by @1 @begin main::@1 main main::@3 main::@2 dominated by @1 @begin main::@1 main::@2 main main::@return dominated by main::@return @1 @begin main::@1 main::@2 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@2 blocks: null Populated: Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 -NATURAL LOOPS Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/bresenhamarr.log b/src/test/java/dk/camelot64/kickc/test/ref/bresenhamarr.log index 7805e4e9d..4c8a1de8a 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/bresenhamarr.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/bresenhamarr.log @@ -507,15 +507,15 @@ main::@3 dominated by @1 @begin main::@1 main main::@3 main::@2 dominated by @1 @begin main::@1 main::@2 main main::@return dominated by main::@return @1 @begin main::@1 main::@2 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@2 blocks: null Populated: Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 -NATURAL LOOPS Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/callconstparam.log b/src/test/java/dk/camelot64/kickc/test/ref/callconstparam.log index aa680ddda..8f1274339 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/callconstparam.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/callconstparam.log @@ -347,16 +347,16 @@ line dominated by @2 @begin line main line::@1 dominated by @2 @begin line line::@1 main line::@return dominated by @2 @begin line line::@return line::@1 main +NATURAL LOOPS Found back edge: Loop head: line::@1 tails: line::@1 blocks: null Populated: Loop head: line::@1 tails: line::@1 blocks: line::@1 -NATURAL LOOPS Loop head: line::@1 tails: line::@1 blocks: line::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] Found 1 loops in scope [line] Loop head: line::@1 tails: line::@1 blocks: line::@1 -NATURAL LOOPS WITH DEPTH Loop head: line::@1 tails: line::@1 blocks: line::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/casting.log b/src/test/java/dk/camelot64/kickc/test/ref/casting.log index 8faa8de66..c7b74e01a 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/casting.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/casting.log @@ -539,20 +539,20 @@ w dominated by @2 @begin w main::@1 main::@2 main w::@1 dominated by w::@1 @2 @begin w main::@1 main::@2 main w::@return dominated by w::@1 @2 @begin w main::@1 main::@2 main w::@return +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@1 blocks: null Found back edge: Loop head: w::@1 tails: w::@1 blocks: null Populated: Loop head: main::@1 tails: main::@1 blocks: main::@1 Populated: Loop head: w::@1 tails: w::@1 blocks: w::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@1 blocks: main::@1 Loop head: w::@1 tails: w::@1 blocks: w::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@1 blocks: main::@1 Found 1 loops in scope [w] Loop head: w::@1 tails: w::@1 blocks: w::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1 Loop head: w::@1 tails: w::@1 blocks: w::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/chargen.log b/src/test/java/dk/camelot64/kickc/test/ref/chargen.log index dba46e527..92ab0224b 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/chargen.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/chargen.log @@ -546,19 +546,19 @@ main::@5 dominated by @1 @begin main::@1 main::@2 main main::@5 main::@3 main::@6 dominated by @1 @begin main::@1 main::@2 main main::@5 main::@6 main::@3 main::@return dominated by main::@return @1 @begin main::@1 main::@2 main main::@5 main::@6 main::@3 +NATURAL LOOPS Found back edge: Loop head: main::@2 tails: main::@3 blocks: null Found back edge: Loop head: main::@1 tails: main::@5 blocks: null Populated: Loop head: main::@2 tails: main::@3 blocks: main::@3 main::@2 main::@4 Populated: Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@3 main::@2 main::@4 main::@1 -NATURAL LOOPS Loop head: main::@2 tails: main::@3 blocks: main::@3 main::@2 main::@4 Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@3 main::@2 main::@4 main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 2 loops in scope [main] Loop head: main::@2 tails: main::@3 blocks: main::@3 main::@2 main::@4 Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@3 main::@2 main::@4 main::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@2 tails: main::@3 blocks: main::@3 main::@2 main::@4 depth: 2 Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@3 main::@2 main::@4 main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/const-identification.log b/src/test/java/dk/camelot64/kickc/test/ref/const-identification.log index 520f75e08..d711f7101 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/const-identification.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/const-identification.log @@ -491,17 +491,18 @@ line::@1 dominated by @begin line line::@1 main @3 main::@1 main::@2 plot dominated by @begin line main @3 plot main::@1 main::@2 plot::@return dominated by @begin line main @3 plot main::@1 plot::@return main::@2 +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@1 blocks: null Found back edge: Loop head: main::@2 tails: main::@5 blocks: null Found back edge: Loop head: line::@2 tails: line::@8 blocks: null Populated: Loop head: main::@1 tails: main::@1 blocks: main::@1 Populated: Loop head: main::@2 tails: main::@5 blocks: main::@5 main::@2 Populated: Loop head: line::@2 tails: line::@8 blocks: line::@8 line::@2 -NATURAL LOOPS Loop head: main::@1 tails: main::@1 blocks: main::@1 Loop head: main::@2 tails: main::@5 blocks: main::@5 main::@2 Loop head: line::@2 tails: line::@8 blocks: line::@8 line::@2 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 2 loops in scope [main] Loop head: main::@1 tails: main::@1 blocks: main::@1 @@ -509,7 +510,6 @@ Found 2 loops in scope [main] Found 1 loops in scope [line] Loop head: line::@2 tails: line::@8 blocks: line::@8 line::@2 Found 0 loops in scope [plot] -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1 Loop head: main::@2 tails: main::@5 blocks: main::@5 main::@2 depth: 1 Loop head: line::@2 tails: line::@8 blocks: line::@8 line::@2 depth: 2 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/constabsmin.log b/src/test/java/dk/camelot64/kickc/test/ref/constabsmin.log index b69face74..6fdbb3cfd 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/constabsmin.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/constabsmin.log @@ -115,9 +115,9 @@ main::@return dominated by main::@return @1 @begin main NATURAL LOOPS +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] -NATURAL LOOPS WITH DEPTH VARIABLE REGISTER WEIGHTS diff --git a/src/test/java/dk/camelot64/kickc/test/ref/constant-string-concat.log b/src/test/java/dk/camelot64/kickc/test/ref/constant-string-concat.log index 3fa079042..4e89bb7d1 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/constant-string-concat.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/constant-string-concat.log @@ -279,15 +279,15 @@ main dominated by @1 @begin main main::@1 dominated by @1 @begin main::@1 main main::@return dominated by main::@return @1 @begin main::@1 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@1 blocks: null Populated: Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@1 blocks: main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/constantmin.log b/src/test/java/dk/camelot64/kickc/test/ref/constantmin.log index 644014e2a..bf1c6f09a 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/constantmin.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/constantmin.log @@ -254,15 +254,15 @@ main dominated by @1 @begin main main::@1 dominated by @1 @begin main::@1 main main::@return dominated by main::@return @1 @begin main::@1 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@1 blocks: null Populated: Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@1 blocks: main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/constants.log b/src/test/java/dk/camelot64/kickc/test/ref/constants.log index dc85cd65a..5479ffe02 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/constants.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/constants.log @@ -2139,17 +2139,18 @@ print_cls dominated by main @11 @begin print_cls print_cls::@1 dominated by main @11 @begin print_cls::@1 print_cls print_cls::@return dominated by main print_cls::@return @11 @begin print_cls::@1 print_cls +NATURAL LOOPS Found back edge: Loop head: print_str::@1 tails: print_str::@2 blocks: null Found back edge: Loop head: print_ln::@1 tails: print_ln::@1 blocks: null Found back edge: Loop head: print_cls::@1 tails: print_cls::@1 blocks: null Populated: Loop head: print_str::@1 tails: print_str::@2 blocks: print_str::@2 print_str::@1 Populated: Loop head: print_ln::@1 tails: print_ln::@1 blocks: print_ln::@1 Populated: Loop head: print_cls::@1 tails: print_cls::@1 blocks: print_cls::@1 -NATURAL LOOPS Loop head: print_str::@1 tails: print_str::@2 blocks: print_str::@2 print_str::@1 Loop head: print_ln::@1 tails: print_ln::@1 blocks: print_ln::@1 Loop head: print_cls::@1 tails: print_cls::@1 blocks: print_cls::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] Found 1 loops in scope [print_cls] @@ -2162,7 +2163,6 @@ Found 1 loops in scope [print_str] Loop head: print_str::@1 tails: print_str::@2 blocks: print_str::@2 print_str::@1 Found 1 loops in scope [print_ln] Loop head: print_ln::@1 tails: print_ln::@1 blocks: print_ln::@1 -NATURAL LOOPS WITH DEPTH Loop head: print_str::@1 tails: print_str::@2 blocks: print_str::@2 print_str::@1 depth: 1 Loop head: print_ln::@1 tails: print_ln::@1 blocks: print_ln::@1 depth: 1 Loop head: print_cls::@1 tails: print_cls::@1 blocks: print_cls::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/double-import.log b/src/test/java/dk/camelot64/kickc/test/ref/double-import.log index 09a68da5c..d21d7dab8 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/double-import.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/double-import.log @@ -129,9 +129,9 @@ main::@return dominated by main::@return @1 @begin main NATURAL LOOPS +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] -NATURAL LOOPS WITH DEPTH VARIABLE REGISTER WEIGHTS diff --git a/src/test/java/dk/camelot64/kickc/test/ref/fibmem.log b/src/test/java/dk/camelot64/kickc/test/ref/fibmem.log index 345782f94..1879e7672 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/fibmem.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/fibmem.log @@ -202,15 +202,15 @@ main dominated by @1 @begin main main::@1 dominated by @1 @begin main::@1 main main::@return dominated by main::@return @1 @begin main::@1 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@1 blocks: null Populated: Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@1 blocks: main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/fillscreen.log b/src/test/java/dk/camelot64/kickc/test/ref/fillscreen.log index 4320a0d4e..2d9705d5e 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/fillscreen.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/fillscreen.log @@ -320,16 +320,16 @@ fillscreen dominated by @2 @begin fillscreen main fillscreen::@1 dominated by @2 @begin fillscreen main fillscreen::@1 fillscreen::@return dominated by @2 @begin fillscreen main fillscreen::@1 fillscreen::@return +NATURAL LOOPS Found back edge: Loop head: fillscreen::@1 tails: fillscreen::@1 blocks: null Populated: Loop head: fillscreen::@1 tails: fillscreen::@1 blocks: fillscreen::@1 -NATURAL LOOPS Loop head: fillscreen::@1 tails: fillscreen::@1 blocks: fillscreen::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] Found 1 loops in scope [fillscreen] Loop head: fillscreen::@1 tails: fillscreen::@1 blocks: fillscreen::@1 -NATURAL LOOPS WITH DEPTH Loop head: fillscreen::@1 tails: fillscreen::@1 blocks: fillscreen::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.log b/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.log index cdf6c8620..0f8e21a40 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.log @@ -1024,6 +1024,7 @@ prepare dominated by prepare main @begin @4 prepare::@1 dominated by prepare main prepare::@1 @begin @4 prepare::@return dominated by prepare main prepare::@1 prepare::@return @begin @4 +NATURAL LOOPS Found back edge: Loop head: main::@3 tails: main::@3 blocks: null Found back edge: Loop head: main::@4 tails: main::@4 blocks: null Found back edge: Loop head: main::@3 tails: main::@6 blocks: null @@ -1044,7 +1045,6 @@ Populated: Loop head: flip::@2 tails: flip::@2 blocks: flip::@2 Populated: Loop head: flip::@1 tails: flip::@4 blocks: flip::@4 flip::@2 flip::@1 Populated: Loop head: flip::@3 tails: flip::@3 blocks: flip::@3 Populated: Loop head: prepare::@1 tails: prepare::@1 blocks: prepare::@1 -NATURAL LOOPS Loop head: main::@3 tails: main::@3 blocks: main::@3 Loop head: main::@4 tails: main::@4 blocks: main::@4 Loop head: main::@3 tails: main::@6 blocks: main::@6 main::@4 main::@3 @@ -1056,6 +1056,7 @@ Loop head: flip::@1 tails: flip::@4 blocks: flip::@4 flip::@2 flip::@1 Loop head: flip::@3 tails: flip::@3 blocks: flip::@3 Loop head: prepare::@1 tails: prepare::@1 blocks: prepare::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 4 loops in scope [main] Loop head: main::@3 tails: main::@3 blocks: main::@3 @@ -1071,7 +1072,6 @@ Found 3 loops in scope [flip] Found 2 loops in scope [plot] Loop head: plot::@2 tails: plot::@2 blocks: plot::@2 Loop head: plot::@1 tails: plot::@3 blocks: plot::@3 plot::@2 plot::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@3 tails: main::@3 blocks: main::@3 depth: 3 Loop head: main::@4 tails: main::@4 blocks: main::@4 depth: 3 Loop head: main::@3 tails: main::@6 blocks: main::@6 main::@4 main::@3 depth: 2 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/forclassicmin.log b/src/test/java/dk/camelot64/kickc/test/ref/forclassicmin.log index 72fa3c213..c7d245df8 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/forclassicmin.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/forclassicmin.log @@ -195,15 +195,15 @@ main dominated by @1 @begin main main::@1 dominated by @1 @begin main::@1 main main::@return dominated by main::@return @1 @begin main::@1 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@1 blocks: null Populated: Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@1 blocks: main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/forincrementassign.log b/src/test/java/dk/camelot64/kickc/test/ref/forincrementassign.log index 80eb44c35..454e423fb 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/forincrementassign.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/forincrementassign.log @@ -195,15 +195,15 @@ main dominated by @1 @begin main main::@1 dominated by @1 @begin main::@1 main main::@return dominated by main::@return @1 @begin main::@1 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@1 blocks: null Populated: Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@1 blocks: main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/forrangemin.log b/src/test/java/dk/camelot64/kickc/test/ref/forrangemin.log index 8782cc472..ffc093822 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/forrangemin.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/forrangemin.log @@ -281,19 +281,19 @@ main::@1 dominated by @1 @begin main::@1 main main::@2 dominated by @1 @begin main::@1 main::@2 main main::@return dominated by main::@return @1 @begin main::@1 main::@2 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@1 blocks: null Found back edge: Loop head: main::@2 tails: main::@2 blocks: null Populated: Loop head: main::@1 tails: main::@1 blocks: main::@1 Populated: Loop head: main::@2 tails: main::@2 blocks: main::@2 -NATURAL LOOPS Loop head: main::@1 tails: main::@1 blocks: main::@1 Loop head: main::@2 tails: main::@2 blocks: main::@2 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 2 loops in scope [main] Loop head: main::@1 tails: main::@1 blocks: main::@1 Loop head: main::@2 tails: main::@2 blocks: main::@2 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1 Loop head: main::@2 tails: main::@2 blocks: main::@2 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/halfscii.log b/src/test/java/dk/camelot64/kickc/test/ref/halfscii.log index 7e59fbb14..ddec1948d 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/halfscii.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/halfscii.log @@ -1133,19 +1133,19 @@ main::@6 dominated by main::@11 @begin main @1 main::@1 main::@2 main::@5 main: main::@12 dominated by main::@11 @begin main main::@12 @1 main::@1 main::@2 main::@5 main::@6 main::@3 main::@4 main::@return dominated by main::@return main::@11 @begin main main::@12 @1 main::@1 main::@2 main::@5 main::@6 main::@3 main::@4 +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@5 blocks: null Found back edge: Loop head: main::@6 tails: main::@6 blocks: null Populated: Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@10 main::@4 main::@3 main::@9 main::@2 main::@8 main::@1 main::@7 Populated: Loop head: main::@6 tails: main::@6 blocks: main::@6 -NATURAL LOOPS Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@10 main::@4 main::@3 main::@9 main::@2 main::@8 main::@1 main::@7 Loop head: main::@6 tails: main::@6 blocks: main::@6 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 2 loops in scope [main] Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@10 main::@4 main::@3 main::@9 main::@2 main::@8 main::@1 main::@7 Loop head: main::@6 tails: main::@6 blocks: main::@6 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@10 main::@4 main::@3 main::@9 main::@2 main::@8 main::@1 main::@7 depth: 1 Loop head: main::@6 tails: main::@6 blocks: main::@6 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/ifmin.log b/src/test/java/dk/camelot64/kickc/test/ref/ifmin.log index 7e79ec4dc..6a5198266 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/ifmin.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/ifmin.log @@ -238,15 +238,15 @@ main::@3 dominated by @1 @begin main::@1 main main::@3 main::@2 dominated by @1 @begin main::@1 main::@2 main main::@return dominated by main::@return @1 @begin main::@1 main::@2 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@2 blocks: null Populated: Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 -NATURAL LOOPS Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/immzero.log b/src/test/java/dk/camelot64/kickc/test/ref/immzero.log index 7804a792d..0b44949e5 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/immzero.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/immzero.log @@ -205,15 +205,15 @@ main dominated by @1 @begin main main::@1 dominated by @1 @begin main::@1 main main::@return dominated by main::@return @1 @begin main::@1 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@1 blocks: null Populated: Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@1 blocks: main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/importing.log b/src/test/java/dk/camelot64/kickc/test/ref/importing.log index 273035240..3f5ef4c1b 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/importing.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/importing.log @@ -141,9 +141,9 @@ main::@return dominated by main::@return @1 @begin main NATURAL LOOPS +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] -NATURAL LOOPS WITH DEPTH VARIABLE REGISTER WEIGHTS diff --git a/src/test/java/dk/camelot64/kickc/test/ref/incd020.log b/src/test/java/dk/camelot64/kickc/test/ref/incd020.log index 5417e951f..40d240c07 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/incd020.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/incd020.log @@ -161,15 +161,15 @@ main dominated by @1 @begin main main::@1 dominated by @1 @begin main::@1 main main::@return dominated by main::@return @1 @begin main::@1 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@1 blocks: null Populated: Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@1 blocks: main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/incrementinarray.log b/src/test/java/dk/camelot64/kickc/test/ref/incrementinarray.log index b4f242013..be6f13461 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/incrementinarray.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/incrementinarray.log @@ -806,6 +806,7 @@ print_cls dominated by @begin main print_cls @7 print_cls::@1 dominated by @begin print_cls::@1 main print_cls @7 print_cls::@return dominated by @begin print_cls::@1 main print_cls @7 print_cls::@return +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@6 blocks: null Found back edge: Loop head: print_ln::@1 tails: print_ln::@1 blocks: null Found back edge: Loop head: print_str::@1 tails: print_str::@2 blocks: null @@ -814,12 +815,12 @@ Populated: Loop head: main::@1 tails: main::@6 blocks: main::@6 main::@5 main::@ Populated: Loop head: print_ln::@1 tails: print_ln::@1 blocks: print_ln::@1 Populated: Loop head: print_str::@1 tails: print_str::@2 blocks: print_str::@2 print_str::@1 Populated: Loop head: print_cls::@1 tails: print_cls::@1 blocks: print_cls::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@6 blocks: main::@6 main::@5 main::@4 main::@1 Loop head: print_ln::@1 tails: print_ln::@1 blocks: print_ln::@1 Loop head: print_str::@1 tails: print_str::@2 blocks: print_str::@2 print_str::@1 Loop head: print_cls::@1 tails: print_cls::@1 blocks: print_cls::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@6 blocks: main::@6 main::@5 main::@4 main::@1 @@ -829,7 +830,6 @@ Found 1 loops in scope [print_str] Loop head: print_str::@1 tails: print_str::@2 blocks: print_str::@2 print_str::@1 Found 1 loops in scope [print_ln] Loop head: print_ln::@1 tails: print_ln::@1 blocks: print_ln::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@6 blocks: main::@6 main::@5 main::@4 main::@1 depth: 1 Loop head: print_ln::@1 tails: print_ln::@1 blocks: print_ln::@1 depth: 2 Loop head: print_str::@1 tails: print_str::@2 blocks: print_str::@2 print_str::@1 depth: 2 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/inline-asm.log b/src/test/java/dk/camelot64/kickc/test/ref/inline-asm.log index 481339bc3..a35d77f72 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/inline-asm.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/inline-asm.log @@ -116,9 +116,9 @@ main::@return dominated by main::@return @1 @begin main NATURAL LOOPS +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] -NATURAL LOOPS WITH DEPTH VARIABLE REGISTER WEIGHTS diff --git a/src/test/java/dk/camelot64/kickc/test/ref/inline-assignment.log b/src/test/java/dk/camelot64/kickc/test/ref/inline-assignment.log index c39f47eb8..e8476972f 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/inline-assignment.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/inline-assignment.log @@ -191,15 +191,15 @@ main dominated by @1 @begin main main::@1 dominated by @1 @begin main::@1 main main::@return dominated by main::@return @1 @begin main::@1 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@1 blocks: null Populated: Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@1 blocks: main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/inline-string.log b/src/test/java/dk/camelot64/kickc/test/ref/inline-string.log index dc9fa65b8..968dd5a64 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/inline-string.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/inline-string.log @@ -400,16 +400,16 @@ print::@1 dominated by @2 print @begin print::@1 main print::@return dominated by @2 print @begin print::@1 main print::@return print::@2 dominated by @2 print @begin print::@2 print::@1 main +NATURAL LOOPS Found back edge: Loop head: print::@1 tails: print::@2 blocks: null Populated: Loop head: print::@1 tails: print::@2 blocks: print::@2 print::@1 -NATURAL LOOPS Loop head: print::@1 tails: print::@2 blocks: print::@2 print::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] Found 1 loops in scope [print] Loop head: print::@1 tails: print::@2 blocks: print::@2 print::@1 -NATURAL LOOPS WITH DEPTH Loop head: print::@1 tails: print::@2 blocks: print::@2 print::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/inline-word.log b/src/test/java/dk/camelot64/kickc/test/ref/inline-word.log index 1e7087b57..f41c5a463 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/inline-word.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/inline-word.log @@ -308,19 +308,19 @@ main::@2 dominated by @1 @begin main::@1 main::@2 main main::@3 dominated by @1 @begin main::@1 main::@2 main main::@3 main::@return dominated by main::@return @1 @begin main::@1 main::@2 main main::@3 +NATURAL LOOPS Found back edge: Loop head: main::@2 tails: main::@2 blocks: null Found back edge: Loop head: main::@1 tails: main::@3 blocks: null Populated: Loop head: main::@2 tails: main::@2 blocks: main::@2 Populated: Loop head: main::@1 tails: main::@3 blocks: main::@3 main::@2 main::@1 -NATURAL LOOPS Loop head: main::@2 tails: main::@2 blocks: main::@2 Loop head: main::@1 tails: main::@3 blocks: main::@3 main::@2 main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 2 loops in scope [main] Loop head: main::@2 tails: main::@2 blocks: main::@2 Loop head: main::@1 tails: main::@3 blocks: main::@3 main::@2 main::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@2 tails: main::@2 blocks: main::@2 depth: 2 Loop head: main::@1 tails: main::@3 blocks: main::@3 main::@2 main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/inlinearrayproblem.log b/src/test/java/dk/camelot64/kickc/test/ref/inlinearrayproblem.log index eb13ae5e3..d614eb3f4 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/inlinearrayproblem.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/inlinearrayproblem.log @@ -238,15 +238,15 @@ main dominated by @1 @begin main main::@1 dominated by @1 @begin main::@1 main main::@return dominated by main::@return @1 @begin main::@1 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@1 blocks: null Populated: Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@1 blocks: main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/inmem-const-array.log b/src/test/java/dk/camelot64/kickc/test/ref/inmem-const-array.log index bfbcb7594..741558a6a 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/inmem-const-array.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/inmem-const-array.log @@ -359,15 +359,15 @@ main::@2 dominated by @1 @begin main::@1 main::@2 main main::@return dominated by main::@return @1 @begin main::@1 main::@2 main main::@6 dominated by @1 @begin main::@1 main main::@6 +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@2 blocks: null Populated: Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@6 -NATURAL LOOPS Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@6 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@6 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@6 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/inmemarray.log b/src/test/java/dk/camelot64/kickc/test/ref/inmemarray.log index c389c4394..44c258080 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/inmemarray.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/inmemarray.log @@ -292,15 +292,15 @@ main::@2 dominated by @1 @begin main::@1 main::@2 main main::@return dominated by main::@return @1 @begin main::@1 main::@2 main main::@6 dominated by @1 @begin main::@1 main main::@6 +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@2 blocks: null Populated: Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@6 -NATURAL LOOPS Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@6 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@6 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@6 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/inmemstring.log b/src/test/java/dk/camelot64/kickc/test/ref/inmemstring.log index b8858120c..7bd65db03 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/inmemstring.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/inmemstring.log @@ -307,15 +307,15 @@ main::@2 dominated by @1 @begin main::@1 main::@2 main main::@return dominated by main::@return @1 @begin main::@1 main::@2 main main::@6 dominated by @1 @begin main::@1 main main::@6 +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@2 blocks: null Populated: Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@6 -NATURAL LOOPS Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@6 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@6 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@6 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/iterarray.log b/src/test/java/dk/camelot64/kickc/test/ref/iterarray.log index e22491650..8a20e6b73 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/iterarray.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/iterarray.log @@ -200,15 +200,15 @@ main dominated by @1 @begin main main::@1 dominated by @1 @begin main::@1 main main::@return dominated by main::@return @1 @begin main::@1 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@1 blocks: null Populated: Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@1 blocks: main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/literals.log b/src/test/java/dk/camelot64/kickc/test/ref/literals.log index 78358ca87..694fc3096 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/literals.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/literals.log @@ -287,15 +287,15 @@ main dominated by @1 @begin main main::@1 dominated by @1 @begin main::@1 main main::@return dominated by main::@return @1 @begin main::@1 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@1 blocks: null Populated: Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@1 blocks: main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/liverange-call-problem.log b/src/test/java/dk/camelot64/kickc/test/ref/liverange-call-problem.log index 0b2ad8688..e480af8c6 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/liverange-call-problem.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/liverange-call-problem.log @@ -385,11 +385,11 @@ incw1::@return dominated by @begin @3 incw1 main incw1::@return NATURAL LOOPS +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] Found 0 loops in scope [incw1] Found 0 loops in scope [incw2] -NATURAL LOOPS WITH DEPTH VARIABLE REGISTER WEIGHTS diff --git a/src/test/java/dk/camelot64/kickc/test/ref/liverange.log b/src/test/java/dk/camelot64/kickc/test/ref/liverange.log index 8f25b237e..26c3223a8 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/liverange.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/liverange.log @@ -367,10 +367,10 @@ inci::@return dominated by inci::@return @2 @begin main inci NATURAL LOOPS +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] Found 0 loops in scope [inci] -NATURAL LOOPS WITH DEPTH VARIABLE REGISTER WEIGHTS diff --git a/src/test/java/dk/camelot64/kickc/test/ref/local-string.log b/src/test/java/dk/camelot64/kickc/test/ref/local-string.log index 89b955895..8b357928f 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/local-string.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/local-string.log @@ -215,15 +215,15 @@ main::@1 dominated by @1 @begin main::@1 main main::@return dominated by main::@return @1 @begin main::@1 main main::@2 dominated by @1 @begin main::@1 main::@2 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@2 blocks: null Populated: Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/loopmin.log b/src/test/java/dk/camelot64/kickc/test/ref/loopmin.log index a6009c69f..99e4395eb 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/loopmin.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/loopmin.log @@ -243,15 +243,15 @@ main::@3 dominated by @1 @begin main::@1 main main::@3 main::@2 dominated by @1 @begin main::@1 main::@2 main main::@return dominated by main::@return @1 @begin main::@1 main::@2 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@2 blocks: null Populated: Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 -NATURAL LOOPS Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/loopnest.log b/src/test/java/dk/camelot64/kickc/test/ref/loopnest.log index a31cd3b7a..1a18a24cd 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/loopnest.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/loopnest.log @@ -301,20 +301,20 @@ nest dominated by @2 @begin main::@1 main nest nest::@1 dominated by @2 @begin main::@1 nest::@1 main nest nest::@return dominated by nest::@return @2 @begin main::@1 nest::@1 main nest +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@3 blocks: null Found back edge: Loop head: nest::@1 tails: nest::@1 blocks: null Populated: Loop head: main::@1 tails: main::@3 blocks: main::@3 main::@1 Populated: Loop head: nest::@1 tails: nest::@1 blocks: nest::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@3 blocks: main::@3 main::@1 Loop head: nest::@1 tails: nest::@1 blocks: nest::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@3 blocks: main::@3 main::@1 Found 1 loops in scope [nest] Loop head: nest::@1 tails: nest::@1 blocks: nest::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@3 blocks: main::@3 main::@1 depth: 1 Loop head: nest::@1 tails: nest::@1 blocks: nest::@1 depth: 2 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/loopnest2.log b/src/test/java/dk/camelot64/kickc/test/ref/loopnest2.log index 4835b2df8..2fba5c9f1 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/loopnest2.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/loopnest2.log @@ -630,6 +630,7 @@ nest2::@2 dominated by nest1::@1 nest1::@2 @begin nest1 nest2 main nest2::@1 @3 nest2::@3 dominated by nest1::@1 nest1::@2 @begin nest1 nest2 main nest2::@1 @3 nest2::@3 nest2::@2 main::@1 main::@2 nest2::@return dominated by nest1::@1 nest1::@2 @begin nest1 nest2 main nest2::@return nest2::@1 @3 nest2::@3 nest2::@2 main::@1 main::@2 +NATURAL LOOPS Found back edge: Loop head: main::@2 tails: main::@5 blocks: null Found back edge: Loop head: main::@1 tails: main::@3 blocks: null Found back edge: Loop head: nest1::@2 tails: nest1::@5 blocks: null @@ -642,7 +643,6 @@ Populated: Loop head: nest1::@2 tails: nest1::@5 blocks: nest1::@5 nest1::@2 Populated: Loop head: nest1::@1 tails: nest1::@3 blocks: nest1::@3 nest1::@5 nest1::@2 nest1::@1 Populated: Loop head: nest2::@2 tails: nest2::@2 blocks: nest2::@2 Populated: Loop head: nest2::@1 tails: nest2::@3 blocks: nest2::@3 nest2::@2 nest2::@1 -NATURAL LOOPS Loop head: main::@2 tails: main::@5 blocks: main::@5 main::@2 Loop head: main::@1 tails: main::@3 blocks: main::@3 main::@5 main::@2 main::@1 Loop head: nest1::@2 tails: nest1::@5 blocks: nest1::@5 nest1::@2 @@ -650,6 +650,7 @@ Loop head: nest1::@1 tails: nest1::@3 blocks: nest1::@3 nest1::@5 nest1::@2 nest Loop head: nest2::@2 tails: nest2::@2 blocks: nest2::@2 Loop head: nest2::@1 tails: nest2::@3 blocks: nest2::@3 nest2::@2 nest2::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 2 loops in scope [main] Loop head: main::@2 tails: main::@5 blocks: main::@5 main::@2 @@ -660,7 +661,6 @@ Found 2 loops in scope [nest1] Found 2 loops in scope [nest2] Loop head: nest2::@2 tails: nest2::@2 blocks: nest2::@2 Loop head: nest2::@1 tails: nest2::@3 blocks: nest2::@3 nest2::@2 nest2::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@2 tails: main::@5 blocks: main::@5 main::@2 depth: 2 Loop head: main::@1 tails: main::@3 blocks: main::@3 main::@5 main::@2 main::@1 depth: 1 Loop head: nest1::@2 tails: nest1::@5 blocks: nest1::@5 nest1::@2 depth: 4 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/loopsplit.log b/src/test/java/dk/camelot64/kickc/test/ref/loopsplit.log index 96c21fee7..a5de2a3e3 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/loopsplit.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/loopsplit.log @@ -277,18 +277,18 @@ main::@2 dominated by @1 @begin main::@1 main::@2 main main::@8 dominated by @1 @begin main::@8 main::@1 main::@2 main main::@4 dominated by @1 @begin main::@1 main::@2 main main::@4 +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@8 blocks: null Found back edge: Loop head: main::@1 tails: main::@4 blocks: null Populated: Loop head: main::@1 tails: main::@8 blocks: main::@8 main::@2 main::@1 Populated: Loop head: main::@1 tails: main::@4 blocks: main::@4 main::@2 main::@1 Coalesced: Loop head: main::@1 tails: main::@8 main::@4 blocks: main::@8 main::@2 main::@1 main::@4 -NATURAL LOOPS Loop head: main::@1 tails: main::@8 main::@4 blocks: main::@8 main::@2 main::@1 main::@4 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@8 main::@4 blocks: main::@8 main::@2 main::@1 main::@4 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@8 main::@4 blocks: main::@8 main::@2 main::@1 main::@4 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/modglobal.log b/src/test/java/dk/camelot64/kickc/test/ref/modglobal.log index 73c58bae7..104dd2393 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/modglobal.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/modglobal.log @@ -471,10 +471,10 @@ inccnt::@return dominated by @2 inccnt @begin main inccnt::@return NATURAL LOOPS +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] Found 0 loops in scope [inccnt] -NATURAL LOOPS WITH DEPTH VARIABLE REGISTER WEIGHTS diff --git a/src/test/java/dk/camelot64/kickc/test/ref/modglobalmin.log b/src/test/java/dk/camelot64/kickc/test/ref/modglobalmin.log index 6a648d429..00e87aa57 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/modglobalmin.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/modglobalmin.log @@ -278,10 +278,10 @@ inccnt::@return dominated by @2 inccnt @begin main inccnt::@return NATURAL LOOPS +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] Found 0 loops in scope [inccnt] -NATURAL LOOPS WITH DEPTH VARIABLE REGISTER WEIGHTS diff --git a/src/test/java/dk/camelot64/kickc/test/ref/multiply.log b/src/test/java/dk/camelot64/kickc/test/ref/multiply.log index b1bc57452..f8744b49f 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/multiply.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/multiply.log @@ -947,14 +947,15 @@ init_mul_tables::@3 dominated by main init_mul_tables @begin @4 init_mul_tables init_mul_tables::@2 dominated by main init_mul_tables @begin @4 init_mul_tables::@2 init_mul_tables::@1 init_mul_tables::@return dominated by main init_mul_tables init_mul_tables::@return @begin @4 init_mul_tables::@2 init_mul_tables::@1 +NATURAL LOOPS Found back edge: Loop head: mul_tables_compare::@1 tails: mul_tables_compare::@5 blocks: null Found back edge: Loop head: init_mul_tables::@1 tails: init_mul_tables::@2 blocks: null Populated: Loop head: mul_tables_compare::@1 tails: mul_tables_compare::@5 blocks: mul_tables_compare::@5 mul_tables_compare::@4 mul_tables_compare::@9 mul_tables_compare::@3 mul_tables_compare::@8 mul_tables_compare::@2 mul_tables_compare::@7 mul_tables_compare::@1 mul_tables_compare::@6 Populated: Loop head: init_mul_tables::@1 tails: init_mul_tables::@2 blocks: init_mul_tables::@2 init_mul_tables::@1 init_mul_tables::@3 -NATURAL LOOPS Loop head: mul_tables_compare::@1 tails: mul_tables_compare::@5 blocks: mul_tables_compare::@5 mul_tables_compare::@4 mul_tables_compare::@9 mul_tables_compare::@3 mul_tables_compare::@8 mul_tables_compare::@2 mul_tables_compare::@7 mul_tables_compare::@1 mul_tables_compare::@6 Loop head: init_mul_tables::@1 tails: init_mul_tables::@2 blocks: init_mul_tables::@2 init_mul_tables::@1 init_mul_tables::@3 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] Found 1 loops in scope [init_mul_tables] @@ -962,7 +963,6 @@ Found 1 loops in scope [init_mul_tables] Found 0 loops in scope [init_mul_tables_asm] Found 1 loops in scope [mul_tables_compare] Loop head: mul_tables_compare::@1 tails: mul_tables_compare::@5 blocks: mul_tables_compare::@5 mul_tables_compare::@4 mul_tables_compare::@9 mul_tables_compare::@3 mul_tables_compare::@8 mul_tables_compare::@2 mul_tables_compare::@7 mul_tables_compare::@1 mul_tables_compare::@6 -NATURAL LOOPS WITH DEPTH Loop head: mul_tables_compare::@1 tails: mul_tables_compare::@5 blocks: mul_tables_compare::@5 mul_tables_compare::@4 mul_tables_compare::@9 mul_tables_compare::@3 mul_tables_compare::@8 mul_tables_compare::@2 mul_tables_compare::@7 mul_tables_compare::@1 mul_tables_compare::@6 depth: 1 Loop head: init_mul_tables::@1 tails: init_mul_tables::@2 blocks: init_mul_tables::@2 init_mul_tables::@1 init_mul_tables::@3 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/overlap-allocation-2.log b/src/test/java/dk/camelot64/kickc/test/ref/overlap-allocation-2.log index cbb4ac4f7..3b2d9dc0b 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/overlap-allocation-2.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/overlap-allocation-2.log @@ -444,21 +444,21 @@ line::@return dominated by @begin line line::@1 main @3 main::@1 line::@return plot dominated by @begin line main @3 plot main::@1 plot::@return dominated by @begin line main @3 plot main::@1 plot::@return +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@5 blocks: null Found back edge: Loop head: main::@2 tails: main::@6 blocks: null Populated: Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@1 Populated: Loop head: main::@2 tails: main::@6 blocks: main::@6 main::@2 -NATURAL LOOPS Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@1 Loop head: main::@2 tails: main::@6 blocks: main::@6 main::@2 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 2 loops in scope [main] Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@1 Loop head: main::@2 tails: main::@6 blocks: main::@6 main::@2 Found 0 loops in scope [line] Found 0 loops in scope [plot] -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@1 depth: 1 Loop head: main::@2 tails: main::@6 blocks: main::@6 main::@2 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/overlap-allocation.log b/src/test/java/dk/camelot64/kickc/test/ref/overlap-allocation.log index b6318e7f6..04066c893 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/overlap-allocation.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/overlap-allocation.log @@ -429,24 +429,24 @@ main::@return dominated by main::@9 main::@return main::@7 @begin main::@8 main plot dominated by @begin main @2 plot main::@1 plot::@return dominated by @begin main @2 plot main::@1 plot::@return +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@7 blocks: null Found back edge: Loop head: main::@2 tails: main::@8 blocks: null Found back edge: Loop head: main::@3 tails: main::@9 blocks: null Populated: Loop head: main::@1 tails: main::@7 blocks: main::@7 main::@1 Populated: Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@2 Populated: Loop head: main::@3 tails: main::@9 blocks: main::@9 main::@3 -NATURAL LOOPS Loop head: main::@1 tails: main::@7 blocks: main::@7 main::@1 Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@2 Loop head: main::@3 tails: main::@9 blocks: main::@9 main::@3 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 3 loops in scope [main] Loop head: main::@1 tails: main::@7 blocks: main::@7 main::@1 Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@2 Loop head: main::@3 tails: main::@9 blocks: main::@9 main::@3 Found 0 loops in scope [plot] -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@7 blocks: main::@7 main::@1 depth: 1 Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@2 depth: 1 Loop head: main::@3 tails: main::@9 blocks: main::@9 main::@3 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/print-problem.log b/src/test/java/dk/camelot64/kickc/test/ref/print-problem.log index 5b45f747e..cb59be877 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/print-problem.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/print-problem.log @@ -381,10 +381,10 @@ ln::@return dominated by @2 ln ln::@return @begin main NATURAL LOOPS +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] Found 0 loops in scope [ln] -NATURAL LOOPS WITH DEPTH VARIABLE REGISTER WEIGHTS diff --git a/src/test/java/dk/camelot64/kickc/test/ref/printmsg.log b/src/test/java/dk/camelot64/kickc/test/ref/printmsg.log index 5d09c6ee2..89ce63dfa 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/printmsg.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/printmsg.log @@ -814,21 +814,21 @@ print_str::@1 dominated by @begin main print_str::@1 print_str @7 print_str::@return dominated by @begin print_str::@return main print_str::@1 print_str @7 print_str::@2 dominated by @begin main print_str::@1 print_str::@2 print_str @7 +NATURAL LOOPS Found back edge: Loop head: print_ln::@1 tails: print_ln::@1 blocks: null Found back edge: Loop head: print_str::@1 tails: print_str::@2 blocks: null Populated: Loop head: print_ln::@1 tails: print_ln::@1 blocks: print_ln::@1 Populated: Loop head: print_str::@1 tails: print_str::@2 blocks: print_str::@2 print_str::@1 -NATURAL LOOPS Loop head: print_ln::@1 tails: print_ln::@1 blocks: print_ln::@1 Loop head: print_str::@1 tails: print_str::@2 blocks: print_str::@2 print_str::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] Found 1 loops in scope [print_str] Loop head: print_str::@1 tails: print_str::@2 blocks: print_str::@2 print_str::@1 Found 1 loops in scope [print_ln] Loop head: print_ln::@1 tails: print_ln::@1 blocks: print_ln::@1 -NATURAL LOOPS WITH DEPTH Loop head: print_ln::@1 tails: print_ln::@1 blocks: print_ln::@1 depth: 1 Loop head: print_str::@1 tails: print_str::@2 blocks: print_str::@2 print_str::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/ptr-complex.log b/src/test/java/dk/camelot64/kickc/test/ref/ptr-complex.log index 25fb67c0f..aa1f04c57 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/ptr-complex.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/ptr-complex.log @@ -436,19 +436,19 @@ main::@2 dominated by @1 @begin main::@1 main::@2 main main::@3 main::@4 dominated by @1 @begin main::@1 main::@2 main main::@3 main::@4 main::@return dominated by main::@return @1 @begin main::@1 main::@2 main main::@3 main::@4 +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@1 blocks: null Found back edge: Loop head: main::@2 tails: main::@2 blocks: null Populated: Loop head: main::@1 tails: main::@1 blocks: main::@1 Populated: Loop head: main::@2 tails: main::@2 blocks: main::@2 -NATURAL LOOPS Loop head: main::@1 tails: main::@1 blocks: main::@1 Loop head: main::@2 tails: main::@2 blocks: main::@2 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 2 loops in scope [main] Loop head: main::@1 tails: main::@1 blocks: main::@1 Loop head: main::@2 tails: main::@2 blocks: main::@2 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1 Loop head: main::@2 tails: main::@2 blocks: main::@2 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/ptrtest.log b/src/test/java/dk/camelot64/kickc/test/ref/ptrtest.log index e856c1fd7..5eacf079f 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/ptrtest.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/ptrtest.log @@ -759,6 +759,7 @@ lvalue::@1 dominated by @begin main lvalue @5 lvalue::@1 lvalue::@return dominated by @begin main lvalue::@return lvalue @5 lvalue::@1 lvalue::@2 dominated by @begin main lvalue @5 lvalue::@2 lvalue::@1 +NATURAL LOOPS Found back edge: Loop head: lvaluevar::@1 tails: lvaluevar::@2 blocks: null Found back edge: Loop head: rvaluevar::@1 tails: rvaluevar::@2 blocks: null Found back edge: Loop head: rvalue::@1 tails: rvalue::@2 blocks: null @@ -767,12 +768,12 @@ Populated: Loop head: lvaluevar::@1 tails: lvaluevar::@2 blocks: lvaluevar::@2 l Populated: Loop head: rvaluevar::@1 tails: rvaluevar::@2 blocks: rvaluevar::@2 rvaluevar::@1 Populated: Loop head: rvalue::@1 tails: rvalue::@2 blocks: rvalue::@2 rvalue::@1 Populated: Loop head: lvalue::@1 tails: lvalue::@2 blocks: lvalue::@2 lvalue::@1 -NATURAL LOOPS Loop head: lvaluevar::@1 tails: lvaluevar::@2 blocks: lvaluevar::@2 lvaluevar::@1 Loop head: rvaluevar::@1 tails: rvaluevar::@2 blocks: rvaluevar::@2 rvaluevar::@1 Loop head: rvalue::@1 tails: rvalue::@2 blocks: rvalue::@2 rvalue::@1 Loop head: lvalue::@1 tails: lvalue::@2 blocks: lvalue::@2 lvalue::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] Found 1 loops in scope [lvalue] @@ -783,7 +784,6 @@ Found 1 loops in scope [rvaluevar] Loop head: rvaluevar::@1 tails: rvaluevar::@2 blocks: rvaluevar::@2 rvaluevar::@1 Found 1 loops in scope [lvaluevar] Loop head: lvaluevar::@1 tails: lvaluevar::@2 blocks: lvaluevar::@2 lvaluevar::@1 -NATURAL LOOPS WITH DEPTH Loop head: lvaluevar::@1 tails: lvaluevar::@2 blocks: lvaluevar::@2 lvaluevar::@1 depth: 1 Loop head: rvaluevar::@1 tails: rvaluevar::@2 blocks: rvaluevar::@2 rvaluevar::@1 depth: 1 Loop head: rvalue::@1 tails: rvalue::@2 blocks: rvalue::@2 rvalue::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/ptrtestmin.log b/src/test/java/dk/camelot64/kickc/test/ref/ptrtestmin.log index 07ae53a86..a04377553 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/ptrtestmin.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/ptrtestmin.log @@ -199,15 +199,15 @@ main::@1 dominated by @1 @begin main::@1 main main::@return dominated by main::@return @1 @begin main::@1 main main::@2 dominated by @1 @begin main::@1 main::@2 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@2 blocks: null Populated: Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/scroll-clobber.log b/src/test/java/dk/camelot64/kickc/test/ref/scroll-clobber.log index fc26ace7e..46ff3cd86 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/scroll-clobber.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/scroll-clobber.log @@ -321,15 +321,15 @@ main::@3 dominated by @1 @begin main::@1 main main::@3 main::@2 dominated by @1 @begin main::@1 main::@2 main main::@return dominated by main::@return @1 @begin main::@1 main::@2 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@2 blocks: null Populated: Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 -NATURAL LOOPS Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 main::@3 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/scroll.log b/src/test/java/dk/camelot64/kickc/test/ref/scroll.log index 201db070b..9072725d9 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/scroll.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/scroll.log @@ -941,6 +941,7 @@ fillscreen dominated by @begin main @2 fillscreen fillscreen::@1 dominated by @begin main @2 fillscreen fillscreen::@1 fillscreen::@return dominated by @begin main @2 fillscreen fillscreen::@1 fillscreen::@return +NATURAL LOOPS Found back edge: Loop head: main::@2 tails: main::@2 blocks: null Found back edge: Loop head: main::@3 tails: main::@3 blocks: null Found back edge: Loop head: main::@5 tails: main::@5 blocks: null @@ -951,13 +952,13 @@ Populated: Loop head: main::@3 tails: main::@3 blocks: main::@3 Populated: Loop head: main::@5 tails: main::@5 blocks: main::@5 Populated: Loop head: main::@2 tails: main::@4 blocks: main::@4 main::@6 main::@8 main::@10 main::@11 main::@3 main::@5 main::@2 Populated: Loop head: fillscreen::@1 tails: fillscreen::@1 blocks: fillscreen::@1 -NATURAL LOOPS Loop head: main::@2 tails: main::@2 blocks: main::@2 Loop head: main::@3 tails: main::@3 blocks: main::@3 Loop head: main::@5 tails: main::@5 blocks: main::@5 Loop head: main::@2 tails: main::@4 blocks: main::@4 main::@6 main::@8 main::@10 main::@11 main::@3 main::@5 main::@2 Loop head: fillscreen::@1 tails: fillscreen::@1 blocks: fillscreen::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 4 loops in scope [main] Loop head: main::@2 tails: main::@2 blocks: main::@2 @@ -966,7 +967,6 @@ Found 4 loops in scope [main] Loop head: main::@2 tails: main::@4 blocks: main::@4 main::@6 main::@8 main::@10 main::@11 main::@3 main::@5 main::@2 Found 1 loops in scope [fillscreen] Loop head: fillscreen::@1 tails: fillscreen::@1 blocks: fillscreen::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@2 tails: main::@2 blocks: main::@2 depth: 2 Loop head: main::@3 tails: main::@3 blocks: main::@3 depth: 2 Loop head: main::@5 tails: main::@5 blocks: main::@5 depth: 2 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/scrollbig.log b/src/test/java/dk/camelot64/kickc/test/ref/scrollbig.log index 025e87344..04286a24e 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/scrollbig.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/scrollbig.log @@ -2410,6 +2410,7 @@ fillscreen dominated by main @begin fillscreen @6 fillscreen::@1 dominated by main @begin fillscreen @6 fillscreen::@1 fillscreen::@return dominated by main @begin fillscreen @6 fillscreen::@1 fillscreen::@return +NATURAL LOOPS Found back edge: Loop head: main::@2 tails: main::@2 blocks: null Found back edge: Loop head: main::@3 tails: main::@3 blocks: null Found back edge: Loop head: main::@2 tails: main::@8 blocks: null @@ -2422,7 +2423,6 @@ Populated: Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@5 main::@ Populated: Loop head: scroll_bit::@2 tails: scroll_bit::@3 blocks: scroll_bit::@3 scroll_bit::@2 scroll_bit::@5 Populated: Loop head: scroll_hard::@1 tails: scroll_hard::@1 blocks: scroll_hard::@1 Populated: Loop head: fillscreen::@1 tails: fillscreen::@1 blocks: fillscreen::@1 -NATURAL LOOPS Loop head: main::@2 tails: main::@2 blocks: main::@2 Loop head: main::@3 tails: main::@3 blocks: main::@3 Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@5 main::@3 main::@2 @@ -2430,6 +2430,7 @@ Loop head: scroll_bit::@2 tails: scroll_bit::@3 blocks: scroll_bit::@3 scroll_bi Loop head: scroll_hard::@1 tails: scroll_hard::@1 blocks: scroll_hard::@1 Loop head: fillscreen::@1 tails: fillscreen::@1 blocks: fillscreen::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 3 loops in scope [main] Loop head: main::@2 tails: main::@2 blocks: main::@2 @@ -2443,7 +2444,6 @@ Found 1 loops in scope [scroll_bit] Found 0 loops in scope [next_char] Found 1 loops in scope [scroll_hard] Loop head: scroll_hard::@1 tails: scroll_hard::@1 blocks: scroll_hard::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@2 tails: main::@2 blocks: main::@2 depth: 2 Loop head: main::@3 tails: main::@3 blocks: main::@3 depth: 2 Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@5 main::@3 main::@2 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/signed-bytes.log b/src/test/java/dk/camelot64/kickc/test/ref/signed-bytes.log index c7c50bbd2..504170dca 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/signed-bytes.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/signed-bytes.log @@ -246,15 +246,15 @@ main::@1 dominated by @1 @begin main::@1 main main::@return dominated by main::@return @1 @begin main::@1 main main::@2 dominated by @1 @begin main::@1 main::@2 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@2 blocks: null Populated: Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@2 blocks: main::@2 main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/signed-words.log b/src/test/java/dk/camelot64/kickc/test/ref/signed-words.log index 189049f00..419e3110b 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/signed-words.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/signed-words.log @@ -1347,6 +1347,7 @@ init::@1 dominated by init @begin main init::@1 @3 init::@2 dominated by init @begin main init::@2 init::@1 @3 init::@return dominated by init @begin init::@return main init::@2 init::@1 @3 +NATURAL LOOPS Found back edge: Loop head: main::@2 tails: main::@2 blocks: null Found back edge: Loop head: main::@2 tails: main::@6 blocks: null Found back edge: Loop head: init::@1 tails: init::@1 blocks: null @@ -1355,12 +1356,12 @@ Populated: Loop head: main::@2 tails: main::@2 blocks: main::@2 Populated: Loop head: main::@2 tails: main::@6 blocks: main::@6 main::@3 main::@2 Populated: Loop head: init::@1 tails: init::@1 blocks: init::@1 Populated: Loop head: init::@2 tails: init::@2 blocks: init::@2 -NATURAL LOOPS Loop head: main::@2 tails: main::@2 blocks: main::@2 Loop head: main::@2 tails: main::@6 blocks: main::@6 main::@3 main::@2 Loop head: init::@1 tails: init::@1 blocks: init::@1 Loop head: init::@2 tails: init::@2 blocks: init::@2 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 2 loops in scope [main] Loop head: main::@2 tails: main::@2 blocks: main::@2 @@ -1369,7 +1370,6 @@ Found 2 loops in scope [init] Loop head: init::@1 tails: init::@1 blocks: init::@1 Loop head: init::@2 tails: init::@2 blocks: init::@2 Found 0 loops in scope [anim] -NATURAL LOOPS WITH DEPTH Loop head: main::@2 tails: main::@2 blocks: main::@2 depth: 2 Loop head: main::@2 tails: main::@6 blocks: main::@6 main::@3 main::@2 depth: 1 Loop head: init::@1 tails: init::@1 blocks: init::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/sinus-basic.log b/src/test/java/dk/camelot64/kickc/test/ref/sinus-basic.log index a54ac228d..1f2f0c573 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/sinus-basic.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/sinus-basic.log @@ -2375,14 +2375,15 @@ setMEMtoFAC::@return dominated by main main::@3 main::@4 @34 @begin setMEMtoFAC divFACby10 dominated by main main::@3 @34 @begin divFACby10 divFACby10::@return dominated by divFACby10::@return main main::@3 @34 @begin divFACby10 +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@17 blocks: null Found back edge: Loop head: print_ln::@1 tails: print_ln::@1 blocks: null Populated: Loop head: main::@1 tails: main::@17 blocks: main::@17 main::@16 main::@15 main::@14 main::@13 main::@12 main::@11 main::@10 main::@9 main::@8 main::@7 main::@6 main::@1 Populated: Loop head: print_ln::@1 tails: print_ln::@1 blocks: print_ln::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@17 blocks: main::@17 main::@16 main::@15 main::@14 main::@13 main::@12 main::@11 main::@10 main::@9 main::@8 main::@7 main::@6 main::@1 Loop head: print_ln::@1 tails: print_ln::@1 blocks: print_ln::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@17 blocks: main::@17 main::@16 main::@15 main::@14 main::@13 main::@12 main::@11 main::@10 main::@9 main::@8 main::@7 main::@6 main::@1 @@ -2400,7 +2401,6 @@ Found 1 loops in scope [print_ln] Found 0 loops in scope [prepareMEM] Found 0 loops in scope [print_byte] Found 0 loops in scope [print_char] -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@17 blocks: main::@17 main::@16 main::@15 main::@14 main::@13 main::@12 main::@11 main::@10 main::@9 main::@8 main::@7 main::@6 main::@1 depth: 1 Loop head: print_ln::@1 tails: print_ln::@1 blocks: print_ln::@1 depth: 2 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/sinus-sprites.log b/src/test/java/dk/camelot64/kickc/test/ref/sinus-sprites.log index bf9f646de..87a8cb3d4 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/sinus-sprites.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/sinus-sprites.log @@ -5638,6 +5638,7 @@ place_sprites dominated by init main @begin init::@2 init::@1 @43 place_sprites place_sprites::@1 dominated by init place_sprites::@1 main @begin init::@2 init::@1 @43 place_sprites place_sprites::@return dominated by init place_sprites::@return place_sprites::@1 main @begin init::@2 init::@1 @43 place_sprites +NATURAL LOOPS Found back edge: Loop head: main::@2 tails: main::@2 blocks: null Found back edge: Loop head: main::@2 tails: main::@6 blocks: null Found back edge: Loop head: anim::@1 tails: anim::@3 blocks: null @@ -5660,7 +5661,6 @@ Populated: Loop head: gen_chargen_sprite::@4 tails: gen_chargen_sprite::@5 block Populated: Loop head: gen_chargen_sprite::@2 tails: gen_chargen_sprite::@8 blocks: gen_chargen_sprite::@8 gen_chargen_sprite::@5 gen_chargen_sprite::@4 gen_chargen_sprite::@7 gen_chargen_sprite::@3 gen_chargen_sprite::@2 gen_chargen_sprite::@6 Populated: Loop head: gen_chargen_sprite::@1 tails: gen_chargen_sprite::@9 blocks: gen_chargen_sprite::@9 gen_chargen_sprite::@8 gen_chargen_sprite::@5 gen_chargen_sprite::@4 gen_chargen_sprite::@7 gen_chargen_sprite::@3 gen_chargen_sprite::@2 gen_chargen_sprite::@6 gen_chargen_sprite::@1 Populated: Loop head: place_sprites::@1 tails: place_sprites::@1 blocks: place_sprites::@1 -NATURAL LOOPS Loop head: main::@2 tails: main::@2 blocks: main::@2 Loop head: main::@2 tails: main::@6 blocks: main::@6 main::@3 main::@2 Loop head: anim::@1 tails: anim::@3 blocks: anim::@3 anim::@2 anim::@7 anim::@1 anim::@6 @@ -5673,6 +5673,7 @@ Loop head: gen_chargen_sprite::@2 tails: gen_chargen_sprite::@8 blocks: gen_char Loop head: gen_chargen_sprite::@1 tails: gen_chargen_sprite::@9 blocks: gen_chargen_sprite::@9 gen_chargen_sprite::@8 gen_chargen_sprite::@5 gen_chargen_sprite::@4 gen_chargen_sprite::@7 gen_chargen_sprite::@3 gen_chargen_sprite::@2 gen_chargen_sprite::@6 gen_chargen_sprite::@1 Loop head: place_sprites::@1 tails: place_sprites::@1 blocks: place_sprites::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 2 loops in scope [main] Loop head: main::@2 tails: main::@2 blocks: main::@2 @@ -5705,7 +5706,6 @@ Found 0 loops in scope [sinFAC] Found 0 loops in scope [getFAC] Found 0 loops in scope [progress_inc] Found 0 loops in scope [prepareMEM] -NATURAL LOOPS WITH DEPTH Loop head: main::@2 tails: main::@2 blocks: main::@2 depth: 2 Loop head: main::@2 tails: main::@6 blocks: main::@6 main::@3 main::@2 depth: 1 Loop head: anim::@1 tails: anim::@3 blocks: anim::@3 anim::@2 anim::@7 anim::@1 anim::@6 depth: 2 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/summin.log b/src/test/java/dk/camelot64/kickc/test/ref/summin.log index 3e14fb689..dcd610daf 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/summin.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/summin.log @@ -395,10 +395,10 @@ sum::@return dominated by @2 @begin main sum sum::@return NATURAL LOOPS +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] Found 0 loops in scope [sum] -NATURAL LOOPS WITH DEPTH VARIABLE REGISTER WEIGHTS diff --git a/src/test/java/dk/camelot64/kickc/test/ref/true-inline-words.log b/src/test/java/dk/camelot64/kickc/test/ref/true-inline-words.log index 66d693f68..bcd39c29b 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/true-inline-words.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/true-inline-words.log @@ -263,9 +263,9 @@ main::@1 dominated by @1 @begin main::@1 main NATURAL LOOPS +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] -NATURAL LOOPS WITH DEPTH VARIABLE REGISTER WEIGHTS diff --git a/src/test/java/dk/camelot64/kickc/test/ref/unused-method.log b/src/test/java/dk/camelot64/kickc/test/ref/unused-method.log index f141ea3af..b232c52b5 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/unused-method.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/unused-method.log @@ -148,9 +148,9 @@ main::@return dominated by main::@return @2 @begin main NATURAL LOOPS +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] -NATURAL LOOPS WITH DEPTH VARIABLE REGISTER WEIGHTS diff --git a/src/test/java/dk/camelot64/kickc/test/ref/unused-vars.log b/src/test/java/dk/camelot64/kickc/test/ref/unused-vars.log index 790ff2398..98d9db820 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/unused-vars.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/unused-vars.log @@ -458,16 +458,16 @@ main::@return dominated by main::@return @2 @begin main::@1 main s dominated by @2 @begin s main s::@return dominated by @2 @begin s main s::@return +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@1 blocks: null Populated: Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@1 blocks: main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@1 blocks: main::@1 Found 0 loops in scope [s] -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/useglobal.log b/src/test/java/dk/camelot64/kickc/test/ref/useglobal.log index bf4fa0520..92edf2395 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/useglobal.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/useglobal.log @@ -126,9 +126,9 @@ main::@return dominated by main::@return @1 @begin main NATURAL LOOPS +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 0 loops in scope [main] -NATURAL LOOPS WITH DEPTH VARIABLE REGISTER WEIGHTS diff --git a/src/test/java/dk/camelot64/kickc/test/ref/voronoi.log b/src/test/java/dk/camelot64/kickc/test/ref/voronoi.log index 236a5aaa9..3b0d4327e 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/voronoi.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/voronoi.log @@ -1804,6 +1804,7 @@ initscreen dominated by main @begin initscreen @5 initscreen::@1 dominated by main @begin initscreen @5 initscreen::@1 initscreen::@return dominated by main @begin initscreen initscreen::@return @5 initscreen::@1 +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@5 blocks: null Found back edge: Loop head: render::@2 tails: render::@5 blocks: null Found back edge: Loop head: render::@1 tails: render::@3 blocks: null @@ -1814,13 +1815,13 @@ Populated: Loop head: render::@2 tails: render::@5 blocks: render::@5 render::@2 Populated: Loop head: render::@1 tails: render::@3 blocks: render::@3 render::@5 render::@2 render::@1 Populated: Loop head: findcol::@1 tails: findcol::@19 blocks: findcol::@19 findcol::@8 findcol::@16 findcol::@21 findcol::@7 findcol::@14 findcol::@6 findcol::@5 findcol::@12 findcol::@4 findcol::@2 findcol::@1 findcol::@9 Populated: Loop head: initscreen::@1 tails: initscreen::@1 blocks: initscreen::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@4 main::@1 Loop head: render::@2 tails: render::@5 blocks: render::@5 render::@2 Loop head: render::@1 tails: render::@3 blocks: render::@3 render::@5 render::@2 render::@1 Loop head: findcol::@1 tails: findcol::@19 blocks: findcol::@19 findcol::@8 findcol::@16 findcol::@21 findcol::@7 findcol::@14 findcol::@6 findcol::@5 findcol::@12 findcol::@4 findcol::@2 findcol::@1 findcol::@9 Loop head: initscreen::@1 tails: initscreen::@1 blocks: initscreen::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@4 main::@1 @@ -1832,7 +1833,6 @@ Found 2 loops in scope [render] Found 0 loops in scope [animate] Found 1 loops in scope [findcol] Loop head: findcol::@1 tails: findcol::@19 blocks: findcol::@19 findcol::@8 findcol::@16 findcol::@21 findcol::@7 findcol::@14 findcol::@6 findcol::@5 findcol::@12 findcol::@4 findcol::@2 findcol::@1 findcol::@9 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@4 main::@1 depth: 1 Loop head: render::@2 tails: render::@5 blocks: render::@5 render::@2 depth: 3 Loop head: render::@1 tails: render::@3 blocks: render::@3 render::@5 render::@2 render::@1 depth: 2 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/wordexpr.log b/src/test/java/dk/camelot64/kickc/test/ref/wordexpr.log index b9b16d223..fe9af12ab 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/wordexpr.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/wordexpr.log @@ -192,15 +192,15 @@ main dominated by @1 @begin main main::@1 dominated by @1 @begin main::@1 main main::@return dominated by main::@return @1 @begin main::@1 main +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@1 blocks: null Populated: Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@1 blocks: main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@1 blocks: main::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/zpparammin.log b/src/test/java/dk/camelot64/kickc/test/ref/zpparammin.log index 51221d7f3..0858b8194 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/zpparammin.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/zpparammin.log @@ -518,17 +518,17 @@ sum2::@return dominated by sum2 @begin @3 main::@1 main main::@3 sum2::@return sum dominated by @begin @3 main::@1 main sum sum::@return dominated by @begin @3 main::@1 main sum sum::@return +NATURAL LOOPS Found back edge: Loop head: main::@1 tails: main::@4 blocks: null Populated: Loop head: main::@1 tails: main::@4 blocks: main::@4 main::@3 main::@1 -NATURAL LOOPS Loop head: main::@1 tails: main::@4 blocks: main::@4 main::@3 main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 1 loops in scope [main] Loop head: main::@1 tails: main::@4 blocks: main::@4 main::@3 main::@1 Found 0 loops in scope [sum] Found 0 loops in scope [sum2] -NATURAL LOOPS WITH DEPTH Loop head: main::@1 tails: main::@4 blocks: main::@4 main::@3 main::@1 depth: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/zpptr.log b/src/test/java/dk/camelot64/kickc/test/ref/zpptr.log index 97d6f822d..904fc9e0e 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/zpptr.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/zpptr.log @@ -368,23 +368,23 @@ main::@4 dominated by @1 @begin main::@1 main::@2 main main::@3 main::@4 main::@5 dominated by @1 @begin main::@1 main::@2 main main::@5 main::@3 main::@4 main::@return dominated by main::@return @1 @begin main::@1 main::@2 main main::@5 main::@3 main::@4 +NATURAL LOOPS Found back edge: Loop head: main::@3 tails: main::@3 blocks: null Found back edge: Loop head: main::@2 tails: main::@4 blocks: null Found back edge: Loop head: main::@1 tails: main::@5 blocks: null Populated: Loop head: main::@3 tails: main::@3 blocks: main::@3 Populated: Loop head: main::@2 tails: main::@4 blocks: main::@4 main::@3 main::@2 Populated: Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@4 main::@3 main::@2 main::@1 -NATURAL LOOPS Loop head: main::@3 tails: main::@3 blocks: main::@3 Loop head: main::@2 tails: main::@4 blocks: main::@4 main::@3 main::@2 Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@4 main::@3 main::@2 main::@1 +NATURAL LOOPS WITH DEPTH Found 0 loops in scope [] Found 3 loops in scope [main] Loop head: main::@3 tails: main::@3 blocks: main::@3 Loop head: main::@2 tails: main::@4 blocks: main::@4 main::@3 main::@2 Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@4 main::@3 main::@2 main::@1 -NATURAL LOOPS WITH DEPTH Loop head: main::@3 tails: main::@3 blocks: main::@3 depth: 3 Loop head: main::@2 tails: main::@4 blocks: main::@4 main::@3 main::@2 depth: 2 Loop head: main::@1 tails: main::@5 blocks: main::@5 main::@4 main::@3 main::@2 main::@1 depth: 1