From 854b32d5b3ba5ee9d492fd65d635ab9b88804a2b Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Mon, 7 Jan 2019 21:58:40 +0100 Subject: [PATCH] Fixed an array index optimization that was to aggressive. --- .../java/dk/camelot64/kickc/Compiler.java | 4 + .../kickc/model/VariableReferenceInfos.java | 15 + .../Pass2ConstantAdditionElimination.java | 19 +- .../kickc/passes/Pass2SsaOptimization.java | 58 --- .../passes/Pass2UnaryNotSimplification.java | 7 +- .../dk/camelot64/kickc/test/TestPrograms.java | 5 + src/test/kc/complex/tetris/tetris-play.kc | 2 +- .../kc/consolidate-array-index-problem.kc | 11 + src/test/ref/array-length-symbolic-min.log | 2 +- src/test/ref/array-length-symbolic.log | 4 +- src/test/ref/asm-clobber.log | 8 +- src/test/ref/bitmap-plotter.log | 22 +- src/test/ref/bitwise-not.log | 2 +- src/test/ref/bool-const.log | 40 +- src/test/ref/bool-function.log | 2 +- src/test/ref/bool-ifs.log | 44 +- src/test/ref/bool-pointer.log | 2 +- src/test/ref/bool-vars.log | 36 +- src/test/ref/bresenham.log | 6 +- src/test/ref/bresenhamarr.log | 6 +- src/test/ref/c64dtv-8bppcharstretch.log | 22 +- src/test/ref/c64dtv-8bppchunkystretch.log | 16 +- src/test/ref/c64dtv-blittermin.log | 4 +- src/test/ref/c64dtv-color.log | 8 +- src/test/ref/c64dtv-gfxexplorer.log | 374 ++++++++--------- src/test/ref/c64dtv-gfxmodes.log | 280 ++++++------- src/test/ref/callconstparam.log | 2 +- src/test/ref/cast-deref.log | 2 +- src/test/ref/cast-precedence-problem.log | 2 +- src/test/ref/casting.log | 4 +- src/test/ref/chargen.log | 8 +- src/test/ref/chessboard.log | 4 +- src/test/ref/clobber-a-problem.log | 4 +- src/test/ref/complex/tetris/test-sprites.log | 18 +- src/test/ref/complex/tetris/tetris.asm | 2 +- src/test/ref/complex/tetris/tetris.log | 228 +++++----- src/test/ref/complex/tetris/tetris.sym | 2 +- src/test/ref/compound-assignment.log | 2 +- src/test/ref/concat-char.log | 2 +- .../ref/consolidate-array-index-problem.asm | 22 + .../ref/consolidate-array-index-problem.cfg | 23 ++ .../ref/consolidate-array-index-problem.log | 389 ++++++++++++++++++ .../ref/consolidate-array-index-problem.sym | 20 + src/test/ref/const-condition.log | 4 +- src/test/ref/const-identification.log | 10 +- src/test/ref/const-pointer.log | 4 +- src/test/ref/constant-string-concat.log | 2 +- src/test/ref/constantmin.log | 2 +- src/test/ref/constants.log | 10 +- src/test/ref/dword.log | 2 +- src/test/ref/emptyblock-error.log | 10 +- src/test/ref/examples/3d/3d.asm | 14 +- src/test/ref/examples/3d/3d.cfg | 6 +- src/test/ref/examples/3d/3d.log | 241 ++++++----- src/test/ref/examples/3d/perspective.log | 14 +- .../examples/bresenham/bitmap-bresenham.log | 64 +-- .../ref/examples/chargen/chargen-analysis.log | 54 +-- .../fastmultiply/fastmultiply8.kc.log | 14 +- .../ref/examples/helloworld/helloworld.log | 4 +- .../multiplexer/simple-multiplexer.log | 42 +- .../ref/examples/rasterbars/raster-bars.log | 8 +- src/test/ref/examples/rotate/rotate.log | 36 +- src/test/ref/examples/scroll/scroll.log | 20 +- src/test/ref/examples/scrollbig/scrollbig.log | 44 +- .../ref/examples/scrolllogo/scrolllogo.log | 118 +++--- src/test/ref/examples/showlogo/showlogo.log | 6 +- .../ref/examples/sinplotter/sine-plotter.log | 70 ++-- .../ref/examples/sinsprites/sinus-sprites.log | 52 +-- src/test/ref/fibmem.log | 6 +- src/test/ref/fillscreen.log | 2 +- src/test/ref/flipper-rex2.log | 20 +- src/test/ref/forclassicmin.log | 2 +- src/test/ref/forincrementassign.log | 2 +- src/test/ref/forrangedwords.log | 4 +- src/test/ref/forrangemin.log | 4 +- src/test/ref/forrangesymbolic.log | 2 +- src/test/ref/halfscii.log | 20 +- src/test/ref/helloworld2-inline.log | 4 +- src/test/ref/helloworld2.log | 2 +- src/test/ref/ifmin.log | 6 +- src/test/ref/immzero.log | 2 +- src/test/ref/incd020.log | 2 +- src/test/ref/incrementinarray.log | 8 +- src/test/ref/infloop-error.log | 10 +- src/test/ref/init-volatiles.log | 2 +- src/test/ref/inline-assignment.log | 2 +- src/test/ref/inline-function-if.log | 8 +- src/test/ref/inline-function-level2.log | 6 +- src/test/ref/inline-function-print.log | 4 +- src/test/ref/inline-function.log | 6 +- src/test/ref/inline-string-2.log | 4 +- src/test/ref/inline-string.log | 2 +- src/test/ref/inline-word.log | 4 +- src/test/ref/inlinearrayproblem.log | 2 +- src/test/ref/inmem-const-array.log | 6 +- src/test/ref/inmemarray.log | 6 +- src/test/ref/inmemstring.log | 6 +- .../ref/interrupt-volatile-reuse-problem2.log | 8 +- src/test/ref/irq-hardware-clobber-jsr.log | 2 +- src/test/ref/irq-hardware-clobber.log | 2 +- src/test/ref/irq-hardware.log | 2 +- src/test/ref/iterarray.log | 4 +- src/test/ref/keyboard-glitch.log | 22 +- src/test/ref/line-anim.asm | 14 +- src/test/ref/line-anim.log | 96 ++--- src/test/ref/linegen.log | 20 +- src/test/ref/literals.log | 6 +- src/test/ref/local-string.log | 2 +- src/test/ref/longbranch-interrupt-problem.log | 10 +- src/test/ref/longjump.log | 2 +- src/test/ref/longjump2.log | 4 +- src/test/ref/loop-problem.log | 2 +- src/test/ref/loop-problem2.log | 6 +- src/test/ref/loop100.log | 2 +- src/test/ref/loopmin.log | 6 +- src/test/ref/loopnest.log | 4 +- src/test/ref/loopnest2.log | 12 +- src/test/ref/loopnest3.log | 4 +- src/test/ref/loopsplit.log | 4 +- src/test/ref/mem-alignment.log | 4 +- src/test/ref/min-fmul-16.log | 16 +- src/test/ref/norom-charset.log | 10 +- src/test/ref/overlap-allocation-2.log | 4 +- src/test/ref/overlap-allocation.log | 6 +- src/test/ref/printmsg.log | 4 +- src/test/ref/ptr-complex.log | 4 +- src/test/ref/ptrtest.log | 8 +- src/test/ref/ptrtestmin.log | 2 +- src/test/ref/scan-desire-problem.log | 26 +- src/test/ref/scroll-clobber.log | 6 +- src/test/ref/signed-bytes.log | 2 +- src/test/ref/signed-words.log | 16 +- src/test/ref/sinus-basic.log | 4 +- src/test/ref/sinusgen16.log | 44 +- src/test/ref/sinusgen16b.log | 58 +-- src/test/ref/sinusgen8.log | 46 +-- src/test/ref/sinusgen8b.log | 66 +-- src/test/ref/sinusgenscale8.log | 50 +-- src/test/ref/test-address-of.log | 2 +- src/test/ref/test-comparisons.log | 90 ++-- src/test/ref/test-division.log | 56 +-- src/test/ref/test-interrupt-notype.log | 2 +- .../ref/test-interrupt-volatile-write.log | 8 +- src/test/ref/test-interrupt-volatile.log | 2 +- src/test/ref/test-interrupt.log | 2 +- src/test/ref/test-kasm-pc.log | 2 +- src/test/ref/test-kasm.log | 2 +- src/test/ref/test-keyboard-space.log | 6 +- src/test/ref/test-keyboard.log | 24 +- src/test/ref/test-lowhigh.log | 6 +- src/test/ref/test-multiply-16bit.log | 96 ++--- src/test/ref/test-multiply-8bit.log | 100 ++--- src/test/ref/true-inline-words.log | 4 +- src/test/ref/typeinference-problem.log | 2 +- src/test/ref/unroll-loop-modifyvar.log | 24 +- src/test/ref/unroll-screenfill-for-double.log | 48 +-- src/test/ref/unroll-screenfill-for.log | 54 +-- src/test/ref/unroll-screenfill-while.log | 56 +-- src/test/ref/unused-vars.log | 2 +- src/test/ref/unusedblockproblem.log | 4 +- src/test/ref/var-register.log | 6 +- src/test/ref/voronoi.log | 50 +-- src/test/ref/wordexpr.log | 2 +- src/test/ref/zpparammin.log | 2 +- src/test/ref/zpptr.log | 6 +- 165 files changed, 2231 insertions(+), 1775 deletions(-) create mode 100644 src/test/kc/consolidate-array-index-problem.kc create mode 100644 src/test/ref/consolidate-array-index-problem.asm create mode 100644 src/test/ref/consolidate-array-index-problem.cfg create mode 100644 src/test/ref/consolidate-array-index-problem.log create mode 100644 src/test/ref/consolidate-array-index-problem.sym diff --git a/src/main/java/dk/camelot64/kickc/Compiler.java b/src/main/java/dk/camelot64/kickc/Compiler.java index 0af211364..f6aaa2e51 100644 --- a/src/main/java/dk/camelot64/kickc/Compiler.java +++ b/src/main/java/dk/camelot64/kickc/Compiler.java @@ -219,6 +219,8 @@ public class Compiler { private void pass2Optimize() { List optimizations = new ArrayList<>(); optimizations.add(new Pass2CullEmptyBlocks(program)); + optimizations.add(new PassNStatementIndices(program)); + optimizations.add(new PassNVariableReferenceInfos(program)); optimizations.add(new Pass2UnaryNotSimplification(program)); optimizations.add(new Pass2AliasElimination(program)); optimizations.add(new Pass2SelfPhiElimination(program)); @@ -227,6 +229,8 @@ public class Compiler { optimizations.add(new Pass2ConditionalJumpSimplification(program)); optimizations.add(new Pass2ConditionalAndOrRewriting(program)); optimizations.add(new Pass2ConstantIdentification(program)); + optimizations.add(new PassNStatementIndices(program)); + optimizations.add(new PassNVariableReferenceInfos(program)); optimizations.add(new Pass2ConstantAdditionElimination(program)); optimizations.add(new Pass2ConstantIfs(program)); optimizations.add(new Pass2FixInlineConstructors(program)); diff --git a/src/main/java/dk/camelot64/kickc/model/VariableReferenceInfos.java b/src/main/java/dk/camelot64/kickc/model/VariableReferenceInfos.java index 85c4634a1..11fa4b075 100644 --- a/src/main/java/dk/camelot64/kickc/model/VariableReferenceInfos.java +++ b/src/main/java/dk/camelot64/kickc/model/VariableReferenceInfos.java @@ -245,6 +245,21 @@ public class VariableReferenceInfos { return stmts; } + /** + * Get all statements using a variable + * + * @param varRef The variable to look for + * @return Index of all statements using the variable (ie. referencing but not defining it) + */ + public Collection getVarUseStatements(VariableRef varRef) { + Collection refs = symbolVarReferences.get(varRef); + LinkedHashSet stmts = new LinkedHashSet<>(); + refs.stream() + .filter(referenceToSymbolVar -> referenceToSymbolVar instanceof ReferenceInStatement) + .filter(referenceToSymbolVar -> ReferenceToSymbolVar.ReferenceType.USE == referenceToSymbolVar.getReferenceType()) + .forEach(referenceToSymbolVar -> stmts.add(((ReferenceInStatement) referenceToSymbolVar).getStatementIdx())); + return stmts; + } /** diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass2ConstantAdditionElimination.java b/src/main/java/dk/camelot64/kickc/passes/Pass2ConstantAdditionElimination.java index 6507e6d8d..fe8f22780 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass2ConstantAdditionElimination.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass2ConstantAdditionElimination.java @@ -1,15 +1,17 @@ package dk.camelot64.kickc.passes; -import dk.camelot64.kickc.model.*; +import dk.camelot64.kickc.model.ControlFlowBlock; +import dk.camelot64.kickc.model.Program; +import dk.camelot64.kickc.model.VariableReferenceInfos; import dk.camelot64.kickc.model.iterator.ProgramValue; import dk.camelot64.kickc.model.operators.Operator; import dk.camelot64.kickc.model.operators.Operators; -import dk.camelot64.kickc.model.values.*; import dk.camelot64.kickc.model.statements.Statement; import dk.camelot64.kickc.model.statements.StatementAssignment; import dk.camelot64.kickc.model.statements.StatementConditionalJump; +import dk.camelot64.kickc.model.values.*; -import java.util.Map; +import java.util.Collection; /** * Compiler Pass eliminating several additions of constants by consolidating them to a single (compile time) constant c1+v+c2 => (c1+c2)+v @@ -23,7 +25,7 @@ import java.util.Map; */ public class Pass2ConstantAdditionElimination extends Pass2SsaOptimization { - private Map usages; + private VariableReferenceInfos variableReferenceInfos; public Pass2ConstantAdditionElimination(Program program) { super(program); @@ -38,7 +40,7 @@ public class Pass2ConstantAdditionElimination extends Pass2SsaOptimization { public boolean step() { boolean optimized = false; - this.usages = countVarUsages(); + this.variableReferenceInfos = getProgram().getVariableReferenceInfos(); // Examine all assignments - performing constant consolidation for(ControlFlowBlock block : getGraph().getAllBlocks()) { @@ -230,10 +232,9 @@ public class Pass2ConstantAdditionElimination extends Pass2SsaOptimization { return null; } - private Integer getUsages(VariableRef variable) { - Integer useCount = usages.get(variable); - if(useCount == null) useCount = 0; - return useCount; + private int getUsages(VariableRef variable) { + Collection refStatements = variableReferenceInfos.getVarUseStatements(variable); + return refStatements.size(); } } diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass2SsaOptimization.java b/src/main/java/dk/camelot64/kickc/passes/Pass2SsaOptimization.java index 5f1cfb278..135b059aa 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass2SsaOptimization.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass2SsaOptimization.java @@ -189,62 +189,4 @@ public abstract class Pass2SsaOptimization extends Pass1Base { return usages; } - protected Map countVarUsages() { - final HashMap usages = new LinkedHashMap<>(); - ControlFlowGraphBaseVisitor usageVisitor = new ControlFlowGraphBaseVisitor() { - private void addUsage(RValue rVal) { - if(rVal instanceof VariableRef) { - VariableRef var = (VariableRef) rVal; - Integer usage = usages.get(var); - if(usage == null) { - usage = 0; - } - usage = usage + 1; - usages.put(var, usage); - } else if(rVal instanceof PointerDereference) { - Value pointer = ((PointerDereference) rVal).getPointer(); - if(pointer instanceof RValue) { - addUsage((RValue) pointer); - } - } - } - - - @Override - public Object visitAssignment(StatementAssignment assignment) { - addUsage(assignment.getrValue1()); - addUsage(assignment.getrValue2()); - return null; - } - - @Override - public Object visitReturn(StatementReturn aReturn) { - addUsage(aReturn.getValue()); - return null; - } - - @Override - public Object visitCall(StatementCall call) { - if(call.getParameters() != null) { - for(RValue param : call.getParameters()) { - addUsage(param); - } - } - return null; - } - - @Override - public Void visitPhiBlock(StatementPhiBlock phi) { - for(StatementPhiBlock.PhiVariable phiVariable : phi.getPhiVariables()) { - for(StatementPhiBlock.PhiRValue phiRValue : phiVariable.getValues()) { - addUsage(phiRValue.getrValue()); - } - } - return null; - } - - }; - usageVisitor.visitGraph(getGraph()); - return usages; - } } diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass2UnaryNotSimplification.java b/src/main/java/dk/camelot64/kickc/passes/Pass2UnaryNotSimplification.java index 2e2be3b2a..638332c13 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass2UnaryNotSimplification.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass2UnaryNotSimplification.java @@ -24,7 +24,7 @@ public class Pass2UnaryNotSimplification extends Pass2SsaOptimization { */ @Override public boolean step() { - final Map usages = countVarUsages(); + final VariableReferenceInfos usages = getProgram().getVariableReferenceInfos(); final Map assignments = getAllAssignments(); final List unusedComparisons = optimizeUnaryNots(assignments, usages); removeAssignments(unusedComparisons); @@ -39,7 +39,7 @@ public class Pass2UnaryNotSimplification extends Pass2SsaOptimization { * @param usages All variable usages * @return Unused comparisons (because they have been replaced with reversed comparisions) */ - private List optimizeUnaryNots(final Map assignments, final Map usages) { + private List optimizeUnaryNots(final Map assignments, VariableReferenceInfos usages) { final List unused = new ArrayList<>(); for(StatementAssignment assignment : assignments.values()) { @@ -50,7 +50,8 @@ public class Pass2UnaryNotSimplification extends Pass2SsaOptimization { ) { VariableRef tempVar = (VariableRef) assignment.getrValue2(); StatementAssignment tempAssignment = assignments.get(tempVar); - if(usages.get(tempVar) == 1 && tempAssignment!=null && tempAssignment.getOperator() != null) { + int tempVarUsages = usages.getVarUseStatements(tempVar).size(); + if(tempVarUsages == 1 && tempAssignment!=null && tempAssignment.getOperator() != null) { switch(tempAssignment.getOperator().getOperator()) { case "<": createInverse(">=", assignment, tempAssignment); diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index 0f2f7eaff..29997ea12 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -54,6 +54,11 @@ public class TestPrograms { compileAndCompare("complex/tetris/tetris"); } + @Test + public void testConsolidateArrayIndexProblem() throws IOException, URISyntaxException { + compileAndCompare("consolidate-array-index-problem"); + } + @Test public void testScanDesireProblem() throws IOException, URISyntaxException { compileAndCompare("scan-desire-problem"); diff --git a/src/test/kc/complex/tetris/tetris-play.kc b/src/test/kc/complex/tetris/tetris-play.kc index 373cf85e5..6ea32794c 100644 --- a/src/test/kc/complex/tetris/tetris-play.kc +++ b/src/test/kc/complex/tetris/tetris-play.kc @@ -26,7 +26,7 @@ const byte[] MOVEDOWN_SLOW_SPEEDS = { 48, 43, 38, 33, 28, 23, 18, 13, 8, 6, 5, 5 byte current_movedown_slow = 48; // The rate of moving down the current piece fast (number of frames between moves if movedown is not forced) -const byte current_movedown_fast = 2; +const byte current_movedown_fast = 10; // Counts up to the next movedown of current piece byte current_movedown_counter = 0; diff --git a/src/test/kc/consolidate-array-index-problem.kc b/src/test/kc/consolidate-array-index-problem.kc new file mode 100644 index 000000000..a1383eb9a --- /dev/null +++ b/src/test/kc/consolidate-array-index-problem.kc @@ -0,0 +1,11 @@ + +void main() { + byte BLACK = 0; + byte* screen = $0400; + byte* cols = $d800; + for(byte x:0..10) { + byte y=x+12; + screen[y] = 'a'; + cols[y] = BLACK; + } +} diff --git a/src/test/ref/array-length-symbolic-min.log b/src/test/ref/array-length-symbolic-min.log index a0115d31d..7b3d1ece8 100644 --- a/src/test/ref/array-length-symbolic-min.log +++ b/src/test/ref/array-length-symbolic-min.log @@ -64,7 +64,7 @@ Redundant Phi (byte) SZ#2 (byte) SZ#0 Redundant Phi (byte*) main::cur_item#1 (byte*) main::cur_item#0 Redundant Phi (byte) SZ#1 (byte) SZ#2 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$0 if((byte) main::sub#1!=rangelast(0,SZ#0)) goto main::@1 +Simple Condition (bool~) main::$0 [9] if((byte) main::sub#1!=rangelast(0,SZ#0)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) SZ#0 = 15 Constant (const byte) main::sub#0 = 0 diff --git a/src/test/ref/array-length-symbolic.log b/src/test/ref/array-length-symbolic.log index 8ba39e178..c12af2933 100644 --- a/src/test/ref/array-length-symbolic.log +++ b/src/test/ref/array-length-symbolic.log @@ -118,8 +118,8 @@ Redundant Phi (byte) main::item#2 (byte) main::item#4 Redundant Phi (byte*) main::cur_item#2 (byte*) main::cur_item#4 Redundant Phi (byte) ITEM_SIZE#2 (byte) ITEM_SIZE#1 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$4 if((byte) main::sub#1!=rangelast(0,main::$1)) goto main::@2 -Simple Condition (bool~) main::$5 if((byte) main::item#1!=rangelast(0,main::$0)) goto main::@1 +Simple Condition (bool~) main::$4 [17] if((byte) main::sub#1!=rangelast(0,main::$1)) goto main::@2 +Simple Condition (bool~) main::$5 [22] if((byte) main::item#1!=rangelast(0,main::$0)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) ITEM_COUNT#0 = 3 Constant (const byte) ITEM_SIZE#0 = 5 diff --git a/src/test/ref/asm-clobber.log b/src/test/ref/asm-clobber.log index 59c880c51..621d895e9 100644 --- a/src/test/ref/asm-clobber.log +++ b/src/test/ref/asm-clobber.log @@ -134,10 +134,10 @@ Redundant Phi (byte) main::i#2 (byte) main::i#4 Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#4 Redundant Phi (byte) main::k#2 (byte) main::k#4 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$0 if((byte) main::j#1!=rangelast(0,100)) goto main::@2 -Simple Condition (bool~) main::$1 if((byte) main::i#1!=rangelast(0,100)) goto main::@1 -Simple Condition (bool~) main::$2 if((byte) main::l#1!=rangelast(0,100)) goto main::@4 -Simple Condition (bool~) main::$3 if((byte) main::k#1!=rangelast(0,100)) goto main::@3 +Simple Condition (bool~) main::$0 [9] if((byte) main::j#1!=rangelast(0,100)) goto main::@2 +Simple Condition (bool~) main::$1 [13] if((byte) main::i#1!=rangelast(0,100)) goto main::@1 +Simple Condition (bool~) main::$2 [23] if((byte) main::l#1!=rangelast(0,100)) goto main::@4 +Simple Condition (bool~) main::$3 [27] if((byte) main::k#1!=rangelast(0,100)) goto main::@3 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte) main::i#0 = 0 diff --git a/src/test/ref/bitmap-plotter.log b/src/test/ref/bitmap-plotter.log index 32f33df98..c0f29dac2 100644 --- a/src/test/ref/bitmap-plotter.log +++ b/src/test/ref/bitmap-plotter.log @@ -515,8 +515,8 @@ SYMBOL TABLE SSA Culled Empty Block (label) @6 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) init_plot_tables::$4 ← (byte) init_plot_tables::bits#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) init_plot_tables::$3 ← (byte) init_plot_tables::bits#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) init_plot_tables::$12 ← (byte~) init_plot_tables::$10 != (byte/signed byte/word/signed word/dword/signed dword) 7 from (bool~) init_plot_tables::$11 ← (byte~) init_plot_tables::$10 == (byte/signed byte/word/signed word/dword/signed dword) 7 +Inversing boolean not [97] (bool~) init_plot_tables::$4 ← (byte) init_plot_tables::bits#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [96] (bool~) init_plot_tables::$3 ← (byte) init_plot_tables::bits#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [116] (bool~) init_plot_tables::$12 ← (byte~) init_plot_tables::$10 != (byte/signed byte/word/signed word/dword/signed dword) 7 from [115] (bool~) init_plot_tables::$11 ← (byte~) init_plot_tables::$10 == (byte/signed byte/word/signed word/dword/signed dword) 7 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) RASTER#3 = (byte*) RASTER#4 (byte*) RASTER#6 Alias (byte*) BGCOL#1 = (byte*) BGCOL#9 (byte*) BGCOL#7 @@ -578,14 +578,14 @@ Redundant Phi (byte*) SCREEN#6 (byte*) SCREEN#1 Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#6 Redundant Phi (byte*) SCREEN#3 (byte*) SCREEN#2 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$11 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@2 -Simple Condition (bool~) plots::$1 if((byte) plots::i#1<(byte) plots_cnt#0) goto plots::@1 -Simple Condition (bool~) init_plot_tables::$4 if((byte) init_plot_tables::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto init_plot_tables::@2 -Simple Condition (bool~) init_plot_tables::$5 if((byte) init_plot_tables::x#1!=rangelast(0,255)) goto init_plot_tables::@1 -Simple Condition (bool~) init_plot_tables::$12 if((byte~) init_plot_tables::$10!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto init_plot_tables::@4 -Simple Condition (bool~) init_plot_tables::$15 if((byte) init_plot_tables::y#1!=rangelast(0,255)) goto init_plot_tables::@3 -Simple Condition (bool~) init_screen::$1 if((byte*) init_screen::b#1!=(byte*~) init_screen::$0) goto init_screen::@1 -Simple Condition (bool~) init_screen::$3 if((byte*) init_screen::c#1!=(byte*~) init_screen::$2) goto init_screen::@2 +Simple Condition (bool~) main::$11 [37] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@2 +Simple Condition (bool~) plots::$1 [58] if((byte) plots::i#1<(byte) plots_cnt#0) goto plots::@1 +Simple Condition (bool~) init_plot_tables::$4 [98] if((byte) init_plot_tables::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto init_plot_tables::@2 +Simple Condition (bool~) init_plot_tables::$5 [102] if((byte) init_plot_tables::x#1!=rangelast(0,255)) goto init_plot_tables::@1 +Simple Condition (bool~) init_plot_tables::$12 [117] if((byte~) init_plot_tables::$10!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto init_plot_tables::@4 +Simple Condition (bool~) init_plot_tables::$15 [121] if((byte) init_plot_tables::y#1!=rangelast(0,255)) goto init_plot_tables::@3 +Simple Condition (bool~) init_screen::$1 [134] if((byte*) init_screen::b#1!=(byte*~) init_screen::$0) goto init_screen::@1 +Simple Condition (bool~) init_screen::$3 [142] if((byte*) init_screen::c#1!=(byte*~) init_screen::$2) goto init_screen::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) D011#0 = ((byte*))53265 Constant (const byte) RST8#0 = 128 @@ -641,7 +641,7 @@ Constant (const word/dword) main::$7 = main::$4|main::$6 Successful SSA optimization Pass2ConstantIdentification Constant (const byte) main::$8 = ((byte))main::$7 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@1 +if() condition always true - replacing block destination [10] if(true) goto main::@1 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/bitwise-not.log b/src/test/ref/bitwise-not.log index 33fdf4399..6af2f66bf 100644 --- a/src/test/ref/bitwise-not.log +++ b/src/test/ref/bitwise-not.log @@ -52,7 +52,7 @@ Self Phi Eliminated (byte*) main::SCREEN#1 Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) main::SCREEN#1 (byte*) main::SCREEN#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$2 if((byte) main::c#1!=rangelast(1,26)) goto main::@1 +Simple Condition (bool~) main::$2 [9] if((byte) main::c#1!=rangelast(1,26)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::SCREEN#0 = ((byte*))1024 Constant (const byte/signed byte/word/signed word/dword/signed dword) main::$0 = ~1 diff --git a/src/test/ref/bool-const.log b/src/test/ref/bool-const.log index 024ced0fe..2229f5fe6 100644 --- a/src/test/ref/bool-const.log +++ b/src/test/ref/bool-const.log @@ -146,28 +146,28 @@ SYMBOL TABLE SSA Culled Empty Block (label) main::@3 Culled Empty Block (label) @5 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) bool_const_vars::$2 ← (byte/signed byte/word/signed word/dword/signed dword) 21 >= (byte) bool_const_vars::a#0 from (bool~) bool_const_vars::$1 ← (byte/signed byte/word/signed word/dword/signed dword) 21 < (byte) bool_const_vars::a#0 -Inversing boolean not (bool~) bool_const_inline::$7 ← (byte/signed byte/word/signed word/dword/signed dword) 21 >= (byte) bool_const_inline::a#0 from (bool~) bool_const_inline::$6 ← (byte/signed byte/word/signed word/dword/signed dword) 21 < (byte) bool_const_inline::a#0 +Inversing boolean not [13] (bool~) bool_const_vars::$2 ← (byte/signed byte/word/signed word/dword/signed dword) 21 >= (byte) bool_const_vars::a#0 from [12] (bool~) bool_const_vars::$1 ← (byte/signed byte/word/signed word/dword/signed dword) 21 < (byte) bool_const_vars::a#0 +Inversing boolean not [37] (bool~) bool_const_inline::$7 ← (byte/signed byte/word/signed word/dword/signed dword) 21 >= (byte) bool_const_inline::a#0 from [36] (bool~) bool_const_inline::$6 ← (byte/signed byte/word/signed word/dword/signed dword) 21 < (byte) bool_const_inline::a#0 Successful SSA optimization Pass2UnaryNotSimplification Alias (bool) bool_const_vars::b1#0 = (bool~) bool_const_vars::$3 Alias (bool) bool_const_vars::b2#0 = (bool~) bool_const_vars::$7 Alias (bool) bool_const_vars::b#0 = (bool~) bool_const_vars::$10 Successful SSA optimization Pass2AliasElimination -Rewriting || if()-condition to two if()s (bool) bool_const_vars::b#0 ← (bool~) bool_const_vars::$9 || false +Rewriting || if()-condition to two if()s [23] (bool) bool_const_vars::b#0 ← (bool~) bool_const_vars::$9 || false Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting && if()-condition to two if()s (bool~) bool_const_vars::$9 ← (bool) bool_const_vars::b1#0 && (bool~) bool_const_vars::$8 +Rewriting && if()-condition to two if()s [22] (bool~) bool_const_vars::$9 ← (bool) bool_const_vars::b1#0 && (bool~) bool_const_vars::$8 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting || if()-condition to two if()s (bool) bool_const_vars::b1#0 ← (bool~) bool_const_vars::$0 || (bool~) bool_const_vars::$2 +Rewriting || if()-condition to two if()s [14] (bool) bool_const_vars::b1#0 ← (bool~) bool_const_vars::$0 || (bool~) bool_const_vars::$2 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting || if()-condition to two if()s (bool~) bool_const_inline::$8 ← (bool~) bool_const_inline::$5 || (bool~) bool_const_inline::$7 +Rewriting || if()-condition to two if()s [38] (bool~) bool_const_inline::$8 ← (bool~) bool_const_inline::$5 || (bool~) bool_const_inline::$7 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting || if()-condition to two if()s (bool~) bool_const_inline::$5 ← (bool~) bool_const_inline::$0 || (bool~) bool_const_inline::$4 +Rewriting || if()-condition to two if()s [35] (bool~) bool_const_inline::$5 ← (bool~) bool_const_inline::$0 || (bool~) bool_const_inline::$4 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting ! if()-condition to reversed if() (bool~) bool_const_vars::$8 ← ! (bool) bool_const_vars::b2#0 +Rewriting ! if()-condition to reversed if() [21] (bool~) bool_const_vars::$8 ← ! (bool) bool_const_vars::b2#0 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting || if()-condition to two if()s (bool) bool_const_vars::b2#0 ← (bool~) bool_const_vars::$4 || (bool~) bool_const_vars::$6 +Rewriting || if()-condition to two if()s [19] (bool) bool_const_vars::b2#0 ← (bool~) bool_const_vars::$4 || (bool~) bool_const_vars::$6 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting && if()-condition to two if()s (bool~) bool_const_inline::$4 ← (bool~) bool_const_inline::$2 && (bool~) bool_const_inline::$3 +Rewriting && if()-condition to two if()s [34] (bool~) bool_const_inline::$4 ← (bool~) bool_const_inline::$2 && (bool~) bool_const_inline::$3 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const bool) bool_const_if::b#0 = true @@ -192,16 +192,16 @@ Consolidated array index constant in *(SCREEN#0+1) Consolidated array index constant in *(SCREEN#0+2) Consolidated array index constant in *(SCREEN#0+2) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if((const bool) bool_const_if::b#0) goto bool_const_if::@1 -if() condition always false - eliminating if((const bool) bool_const_vars::$0) goto bool_const_vars::@6 -if() condition always true - replacing block destination if((const bool) bool_const_inline::$0) goto bool_const_inline::@1 -if() condition always false - eliminating if(false) goto bool_const_vars::@1 -if() condition always true - replacing block destination if((const bool) bool_const_vars::$4) goto bool_const_vars::@5 -if() condition always true - replacing block destination if((const bool) bool_const_vars::$2) goto bool_const_vars::@6 -if() condition always false - eliminating if((const bool) bool_const_inline::$7) goto bool_const_inline::@1 -if() condition always true - replacing block destination if((const bool) bool_const_inline::$2) goto bool_const_inline::@7 -if() condition always true - replacing block destination if((const bool) bool_const_vars::$6) goto bool_const_vars::@5 -if() condition always false - eliminating if((const bool) bool_const_inline::$3) goto bool_const_inline::@1 +if() condition always true - replacing block destination [4] if((const bool) bool_const_if::b#0) goto bool_const_if::@1 +if() condition always false - eliminating [8] if((const bool) bool_const_vars::$0) goto bool_const_vars::@6 +if() condition always true - replacing block destination [12] if((const bool) bool_const_inline::$0) goto bool_const_inline::@1 +if() condition always false - eliminating [17] if(false) goto bool_const_vars::@1 +if() condition always true - replacing block destination [18] if((const bool) bool_const_vars::$4) goto bool_const_vars::@5 +if() condition always true - replacing block destination [19] if((const bool) bool_const_vars::$2) goto bool_const_vars::@6 +if() condition always false - eliminating [20] if((const bool) bool_const_inline::$7) goto bool_const_inline::@1 +if() condition always true - replacing block destination [21] if((const bool) bool_const_inline::$2) goto bool_const_inline::@7 +if() condition always true - replacing block destination [22] if((const bool) bool_const_vars::$6) goto bool_const_vars::@5 +if() condition always false - eliminating [23] if((const bool) bool_const_inline::$3) goto bool_const_inline::@1 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/bool-function.log b/src/test/ref/bool-function.log index cb5cc57bd..8dffb42b7 100644 --- a/src/test/ref/bool-function.log +++ b/src/test/ref/bool-function.log @@ -129,7 +129,7 @@ Redundant Phi (byte*) main::screen#1 (byte*) main::screen#0 Redundant Phi (byte) isSet::i#1 (byte) isSet::i#0 Redundant Phi (bool) isSet::b#1 (bool) isSet::b#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$3 if((byte) main::i#1!=rangelast(0,100)) goto main::@1 +Simple Condition (bool~) main::$3 [19] if((byte) main::i#1!=rangelast(0,100)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::screen#0 = ((byte*))1024 Constant (const byte) main::i#0 = 0 diff --git a/src/test/ref/bool-ifs.log b/src/test/ref/bool-ifs.log index 4a70a6661..b9e15e850 100644 --- a/src/test/ref/bool-ifs.log +++ b/src/test/ref/bool-ifs.log @@ -261,26 +261,26 @@ Alias (byte) bool_or::i#2 = (byte) bool_or::i#5 Alias (byte) bool_not::i#2 = (byte) bool_not::i#5 Alias (byte) bool_complex::i#2 = (byte) bool_complex::i#5 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) bool_and::$4 if((byte) bool_and::i#1!=rangelast(0,20)) goto bool_and::@1 -Simple Condition (bool~) bool_or::$4 if((byte) bool_or::i#1!=rangelast(0,20)) goto bool_or::@1 -Simple Condition (bool~) bool_not::$5 if((byte) bool_not::i#1!=rangelast(0,20)) goto bool_not::@1 -Simple Condition (bool~) bool_complex::$10 if((byte) bool_complex::i#1!=rangelast(0,20)) goto bool_complex::@1 +Simple Condition (bool~) bool_and::$4 [20] if((byte) bool_and::i#1!=rangelast(0,20)) goto bool_and::@1 +Simple Condition (bool~) bool_or::$4 [37] if((byte) bool_or::i#1!=rangelast(0,20)) goto bool_or::@1 +Simple Condition (bool~) bool_not::$5 [55] if((byte) bool_not::i#1!=rangelast(0,20)) goto bool_not::@1 +Simple Condition (bool~) bool_complex::$10 [78] if((byte) bool_complex::i#1!=rangelast(0,20)) goto bool_complex::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting && if()-condition to two if()s (bool~) bool_and::$3 ← (bool~) bool_and::$0 && (bool~) bool_and::$2 +Rewriting && if()-condition to two if()s [11] (bool~) bool_and::$3 ← (bool~) bool_and::$0 && (bool~) bool_and::$2 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting || if()-condition to two if()s (bool~) bool_or::$3 ← (bool~) bool_or::$0 || (bool~) bool_or::$2 +Rewriting || if()-condition to two if()s [28] (bool~) bool_or::$3 ← (bool~) bool_or::$0 || (bool~) bool_or::$2 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting ! if()-condition to reversed if() (bool~) bool_not::$4 ← ! (bool~) bool_not::$3 +Rewriting ! if()-condition to reversed if() [46] (bool~) bool_not::$4 ← ! (bool~) bool_not::$3 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting || if()-condition to two if()s (bool~) bool_not::$3 ← (bool~) bool_not::$0 || (bool~) bool_not::$2 +Rewriting || if()-condition to two if()s [45] (bool~) bool_not::$3 ← (bool~) bool_not::$0 || (bool~) bool_not::$2 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting || if()-condition to two if()s (bool~) bool_complex::$9 ← (bool~) bool_complex::$3 || (bool~) bool_complex::$8 +Rewriting || if()-condition to two if()s [69] (bool~) bool_complex::$9 ← (bool~) bool_complex::$3 || (bool~) bool_complex::$8 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting && if()-condition to two if()s (bool~) bool_complex::$3 ← (bool~) bool_complex::$0 && (bool~) bool_complex::$2 +Rewriting && if()-condition to two if()s [63] (bool~) bool_complex::$3 ← (bool~) bool_complex::$0 && (bool~) bool_complex::$2 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting ! if()-condition to reversed if() (bool~) bool_complex::$8 ← ! (bool~) bool_complex::$7 +Rewriting ! if()-condition to reversed if() [68] (bool~) bool_complex::$8 ← ! (bool~) bool_complex::$7 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting || if()-condition to two if()s (bool~) bool_complex::$7 ← (bool~) bool_complex::$4 || (bool~) bool_complex::$6 +Rewriting || if()-condition to two if()s [67] (bool~) bool_complex::$7 ← (bool~) bool_complex::$4 || (bool~) bool_complex::$6 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const byte*) bool_and::screen#0 = ((byte*))1024 Constant (const byte) bool_and::i#0 = 0 @@ -299,16 +299,16 @@ Resolved ranged next value bool_not::i#1 ← ++ bool_not::i#2 to ++ Resolved ranged comparison value if(bool_not::i#1!=rangelast(0,20)) goto bool_not::@1 to (byte/signed byte/word/signed word/dword/signed dword) 21 Resolved ranged next value bool_complex::i#1 ← ++ bool_complex::i#2 to ++ Resolved ranged comparison value if(bool_complex::i#1!=rangelast(0,20)) goto bool_complex::@1 to (byte/signed byte/word/signed word/dword/signed dword) 21 -Simple Condition (bool~) bool_and::$0 if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_and::@7 -Simple Condition (bool~) bool_or::$0 if((byte) bool_or::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_or::@2 -Simple Condition (bool~) bool_not::$0 if((byte) bool_not::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_not::@4 -Simple Condition (bool~) bool_complex::$0 if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_complex::@8 -Simple Condition (bool~) bool_and::$2 if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2 -Simple Condition (bool~) bool_or::$2 if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2 -Simple Condition (bool~) bool_not::$2 if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4 -Simple Condition (bool~) bool_complex::$4 if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_complex::@4 -Simple Condition (bool~) bool_complex::$2 if((byte~) bool_complex::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@2 -Simple Condition (bool~) bool_complex::$6 if((byte~) bool_complex::$5==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@4 +Simple Condition (bool~) bool_and::$0 [9] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_and::@7 +Simple Condition (bool~) bool_or::$0 [19] if((byte) bool_or::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_or::@2 +Simple Condition (bool~) bool_not::$0 [29] if((byte) bool_not::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_not::@4 +Simple Condition (bool~) bool_complex::$0 [42] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_complex::@8 +Simple Condition (bool~) bool_and::$2 [49] if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2 +Simple Condition (bool~) bool_or::$2 [50] if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2 +Simple Condition (bool~) bool_not::$2 [51] if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4 +Simple Condition (bool~) bool_complex::$4 [52] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_complex::@4 +Simple Condition (bool~) bool_complex::$2 [53] if((byte~) bool_complex::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@2 +Simple Condition (bool~) bool_complex::$6 [54] if((byte~) bool_complex::$5==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Inlining constant with var siblings (const byte) bool_and::i#0 Inlining constant with var siblings (const byte) bool_or::i#0 diff --git a/src/test/ref/bool-pointer.log b/src/test/ref/bool-pointer.log index 442835f06..d5329ab82 100644 --- a/src/test/ref/bool-pointer.log +++ b/src/test/ref/bool-pointer.log @@ -51,7 +51,7 @@ Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks Alias (bool*) main::bscreen#1 = (bool*~) main::$0 (bool*) main::bscreen#3 Successful SSA optimization Pass2AliasElimination -Rewriting ! if()-condition to reversed if() (bool~) main::$1 ← ! *((bool*) main::bscreen#1) +Rewriting ! if()-condition to reversed if() [6] (bool~) main::$1 ← ! *((bool*) main::bscreen#1) Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const bool*) main::bscreen#0 = ((bool*))1024 Successful SSA optimization Pass2ConstantIdentification diff --git a/src/test/ref/bool-vars.log b/src/test/ref/bool-vars.log index e205faf33..58c97b9cd 100644 --- a/src/test/ref/bool-vars.log +++ b/src/test/ref/bool-vars.log @@ -311,26 +311,26 @@ Alias (byte) bool_or::i#2 = (byte) bool_or::i#5 Alias (byte) bool_not::i#2 = (byte) bool_not::i#5 Alias (byte) bool_complex::i#2 = (byte) bool_complex::i#5 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) bool_and::$4 if((byte) bool_and::i#1!=rangelast(0,20)) goto bool_and::@1 -Simple Condition (bool~) bool_or::$4 if((byte) bool_or::i#1!=rangelast(0,20)) goto bool_or::@1 -Simple Condition (bool~) bool_not::$5 if((byte) bool_not::i#1!=rangelast(0,20)) goto bool_not::@1 -Simple Condition (bool~) bool_complex::$7 if((byte) bool_complex::i#1!=rangelast(0,20)) goto bool_complex::@1 +Simple Condition (bool~) bool_and::$4 [23] if((byte) bool_and::i#1!=rangelast(0,20)) goto bool_and::@1 +Simple Condition (bool~) bool_or::$4 [43] if((byte) bool_or::i#1!=rangelast(0,20)) goto bool_or::@1 +Simple Condition (bool~) bool_not::$5 [64] if((byte) bool_not::i#1!=rangelast(0,20)) goto bool_not::@1 +Simple Condition (bool~) bool_complex::$7 [89] if((byte) bool_complex::i#1!=rangelast(0,20)) goto bool_complex::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting && if()-condition to two if()s (bool) bool_and::o3#0 ← (bool) bool_and::o1#0 && (bool) bool_and::o2#0 +Rewriting && if()-condition to two if()s [13] (bool) bool_and::o3#0 ← (bool) bool_and::o1#0 && (bool) bool_and::o2#0 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting || if()-condition to two if()s (bool) bool_or::o3#0 ← (bool) bool_or::o1#0 || (bool) bool_or::o2#0 +Rewriting || if()-condition to two if()s [33] (bool) bool_or::o3#0 ← (bool) bool_or::o1#0 || (bool) bool_or::o2#0 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting ! if()-condition to reversed if() (bool) bool_not::o3#0 ← ! (bool~) bool_not::$3 +Rewriting ! if()-condition to reversed if() [54] (bool) bool_not::o3#0 ← ! (bool~) bool_not::$3 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting || if()-condition to two if()s (bool~) bool_not::$3 ← (bool) bool_not::o1#0 || (bool) bool_not::o2#0 +Rewriting || if()-condition to two if()s [53] (bool~) bool_not::$3 ← (bool) bool_not::o1#0 || (bool) bool_not::o2#0 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting || if()-condition to two if()s (bool) bool_complex::o5#0 ← (bool) bool_complex::o3#0 || (bool) bool_complex::o4#0 +Rewriting || if()-condition to two if()s [79] (bool) bool_complex::o5#0 ← (bool) bool_complex::o3#0 || (bool) bool_complex::o4#0 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting && if()-condition to two if()s (bool) bool_complex::o3#0 ← (bool) bool_complex::o1#0 && (bool) bool_complex::o2#0 +Rewriting && if()-condition to two if()s [74] (bool) bool_complex::o3#0 ← (bool) bool_complex::o1#0 && (bool) bool_complex::o2#0 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting ! if()-condition to reversed if() (bool) bool_complex::o4#0 ← ! (bool~) bool_complex::$4 +Rewriting ! if()-condition to reversed if() [77] (bool) bool_complex::o4#0 ← ! (bool~) bool_complex::$4 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting || if()-condition to two if()s (bool~) bool_complex::$4 ← (bool) bool_complex::o1#0 || (bool) bool_complex::o2#0 +Rewriting || if()-condition to two if()s [76] (bool~) bool_complex::$4 ← (bool) bool_complex::o1#0 || (bool) bool_complex::o2#0 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const byte*) bool_and::screen#0 = ((byte*))1024 Constant (const byte) bool_and::i#0 = 0 @@ -349,12 +349,12 @@ Resolved ranged next value bool_not::i#1 ← ++ bool_not::i#2 to ++ Resolved ranged comparison value if(bool_not::i#1!=rangelast(0,20)) goto bool_not::@1 to (byte/signed byte/word/signed word/dword/signed dword) 21 Resolved ranged next value bool_complex::i#1 ← ++ bool_complex::i#2 to ++ Resolved ranged comparison value if(bool_complex::i#1!=rangelast(0,20)) goto bool_complex::@1 to (byte/signed byte/word/signed word/dword/signed dword) 21 -Simple Condition (bool) bool_and::o1#0 if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_and::@7 -Simple Condition (bool) bool_or::o1#0 if((byte) bool_or::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_or::@2 -Simple Condition (bool) bool_not::o1#0 if((byte) bool_not::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_not::@4 -Simple Condition (bool) bool_and::o2#0 if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2 -Simple Condition (bool) bool_or::o2#0 if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2 -Simple Condition (bool) bool_not::o2#0 if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4 +Simple Condition (bool) bool_and::o1#0 [9] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_and::@7 +Simple Condition (bool) bool_or::o1#0 [19] if((byte) bool_or::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_or::@2 +Simple Condition (bool) bool_not::o1#0 [29] if((byte) bool_not::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto bool_not::@4 +Simple Condition (bool) bool_and::o2#0 [46] if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2 +Simple Condition (bool) bool_or::o2#0 [47] if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2 +Simple Condition (bool) bool_not::o2#0 [48] if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Inlining constant with var siblings (const byte) bool_and::i#0 Inlining constant with var siblings (const byte) bool_or::i#0 diff --git a/src/test/ref/bresenham.log b/src/test/ref/bresenham.log index 701edf6e1..052dce81e 100644 --- a/src/test/ref/bresenham.log +++ b/src/test/ref/bresenham.log @@ -170,7 +170,7 @@ SYMBOL TABLE SSA Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) main::$10 ← (byte) main::xd#1 > (byte) main::e#1 from (bool~) main::$9 ← (byte) main::xd#1 <= (byte) main::e#1 +Inversing boolean not [29] (bool~) main::$10 ← (byte) main::xd#1 > (byte) main::e#1 from [28] (bool~) main::$9 ← (byte) main::xd#1 <= (byte) main::e#1 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) main::xd#0 = (byte~) main::$0 Alias (byte) main::yd#0 = (byte~) main::$1 @@ -208,8 +208,8 @@ Redundant Phi (byte) main::yd#1 (byte) main::yd#0 Redundant Phi (byte) main::xd#1 (byte) main::xd#0 Redundant Phi (byte) main::x1#1 (byte) main::x1#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$10 if((byte) main::xd#0>(byte) main::e#1) goto main::@2 -Simple Condition (bool~) main::$15 if((byte) main::x#1<(byte/signed word/word/dword/signed dword~) main::$14) goto main::@1 +Simple Condition (bool~) main::$10 [30] if((byte) main::xd#0>(byte) main::e#1) goto main::@2 +Simple Condition (bool~) main::$15 [34] if((byte) main::x#1<(byte/signed word/word/dword/signed dword~) main::$14) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) STAR#0 = 81 Constant (const word/signed word/dword/signed dword) $0 = 40*25 diff --git a/src/test/ref/bresenhamarr.log b/src/test/ref/bresenhamarr.log index a86f6bb6d..e05236ef3 100644 --- a/src/test/ref/bresenhamarr.log +++ b/src/test/ref/bresenhamarr.log @@ -164,7 +164,7 @@ SYMBOL TABLE SSA Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) main::$10 ← (byte) main::xd#1 >= (byte) main::e#1 from (bool~) main::$9 ← (byte) main::xd#1 < (byte) main::e#1 +Inversing boolean not [27] (bool~) main::$10 ← (byte) main::xd#1 >= (byte) main::e#1 from [26] (bool~) main::$9 ← (byte) main::xd#1 < (byte) main::e#1 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) main::xd#0 = (byte~) main::$1 Alias (byte) main::yd#0 = (byte~) main::$2 @@ -200,8 +200,8 @@ Redundant Phi (byte) main::yd#1 (byte) main::yd#0 Redundant Phi (byte) main::xd#1 (byte) main::xd#0 Redundant Phi (byte) main::x1#1 (byte) main::x1#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$10 if((byte) main::xd#0>=(byte) main::e#1) goto main::@2 -Simple Condition (bool~) main::$15 if((byte) main::x#1<(byte/signed word/word/dword/signed dword~) main::$14) goto main::@1 +Simple Condition (bool~) main::$10 [28] if((byte) main::xd#0>=(byte) main::e#1) goto main::@2 +Simple Condition (bool~) main::$15 [32] if((byte) main::x#1<(byte/signed word/word/dword/signed dword~) main::$14) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::STAR#0 = 81 Constant (const word/signed word/dword/signed dword) main::$0 = 40*25 diff --git a/src/test/ref/c64dtv-8bppcharstretch.log b/src/test/ref/c64dtv-8bppcharstretch.log index 60c318712..88aae9fc5 100644 --- a/src/test/ref/c64dtv-8bppcharstretch.log +++ b/src/test/ref/c64dtv-8bppcharstretch.log @@ -1003,7 +1003,7 @@ Culled Empty Block (label) gfx_init::@2 Culled Empty Block (label) gfx_init_plane_charset8::@10 Culled Empty Block (label) @10 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) gfx_init_plane_charset8::$9 ← (byte~) gfx_init_plane_charset8::$7 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) gfx_init_plane_charset8::$8 ← (byte~) gfx_init_plane_charset8::$7 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [307] (bool~) gfx_init_plane_charset8::$9 ← (byte~) gfx_init_plane_charset8::$7 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [306] (bool~) gfx_init_plane_charset8::$8 ← (byte~) gfx_init_plane_charset8::$7 != (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) main::rst#2 = (byte) main::rst#3 Alias (byte) gfx_init_screen0::cy#2 = (byte) gfx_init_screen0::cy#3 @@ -1045,15 +1045,15 @@ Redundant Phi (byte) gfx_init_plane_charset8::cr#2 (byte) gfx_init_plane_charset Redundant Phi (byte*) gfx_init_plane_charset8::chargen#4 (byte*) gfx_init_plane_charset8::chargen#1 Redundant Phi (byte) gfx_init_plane_charset8::ch#2 (byte) gfx_init_plane_charset8::ch#7 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$25 if((byte) main::j#1!=rangelast(0,15)) goto main::@1 -Simple Condition (bool~) main::$29 if(*((byte*) RASTER#0)!=(byte) main::rst#0) goto main::@6 -Simple Condition (bool~) main::$35 if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) 242) goto main::@8 -Simple Condition (bool~) gfx_init_screen0::$4 if((byte) gfx_init_screen0::cx#1!=rangelast(0,39)) goto gfx_init_screen0::@2 -Simple Condition (bool~) gfx_init_screen0::$5 if((byte) gfx_init_screen0::cy#1!=rangelast(0,24)) goto gfx_init_screen0::@1 -Simple Condition (bool~) gfx_init_plane_charset8::$9 if((byte~) gfx_init_plane_charset8::$7==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_charset8::@4 -Simple Condition (bool~) gfx_init_plane_charset8::$11 if((byte) gfx_init_plane_charset8::cp#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@3 -Simple Condition (bool~) gfx_init_plane_charset8::$12 if((byte) gfx_init_plane_charset8::cr#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@2 -Simple Condition (bool~) gfx_init_plane_charset8::$13 if((byte) gfx_init_plane_charset8::ch#1!=rangelast(0,255)) goto gfx_init_plane_charset8::@1 +Simple Condition (bool~) main::$25 [233] if((byte) main::j#1!=rangelast(0,15)) goto main::@1 +Simple Condition (bool~) main::$29 [244] if(*((byte*) RASTER#0)!=(byte) main::rst#0) goto main::@6 +Simple Condition (bool~) main::$35 [257] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) 242) goto main::@8 +Simple Condition (bool~) gfx_init_screen0::$4 [275] if((byte) gfx_init_screen0::cx#1!=rangelast(0,39)) goto gfx_init_screen0::@2 +Simple Condition (bool~) gfx_init_screen0::$5 [279] if((byte) gfx_init_screen0::cy#1!=rangelast(0,24)) goto gfx_init_screen0::@1 +Simple Condition (bool~) gfx_init_plane_charset8::$9 [308] if((byte~) gfx_init_plane_charset8::$7==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_charset8::@4 +Simple Condition (bool~) gfx_init_plane_charset8::$11 [317] if((byte) gfx_init_plane_charset8::cp#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@3 +Simple Condition (bool~) gfx_init_plane_charset8::$12 [323] if((byte) gfx_init_plane_charset8::cr#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@2 +Simple Condition (bool~) gfx_init_plane_charset8::$13 [327] if((byte) gfx_init_plane_charset8::ch#1!=rangelast(0,255)) goto gfx_init_plane_charset8::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -1288,7 +1288,7 @@ Constant (const byte*) gfx_init_plane_charset8::gfxa#0 = ((byte*))gfx_init_plane Successful SSA optimization Pass2ConstantIdentification Constant (const byte) main::$24 = main::$19|main::$23 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@3 +if() condition always true - replacing block destination [31] if(true) goto main::@3 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/c64dtv-8bppchunkystretch.log b/src/test/ref/c64dtv-8bppchunkystretch.log index 8673472c1..afc6da789 100644 --- a/src/test/ref/c64dtv-8bppchunkystretch.log +++ b/src/test/ref/c64dtv-8bppchunkystretch.log @@ -845,7 +845,7 @@ SYMBOL TABLE SSA Culled Empty Block (label) gfx_init_chunky::@9 Culled Empty Block (label) @8 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) gfx_init_chunky::$4 ← (byte*) gfx_init_chunky::gfxb#3 != (word/dword/signed dword) 32768 from (bool~) gfx_init_chunky::$3 ← (byte*) gfx_init_chunky::gfxb#3 == (word/dword/signed dword) 32768 +Inversing boolean not [264] (bool~) gfx_init_chunky::$4 ← (byte*) gfx_init_chunky::gfxb#3 != (word/dword/signed dword) 32768 from [263] (bool~) gfx_init_chunky::$3 ← (byte*) gfx_init_chunky::gfxb#3 == (word/dword/signed dword) 32768 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) main::rst#2 = (byte) main::rst#3 Alias (byte) gfx_init_chunky::gfxbCpuBank#0 = (byte~) gfx_init_chunky::$1 (byte) gfx_init_chunky::gfxbCpuBank#3 @@ -867,12 +867,12 @@ Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte) main::rst#2 (byte) main::rst#0 Redundant Phi (byte) gfx_init_chunky::y#2 (byte) gfx_init_chunky::y#6 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$24 if((byte) main::j#1!=rangelast(0,15)) goto main::@1 -Simple Condition (bool~) main::$28 if(*((byte*) RASTER#0)!=(byte) main::rst#0) goto main::@6 -Simple Condition (bool~) main::$34 if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) 242) goto main::@8 -Simple Condition (bool~) gfx_init_chunky::$4 if((byte*) gfx_init_chunky::gfxb#3!=(word/dword/signed dword) 32768) goto gfx_init_chunky::@3 -Simple Condition (bool~) gfx_init_chunky::$8 if((word) gfx_init_chunky::x#1!=rangelast(0,319)) goto gfx_init_chunky::@2 -Simple Condition (bool~) gfx_init_chunky::$9 if((byte) gfx_init_chunky::y#1!=rangelast(0,50)) goto gfx_init_chunky::@1 +Simple Condition (bool~) main::$24 [225] if((byte) main::j#1!=rangelast(0,15)) goto main::@1 +Simple Condition (bool~) main::$28 [236] if(*((byte*) RASTER#0)!=(byte) main::rst#0) goto main::@6 +Simple Condition (bool~) main::$34 [249] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) 242) goto main::@8 +Simple Condition (bool~) gfx_init_chunky::$4 [265] if((byte*) gfx_init_chunky::gfxb#3!=(word/dword/signed dword) 32768) goto gfx_init_chunky::@3 +Simple Condition (bool~) gfx_init_chunky::$8 [274] if((word) gfx_init_chunky::x#1!=rangelast(0,319)) goto gfx_init_chunky::@2 +Simple Condition (bool~) gfx_init_chunky::$9 [284] if((byte) gfx_init_chunky::y#1!=rangelast(0,50)) goto gfx_init_chunky::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -1096,7 +1096,7 @@ Constant (const byte) main::$22 = main::$21>>2 Successful SSA optimization Pass2ConstantIdentification Constant (const byte) main::$23 = main::$18|main::$22 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@3 +if() condition always true - replacing block destination [25] if(true) goto main::@3 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/c64dtv-blittermin.log b/src/test/ref/c64dtv-blittermin.log index 5848c1a88..65981643e 100644 --- a/src/test/ref/c64dtv-blittermin.log +++ b/src/test/ref/c64dtv-blittermin.log @@ -674,8 +674,8 @@ Self Phi Eliminated (byte) main::r#2 Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) DTV_BLITTER_ALU#1 (byte*) DTV_BLITTER_ALU#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$16 if((byte~) main::$15!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 -Simple Condition (bool~) main::$20 if((byte) main::r#1!=rangelast(0,7)) goto main::@1 +Simple Condition (bool~) main::$16 [231] if((byte~) main::$15!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 +Simple Condition (bool~) main::$20 [239] if((byte) main::r#1!=rangelast(0,7)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 diff --git a/src/test/ref/c64dtv-color.log b/src/test/ref/c64dtv-color.log index eafcccaed..394029c48 100644 --- a/src/test/ref/c64dtv-color.log +++ b/src/test/ref/c64dtv-color.log @@ -618,9 +618,9 @@ Culled Empty Block (label) main::@2 Culled Empty Block (label) main::@5 Culled Empty Block (label) @7 Successful SSA optimization Pass2CullEmptyBlocks -Simple Condition (bool~) main::$2 if(*((byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 64) goto main::@4 -Simple Condition (bool~) main::$3 if((byte) main::r#1!=rangelast(49,255)) goto main::@7 -Simple Condition (bool~) main::$4 if((byte) main::c#1!=rangelast(0,15)) goto main::@8 +Simple Condition (bool~) main::$2 [182] if(*((byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 64) goto main::@4 +Simple Condition (bool~) main::$3 [190] if((byte) main::r#1!=rangelast(49,255)) goto main::@7 +Simple Condition (bool~) main::$4 [197] if((byte) main::c#1!=rangelast(0,15)) goto main::@8 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -804,7 +804,7 @@ Constant (const byte) main::$0 = DTV_HIGHCOLOR#0|DTV_BORDER_OFF#0 Successful SSA optimization Pass2ConstantIdentification Constant (const byte) main::$1 = main::$0|DTV_BADLINE_OFF#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@4 +if() condition always true - replacing block destination [3] if(true) goto main::@4 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/c64dtv-gfxexplorer.log b/src/test/ref/c64dtv-gfxexplorer.log index 5fbd5994f..9ed6d2248 100644 --- a/src/test/ref/c64dtv-gfxexplorer.log +++ b/src/test/ref/c64dtv-gfxexplorer.log @@ -7395,44 +7395,44 @@ Culled Empty Block (label) gfx_init_plane_blank::@1 Culled Empty Block (label) gfx_init_plane_full::@1 Culled Empty Block (label) gfx_init_plane_fill::@6 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) print_str_lines::$2 ← (byte) print_str_lines::ch#0 == (byte) '@' from (bool~) print_str_lines::$1 ← (byte) print_str_lines::ch#0 != (byte) '@' -Inversing boolean not (bool~) keyboard_event_scan::$6 ← (byte~) keyboard_event_scan::$4 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) keyboard_event_scan::$5 ← (byte~) keyboard_event_scan::$4 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) keyboard_event_scan::$8 ← (byte) keyboard_events_size#18 == (byte/signed byte/word/signed word/dword/signed dword) 8 from (bool~) keyboard_event_scan::$7 ← (byte) keyboard_events_size#18 != (byte/signed byte/word/signed word/dword/signed dword) 8 -Inversing boolean not (bool~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$14 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) keyboard_event_scan::$15 ← (byte~) keyboard_event_scan::$14 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) keyboard_event_scan::$20 ← (byte~) keyboard_event_scan::$18 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) keyboard_event_scan::$19 ← (byte~) keyboard_event_scan::$18 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) keyboard_event_scan::$24 ← (byte~) keyboard_event_scan::$22 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) keyboard_event_scan::$23 ← (byte~) keyboard_event_scan::$22 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) keyboard_event_scan::$28 ← (byte~) keyboard_event_scan::$26 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) keyboard_event_scan::$27 ← (byte~) keyboard_event_scan::$26 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) bitmap_init::$4 ← (byte) bitmap_init::bits#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) bitmap_init::$3 ← (byte) bitmap_init::bits#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) bitmap_init::$12 ← (byte~) bitmap_init::$10 != (byte/signed byte/word/signed word/dword/signed dword) 7 from (bool~) bitmap_init::$11 ← (byte~) bitmap_init::$10 == (byte/signed byte/word/signed word/dword/signed dword) 7 -Inversing boolean not (bool~) bitmap_line_xdyi::$4 ← (byte) bitmap_line_xdyi::xd#2 >= (byte) bitmap_line_xdyi::e#1 from (bool~) bitmap_line_xdyi::$3 ← (byte) bitmap_line_xdyi::xd#2 < (byte) bitmap_line_xdyi::e#1 -Inversing boolean not (bool~) bitmap_line_xdyd::$4 ← (byte) bitmap_line_xdyd::xd#2 >= (byte) bitmap_line_xdyd::e#1 from (bool~) bitmap_line_xdyd::$3 ← (byte) bitmap_line_xdyd::xd#2 < (byte) bitmap_line_xdyd::e#1 -Inversing boolean not (bool~) bitmap_line_ydxi::$4 ← (byte) bitmap_line_ydxi::yd#2 >= (byte) bitmap_line_ydxi::e#1 from (bool~) bitmap_line_ydxi::$3 ← (byte) bitmap_line_ydxi::yd#2 < (byte) bitmap_line_ydxi::e#1 -Inversing boolean not (bool~) bitmap_line_ydxd::$4 ← (byte) bitmap_line_ydxd::yd#2 >= (byte) bitmap_line_ydxd::e#1 from (bool~) bitmap_line_ydxd::$3 ← (byte) bitmap_line_ydxd::yd#2 < (byte) bitmap_line_ydxd::e#1 -Inversing boolean not (bool~) get_plane::$14 ← (byte) get_plane::idx#15 != (byte/signed byte/word/signed word/dword/signed dword) 13 from (bool~) get_plane::$13 ← (byte) get_plane::idx#15 == (byte/signed byte/word/signed word/dword/signed dword) 13 -Inversing boolean not (bool~) get_vic_screen::$5 ← (byte) get_vic_screen::idx#6 != (byte/signed byte/word/signed word/dword/signed dword) 4 from (bool~) get_vic_screen::$4 ← (byte) get_vic_screen::idx#6 == (byte/signed byte/word/signed word/dword/signed dword) 4 -Inversing boolean not (bool~) get_vic_charset::$2 ← (byte) get_vic_charset::idx#2 != (byte/signed byte/word/signed word/dword/signed dword) 1 from (bool~) get_vic_charset::$1 ← (byte) get_vic_charset::idx#2 == (byte/signed byte/word/signed word/dword/signed dword) 1 -Inversing boolean not (bool~) gfx_mode::$1 ← *((byte*) form_ctrl_line#0) == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) gfx_mode::$0 ← *((byte*) form_ctrl_line#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) gfx_mode::$4 ← *((byte*) form_ctrl_borof#0) == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) gfx_mode::$3 ← *((byte*) form_ctrl_borof#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) gfx_mode::$7 ← *((byte*) form_ctrl_hicol#0) == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) gfx_mode::$6 ← *((byte*) form_ctrl_hicol#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) gfx_mode::$10 ← *((byte*) form_ctrl_overs#0) == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) gfx_mode::$9 ← *((byte*) form_ctrl_overs#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) gfx_mode::$13 ← *((byte*) form_ctrl_colof#0) == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) gfx_mode::$12 ← *((byte*) form_ctrl_colof#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) gfx_mode::$16 ← *((byte*) form_ctrl_chunk#0) == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) gfx_mode::$15 ← *((byte*) form_ctrl_chunk#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) gfx_mode::$21 ← *((byte*) form_ctrl_ecm#0) == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) gfx_mode::$20 ← *((byte*) form_ctrl_ecm#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) gfx_mode::$24 ← *((byte*) form_ctrl_bmm#0) == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) gfx_mode::$23 ← *((byte*) form_ctrl_bmm#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) gfx_mode::$27 ← *((byte*) form_ctrl_mcm#0) == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) gfx_mode::$26 ← *((byte*) form_ctrl_mcm#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) gfx_mode::$90 ← (byte) gfx_mode::keyboard_event#0 != (byte) KEY_SPACE#0 from (bool~) gfx_mode::$89 ← (byte) gfx_mode::keyboard_event#0 == (byte) KEY_SPACE#0 -Inversing boolean not (bool~) gfx_init_plane_8bppchunky::$4 ← (byte*) gfx_init_plane_8bppchunky::gfxb#3 != (word/dword/signed dword) 32768 from (bool~) gfx_init_plane_8bppchunky::$3 ← (byte*) gfx_init_plane_8bppchunky::gfxb#3 == (word/dword/signed dword) 32768 -Inversing boolean not (bool~) gfx_init_plane_charset8::$7 ← (byte~) gfx_init_plane_charset8::$5 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) gfx_init_plane_charset8::$6 ← (byte~) gfx_init_plane_charset8::$5 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) form_mode::$38 ← (byte~) form_mode::$36 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) form_mode::$37 ← (byte~) form_mode::$36 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) form_mode::$40 ← (byte) form_mode::preset_current#2 == *((byte*) form_preset#0) from (bool~) form_mode::$39 ← (byte) form_mode::preset_current#2 != *((byte*) form_preset#0) -Inversing boolean not (bool~) form_control::$2 ← (signed byte) form_cursor_count#5 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) form_control::$1 ← (signed byte) form_cursor_count#5 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) form_control::$10 ← (byte) form_control::key_event#0 != (byte) KEY_CRSR_DOWN#0 from (bool~) form_control::$9 ← (byte) form_control::key_event#0 == (byte) KEY_CRSR_DOWN#0 -Inversing boolean not (bool~) form_control::$21 ← (byte) form_control::key_event#1 != (byte) KEY_CRSR_RIGHT#0 from (bool~) form_control::$20 ← (byte) form_control::key_event#1 == (byte) KEY_CRSR_RIGHT#0 -Inversing boolean not (bool~) form_control::$18 ← (byte) form_field_idx#5 != (byte) form_fields_cnt#3 from (bool~) form_control::$17 ← (byte) form_field_idx#5 == (byte) form_fields_cnt#3 -Inversing boolean not (bool~) form_control::$15 ← (byte) form_field_idx#6 != (byte/word/signed word/dword/signed dword) 255 from (bool~) form_control::$14 ← (byte) form_field_idx#6 == (byte/word/signed word/dword/signed dword) 255 -Inversing boolean not (bool~) form_control::$29 ← (byte) form_control::key_event#2 != (byte) KEY_SPACE#0 from (bool~) form_control::$28 ← (byte) form_control::key_event#2 == (byte) KEY_SPACE#0 -Inversing boolean not (bool~) form_control::$27 ← *((byte[]) form_fields_val#0 + (byte) form_field_idx#19) <= *((byte[]) form_fields_max#0 + (byte) form_field_idx#19) from (bool~) form_control::$26 ← *((byte[]) form_fields_val#0 + (byte) form_field_idx#19) > *((byte[]) form_fields_max#0 + (byte) form_field_idx#19) -Inversing boolean not (bool~) form_control::$25 ← *((byte[]) form_fields_val#0 + (byte) form_field_idx#20) != (byte/word/signed word/dword/signed dword) 255 from (bool~) form_control::$24 ← *((byte[]) form_fields_val#0 + (byte) form_field_idx#20) == (byte/word/signed word/dword/signed dword) 255 +Inversing boolean not [191] (bool~) print_str_lines::$2 ← (byte) print_str_lines::ch#0 == (byte) '@' from [190] (bool~) print_str_lines::$1 ← (byte) print_str_lines::ch#0 != (byte) '@' +Inversing boolean not [370] (bool~) keyboard_event_scan::$6 ← (byte~) keyboard_event_scan::$4 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [369] (bool~) keyboard_event_scan::$5 ← (byte~) keyboard_event_scan::$4 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [379] (bool~) keyboard_event_scan::$8 ← (byte) keyboard_events_size#18 == (byte/signed byte/word/signed word/dword/signed dword) 8 from [378] (bool~) keyboard_event_scan::$7 ← (byte) keyboard_events_size#18 != (byte/signed byte/word/signed word/dword/signed dword) 8 +Inversing boolean not [404] (bool~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$14 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [403] (bool~) keyboard_event_scan::$15 ← (byte~) keyboard_event_scan::$14 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [413] (bool~) keyboard_event_scan::$20 ← (byte~) keyboard_event_scan::$18 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [412] (bool~) keyboard_event_scan::$19 ← (byte~) keyboard_event_scan::$18 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [425] (bool~) keyboard_event_scan::$24 ← (byte~) keyboard_event_scan::$22 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [424] (bool~) keyboard_event_scan::$23 ← (byte~) keyboard_event_scan::$22 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [437] (bool~) keyboard_event_scan::$28 ← (byte~) keyboard_event_scan::$26 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [436] (bool~) keyboard_event_scan::$27 ← (byte~) keyboard_event_scan::$26 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [489] (bool~) bitmap_init::$4 ← (byte) bitmap_init::bits#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [488] (bool~) bitmap_init::$3 ← (byte) bitmap_init::bits#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [508] (bool~) bitmap_init::$12 ← (byte~) bitmap_init::$10 != (byte/signed byte/word/signed word/dword/signed dword) 7 from [507] (bool~) bitmap_init::$11 ← (byte~) bitmap_init::$10 == (byte/signed byte/word/signed word/dword/signed dword) 7 +Inversing boolean not [645] (bool~) bitmap_line_xdyi::$4 ← (byte) bitmap_line_xdyi::xd#2 >= (byte) bitmap_line_xdyi::e#1 from [644] (bool~) bitmap_line_xdyi::$3 ← (byte) bitmap_line_xdyi::xd#2 < (byte) bitmap_line_xdyi::e#1 +Inversing boolean not [668] (bool~) bitmap_line_xdyd::$4 ← (byte) bitmap_line_xdyd::xd#2 >= (byte) bitmap_line_xdyd::e#1 from [667] (bool~) bitmap_line_xdyd::$3 ← (byte) bitmap_line_xdyd::xd#2 < (byte) bitmap_line_xdyd::e#1 +Inversing boolean not [691] (bool~) bitmap_line_ydxi::$4 ← (byte) bitmap_line_ydxi::yd#2 >= (byte) bitmap_line_ydxi::e#1 from [690] (bool~) bitmap_line_ydxi::$3 ← (byte) bitmap_line_ydxi::yd#2 < (byte) bitmap_line_ydxi::e#1 +Inversing boolean not [715] (bool~) bitmap_line_ydxd::$4 ← (byte) bitmap_line_ydxd::yd#2 >= (byte) bitmap_line_ydxd::e#1 from [714] (bool~) bitmap_line_ydxd::$3 ← (byte) bitmap_line_ydxd::yd#2 < (byte) bitmap_line_ydxd::e#1 +Inversing boolean not [843] (bool~) get_plane::$14 ← (byte) get_plane::idx#15 != (byte/signed byte/word/signed word/dword/signed dword) 13 from [842] (bool~) get_plane::$13 ← (byte) get_plane::idx#15 == (byte/signed byte/word/signed word/dword/signed dword) 13 +Inversing boolean not [870] (bool~) get_vic_screen::$5 ← (byte) get_vic_screen::idx#6 != (byte/signed byte/word/signed word/dword/signed dword) 4 from [869] (bool~) get_vic_screen::$4 ← (byte) get_vic_screen::idx#6 == (byte/signed byte/word/signed word/dword/signed dword) 4 +Inversing boolean not [883] (bool~) get_vic_charset::$2 ← (byte) get_vic_charset::idx#2 != (byte/signed byte/word/signed word/dword/signed dword) 1 from [882] (bool~) get_vic_charset::$1 ← (byte) get_vic_charset::idx#2 == (byte/signed byte/word/signed word/dword/signed dword) 1 +Inversing boolean not [1136] (bool~) gfx_mode::$1 ← *((byte*) form_ctrl_line#0) == (byte/signed byte/word/signed word/dword/signed dword) 0 from [1135] (bool~) gfx_mode::$0 ← *((byte*) form_ctrl_line#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1140] (bool~) gfx_mode::$4 ← *((byte*) form_ctrl_borof#0) == (byte/signed byte/word/signed word/dword/signed dword) 0 from [1139] (bool~) gfx_mode::$3 ← *((byte*) form_ctrl_borof#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1147] (bool~) gfx_mode::$7 ← *((byte*) form_ctrl_hicol#0) == (byte/signed byte/word/signed word/dword/signed dword) 0 from [1146] (bool~) gfx_mode::$6 ← *((byte*) form_ctrl_hicol#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1154] (bool~) gfx_mode::$10 ← *((byte*) form_ctrl_overs#0) == (byte/signed byte/word/signed word/dword/signed dword) 0 from [1153] (bool~) gfx_mode::$9 ← *((byte*) form_ctrl_overs#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1161] (bool~) gfx_mode::$13 ← *((byte*) form_ctrl_colof#0) == (byte/signed byte/word/signed word/dword/signed dword) 0 from [1160] (bool~) gfx_mode::$12 ← *((byte*) form_ctrl_colof#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1168] (bool~) gfx_mode::$16 ← *((byte*) form_ctrl_chunk#0) == (byte/signed byte/word/signed word/dword/signed dword) 0 from [1167] (bool~) gfx_mode::$15 ← *((byte*) form_ctrl_chunk#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1179] (bool~) gfx_mode::$21 ← *((byte*) form_ctrl_ecm#0) == (byte/signed byte/word/signed word/dword/signed dword) 0 from [1178] (bool~) gfx_mode::$20 ← *((byte*) form_ctrl_ecm#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1186] (bool~) gfx_mode::$24 ← *((byte*) form_ctrl_bmm#0) == (byte/signed byte/word/signed word/dword/signed dword) 0 from [1185] (bool~) gfx_mode::$23 ← *((byte*) form_ctrl_bmm#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1195] (bool~) gfx_mode::$27 ← *((byte*) form_ctrl_mcm#0) == (byte/signed byte/word/signed word/dword/signed dword) 0 from [1194] (bool~) gfx_mode::$26 ← *((byte*) form_ctrl_mcm#0) != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1353] (bool~) gfx_mode::$90 ← (byte) gfx_mode::keyboard_event#0 != (byte) KEY_SPACE#0 from [1352] (bool~) gfx_mode::$89 ← (byte) gfx_mode::keyboard_event#0 == (byte) KEY_SPACE#0 +Inversing boolean not [1520] (bool~) gfx_init_plane_8bppchunky::$4 ← (byte*) gfx_init_plane_8bppchunky::gfxb#3 != (word/dword/signed dword) 32768 from [1519] (bool~) gfx_init_plane_8bppchunky::$3 ← (byte*) gfx_init_plane_8bppchunky::gfxb#3 == (word/dword/signed dword) 32768 +Inversing boolean not [1666] (bool~) gfx_init_plane_charset8::$7 ← (byte~) gfx_init_plane_charset8::$5 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [1665] (bool~) gfx_init_plane_charset8::$6 ← (byte~) gfx_init_plane_charset8::$5 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1839] (bool~) form_mode::$38 ← (byte~) form_mode::$36 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [1838] (bool~) form_mode::$37 ← (byte~) form_mode::$36 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1843] (bool~) form_mode::$40 ← (byte) form_mode::preset_current#2 == *((byte*) form_preset#0) from [1842] (bool~) form_mode::$39 ← (byte) form_mode::preset_current#2 != *((byte*) form_preset#0) +Inversing boolean not [1920] (bool~) form_control::$2 ← (signed byte) form_cursor_count#5 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [1919] (bool~) form_control::$1 ← (signed byte) form_cursor_count#5 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1946] (bool~) form_control::$10 ← (byte) form_control::key_event#0 != (byte) KEY_CRSR_DOWN#0 from [1945] (bool~) form_control::$9 ← (byte) form_control::key_event#0 == (byte) KEY_CRSR_DOWN#0 +Inversing boolean not [1950] (bool~) form_control::$21 ← (byte) form_control::key_event#1 != (byte) KEY_CRSR_RIGHT#0 from [1949] (bool~) form_control::$20 ← (byte) form_control::key_event#1 == (byte) KEY_CRSR_RIGHT#0 +Inversing boolean not [1961] (bool~) form_control::$18 ← (byte) form_field_idx#5 != (byte) form_fields_cnt#3 from [1960] (bool~) form_control::$17 ← (byte) form_field_idx#5 == (byte) form_fields_cnt#3 +Inversing boolean not [1966] (bool~) form_control::$15 ← (byte) form_field_idx#6 != (byte/word/signed word/dword/signed dword) 255 from [1965] (bool~) form_control::$14 ← (byte) form_field_idx#6 == (byte/word/signed word/dword/signed dword) 255 +Inversing boolean not [1988] (bool~) form_control::$29 ← (byte) form_control::key_event#2 != (byte) KEY_SPACE#0 from [1987] (bool~) form_control::$28 ← (byte) form_control::key_event#2 == (byte) KEY_SPACE#0 +Inversing boolean not [1997] (bool~) form_control::$27 ← *((byte[]) form_fields_val#0 + (byte) form_field_idx#19) <= *((byte[]) form_fields_max#0 + (byte) form_field_idx#19) from [1996] (bool~) form_control::$26 ← *((byte[]) form_fields_val#0 + (byte) form_field_idx#19) > *((byte[]) form_fields_max#0 + (byte) form_field_idx#19) +Inversing boolean not [2002] (bool~) form_control::$25 ← *((byte[]) form_fields_val#0 + (byte) form_field_idx#20) != (byte/word/signed word/dword/signed dword) 255 from [2001] (bool~) form_control::$24 ← *((byte[]) form_fields_val#0 + (byte) form_field_idx#20) == (byte/word/signed word/dword/signed dword) 255 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) print_screen#0 = (byte*) print_line_cursor#0 (byte*) print_char_cursor#0 (byte*) print_screen#55 (byte*) print_line_cursor#76 (byte*) print_char_cursor#76 (byte*) print_screen#53 (byte*) print_line_cursor#75 (byte*) print_char_cursor#75 (byte*) print_screen#51 (byte*) print_line_cursor#74 (byte*) print_char_cursor#74 (byte*) print_screen#49 (byte*) print_line_cursor#72 (byte*) print_char_cursor#72 (byte*) print_screen#46 (byte*) print_line_cursor#69 (byte*) print_char_cursor#69 (byte*) print_screen#41 (byte*) print_line_cursor#64 (byte*) print_char_cursor#64 (byte*) print_screen#39 (byte*) print_line_cursor#61 (byte*) print_char_cursor#62 (byte*) print_screen#33 (byte*) print_line_cursor#53 (byte*) print_char_cursor#56 (byte*) print_screen#25 (byte*) print_line_cursor#44 (byte*) print_char_cursor#46 Alias (byte*) print_str_lines::str#3 = (byte*) print_str_lines::str#7 @@ -8150,150 +8150,150 @@ Redundant Phi (byte*) print_screen#17 (byte*) print_screen#23 Redundant Phi (byte*) print_line_cursor#17 (byte*) print_line_cursor#42 Redundant Phi (byte*) print_char_cursor#18 (byte*) print_char_cursor#44 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) print_str_lines::$0 if(*((byte*) print_str_lines::str#3)!=(byte) '@') goto print_str_lines::@2 -Simple Condition (bool~) print_str_lines::$2 if((byte) print_str_lines::ch#0==(byte) '@') goto print_str_lines::@5 -Simple Condition (bool~) print_str_lines::$3 if((byte) print_str_lines::ch#0!=(byte) '@') goto print_str_lines::@4 -Simple Condition (bool~) print_str_at::$0 if(*((byte*) print_str_at::str#2)!=(byte) '@') goto print_str_at::@2 -Simple Condition (bool~) print_ln::$1 if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) keyboard_event_scan::$1 if((byte) keyboard_event_scan::row_scan#0!=*((byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@2 -Simple Condition (bool~) keyboard_event_scan::$13 if((byte) keyboard_event_scan::row#1!=rangelast(0,7)) goto keyboard_event_scan::@1 -Simple Condition (bool~) keyboard_event_scan::$6 if((byte~) keyboard_event_scan::$4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@5 -Simple Condition (bool~) keyboard_event_scan::$12 if((byte) keyboard_event_scan::col#1!=rangelast(0,7)) goto keyboard_event_scan::@4 -Simple Condition (bool~) keyboard_event_scan::$8 if((byte) keyboard_events_size#18==(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@6 -Simple Condition (bool~) keyboard_event_scan::$10 if((byte) keyboard_event_scan::event_type#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@7 -Simple Condition (bool~) keyboard_event_scan::$16 if((byte~) keyboard_event_scan::$14==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@9 -Simple Condition (bool~) keyboard_event_scan::$20 if((byte~) keyboard_event_scan::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@10 -Simple Condition (bool~) keyboard_event_scan::$24 if((byte~) keyboard_event_scan::$22==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@11 -Simple Condition (bool~) keyboard_event_scan::$28 if((byte~) keyboard_event_scan::$26==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@12 -Simple Condition (bool~) keyboard_event_get::$0 if((byte) keyboard_events_size#100==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_get::@1 -Simple Condition (bool~) bitmap_init::$4 if((byte) bitmap_init::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$5 if((byte) bitmap_init::x#1!=rangelast(0,255)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$12 if((byte~) bitmap_init::$10!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto bitmap_init::@4 -Simple Condition (bool~) bitmap_init::$15 if((byte) bitmap_init::y#1!=rangelast(0,255)) goto bitmap_init::@3 -Simple Condition (bool~) bitmap_clear::$1 if((byte) bitmap_clear::x#1!=rangelast(0,199)) goto bitmap_clear::@2 -Simple Condition (bool~) bitmap_clear::$2 if((byte) bitmap_clear::y#1!=rangelast(0,39)) goto bitmap_clear::@1 -Simple Condition (bool~) bitmap_line::$0 if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 -Simple Condition (bool~) bitmap_line::$12 if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@9 -Simple Condition (bool~) bitmap_line::$2 if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@2 -Simple Condition (bool~) bitmap_line::$8 if((byte) bitmap_line::yd#0<(byte) bitmap_line::xd#1) goto bitmap_line::@6 -Simple Condition (bool~) bitmap_line::$4 if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#1) goto bitmap_line::@3 -Simple Condition (bool~) bitmap_line::$18 if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#0) goto bitmap_line::@13 -Simple Condition (bool~) bitmap_line::$14 if((byte) bitmap_line::yd#3<(byte) bitmap_line::xd#0) goto bitmap_line::@10 -Simple Condition (bool~) bitmap_line_xdyi::$4 if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 -Simple Condition (bool~) bitmap_line_xdyi::$7 if((byte) bitmap_line_xdyi::x#2!=(byte/signed word/word/dword/signed dword~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 -Simple Condition (bool~) bitmap_line_xdyd::$4 if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 -Simple Condition (bool~) bitmap_line_xdyd::$7 if((byte) bitmap_line_xdyd::x#2!=(byte/signed word/word/dword/signed dword~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 -Simple Condition (bool~) bitmap_line_ydxi::$4 if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 -Simple Condition (bool~) bitmap_line_ydxi::$7 if((byte) bitmap_line_ydxi::y#2!=(byte/signed word/word/dword/signed dword~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 -Simple Condition (bool~) bitmap_line_ydxd::$4 if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 -Simple Condition (bool~) bitmap_line_ydxd::$7 if((byte) bitmap_line_ydxd::y#3!=(byte/signed word/word/dword/signed dword~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 -Simple Condition (bool~) get_plane::$0 if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto get_plane::@1 -Simple Condition (bool~) get_plane::$1 if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 1) goto get_plane::@2 -Simple Condition (bool~) get_plane::$2 if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 2) goto get_plane::@3 -Simple Condition (bool~) get_plane::$3 if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 3) goto get_plane::@4 -Simple Condition (bool~) get_plane::$4 if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 4) goto get_plane::@5 -Simple Condition (bool~) get_plane::$5 if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 5) goto get_plane::@6 -Simple Condition (bool~) get_plane::$6 if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 6) goto get_plane::@7 -Simple Condition (bool~) get_plane::$7 if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 7) goto get_plane::@8 -Simple Condition (bool~) get_plane::$8 if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 8) goto get_plane::@9 -Simple Condition (bool~) get_plane::$9 if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 9) goto get_plane::@10 -Simple Condition (bool~) get_plane::$10 if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 10) goto get_plane::@11 -Simple Condition (bool~) get_plane::$11 if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 11) goto get_plane::@12 -Simple Condition (bool~) get_plane::$12 if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 12) goto get_plane::@13 -Simple Condition (bool~) get_plane::$14 if((byte) get_plane::idx#10!=(byte/signed byte/word/signed word/dword/signed dword) 13) goto get_plane::@27 -Simple Condition (bool~) get_vic_screen::$0 if((byte) get_vic_screen::idx#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto get_vic_screen::@1 -Simple Condition (bool~) get_vic_screen::$1 if((byte) get_vic_screen::idx#2==(byte/signed byte/word/signed word/dword/signed dword) 1) goto get_vic_screen::@2 -Simple Condition (bool~) get_vic_screen::$2 if((byte) get_vic_screen::idx#2==(byte/signed byte/word/signed word/dword/signed dword) 2) goto get_vic_screen::@3 -Simple Condition (bool~) get_vic_screen::$3 if((byte) get_vic_screen::idx#2==(byte/signed byte/word/signed word/dword/signed dword) 3) goto get_vic_screen::@4 -Simple Condition (bool~) get_vic_screen::$5 if((byte) get_vic_screen::idx#2!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto get_vic_screen::@9 -Simple Condition (bool~) get_vic_charset::$0 if((byte) get_vic_charset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto get_vic_charset::@1 -Simple Condition (bool~) get_vic_charset::$2 if((byte) get_vic_charset::idx#0!=(byte/signed byte/word/signed word/dword/signed dword) 1) goto get_vic_charset::@3 -Simple Condition (bool~) apply_preset::$0 if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto apply_preset::@1 -Simple Condition (bool~) apply_preset::$1 if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 1) goto apply_preset::@2 -Simple Condition (bool~) apply_preset::$2 if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 2) goto apply_preset::@3 -Simple Condition (bool~) apply_preset::$3 if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 3) goto apply_preset::@4 -Simple Condition (bool~) apply_preset::$4 if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 4) goto apply_preset::@5 -Simple Condition (bool~) apply_preset::$5 if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 5) goto apply_preset::@6 -Simple Condition (bool~) apply_preset::$6 if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 6) goto apply_preset::@7 -Simple Condition (bool~) apply_preset::$7 if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 7) goto apply_preset::@8 -Simple Condition (bool~) apply_preset::$8 if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 8) goto apply_preset::@9 -Simple Condition (bool~) apply_preset::$9 if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 9) goto apply_preset::@10 -Simple Condition (bool~) apply_preset::$10 if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 10) goto apply_preset::@11 -Simple Condition (bool~) apply_preset::$11 if((byte) apply_preset::i#1!=(byte) form_fields_cnt#55) goto apply_preset::@23 -Simple Condition (bool~) render_preset_name::$0 if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_preset_name::@1 -Simple Condition (bool~) render_preset_name::$1 if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 1) goto render_preset_name::@2 -Simple Condition (bool~) render_preset_name::$2 if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 2) goto render_preset_name::@3 -Simple Condition (bool~) render_preset_name::$3 if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 3) goto render_preset_name::@4 -Simple Condition (bool~) render_preset_name::$4 if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 4) goto render_preset_name::@5 -Simple Condition (bool~) render_preset_name::$5 if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 5) goto render_preset_name::@6 -Simple Condition (bool~) render_preset_name::$6 if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_preset_name::@7 -Simple Condition (bool~) render_preset_name::$7 if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 7) goto render_preset_name::@8 -Simple Condition (bool~) render_preset_name::$8 if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 8) goto render_preset_name::@9 -Simple Condition (bool~) render_preset_name::$9 if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 9) goto render_preset_name::@10 -Simple Condition (bool~) render_preset_name::$10 if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 10) goto render_preset_name::@11 -Simple Condition (bool~) gfx_mode::$1 if(*((byte*) form_ctrl_line#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@1 -Simple Condition (bool~) gfx_mode::$4 if(*((byte*) form_ctrl_borof#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@2 -Simple Condition (bool~) gfx_mode::$7 if(*((byte*) form_ctrl_hicol#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@3 -Simple Condition (bool~) gfx_mode::$10 if(*((byte*) form_ctrl_overs#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@4 -Simple Condition (bool~) gfx_mode::$13 if(*((byte*) form_ctrl_colof#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@5 -Simple Condition (bool~) gfx_mode::$16 if(*((byte*) form_ctrl_chunk#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@6 -Simple Condition (bool~) gfx_mode::$21 if(*((byte*) form_ctrl_ecm#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@7 -Simple Condition (bool~) gfx_mode::$24 if(*((byte*) form_ctrl_bmm#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@8 -Simple Condition (bool~) gfx_mode::$27 if(*((byte*) form_ctrl_mcm#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@9 -Simple Condition (bool~) gfx_mode::$73 if((byte) gfx_mode::cx#1!=rangelast(0,39)) goto gfx_mode::@11 -Simple Condition (bool~) gfx_mode::$74 if((byte) gfx_mode::cy#1!=rangelast(0,24)) goto gfx_mode::@10 -Simple Condition (bool~) gfx_mode::$83 if(*((byte*) form_dtv_palet#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@12 -Simple Condition (bool~) gfx_mode::$84 if((byte) gfx_mode::j#1!=rangelast(0,15)) goto gfx_mode::@13 -Simple Condition (bool~) gfx_mode::$85 if((byte) gfx_mode::i#1!=rangelast(0,15)) goto gfx_mode::@15 -Simple Condition (bool~) gfx_mode::$86 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto gfx_mode::@20 -Simple Condition (bool~) gfx_mode::$90 if((byte) gfx_mode::keyboard_event#0!=(byte) KEY_SPACE#0) goto gfx_mode::@22 -Simple Condition (bool~) gfx_init_charset::$0 if((byte) gfx_init_charset::l#1!=rangelast(0,7)) goto gfx_init_charset::@2 -Simple Condition (bool~) gfx_init_charset::$1 if((byte) gfx_init_charset::c#1!=rangelast(0,255)) goto gfx_init_charset::@1 -Simple Condition (bool~) gfx_init_screen0::$4 if((byte) gfx_init_screen0::cx#1!=rangelast(0,39)) goto gfx_init_screen0::@2 -Simple Condition (bool~) gfx_init_screen0::$5 if((byte) gfx_init_screen0::cy#1!=rangelast(0,24)) goto gfx_init_screen0::@1 -Simple Condition (bool~) gfx_init_screen1::$2 if((byte) gfx_init_screen1::cx#1!=rangelast(0,39)) goto gfx_init_screen1::@2 -Simple Condition (bool~) gfx_init_screen1::$3 if((byte) gfx_init_screen1::cy#1!=rangelast(0,24)) goto gfx_init_screen1::@1 -Simple Condition (bool~) gfx_init_screen2::$5 if((byte) gfx_init_screen2::cx#1!=rangelast(0,39)) goto gfx_init_screen2::@2 -Simple Condition (bool~) gfx_init_screen2::$6 if((byte) gfx_init_screen2::cy#1!=rangelast(0,24)) goto gfx_init_screen2::@1 -Simple Condition (bool~) gfx_init_screen3::$4 if((byte) gfx_init_screen3::cx#1!=rangelast(0,39)) goto gfx_init_screen3::@2 -Simple Condition (bool~) gfx_init_screen3::$5 if((byte) gfx_init_screen3::cy#1!=rangelast(0,24)) goto gfx_init_screen3::@1 -Simple Condition (bool~) gfx_init_screen4::$0 if((byte) gfx_init_screen4::cx#1!=rangelast(0,39)) goto gfx_init_screen4::@2 -Simple Condition (bool~) gfx_init_screen4::$1 if((byte) gfx_init_screen4::cy#1!=rangelast(0,24)) goto gfx_init_screen4::@1 -Simple Condition (bool~) gfx_init_vic_bitmap::$5 if((byte) gfx_init_vic_bitmap::l#1<(byte) gfx_init_vic_bitmap::lines_cnt#0) goto gfx_init_vic_bitmap::@1 -Simple Condition (bool~) gfx_init_plane_8bppchunky::$4 if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word/dword/signed dword) 32768) goto gfx_init_plane_8bppchunky::@3 -Simple Condition (bool~) gfx_init_plane_8bppchunky::$8 if((word) gfx_init_plane_8bppchunky::x#1!=rangelast(0,319)) goto gfx_init_plane_8bppchunky::@2 -Simple Condition (bool~) gfx_init_plane_8bppchunky::$9 if((byte) gfx_init_plane_8bppchunky::y#1!=rangelast(0,199)) goto gfx_init_plane_8bppchunky::@1 -Simple Condition (bool~) gfx_init_plane_horisontal::$6 if((byte~) gfx_init_plane_horisontal::$5==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_horisontal::@3 -Simple Condition (bool~) gfx_init_plane_horisontal::$7 if((byte) gfx_init_plane_horisontal::ax#1!=rangelast(0,39)) goto gfx_init_plane_horisontal::@2 -Simple Condition (bool~) gfx_init_plane_horisontal::$8 if((byte) gfx_init_plane_horisontal::ay#1!=rangelast(0,199)) goto gfx_init_plane_horisontal::@1 -Simple Condition (bool~) gfx_init_plane_horisontal2::$7 if((byte) gfx_init_plane_horisontal2::ax#1!=rangelast(0,39)) goto gfx_init_plane_horisontal2::@2 -Simple Condition (bool~) gfx_init_plane_horisontal2::$8 if((byte) gfx_init_plane_horisontal2::ay#1!=rangelast(0,199)) goto gfx_init_plane_horisontal2::@1 -Simple Condition (bool~) gfx_init_plane_vertical::$5 if((byte) gfx_init_plane_vertical::bx#1!=rangelast(0,39)) goto gfx_init_plane_vertical::@2 -Simple Condition (bool~) gfx_init_plane_vertical::$6 if((byte) gfx_init_plane_vertical::by#1!=rangelast(0,199)) goto gfx_init_plane_vertical::@1 -Simple Condition (bool~) gfx_init_plane_charset8::$7 if((byte~) gfx_init_plane_charset8::$5==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_charset8::@4 -Simple Condition (bool~) gfx_init_plane_charset8::$9 if((byte) gfx_init_plane_charset8::cp#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@3 -Simple Condition (bool~) gfx_init_plane_charset8::$10 if((byte) gfx_init_plane_charset8::cr#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@2 -Simple Condition (bool~) gfx_init_plane_charset8::$11 if((byte) gfx_init_plane_charset8::ch#1!=rangelast(0,255)) goto gfx_init_plane_charset8::@1 -Simple Condition (bool~) gfx_init_plane_fill::$7 if((byte) gfx_init_plane_fill::bx#1!=rangelast(0,39)) goto gfx_init_plane_fill::@2 -Simple Condition (bool~) gfx_init_plane_fill::$8 if((byte) gfx_init_plane_fill::by#1!=rangelast(0,199)) goto gfx_init_plane_fill::@1 -Simple Condition (bool~) form_mode::$34 if((byte) form_mode::i#1!=rangelast(0,15)) goto form_mode::@1 -Simple Condition (bool~) form_mode::$35 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto form_mode::@6 -Simple Condition (bool~) form_mode::$38 if((byte~) form_mode::$36==(byte/signed byte/word/signed word/dword/signed dword) 0) goto form_mode::@8 -Simple Condition (bool~) form_mode::$40 if((byte) form_mode::preset_current#6==*((byte*) form_preset#0)) goto form_mode::@9 -Simple Condition (bool~) form_set_screen::$3 if((byte) form_set_screen::y#1!=rangelast(0,24)) goto form_set_screen::@1 -Simple Condition (bool~) form_render_values::$1 if((byte) form_render_values::idx#1<(byte) form_fields_cnt#21) goto form_render_values::@1 -Simple Condition (bool~) form_control::$2 if((signed byte) form_cursor_count#5>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto form_control::@1 -Simple Condition (bool~) form_control::$4 if((signed byte) form_cursor_count#15<(signed word/signed byte/signed dword~) form_control::$3) goto form_control::@2 -Simple Condition (bool~) form_control::$10 if((byte) form_control::key_event#0!=(byte) KEY_CRSR_DOWN#0) goto form_control::@4 -Simple Condition (bool~) form_control::$21 if((byte) form_control::key_event#0!=(byte) KEY_CRSR_RIGHT#0) goto form_control::@9 -Simple Condition (bool~) form_control::$13 if((byte~) form_control::$12==(byte/signed byte/word/signed word/dword/signed dword) 0) goto form_control::@5 -Simple Condition (bool~) form_control::$18 if((byte) form_field_idx#45!=(byte) form_fields_cnt#55) goto form_control::@8 -Simple Condition (bool~) form_control::$15 if((byte) form_field_idx#44!=(byte/word/signed word/dword/signed dword) 255) goto form_control::@6 -Simple Condition (bool~) form_control::$29 if((byte) form_control::key_event#0!=(byte) KEY_SPACE#0) goto form_control::@14 -Simple Condition (bool~) form_control::$23 if((byte~) form_control::$22==(byte/signed byte/word/signed word/dword/signed dword) 0) goto form_control::@10 -Simple Condition (bool~) form_control::$27 if(*((byte[]) form_fields_val#0 + (byte) form_field_idx#28)<=*((byte[]) form_fields_max#0 + (byte) form_field_idx#28)) goto form_control::@13 -Simple Condition (bool~) form_control::$25 if(*((byte[]) form_fields_val#0 + (byte) form_field_idx#28)!=(byte/word/signed word/dword/signed dword) 255) goto form_control::@11 +Simple Condition (bool~) print_str_lines::$0 [185] if(*((byte*) print_str_lines::str#3)!=(byte) '@') goto print_str_lines::@2 +Simple Condition (bool~) print_str_lines::$2 [192] if((byte) print_str_lines::ch#0==(byte) '@') goto print_str_lines::@5 +Simple Condition (bool~) print_str_lines::$3 [195] if((byte) print_str_lines::ch#0!=(byte) '@') goto print_str_lines::@4 +Simple Condition (bool~) print_str_at::$0 [211] if(*((byte*) print_str_at::str#2)!=(byte) '@') goto print_str_at::@2 +Simple Condition (bool~) print_ln::$1 [222] if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 +Simple Condition (bool~) print_cls::$1 [238] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) keyboard_event_scan::$1 [356] if((byte) keyboard_event_scan::row_scan#0!=*((byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@2 +Simple Condition (bool~) keyboard_event_scan::$13 [365] if((byte) keyboard_event_scan::row#1!=rangelast(0,7)) goto keyboard_event_scan::@1 +Simple Condition (bool~) keyboard_event_scan::$6 [371] if((byte~) keyboard_event_scan::$4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@5 +Simple Condition (bool~) keyboard_event_scan::$12 [376] if((byte) keyboard_event_scan::col#1!=rangelast(0,7)) goto keyboard_event_scan::@4 +Simple Condition (bool~) keyboard_event_scan::$8 [380] if((byte) keyboard_events_size#18==(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@6 +Simple Condition (bool~) keyboard_event_scan::$10 [386] if((byte) keyboard_event_scan::event_type#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@7 +Simple Condition (bool~) keyboard_event_scan::$16 [405] if((byte~) keyboard_event_scan::$14==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@9 +Simple Condition (bool~) keyboard_event_scan::$20 [414] if((byte~) keyboard_event_scan::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@10 +Simple Condition (bool~) keyboard_event_scan::$24 [426] if((byte~) keyboard_event_scan::$22==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@11 +Simple Condition (bool~) keyboard_event_scan::$28 [438] if((byte~) keyboard_event_scan::$26==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@12 +Simple Condition (bool~) keyboard_event_get::$0 [461] if((byte) keyboard_events_size#100==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_get::@1 +Simple Condition (bool~) bitmap_init::$4 [490] if((byte) bitmap_init::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$5 [494] if((byte) bitmap_init::x#1!=rangelast(0,255)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$12 [509] if((byte~) bitmap_init::$10!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto bitmap_init::@4 +Simple Condition (bool~) bitmap_init::$15 [513] if((byte) bitmap_init::y#1!=rangelast(0,255)) goto bitmap_init::@3 +Simple Condition (bool~) bitmap_clear::$1 [529] if((byte) bitmap_clear::x#1!=rangelast(0,199)) goto bitmap_clear::@2 +Simple Condition (bool~) bitmap_clear::$2 [533] if((byte) bitmap_clear::y#1!=rangelast(0,39)) goto bitmap_clear::@1 +Simple Condition (bool~) bitmap_line::$0 [545] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 +Simple Condition (bool~) bitmap_line::$12 [550] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@9 +Simple Condition (bool~) bitmap_line::$2 [555] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@2 +Simple Condition (bool~) bitmap_line::$8 [560] if((byte) bitmap_line::yd#0<(byte) bitmap_line::xd#1) goto bitmap_line::@6 +Simple Condition (bool~) bitmap_line::$4 [565] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#1) goto bitmap_line::@3 +Simple Condition (bool~) bitmap_line::$18 [598] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#0) goto bitmap_line::@13 +Simple Condition (bool~) bitmap_line::$14 [603] if((byte) bitmap_line::yd#3<(byte) bitmap_line::xd#0) goto bitmap_line::@10 +Simple Condition (bool~) bitmap_line_xdyi::$4 [646] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 +Simple Condition (bool~) bitmap_line_xdyi::$7 [650] if((byte) bitmap_line_xdyi::x#2!=(byte/signed word/word/dword/signed dword~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 +Simple Condition (bool~) bitmap_line_xdyd::$4 [669] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 +Simple Condition (bool~) bitmap_line_xdyd::$7 [673] if((byte) bitmap_line_xdyd::x#2!=(byte/signed word/word/dword/signed dword~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 +Simple Condition (bool~) bitmap_line_ydxi::$4 [692] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 +Simple Condition (bool~) bitmap_line_ydxi::$7 [696] if((byte) bitmap_line_ydxi::y#2!=(byte/signed word/word/dword/signed dword~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 +Simple Condition (bool~) bitmap_line_ydxd::$4 [716] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 +Simple Condition (bool~) bitmap_line_ydxd::$7 [720] if((byte) bitmap_line_ydxd::y#3!=(byte/signed word/word/dword/signed dword~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 +Simple Condition (bool~) get_plane::$0 [778] if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto get_plane::@1 +Simple Condition (bool~) get_plane::$1 [783] if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 1) goto get_plane::@2 +Simple Condition (bool~) get_plane::$2 [788] if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 2) goto get_plane::@3 +Simple Condition (bool~) get_plane::$3 [793] if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 3) goto get_plane::@4 +Simple Condition (bool~) get_plane::$4 [798] if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 4) goto get_plane::@5 +Simple Condition (bool~) get_plane::$5 [803] if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 5) goto get_plane::@6 +Simple Condition (bool~) get_plane::$6 [808] if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 6) goto get_plane::@7 +Simple Condition (bool~) get_plane::$7 [813] if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 7) goto get_plane::@8 +Simple Condition (bool~) get_plane::$8 [818] if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 8) goto get_plane::@9 +Simple Condition (bool~) get_plane::$9 [823] if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 9) goto get_plane::@10 +Simple Condition (bool~) get_plane::$10 [828] if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 10) goto get_plane::@11 +Simple Condition (bool~) get_plane::$11 [833] if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 11) goto get_plane::@12 +Simple Condition (bool~) get_plane::$12 [838] if((byte) get_plane::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 12) goto get_plane::@13 +Simple Condition (bool~) get_plane::$14 [844] if((byte) get_plane::idx#10!=(byte/signed byte/word/signed word/dword/signed dword) 13) goto get_plane::@27 +Simple Condition (bool~) get_vic_screen::$0 [854] if((byte) get_vic_screen::idx#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto get_vic_screen::@1 +Simple Condition (bool~) get_vic_screen::$1 [858] if((byte) get_vic_screen::idx#2==(byte/signed byte/word/signed word/dword/signed dword) 1) goto get_vic_screen::@2 +Simple Condition (bool~) get_vic_screen::$2 [862] if((byte) get_vic_screen::idx#2==(byte/signed byte/word/signed word/dword/signed dword) 2) goto get_vic_screen::@3 +Simple Condition (bool~) get_vic_screen::$3 [866] if((byte) get_vic_screen::idx#2==(byte/signed byte/word/signed word/dword/signed dword) 3) goto get_vic_screen::@4 +Simple Condition (bool~) get_vic_screen::$5 [871] if((byte) get_vic_screen::idx#2!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto get_vic_screen::@9 +Simple Condition (bool~) get_vic_charset::$0 [879] if((byte) get_vic_charset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto get_vic_charset::@1 +Simple Condition (bool~) get_vic_charset::$2 [884] if((byte) get_vic_charset::idx#0!=(byte/signed byte/word/signed word/dword/signed dword) 1) goto get_vic_charset::@3 +Simple Condition (bool~) apply_preset::$0 [944] if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto apply_preset::@1 +Simple Condition (bool~) apply_preset::$1 [949] if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 1) goto apply_preset::@2 +Simple Condition (bool~) apply_preset::$2 [954] if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 2) goto apply_preset::@3 +Simple Condition (bool~) apply_preset::$3 [959] if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 3) goto apply_preset::@4 +Simple Condition (bool~) apply_preset::$4 [964] if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 4) goto apply_preset::@5 +Simple Condition (bool~) apply_preset::$5 [969] if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 5) goto apply_preset::@6 +Simple Condition (bool~) apply_preset::$6 [974] if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 6) goto apply_preset::@7 +Simple Condition (bool~) apply_preset::$7 [979] if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 7) goto apply_preset::@8 +Simple Condition (bool~) apply_preset::$8 [984] if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 8) goto apply_preset::@9 +Simple Condition (bool~) apply_preset::$9 [989] if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 9) goto apply_preset::@10 +Simple Condition (bool~) apply_preset::$10 [994] if((byte) apply_preset::idx#0==(byte/signed byte/word/signed word/dword/signed dword) 10) goto apply_preset::@11 +Simple Condition (bool~) apply_preset::$11 [1005] if((byte) apply_preset::i#1!=(byte) form_fields_cnt#55) goto apply_preset::@23 +Simple Condition (bool~) render_preset_name::$0 [1009] if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_preset_name::@1 +Simple Condition (bool~) render_preset_name::$1 [1013] if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 1) goto render_preset_name::@2 +Simple Condition (bool~) render_preset_name::$2 [1017] if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 2) goto render_preset_name::@3 +Simple Condition (bool~) render_preset_name::$3 [1021] if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 3) goto render_preset_name::@4 +Simple Condition (bool~) render_preset_name::$4 [1025] if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 4) goto render_preset_name::@5 +Simple Condition (bool~) render_preset_name::$5 [1029] if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 5) goto render_preset_name::@6 +Simple Condition (bool~) render_preset_name::$6 [1033] if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_preset_name::@7 +Simple Condition (bool~) render_preset_name::$7 [1037] if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 7) goto render_preset_name::@8 +Simple Condition (bool~) render_preset_name::$8 [1041] if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 8) goto render_preset_name::@9 +Simple Condition (bool~) render_preset_name::$9 [1045] if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 9) goto render_preset_name::@10 +Simple Condition (bool~) render_preset_name::$10 [1049] if((byte) render_preset_name::idx#10==(byte/signed byte/word/signed word/dword/signed dword) 10) goto render_preset_name::@11 +Simple Condition (bool~) gfx_mode::$1 [1137] if(*((byte*) form_ctrl_line#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@1 +Simple Condition (bool~) gfx_mode::$4 [1141] if(*((byte*) form_ctrl_borof#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@2 +Simple Condition (bool~) gfx_mode::$7 [1148] if(*((byte*) form_ctrl_hicol#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@3 +Simple Condition (bool~) gfx_mode::$10 [1155] if(*((byte*) form_ctrl_overs#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@4 +Simple Condition (bool~) gfx_mode::$13 [1162] if(*((byte*) form_ctrl_colof#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@5 +Simple Condition (bool~) gfx_mode::$16 [1169] if(*((byte*) form_ctrl_chunk#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@6 +Simple Condition (bool~) gfx_mode::$21 [1180] if(*((byte*) form_ctrl_ecm#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@7 +Simple Condition (bool~) gfx_mode::$24 [1187] if(*((byte*) form_ctrl_bmm#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@8 +Simple Condition (bool~) gfx_mode::$27 [1196] if(*((byte*) form_ctrl_mcm#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@9 +Simple Condition (bool~) gfx_mode::$73 [1299] if((byte) gfx_mode::cx#1!=rangelast(0,39)) goto gfx_mode::@11 +Simple Condition (bool~) gfx_mode::$74 [1303] if((byte) gfx_mode::cy#1!=rangelast(0,24)) goto gfx_mode::@10 +Simple Condition (bool~) gfx_mode::$83 [1319] if(*((byte*) form_dtv_palet#0)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_mode::@12 +Simple Condition (bool~) gfx_mode::$84 [1328] if((byte) gfx_mode::j#1!=rangelast(0,15)) goto gfx_mode::@13 +Simple Condition (bool~) gfx_mode::$85 [1333] if((byte) gfx_mode::i#1!=rangelast(0,15)) goto gfx_mode::@15 +Simple Condition (bool~) gfx_mode::$86 [1339] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto gfx_mode::@20 +Simple Condition (bool~) gfx_mode::$90 [1354] if((byte) gfx_mode::keyboard_event#0!=(byte) KEY_SPACE#0) goto gfx_mode::@22 +Simple Condition (bool~) gfx_init_charset::$0 [1388] if((byte) gfx_init_charset::l#1!=rangelast(0,7)) goto gfx_init_charset::@2 +Simple Condition (bool~) gfx_init_charset::$1 [1392] if((byte) gfx_init_charset::c#1!=rangelast(0,255)) goto gfx_init_charset::@1 +Simple Condition (bool~) gfx_init_screen0::$4 [1408] if((byte) gfx_init_screen0::cx#1!=rangelast(0,39)) goto gfx_init_screen0::@2 +Simple Condition (bool~) gfx_init_screen0::$5 [1412] if((byte) gfx_init_screen0::cy#1!=rangelast(0,24)) goto gfx_init_screen0::@1 +Simple Condition (bool~) gfx_init_screen1::$2 [1425] if((byte) gfx_init_screen1::cx#1!=rangelast(0,39)) goto gfx_init_screen1::@2 +Simple Condition (bool~) gfx_init_screen1::$3 [1429] if((byte) gfx_init_screen1::cy#1!=rangelast(0,24)) goto gfx_init_screen1::@1 +Simple Condition (bool~) gfx_init_screen2::$5 [1447] if((byte) gfx_init_screen2::cx#1!=rangelast(0,39)) goto gfx_init_screen2::@2 +Simple Condition (bool~) gfx_init_screen2::$6 [1451] if((byte) gfx_init_screen2::cy#1!=rangelast(0,24)) goto gfx_init_screen2::@1 +Simple Condition (bool~) gfx_init_screen3::$4 [1466] if((byte) gfx_init_screen3::cx#1!=rangelast(0,39)) goto gfx_init_screen3::@2 +Simple Condition (bool~) gfx_init_screen3::$5 [1470] if((byte) gfx_init_screen3::cy#1!=rangelast(0,24)) goto gfx_init_screen3::@1 +Simple Condition (bool~) gfx_init_screen4::$0 [1481] if((byte) gfx_init_screen4::cx#1!=rangelast(0,39)) goto gfx_init_screen4::@2 +Simple Condition (bool~) gfx_init_screen4::$1 [1485] if((byte) gfx_init_screen4::cy#1!=rangelast(0,24)) goto gfx_init_screen4::@1 +Simple Condition (bool~) gfx_init_vic_bitmap::$5 [1505] if((byte) gfx_init_vic_bitmap::l#1<(byte) gfx_init_vic_bitmap::lines_cnt#0) goto gfx_init_vic_bitmap::@1 +Simple Condition (bool~) gfx_init_plane_8bppchunky::$4 [1521] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word/dword/signed dword) 32768) goto gfx_init_plane_8bppchunky::@3 +Simple Condition (bool~) gfx_init_plane_8bppchunky::$8 [1530] if((word) gfx_init_plane_8bppchunky::x#1!=rangelast(0,319)) goto gfx_init_plane_8bppchunky::@2 +Simple Condition (bool~) gfx_init_plane_8bppchunky::$9 [1540] if((byte) gfx_init_plane_8bppchunky::y#1!=rangelast(0,199)) goto gfx_init_plane_8bppchunky::@1 +Simple Condition (bool~) gfx_init_plane_horisontal::$6 [1562] if((byte~) gfx_init_plane_horisontal::$5==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_horisontal::@3 +Simple Condition (bool~) gfx_init_plane_horisontal::$7 [1572] if((byte) gfx_init_plane_horisontal::ax#1!=rangelast(0,39)) goto gfx_init_plane_horisontal::@2 +Simple Condition (bool~) gfx_init_plane_horisontal::$8 [1576] if((byte) gfx_init_plane_horisontal::ay#1!=rangelast(0,199)) goto gfx_init_plane_horisontal::@1 +Simple Condition (bool~) gfx_init_plane_horisontal2::$7 [1604] if((byte) gfx_init_plane_horisontal2::ax#1!=rangelast(0,39)) goto gfx_init_plane_horisontal2::@2 +Simple Condition (bool~) gfx_init_plane_horisontal2::$8 [1608] if((byte) gfx_init_plane_horisontal2::ay#1!=rangelast(0,199)) goto gfx_init_plane_horisontal2::@1 +Simple Condition (bool~) gfx_init_plane_vertical::$5 [1632] if((byte) gfx_init_plane_vertical::bx#1!=rangelast(0,39)) goto gfx_init_plane_vertical::@2 +Simple Condition (bool~) gfx_init_plane_vertical::$6 [1636] if((byte) gfx_init_plane_vertical::by#1!=rangelast(0,199)) goto gfx_init_plane_vertical::@1 +Simple Condition (bool~) gfx_init_plane_charset8::$7 [1667] if((byte~) gfx_init_plane_charset8::$5==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_charset8::@4 +Simple Condition (bool~) gfx_init_plane_charset8::$9 [1676] if((byte) gfx_init_plane_charset8::cp#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@3 +Simple Condition (bool~) gfx_init_plane_charset8::$10 [1682] if((byte) gfx_init_plane_charset8::cr#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@2 +Simple Condition (bool~) gfx_init_plane_charset8::$11 [1686] if((byte) gfx_init_plane_charset8::ch#1!=rangelast(0,255)) goto gfx_init_plane_charset8::@1 +Simple Condition (bool~) gfx_init_plane_fill::$7 [1726] if((byte) gfx_init_plane_fill::bx#1!=rangelast(0,39)) goto gfx_init_plane_fill::@2 +Simple Condition (bool~) gfx_init_plane_fill::$8 [1730] if((byte) gfx_init_plane_fill::by#1!=rangelast(0,199)) goto gfx_init_plane_fill::@1 +Simple Condition (bool~) form_mode::$34 [1817] if((byte) form_mode::i#1!=rangelast(0,15)) goto form_mode::@1 +Simple Condition (bool~) form_mode::$35 [1827] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto form_mode::@6 +Simple Condition (bool~) form_mode::$38 [1840] if((byte~) form_mode::$36==(byte/signed byte/word/signed word/dword/signed dword) 0) goto form_mode::@8 +Simple Condition (bool~) form_mode::$40 [1844] if((byte) form_mode::preset_current#6==*((byte*) form_preset#0)) goto form_mode::@9 +Simple Condition (bool~) form_set_screen::$3 [1884] if((byte) form_set_screen::y#1!=rangelast(0,24)) goto form_set_screen::@1 +Simple Condition (bool~) form_render_values::$1 [1909] if((byte) form_render_values::idx#1<(byte) form_fields_cnt#21) goto form_render_values::@1 +Simple Condition (bool~) form_control::$2 [1921] if((signed byte) form_cursor_count#5>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto form_control::@1 +Simple Condition (bool~) form_control::$4 [1925] if((signed byte) form_cursor_count#15<(signed word/signed byte/signed dword~) form_control::$3) goto form_control::@2 +Simple Condition (bool~) form_control::$10 [1947] if((byte) form_control::key_event#0!=(byte) KEY_CRSR_DOWN#0) goto form_control::@4 +Simple Condition (bool~) form_control::$21 [1951] if((byte) form_control::key_event#0!=(byte) KEY_CRSR_RIGHT#0) goto form_control::@9 +Simple Condition (bool~) form_control::$13 [1957] if((byte~) form_control::$12==(byte/signed byte/word/signed word/dword/signed dword) 0) goto form_control::@5 +Simple Condition (bool~) form_control::$18 [1962] if((byte) form_field_idx#45!=(byte) form_fields_cnt#55) goto form_control::@8 +Simple Condition (bool~) form_control::$15 [1967] if((byte) form_field_idx#44!=(byte/word/signed word/dword/signed dword) 255) goto form_control::@6 +Simple Condition (bool~) form_control::$29 [1989] if((byte) form_control::key_event#0!=(byte) KEY_SPACE#0) goto form_control::@14 +Simple Condition (bool~) form_control::$23 [1993] if((byte~) form_control::$22==(byte/signed byte/word/signed word/dword/signed dword) 0) goto form_control::@10 +Simple Condition (bool~) form_control::$27 [1998] if(*((byte[]) form_fields_val#0 + (byte) form_field_idx#28)<=*((byte[]) form_fields_max#0 + (byte) form_field_idx#28)) goto form_control::@13 +Simple Condition (bool~) form_control::$25 [2003] if(*((byte[]) form_fields_val#0 + (byte) form_field_idx#28)!=(byte/word/signed word/dword/signed dword) 255) goto form_control::@11 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -8899,23 +8899,23 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in assignment *(gfx_init_vic_bitmap::lines_x#0+1 + gfx_init_vic_bitmap::$2) Consolidated array index constant in assignment *(gfx_init_vic_bitmap::lines_y#0+1 + gfx_init_vic_bitmap::$3) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [277] if(true) goto main::@2 Removing PHI-reference to removed block (gfx_mode::@16) in block gfx_mode::@return Removing PHI-reference to removed block (gfx_mode::@16) in block gfx_mode::@return -if() condition always true - replacing block destination if(true) goto gfx_mode::@17 +if() condition always true - replacing block destination [472] if(true) goto gfx_mode::@17 Removing PHI-reference to removed block (form_mode::@2) in block form_mode::@return Removing PHI-reference to removed block (form_mode::@2) in block form_mode::@return Removing PHI-reference to removed block (form_mode::@2) in block form_mode::@return Removing PHI-reference to removed block (form_mode::@2) in block form_mode::@return -if() condition always true - replacing block destination if(true) goto form_mode::@3 +if() condition always true - replacing block destination [720] if(true) goto form_mode::@3 Successful SSA optimization Pass2ConstantIfs Fixing inline constructor with bitmap_clear::$3 ← *(bitmap_plot_xhi#0 + 0) w= *(bitmap_plot_xlo#0 + 0) Fixing inline constructor with bitmap_plot::$2 ← *(bitmap_plot_xhi#0 + bitmap_plot::x#4) w= *(bitmap_plot_xlo#0 + bitmap_plot::x#4) Fixing inline constructor with bitmap_plot::$3 ← *(bitmap_plot_yhi#0 + bitmap_plot::y#4) w= *(bitmap_plot_ylo#0 + bitmap_plot::y#4) Fixing inline constructor with form_field_ptr::$2 ← *(form_line_hi#0 + form_field_ptr::y#0) w= *(form_line_lo#0 + form_field_ptr::y#0) Successful SSA optimization Pass2FixInlineConstructors -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) gfx_init_vic_bitmap::$2 ← (byte) gfx_init_vic_bitmap::l#2 -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) gfx_init_vic_bitmap::$3 ← (byte) gfx_init_vic_bitmap::l#2 +Inferred type updated to byte in [572] (byte/signed word/word/dword/signed dword~) gfx_init_vic_bitmap::$2 ← (byte) gfx_init_vic_bitmap::l#2 +Inferred type updated to byte in [573] (byte/signed word/word/dword/signed dword~) gfx_init_vic_bitmap::$3 ← (byte) gfx_init_vic_bitmap::l#2 Successful SSA optimization PassNEliminateUnusedVars Successful SSA optimization PassNEliminateUnusedVars Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/c64dtv-gfxmodes.log b/src/test/ref/c64dtv-gfxmodes.log index c0bbb77ac..ea7a27e00 100644 --- a/src/test/ref/c64dtv-gfxmodes.log +++ b/src/test/ref/c64dtv-gfxmodes.log @@ -6508,36 +6508,36 @@ Culled Empty Block (label) bitmap_line::@34 Culled Empty Block (label) bitmap_line::@35 Culled Empty Block (label) bitmap_line::@36 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) print_str_lines::$2 ← (byte) print_str_lines::ch#0 == (byte) '@' from (bool~) print_str_lines::$1 ← (byte) print_str_lines::ch#0 != (byte) '@' -Inversing boolean not (bool~) bitmap_init::$4 ← (byte) bitmap_init::bits#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) bitmap_init::$3 ← (byte) bitmap_init::bits#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) bitmap_init::$12 ← (byte~) bitmap_init::$10 != (byte/signed byte/word/signed word/dword/signed dword) 7 from (bool~) bitmap_init::$11 ← (byte~) bitmap_init::$10 == (byte/signed byte/word/signed word/dword/signed dword) 7 -Inversing boolean not (bool~) bitmap_line_xdyi::$4 ← (byte) bitmap_line_xdyi::xd#2 >= (byte) bitmap_line_xdyi::e#1 from (bool~) bitmap_line_xdyi::$3 ← (byte) bitmap_line_xdyi::xd#2 < (byte) bitmap_line_xdyi::e#1 -Inversing boolean not (bool~) bitmap_line_xdyd::$4 ← (byte) bitmap_line_xdyd::xd#2 >= (byte) bitmap_line_xdyd::e#1 from (bool~) bitmap_line_xdyd::$3 ← (byte) bitmap_line_xdyd::xd#2 < (byte) bitmap_line_xdyd::e#1 -Inversing boolean not (bool~) bitmap_line_ydxi::$4 ← (byte) bitmap_line_ydxi::yd#2 >= (byte) bitmap_line_ydxi::e#1 from (bool~) bitmap_line_ydxi::$3 ← (byte) bitmap_line_ydxi::yd#2 < (byte) bitmap_line_ydxi::e#1 -Inversing boolean not (bool~) bitmap_line_ydxd::$4 ← (byte) bitmap_line_ydxd::yd#2 >= (byte) bitmap_line_ydxd::e#1 from (bool~) bitmap_line_ydxd::$3 ← (byte) bitmap_line_ydxd::yd#2 < (byte) bitmap_line_ydxd::e#1 -Inversing boolean not (bool~) menu::$31 ← (byte~) menu::$29 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) menu::$30 ← (byte~) menu::$29 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) menu::$35 ← (byte~) menu::$33 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) menu::$34 ← (byte~) menu::$33 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) menu::$39 ← (byte~) menu::$37 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) menu::$38 ← (byte~) menu::$37 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) menu::$43 ← (byte~) menu::$41 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) menu::$42 ← (byte~) menu::$41 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) menu::$47 ← (byte~) menu::$45 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) menu::$46 ← (byte~) menu::$45 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) menu::$51 ← (byte~) menu::$49 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) menu::$50 ← (byte~) menu::$49 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) menu::$55 ← (byte~) menu::$53 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) menu::$54 ← (byte~) menu::$53 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) menu::$59 ← (byte~) menu::$57 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) menu::$58 ← (byte~) menu::$57 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) menu::$63 ← (byte~) menu::$61 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) menu::$62 ← (byte~) menu::$61 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) menu::$67 ← (byte~) menu::$65 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) menu::$66 ← (byte~) menu::$65 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) menu::$71 ← (byte~) menu::$69 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) menu::$70 ← (byte~) menu::$69 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) menu::$75 ← (byte~) menu::$73 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) menu::$74 ← (byte~) menu::$73 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mode_ctrl::$3 ← (byte~) mode_ctrl::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mode_ctrl::$2 ← (byte~) mode_ctrl::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mode_ctrl::$6 ← (byte~) mode_ctrl::$4 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mode_ctrl::$5 ← (byte~) mode_ctrl::$4 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mode_ctrl::$10 ← (byte~) mode_ctrl::$8 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mode_ctrl::$9 ← (byte~) mode_ctrl::$8 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mode_ctrl::$14 ← (byte~) mode_ctrl::$12 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mode_ctrl::$13 ← (byte~) mode_ctrl::$12 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mode_ctrl::$18 ← (byte~) mode_ctrl::$16 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mode_ctrl::$17 ← (byte~) mode_ctrl::$16 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mode_ctrl::$22 ← (byte~) mode_ctrl::$20 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mode_ctrl::$21 ← (byte~) mode_ctrl::$20 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mode_ctrl::$26 ← (byte~) mode_ctrl::$24 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mode_ctrl::$25 ← (byte~) mode_ctrl::$24 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mode_ctrl::$30 ← (byte~) mode_ctrl::$28 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mode_ctrl::$29 ← (byte~) mode_ctrl::$28 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mode_ctrl::$32 ← (byte) mode_ctrl::ctrl#14 == (byte) dtv_control#72 from (bool~) mode_ctrl::$31 ← (byte) mode_ctrl::ctrl#14 != (byte) dtv_control#72 -Inversing boolean not (bool~) mode_8bpppixelcell::$21 ← (byte~) mode_8bpppixelcell::$19 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mode_8bpppixelcell::$20 ← (byte~) mode_8bpppixelcell::$19 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mode_8bppchunkybmm::$21 ← (byte*) mode_8bppchunkybmm::gfxb#3 != (word/dword/signed dword) 32768 from (bool~) mode_8bppchunkybmm::$20 ← (byte*) mode_8bppchunkybmm::gfxb#3 == (word/dword/signed dword) 32768 +Inversing boolean not [191] (bool~) print_str_lines::$2 ← (byte) print_str_lines::ch#0 == (byte) '@' from [190] (bool~) print_str_lines::$1 ← (byte) print_str_lines::ch#0 != (byte) '@' +Inversing boolean not [366] (bool~) bitmap_init::$4 ← (byte) bitmap_init::bits#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [365] (bool~) bitmap_init::$3 ← (byte) bitmap_init::bits#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [385] (bool~) bitmap_init::$12 ← (byte~) bitmap_init::$10 != (byte/signed byte/word/signed word/dword/signed dword) 7 from [384] (bool~) bitmap_init::$11 ← (byte~) bitmap_init::$10 == (byte/signed byte/word/signed word/dword/signed dword) 7 +Inversing boolean not [522] (bool~) bitmap_line_xdyi::$4 ← (byte) bitmap_line_xdyi::xd#2 >= (byte) bitmap_line_xdyi::e#1 from [521] (bool~) bitmap_line_xdyi::$3 ← (byte) bitmap_line_xdyi::xd#2 < (byte) bitmap_line_xdyi::e#1 +Inversing boolean not [545] (bool~) bitmap_line_xdyd::$4 ← (byte) bitmap_line_xdyd::xd#2 >= (byte) bitmap_line_xdyd::e#1 from [544] (bool~) bitmap_line_xdyd::$3 ← (byte) bitmap_line_xdyd::xd#2 < (byte) bitmap_line_xdyd::e#1 +Inversing boolean not [568] (bool~) bitmap_line_ydxi::$4 ← (byte) bitmap_line_ydxi::yd#2 >= (byte) bitmap_line_ydxi::e#1 from [567] (bool~) bitmap_line_ydxi::$3 ← (byte) bitmap_line_ydxi::yd#2 < (byte) bitmap_line_ydxi::e#1 +Inversing boolean not [592] (bool~) bitmap_line_ydxd::$4 ← (byte) bitmap_line_ydxd::yd#2 >= (byte) bitmap_line_ydxd::e#1 from [591] (bool~) bitmap_line_ydxd::$3 ← (byte) bitmap_line_ydxd::yd#2 < (byte) bitmap_line_ydxd::e#1 +Inversing boolean not [721] (bool~) menu::$31 ← (byte~) menu::$29 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [720] (bool~) menu::$30 ← (byte~) menu::$29 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [730] (bool~) menu::$35 ← (byte~) menu::$33 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [729] (bool~) menu::$34 ← (byte~) menu::$33 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [749] (bool~) menu::$39 ← (byte~) menu::$37 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [748] (bool~) menu::$38 ← (byte~) menu::$37 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [762] (bool~) menu::$43 ← (byte~) menu::$41 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [761] (bool~) menu::$42 ← (byte~) menu::$41 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [775] (bool~) menu::$47 ← (byte~) menu::$45 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [774] (bool~) menu::$46 ← (byte~) menu::$45 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [788] (bool~) menu::$51 ← (byte~) menu::$49 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [787] (bool~) menu::$50 ← (byte~) menu::$49 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [801] (bool~) menu::$55 ← (byte~) menu::$53 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [800] (bool~) menu::$54 ← (byte~) menu::$53 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [814] (bool~) menu::$59 ← (byte~) menu::$57 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [813] (bool~) menu::$58 ← (byte~) menu::$57 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [827] (bool~) menu::$63 ← (byte~) menu::$61 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [826] (bool~) menu::$62 ← (byte~) menu::$61 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [840] (bool~) menu::$67 ← (byte~) menu::$65 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [839] (bool~) menu::$66 ← (byte~) menu::$65 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [853] (bool~) menu::$71 ← (byte~) menu::$69 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [852] (bool~) menu::$70 ← (byte~) menu::$69 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [866] (bool~) menu::$75 ← (byte~) menu::$73 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [865] (bool~) menu::$74 ← (byte~) menu::$73 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [894] (bool~) mode_ctrl::$3 ← (byte~) mode_ctrl::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [893] (bool~) mode_ctrl::$2 ← (byte~) mode_ctrl::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [904] (bool~) mode_ctrl::$6 ← (byte~) mode_ctrl::$4 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [903] (bool~) mode_ctrl::$5 ← (byte~) mode_ctrl::$4 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [916] (bool~) mode_ctrl::$10 ← (byte~) mode_ctrl::$8 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [915] (bool~) mode_ctrl::$9 ← (byte~) mode_ctrl::$8 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [928] (bool~) mode_ctrl::$14 ← (byte~) mode_ctrl::$12 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [927] (bool~) mode_ctrl::$13 ← (byte~) mode_ctrl::$12 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [940] (bool~) mode_ctrl::$18 ← (byte~) mode_ctrl::$16 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [939] (bool~) mode_ctrl::$17 ← (byte~) mode_ctrl::$16 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [952] (bool~) mode_ctrl::$22 ← (byte~) mode_ctrl::$20 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [951] (bool~) mode_ctrl::$21 ← (byte~) mode_ctrl::$20 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [964] (bool~) mode_ctrl::$26 ← (byte~) mode_ctrl::$24 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [963] (bool~) mode_ctrl::$25 ← (byte~) mode_ctrl::$24 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [976] (bool~) mode_ctrl::$30 ← (byte~) mode_ctrl::$28 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [975] (bool~) mode_ctrl::$29 ← (byte~) mode_ctrl::$28 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [983] (bool~) mode_ctrl::$32 ← (byte) mode_ctrl::ctrl#14 == (byte) dtv_control#72 from [982] (bool~) mode_ctrl::$31 ← (byte) mode_ctrl::ctrl#14 != (byte) dtv_control#72 +Inversing boolean not [1923] (bool~) mode_8bpppixelcell::$21 ← (byte~) mode_8bpppixelcell::$19 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [1922] (bool~) mode_8bpppixelcell::$20 ← (byte~) mode_8bpppixelcell::$19 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [2000] (bool~) mode_8bppchunkybmm::$21 ← (byte*) mode_8bppchunkybmm::gfxb#3 != (word/dword/signed dword) 32768 from [1999] (bool~) mode_8bppchunkybmm::$20 ← (byte*) mode_8bppchunkybmm::gfxb#3 == (word/dword/signed dword) 32768 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) print_screen#0 = (byte*) print_line_cursor#0 (byte*) print_char_cursor#0 (byte*) print_screen#83 (byte*) print_line_cursor#102 (byte*) print_char_cursor#102 (byte*) print_screen#82 (byte*) print_line_cursor#101 (byte*) print_char_cursor#101 (byte*) print_screen#80 (byte*) print_line_cursor#99 (byte*) print_char_cursor#99 (byte*) print_screen#66 (byte*) print_line_cursor#85 (byte*) print_char_cursor#85 (byte*) print_screen#65 (byte*) print_line_cursor#83 (byte*) print_char_cursor#84 (byte*) print_screen#50 (byte*) print_line_cursor#67 (byte*) print_char_cursor#70 (byte*) print_screen#33 (byte*) print_line_cursor#49 (byte*) print_char_cursor#51 Alias (byte*) print_str_lines::str#2 = (byte*) print_str_lines::str#6 @@ -7139,111 +7139,111 @@ Redundant Phi (byte) dtv_control#54 (byte) dtv_control#1 Successful SSA optimization Pass2RedundantPhiElimination Redundant Phi (byte) dtv_control#16 (byte) dtv_control#114 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) print_str_lines::$0 if(*((byte*) print_str_lines::str#2)!=(byte) '@') goto print_str_lines::@2 -Simple Condition (bool~) print_str_lines::$2 if((byte) print_str_lines::ch#0==(byte) '@') goto print_str_lines::@5 -Simple Condition (bool~) print_str_lines::$3 if((byte) print_str_lines::ch#0!=(byte) '@') goto print_str_lines::@4 -Simple Condition (bool~) print_ln::$1 if((byte*) print_line_cursor#19<(byte*) print_char_cursor#32) goto print_ln::@1 -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) bitmap_init::$4 if((byte) bitmap_init::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$5 if((byte) bitmap_init::x#1!=rangelast(0,255)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$12 if((byte~) bitmap_init::$10!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto bitmap_init::@4 -Simple Condition (bool~) bitmap_init::$15 if((byte) bitmap_init::y#1!=rangelast(0,255)) goto bitmap_init::@3 -Simple Condition (bool~) bitmap_clear::$1 if((byte) bitmap_clear::x#1!=rangelast(0,199)) goto bitmap_clear::@2 -Simple Condition (bool~) bitmap_clear::$2 if((byte) bitmap_clear::y#1!=rangelast(0,39)) goto bitmap_clear::@1 -Simple Condition (bool~) bitmap_line::$0 if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 -Simple Condition (bool~) bitmap_line::$12 if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@9 -Simple Condition (bool~) bitmap_line::$2 if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@2 -Simple Condition (bool~) bitmap_line::$8 if((byte) bitmap_line::yd#0<(byte) bitmap_line::xd#1) goto bitmap_line::@6 -Simple Condition (bool~) bitmap_line::$4 if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#1) goto bitmap_line::@3 -Simple Condition (bool~) bitmap_line::$18 if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#0) goto bitmap_line::@13 -Simple Condition (bool~) bitmap_line::$14 if((byte) bitmap_line::yd#3<(byte) bitmap_line::xd#0) goto bitmap_line::@10 -Simple Condition (bool~) bitmap_line_xdyi::$4 if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 -Simple Condition (bool~) bitmap_line_xdyi::$7 if((byte) bitmap_line_xdyi::x#2!=(byte/signed word/word/dword/signed dword~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 -Simple Condition (bool~) bitmap_line_xdyd::$4 if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 -Simple Condition (bool~) bitmap_line_xdyd::$7 if((byte) bitmap_line_xdyd::x#2!=(byte/signed word/word/dword/signed dword~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 -Simple Condition (bool~) bitmap_line_ydxi::$4 if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 -Simple Condition (bool~) bitmap_line_ydxi::$7 if((byte) bitmap_line_ydxi::y#2!=(byte/signed word/word/dword/signed dword~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 -Simple Condition (bool~) bitmap_line_ydxd::$4 if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 -Simple Condition (bool~) bitmap_line_ydxd::$7 if((byte) bitmap_line_ydxd::y#3!=(byte/signed word/word/dword/signed dword~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 -Simple Condition (bool~) menu::$23 if((byte) menu::i#1!=rangelast(0,15)) goto menu::@1 -Simple Condition (bool~) menu::$25 if((byte*) menu::c#1!=(byte*~) menu::$24) goto menu::@2 -Simple Condition (bool~) menu::$31 if((byte~) menu::$29==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@6 -Simple Condition (bool~) menu::$35 if((byte~) menu::$33==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@7 -Simple Condition (bool~) menu::$39 if((byte~) menu::$37==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@8 -Simple Condition (bool~) menu::$43 if((byte~) menu::$41==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@9 -Simple Condition (bool~) menu::$47 if((byte~) menu::$45==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@10 -Simple Condition (bool~) menu::$51 if((byte~) menu::$49==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@11 -Simple Condition (bool~) menu::$55 if((byte~) menu::$53==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@12 -Simple Condition (bool~) menu::$59 if((byte~) menu::$57==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@13 -Simple Condition (bool~) menu::$63 if((byte~) menu::$61==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@14 -Simple Condition (bool~) menu::$67 if((byte~) menu::$65==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@15 -Simple Condition (bool~) menu::$71 if((byte~) menu::$69==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@16 -Simple Condition (bool~) menu::$75 if((byte~) menu::$73==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@17 -Simple Condition (bool~) mode_ctrl::$0 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto mode_ctrl::@5 -Simple Condition (bool~) mode_ctrl::$3 if((byte~) mode_ctrl::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_ctrl::@7 -Simple Condition (bool~) mode_ctrl::$6 if((byte~) mode_ctrl::$4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_ctrl::@8 -Simple Condition (bool~) mode_ctrl::$10 if((byte~) mode_ctrl::$8==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_ctrl::@9 -Simple Condition (bool~) mode_ctrl::$14 if((byte~) mode_ctrl::$12==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_ctrl::@10 -Simple Condition (bool~) mode_ctrl::$18 if((byte~) mode_ctrl::$16==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_ctrl::@11 -Simple Condition (bool~) mode_ctrl::$22 if((byte~) mode_ctrl::$20==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_ctrl::@12 -Simple Condition (bool~) mode_ctrl::$26 if((byte~) mode_ctrl::$24==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_ctrl::@13 -Simple Condition (bool~) mode_ctrl::$30 if((byte~) mode_ctrl::$28==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_ctrl::@14 -Simple Condition (bool~) mode_ctrl::$32 if((byte) mode_ctrl::ctrl#14==(byte) dtv_control#114) goto mode_ctrl::@15 -Simple Condition (bool~) mode_stdchar::$23 if((byte) mode_stdchar::i#1!=rangelast(0,15)) goto mode_stdchar::@1 -Simple Condition (bool~) mode_stdchar::$30 if((byte) mode_stdchar::cx#1!=rangelast(0,39)) goto mode_stdchar::@3 -Simple Condition (bool~) mode_stdchar::$31 if((byte) mode_stdchar::cy#1!=rangelast(0,24)) goto mode_stdchar::@2 -Simple Condition (bool~) mode_ecmchar::$24 if((byte) mode_ecmchar::i#1!=rangelast(0,15)) goto mode_ecmchar::@1 -Simple Condition (bool~) mode_ecmchar::$31 if((byte) mode_ecmchar::cx#1!=rangelast(0,39)) goto mode_ecmchar::@3 -Simple Condition (bool~) mode_ecmchar::$32 if((byte) mode_ecmchar::cy#1!=rangelast(0,24)) goto mode_ecmchar::@2 -Simple Condition (bool~) mode_mcchar::$24 if((byte) mode_mcchar::i#1!=rangelast(0,15)) goto mode_mcchar::@1 -Simple Condition (bool~) mode_mcchar::$31 if((byte) mode_mcchar::cx#1!=rangelast(0,39)) goto mode_mcchar::@3 -Simple Condition (bool~) mode_mcchar::$32 if((byte) mode_mcchar::cy#1!=rangelast(0,24)) goto mode_mcchar::@2 -Simple Condition (bool~) mode_stdbitmap::$18 if((byte) mode_stdbitmap::i#1!=rangelast(0,15)) goto mode_stdbitmap::@1 -Simple Condition (bool~) mode_stdbitmap::$24 if((byte) mode_stdbitmap::cx#1!=rangelast(0,39)) goto mode_stdbitmap::@3 -Simple Condition (bool~) mode_stdbitmap::$25 if((byte) mode_stdbitmap::cy#1!=rangelast(0,24)) goto mode_stdbitmap::@2 -Simple Condition (bool~) mode_stdbitmap::$31 if((byte) mode_stdbitmap::l#1<(byte) mode_stdbitmap::lines_cnt#0) goto mode_stdbitmap::@4 -Simple Condition (bool~) mode_hicolstdchar::$23 if((byte) mode_hicolstdchar::i#1!=rangelast(0,15)) goto mode_hicolstdchar::@1 -Simple Condition (bool~) mode_hicolstdchar::$28 if((byte) mode_hicolstdchar::cx#1!=rangelast(0,39)) goto mode_hicolstdchar::@3 -Simple Condition (bool~) mode_hicolstdchar::$29 if((byte) mode_hicolstdchar::cy#1!=rangelast(0,24)) goto mode_hicolstdchar::@2 -Simple Condition (bool~) mode_hicolecmchar::$24 if((byte) mode_hicolecmchar::i#1!=rangelast(0,15)) goto mode_hicolecmchar::@1 -Simple Condition (bool~) mode_hicolecmchar::$29 if((byte) mode_hicolecmchar::cx#1!=rangelast(0,39)) goto mode_hicolecmchar::@3 -Simple Condition (bool~) mode_hicolecmchar::$30 if((byte) mode_hicolecmchar::cy#1!=rangelast(0,24)) goto mode_hicolecmchar::@2 -Simple Condition (bool~) mode_hicolmcchar::$24 if((byte) mode_hicolmcchar::i#1!=rangelast(0,15)) goto mode_hicolmcchar::@1 -Simple Condition (bool~) mode_hicolmcchar::$29 if((byte) mode_hicolmcchar::cx#1!=rangelast(0,39)) goto mode_hicolmcchar::@3 -Simple Condition (bool~) mode_hicolmcchar::$30 if((byte) mode_hicolmcchar::cy#1!=rangelast(0,24)) goto mode_hicolmcchar::@2 -Simple Condition (bool~) mode_twoplanebitmap::$14 if((byte) mode_twoplanebitmap::i#1!=rangelast(0,15)) goto mode_twoplanebitmap::@1 -Simple Condition (bool~) mode_twoplanebitmap::$19 if((byte) mode_twoplanebitmap::cx#1!=rangelast(0,39)) goto mode_twoplanebitmap::@3 -Simple Condition (bool~) mode_twoplanebitmap::$20 if((byte) mode_twoplanebitmap::cy#1!=rangelast(0,24)) goto mode_twoplanebitmap::@2 -Simple Condition (bool~) mode_twoplanebitmap::$22 if((byte~) mode_twoplanebitmap::$21==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_twoplanebitmap::@6 -Simple Condition (bool~) mode_twoplanebitmap::$23 if((byte) mode_twoplanebitmap::ax#1!=rangelast(0,39)) goto mode_twoplanebitmap::@5 -Simple Condition (bool~) mode_twoplanebitmap::$24 if((byte) mode_twoplanebitmap::ay#1!=rangelast(0,199)) goto mode_twoplanebitmap::@4 -Simple Condition (bool~) mode_twoplanebitmap::$25 if((byte) mode_twoplanebitmap::bx#1!=rangelast(0,39)) goto mode_twoplanebitmap::@9 -Simple Condition (bool~) mode_twoplanebitmap::$26 if((byte) mode_twoplanebitmap::by#1!=rangelast(0,199)) goto mode_twoplanebitmap::@8 -Simple Condition (bool~) mode_sixsfred::$15 if((byte) mode_sixsfred::i#1!=rangelast(0,15)) goto mode_sixsfred::@1 -Simple Condition (bool~) mode_sixsfred::$18 if((byte) mode_sixsfred::cx#1!=rangelast(0,39)) goto mode_sixsfred::@3 -Simple Condition (bool~) mode_sixsfred::$19 if((byte) mode_sixsfred::cy#1!=rangelast(0,24)) goto mode_sixsfred::@2 -Simple Condition (bool~) mode_sixsfred::$22 if((byte) mode_sixsfred::ax#1!=rangelast(0,39)) goto mode_sixsfred::@5 -Simple Condition (bool~) mode_sixsfred::$23 if((byte) mode_sixsfred::ay#1!=rangelast(0,199)) goto mode_sixsfred::@4 -Simple Condition (bool~) mode_sixsfred::$24 if((byte) mode_sixsfred::bx#1!=rangelast(0,39)) goto mode_sixsfred::@7 -Simple Condition (bool~) mode_sixsfred::$25 if((byte) mode_sixsfred::by#1!=rangelast(0,199)) goto mode_sixsfred::@6 -Simple Condition (bool~) mode_sixsfred2::$13 if((byte) mode_sixsfred2::i#1!=rangelast(0,15)) goto mode_sixsfred2::@1 -Simple Condition (bool~) mode_sixsfred2::$18 if((byte) mode_sixsfred2::cx#1!=rangelast(0,39)) goto mode_sixsfred2::@3 -Simple Condition (bool~) mode_sixsfred2::$19 if((byte) mode_sixsfred2::cy#1!=rangelast(0,24)) goto mode_sixsfred2::@2 -Simple Condition (bool~) mode_sixsfred2::$22 if((byte) mode_sixsfred2::ax#1!=rangelast(0,39)) goto mode_sixsfred2::@5 -Simple Condition (bool~) mode_sixsfred2::$23 if((byte) mode_sixsfred2::ay#1!=rangelast(0,199)) goto mode_sixsfred2::@4 -Simple Condition (bool~) mode_sixsfred2::$24 if((byte) mode_sixsfred2::bx#1!=rangelast(0,39)) goto mode_sixsfred2::@7 -Simple Condition (bool~) mode_sixsfred2::$25 if((byte) mode_sixsfred2::by#1!=rangelast(0,199)) goto mode_sixsfred2::@6 -Simple Condition (bool~) mode_8bpppixelcell::$12 if((byte) mode_8bpppixelcell::i#1!=rangelast(0,15)) goto mode_8bpppixelcell::@1 -Simple Condition (bool~) mode_8bpppixelcell::$17 if((byte) mode_8bpppixelcell::ax#1!=rangelast(0,39)) goto mode_8bpppixelcell::@3 -Simple Condition (bool~) mode_8bpppixelcell::$18 if((byte) mode_8bpppixelcell::ay#1!=rangelast(0,24)) goto mode_8bpppixelcell::@2 -Simple Condition (bool~) mode_8bpppixelcell::$21 if((byte~) mode_8bpppixelcell::$19==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_8bpppixelcell::@7 -Simple Condition (bool~) mode_8bpppixelcell::$23 if((byte) mode_8bpppixelcell::cp#1!=rangelast(0,7)) goto mode_8bpppixelcell::@6 -Simple Condition (bool~) mode_8bpppixelcell::$24 if((byte) mode_8bpppixelcell::cr#1!=rangelast(0,7)) goto mode_8bpppixelcell::@5 -Simple Condition (bool~) mode_8bpppixelcell::$25 if((byte) mode_8bpppixelcell::ch#1!=rangelast(0,255)) goto mode_8bpppixelcell::@4 -Simple Condition (bool~) mode_8bppchunkybmm::$16 if((byte) mode_8bppchunkybmm::i#1!=rangelast(0,15)) goto mode_8bppchunkybmm::@1 -Simple Condition (bool~) mode_8bppchunkybmm::$21 if((byte*) mode_8bppchunkybmm::gfxb#3!=(word/dword/signed dword) 32768) goto mode_8bppchunkybmm::@4 -Simple Condition (bool~) mode_8bppchunkybmm::$25 if((word) mode_8bppchunkybmm::x#1!=rangelast(0,319)) goto mode_8bppchunkybmm::@3 -Simple Condition (bool~) mode_8bppchunkybmm::$26 if((byte) mode_8bppchunkybmm::y#1!=rangelast(0,199)) goto mode_8bppchunkybmm::@2 +Simple Condition (bool~) print_str_lines::$0 [185] if(*((byte*) print_str_lines::str#2)!=(byte) '@') goto print_str_lines::@2 +Simple Condition (bool~) print_str_lines::$2 [192] if((byte) print_str_lines::ch#0==(byte) '@') goto print_str_lines::@5 +Simple Condition (bool~) print_str_lines::$3 [195] if((byte) print_str_lines::ch#0!=(byte) '@') goto print_str_lines::@4 +Simple Condition (bool~) print_ln::$1 [213] if((byte*) print_line_cursor#19<(byte*) print_char_cursor#32) goto print_ln::@1 +Simple Condition (bool~) print_cls::$1 [229] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) bitmap_init::$4 [367] if((byte) bitmap_init::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$5 [371] if((byte) bitmap_init::x#1!=rangelast(0,255)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$12 [386] if((byte~) bitmap_init::$10!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto bitmap_init::@4 +Simple Condition (bool~) bitmap_init::$15 [390] if((byte) bitmap_init::y#1!=rangelast(0,255)) goto bitmap_init::@3 +Simple Condition (bool~) bitmap_clear::$1 [406] if((byte) bitmap_clear::x#1!=rangelast(0,199)) goto bitmap_clear::@2 +Simple Condition (bool~) bitmap_clear::$2 [410] if((byte) bitmap_clear::y#1!=rangelast(0,39)) goto bitmap_clear::@1 +Simple Condition (bool~) bitmap_line::$0 [422] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 +Simple Condition (bool~) bitmap_line::$12 [427] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@9 +Simple Condition (bool~) bitmap_line::$2 [432] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@2 +Simple Condition (bool~) bitmap_line::$8 [437] if((byte) bitmap_line::yd#0<(byte) bitmap_line::xd#1) goto bitmap_line::@6 +Simple Condition (bool~) bitmap_line::$4 [442] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#1) goto bitmap_line::@3 +Simple Condition (bool~) bitmap_line::$18 [475] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#0) goto bitmap_line::@13 +Simple Condition (bool~) bitmap_line::$14 [480] if((byte) bitmap_line::yd#3<(byte) bitmap_line::xd#0) goto bitmap_line::@10 +Simple Condition (bool~) bitmap_line_xdyi::$4 [523] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 +Simple Condition (bool~) bitmap_line_xdyi::$7 [527] if((byte) bitmap_line_xdyi::x#2!=(byte/signed word/word/dword/signed dword~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 +Simple Condition (bool~) bitmap_line_xdyd::$4 [546] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 +Simple Condition (bool~) bitmap_line_xdyd::$7 [550] if((byte) bitmap_line_xdyd::x#2!=(byte/signed word/word/dword/signed dword~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 +Simple Condition (bool~) bitmap_line_ydxi::$4 [569] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 +Simple Condition (bool~) bitmap_line_ydxi::$7 [573] if((byte) bitmap_line_ydxi::y#2!=(byte/signed word/word/dword/signed dword~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 +Simple Condition (bool~) bitmap_line_ydxd::$4 [593] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 +Simple Condition (bool~) bitmap_line_ydxd::$7 [597] if((byte) bitmap_line_ydxd::y#3!=(byte/signed word/word/dword/signed dword~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 +Simple Condition (bool~) menu::$23 [685] if((byte) menu::i#1!=rangelast(0,15)) goto menu::@1 +Simple Condition (bool~) menu::$25 [693] if((byte*) menu::c#1!=(byte*~) menu::$24) goto menu::@2 +Simple Condition (bool~) menu::$31 [722] if((byte~) menu::$29==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@6 +Simple Condition (bool~) menu::$35 [731] if((byte~) menu::$33==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@7 +Simple Condition (bool~) menu::$39 [750] if((byte~) menu::$37==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@8 +Simple Condition (bool~) menu::$43 [763] if((byte~) menu::$41==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@9 +Simple Condition (bool~) menu::$47 [776] if((byte~) menu::$45==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@10 +Simple Condition (bool~) menu::$51 [789] if((byte~) menu::$49==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@11 +Simple Condition (bool~) menu::$55 [802] if((byte~) menu::$53==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@12 +Simple Condition (bool~) menu::$59 [815] if((byte~) menu::$57==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@13 +Simple Condition (bool~) menu::$63 [828] if((byte~) menu::$61==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@14 +Simple Condition (bool~) menu::$67 [841] if((byte~) menu::$65==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@15 +Simple Condition (bool~) menu::$71 [854] if((byte~) menu::$69==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@16 +Simple Condition (bool~) menu::$75 [867] if((byte~) menu::$73==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@17 +Simple Condition (bool~) mode_ctrl::$0 [885] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto mode_ctrl::@5 +Simple Condition (bool~) mode_ctrl::$3 [895] if((byte~) mode_ctrl::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_ctrl::@7 +Simple Condition (bool~) mode_ctrl::$6 [905] if((byte~) mode_ctrl::$4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_ctrl::@8 +Simple Condition (bool~) mode_ctrl::$10 [917] if((byte~) mode_ctrl::$8==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_ctrl::@9 +Simple Condition (bool~) mode_ctrl::$14 [929] if((byte~) mode_ctrl::$12==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_ctrl::@10 +Simple Condition (bool~) mode_ctrl::$18 [941] if((byte~) mode_ctrl::$16==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_ctrl::@11 +Simple Condition (bool~) mode_ctrl::$22 [953] if((byte~) mode_ctrl::$20==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_ctrl::@12 +Simple Condition (bool~) mode_ctrl::$26 [965] if((byte~) mode_ctrl::$24==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_ctrl::@13 +Simple Condition (bool~) mode_ctrl::$30 [977] if((byte~) mode_ctrl::$28==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_ctrl::@14 +Simple Condition (bool~) mode_ctrl::$32 [984] if((byte) mode_ctrl::ctrl#14==(byte) dtv_control#114) goto mode_ctrl::@15 +Simple Condition (bool~) mode_stdchar::$23 [1033] if((byte) mode_stdchar::i#1!=rangelast(0,15)) goto mode_stdchar::@1 +Simple Condition (bool~) mode_stdchar::$30 [1055] if((byte) mode_stdchar::cx#1!=rangelast(0,39)) goto mode_stdchar::@3 +Simple Condition (bool~) mode_stdchar::$31 [1059] if((byte) mode_stdchar::cy#1!=rangelast(0,24)) goto mode_stdchar::@2 +Simple Condition (bool~) mode_ecmchar::$24 [1109] if((byte) mode_ecmchar::i#1!=rangelast(0,15)) goto mode_ecmchar::@1 +Simple Condition (bool~) mode_ecmchar::$31 [1134] if((byte) mode_ecmchar::cx#1!=rangelast(0,39)) goto mode_ecmchar::@3 +Simple Condition (bool~) mode_ecmchar::$32 [1138] if((byte) mode_ecmchar::cy#1!=rangelast(0,24)) goto mode_ecmchar::@2 +Simple Condition (bool~) mode_mcchar::$24 [1188] if((byte) mode_mcchar::i#1!=rangelast(0,15)) goto mode_mcchar::@1 +Simple Condition (bool~) mode_mcchar::$31 [1212] if((byte) mode_mcchar::cx#1!=rangelast(0,39)) goto mode_mcchar::@3 +Simple Condition (bool~) mode_mcchar::$32 [1216] if((byte) mode_mcchar::cy#1!=rangelast(0,24)) goto mode_mcchar::@2 +Simple Condition (bool~) mode_stdbitmap::$18 [1257] if((byte) mode_stdbitmap::i#1!=rangelast(0,15)) goto mode_stdbitmap::@1 +Simple Condition (bool~) mode_stdbitmap::$24 [1277] if((byte) mode_stdbitmap::cx#1!=rangelast(0,39)) goto mode_stdbitmap::@3 +Simple Condition (bool~) mode_stdbitmap::$25 [1281] if((byte) mode_stdbitmap::cy#1!=rangelast(0,24)) goto mode_stdbitmap::@2 +Simple Condition (bool~) mode_stdbitmap::$31 [1303] if((byte) mode_stdbitmap::l#1<(byte) mode_stdbitmap::lines_cnt#0) goto mode_stdbitmap::@4 +Simple Condition (bool~) mode_hicolstdchar::$23 [1352] if((byte) mode_hicolstdchar::i#1!=rangelast(0,15)) goto mode_hicolstdchar::@1 +Simple Condition (bool~) mode_hicolstdchar::$28 [1373] if((byte) mode_hicolstdchar::cx#1!=rangelast(0,39)) goto mode_hicolstdchar::@3 +Simple Condition (bool~) mode_hicolstdchar::$29 [1377] if((byte) mode_hicolstdchar::cy#1!=rangelast(0,24)) goto mode_hicolstdchar::@2 +Simple Condition (bool~) mode_hicolecmchar::$24 [1427] if((byte) mode_hicolecmchar::i#1!=rangelast(0,15)) goto mode_hicolecmchar::@1 +Simple Condition (bool~) mode_hicolecmchar::$29 [1451] if((byte) mode_hicolecmchar::cx#1!=rangelast(0,39)) goto mode_hicolecmchar::@3 +Simple Condition (bool~) mode_hicolecmchar::$30 [1455] if((byte) mode_hicolecmchar::cy#1!=rangelast(0,24)) goto mode_hicolecmchar::@2 +Simple Condition (bool~) mode_hicolmcchar::$24 [1505] if((byte) mode_hicolmcchar::i#1!=rangelast(0,15)) goto mode_hicolmcchar::@1 +Simple Condition (bool~) mode_hicolmcchar::$29 [1528] if((byte) mode_hicolmcchar::cx#1!=rangelast(0,39)) goto mode_hicolmcchar::@3 +Simple Condition (bool~) mode_hicolmcchar::$30 [1532] if((byte) mode_hicolmcchar::cy#1!=rangelast(0,24)) goto mode_hicolmcchar::@2 +Simple Condition (bool~) mode_twoplanebitmap::$14 [1580] if((byte) mode_twoplanebitmap::i#1!=rangelast(0,15)) goto mode_twoplanebitmap::@1 +Simple Condition (bool~) mode_twoplanebitmap::$19 [1598] if((byte) mode_twoplanebitmap::cx#1!=rangelast(0,39)) goto mode_twoplanebitmap::@3 +Simple Condition (bool~) mode_twoplanebitmap::$20 [1602] if((byte) mode_twoplanebitmap::cy#1!=rangelast(0,24)) goto mode_twoplanebitmap::@2 +Simple Condition (bool~) mode_twoplanebitmap::$22 [1611] if((byte~) mode_twoplanebitmap::$21==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_twoplanebitmap::@6 +Simple Condition (bool~) mode_twoplanebitmap::$23 [1621] if((byte) mode_twoplanebitmap::ax#1!=rangelast(0,39)) goto mode_twoplanebitmap::@5 +Simple Condition (bool~) mode_twoplanebitmap::$24 [1625] if((byte) mode_twoplanebitmap::ay#1!=rangelast(0,199)) goto mode_twoplanebitmap::@4 +Simple Condition (bool~) mode_twoplanebitmap::$25 [1636] if((byte) mode_twoplanebitmap::bx#1!=rangelast(0,39)) goto mode_twoplanebitmap::@9 +Simple Condition (bool~) mode_twoplanebitmap::$26 [1640] if((byte) mode_twoplanebitmap::by#1!=rangelast(0,199)) goto mode_twoplanebitmap::@8 +Simple Condition (bool~) mode_sixsfred::$15 [1689] if((byte) mode_sixsfred::i#1!=rangelast(0,15)) goto mode_sixsfred::@1 +Simple Condition (bool~) mode_sixsfred::$18 [1703] if((byte) mode_sixsfred::cx#1!=rangelast(0,39)) goto mode_sixsfred::@3 +Simple Condition (bool~) mode_sixsfred::$19 [1707] if((byte) mode_sixsfred::cy#1!=rangelast(0,24)) goto mode_sixsfred::@2 +Simple Condition (bool~) mode_sixsfred::$22 [1722] if((byte) mode_sixsfred::ax#1!=rangelast(0,39)) goto mode_sixsfred::@5 +Simple Condition (bool~) mode_sixsfred::$23 [1726] if((byte) mode_sixsfred::ay#1!=rangelast(0,199)) goto mode_sixsfred::@4 +Simple Condition (bool~) mode_sixsfred::$24 [1737] if((byte) mode_sixsfred::bx#1!=rangelast(0,39)) goto mode_sixsfred::@7 +Simple Condition (bool~) mode_sixsfred::$25 [1741] if((byte) mode_sixsfred::by#1!=rangelast(0,199)) goto mode_sixsfred::@6 +Simple Condition (bool~) mode_sixsfred2::$13 [1788] if((byte) mode_sixsfred2::i#1!=rangelast(0,15)) goto mode_sixsfred2::@1 +Simple Condition (bool~) mode_sixsfred2::$18 [1804] if((byte) mode_sixsfred2::cx#1!=rangelast(0,39)) goto mode_sixsfred2::@3 +Simple Condition (bool~) mode_sixsfred2::$19 [1808] if((byte) mode_sixsfred2::cy#1!=rangelast(0,24)) goto mode_sixsfred2::@2 +Simple Condition (bool~) mode_sixsfred2::$22 [1823] if((byte) mode_sixsfred2::ax#1!=rangelast(0,39)) goto mode_sixsfred2::@5 +Simple Condition (bool~) mode_sixsfred2::$23 [1827] if((byte) mode_sixsfred2::ay#1!=rangelast(0,199)) goto mode_sixsfred2::@4 +Simple Condition (bool~) mode_sixsfred2::$24 [1838] if((byte) mode_sixsfred2::bx#1!=rangelast(0,39)) goto mode_sixsfred2::@7 +Simple Condition (bool~) mode_sixsfred2::$25 [1842] if((byte) mode_sixsfred2::by#1!=rangelast(0,199)) goto mode_sixsfred2::@6 +Simple Condition (bool~) mode_8bpppixelcell::$12 [1886] if((byte) mode_8bpppixelcell::i#1!=rangelast(0,15)) goto mode_8bpppixelcell::@1 +Simple Condition (bool~) mode_8bpppixelcell::$17 [1901] if((byte) mode_8bpppixelcell::ax#1!=rangelast(0,39)) goto mode_8bpppixelcell::@3 +Simple Condition (bool~) mode_8bpppixelcell::$18 [1905] if((byte) mode_8bpppixelcell::ay#1!=rangelast(0,24)) goto mode_8bpppixelcell::@2 +Simple Condition (bool~) mode_8bpppixelcell::$21 [1924] if((byte~) mode_8bpppixelcell::$19==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode_8bpppixelcell::@7 +Simple Condition (bool~) mode_8bpppixelcell::$23 [1933] if((byte) mode_8bpppixelcell::cp#1!=rangelast(0,7)) goto mode_8bpppixelcell::@6 +Simple Condition (bool~) mode_8bpppixelcell::$24 [1939] if((byte) mode_8bpppixelcell::cr#1!=rangelast(0,7)) goto mode_8bpppixelcell::@5 +Simple Condition (bool~) mode_8bpppixelcell::$25 [1943] if((byte) mode_8bpppixelcell::ch#1!=rangelast(0,255)) goto mode_8bpppixelcell::@4 +Simple Condition (bool~) mode_8bppchunkybmm::$16 [1985] if((byte) mode_8bppchunkybmm::i#1!=rangelast(0,15)) goto mode_8bppchunkybmm::@1 +Simple Condition (bool~) mode_8bppchunkybmm::$21 [2001] if((byte*) mode_8bppchunkybmm::gfxb#3!=(word/dword/signed dword) 32768) goto mode_8bppchunkybmm::@4 +Simple Condition (bool~) mode_8bppchunkybmm::$25 [2010] if((word) mode_8bppchunkybmm::x#1!=rangelast(0,319)) goto mode_8bppchunkybmm::@3 +Simple Condition (bool~) mode_8bppchunkybmm::$26 [2020] if((byte) mode_8bppchunkybmm::y#1!=rangelast(0,199)) goto mode_8bppchunkybmm::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -7950,17 +7950,17 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in assignment *(mode_stdbitmap::lines_x#0+1 + mode_stdbitmap::$28) Consolidated array index constant in assignment *(mode_stdbitmap::lines_y#0+1 + mode_stdbitmap::$29) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [207] if(true) goto main::@2 Removing PHI-reference to removed block (menu::@3) in block menu::@return -if() condition always true - replacing block destination if(true) goto menu::@4 -if() condition always true - replacing block destination if(true) goto mode_ctrl::@2 +if() condition always true - replacing block destination [232] if(true) goto menu::@4 +if() condition always true - replacing block destination [297] if(true) goto mode_ctrl::@2 Successful SSA optimization Pass2ConstantIfs Fixing inline constructor with bitmap_clear::$3 ← *(bitmap_plot_xhi#0 + 0) w= *(bitmap_plot_xlo#0 + 0) Fixing inline constructor with bitmap_plot::$2 ← *(bitmap_plot_xhi#0 + bitmap_plot::x#4) w= *(bitmap_plot_xlo#0 + bitmap_plot::x#4) Fixing inline constructor with bitmap_plot::$3 ← *(bitmap_plot_yhi#0 + bitmap_plot::y#4) w= *(bitmap_plot_ylo#0 + bitmap_plot::y#4) Successful SSA optimization Pass2FixInlineConstructors -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) mode_stdbitmap::$28 ← (byte) mode_stdbitmap::l#2 -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) mode_stdbitmap::$29 ← (byte) mode_stdbitmap::l#2 +Inferred type updated to byte in [483] (byte/signed word/word/dword/signed dword~) mode_stdbitmap::$28 ← (byte) mode_stdbitmap::l#2 +Inferred type updated to byte in [484] (byte/signed word/word/dword/signed dword~) mode_stdbitmap::$29 ← (byte) mode_stdbitmap::l#2 Successful SSA optimization PassNEliminateUnusedVars Successful SSA optimization PassNEliminateUnusedVars Eliminating Noop Cast (byte*) bitmap_clear::bitmap#0 ← ((byte*)) (word~) bitmap_clear::$3 diff --git a/src/test/ref/callconstparam.log b/src/test/ref/callconstparam.log index d852dbc40..3d77be29d 100644 --- a/src/test/ref/callconstparam.log +++ b/src/test/ref/callconstparam.log @@ -115,7 +115,7 @@ Redundant Phi (byte*) screen#2 (byte*) screen#11 Redundant Phi (byte) line::x1#2 (byte) line::x1#3 Redundant Phi (byte*) screen#12 (byte*) screen#2 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) line::$0 if((byte) line::x#1<(byte) line::x1#3) goto line::@1 +Simple Condition (bool~) line::$0 [22] if((byte) line::x#1<(byte) line::x1#3) goto line::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) screen#0 = ((byte*))1024 Constant (const byte) line::x0#0 = 1 diff --git a/src/test/ref/cast-deref.log b/src/test/ref/cast-deref.log index 51156397d..d7eb9e318 100644 --- a/src/test/ref/cast-deref.log +++ b/src/test/ref/cast-deref.log @@ -60,7 +60,7 @@ Self Phi Eliminated (byte*) main::SCREEN#1 Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) main::SCREEN#1 (byte*) main::SCREEN#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$5 if((byte) main::i#1!=rangelast(0,3)) goto main::@1 +Simple Condition (bool~) main::$5 [12] if((byte) main::i#1!=rangelast(0,3)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const signed byte/signed word/signed dword) main::$0 = -1 Constant (const signed byte/signed word/signed dword) main::$1 = -2 diff --git a/src/test/ref/cast-precedence-problem.log b/src/test/ref/cast-precedence-problem.log index 5ab835517..c3e1c4638 100644 --- a/src/test/ref/cast-precedence-problem.log +++ b/src/test/ref/cast-precedence-problem.log @@ -84,7 +84,7 @@ Alias (byte) main::sumb#0 = (byte~) main::$4 Alias (byte) main::midb#0 = (byte/signed word/word/dword/signed dword~) main::$6 Alias (byte*) main::BGCOL#0 = (byte*) main::BGCOL#1 (byte*) main::BGCOL#2 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$7 if(*((byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 0)==*((byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 1)) goto main::@1 +Simple Condition (bool~) main::$7 [18] if(*((byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 0)==*((byte*) main::SCREEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 1)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::SCREEN#0 = ((byte*))1024 Constant (const byte) main::min#0 = 10 diff --git a/src/test/ref/casting.log b/src/test/ref/casting.log index 5386a35fc..33303ab9d 100644 --- a/src/test/ref/casting.log +++ b/src/test/ref/casting.log @@ -194,8 +194,8 @@ Redundant Phi (byte*) SCREEN4#2 (byte*) SCREEN4#3 Redundant Phi (byte*) SCREEN3#1 (byte*) SCREEN3#2 Redundant Phi (byte*) SCREEN4#1 (byte*) SCREEN4#2 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$4 if((byte) main::b#1!=rangelast(0,100)) goto main::@1 -Simple Condition (bool~) w::$4 if((byte) w::i#1!=rangelast(0,10)) goto w::@1 +Simple Condition (bool~) main::$4 [23] if((byte) main::b#1!=rangelast(0,100)) goto main::@1 +Simple Condition (bool~) w::$4 [42] if((byte) w::i#1!=rangelast(0,10)) goto w::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte/signed byte/word/signed word/dword/signed dword) $0 = 40*3 diff --git a/src/test/ref/chargen.log b/src/test/ref/chargen.log index 594ce4ab3..47ab70232 100644 --- a/src/test/ref/chargen.log +++ b/src/test/ref/chargen.log @@ -173,7 +173,7 @@ SYMBOL TABLE SSA Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) main::$3 ← (byte~) main::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) main::$2 ← (byte~) main::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [17] (bool~) main::$3 ← (byte~) main::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [16] (bool~) main::$2 ← (byte~) main::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) main::CHAR_A#0 = (byte*~) main::$0 Alias (byte) main::bits#1 = (byte~) main::$4 @@ -210,9 +210,9 @@ Redundant Phi (byte) main::y#3 (byte) main::y#2 Redundant Phi (byte*) main::CHAR_A#2 (byte*) main::CHAR_A#1 Redundant Phi (byte*) PROCPORT#2 (byte*) PROCPORT#8 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$3 if((byte~) main::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@3 -Simple Condition (bool~) main::$5 if((byte) main::x#1!=rangelast(0,7)) goto main::@2 -Simple Condition (bool~) main::$7 if((byte) main::y#1!=rangelast(0,7)) goto main::@1 +Simple Condition (bool~) main::$3 [18] if((byte~) main::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@3 +Simple Condition (bool~) main::$5 [26] if((byte) main::x#1!=rangelast(0,7)) goto main::@2 +Simple Condition (bool~) main::$7 [34] if((byte) main::y#1!=rangelast(0,7)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT#0 = ((byte*))1 Constant (const byte*) CHARGEN#0 = ((byte*))53248 diff --git a/src/test/ref/chessboard.log b/src/test/ref/chessboard.log index f9e10ee4c..9769c5144 100644 --- a/src/test/ref/chessboard.log +++ b/src/test/ref/chessboard.log @@ -118,8 +118,8 @@ Redundant Phi (byte*) main::screen#2 (byte*) main::screen#4 Redundant Phi (byte*) main::colors#2 (byte*) main::colors#4 Redundant Phi (byte) main::row#2 (byte) main::row#4 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if((byte) main::column#1!=rangelast(0,7)) goto main::@2 -Simple Condition (bool~) main::$5 if((byte) main::row#1!=rangelast(0,7)) goto main::@1 +Simple Condition (bool~) main::$1 [13] if((byte) main::column#1!=rangelast(0,7)) goto main::@2 +Simple Condition (bool~) main::$5 [23] if((byte) main::row#1!=rangelast(0,7)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::screen#0 = ((byte*))1024 Constant (const byte*) main::colors#0 = ((byte*))55296 diff --git a/src/test/ref/clobber-a-problem.log b/src/test/ref/clobber-a-problem.log index 2871ac171..26a26bdfe 100644 --- a/src/test/ref/clobber-a-problem.log +++ b/src/test/ref/clobber-a-problem.log @@ -131,7 +131,7 @@ interrupt(HARDWARE_CLOBBER)(void()) irq() Culled Empty Block (label) @3 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) irq::$2 ← (byte~) irq::$0 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) irq::$1 ← (byte~) irq::$0 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [16] (bool~) irq::$2 ← (byte~) irq::$0 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [15] (bool~) irq::$1 ← (byte~) irq::$0 == (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) DARK_GREY#0 = (byte) DARK_GREY#3 (byte) DARK_GREY#2 Alias (byte*) BORDERCOL#0 = (byte*) BORDERCOL#5 (byte*) BORDERCOL#3 @@ -156,7 +156,7 @@ Redundant Phi (byte) irq_raster_next#3 (byte) irq_raster_next#0 Redundant Phi (byte*) RASTER#1 (byte*) RASTER#0 Redundant Phi (byte) BLACK#1 (byte) BLACK#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) irq::$2 if((byte~) irq::$0!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto irq::@1 +Simple Condition (bool~) irq::$2 [17] if((byte~) irq::$0!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto irq::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) BORDERCOL#0 = ((byte*))53280 Constant (const byte*) RASTER#0 = ((byte*))53266 diff --git a/src/test/ref/complex/tetris/test-sprites.log b/src/test/ref/complex/tetris/test-sprites.log index 9d30e83ff..81fc8286c 100644 --- a/src/test/ref/complex/tetris/test-sprites.log +++ b/src/test/ref/complex/tetris/test-sprites.log @@ -1337,14 +1337,14 @@ Redundant Phi (byte) irq_raster_next#10 (byte) irq_raster_next#17 Redundant Phi (byte) irq_sprite_ptr#14 (byte) irq_sprite_ptr#17 Redundant Phi (byte) sin_idx#11 (byte) sin_idx#1 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) sprites_init::$4 if((byte) sprites_init::s#1!=rangelast(0,3)) goto sprites_init::@1 -Simple Condition (bool~) sprites_irq::$1 if(*((byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@1 -Simple Condition (bool~) sprites_irq::$2 if((byte) render_screen_showing#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sprites_irq::@2 -Simple Condition (bool~) sprites_irq::$3 if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 9) goto sprites_irq::@4 -Simple Condition (bool~) sprites_irq::$4 if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto sprites_irq::@5 -Simple Condition (bool~) main::$6 if((byte) main::s#1!=rangelast(4,7)) goto main::@1 -Simple Condition (bool~) loop::$0 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto loop::@4 -Simple Condition (bool~) loop::$2 if((byte) loop::s#1!=rangelast(4,7)) goto loop::@5 +Simple Condition (bool~) sprites_init::$4 [119] if((byte) sprites_init::s#1!=rangelast(0,3)) goto sprites_init::@1 +Simple Condition (bool~) sprites_irq::$1 [165] if(*((byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@1 +Simple Condition (bool~) sprites_irq::$2 [169] if((byte) render_screen_showing#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sprites_irq::@2 +Simple Condition (bool~) sprites_irq::$3 [187] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 9) goto sprites_irq::@4 +Simple Condition (bool~) sprites_irq::$4 [204] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto sprites_irq::@5 +Simple Condition (bool~) main::$6 [292] if((byte) main::s#1!=rangelast(4,7)) goto main::@1 +Simple Condition (bool~) loop::$0 [308] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto loop::@4 +Simple Condition (bool~) loop::$2 [318] if((byte) loop::s#1!=rangelast(4,7)) goto loop::@5 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -1511,7 +1511,7 @@ Consolidated array index constant in *(PLAYFIELD_SPRITE_PTRS_2#0+1) Consolidated array index constant in *(PLAYFIELD_SPRITE_PTRS_2#0+2) Consolidated array index constant in *(PLAYFIELD_SPRITE_PTRS_2#0+3) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto loop::@2 +if() condition always true - replacing block destination [92] if(true) goto loop::@2 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Removing unused block loop::@return diff --git a/src/test/ref/complex/tetris/tetris.asm b/src/test/ref/complex/tetris/tetris.asm index e4c729755..baa1caafd 100644 --- a/src/test/ref/complex/tetris/tetris.asm +++ b/src/test/ref/complex/tetris/tetris.asm @@ -66,7 +66,7 @@ .const PLAYFIELD_LINES = $16 .const PLAYFIELD_COLS = $a .const SPRITES_FIRST_YPOS = $31 - .const current_movedown_fast = 2 + .const current_movedown_fast = $a .const COLLISION_NONE = 0 .const COLLISION_PLAYFIELD = 1 .const COLLISION_BOTTOM = 2 diff --git a/src/test/ref/complex/tetris/tetris.log b/src/test/ref/complex/tetris/tetris.log index 3c6f358d0..19199e76d 100644 --- a/src/test/ref/complex/tetris/tetris.log +++ b/src/test/ref/complex/tetris/tetris.log @@ -1474,7 +1474,7 @@ sprites_irq::@return: scope:[sprites_irq] from sprites_irq::@7 (byte) current_orientation#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 (byte[]) MOVEDOWN_SLOW_SPEEDS#0 ← { (byte/signed byte/word/signed word/dword/signed dword) 48, (byte/signed byte/word/signed word/dword/signed dword) 43, (byte/signed byte/word/signed word/dword/signed dword) 38, (byte/signed byte/word/signed word/dword/signed dword) 33, (byte/signed byte/word/signed word/dword/signed dword) 28, (byte/signed byte/word/signed word/dword/signed dword) 23, (byte/signed byte/word/signed word/dword/signed dword) 18, (byte/signed byte/word/signed word/dword/signed dword) 13, (byte/signed byte/word/signed word/dword/signed dword) 8, (byte/signed byte/word/signed word/dword/signed dword) 6, (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 4, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 3, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 2, (byte/signed byte/word/signed word/dword/signed dword) 1 } (byte) current_movedown_slow#0 ← (byte/signed byte/word/signed word/dword/signed dword) 48 - (byte) current_movedown_fast#0 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) current_movedown_fast#0 ← (byte/signed byte/word/signed word/dword/signed dword) 10 (byte) current_movedown_counter#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 (dword[]) SCORE_BASE_BCD#0 ← { (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 64, (word/signed word/dword/signed dword) 256, (word/signed word/dword/signed dword) 768, (word/signed word/dword/signed dword) 4608 } (dword[5]) score_add_bcd#0 ← { fill( 5, 0) } @@ -7012,38 +7012,38 @@ interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() Culled Empty Block (label) render_score::@10 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) keyboard_event_scan::$6 ← (byte~) keyboard_event_scan::$4 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) keyboard_event_scan::$5 ← (byte~) keyboard_event_scan::$4 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) keyboard_event_scan::$8 ← (byte) keyboard_events_size#10 == (byte/signed byte/word/signed word/dword/signed dword) 8 from (bool~) keyboard_event_scan::$7 ← (byte) keyboard_events_size#10 != (byte/signed byte/word/signed word/dword/signed dword) 8 -Inversing boolean not (bool~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$14 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) keyboard_event_scan::$15 ← (byte~) keyboard_event_scan::$14 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) keyboard_event_scan::$20 ← (byte~) keyboard_event_scan::$18 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) keyboard_event_scan::$19 ← (byte~) keyboard_event_scan::$18 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) keyboard_event_scan::$24 ← (byte~) keyboard_event_scan::$22 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) keyboard_event_scan::$23 ← (byte~) keyboard_event_scan::$22 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) keyboard_event_scan::$28 ← (byte~) keyboard_event_scan::$26 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) keyboard_event_scan::$27 ← (byte~) keyboard_event_scan::$26 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) render_bcd::$2 ← (byte) render_bcd::only_low#6 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) render_bcd::$1 ← (byte) render_bcd::only_low#6 == (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) render_moving::$7 ← (byte) render_moving::current_cell#0 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) render_moving::$6 ← (byte) render_moving::current_cell#0 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) render_moving::$9 ← (byte) render_moving::xpos#3 >= (byte) PLAYFIELD_COLS#0 from (bool~) render_moving::$8 ← (byte) render_moving::xpos#3 < (byte) PLAYFIELD_COLS#0 -Inversing boolean not (bool~) play_movement::$2 ← (byte) game_over#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) play_movement::$1 ← (byte) game_over#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) play_move_down::$1 ← (byte) play_move_down::key_event#1 != (byte) KEY_SPACE#0 from (bool~) play_move_down::$0 ← (byte) play_move_down::key_event#1 == (byte) KEY_SPACE#0 -Inversing boolean not (bool~) play_move_down::$4 ← (byte~) play_move_down::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) play_move_down::$3 ← (byte~) play_move_down::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) play_move_down::$8 ← (byte) current_movedown_counter#12 < (byte) current_movedown_slow#19 from (bool~) play_move_down::$7 ← (byte) current_movedown_counter#12 >= (byte) current_movedown_slow#19 -Inversing boolean not (bool~) play_move_down::$6 ← (byte) current_movedown_counter#13 < (byte) current_movedown_fast#0 from (bool~) play_move_down::$5 ← (byte) current_movedown_counter#13 >= (byte) current_movedown_fast#0 -Inversing boolean not (bool~) play_move_down::$10 ← (byte) play_move_down::movedown#6 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) play_move_down::$9 ← (byte) play_move_down::movedown#6 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) play_move_leftright::$10 ← (byte~) play_move_leftright::$8 != (byte) COLLISION_NONE#0 from (bool~) play_move_leftright::$9 ← (byte~) play_move_leftright::$8 == (byte) COLLISION_NONE#0 -Inversing boolean not (bool~) play_move_leftright::$2 ← (byte) play_move_leftright::key_event#2 != (byte) KEY_DOT#0 from (bool~) play_move_leftright::$1 ← (byte) play_move_leftright::key_event#2 == (byte) KEY_DOT#0 -Inversing boolean not (bool~) play_move_leftright::$6 ← (byte~) play_move_leftright::$4 != (byte) COLLISION_NONE#0 from (bool~) play_move_leftright::$5 ← (byte~) play_move_leftright::$4 == (byte) COLLISION_NONE#0 -Inversing boolean not (bool~) play_move_rotate::$8 ← (byte~) play_move_rotate::$6 != (byte) COLLISION_NONE#0 from (bool~) play_move_rotate::$7 ← (byte~) play_move_rotate::$6 == (byte) COLLISION_NONE#0 -Inversing boolean not (bool~) play_collision::$3 ← *((byte*) play_collision::piece_gfx#1 + (byte) play_collision::i#2) == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) play_collision::$2 ← *((byte*) play_collision::piece_gfx#1 + (byte) play_collision::i#2) != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) play_collision::$6 ← (byte) play_collision::ypos2#3 < (byte/signed word/word/dword/signed dword~) play_collision::$4 from (bool~) play_collision::$5 ← (byte) play_collision::ypos2#3 >= (byte/signed word/word/dword/signed dword~) play_collision::$4 -Inversing boolean not (bool~) play_collision::$9 ← (byte~) play_collision::$7 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) play_collision::$8 ← (byte~) play_collision::$7 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) play_collision::$11 ← (byte) play_collision::col#4 < (byte) PLAYFIELD_COLS#0 from (bool~) play_collision::$10 ← (byte) play_collision::col#4 >= (byte) PLAYFIELD_COLS#0 -Inversing boolean not (bool~) play_collision::$13 ← *((byte*) play_collision::playfield_line#1 + (byte) play_collision::col#5) == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) play_collision::$12 ← *((byte*) play_collision::playfield_line#1 + (byte) play_collision::col#5) != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) play_lock_current::$2 ← *((byte*) current_piece_gfx#20 + (byte) play_lock_current::i#2) == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) play_lock_current::$1 ← *((byte*) current_piece_gfx#20 + (byte) play_lock_current::i#2) != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) play_spawn_current::$7 ← (byte~) play_spawn_current::$5 != (byte) COLLISION_PLAYFIELD#0 from (bool~) play_spawn_current::$6 ← (byte~) play_spawn_current::$5 == (byte) COLLISION_PLAYFIELD#0 -Inversing boolean not (bool~) play_remove_lines::$7 ← (byte) play_remove_lines::c#0 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) play_remove_lines::$6 ← (byte) play_remove_lines::c#0 == (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) play_remove_lines::$10 ← (byte) play_remove_lines::full#2 != (byte/signed byte/word/signed word/dword/signed dword) 1 from (bool~) play_remove_lines::$9 ← (byte) play_remove_lines::full#2 == (byte/signed byte/word/signed word/dword/signed dword) 1 -Inversing boolean not (bool~) play_update_score::$1 ← (byte) play_update_score::removed#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) play_update_score::$0 ← (byte) play_update_score::removed#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) play_update_score::$8 ← (byte) play_update_score::lines_before#0 == (byte) play_update_score::lines_after#0 from (bool~) play_update_score::$7 ← (byte) play_update_score::lines_before#0 != (byte) play_update_score::lines_after#0 -Inversing boolean not (bool~) play_increase_level::$3 ← (byte~) play_increase_level::$1 != (byte/signed byte/word/signed word/dword/signed dword) 10 from (bool~) play_increase_level::$2 ← (byte~) play_increase_level::$1 == (byte/signed byte/word/signed word/dword/signed dword) 10 -Inversing boolean not (bool~) main::$15 ← (byte) main::render#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) main::$14 ← (byte) main::render#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [192] (bool~) keyboard_event_scan::$6 ← (byte~) keyboard_event_scan::$4 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [191] (bool~) keyboard_event_scan::$5 ← (byte~) keyboard_event_scan::$4 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [201] (bool~) keyboard_event_scan::$8 ← (byte) keyboard_events_size#10 == (byte/signed byte/word/signed word/dword/signed dword) 8 from [200] (bool~) keyboard_event_scan::$7 ← (byte) keyboard_events_size#10 != (byte/signed byte/word/signed word/dword/signed dword) 8 +Inversing boolean not [226] (bool~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$14 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [225] (bool~) keyboard_event_scan::$15 ← (byte~) keyboard_event_scan::$14 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [235] (bool~) keyboard_event_scan::$20 ← (byte~) keyboard_event_scan::$18 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [234] (bool~) keyboard_event_scan::$19 ← (byte~) keyboard_event_scan::$18 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [247] (bool~) keyboard_event_scan::$24 ← (byte~) keyboard_event_scan::$22 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [246] (bool~) keyboard_event_scan::$23 ← (byte~) keyboard_event_scan::$22 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [259] (bool~) keyboard_event_scan::$28 ← (byte~) keyboard_event_scan::$26 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [258] (bool~) keyboard_event_scan::$27 ← (byte~) keyboard_event_scan::$26 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [518] (bool~) render_bcd::$2 ← (byte) render_bcd::only_low#6 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [517] (bool~) render_bcd::$1 ← (byte) render_bcd::only_low#6 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [624] (bool~) render_moving::$7 ← (byte) render_moving::current_cell#0 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [623] (bool~) render_moving::$6 ← (byte) render_moving::current_cell#0 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [633] (bool~) render_moving::$9 ← (byte) render_moving::xpos#3 >= (byte) PLAYFIELD_COLS#0 from [632] (bool~) render_moving::$8 ← (byte) render_moving::xpos#3 < (byte) PLAYFIELD_COLS#0 +Inversing boolean not [857] (bool~) play_movement::$2 ← (byte) game_over#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [856] (bool~) play_movement::$1 ← (byte) game_over#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [898] (bool~) play_move_down::$1 ← (byte) play_move_down::key_event#1 != (byte) KEY_SPACE#0 from [897] (bool~) play_move_down::$0 ← (byte) play_move_down::key_event#1 == (byte) KEY_SPACE#0 +Inversing boolean not [907] (bool~) play_move_down::$4 ← (byte~) play_move_down::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [906] (bool~) play_move_down::$3 ← (byte~) play_move_down::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [913] (bool~) play_move_down::$8 ← (byte) current_movedown_counter#12 < (byte) current_movedown_slow#19 from [912] (bool~) play_move_down::$7 ← (byte) current_movedown_counter#12 >= (byte) current_movedown_slow#19 +Inversing boolean not [917] (bool~) play_move_down::$6 ← (byte) current_movedown_counter#13 < (byte) current_movedown_fast#0 from [916] (bool~) play_move_down::$5 ← (byte) current_movedown_counter#13 >= (byte) current_movedown_fast#0 +Inversing boolean not [924] (bool~) play_move_down::$10 ← (byte) play_move_down::movedown#6 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [923] (bool~) play_move_down::$9 ← (byte) play_move_down::movedown#6 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1000] (bool~) play_move_leftright::$10 ← (byte~) play_move_leftright::$8 != (byte) COLLISION_NONE#0 from [999] (bool~) play_move_leftright::$9 ← (byte~) play_move_leftright::$8 == (byte) COLLISION_NONE#0 +Inversing boolean not [1004] (bool~) play_move_leftright::$2 ← (byte) play_move_leftright::key_event#2 != (byte) KEY_DOT#0 from [1003] (bool~) play_move_leftright::$1 ← (byte) play_move_leftright::key_event#2 == (byte) KEY_DOT#0 +Inversing boolean not [1017] (bool~) play_move_leftright::$6 ← (byte~) play_move_leftright::$4 != (byte) COLLISION_NONE#0 from [1016] (bool~) play_move_leftright::$5 ← (byte~) play_move_leftright::$4 == (byte) COLLISION_NONE#0 +Inversing boolean not [1064] (bool~) play_move_rotate::$8 ← (byte~) play_move_rotate::$6 != (byte) COLLISION_NONE#0 from [1063] (bool~) play_move_rotate::$7 ← (byte~) play_move_rotate::$6 == (byte) COLLISION_NONE#0 +Inversing boolean not [1092] (bool~) play_collision::$3 ← *((byte*) play_collision::piece_gfx#1 + (byte) play_collision::i#2) == (byte/signed byte/word/signed word/dword/signed dword) 0 from [1091] (bool~) play_collision::$2 ← *((byte*) play_collision::piece_gfx#1 + (byte) play_collision::i#2) != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1103] (bool~) play_collision::$6 ← (byte) play_collision::ypos2#3 < (byte/signed word/word/dword/signed dword~) play_collision::$4 from [1102] (bool~) play_collision::$5 ← (byte) play_collision::ypos2#3 >= (byte/signed word/word/dword/signed dword~) play_collision::$4 +Inversing boolean not [1108] (bool~) play_collision::$9 ← (byte~) play_collision::$7 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [1107] (bool~) play_collision::$8 ← (byte~) play_collision::$7 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1116] (bool~) play_collision::$11 ← (byte) play_collision::col#4 < (byte) PLAYFIELD_COLS#0 from [1115] (bool~) play_collision::$10 ← (byte) play_collision::col#4 >= (byte) PLAYFIELD_COLS#0 +Inversing boolean not [1121] (bool~) play_collision::$13 ← *((byte*) play_collision::playfield_line#1 + (byte) play_collision::col#5) == (byte/signed byte/word/signed word/dword/signed dword) 0 from [1120] (bool~) play_collision::$12 ← *((byte*) play_collision::playfield_line#1 + (byte) play_collision::col#5) != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1143] (bool~) play_lock_current::$2 ← *((byte*) current_piece_gfx#20 + (byte) play_lock_current::i#2) == (byte/signed byte/word/signed word/dword/signed dword) 0 from [1142] (bool~) play_lock_current::$1 ← *((byte*) current_piece_gfx#20 + (byte) play_lock_current::i#2) != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1188] (bool~) play_spawn_current::$7 ← (byte~) play_spawn_current::$5 != (byte) COLLISION_PLAYFIELD#0 from [1187] (bool~) play_spawn_current::$6 ← (byte~) play_spawn_current::$5 == (byte) COLLISION_PLAYFIELD#0 +Inversing boolean not [1219] (bool~) play_remove_lines::$7 ← (byte) play_remove_lines::c#0 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [1218] (bool~) play_remove_lines::$6 ← (byte) play_remove_lines::c#0 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1231] (bool~) play_remove_lines::$10 ← (byte) play_remove_lines::full#2 != (byte/signed byte/word/signed word/dword/signed dword) 1 from [1230] (bool~) play_remove_lines::$9 ← (byte) play_remove_lines::full#2 == (byte/signed byte/word/signed word/dword/signed dword) 1 +Inversing boolean not [1254] (bool~) play_update_score::$1 ← (byte) play_update_score::removed#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [1253] (bool~) play_update_score::$0 ← (byte) play_update_score::removed#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [1271] (bool~) play_update_score::$8 ← (byte) play_update_score::lines_before#0 == (byte) play_update_score::lines_after#0 from [1270] (bool~) play_update_score::$7 ← (byte) play_update_score::lines_before#0 != (byte) play_update_score::lines_after#0 +Inversing boolean not [1299] (bool~) play_increase_level::$3 ← (byte~) play_increase_level::$1 != (byte/signed byte/word/signed word/dword/signed dword) 10 from [1298] (bool~) play_increase_level::$2 ← (byte~) play_increase_level::$1 == (byte/signed byte/word/signed word/dword/signed dword) 10 +Inversing boolean not [1398] (bool~) main::$15 ← (byte) main::render#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [1397] (bool~) main::$14 ← (byte) main::render#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias candidate removed (volatile)(byte) render_screen_showing#1 = (byte) render_screen_show#11 (byte) render_screen_showing#6 (byte) render_screen_showing#2 Alias candidate removed (volatile)(byte) IRQ_RASTER_FIRST#0 = (byte/signed word/word/dword/signed dword~) $4 (byte) irq_raster_next#0 (byte) irq_raster_next#24 (byte) irq_raster_next#23 (byte) irq_raster_next#22 (byte) irq_raster_next#20 (byte) irq_raster_next#17 (byte) irq_raster_next#10 @@ -8055,79 +8055,79 @@ Redundant Phi (byte) render_screen_showing#16 (byte) render_screen_showing#2 Redundant Phi (byte) keyboard_events_size#32 (byte) keyboard_events_size#16 Redundant Phi (byte) keyboard_modifiers#29 (byte) keyboard_modifiers#14 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) keyboard_event_scan::$1 if((byte) keyboard_event_scan::row_scan#0!=*((byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@2 -Simple Condition (bool~) keyboard_event_scan::$13 if((byte) keyboard_event_scan::row#1!=rangelast(0,7)) goto keyboard_event_scan::@1 -Simple Condition (bool~) keyboard_event_scan::$6 if((byte~) keyboard_event_scan::$4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@5 -Simple Condition (bool~) keyboard_event_scan::$12 if((byte) keyboard_event_scan::col#1!=rangelast(0,7)) goto keyboard_event_scan::@4 -Simple Condition (bool~) keyboard_event_scan::$8 if((byte) keyboard_events_size#10==(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@6 -Simple Condition (bool~) keyboard_event_scan::$10 if((byte) keyboard_event_scan::event_type#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@7 -Simple Condition (bool~) keyboard_event_scan::$16 if((byte~) keyboard_event_scan::$14==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@9 -Simple Condition (bool~) keyboard_event_scan::$20 if((byte~) keyboard_event_scan::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@10 -Simple Condition (bool~) keyboard_event_scan::$24 if((byte~) keyboard_event_scan::$22==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@11 -Simple Condition (bool~) keyboard_event_scan::$28 if((byte~) keyboard_event_scan::$26==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@12 -Simple Condition (bool~) keyboard_event_get::$0 if((byte) keyboard_events_size#13==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_get::@1 -Simple Condition (bool~) render_init::$15 if((byte) render_init::i#1!=rangelast(0,render_init::$12)) goto render_init::@1 -Simple Condition (bool~) render_show::$0 if((byte) render_screen_show#16==(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_show::@1 -Simple Condition (bool~) render_score::$0 if((byte) render_screen_render#17==(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_score::@1 -Simple Condition (bool~) render_bcd::$2 if((byte) render_bcd::only_low#6!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_bcd::@1 -Simple Condition (bool~) render_screen_original::$4 if((byte) render_screen_original::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto render_screen_original::@2 -Simple Condition (bool~) render_screen_original::$5 if((byte) render_screen_original::x#2!=(byte/signed byte/word/signed word/dword/signed dword) 36) goto render_screen_original::@3 -Simple Condition (bool~) render_screen_original::$6 if((byte) render_screen_original::x#3!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto render_screen_original::@4 -Simple Condition (bool~) render_screen_original::$7 if((byte) render_screen_original::y#1!=rangelast(0,24)) goto render_screen_original::@1 -Simple Condition (bool~) render_playfield::$5 if((byte) render_playfield::c#1!=rangelast(0,render_playfield::$4)) goto render_playfield::@2 -Simple Condition (bool~) render_playfield::$6 if((byte) render_playfield::l#1!=rangelast(2,render_playfield::$1)) goto render_playfield::@1 -Simple Condition (bool~) render_moving::$11 if((byte) render_moving::l#1!=rangelast(0,3)) goto render_moving::@1 -Simple Condition (bool~) render_moving::$7 if((byte) render_moving::current_cell#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_moving::@5 -Simple Condition (bool~) render_moving::$10 if((byte) render_moving::c#1!=rangelast(0,3)) goto render_moving::@4 -Simple Condition (bool~) render_moving::$9 if((byte) render_moving::xpos#2>=(byte) PLAYFIELD_COLS#0) goto render_moving::@6 -Simple Condition (bool~) sprites_init::$4 if((byte) sprites_init::s#1!=rangelast(0,3)) goto sprites_init::@1 -Simple Condition (bool~) sprites_irq::$1 if(*((byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@1 -Simple Condition (bool~) sprites_irq::$2 if((byte) render_screen_showing#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sprites_irq::@2 -Simple Condition (bool~) sprites_irq::$3 if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 9) goto sprites_irq::@4 -Simple Condition (bool~) sprites_irq::$4 if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto sprites_irq::@5 -Simple Condition (bool~) play_init::$2 if((byte) play_init::j#1!=rangelast(0,play_init::$0)) goto play_init::@1 -Simple Condition (bool~) play_init::$5 if((byte) play_init::b#1!=rangelast(0,4)) goto play_init::@2 -Simple Condition (bool~) play_movement::$2 if((byte) game_over#14==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_movement::@1 -Simple Condition (bool~) play_move_down::$1 if((byte) play_move_down::key_event#0!=(byte) KEY_SPACE#0) goto play_move_down::@1 -Simple Condition (bool~) play_move_down::$4 if((byte~) play_move_down::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_move_down::@2 -Simple Condition (bool~) play_move_down::$8 if((byte) current_movedown_counter#12<(byte) current_movedown_slow#14) goto play_move_down::@4 -Simple Condition (bool~) play_move_down::$6 if((byte) current_movedown_counter#12<(byte) current_movedown_fast#0) goto play_move_down::@3 -Simple Condition (bool~) play_move_down::$10 if((byte) play_move_down::movedown#6==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_move_down::@5 -Simple Condition (bool~) play_move_down::$13 if((byte~) play_move_down::$12==(byte) COLLISION_NONE#0) goto play_move_down::@6 -Simple Condition (bool~) play_move_leftright::$0 if((byte) play_move_leftright::key_event#0==(byte) KEY_COMMA#0) goto play_move_leftright::@1 -Simple Condition (bool~) play_move_leftright::$10 if((byte~) play_move_leftright::$8!=(byte) COLLISION_NONE#0) goto play_move_leftright::@5 -Simple Condition (bool~) play_move_leftright::$2 if((byte) play_move_leftright::key_event#0!=(byte) KEY_DOT#0) goto play_move_leftright::@2 -Simple Condition (bool~) play_move_leftright::$6 if((byte~) play_move_leftright::$4!=(byte) COLLISION_NONE#0) goto play_move_leftright::@3 -Simple Condition (bool~) play_move_rotate::$0 if((byte) play_move_rotate::key_event#0==(byte) KEY_Z#0) goto play_move_rotate::@1 -Simple Condition (bool~) play_move_rotate::$1 if((byte) play_move_rotate::key_event#0==(byte) KEY_X#0) goto play_move_rotate::@2 -Simple Condition (bool~) play_move_rotate::$8 if((byte~) play_move_rotate::$6!=(byte) COLLISION_NONE#0) goto play_move_rotate::@5 -Simple Condition (bool~) play_collision::$3 if(*((byte*) play_collision::piece_gfx#2 + (byte) play_collision::i#2)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_collision::@3 -Simple Condition (bool~) play_collision::$14 if((byte) play_collision::c#1!=rangelast(0,3)) goto play_collision::@2 -Simple Condition (bool~) play_collision::$6 if((byte) play_collision::ypos2#2<(byte/signed word/word/dword/signed dword~) play_collision::$4) goto play_collision::@4 -Simple Condition (bool~) play_collision::$9 if((byte~) play_collision::$7==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_collision::@5 -Simple Condition (bool~) play_collision::$11 if((byte) play_collision::col#2<(byte) PLAYFIELD_COLS#0) goto play_collision::@6 -Simple Condition (bool~) play_collision::$13 if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::col#2)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_collision::@7 -Simple Condition (bool~) play_collision::$15 if((byte) play_collision::l#1!=rangelast(0,3)) goto play_collision::@1 -Simple Condition (bool~) play_lock_current::$2 if(*((byte*) current_piece_gfx#36 + (byte) play_lock_current::i#2)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_lock_current::@3 -Simple Condition (bool~) play_lock_current::$3 if((byte) play_lock_current::c#1!=rangelast(0,3)) goto play_lock_current::@2 -Simple Condition (bool~) play_lock_current::$4 if((byte) play_lock_current::l#1!=rangelast(0,3)) goto play_lock_current::@1 -Simple Condition (bool~) play_spawn_current::$0 if((byte) play_spawn_current::piece_idx#2==(byte/signed byte/word/signed word/dword/signed dword) 7) goto play_spawn_current::@2 -Simple Condition (bool~) play_spawn_current::$7 if((byte~) play_spawn_current::$5!=(byte) COLLISION_PLAYFIELD#0) goto play_spawn_current::@4 -Simple Condition (bool~) play_remove_lines::$7 if((byte) play_remove_lines::c#0!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_remove_lines::@3 -Simple Condition (bool~) play_remove_lines::$8 if((byte) play_remove_lines::x#1!=rangelast(0,play_remove_lines::$5)) goto play_remove_lines::@2 -Simple Condition (bool~) play_remove_lines::$10 if((byte) play_remove_lines::full#2!=(byte/signed byte/word/signed word/dword/signed dword) 1) goto play_remove_lines::@4 -Simple Condition (bool~) play_remove_lines::$12 if((byte) play_remove_lines::y#1!=rangelast(0,play_remove_lines::$4)) goto play_remove_lines::@1 -Simple Condition (bool~) play_remove_lines::$13 if((byte) play_remove_lines::w#6!=(byte/word/signed word/dword/signed dword) 255) goto play_remove_lines::@6 -Simple Condition (bool~) play_update_score::$1 if((byte) play_update_score::removed#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_update_score::@1 -Simple Condition (bool~) play_update_score::$8 if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@2 -Simple Condition (bool~) play_increase_level::$0 if((byte) level#20>(byte/signed byte/word/signed word/dword/signed dword) 29) goto play_increase_level::@1 -Simple Condition (bool~) play_increase_level::$3 if((byte~) play_increase_level::$1!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto play_increase_level::@3 -Simple Condition (bool~) play_increase_level::$5 if((byte) play_increase_level::b#1!=rangelast(0,4)) goto play_increase_level::@4 -Simple Condition (bool~) main::$8 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@5 -Simple Condition (bool~) main::$12 if((byte) game_over#19==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@7 -Simple Condition (bool~) main::$15 if((byte) main::render#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@12 +Simple Condition (bool~) keyboard_event_scan::$1 [178] if((byte) keyboard_event_scan::row_scan#0!=*((byte[8]) keyboard_scan_values#0 + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@2 +Simple Condition (bool~) keyboard_event_scan::$13 [187] if((byte) keyboard_event_scan::row#1!=rangelast(0,7)) goto keyboard_event_scan::@1 +Simple Condition (bool~) keyboard_event_scan::$6 [193] if((byte~) keyboard_event_scan::$4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@5 +Simple Condition (bool~) keyboard_event_scan::$12 [198] if((byte) keyboard_event_scan::col#1!=rangelast(0,7)) goto keyboard_event_scan::@4 +Simple Condition (bool~) keyboard_event_scan::$8 [202] if((byte) keyboard_events_size#10==(byte/signed byte/word/signed word/dword/signed dword) 8) goto keyboard_event_scan::@6 +Simple Condition (bool~) keyboard_event_scan::$10 [208] if((byte) keyboard_event_scan::event_type#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@7 +Simple Condition (bool~) keyboard_event_scan::$16 [227] if((byte~) keyboard_event_scan::$14==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@9 +Simple Condition (bool~) keyboard_event_scan::$20 [236] if((byte~) keyboard_event_scan::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@10 +Simple Condition (bool~) keyboard_event_scan::$24 [248] if((byte~) keyboard_event_scan::$22==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@11 +Simple Condition (bool~) keyboard_event_scan::$28 [260] if((byte~) keyboard_event_scan::$26==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_scan::@12 +Simple Condition (bool~) keyboard_event_get::$0 [283] if((byte) keyboard_events_size#13==(byte/signed byte/word/signed word/dword/signed dword) 0) goto keyboard_event_get::@1 +Simple Condition (bool~) render_init::$15 [390] if((byte) render_init::i#1!=rangelast(0,render_init::$12)) goto render_init::@1 +Simple Condition (bool~) render_show::$0 [400] if((byte) render_screen_show#16==(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_show::@1 +Simple Condition (bool~) render_score::$0 [454] if((byte) render_screen_render#17==(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_score::@1 +Simple Condition (bool~) render_bcd::$2 [519] if((byte) render_bcd::only_low#6!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_bcd::@1 +Simple Condition (bool~) render_screen_original::$4 [550] if((byte) render_screen_original::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 4) goto render_screen_original::@2 +Simple Condition (bool~) render_screen_original::$5 [560] if((byte) render_screen_original::x#2!=(byte/signed byte/word/signed word/dword/signed dword) 36) goto render_screen_original::@3 +Simple Condition (bool~) render_screen_original::$6 [568] if((byte) render_screen_original::x#3!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto render_screen_original::@4 +Simple Condition (bool~) render_screen_original::$7 [572] if((byte) render_screen_original::y#1!=rangelast(0,24)) goto render_screen_original::@1 +Simple Condition (bool~) render_playfield::$5 [591] if((byte) render_playfield::c#1!=rangelast(0,render_playfield::$4)) goto render_playfield::@2 +Simple Condition (bool~) render_playfield::$6 [595] if((byte) render_playfield::l#1!=rangelast(2,render_playfield::$1)) goto render_playfield::@1 +Simple Condition (bool~) render_moving::$11 [619] if((byte) render_moving::l#1!=rangelast(0,3)) goto render_moving::@1 +Simple Condition (bool~) render_moving::$7 [625] if((byte) render_moving::current_cell#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_moving::@5 +Simple Condition (bool~) render_moving::$10 [630] if((byte) render_moving::c#1!=rangelast(0,3)) goto render_moving::@4 +Simple Condition (bool~) render_moving::$9 [634] if((byte) render_moving::xpos#2>=(byte) PLAYFIELD_COLS#0) goto render_moving::@6 +Simple Condition (bool~) sprites_init::$4 [658] if((byte) sprites_init::s#1!=rangelast(0,3)) goto sprites_init::@1 +Simple Condition (bool~) sprites_irq::$1 [704] if(*((byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@1 +Simple Condition (bool~) sprites_irq::$2 [708] if((byte) render_screen_showing#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sprites_irq::@2 +Simple Condition (bool~) sprites_irq::$3 [726] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 9) goto sprites_irq::@4 +Simple Condition (bool~) sprites_irq::$4 [743] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 10) goto sprites_irq::@5 +Simple Condition (bool~) play_init::$2 [819] if((byte) play_init::j#1!=rangelast(0,play_init::$0)) goto play_init::@1 +Simple Condition (bool~) play_init::$5 [831] if((byte) play_init::b#1!=rangelast(0,4)) goto play_init::@2 +Simple Condition (bool~) play_movement::$2 [858] if((byte) game_over#14==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_movement::@1 +Simple Condition (bool~) play_move_down::$1 [899] if((byte) play_move_down::key_event#0!=(byte) KEY_SPACE#0) goto play_move_down::@1 +Simple Condition (bool~) play_move_down::$4 [908] if((byte~) play_move_down::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_move_down::@2 +Simple Condition (bool~) play_move_down::$8 [914] if((byte) current_movedown_counter#12<(byte) current_movedown_slow#14) goto play_move_down::@4 +Simple Condition (bool~) play_move_down::$6 [918] if((byte) current_movedown_counter#12<(byte) current_movedown_fast#0) goto play_move_down::@3 +Simple Condition (bool~) play_move_down::$10 [925] if((byte) play_move_down::movedown#6==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_move_down::@5 +Simple Condition (bool~) play_move_down::$13 [940] if((byte~) play_move_down::$12==(byte) COLLISION_NONE#0) goto play_move_down::@6 +Simple Condition (bool~) play_move_leftright::$0 [989] if((byte) play_move_leftright::key_event#0==(byte) KEY_COMMA#0) goto play_move_leftright::@1 +Simple Condition (bool~) play_move_leftright::$10 [1001] if((byte~) play_move_leftright::$8!=(byte) COLLISION_NONE#0) goto play_move_leftright::@5 +Simple Condition (bool~) play_move_leftright::$2 [1005] if((byte) play_move_leftright::key_event#0!=(byte) KEY_DOT#0) goto play_move_leftright::@2 +Simple Condition (bool~) play_move_leftright::$6 [1018] if((byte~) play_move_leftright::$4!=(byte) COLLISION_NONE#0) goto play_move_leftright::@3 +Simple Condition (bool~) play_move_rotate::$0 [1036] if((byte) play_move_rotate::key_event#0==(byte) KEY_Z#0) goto play_move_rotate::@1 +Simple Condition (bool~) play_move_rotate::$1 [1043] if((byte) play_move_rotate::key_event#0==(byte) KEY_X#0) goto play_move_rotate::@2 +Simple Condition (bool~) play_move_rotate::$8 [1065] if((byte~) play_move_rotate::$6!=(byte) COLLISION_NONE#0) goto play_move_rotate::@5 +Simple Condition (bool~) play_collision::$3 [1094] if(*((byte*) play_collision::piece_gfx#2 + (byte) play_collision::i#2)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_collision::@3 +Simple Condition (bool~) play_collision::$14 [1099] if((byte) play_collision::c#1!=rangelast(0,3)) goto play_collision::@2 +Simple Condition (bool~) play_collision::$6 [1104] if((byte) play_collision::ypos2#2<(byte/signed word/word/dword/signed dword~) play_collision::$4) goto play_collision::@4 +Simple Condition (bool~) play_collision::$9 [1109] if((byte~) play_collision::$7==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_collision::@5 +Simple Condition (bool~) play_collision::$11 [1117] if((byte) play_collision::col#2<(byte) PLAYFIELD_COLS#0) goto play_collision::@6 +Simple Condition (bool~) play_collision::$13 [1122] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::col#2)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_collision::@7 +Simple Condition (bool~) play_collision::$15 [1130] if((byte) play_collision::l#1!=rangelast(0,3)) goto play_collision::@1 +Simple Condition (bool~) play_lock_current::$2 [1145] if(*((byte*) current_piece_gfx#36 + (byte) play_lock_current::i#2)==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_lock_current::@3 +Simple Condition (bool~) play_lock_current::$3 [1150] if((byte) play_lock_current::c#1!=rangelast(0,3)) goto play_lock_current::@2 +Simple Condition (bool~) play_lock_current::$4 [1157] if((byte) play_lock_current::l#1!=rangelast(0,3)) goto play_lock_current::@1 +Simple Condition (bool~) play_spawn_current::$0 [1163] if((byte) play_spawn_current::piece_idx#2==(byte/signed byte/word/signed word/dword/signed dword) 7) goto play_spawn_current::@2 +Simple Condition (bool~) play_spawn_current::$7 [1189] if((byte~) play_spawn_current::$5!=(byte) COLLISION_PLAYFIELD#0) goto play_spawn_current::@4 +Simple Condition (bool~) play_remove_lines::$7 [1220] if((byte) play_remove_lines::c#0!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_remove_lines::@3 +Simple Condition (bool~) play_remove_lines::$8 [1226] if((byte) play_remove_lines::x#1!=rangelast(0,play_remove_lines::$5)) goto play_remove_lines::@2 +Simple Condition (bool~) play_remove_lines::$10 [1232] if((byte) play_remove_lines::full#2!=(byte/signed byte/word/signed word/dword/signed dword) 1) goto play_remove_lines::@4 +Simple Condition (bool~) play_remove_lines::$12 [1236] if((byte) play_remove_lines::y#1!=rangelast(0,play_remove_lines::$4)) goto play_remove_lines::@1 +Simple Condition (bool~) play_remove_lines::$13 [1243] if((byte) play_remove_lines::w#6!=(byte/word/signed word/dword/signed dword) 255) goto play_remove_lines::@6 +Simple Condition (bool~) play_update_score::$1 [1255] if((byte) play_update_score::removed#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto play_update_score::@1 +Simple Condition (bool~) play_update_score::$8 [1272] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@2 +Simple Condition (bool~) play_increase_level::$0 [1290] if((byte) level#20>(byte/signed byte/word/signed word/dword/signed dword) 29) goto play_increase_level::@1 +Simple Condition (bool~) play_increase_level::$3 [1300] if((byte~) play_increase_level::$1!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto play_increase_level::@3 +Simple Condition (bool~) play_increase_level::$5 [1312] if((byte) play_increase_level::b#1!=rangelast(0,4)) goto play_increase_level::@4 +Simple Condition (bool~) main::$8 [1353] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@5 +Simple Condition (bool~) main::$12 [1371] if((byte) game_over#19==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@7 +Simple Condition (bool~) main::$15 [1399] if((byte) main::render#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@12 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting && if()-condition to two if()s (bool~) render_moving::$4 ← (bool~) render_moving::$1 && (bool~) render_moving::$3 +Rewriting && if()-condition to two if()s [606] (bool~) render_moving::$4 ← (bool~) render_moving::$1 && (bool~) render_moving::$3 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -8368,7 +8368,7 @@ Constant (const byte*) current_piece#0 = ((byte*))0 Constant (const byte) current_orientation#0 = 0 Constant (const byte[]) MOVEDOWN_SLOW_SPEEDS#0 = { 48, 43, 38, 33, 28, 23, 18, 13, 8, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 } Constant (const byte) current_movedown_slow#0 = 48 -Constant (const byte) current_movedown_fast#0 = 2 +Constant (const byte) current_movedown_fast#0 = 10 Constant (const byte) current_movedown_counter#0 = 0 Constant (const dword[]) SCORE_BASE_BCD#0 = { 0, 64, 256, 768, 4608 } Constant (const dword[5]) score_add_bcd#0 = { fill( 5, 0) } @@ -8555,7 +8555,7 @@ Consolidated array index constant in *(PLAYFIELD_SPRITE_PTRS_2#0+3) Consolidated array index constant in *(playfield_lines_idx#0+PLAYFIELD_LINES#0) Consolidated array index constant in *(MOVEDOWN_SLOW_SPEEDS#0+level#0) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [496] if(true) goto main::@2 Removing PHI-reference to removed block (main::@8) in block main::@11 Removing PHI-reference to removed block (main::@8) in block main::@11 Removing PHI-reference to removed block (main::@8) in block main::@11 @@ -8570,7 +8570,7 @@ Removing PHI-reference to removed block (main::@8) in block main::@11 Removing PHI-reference to removed block (main::@8) in block main::@11 Removing PHI-reference to removed block (main::@8) in block main::@11 Removing PHI-reference to removed block (main::@8) in block main::@11 -if() condition always true - replacing block destination if(true) goto main::@9 +if() condition always true - replacing block destination [508] if(true) goto main::@9 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Successful SSA optimization PassNEliminateUnusedVars @@ -8710,8 +8710,8 @@ Redundant Phi (dword) score_bcd#42 (dword) score_bcd#14 Redundant Phi (byte) level#48 (byte) level#16 Redundant Phi (byte) level_bcd#52 (byte) level_bcd#17 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) render_moving::$1 if((byte) render_moving::ypos2#2>(byte/signed byte/word/signed word/dword/signed dword) 2) goto render_moving::@13 -Simple Condition (bool~) render_moving::$3 if((byte) render_moving::ypos2#2<(const byte/signed word/word/dword/signed dword) render_moving::$2) goto render_moving::@2 +Simple Condition (bool~) render_moving::$1 [184] if((byte) render_moving::ypos2#2>(byte/signed byte/word/signed word/dword/signed dword) 2) goto render_moving::@13 +Simple Condition (bool~) render_moving::$3 [514] if((byte) render_moving::ypos2#2<(const byte/signed word/word/dword/signed dword) render_moving::$2) goto render_moving::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify#0 = (byte/signed word/word/dword/signed dword~) sprites_irq::$0 Inlining constant with var siblings (const byte) keyboard_event_scan::keycode#0 @@ -12115,7 +12115,7 @@ INITIAL ASM .const PLAYFIELD_LINES = $16 .const PLAYFIELD_COLS = $a .const SPRITES_FIRST_YPOS = $31 - .const current_movedown_fast = 2 + .const current_movedown_fast = $a .const COLLISION_NONE = 0 .const COLLISION_PLAYFIELD = 1 .const COLLISION_BOTTOM = 2 @@ -16788,7 +16788,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const PLAYFIELD_LINES = $16 .const PLAYFIELD_COLS = $a .const SPRITES_FIRST_YPOS = $31 - .const current_movedown_fast = 2 + .const current_movedown_fast = $a .const COLLISION_NONE = 0 .const COLLISION_PLAYFIELD = 1 .const COLLISION_BOTTOM = 2 @@ -20900,7 +20900,7 @@ FINAL SYMBOL TABLE (byte) current_movedown_counter#14 current_movedown_counter zp ZP_BYTE:4 3.257142857142857 (byte) current_movedown_counter#16 current_movedown_counter zp ZP_BYTE:4 8.769230769230768 (byte) current_movedown_fast -(const byte) current_movedown_fast#0 current_movedown_fast = (byte/signed byte/word/signed word/dword/signed dword) 2 +(const byte) current_movedown_fast#0 current_movedown_fast = (byte/signed byte/word/signed word/dword/signed dword) 10 (byte) current_movedown_slow (byte) current_movedown_slow#1 current_movedown_slow zp ZP_BYTE:24 0.2222222222222222 (byte) current_movedown_slow#10 current_movedown_slow zp ZP_BYTE:24 4.0 @@ -21951,7 +21951,7 @@ Score: 3292734 .const PLAYFIELD_LINES = $16 .const PLAYFIELD_COLS = $a .const SPRITES_FIRST_YPOS = $31 - .const current_movedown_fast = 2 + .const current_movedown_fast = $a .const COLLISION_NONE = 0 .const COLLISION_PLAYFIELD = 1 .const COLLISION_BOTTOM = 2 diff --git a/src/test/ref/complex/tetris/tetris.sym b/src/test/ref/complex/tetris/tetris.sym index b76c9568e..e0c75c814 100644 --- a/src/test/ref/complex/tetris/tetris.sym +++ b/src/test/ref/complex/tetris/tetris.sym @@ -288,7 +288,7 @@ (byte) current_movedown_counter#14 current_movedown_counter zp ZP_BYTE:4 3.257142857142857 (byte) current_movedown_counter#16 current_movedown_counter zp ZP_BYTE:4 8.769230769230768 (byte) current_movedown_fast -(const byte) current_movedown_fast#0 current_movedown_fast = (byte/signed byte/word/signed word/dword/signed dword) 2 +(const byte) current_movedown_fast#0 current_movedown_fast = (byte/signed byte/word/signed word/dword/signed dword) 10 (byte) current_movedown_slow (byte) current_movedown_slow#1 current_movedown_slow zp ZP_BYTE:24 0.2222222222222222 (byte) current_movedown_slow#10 current_movedown_slow zp ZP_BYTE:24 4.0 diff --git a/src/test/ref/compound-assignment.log b/src/test/ref/compound-assignment.log index f7fe566a4..af9a31adb 100644 --- a/src/test/ref/compound-assignment.log +++ b/src/test/ref/compound-assignment.log @@ -437,7 +437,7 @@ Redundant Phi (byte) GREEN#1 (byte) GREEN#10 Redundant Phi (byte*) cols#1 (byte*) cols#10 Redundant Phi (byte) RED#1 (byte) RED#10 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) test::$0 if(*((byte[]) ref#0 + (byte) test::i#11)==(byte) test::a#11) goto test::@1 +Simple Condition (bool~) test::$0 [80] if(*((byte[]) ref#0 + (byte) test::i#11)==(byte) test::a#11) goto test::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte[]) ref#0 = { 3, 4, 3, 18, 9, 1, 4, 2, 4, 5, 1, 0 } Constant (const byte*) screen1#0 = ((byte*))1024 diff --git a/src/test/ref/concat-char.log b/src/test/ref/concat-char.log index c22d11162..0405d872b 100644 --- a/src/test/ref/concat-char.log +++ b/src/test/ref/concat-char.log @@ -58,7 +58,7 @@ Self Phi Eliminated (byte*) main::screen#1 Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) main::screen#1 (byte*) main::screen#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if((byte) main::i#1!=rangelast(0,2)) goto main::@1 +Simple Condition (bool~) main::$1 [9] if((byte) main::i#1!=rangelast(0,2)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::screen#0 = ((byte*))1024 Constant (const byte) main::l#0 = 'l' diff --git a/src/test/ref/consolidate-array-index-problem.asm b/src/test/ref/consolidate-array-index-problem.asm new file mode 100644 index 000000000..8f4cd936a --- /dev/null +++ b/src/test/ref/consolidate-array-index-problem.asm @@ -0,0 +1,22 @@ +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +main: { + .const BLACK = 0 + .label screen = $400 + .label cols = $d800 + ldy #0 + b1: + tya + clc + adc #$c + tax + lda #'a' + sta screen,x + lda #BLACK + sta cols,x + iny + cpy #$b + bne b1 + rts +} diff --git a/src/test/ref/consolidate-array-index-problem.cfg b/src/test/ref/consolidate-array-index-problem.cfg new file mode 100644 index 000000000..a525bacf0 --- /dev/null +++ b/src/test/ref/consolidate-array-index-problem.cfg @@ -0,0 +1,23 @@ +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] phi() + to:main::@1 +main::@1: scope:[main] from main main::@1 + [5] (byte) main::x#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@1/(byte) main::x#1 ) + [6] (byte) main::y#0 ← (byte) main::x#2 + (byte/signed byte/word/signed word/dword/signed dword) 12 + [7] *((const byte*) main::screen#0 + (byte) main::y#0) ← (byte) 'a' + [8] *((const byte*) main::cols#0 + (byte) main::y#0) ← (const byte) main::BLACK#0 + [9] (byte) main::x#1 ← ++ (byte) main::x#2 + [10] if((byte) main::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@1 + [11] return + to:@return diff --git a/src/test/ref/consolidate-array-index-problem.log b/src/test/ref/consolidate-array-index-problem.log new file mode 100644 index 000000000..308883f96 --- /dev/null +++ b/src/test/ref/consolidate-array-index-problem.log @@ -0,0 +1,389 @@ + +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + to:@1 +main: scope:[main] from @1 + (byte) main::BLACK#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte*) main::screen#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024 + (byte*) main::cols#0 ← ((byte*)) (word/dword/signed dword) 55296 + (byte) main::x#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@1 +main::@1: scope:[main] from main main::@1 + (byte*) main::cols#1 ← phi( main/(byte*) main::cols#0 main::@1/(byte*) main::cols#1 ) + (byte) main::BLACK#1 ← phi( main/(byte) main::BLACK#0 main::@1/(byte) main::BLACK#1 ) + (byte*) main::screen#1 ← phi( main/(byte*) main::screen#0 main::@1/(byte*) main::screen#1 ) + (byte) main::x#2 ← phi( main/(byte) main::x#0 main::@1/(byte) main::x#1 ) + (byte/signed word/word/dword/signed dword~) main::$0 ← (byte) main::x#2 + (byte/signed byte/word/signed word/dword/signed dword) 12 + (byte) main::y#0 ← (byte/signed word/word/dword/signed dword~) main::$0 + *((byte*) main::screen#1 + (byte) main::y#0) ← (byte) 'a' + *((byte*) main::cols#1 + (byte) main::y#0) ← (byte) main::BLACK#1 + (byte) main::x#1 ← (byte) main::x#2 + rangenext(0,10) + (bool~) main::$1 ← (byte) main::x#1 != rangelast(0,10) + if((bool~) main::$1) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@1 + return + to:@return +@1: scope:[] from @begin + call main + to:@2 +@2: scope:[] from @1 + to:@end +@end: scope:[] from @2 + +SYMBOL TABLE SSA +(label) @1 +(label) @2 +(label) @begin +(label) @end +(void()) main() +(byte/signed word/word/dword/signed dword~) main::$0 +(bool~) main::$1 +(label) main::@1 +(label) main::@return +(byte) main::BLACK +(byte) main::BLACK#0 +(byte) main::BLACK#1 +(byte*) main::cols +(byte*) main::cols#0 +(byte*) main::cols#1 +(byte*) main::screen +(byte*) main::screen#0 +(byte*) main::screen#1 +(byte) main::x +(byte) main::x#0 +(byte) main::x#1 +(byte) main::x#2 +(byte) main::y +(byte) main::y#0 + +Culled Empty Block (label) @2 +Successful SSA optimization Pass2CullEmptyBlocks +Alias (byte) main::y#0 = (byte/signed word/word/dword/signed dword~) main::$0 +Successful SSA optimization Pass2AliasElimination +Self Phi Eliminated (byte*) main::screen#1 +Self Phi Eliminated (byte) main::BLACK#1 +Self Phi Eliminated (byte*) main::cols#1 +Successful SSA optimization Pass2SelfPhiElimination +Redundant Phi (byte*) main::screen#1 (byte*) main::screen#0 +Redundant Phi (byte) main::BLACK#1 (byte) main::BLACK#0 +Redundant Phi (byte*) main::cols#1 (byte*) main::cols#0 +Successful SSA optimization Pass2RedundantPhiElimination +Simple Condition (bool~) main::$1 [11] if((byte) main::x#1!=rangelast(0,10)) goto main::@1 +Successful SSA optimization Pass2ConditionalJumpSimplification +Constant (const byte) main::BLACK#0 = 0 +Constant (const byte*) main::screen#0 = ((byte*))1024 +Constant (const byte*) main::cols#0 = ((byte*))55296 +Constant (const byte) main::x#0 = 0 +Successful SSA optimization Pass2ConstantIdentification +Resolved ranged next value main::x#1 ← ++ main::x#2 to ++ +Resolved ranged comparison value if(main::x#1!=rangelast(0,10)) goto main::@1 to (byte/signed byte/word/signed word/dword/signed dword) 11 +Inlining constant with var siblings (const byte) main::x#0 +Constant inlined main::x#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Successful SSA optimization Pass2ConstantInlining +Added new block during phi lifting main::@3(between main::@1 and main::@1) +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main +CALL GRAPH +Calls in [] to main:2 + +Created 1 initial phi equivalence classes +Coalesced [12] main::x#3 ← main::x#1 +Coalesced down to 1 phi equivalence classes +Culled Empty Block (label) main::@3 +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @1 +Adding NOP phi() at start of @end +Adding NOP phi() at start of main + +FINAL CONTROL FLOW GRAPH +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() +main: scope:[main] from @1 + [4] phi() + to:main::@1 +main::@1: scope:[main] from main main::@1 + [5] (byte) main::x#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@1/(byte) main::x#1 ) + [6] (byte) main::y#0 ← (byte) main::x#2 + (byte/signed byte/word/signed word/dword/signed dword) 12 + [7] *((const byte*) main::screen#0 + (byte) main::y#0) ← (byte) 'a' + [8] *((const byte*) main::cols#0 + (byte) main::y#0) ← (const byte) main::BLACK#0 + [9] (byte) main::x#1 ← ++ (byte) main::x#2 + [10] if((byte) main::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@1 + [11] return + to:@return + + +VARIABLE REGISTER WEIGHTS +(void()) main() +(byte) main::BLACK +(byte*) main::cols +(byte*) main::screen +(byte) main::x +(byte) main::x#1 16.5 +(byte) main::x#2 8.25 +(byte) main::y +(byte) main::y#0 16.5 + +Initial phi equivalence classes +[ main::x#2 main::x#1 ] +Added variable main::y#0 to zero page equivalence class [ main::y#0 ] +Complete equivalence classes +[ main::x#2 main::x#1 ] +[ main::y#0 ] +Allocated zp ZP_BYTE:2 [ main::x#2 main::x#1 ] +Allocated zp ZP_BYTE:3 [ main::y#0 ] + +INITIAL ASM +//SEG0 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG1 Global Constants & labels +//SEG2 @begin +bbegin: +//SEG3 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG4 @1 +b1: +//SEG5 [2] call main +//SEG6 [4] phi from @1 to main [phi:@1->main] +main_from_b1: + jsr main +//SEG7 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG8 @end +bend: +//SEG9 main +main: { + .const BLACK = 0 + .label screen = $400 + .label cols = $d800 + .label y = 3 + .label x = 2 + //SEG10 [5] phi from main to main::@1 [phi:main->main::@1] + b1_from_main: + //SEG11 [5] phi (byte) main::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 + lda #0 + sta x + jmp b1 + //SEG12 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + b1_from_b1: + //SEG13 [5] phi (byte) main::x#2 = (byte) main::x#1 [phi:main::@1->main::@1#0] -- register_copy + jmp b1 + //SEG14 main::@1 + b1: + //SEG15 [6] (byte) main::y#0 ← (byte) main::x#2 + (byte/signed byte/word/signed word/dword/signed dword) 12 -- vbuz1=vbuz2_plus_vbuc1 + lda #$c + clc + adc x + sta y + //SEG16 [7] *((const byte*) main::screen#0 + (byte) main::y#0) ← (byte) 'a' -- pbuc1_derefidx_vbuz1=vbuc2 + ldy y + lda #'a' + sta screen,y + //SEG17 [8] *((const byte*) main::cols#0 + (byte) main::y#0) ← (const byte) main::BLACK#0 -- pbuc1_derefidx_vbuz1=vbuc2 + ldy y + lda #BLACK + sta cols,y + //SEG18 [9] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuz1=_inc_vbuz1 + inc x + //SEG19 [10] if((byte) main::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 + lda x + cmp #$b + bne b1_from_b1 + jmp breturn + //SEG20 main::@return + breturn: + //SEG21 [11] return + rts +} + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [6] (byte) main::y#0 ← (byte) main::x#2 + (byte/signed byte/word/signed word/dword/signed dword) 12 [ main::x#2 main::y#0 ] ( main:2 [ main::x#2 main::y#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::x#2 main::x#1 ] +Statement [7] *((const byte*) main::screen#0 + (byte) main::y#0) ← (byte) 'a' [ main::x#2 main::y#0 ] ( main:2 [ main::x#2 main::y#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::y#0 ] +Statement [8] *((const byte*) main::cols#0 + (byte) main::y#0) ← (const byte) main::BLACK#0 [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a +Statement [6] (byte) main::y#0 ← (byte) main::x#2 + (byte/signed byte/word/signed word/dword/signed dword) 12 [ main::x#2 main::y#0 ] ( main:2 [ main::x#2 main::y#0 ] ) always clobbers reg byte a +Statement [7] *((const byte*) main::screen#0 + (byte) main::y#0) ← (byte) 'a' [ main::x#2 main::y#0 ] ( main:2 [ main::x#2 main::y#0 ] ) always clobbers reg byte a +Statement [8] *((const byte*) main::cols#0 + (byte) main::y#0) ← (const byte) main::BLACK#0 [ main::x#2 ] ( main:2 [ main::x#2 ] ) always clobbers reg byte a +Potential registers zp ZP_BYTE:2 [ main::x#2 main::x#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ main::y#0 ] : zp ZP_BYTE:3 , reg byte x , reg byte y , + +REGISTER UPLIFT SCOPES +Uplift Scope [main] 24.75: zp ZP_BYTE:2 [ main::x#2 main::x#1 ] 16.5: zp ZP_BYTE:3 [ main::y#0 ] +Uplift Scope [] + +Uplifting [main] best 413 combination reg byte y [ main::x#2 main::x#1 ] reg byte x [ main::y#0 ] +Uplifting [] best 413 combination + +ASSEMBLER BEFORE OPTIMIZATION +//SEG0 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(bbegin) +.pc = $80d "Program" +//SEG1 Global Constants & labels +//SEG2 @begin +bbegin: +//SEG3 [1] phi from @begin to @1 [phi:@begin->@1] +b1_from_bbegin: + jmp b1 +//SEG4 @1 +b1: +//SEG5 [2] call main +//SEG6 [4] phi from @1 to main [phi:@1->main] +main_from_b1: + jsr main +//SEG7 [3] phi from @1 to @end [phi:@1->@end] +bend_from_b1: + jmp bend +//SEG8 @end +bend: +//SEG9 main +main: { + .const BLACK = 0 + .label screen = $400 + .label cols = $d800 + //SEG10 [5] phi from main to main::@1 [phi:main->main::@1] + b1_from_main: + //SEG11 [5] phi (byte) main::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1 + ldy #0 + jmp b1 + //SEG12 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + b1_from_b1: + //SEG13 [5] phi (byte) main::x#2 = (byte) main::x#1 [phi:main::@1->main::@1#0] -- register_copy + jmp b1 + //SEG14 main::@1 + b1: + //SEG15 [6] (byte) main::y#0 ← (byte) main::x#2 + (byte/signed byte/word/signed word/dword/signed dword) 12 -- vbuxx=vbuyy_plus_vbuc1 + tya + clc + adc #$c + tax + //SEG16 [7] *((const byte*) main::screen#0 + (byte) main::y#0) ← (byte) 'a' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #'a' + sta screen,x + //SEG17 [8] *((const byte*) main::cols#0 + (byte) main::y#0) ← (const byte) main::BLACK#0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #BLACK + sta cols,x + //SEG18 [9] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuyy=_inc_vbuyy + iny + //SEG19 [10] if((byte) main::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 + cpy #$b + bne b1_from_b1 + jmp breturn + //SEG20 main::@return + breturn: + //SEG21 [11] return + rts +} + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp b1 +Removing instruction jmp bend +Removing instruction jmp b1 +Removing instruction jmp breturn +Succesful ASM optimization Pass5NextJumpElimination +Replacing label b1_from_b1 with b1 +Removing instruction b1_from_bbegin: +Removing instruction b1: +Removing instruction main_from_b1: +Removing instruction bend_from_b1: +Removing instruction b1_from_b1: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction bend: +Removing instruction b1_from_main: +Removing instruction breturn: +Succesful ASM optimization Pass5UnusedLabelElimination +Updating BasicUpstart to call main directly +Removing instruction jsr main +Succesful ASM optimization Pass5SkipBegin +Removing instruction jmp b1 +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction bbegin: +Succesful ASM optimization Pass5UnusedLabelElimination + +FINAL SYMBOL TABLE +(label) @1 +(label) @begin +(label) @end +(void()) main() +(label) main::@1 +(label) main::@return +(byte) main::BLACK +(const byte) main::BLACK#0 BLACK = (byte/signed byte/word/signed word/dword/signed dword) 0 +(byte*) main::cols +(const byte*) main::cols#0 cols = ((byte*))(word/dword/signed dword) 55296 +(byte*) main::screen +(const byte*) main::screen#0 screen = ((byte*))(word/signed word/dword/signed dword) 1024 +(byte) main::x +(byte) main::x#1 reg byte y 16.5 +(byte) main::x#2 reg byte y 8.25 +(byte) main::y +(byte) main::y#0 reg byte x 16.5 + +reg byte y [ main::x#2 main::x#1 ] +reg byte x [ main::y#0 ] + + +FINAL ASSEMBLER +Score: 311 + +//SEG0 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG1 Global Constants & labels +//SEG2 @begin +//SEG3 [1] phi from @begin to @1 [phi:@begin->@1] +//SEG4 @1 +//SEG5 [2] call main +//SEG6 [4] phi from @1 to main [phi:@1->main] +//SEG7 [3] phi from @1 to @end [phi:@1->@end] +//SEG8 @end +//SEG9 main +main: { + .const BLACK = 0 + .label screen = $400 + .label cols = $d800 + //SEG10 [5] phi from main to main::@1 [phi:main->main::@1] + //SEG11 [5] phi (byte) main::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1 + ldy #0 + //SEG12 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + //SEG13 [5] phi (byte) main::x#2 = (byte) main::x#1 [phi:main::@1->main::@1#0] -- register_copy + //SEG14 main::@1 + b1: + //SEG15 [6] (byte) main::y#0 ← (byte) main::x#2 + (byte/signed byte/word/signed word/dword/signed dword) 12 -- vbuxx=vbuyy_plus_vbuc1 + tya + clc + adc #$c + tax + //SEG16 [7] *((const byte*) main::screen#0 + (byte) main::y#0) ← (byte) 'a' -- pbuc1_derefidx_vbuxx=vbuc2 + lda #'a' + sta screen,x + //SEG17 [8] *((const byte*) main::cols#0 + (byte) main::y#0) ← (const byte) main::BLACK#0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #BLACK + sta cols,x + //SEG18 [9] (byte) main::x#1 ← ++ (byte) main::x#2 -- vbuyy=_inc_vbuyy + iny + //SEG19 [10] if((byte) main::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 + cpy #$b + bne b1 + //SEG20 main::@return + //SEG21 [11] return + rts +} + diff --git a/src/test/ref/consolidate-array-index-problem.sym b/src/test/ref/consolidate-array-index-problem.sym new file mode 100644 index 000000000..987eedf7c --- /dev/null +++ b/src/test/ref/consolidate-array-index-problem.sym @@ -0,0 +1,20 @@ +(label) @1 +(label) @begin +(label) @end +(void()) main() +(label) main::@1 +(label) main::@return +(byte) main::BLACK +(const byte) main::BLACK#0 BLACK = (byte/signed byte/word/signed word/dword/signed dword) 0 +(byte*) main::cols +(const byte*) main::cols#0 cols = ((byte*))(word/dword/signed dword) 55296 +(byte*) main::screen +(const byte*) main::screen#0 screen = ((byte*))(word/signed word/dword/signed dword) 1024 +(byte) main::x +(byte) main::x#1 reg byte y 16.5 +(byte) main::x#2 reg byte y 8.25 +(byte) main::y +(byte) main::y#0 reg byte x 16.5 + +reg byte y [ main::x#2 main::x#1 ] +reg byte x [ main::y#0 ] diff --git a/src/test/ref/const-condition.log b/src/test/ref/const-condition.log index 7558f7c6d..207a419d4 100644 --- a/src/test/ref/const-condition.log +++ b/src/test/ref/const-condition.log @@ -38,14 +38,14 @@ SYMBOL TABLE SSA Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks -Simple Condition (bool~) main::$0 if((byte/signed byte/word/signed word/dword/signed dword) 7<(byte/signed byte/word/signed word/dword/signed dword) 4) goto main::@1 +Simple Condition (bool~) main::$0 [2] if((byte/signed byte/word/signed word/dword/signed dword) 7<(byte/signed byte/word/signed word/dword/signed dword) 4) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::SCREEN#0 = ((byte*))1024 Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in *(main::SCREEN#0+0) Consolidated array index constant in *(main::SCREEN#0+0) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always false - eliminating if((byte/signed byte/word/signed word/dword/signed dword) 7<(byte/signed byte/word/signed word/dword/signed dword) 4) goto main::@1 +if() condition always false - eliminating [0] if((byte/signed byte/word/signed word/dword/signed dword) 7<(byte/signed byte/word/signed word/dword/signed dword) 4) goto main::@1 Successful SSA optimization Pass2ConstantIfs Removing unused block main::@1 Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/const-identification.log b/src/test/ref/const-identification.log index 979217b37..b76800ce5 100644 --- a/src/test/ref/const-identification.log +++ b/src/test/ref/const-identification.log @@ -144,9 +144,9 @@ Redundant Phi (byte) line::x0#1 (byte) line::x0#0 Redundant Phi (byte) line::x1#1 (byte) line::x1#0 Redundant Phi (byte) line::x1#2 (byte) line::x1#1 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$0 if((byte) main::i#1!=rangelast(0,39)) goto main::@1 -Simple Condition (bool~) line::$0 if((byte) line::x0#0<(byte) line::x1#0) goto line::@1 -Simple Condition (bool~) line::$3 if((byte) line::x#1<=(byte) line::x1#0) goto line::@3 +Simple Condition (bool~) main::$0 [8] if((byte) main::i#1!=rangelast(0,39)) goto main::@1 +Simple Condition (bool~) line::$0 [16] if((byte) line::x0#0<(byte) line::x1#0) goto line::@1 +Simple Condition (bool~) line::$3 [28] if((byte) line::x#1<=(byte) line::x1#0) goto line::@3 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) plots#0 = ((byte*))4096 Constant (const byte*) SCREEN#0 = ((byte*))1024 @@ -156,8 +156,8 @@ Constant (const byte) line::x1#0 = 10 Successful SSA optimization Pass2ConstantIdentification Constant (const byte) plot::x#0 = line::x0#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@2 -if() condition always true - replacing block destination if((const byte) line::x0#0<(const byte) line::x1#0) goto line::@1 +if() condition always true - replacing block destination [6] if(true) goto main::@2 +if() condition always true - replacing block destination [8] if((const byte) line::x0#0<(const byte) line::x1#0) goto line::@1 Successful SSA optimization Pass2ConstantIfs Removing unused block main::@return Removing PHI-reference to removed block (line::@4) in block plot diff --git a/src/test/ref/const-pointer.log b/src/test/ref/const-pointer.log index 2f909d9b8..afea7d1be 100644 --- a/src/test/ref/const-pointer.log +++ b/src/test/ref/const-pointer.log @@ -50,7 +50,7 @@ Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks Alias (byte*) main::screen#0 = (byte*) main::screen#1 (byte*) main::screen#2 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$0 if((byte*) main::rem#0!=(byte*) main::NULL#0) goto main::@1 +Simple Condition (bool~) main::$0 [4] if((byte*) main::rem#0!=(byte*) main::NULL#0) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::screen#0 = ((byte*))1024 Constant (const byte*) main::NULL#0 = ((byte*))0 @@ -59,7 +59,7 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in *(main::screen#0+0) Consolidated array index constant in *(main::screen#0+0) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if((const byte*) main::rem#0!=(const byte*) main::NULL#0) goto main::@1 +if() condition always true - replacing block destination [0] if((const byte*) main::rem#0!=(const byte*) main::NULL#0) goto main::@1 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@3 diff --git a/src/test/ref/constant-string-concat.log b/src/test/ref/constant-string-concat.log index 68692641a..7093d3bad 100644 --- a/src/test/ref/constant-string-concat.log +++ b/src/test/ref/constant-string-concat.log @@ -87,7 +87,7 @@ Self Phi Eliminated (byte*) main::SCREEN#1 Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) main::SCREEN#1 (byte*) main::SCREEN#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$6 if((byte) main::i#1!=rangelast(0,7)) goto main::@1 +Simple Condition (bool~) main::$6 [18] if((byte) main::i#1!=rangelast(0,7)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte[]) main::s#0 = "e"+"l" Constant (const byte) main::e#0 = '!' diff --git a/src/test/ref/constantmin.log b/src/test/ref/constantmin.log index 5b9954600..b3f3d96d8 100644 --- a/src/test/ref/constantmin.log +++ b/src/test/ref/constantmin.log @@ -77,7 +77,7 @@ Successful SSA optimization Pass2AliasElimination Redundant Phi (byte) RED#1 (byte) RED#0 Redundant Phi (byte*) BGCOL#1 (byte*) BGCOL#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if((byte) main::i#1!=rangelast(40,79)) goto main::@1 +Simple Condition (bool~) main::$1 [17] if((byte) main::i#1!=rangelast(40,79)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte) STAR#0 = 81 diff --git a/src/test/ref/constants.log b/src/test/ref/constants.log index 8793d3537..0459396e9 100644 --- a/src/test/ref/constants.log +++ b/src/test/ref/constants.log @@ -860,11 +860,11 @@ Redundant Phi (byte*) print_char_cursor#78 (byte*) print_char_cursor#2 Successful SSA optimization Pass2RedundantPhiElimination Redundant Phi (byte*) print_char_cursor#67 (byte*) print_char_cursor#2 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) print_str::$0 if(*((byte*) print_str::str#10)!=(byte) '@') goto print_str::@2 -Simple Condition (bool~) print_ln::$1 if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) assert_byte::$2 if((byte) assert_byte::b#3!=(byte) assert_byte::c#3) goto assert_byte::@1 -Simple Condition (bool~) assert_sbyte::$2 if((signed byte) assert_sbyte::b#5!=(signed byte) assert_sbyte::c#5) goto assert_sbyte::@1 +Simple Condition (bool~) print_str::$0 [6] if(*((byte*) print_str::str#10)!=(byte) '@') goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [19] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 +Simple Condition (bool~) print_cls::$1 [35] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) assert_byte::$2 [108] if((byte) assert_byte::b#3!=(byte) assert_byte::c#3) goto assert_byte::@1 +Simple Condition (bool~) assert_sbyte::$2 [191] if((signed byte) assert_sbyte::b#5!=(signed byte) assert_sbyte::c#5) goto assert_sbyte::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_line_cursor#0 = ((byte*))1024 Constant (const byte[]) print_hextab#0 = $0 diff --git a/src/test/ref/dword.log b/src/test/ref/dword.log index a5a992433..adaabc657 100644 --- a/src/test/ref/dword.log +++ b/src/test/ref/dword.log @@ -63,7 +63,7 @@ Self Phi Eliminated (dword) main::a#1 Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (dword) main::a#1 (dword) main::a#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$2 if((byte) main::i#1!=rangelast(0,100)) goto main::@1 +Simple Condition (bool~) main::$2 [11] if((byte) main::i#1!=rangelast(0,100)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const dword) main::a#0 = 4000000000 Constant (const byte) main::i#0 = 0 diff --git a/src/test/ref/emptyblock-error.log b/src/test/ref/emptyblock-error.log index bf4945b23..03f95d997 100644 --- a/src/test/ref/emptyblock-error.log +++ b/src/test/ref/emptyblock-error.log @@ -159,7 +159,7 @@ SYMBOL TABLE SSA (label) mode::@7 (label) mode::@return -Inversing boolean not (bool~) mode::$1 ← *((byte*) B#1) != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mode::$0 ← *((byte*) B#1) == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [27] (bool~) mode::$1 ← *((byte*) B#1) != (byte/signed byte/word/signed word/dword/signed dword) 0 from [26] (bool~) mode::$0 ← *((byte*) B#1) == (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) a#1 = (byte) a#14 (byte) a#15 (byte) a#9 Alias (byte*) B#10 = (byte*) B#9 (byte*) B#12 @@ -191,15 +191,15 @@ Redundant Phi (byte) a#22 (byte) a#16 Redundant Phi (byte*) B#1 (byte*) B#4 Redundant Phi (byte) a#13 (byte) a#1 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) mode::$1 if(*((byte*) B#0)!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode::@4 +Simple Condition (bool~) mode::$1 [28] if(*((byte*) B#0)!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mode::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) a#19 = 0 Constant (const byte*) B#0 = ((byte*))4096 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [1] if(true) goto main::@2 Removing PHI-reference to removed block (menu::@1) in block menu::@return -if() condition always true - replacing block destination if(true) goto menu::@2 -if() condition always true - replacing block destination if(true) goto mode::@2 +if() condition always true - replacing block destination [4] if(true) goto menu::@2 +if() condition always true - replacing block destination [9] if(true) goto mode::@2 Successful SSA optimization Pass2ConstantIfs Removing unused block main::@return Removing unused block mode::@return diff --git a/src/test/ref/examples/3d/3d.asm b/src/test/ref/examples/3d/3d.asm index 0eb746110..d251011cb 100644 --- a/src/test/ref/examples/3d/3d.asm +++ b/src/test/ref/examples/3d/3d.asm @@ -519,8 +519,14 @@ calculate_matrix: { clc adc sy tay - stx t3 - stx t4 + txa + clc + adc #sz + sta t3 + txa + sec + sbc #sz + sta t4 txa sty $ff clc @@ -565,8 +571,8 @@ calculate_matrix: { ldx t3 ldy t4 sec - lda SINH+sz,x - sbc SINH+-sz,y + lda SINH,x + sbc SINH,y ldy t6 clc adc COSQ,y diff --git a/src/test/ref/examples/3d/3d.cfg b/src/test/ref/examples/3d/3d.cfg index efd6a05a4..58a73fc23 100644 --- a/src/test/ref/examples/3d/3d.cfg +++ b/src/test/ref/examples/3d/3d.cfg @@ -356,8 +356,8 @@ store_matrix::@return: scope:[store_matrix] from store_matrix calculate_matrix: scope:[calculate_matrix] from anim::@12 [144] (signed byte) calculate_matrix::t1#0 ← (signed byte) calculate_matrix::sy#0 - (const signed byte) sz#0 [145] (signed byte) calculate_matrix::t2#0 ← (signed byte) calculate_matrix::sy#0 + (const signed byte) sz#0 - [146] (signed byte) calculate_matrix::t3#0 ← (signed byte) calculate_matrix::sx#0 - [147] (signed byte) calculate_matrix::t4#0 ← (signed byte) calculate_matrix::sx#0 + [146] (signed byte) calculate_matrix::t3#0 ← (signed byte) calculate_matrix::sx#0 + (const signed byte) sz#0 + [147] (signed byte) calculate_matrix::t4#0 ← (signed byte) calculate_matrix::sx#0 - (const signed byte) sz#0 [148] (signed byte) calculate_matrix::t5#0 ← (signed byte) calculate_matrix::sx#0 + (signed byte) calculate_matrix::t2#0 [149] (signed byte) calculate_matrix::t6#0 ← (signed byte) calculate_matrix::sx#0 - (signed byte) calculate_matrix::t1#0 [150] (signed byte) calculate_matrix::t7#0 ← (signed byte) calculate_matrix::sx#0 + (signed byte) calculate_matrix::t1#0 @@ -370,7 +370,7 @@ calculate_matrix: scope:[calculate_matrix] from anim::@12 [157] *((const signed byte[9]) rotation_matrix#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (signed byte~) calculate_matrix::$11 [158] (signed byte~) calculate_matrix::$12 ← *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::sy#0) + *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::sy#0) [159] *((const signed byte[9]) rotation_matrix#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (signed byte~) calculate_matrix::$12 - [160] (signed byte~) calculate_matrix::$13 ← *((const signed byte*) SINH#0+(const signed byte) sz#0 + (signed byte) calculate_matrix::t3#0) - *((const signed byte*) SINH#0+-(const signed byte) sz#0 + (signed byte) calculate_matrix::t4#0) + [160] (signed byte~) calculate_matrix::$13 ← *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t3#0) - *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t4#0) [161] (signed byte~) calculate_matrix::$14 ← (signed byte~) calculate_matrix::$13 + *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t6#0) [162] (signed byte~) calculate_matrix::$15 ← (signed byte~) calculate_matrix::$14 - *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t5#0) [163] (signed byte~) calculate_matrix::$16 ← (signed byte~) calculate_matrix::$15 + *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t8#0) diff --git a/src/test/ref/examples/3d/3d.log b/src/test/ref/examples/3d/3d.log index c6f602388..be67af0dd 100644 --- a/src/test/ref/examples/3d/3d.log +++ b/src/test/ref/examples/3d/3d.log @@ -3686,17 +3686,17 @@ Redundant Phi (byte*) print_char_cursor#13 (byte*) print_char_cursor#10 Redundant Phi (signed byte) sx#12 (signed byte) sx#0 Redundant Phi (signed byte) sy#12 (signed byte) sy#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) print_str_at::$0 if(*((byte*) print_str_at::str#13)!=(byte) '@') goto print_str_at::@2 -Simple Condition (bool~) print_sbyte_at::$0 if((signed byte) print_sbyte_at::b#22<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte_at::@1 -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) anim::$0 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto anim::@5 -Simple Condition (bool~) anim::$1 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 254) goto anim::@8 -Simple Condition (bool~) anim::$2 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 253) goto anim::@11 -Simple Condition (bool~) anim::$11 if((byte) anim::i#1!=rangelast(0,7)) goto anim::@13 -Simple Condition (bool~) debug_print_init::$93 if((byte) debug_print_init::j#1!=rangelast(0,3)) goto debug_print_init::@2 -Simple Condition (bool~) debug_print_init::$94 if((byte) debug_print_init::i#1!=rangelast(0,7)) goto debug_print_init::@1 -Simple Condition (bool~) debug_print::$38 if((byte) debug_print::i#1!=rangelast(0,7)) goto debug_print::@1 -Simple Condition (bool~) sprites_init::$3 if((byte) sprites_init::i#1!=rangelast(0,7)) goto sprites_init::@1 +Simple Condition (bool~) print_str_at::$0 [85] if(*((byte*) print_str_at::str#13)!=(byte) '@') goto print_str_at::@2 +Simple Condition (bool~) print_sbyte_at::$0 [93] if((signed byte) print_sbyte_at::b#22<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte_at::@1 +Simple Condition (bool~) print_cls::$1 [137] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) anim::$0 [202] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto anim::@5 +Simple Condition (bool~) anim::$1 [206] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 254) goto anim::@8 +Simple Condition (bool~) anim::$2 [210] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 253) goto anim::@11 +Simple Condition (bool~) anim::$11 [245] if((byte) anim::i#1!=rangelast(0,7)) goto anim::@13 +Simple Condition (bool~) debug_print_init::$93 [419] if((byte) debug_print_init::j#1!=rangelast(0,3)) goto debug_print_init::@2 +Simple Condition (bool~) debug_print_init::$94 [424] if((byte) debug_print_init::i#1!=rangelast(0,7)) goto debug_print_init::@1 +Simple Condition (bool~) debug_print::$38 [625] if((byte) debug_print::i#1!=rangelast(0,7)) goto debug_print::@1 +Simple Condition (bool~) sprites_init::$3 [640] if((byte) sprites_init::i#1!=rangelast(0,7)) goto sprites_init::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -3973,7 +3973,7 @@ Consolidated array index constant in *(rotation_matrix#0+6) Consolidated array index constant in *(rotation_matrix#0+7) Consolidated array index constant in *(rotation_matrix#0+8) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto anim::@2 +if() condition always true - replacing block destination [44] if(true) goto anim::@2 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Eliminating Noop Cast (byte) print_byte_at::b#0 ← ((byte)) (signed byte) print_sbyte_at::b#24 @@ -4101,9 +4101,6 @@ Constant (const byte*) debug_print::$27 = debug_print::at_line#0+debug_print::$2 Constant (const byte*) debug_print::$31 = debug_print::at_line#0+debug_print::$30 Constant (const byte*) debug_print::$35 = debug_print::at_line#0+debug_print::$34 Successful SSA optimization Pass2ConstantIdentification -Consolidated array index constant in assignment *(SINH#0+calculate_matrix::sz#0 + calculate_matrix::t3#0) -Consolidated array index constant in assignment *(SINH#0+-calculate_matrix::sz#0 + calculate_matrix::t4#0) -Successful SSA optimization Pass2ConstantAdditionElimination Culled Empty Block (label) debug_print::@4 Culled Empty Block (label) debug_print::@14 Successful SSA optimization Pass2CullEmptyBlocks @@ -4782,8 +4779,8 @@ store_matrix::@return: scope:[store_matrix] from store_matrix calculate_matrix: scope:[calculate_matrix] from anim::@12 [144] (signed byte) calculate_matrix::t1#0 ← (signed byte) calculate_matrix::sy#0 - (const signed byte) sz#0 [145] (signed byte) calculate_matrix::t2#0 ← (signed byte) calculate_matrix::sy#0 + (const signed byte) sz#0 - [146] (signed byte) calculate_matrix::t3#0 ← (signed byte) calculate_matrix::sx#0 - [147] (signed byte) calculate_matrix::t4#0 ← (signed byte) calculate_matrix::sx#0 + [146] (signed byte) calculate_matrix::t3#0 ← (signed byte) calculate_matrix::sx#0 + (const signed byte) sz#0 + [147] (signed byte) calculate_matrix::t4#0 ← (signed byte) calculate_matrix::sx#0 - (const signed byte) sz#0 [148] (signed byte) calculate_matrix::t5#0 ← (signed byte) calculate_matrix::sx#0 + (signed byte) calculate_matrix::t2#0 [149] (signed byte) calculate_matrix::t6#0 ← (signed byte) calculate_matrix::sx#0 - (signed byte) calculate_matrix::t1#0 [150] (signed byte) calculate_matrix::t7#0 ← (signed byte) calculate_matrix::sx#0 + (signed byte) calculate_matrix::t1#0 @@ -4796,7 +4793,7 @@ calculate_matrix: scope:[calculate_matrix] from anim::@12 [157] *((const signed byte[9]) rotation_matrix#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (signed byte~) calculate_matrix::$11 [158] (signed byte~) calculate_matrix::$12 ← *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::sy#0) + *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::sy#0) [159] *((const signed byte[9]) rotation_matrix#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (signed byte~) calculate_matrix::$12 - [160] (signed byte~) calculate_matrix::$13 ← *((const signed byte*) SINH#0+(const signed byte) sz#0 + (signed byte) calculate_matrix::t3#0) - *((const signed byte*) SINH#0+-(const signed byte) sz#0 + (signed byte) calculate_matrix::t4#0) + [160] (signed byte~) calculate_matrix::$13 ← *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t3#0) - *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t4#0) [161] (signed byte~) calculate_matrix::$14 ← (signed byte~) calculate_matrix::$13 + *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t6#0) [162] (signed byte~) calculate_matrix::$15 ← (signed byte~) calculate_matrix::$14 - *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t5#0) [163] (signed byte~) calculate_matrix::$16 ← (signed byte~) calculate_matrix::$15 + *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t8#0) @@ -6726,11 +6723,15 @@ calculate_matrix: { clc adc sy sta t2 - //SEG291 [146] (signed byte) calculate_matrix::t3#0 ← (signed byte) calculate_matrix::sx#0 -- vbsz1=vbsz2 - lda sx + //SEG291 [146] (signed byte) calculate_matrix::t3#0 ← (signed byte) calculate_matrix::sx#0 + (const signed byte) sz#0 -- vbsz1=vbsz2_plus_vbsc1 + lda #sz + clc + adc sx sta t3 - //SEG292 [147] (signed byte) calculate_matrix::t4#0 ← (signed byte) calculate_matrix::sx#0 -- vbsz1=vbsz2 + //SEG292 [147] (signed byte) calculate_matrix::t4#0 ← (signed byte) calculate_matrix::sx#0 - (const signed byte) sz#0 -- vbsz1=vbsz2_minus_vbsc1 lda sx + sec + sbc #sz sta t4 //SEG293 [148] (signed byte) calculate_matrix::t5#0 ← (signed byte) calculate_matrix::sx#0 + (signed byte) calculate_matrix::t2#0 -- vbsz1=vbsz2_plus_vbsz3 lda sx @@ -6791,12 +6792,12 @@ calculate_matrix: { //SEG304 [159] *((const signed byte[9]) rotation_matrix#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (signed byte~) calculate_matrix::$12 -- _deref_pbsc1=vbsz1 lda _12 sta rotation_matrix+2 - //SEG305 [160] (signed byte~) calculate_matrix::$13 ← *((const signed byte*) SINH#0+(const signed byte) sz#0 + (signed byte) calculate_matrix::t3#0) - *((const signed byte*) SINH#0+-(const signed byte) sz#0 + (signed byte) calculate_matrix::t4#0) -- vbsz1=pbsc1_derefidx_vbsz2_minus_pbsc2_derefidx_vbsz3 + //SEG305 [160] (signed byte~) calculate_matrix::$13 ← *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t3#0) - *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t4#0) -- vbsz1=pbsc1_derefidx_vbsz2_minus_pbsc1_derefidx_vbsz3 ldx t3 ldy t4 sec - lda SINH+sz,x - sbc SINH+-sz,y + lda SINH,x + sbc SINH,y sta _13 //SEG306 [161] (signed byte~) calculate_matrix::$14 ← (signed byte~) calculate_matrix::$13 + *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t6#0) -- vbsz1=vbsz2_plus_pbsc1_derefidx_vbsz3 lda _13 @@ -7823,9 +7824,11 @@ Removing always clobbered register reg byte a as potential for zp ZP_BYTE:23 [ c Removing always clobbered register reg byte a as potential for zp ZP_BYTE:24 [ calculate_matrix::sy#0 ] Statement [145] (signed byte) calculate_matrix::t2#0 ← (signed byte) calculate_matrix::sy#0 + (const signed byte) sz#0 [ calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:46 [ calculate_matrix::t1#0 ] -Statement [148] (signed byte) calculate_matrix::t5#0 ← (signed byte) calculate_matrix::sx#0 + (signed byte) calculate_matrix::t2#0 [ calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 ] ) always clobbers reg byte a +Statement [146] (signed byte) calculate_matrix::t3#0 ← (signed byte) calculate_matrix::sx#0 + (const signed byte) sz#0 [ calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:47 [ calculate_matrix::t2#0 ] +Statement [147] (signed byte) calculate_matrix::t4#0 ← (signed byte) calculate_matrix::sx#0 - (const signed byte) sz#0 [ calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 calculate_matrix::t4#0 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 calculate_matrix::t4#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:48 [ calculate_matrix::t3#0 ] +Statement [148] (signed byte) calculate_matrix::t5#0 ← (signed byte) calculate_matrix::sx#0 + (signed byte) calculate_matrix::t2#0 [ calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:49 [ calculate_matrix::t4#0 ] Statement [149] (signed byte) calculate_matrix::t6#0 ← (signed byte) calculate_matrix::sx#0 - (signed byte) calculate_matrix::t1#0 [ calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:50 [ calculate_matrix::t5#0 ] @@ -7841,7 +7844,7 @@ Statement [154] (signed byte~) calculate_matrix::$10 ← *((const signed byte*) Removing always clobbered register reg byte a as potential for zp ZP_BYTE:55 [ calculate_matrix::t10#0 ] Statement [156] (signed byte~) calculate_matrix::$11 ← *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t1#0) - *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t2#0) [ calculate_matrix::sy#0 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$11 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::sy#0 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$11 ] ) always clobbers reg byte a Statement [158] (signed byte~) calculate_matrix::$12 ← *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::sy#0) + *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::sy#0) [ calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$12 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$12 ] ) always clobbers reg byte a -Statement [160] (signed byte~) calculate_matrix::$13 ← *((const signed byte*) SINH#0+(const signed byte) sz#0 + (signed byte) calculate_matrix::t3#0) - *((const signed byte*) SINH#0+-(const signed byte) sz#0 + (signed byte) calculate_matrix::t4#0) [ calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$13 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$13 ] ) always clobbers reg byte a +Statement [160] (signed byte~) calculate_matrix::$13 ← *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t3#0) - *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t4#0) [ calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$13 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$13 ] ) always clobbers reg byte a Statement [161] (signed byte~) calculate_matrix::$14 ← (signed byte~) calculate_matrix::$13 + *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t6#0) [ calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$14 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$14 ] ) always clobbers reg byte a Potential register analysis [162] calculate_matrix::$15 ← calculate_matrix::$14 - *(COSQ#0 + calculate_matrix::t5#0) missing fragment vbsaa=vbsxx_minus_pbsc1_derefidx_vbsxx allocation: reg byte x [ calculate_matrix::$14 ] reg byte a [ calculate_matrix::$15 ] reg byte x [ calculate_matrix::t5#0 ] Potential register analysis [162] calculate_matrix::$15 ← calculate_matrix::$14 - *(COSQ#0 + calculate_matrix::t5#0) missing fragment vbsaa=vbsyy_minus_pbsc1_derefidx_vbsyy allocation: reg byte y [ calculate_matrix::$14 ] reg byte a [ calculate_matrix::$15 ] reg byte y [ calculate_matrix::t5#0 ] @@ -8004,6 +8007,8 @@ Statement asm { ldxzr C1: ldamulf_sqr1,x sec C2: sbcmulf_sqr2,x staC3+1 F1: ldam Statement asm { ldarotation_matrix+0 starotate_matrix.A1+1 eor#$ff starotate_matrix.A2+1 ldarotation_matrix+1 starotate_matrix.B1+1 eor#$ff starotate_matrix.B2+1 ldarotation_matrix+2 starotate_matrix.C1+1 eor#$ff starotate_matrix.C2+1 ldarotation_matrix+3 starotate_matrix.D1+1 eor#$ff starotate_matrix.D2+1 ldarotation_matrix+4 starotate_matrix.E1+1 eor#$ff starotate_matrix.E2+1 ldarotation_matrix+5 starotate_matrix.F1+1 eor#$ff starotate_matrix.F2+1 ldarotation_matrix+6 starotate_matrix.G1+1 eor#$ff starotate_matrix.G2+1 ldarotation_matrix+7 starotate_matrix.H1+1 eor#$ff starotate_matrix.H2+1 ldarotation_matrix+8 starotate_matrix.I1+1 eor#$ff starotate_matrix.I2+1 } always clobbers reg byte a Statement [144] (signed byte) calculate_matrix::t1#0 ← (signed byte) calculate_matrix::sy#0 - (const signed byte) sz#0 [ calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 ] ) always clobbers reg byte a Statement [145] (signed byte) calculate_matrix::t2#0 ← (signed byte) calculate_matrix::sy#0 + (const signed byte) sz#0 [ calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 ] ) always clobbers reg byte a +Statement [146] (signed byte) calculate_matrix::t3#0 ← (signed byte) calculate_matrix::sx#0 + (const signed byte) sz#0 [ calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 ] ) always clobbers reg byte a +Statement [147] (signed byte) calculate_matrix::t4#0 ← (signed byte) calculate_matrix::sx#0 - (const signed byte) sz#0 [ calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 calculate_matrix::t4#0 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 calculate_matrix::t4#0 ] ) always clobbers reg byte a Statement [148] (signed byte) calculate_matrix::t5#0 ← (signed byte) calculate_matrix::sx#0 + (signed byte) calculate_matrix::t2#0 [ calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 ] ) always clobbers reg byte a Statement [149] (signed byte) calculate_matrix::t6#0 ← (signed byte) calculate_matrix::sx#0 - (signed byte) calculate_matrix::t1#0 [ calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 ] ) always clobbers reg byte a Statement [150] (signed byte) calculate_matrix::t7#0 ← (signed byte) calculate_matrix::sx#0 + (signed byte) calculate_matrix::t1#0 [ calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::sx#0 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 ] ) always clobbers reg byte a @@ -8013,7 +8018,7 @@ Statement [153] (signed byte) calculate_matrix::t10#0 ← (signed byte) calculat Statement [154] (signed byte~) calculate_matrix::$10 ← *((const signed byte*) COSH#0 + (signed byte) calculate_matrix::t1#0) + *((const signed byte*) COSH#0 + (signed byte) calculate_matrix::t2#0) [ calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$10 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::sy#0 calculate_matrix::t1#0 calculate_matrix::t2#0 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$10 ] ) always clobbers reg byte a Statement [156] (signed byte~) calculate_matrix::$11 ← *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t1#0) - *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t2#0) [ calculate_matrix::sy#0 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$11 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::sy#0 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$11 ] ) always clobbers reg byte a Statement [158] (signed byte~) calculate_matrix::$12 ← *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::sy#0) + *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::sy#0) [ calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$12 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$12 ] ) always clobbers reg byte a -Statement [160] (signed byte~) calculate_matrix::$13 ← *((const signed byte*) SINH#0+(const signed byte) sz#0 + (signed byte) calculate_matrix::t3#0) - *((const signed byte*) SINH#0+-(const signed byte) sz#0 + (signed byte) calculate_matrix::t4#0) [ calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$13 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$13 ] ) always clobbers reg byte a +Statement [160] (signed byte~) calculate_matrix::$13 ← *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t3#0) - *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t4#0) [ calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$13 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$13 ] ) always clobbers reg byte a Statement [161] (signed byte~) calculate_matrix::$14 ← (signed byte~) calculate_matrix::$13 + *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t6#0) [ calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$14 ] ( main:11::anim:19::calculate_matrix:29 [ sx#10 sy#10 calculate_matrix::t3#0 calculate_matrix::t4#0 calculate_matrix::t5#0 calculate_matrix::t6#0 calculate_matrix::t7#0 calculate_matrix::t8#0 calculate_matrix::t9#0 calculate_matrix::t10#0 calculate_matrix::$14 ] ) always clobbers reg byte a Potential register analysis [162] calculate_matrix::$15 ← calculate_matrix::$14 - *(COSQ#0 + calculate_matrix::t5#0) missing fragment vbsaa=vbsxx_minus_pbsc1_derefidx_vbsxx allocation: reg byte x [ calculate_matrix::$14 ] reg byte a [ calculate_matrix::$15 ] reg byte x [ calculate_matrix::t5#0 ] Potential register analysis [162] calculate_matrix::$15 ← calculate_matrix::$14 - *(COSQ#0 + calculate_matrix::t5#0) missing fragment vbsaa=vbsyy_minus_pbsc1_derefidx_vbsyy allocation: reg byte y [ calculate_matrix::$14 ] reg byte a [ calculate_matrix::$15 ] reg byte y [ calculate_matrix::t5#0 ] @@ -8236,130 +8241,130 @@ Uplift Scope [print_byte_at] 4: zp ZP_BYTE:44 [ print_byte_at::$0 ] 2: zp ZP_BYT Uplift Scope [main] Uplift Scope [store_matrix] -Uplifting [debug_print_init] best 96490 combination zp ZP_WORD:82 [ debug_print_init::$59 ] zp ZP_WORD:84 [ debug_print_init::$60 ] zp ZP_WORD:86 [ debug_print_init::$63 ] zp ZP_WORD:88 [ debug_print_init::$64 ] zp ZP_WORD:90 [ debug_print_init::$67 ] zp ZP_WORD:92 [ debug_print_init::$68 ] zp ZP_WORD:94 [ debug_print_init::$71 ] zp ZP_WORD:96 [ debug_print_init::$72 ] zp ZP_WORD:98 [ debug_print_init::$75 ] zp ZP_WORD:100 [ debug_print_init::$76 ] zp ZP_WORD:102 [ debug_print_init::$79 ] zp ZP_WORD:104 [ debug_print_init::$80 ] zp ZP_WORD:106 [ debug_print_init::$83 ] zp ZP_WORD:108 [ debug_print_init::$84 ] zp ZP_WORD:110 [ debug_print_init::$87 ] zp ZP_WORD:112 [ debug_print_init::$88 ] zp ZP_WORD:114 [ debug_print_init::$91 ] zp ZP_WORD:116 [ debug_print_init::$92 ] reg byte x [ debug_print_init::j#2 debug_print_init::j#1 ] zp ZP_BYTE:81 [ debug_print_init::col#0 ] zp ZP_BYTE:13 [ debug_print_init::c#2 debug_print_init::c#1 ] zp ZP_BYTE:14 [ debug_print_init::i#2 debug_print_init::i#1 ] -Uplifting [print_sbyte_at] best 95819 combination reg byte x [ print_sbyte_at::b#24 print_sbyte_at::b#0 print_sbyte_at::b#22 print_sbyte_at::b#16 print_sbyte_at::b#17 print_sbyte_at::b#18 print_sbyte_at::b#19 print_sbyte_at::b#20 print_sbyte_at::b#21 print_sbyte_at::b#4 print_sbyte_at::b#13 print_sbyte_at::b#14 print_sbyte_at::b#15 print_sbyte_at::b#5 print_sbyte_at::b#7 print_sbyte_at::b#8 print_sbyte_at::b#9 print_sbyte_at::b#10 print_sbyte_at::b#11 print_sbyte_at::b#12 print_sbyte_at::b#1 print_sbyte_at::b#2 print_sbyte_at::b#3 ] zp ZP_WORD:7 [ print_sbyte_at::at#21 print_sbyte_at::at#15 print_sbyte_at::at#16 print_sbyte_at::at#17 print_sbyte_at::at#18 print_sbyte_at::at#19 print_sbyte_at::at#20 print_sbyte_at::at#0 print_sbyte_at::at#1 print_sbyte_at::at#2 ] -Uplifting [anim] best 93919 combination zp ZP_BYTE:4 [ anim::i#2 anim::i#1 ] reg byte a [ anim::$8 ] reg byte a [ anim::$10 ] reg byte x [ anim::i2#0 ] -Uplifting [debug_print] best 93905 combination zp ZP_BYTE:6 [ debug_print::i#2 debug_print::i#1 ] zp ZP_BYTE:5 [ debug_print::c#2 debug_print::c#1 ] reg byte x [ debug_print::print_sbyte_pos1_sb#0 ] reg byte a [ debug_print::print_sbyte_pos2_sb#0 ] reg byte a [ debug_print::print_sbyte_pos4_sb#0 ] zp ZP_BYTE:34 [ debug_print::print_sbyte_pos5_sb#0 ] zp ZP_BYTE:35 [ debug_print::print_sbyte_pos6_sb#0 ] zp ZP_BYTE:36 [ debug_print::print_sbyte_pos7_sb#0 ] zp ZP_BYTE:37 [ debug_print::print_sbyte_pos8_sb#0 ] zp ZP_BYTE:38 [ debug_print::print_sbyte_pos9_sb#0 ] zp ZP_BYTE:39 [ debug_print::print_sbyte_pos10_sb#0 ] zp ZP_BYTE:40 [ debug_print::print_sbyte_pos11_sb#0 ] zp ZP_BYTE:41 [ debug_print::print_sbyte_pos12_sb#0 ] +Uplifting [debug_print_init] best 96498 combination zp ZP_WORD:82 [ debug_print_init::$59 ] zp ZP_WORD:84 [ debug_print_init::$60 ] zp ZP_WORD:86 [ debug_print_init::$63 ] zp ZP_WORD:88 [ debug_print_init::$64 ] zp ZP_WORD:90 [ debug_print_init::$67 ] zp ZP_WORD:92 [ debug_print_init::$68 ] zp ZP_WORD:94 [ debug_print_init::$71 ] zp ZP_WORD:96 [ debug_print_init::$72 ] zp ZP_WORD:98 [ debug_print_init::$75 ] zp ZP_WORD:100 [ debug_print_init::$76 ] zp ZP_WORD:102 [ debug_print_init::$79 ] zp ZP_WORD:104 [ debug_print_init::$80 ] zp ZP_WORD:106 [ debug_print_init::$83 ] zp ZP_WORD:108 [ debug_print_init::$84 ] zp ZP_WORD:110 [ debug_print_init::$87 ] zp ZP_WORD:112 [ debug_print_init::$88 ] zp ZP_WORD:114 [ debug_print_init::$91 ] zp ZP_WORD:116 [ debug_print_init::$92 ] reg byte x [ debug_print_init::j#2 debug_print_init::j#1 ] zp ZP_BYTE:81 [ debug_print_init::col#0 ] zp ZP_BYTE:13 [ debug_print_init::c#2 debug_print_init::c#1 ] zp ZP_BYTE:14 [ debug_print_init::i#2 debug_print_init::i#1 ] +Uplifting [print_sbyte_at] best 95827 combination reg byte x [ print_sbyte_at::b#24 print_sbyte_at::b#0 print_sbyte_at::b#22 print_sbyte_at::b#16 print_sbyte_at::b#17 print_sbyte_at::b#18 print_sbyte_at::b#19 print_sbyte_at::b#20 print_sbyte_at::b#21 print_sbyte_at::b#4 print_sbyte_at::b#13 print_sbyte_at::b#14 print_sbyte_at::b#15 print_sbyte_at::b#5 print_sbyte_at::b#7 print_sbyte_at::b#8 print_sbyte_at::b#9 print_sbyte_at::b#10 print_sbyte_at::b#11 print_sbyte_at::b#12 print_sbyte_at::b#1 print_sbyte_at::b#2 print_sbyte_at::b#3 ] zp ZP_WORD:7 [ print_sbyte_at::at#21 print_sbyte_at::at#15 print_sbyte_at::at#16 print_sbyte_at::at#17 print_sbyte_at::at#18 print_sbyte_at::at#19 print_sbyte_at::at#20 print_sbyte_at::at#0 print_sbyte_at::at#1 print_sbyte_at::at#2 ] +Uplifting [anim] best 93927 combination zp ZP_BYTE:4 [ anim::i#2 anim::i#1 ] reg byte a [ anim::$8 ] reg byte a [ anim::$10 ] reg byte x [ anim::i2#0 ] +Uplifting [debug_print] best 93913 combination zp ZP_BYTE:6 [ debug_print::i#2 debug_print::i#1 ] zp ZP_BYTE:5 [ debug_print::c#2 debug_print::c#1 ] reg byte x [ debug_print::print_sbyte_pos1_sb#0 ] reg byte a [ debug_print::print_sbyte_pos2_sb#0 ] reg byte a [ debug_print::print_sbyte_pos4_sb#0 ] zp ZP_BYTE:34 [ debug_print::print_sbyte_pos5_sb#0 ] zp ZP_BYTE:35 [ debug_print::print_sbyte_pos6_sb#0 ] zp ZP_BYTE:36 [ debug_print::print_sbyte_pos7_sb#0 ] zp ZP_BYTE:37 [ debug_print::print_sbyte_pos8_sb#0 ] zp ZP_BYTE:38 [ debug_print::print_sbyte_pos9_sb#0 ] zp ZP_BYTE:39 [ debug_print::print_sbyte_pos10_sb#0 ] zp ZP_BYTE:40 [ debug_print::print_sbyte_pos11_sb#0 ] zp ZP_BYTE:41 [ debug_print::print_sbyte_pos12_sb#0 ] Limited combination testing to 100 combinations of 16777216 possible. -Uplifting [rotate_matrix] best 93503 combination zp ZP_BYTE:25 [ rotate_matrix::x#0 ] reg byte y [ rotate_matrix::y#0 ] reg byte x [ rotate_matrix::z#0 ] -Uplifting [print_str_at] best 93503 combination zp ZP_WORD:16 [ print_str_at::str#13 print_str_at::str#15 print_str_at::str#0 ] zp ZP_WORD:18 [ print_str_at::at#13 print_str_at::at#15 print_str_at::at#0 ] -Uplifting [print_char_at] best 93503 combination zp ZP_WORD:11 [ print_char_at::at#4 print_char_at::at#2 print_char_at::at#3 print_char_at::at#0 print_char_at::at#1 ] zp ZP_BYTE:10 [ print_char_at::ch#4 print_char_at::ch#2 print_char_at::ch#3 ] -Uplifting [] best 93503 combination zp ZP_BYTE:3 [ sy#10 sy#3 ] zp ZP_BYTE:2 [ sx#10 sx#3 ] -Uplifting [print_cls] best 93503 combination zp ZP_WORD:20 [ print_cls::sc#2 print_cls::sc#1 ] -Uplifting [sprites_init] best 93353 combination reg byte x [ sprites_init::i#2 sprites_init::i#1 ] -Uplifting [print_byte_at] best 93345 combination reg byte a [ print_byte_at::$0 ] reg byte x [ print_byte_at::$2 ] zp ZP_WORD:42 [ print_byte_at::at#0 ] -Uplifting [main] best 93345 combination -Uplifting [store_matrix] best 93345 combination +Uplifting [rotate_matrix] best 93511 combination zp ZP_BYTE:25 [ rotate_matrix::x#0 ] reg byte y [ rotate_matrix::y#0 ] reg byte x [ rotate_matrix::z#0 ] +Uplifting [print_str_at] best 93511 combination zp ZP_WORD:16 [ print_str_at::str#13 print_str_at::str#15 print_str_at::str#0 ] zp ZP_WORD:18 [ print_str_at::at#13 print_str_at::at#15 print_str_at::at#0 ] +Uplifting [print_char_at] best 93511 combination zp ZP_WORD:11 [ print_char_at::at#4 print_char_at::at#2 print_char_at::at#3 print_char_at::at#0 print_char_at::at#1 ] zp ZP_BYTE:10 [ print_char_at::ch#4 print_char_at::ch#2 print_char_at::ch#3 ] +Uplifting [] best 93511 combination zp ZP_BYTE:3 [ sy#10 sy#3 ] zp ZP_BYTE:2 [ sx#10 sx#3 ] +Uplifting [print_cls] best 93511 combination zp ZP_WORD:20 [ print_cls::sc#2 print_cls::sc#1 ] +Uplifting [sprites_init] best 93361 combination reg byte x [ sprites_init::i#2 sprites_init::i#1 ] +Uplifting [print_byte_at] best 93353 combination reg byte a [ print_byte_at::$0 ] reg byte x [ print_byte_at::$2 ] zp ZP_WORD:42 [ print_byte_at::at#0 ] +Uplifting [main] best 93353 combination +Uplifting [store_matrix] best 93353 combination Attempting to uplift remaining variables inzp ZP_BYTE:4 [ anim::i#2 anim::i#1 ] -Uplifting [anim] best 93345 combination zp ZP_BYTE:4 [ anim::i#2 anim::i#1 ] +Uplifting [anim] best 93353 combination zp ZP_BYTE:4 [ anim::i#2 anim::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:6 [ debug_print::i#2 debug_print::i#1 ] -Uplifting [debug_print] best 93345 combination zp ZP_BYTE:6 [ debug_print::i#2 debug_print::i#1 ] +Uplifting [debug_print] best 93353 combination zp ZP_BYTE:6 [ debug_print::i#2 debug_print::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:5 [ debug_print::c#2 debug_print::c#1 ] -Uplifting [debug_print] best 93345 combination zp ZP_BYTE:5 [ debug_print::c#2 debug_print::c#1 ] +Uplifting [debug_print] best 93353 combination zp ZP_BYTE:5 [ debug_print::c#2 debug_print::c#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:81 [ debug_print_init::col#0 ] -Uplifting [debug_print_init] best 93345 combination zp ZP_BYTE:81 [ debug_print_init::col#0 ] +Uplifting [debug_print_init] best 93353 combination zp ZP_BYTE:81 [ debug_print_init::col#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:25 [ rotate_matrix::x#0 ] -Uplifting [rotate_matrix] best 93345 combination zp ZP_BYTE:25 [ rotate_matrix::x#0 ] +Uplifting [rotate_matrix] best 93353 combination zp ZP_BYTE:25 [ rotate_matrix::x#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:13 [ debug_print_init::c#2 debug_print_init::c#1 ] -Uplifting [debug_print_init] best 93345 combination zp ZP_BYTE:13 [ debug_print_init::c#2 debug_print_init::c#1 ] +Uplifting [debug_print_init] best 93353 combination zp ZP_BYTE:13 [ debug_print_init::c#2 debug_print_init::c#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:3 [ sy#10 sy#3 ] -Uplifting [] best 93345 combination zp ZP_BYTE:3 [ sy#10 sy#3 ] +Uplifting [] best 93353 combination zp ZP_BYTE:3 [ sy#10 sy#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:14 [ debug_print_init::i#2 debug_print_init::i#1 ] -Uplifting [debug_print_init] best 93345 combination zp ZP_BYTE:14 [ debug_print_init::i#2 debug_print_init::i#1 ] +Uplifting [debug_print_init] best 93353 combination zp ZP_BYTE:14 [ debug_print_init::i#2 debug_print_init::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:10 [ print_char_at::ch#4 print_char_at::ch#2 print_char_at::ch#3 ] -Uplifting [print_char_at] best 93345 combination zp ZP_BYTE:10 [ print_char_at::ch#4 print_char_at::ch#2 print_char_at::ch#3 ] +Uplifting [print_char_at] best 93353 combination zp ZP_BYTE:10 [ print_char_at::ch#4 print_char_at::ch#2 print_char_at::ch#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:2 [ sx#10 sx#3 ] -Uplifting [] best 93345 combination zp ZP_BYTE:2 [ sx#10 sx#3 ] +Uplifting [] best 93353 combination zp ZP_BYTE:2 [ sx#10 sx#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:34 [ debug_print::print_sbyte_pos5_sb#0 ] -Uplifting [debug_print] best 93339 combination reg byte x [ debug_print::print_sbyte_pos5_sb#0 ] +Uplifting [debug_print] best 93347 combination reg byte x [ debug_print::print_sbyte_pos5_sb#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:35 [ debug_print::print_sbyte_pos6_sb#0 ] -Uplifting [debug_print] best 93333 combination reg byte x [ debug_print::print_sbyte_pos6_sb#0 ] +Uplifting [debug_print] best 93341 combination reg byte x [ debug_print::print_sbyte_pos6_sb#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:36 [ debug_print::print_sbyte_pos7_sb#0 ] -Uplifting [debug_print] best 93327 combination reg byte x [ debug_print::print_sbyte_pos7_sb#0 ] +Uplifting [debug_print] best 93335 combination reg byte x [ debug_print::print_sbyte_pos7_sb#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:37 [ debug_print::print_sbyte_pos8_sb#0 ] -Uplifting [debug_print] best 93321 combination reg byte x [ debug_print::print_sbyte_pos8_sb#0 ] +Uplifting [debug_print] best 93329 combination reg byte x [ debug_print::print_sbyte_pos8_sb#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:38 [ debug_print::print_sbyte_pos9_sb#0 ] -Uplifting [debug_print] best 93315 combination reg byte x [ debug_print::print_sbyte_pos9_sb#0 ] +Uplifting [debug_print] best 93323 combination reg byte x [ debug_print::print_sbyte_pos9_sb#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:39 [ debug_print::print_sbyte_pos10_sb#0 ] -Uplifting [debug_print] best 93309 combination reg byte x [ debug_print::print_sbyte_pos10_sb#0 ] +Uplifting [debug_print] best 93317 combination reg byte x [ debug_print::print_sbyte_pos10_sb#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:40 [ debug_print::print_sbyte_pos11_sb#0 ] -Uplifting [debug_print] best 93303 combination reg byte x [ debug_print::print_sbyte_pos11_sb#0 ] +Uplifting [debug_print] best 93311 combination reg byte x [ debug_print::print_sbyte_pos11_sb#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:41 [ debug_print::print_sbyte_pos12_sb#0 ] -Uplifting [debug_print] best 93297 combination reg byte x [ debug_print::print_sbyte_pos12_sb#0 ] +Uplifting [debug_print] best 93305 combination reg byte x [ debug_print::print_sbyte_pos12_sb#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:56 [ calculate_matrix::$10 ] -Uplifting [calculate_matrix] best 93291 combination reg byte a [ calculate_matrix::$10 ] +Uplifting [calculate_matrix] best 93299 combination reg byte a [ calculate_matrix::$10 ] Attempting to uplift remaining variables inzp ZP_BYTE:57 [ calculate_matrix::$11 ] -Uplifting [calculate_matrix] best 93285 combination reg byte a [ calculate_matrix::$11 ] +Uplifting [calculate_matrix] best 93293 combination reg byte a [ calculate_matrix::$11 ] Attempting to uplift remaining variables inzp ZP_BYTE:58 [ calculate_matrix::$12 ] -Uplifting [calculate_matrix] best 93279 combination reg byte a [ calculate_matrix::$12 ] +Uplifting [calculate_matrix] best 93287 combination reg byte a [ calculate_matrix::$12 ] Attempting to uplift remaining variables inzp ZP_BYTE:59 [ calculate_matrix::$13 ] -Uplifting [calculate_matrix] best 93273 combination reg byte a [ calculate_matrix::$13 ] +Uplifting [calculate_matrix] best 93281 combination reg byte a [ calculate_matrix::$13 ] Attempting to uplift remaining variables inzp ZP_BYTE:60 [ calculate_matrix::$14 ] -Uplifting [calculate_matrix] best 93267 combination reg byte a [ calculate_matrix::$14 ] +Uplifting [calculate_matrix] best 93275 combination reg byte a [ calculate_matrix::$14 ] Attempting to uplift remaining variables inzp ZP_BYTE:61 [ calculate_matrix::$15 ] -Uplifting [calculate_matrix] best 93261 combination reg byte a [ calculate_matrix::$15 ] +Uplifting [calculate_matrix] best 93269 combination reg byte a [ calculate_matrix::$15 ] Attempting to uplift remaining variables inzp ZP_BYTE:62 [ calculate_matrix::$16 ] -Uplifting [calculate_matrix] best 93255 combination reg byte a [ calculate_matrix::$16 ] +Uplifting [calculate_matrix] best 93263 combination reg byte a [ calculate_matrix::$16 ] Attempting to uplift remaining variables inzp ZP_BYTE:63 [ calculate_matrix::$17 ] -Uplifting [calculate_matrix] best 93249 combination reg byte a [ calculate_matrix::$17 ] +Uplifting [calculate_matrix] best 93257 combination reg byte a [ calculate_matrix::$17 ] Attempting to uplift remaining variables inzp ZP_BYTE:64 [ calculate_matrix::$18 ] -Uplifting [calculate_matrix] best 93243 combination reg byte a [ calculate_matrix::$18 ] +Uplifting [calculate_matrix] best 93251 combination reg byte a [ calculate_matrix::$18 ] Attempting to uplift remaining variables inzp ZP_BYTE:65 [ calculate_matrix::$19 ] -Uplifting [calculate_matrix] best 93237 combination reg byte a [ calculate_matrix::$19 ] +Uplifting [calculate_matrix] best 93245 combination reg byte a [ calculate_matrix::$19 ] Attempting to uplift remaining variables inzp ZP_BYTE:66 [ calculate_matrix::$20 ] -Uplifting [calculate_matrix] best 93231 combination reg byte a [ calculate_matrix::$20 ] +Uplifting [calculate_matrix] best 93239 combination reg byte a [ calculate_matrix::$20 ] Attempting to uplift remaining variables inzp ZP_BYTE:67 [ calculate_matrix::$21 ] -Uplifting [calculate_matrix] best 93225 combination reg byte a [ calculate_matrix::$21 ] +Uplifting [calculate_matrix] best 93233 combination reg byte a [ calculate_matrix::$21 ] Attempting to uplift remaining variables inzp ZP_BYTE:68 [ calculate_matrix::$22 ] -Uplifting [calculate_matrix] best 93219 combination reg byte a [ calculate_matrix::$22 ] +Uplifting [calculate_matrix] best 93227 combination reg byte a [ calculate_matrix::$22 ] Attempting to uplift remaining variables inzp ZP_BYTE:69 [ calculate_matrix::$23 ] -Uplifting [calculate_matrix] best 93213 combination reg byte a [ calculate_matrix::$23 ] +Uplifting [calculate_matrix] best 93221 combination reg byte a [ calculate_matrix::$23 ] Attempting to uplift remaining variables inzp ZP_BYTE:70 [ calculate_matrix::$24 ] -Uplifting [calculate_matrix] best 93207 combination reg byte a [ calculate_matrix::$24 ] +Uplifting [calculate_matrix] best 93215 combination reg byte a [ calculate_matrix::$24 ] Attempting to uplift remaining variables inzp ZP_BYTE:71 [ calculate_matrix::$25 ] -Uplifting [calculate_matrix] best 93201 combination reg byte a [ calculate_matrix::$25 ] +Uplifting [calculate_matrix] best 93209 combination reg byte a [ calculate_matrix::$25 ] Attempting to uplift remaining variables inzp ZP_BYTE:72 [ calculate_matrix::$26 ] -Uplifting [calculate_matrix] best 93195 combination reg byte a [ calculate_matrix::$26 ] +Uplifting [calculate_matrix] best 93203 combination reg byte a [ calculate_matrix::$26 ] Attempting to uplift remaining variables inzp ZP_BYTE:73 [ calculate_matrix::$27 ] -Uplifting [calculate_matrix] best 93189 combination reg byte a [ calculate_matrix::$27 ] +Uplifting [calculate_matrix] best 93197 combination reg byte a [ calculate_matrix::$27 ] Attempting to uplift remaining variables inzp ZP_BYTE:74 [ calculate_matrix::$28 ] -Uplifting [calculate_matrix] best 93183 combination reg byte a [ calculate_matrix::$28 ] +Uplifting [calculate_matrix] best 93191 combination reg byte a [ calculate_matrix::$28 ] Attempting to uplift remaining variables inzp ZP_BYTE:75 [ calculate_matrix::$29 ] -Uplifting [calculate_matrix] best 93177 combination reg byte a [ calculate_matrix::$29 ] +Uplifting [calculate_matrix] best 93185 combination reg byte a [ calculate_matrix::$29 ] Attempting to uplift remaining variables inzp ZP_BYTE:76 [ calculate_matrix::$30 ] -Uplifting [calculate_matrix] best 93171 combination reg byte a [ calculate_matrix::$30 ] +Uplifting [calculate_matrix] best 93179 combination reg byte a [ calculate_matrix::$30 ] Attempting to uplift remaining variables inzp ZP_BYTE:77 [ calculate_matrix::$31 ] -Uplifting [calculate_matrix] best 93165 combination reg byte a [ calculate_matrix::$31 ] +Uplifting [calculate_matrix] best 93173 combination reg byte a [ calculate_matrix::$31 ] Attempting to uplift remaining variables inzp ZP_BYTE:78 [ calculate_matrix::$32 ] -Uplifting [calculate_matrix] best 93159 combination reg byte a [ calculate_matrix::$32 ] +Uplifting [calculate_matrix] best 93167 combination reg byte a [ calculate_matrix::$32 ] Attempting to uplift remaining variables inzp ZP_BYTE:79 [ calculate_matrix::$33 ] -Uplifting [calculate_matrix] best 93153 combination reg byte a [ calculate_matrix::$33 ] +Uplifting [calculate_matrix] best 93161 combination reg byte a [ calculate_matrix::$33 ] Attempting to uplift remaining variables inzp ZP_BYTE:80 [ calculate_matrix::$34 ] -Uplifting [calculate_matrix] best 93147 combination reg byte a [ calculate_matrix::$34 ] +Uplifting [calculate_matrix] best 93155 combination reg byte a [ calculate_matrix::$34 ] Attempting to uplift remaining variables inzp ZP_BYTE:23 [ calculate_matrix::sx#0 ] -Uplifting [calculate_matrix] best 93109 combination reg byte x [ calculate_matrix::sx#0 ] +Uplifting [calculate_matrix] best 93121 combination reg byte x [ calculate_matrix::sx#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:24 [ calculate_matrix::sy#0 ] -Uplifting [calculate_matrix] best 93109 combination zp ZP_BYTE:24 [ calculate_matrix::sy#0 ] +Uplifting [calculate_matrix] best 93121 combination zp ZP_BYTE:24 [ calculate_matrix::sy#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:47 [ calculate_matrix::t2#0 ] -Uplifting [calculate_matrix] best 93106 combination reg byte y [ calculate_matrix::t2#0 ] +Uplifting [calculate_matrix] best 93118 combination reg byte y [ calculate_matrix::t2#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:46 [ calculate_matrix::t1#0 ] -Uplifting [calculate_matrix] best 93106 combination zp ZP_BYTE:46 [ calculate_matrix::t1#0 ] +Uplifting [calculate_matrix] best 93118 combination zp ZP_BYTE:46 [ calculate_matrix::t1#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:51 [ calculate_matrix::t6#0 ] -Uplifting [calculate_matrix] best 93106 combination zp ZP_BYTE:51 [ calculate_matrix::t6#0 ] +Uplifting [calculate_matrix] best 93118 combination zp ZP_BYTE:51 [ calculate_matrix::t6#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:49 [ calculate_matrix::t4#0 ] -Uplifting [calculate_matrix] best 93106 combination zp ZP_BYTE:49 [ calculate_matrix::t4#0 ] +Uplifting [calculate_matrix] best 93118 combination zp ZP_BYTE:49 [ calculate_matrix::t4#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:52 [ calculate_matrix::t7#0 ] -Uplifting [calculate_matrix] best 93106 combination zp ZP_BYTE:52 [ calculate_matrix::t7#0 ] +Uplifting [calculate_matrix] best 93118 combination zp ZP_BYTE:52 [ calculate_matrix::t7#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:53 [ calculate_matrix::t8#0 ] -Uplifting [calculate_matrix] best 93106 combination zp ZP_BYTE:53 [ calculate_matrix::t8#0 ] +Uplifting [calculate_matrix] best 93118 combination zp ZP_BYTE:53 [ calculate_matrix::t8#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:48 [ calculate_matrix::t3#0 ] -Uplifting [calculate_matrix] best 93106 combination zp ZP_BYTE:48 [ calculate_matrix::t3#0 ] +Uplifting [calculate_matrix] best 93118 combination zp ZP_BYTE:48 [ calculate_matrix::t3#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:50 [ calculate_matrix::t5#0 ] -Uplifting [calculate_matrix] best 93106 combination zp ZP_BYTE:50 [ calculate_matrix::t5#0 ] +Uplifting [calculate_matrix] best 93118 combination zp ZP_BYTE:50 [ calculate_matrix::t5#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:55 [ calculate_matrix::t10#0 ] -Uplifting [calculate_matrix] best 93106 combination zp ZP_BYTE:55 [ calculate_matrix::t10#0 ] +Uplifting [calculate_matrix] best 93118 combination zp ZP_BYTE:55 [ calculate_matrix::t10#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:54 [ calculate_matrix::t9#0 ] -Uplifting [calculate_matrix] best 93106 combination zp ZP_BYTE:54 [ calculate_matrix::t9#0 ] +Uplifting [calculate_matrix] best 93118 combination zp ZP_BYTE:54 [ calculate_matrix::t9#0 ] Coalescing zero page register with common assignment [ zp ZP_WORD:7 [ print_sbyte_at::at#21 print_sbyte_at::at#15 print_sbyte_at::at#16 print_sbyte_at::at#17 print_sbyte_at::at#18 print_sbyte_at::at#19 print_sbyte_at::at#20 print_sbyte_at::at#0 print_sbyte_at::at#1 print_sbyte_at::at#2 ] ] with [ zp ZP_WORD:11 [ print_char_at::at#4 print_char_at::at#2 print_char_at::at#3 print_char_at::at#0 print_char_at::at#1 ] ] - score: 2 Coalescing zero page register with common assignment [ zp ZP_BYTE:3 [ sy#10 sy#3 ] ] with [ zp ZP_BYTE:24 [ calculate_matrix::sy#0 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:7 [ print_sbyte_at::at#21 print_sbyte_at::at#15 print_sbyte_at::at#16 print_sbyte_at::at#17 print_sbyte_at::at#18 print_sbyte_at::at#19 print_sbyte_at::at#20 print_sbyte_at::at#0 print_sbyte_at::at#1 print_sbyte_at::at#2 print_char_at::at#4 print_char_at::at#2 print_char_at::at#3 print_char_at::at#0 print_char_at::at#1 ] ] with [ zp ZP_WORD:42 [ print_byte_at::at#0 ] ] - score: 1 @@ -9375,10 +9380,16 @@ calculate_matrix: { clc adc sy tay - //SEG291 [146] (signed byte) calculate_matrix::t3#0 ← (signed byte) calculate_matrix::sx#0 -- vbsz1=vbsxx - stx t3 - //SEG292 [147] (signed byte) calculate_matrix::t4#0 ← (signed byte) calculate_matrix::sx#0 -- vbsz1=vbsxx - stx t4 + //SEG291 [146] (signed byte) calculate_matrix::t3#0 ← (signed byte) calculate_matrix::sx#0 + (const signed byte) sz#0 -- vbsz1=vbsxx_plus_vbsc1 + txa + clc + adc #sz + sta t3 + //SEG292 [147] (signed byte) calculate_matrix::t4#0 ← (signed byte) calculate_matrix::sx#0 - (const signed byte) sz#0 -- vbsz1=vbsxx_minus_vbsc1 + txa + sec + sbc #sz + sta t4 //SEG293 [148] (signed byte) calculate_matrix::t5#0 ← (signed byte) calculate_matrix::sx#0 + (signed byte) calculate_matrix::t2#0 -- vbsz1=vbsxx_plus_vbsyy txa sty $ff @@ -9433,12 +9444,12 @@ calculate_matrix: { adc SINH,y //SEG304 [159] *((const signed byte[9]) rotation_matrix#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (signed byte~) calculate_matrix::$12 -- _deref_pbsc1=vbsaa sta rotation_matrix+2 - //SEG305 [160] (signed byte~) calculate_matrix::$13 ← *((const signed byte*) SINH#0+(const signed byte) sz#0 + (signed byte) calculate_matrix::t3#0) - *((const signed byte*) SINH#0+-(const signed byte) sz#0 + (signed byte) calculate_matrix::t4#0) -- vbsaa=pbsc1_derefidx_vbsz1_minus_pbsc2_derefidx_vbsz2 + //SEG305 [160] (signed byte~) calculate_matrix::$13 ← *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t3#0) - *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t4#0) -- vbsaa=pbsc1_derefidx_vbsz1_minus_pbsc1_derefidx_vbsz2 ldx t3 ldy t4 sec - lda SINH+sz,x - sbc SINH+-sz,y + lda SINH,x + sbc SINH,y //SEG306 [161] (signed byte~) calculate_matrix::$14 ← (signed byte~) calculate_matrix::$13 + *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t6#0) -- vbsaa=vbsaa_plus_pbsc1_derefidx_vbsz1 ldy t6 clc @@ -10622,8 +10633,8 @@ Succesful ASM optimization Pass5NextJumpElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination Fixing long branch [306] bne b1 to beq -Fixing long branch [974] bne b2 to beq -Fixing long branch [984] bne b1 to beq +Fixing long branch [980] bne b2 to beq +Fixing long branch [990] bne b1 to beq FINAL SYMBOL TABLE (label) @33 @@ -11247,7 +11258,7 @@ reg byte a [ calculate_matrix::$34 ] FINAL ASSEMBLER -Score: 85526 +Score: 85538 //SEG0 Basic Upstart .pc = $801 "Basic" @@ -12074,10 +12085,16 @@ calculate_matrix: { clc adc sy tay - //SEG291 [146] (signed byte) calculate_matrix::t3#0 ← (signed byte) calculate_matrix::sx#0 -- vbsz1=vbsxx - stx t3 - //SEG292 [147] (signed byte) calculate_matrix::t4#0 ← (signed byte) calculate_matrix::sx#0 -- vbsz1=vbsxx - stx t4 + //SEG291 [146] (signed byte) calculate_matrix::t3#0 ← (signed byte) calculate_matrix::sx#0 + (const signed byte) sz#0 -- vbsz1=vbsxx_plus_vbsc1 + txa + clc + adc #sz + sta t3 + //SEG292 [147] (signed byte) calculate_matrix::t4#0 ← (signed byte) calculate_matrix::sx#0 - (const signed byte) sz#0 -- vbsz1=vbsxx_minus_vbsc1 + txa + sec + sbc #sz + sta t4 //SEG293 [148] (signed byte) calculate_matrix::t5#0 ← (signed byte) calculate_matrix::sx#0 + (signed byte) calculate_matrix::t2#0 -- vbsz1=vbsxx_plus_vbsyy txa sty $ff @@ -12131,12 +12148,12 @@ calculate_matrix: { adc SINH,y //SEG304 [159] *((const signed byte[9]) rotation_matrix#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (signed byte~) calculate_matrix::$12 -- _deref_pbsc1=vbsaa sta rotation_matrix+2 - //SEG305 [160] (signed byte~) calculate_matrix::$13 ← *((const signed byte*) SINH#0+(const signed byte) sz#0 + (signed byte) calculate_matrix::t3#0) - *((const signed byte*) SINH#0+-(const signed byte) sz#0 + (signed byte) calculate_matrix::t4#0) -- vbsaa=pbsc1_derefidx_vbsz1_minus_pbsc2_derefidx_vbsz2 + //SEG305 [160] (signed byte~) calculate_matrix::$13 ← *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t3#0) - *((const signed byte*) SINH#0 + (signed byte) calculate_matrix::t4#0) -- vbsaa=pbsc1_derefidx_vbsz1_minus_pbsc1_derefidx_vbsz2 ldx t3 ldy t4 sec - lda SINH+sz,x - sbc SINH+-sz,y + lda SINH,x + sbc SINH,y //SEG306 [161] (signed byte~) calculate_matrix::$14 ← (signed byte~) calculate_matrix::$13 + *((const signed byte*) COSQ#0 + (signed byte) calculate_matrix::t6#0) -- vbsaa=vbsaa_plus_pbsc1_derefidx_vbsz1 ldy t6 clc diff --git a/src/test/ref/examples/3d/perspective.log b/src/test/ref/examples/3d/perspective.log index 814743cc1..9cf96f4a2 100644 --- a/src/test/ref/examples/3d/perspective.log +++ b/src/test/ref/examples/3d/perspective.log @@ -1232,11 +1232,11 @@ Successful SSA optimization Pass2RedundantPhiElimination Redundant Phi (byte*) print_char_cursor#66 (byte*) print_char_cursor#2 Redundant Phi (byte*) print_char_cursor#68 (byte*) print_char_cursor#12 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) print_str::$0 if(*((byte*) print_str::str#7)!=(byte) '@') goto print_str::@2 -Simple Condition (bool~) print_ln::$1 if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -Simple Condition (bool~) print_sbyte::$0 if((signed byte) print_sbyte::b#4<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte::@1 -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) mulf_init::$11 if((byte) mulf_init::i#1!=rangelast(0,128)) goto mulf_init::@1 +Simple Condition (bool~) print_str::$0 [85] if(*((byte*) print_str::str#7)!=(byte) '@') goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [98] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 +Simple Condition (bool~) print_sbyte::$0 [107] if((signed byte) print_sbyte::b#4<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte::@1 +Simple Condition (bool~) print_cls::$1 [158] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) mulf_init::$11 [293] if((byte) mulf_init::i#1!=rangelast(0,128)) goto mulf_init::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -1360,8 +1360,8 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in assignment *(mulf_sqr2#0+1 + mulf_init::$5) Consolidated array index constant in assignment *(mulf_init::$6+1 + mulf_init::$7) Successful SSA optimization Pass2ConstantAdditionElimination -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) mulf_init::$5 ← (byte) mulf_init::i#2 -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) mulf_init::$7 ← (byte) mulf_init::i#2 +Inferred type updated to byte in [73] (byte/signed word/word/dword/signed dword~) mulf_init::$5 ← (byte) mulf_init::i#2 +Inferred type updated to byte in [75] (byte/signed word/word/dword/signed dword~) mulf_init::$7 ← (byte) mulf_init::i#2 Successful SSA optimization PassNEliminateUnusedVars Eliminating Noop Cast (byte) print_byte::b#0 ← ((byte)) (signed byte) print_sbyte::b#6 Eliminating Noop Cast (byte) print_byte::b#1 ← ((byte)) *((const signed byte*) xr#0) diff --git a/src/test/ref/examples/bresenham/bitmap-bresenham.log b/src/test/ref/examples/bresenham/bitmap-bresenham.log index 2100cda54..4ac8b9b40 100644 --- a/src/test/ref/examples/bresenham/bitmap-bresenham.log +++ b/src/test/ref/examples/bresenham/bitmap-bresenham.log @@ -1452,12 +1452,12 @@ Culled Empty Block (label) bitmap_line::@35 Culled Empty Block (label) bitmap_line::@36 Culled Empty Block (label) @16 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) bitmap_init::$4 ← (byte) bitmap_init::bits#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) bitmap_init::$3 ← (byte) bitmap_init::bits#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) bitmap_init::$12 ← (byte~) bitmap_init::$10 != (byte/signed byte/word/signed word/dword/signed dword) 7 from (bool~) bitmap_init::$11 ← (byte~) bitmap_init::$10 == (byte/signed byte/word/signed word/dword/signed dword) 7 -Inversing boolean not (bool~) bitmap_line_xdyi::$4 ← (byte) bitmap_line_xdyi::xd#2 >= (byte) bitmap_line_xdyi::e#1 from (bool~) bitmap_line_xdyi::$3 ← (byte) bitmap_line_xdyi::xd#2 < (byte) bitmap_line_xdyi::e#1 -Inversing boolean not (bool~) bitmap_line_xdyd::$4 ← (byte) bitmap_line_xdyd::xd#2 >= (byte) bitmap_line_xdyd::e#1 from (bool~) bitmap_line_xdyd::$3 ← (byte) bitmap_line_xdyd::xd#2 < (byte) bitmap_line_xdyd::e#1 -Inversing boolean not (bool~) bitmap_line_ydxi::$4 ← (byte) bitmap_line_ydxi::yd#2 >= (byte) bitmap_line_ydxi::e#1 from (bool~) bitmap_line_ydxi::$3 ← (byte) bitmap_line_ydxi::yd#2 < (byte) bitmap_line_ydxi::e#1 -Inversing boolean not (bool~) bitmap_line_ydxd::$4 ← (byte) bitmap_line_ydxd::yd#2 >= (byte) bitmap_line_ydxd::e#1 from (bool~) bitmap_line_ydxd::$3 ← (byte) bitmap_line_ydxd::yd#2 < (byte) bitmap_line_ydxd::e#1 +Inversing boolean not [96] (bool~) bitmap_init::$4 ← (byte) bitmap_init::bits#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [95] (bool~) bitmap_init::$3 ← (byte) bitmap_init::bits#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [115] (bool~) bitmap_init::$12 ← (byte~) bitmap_init::$10 != (byte/signed byte/word/signed word/dword/signed dword) 7 from [114] (bool~) bitmap_init::$11 ← (byte~) bitmap_init::$10 == (byte/signed byte/word/signed word/dword/signed dword) 7 +Inversing boolean not [252] (bool~) bitmap_line_xdyi::$4 ← (byte) bitmap_line_xdyi::xd#2 >= (byte) bitmap_line_xdyi::e#1 from [251] (bool~) bitmap_line_xdyi::$3 ← (byte) bitmap_line_xdyi::xd#2 < (byte) bitmap_line_xdyi::e#1 +Inversing boolean not [275] (bool~) bitmap_line_xdyd::$4 ← (byte) bitmap_line_xdyd::xd#2 >= (byte) bitmap_line_xdyd::e#1 from [274] (bool~) bitmap_line_xdyd::$3 ← (byte) bitmap_line_xdyd::xd#2 < (byte) bitmap_line_xdyd::e#1 +Inversing boolean not [298] (bool~) bitmap_line_ydxi::$4 ← (byte) bitmap_line_ydxi::yd#2 >= (byte) bitmap_line_ydxi::e#1 from [297] (bool~) bitmap_line_ydxi::$3 ← (byte) bitmap_line_ydxi::yd#2 < (byte) bitmap_line_ydxi::e#1 +Inversing boolean not [322] (bool~) bitmap_line_ydxd::$4 ← (byte) bitmap_line_ydxd::yd#2 >= (byte) bitmap_line_ydxd::e#1 from [321] (bool~) bitmap_line_ydxd::$3 ← (byte) bitmap_line_ydxd::yd#2 < (byte) bitmap_line_ydxd::e#1 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) bitmap_init::bits#1 = (byte~) bitmap_init::$2 Alias (byte) bitmap_init::x#2 = (byte) bitmap_init::x#4 @@ -1585,29 +1585,29 @@ Redundant Phi (byte) lines_cnt#4 (byte) lines_cnt#5 Redundant Phi (byte) lines_cnt#3 (byte) lines_cnt#4 Redundant Phi (byte) lines_cnt#1 (byte) lines_cnt#3 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) bitmap_init::$4 if((byte) bitmap_init::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$5 if((byte) bitmap_init::x#1!=rangelast(0,255)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$12 if((byte~) bitmap_init::$10!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto bitmap_init::@4 -Simple Condition (bool~) bitmap_init::$15 if((byte) bitmap_init::y#1!=rangelast(0,255)) goto bitmap_init::@3 -Simple Condition (bool~) bitmap_clear::$1 if((byte) bitmap_clear::x#1!=rangelast(0,199)) goto bitmap_clear::@2 -Simple Condition (bool~) bitmap_clear::$2 if((byte) bitmap_clear::y#1!=rangelast(0,39)) goto bitmap_clear::@1 -Simple Condition (bool~) bitmap_line::$0 if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 -Simple Condition (bool~) bitmap_line::$12 if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@9 -Simple Condition (bool~) bitmap_line::$2 if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@2 -Simple Condition (bool~) bitmap_line::$8 if((byte) bitmap_line::yd#0<(byte) bitmap_line::xd#1) goto bitmap_line::@6 -Simple Condition (bool~) bitmap_line::$4 if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#1) goto bitmap_line::@3 -Simple Condition (bool~) bitmap_line::$18 if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#0) goto bitmap_line::@13 -Simple Condition (bool~) bitmap_line::$14 if((byte) bitmap_line::yd#3<(byte) bitmap_line::xd#0) goto bitmap_line::@10 -Simple Condition (bool~) bitmap_line_xdyi::$4 if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 -Simple Condition (bool~) bitmap_line_xdyi::$7 if((byte) bitmap_line_xdyi::x#2!=(byte/signed word/word/dword/signed dword~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 -Simple Condition (bool~) bitmap_line_xdyd::$4 if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 -Simple Condition (bool~) bitmap_line_xdyd::$7 if((byte) bitmap_line_xdyd::x#2!=(byte/signed word/word/dword/signed dword~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 -Simple Condition (bool~) bitmap_line_ydxi::$4 if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 -Simple Condition (bool~) bitmap_line_ydxi::$7 if((byte) bitmap_line_ydxi::y#2!=(byte/signed word/word/dword/signed dword~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 -Simple Condition (bool~) bitmap_line_ydxd::$4 if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 -Simple Condition (bool~) bitmap_line_ydxd::$7 if((byte) bitmap_line_ydxd::y#3!=(byte/signed word/word/dword/signed dword~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 -Simple Condition (bool~) lines::$3 if((byte) lines::l#1<(byte) lines_cnt#0) goto lines::@1 -Simple Condition (bool~) init_screen::$1 if((byte*) init_screen::c#1!=(byte*~) init_screen::$0) goto init_screen::@1 +Simple Condition (bool~) bitmap_init::$4 [97] if((byte) bitmap_init::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$5 [101] if((byte) bitmap_init::x#1!=rangelast(0,255)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$12 [116] if((byte~) bitmap_init::$10!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto bitmap_init::@4 +Simple Condition (bool~) bitmap_init::$15 [120] if((byte) bitmap_init::y#1!=rangelast(0,255)) goto bitmap_init::@3 +Simple Condition (bool~) bitmap_clear::$1 [136] if((byte) bitmap_clear::x#1!=rangelast(0,199)) goto bitmap_clear::@2 +Simple Condition (bool~) bitmap_clear::$2 [140] if((byte) bitmap_clear::y#1!=rangelast(0,39)) goto bitmap_clear::@1 +Simple Condition (bool~) bitmap_line::$0 [152] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 +Simple Condition (bool~) bitmap_line::$12 [157] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@9 +Simple Condition (bool~) bitmap_line::$2 [162] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@2 +Simple Condition (bool~) bitmap_line::$8 [167] if((byte) bitmap_line::yd#0<(byte) bitmap_line::xd#1) goto bitmap_line::@6 +Simple Condition (bool~) bitmap_line::$4 [172] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#1) goto bitmap_line::@3 +Simple Condition (bool~) bitmap_line::$18 [205] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#0) goto bitmap_line::@13 +Simple Condition (bool~) bitmap_line::$14 [210] if((byte) bitmap_line::yd#3<(byte) bitmap_line::xd#0) goto bitmap_line::@10 +Simple Condition (bool~) bitmap_line_xdyi::$4 [253] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 +Simple Condition (bool~) bitmap_line_xdyi::$7 [257] if((byte) bitmap_line_xdyi::x#2!=(byte/signed word/word/dword/signed dword~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 +Simple Condition (bool~) bitmap_line_xdyd::$4 [276] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 +Simple Condition (bool~) bitmap_line_xdyd::$7 [280] if((byte) bitmap_line_xdyd::x#2!=(byte/signed word/word/dword/signed dword~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 +Simple Condition (bool~) bitmap_line_ydxi::$4 [299] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 +Simple Condition (bool~) bitmap_line_ydxi::$7 [303] if((byte) bitmap_line_ydxi::y#2!=(byte/signed word/word/dword/signed dword~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 +Simple Condition (bool~) bitmap_line_ydxd::$4 [323] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 +Simple Condition (bool~) bitmap_line_ydxd::$7 [327] if((byte) bitmap_line_ydxd::y#3!=(byte/signed word/word/dword/signed dword~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 +Simple Condition (bool~) lines::$3 [379] if((byte) lines::l#1<(byte) lines_cnt#0) goto lines::@1 +Simple Condition (bool~) init_screen::$1 [387] if((byte*) init_screen::c#1!=(byte*~) init_screen::$0) goto init_screen::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -1731,14 +1731,14 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in assignment *(lines_x#0+1 + lines::$0) Consolidated array index constant in assignment *(lines_y#0+1 + lines::$1) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto main::@1 +if() condition always true - replacing block destination [172] if(true) goto main::@1 Successful SSA optimization Pass2ConstantIfs Fixing inline constructor with bitmap_clear::$3 ← *(bitmap_plot_xhi#0 + 0) w= *(bitmap_plot_xlo#0 + 0) Fixing inline constructor with bitmap_plot::$2 ← *(bitmap_plot_xhi#0 + bitmap_plot::x#4) w= *(bitmap_plot_xlo#0 + bitmap_plot::x#4) Fixing inline constructor with bitmap_plot::$3 ← *(bitmap_plot_yhi#0 + bitmap_plot::y#4) w= *(bitmap_plot_ylo#0 + bitmap_plot::y#4) Successful SSA optimization Pass2FixInlineConstructors -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) lines::$0 ← (byte) lines::l#2 -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) lines::$1 ← (byte) lines::l#2 +Inferred type updated to byte in [175] (byte/signed word/word/dword/signed dword~) lines::$0 ← (byte) lines::l#2 +Inferred type updated to byte in [176] (byte/signed word/word/dword/signed dword~) lines::$1 ← (byte) lines::l#2 Successful SSA optimization PassNEliminateUnusedVars Eliminating Noop Cast (byte*) bitmap_clear::bitmap#0 ← ((byte*)) (word~) bitmap_clear::$3 Eliminating Noop Cast (byte*) bitmap_plot::plotter#0 ← ((byte*)) (word~) bitmap_plot::$0 diff --git a/src/test/ref/examples/chargen/chargen-analysis.log b/src/test/ref/examples/chargen/chargen-analysis.log index 3e6f2d650..698ca58cb 100644 --- a/src/test/ref/examples/chargen/chargen-analysis.log +++ b/src/test/ref/examples/chargen/chargen-analysis.log @@ -1369,15 +1369,15 @@ SYMBOL TABLE SSA Culled Empty Block (label) @20 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) main::$17 ← (byte~) main::$15 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) main::$16 ← (byte~) main::$15 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) main::$20 ← (byte~) main::$18 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) main::$19 ← (byte~) main::$18 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) main::$23 ← (byte~) main::$21 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) main::$22 ← (byte~) main::$21 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) main::$26 ← (byte~) main::$24 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) main::$25 ← (byte~) main::$24 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) main::$31 ← (byte) main::key#0 == (byte/signed byte/word/signed word/dword/signed dword) 63 from (bool~) main::$30 ← (byte) main::key#0 != (byte/signed byte/word/signed word/dword/signed dword) 63 -Inversing boolean not (bool~) main::$34 ← (byte) main::pressed#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) main::$33 ← (byte) main::pressed#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) plot_chargen::$4 ← (byte) plot_chargen::shift#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) plot_chargen::$3 ← (byte) plot_chargen::shift#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) plot_chargen::$12 ← (byte~) plot_chargen::$10 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) plot_chargen::$11 ← (byte~) plot_chargen::$10 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [88] (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [87] (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [261] (bool~) main::$17 ← (byte~) main::$15 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [260] (bool~) main::$16 ← (byte~) main::$15 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [270] (bool~) main::$20 ← (byte~) main::$18 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [269] (bool~) main::$19 ← (byte~) main::$18 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [281] (bool~) main::$23 ← (byte~) main::$21 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [280] (bool~) main::$22 ← (byte~) main::$21 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [292] (bool~) main::$26 ← (byte~) main::$24 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [291] (bool~) main::$25 ← (byte~) main::$24 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [321] (bool~) main::$31 ← (byte) main::key#0 == (byte/signed byte/word/signed word/dword/signed dword) 63 from [320] (bool~) main::$30 ← (byte) main::key#0 != (byte/signed byte/word/signed word/dword/signed dword) 63 +Inversing boolean not [325] (bool~) main::$34 ← (byte) main::pressed#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [324] (bool~) main::$33 ← (byte) main::pressed#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [363] (bool~) plot_chargen::$4 ← (byte) plot_chargen::shift#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [362] (bool~) plot_chargen::$3 ← (byte) plot_chargen::shift#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [388] (bool~) plot_chargen::$12 ← (byte~) plot_chargen::$10 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [387] (bool~) plot_chargen::$11 ← (byte~) plot_chargen::$10 != (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) mul8u::a#2 = (byte) mul8u::a#3 (byte) mul8u::a#6 Alias (word) mul8u::mb#3 = (word) mul8u::mb#4 (word) mul8u::mb#5 @@ -1487,23 +1487,23 @@ Redundant Phi (byte*) SCREEN#12 (byte*) SCREEN#21 Redundant Phi (byte) plot_chargen::y#3 (byte) plot_chargen::y#2 Redundant Phi (byte*) plot_chargen::chargen#4 (byte*) plot_chargen::chargen#3 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) mul8u::$0 if((byte) mul8u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@2 -Simple Condition (bool~) mul8u::$3 if((byte~) mul8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@4 -Simple Condition (bool~) main::$1 if((byte*) main::sc#1<(byte*~) main::$0) goto main::@1 -Simple Condition (bool~) main::$14 if((byte) main::i#1!=rangelast(0,3)) goto main::@2 -Simple Condition (bool~) main::$17 if((byte~) main::$15==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@4 -Simple Condition (bool~) main::$20 if((byte~) main::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@5 -Simple Condition (bool~) main::$23 if((byte~) main::$21==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@6 -Simple Condition (bool~) main::$26 if((byte~) main::$24==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@7 -Simple Condition (bool~) main::$28 if((byte~) main::$27!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@8 -Simple Condition (bool~) main::$31 if((byte) main::key#0==(byte/signed byte/word/signed word/dword/signed dword) 63) goto main::@11 -Simple Condition (bool~) main::$34 if((byte) main::pressed#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@12 -Simple Condition (bool~) main::$36 if((byte) main::ch#1!=rangelast(0,63)) goto main::@10 -Simple Condition (bool~) print_str_at::$0 if(*((byte*) print_str_at::str#5)!=(byte) '@') goto print_str_at::@2 -Simple Condition (bool~) plot_chargen::$4 if((byte) plot_chargen::shift#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto plot_chargen::@1 -Simple Condition (bool~) plot_chargen::$12 if((byte~) plot_chargen::$10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto plot_chargen::@4 -Simple Condition (bool~) plot_chargen::$14 if((byte) plot_chargen::x#1!=rangelast(0,7)) goto plot_chargen::@3 -Simple Condition (bool~) plot_chargen::$16 if((byte) plot_chargen::y#1!=rangelast(0,7)) goto plot_chargen::@2 +Simple Condition (bool~) mul8u::$0 [84] if((byte) mul8u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@2 +Simple Condition (bool~) mul8u::$3 [89] if((byte~) mul8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@4 +Simple Condition (bool~) main::$1 [216] if((byte*) main::sc#1<(byte*~) main::$0) goto main::@1 +Simple Condition (bool~) main::$14 [250] if((byte) main::i#1!=rangelast(0,3)) goto main::@2 +Simple Condition (bool~) main::$17 [262] if((byte~) main::$15==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@4 +Simple Condition (bool~) main::$20 [271] if((byte~) main::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@5 +Simple Condition (bool~) main::$23 [282] if((byte~) main::$21==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@6 +Simple Condition (bool~) main::$26 [293] if((byte~) main::$24==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@7 +Simple Condition (bool~) main::$28 [303] if((byte~) main::$27!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@8 +Simple Condition (bool~) main::$31 [322] if((byte) main::key#0==(byte/signed byte/word/signed word/dword/signed dword) 63) goto main::@11 +Simple Condition (bool~) main::$34 [326] if((byte) main::pressed#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@12 +Simple Condition (bool~) main::$36 [337] if((byte) main::ch#1!=rangelast(0,63)) goto main::@10 +Simple Condition (bool~) print_str_at::$0 [350] if(*((byte*) print_str_at::str#5)!=(byte) '@') goto print_str_at::@2 +Simple Condition (bool~) plot_chargen::$4 [364] if((byte) plot_chargen::shift#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto plot_chargen::@1 +Simple Condition (bool~) plot_chargen::$12 [389] if((byte~) plot_chargen::$10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto plot_chargen::@4 +Simple Condition (bool~) plot_chargen::$14 [397] if((byte) plot_chargen::x#1!=rangelast(0,7)) goto plot_chargen::@3 +Simple Condition (bool~) plot_chargen::$16 [405] if((byte) plot_chargen::y#1!=rangelast(0,7)) goto plot_chargen::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -1704,7 +1704,7 @@ Constant (const byte*) print_str_at::at#3 = main::$10+30 Successful SSA optimization Pass2ConstantIdentification Consolidated constant in assignment plot_chargen::$7 Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto main::@3 +if() condition always true - replacing block destination [80] if(true) goto main::@3 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/examples/fastmultiply/fastmultiply8.kc.log b/src/test/ref/examples/fastmultiply/fastmultiply8.kc.log index f3937cd15..f3e0c3ca5 100644 --- a/src/test/ref/examples/fastmultiply/fastmultiply8.kc.log +++ b/src/test/ref/examples/fastmultiply/fastmultiply8.kc.log @@ -827,13 +827,13 @@ Redundant Phi (signed byte*) cp#1 (signed byte*) cp#2 Redundant Phi (byte*) print_line_cursor#13 (byte*) print_line_cursor#10 Redundant Phi (byte*) print_char_cursor#13 (byte*) print_char_cursor#10 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) print_sbyte_at::$0 if((signed byte) print_sbyte_at::b#4<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte_at::@1 -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) main::$3 if((byte) main::k#1!=rangelast(0,8)) goto main::@1 -Simple Condition (bool~) main::$7 if((byte) main::j#1!=rangelast(0,8)) goto main::@3 -Simple Condition (bool~) main::$8 if((byte) main::i#1!=rangelast(0,8)) goto main::@2 -Simple Condition (bool~) init_screen::$1 if((byte) init_screen::l#1!=rangelast(0,39)) goto init_screen::@1 -Simple Condition (bool~) init_screen::$2 if((byte) init_screen::m#1!=rangelast(0,24)) goto init_screen::@2 +Simple Condition (bool~) print_sbyte_at::$0 [5] if((signed byte) print_sbyte_at::b#4<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte_at::@1 +Simple Condition (bool~) print_cls::$1 [49] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) main::$3 [80] if((byte) main::k#1!=rangelast(0,8)) goto main::@1 +Simple Condition (bool~) main::$7 [106] if((byte) main::j#1!=rangelast(0,8)) goto main::@3 +Simple Condition (bool~) main::$8 [110] if((byte) main::i#1!=rangelast(0,8)) goto main::@2 +Simple Condition (bool~) init_screen::$1 [127] if((byte) init_screen::l#1!=rangelast(0,39)) goto init_screen::@1 +Simple Condition (bool~) init_screen::$2 [138] if((byte) init_screen::m#1!=rangelast(0,24)) goto init_screen::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_line_cursor#0 = ((byte*))1024 Constant (const byte) print_char_at::ch#0 = '-' diff --git a/src/test/ref/examples/helloworld/helloworld.log b/src/test/ref/examples/helloworld/helloworld.log index ec992d453..21c52d49d 100644 --- a/src/test/ref/examples/helloworld/helloworld.log +++ b/src/test/ref/examples/helloworld/helloworld.log @@ -195,8 +195,8 @@ Redundant Phi (byte*) print_char_cursor#14 (byte*) print_line_cursor#1 Redundant Phi (byte*) print_char_cursor#16 (byte*) print_char_cursor#14 Redundant Phi (byte*) print_line_cursor#11 (byte*) print_line_cursor#10 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) print_str::$0 if(*((byte*) print_str::str#2)!=(byte) '@') goto print_str::@2 -Simple Condition (bool~) print_ln::$1 if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 +Simple Condition (bool~) print_str::$0 [6] if(*((byte*) print_str::str#2)!=(byte) '@') goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [19] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_char_cursor#0 = ((byte*))1024 Constant (const byte[]) print_hextab#0 = $0 diff --git a/src/test/ref/examples/multiplexer/simple-multiplexer.log b/src/test/ref/examples/multiplexer/simple-multiplexer.log index fd375f1c4..5d090f81e 100644 --- a/src/test/ref/examples/multiplexer/simple-multiplexer.log +++ b/src/test/ref/examples/multiplexer/simple-multiplexer.log @@ -1409,8 +1409,8 @@ SYMBOL TABLE SSA (byte) plex_sprite_msb#8 (byte) plex_sprite_msb#9 -Inversing boolean not (bool~) plexSort::$3 ← (byte) plexSort::nxt_y#0 >= *((byte[PLEX_COUNT#0]) PLEX_YPOS#0 + *((byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plexSort::m#2)) from (bool~) plexSort::$2 ← (byte) plexSort::nxt_y#0 < *((byte[PLEX_COUNT#0]) PLEX_YPOS#0 + *((byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plexSort::m#2)) -Inversing boolean not (bool~) plexShowSprite::$10 ← (byte) plex_sprite_msb#3 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) plexShowSprite::$9 ← (byte) plex_sprite_msb#3 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [112] (bool~) plexSort::$3 ← (byte) plexSort::nxt_y#0 >= *((byte[PLEX_COUNT#0]) PLEX_YPOS#0 + *((byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plexSort::m#2)) from [111] (bool~) plexSort::$2 ← (byte) plexSort::nxt_y#0 < *((byte[PLEX_COUNT#0]) PLEX_YPOS#0 + *((byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plexSort::m#2)) +Inversing boolean not [182] (bool~) plexShowSprite::$10 ← (byte) plex_sprite_msb#3 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [181] (bool~) plexShowSprite::$9 ← (byte) plex_sprite_msb#3 == (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) plexInit::plexSetScreen1_screen#0 = (byte*) plexInit::screen#1 (byte*) plexInit::plexSetScreen1_screen#1 Alias (byte*) PLEX_SCREEN_PTR#1 = (byte*) plexInit::plexSetScreen1_$0#0 (byte*) PLEX_SCREEN_PTR#22 @@ -1661,21 +1661,21 @@ Redundant Phi (byte) plex_free_next#10 (byte) plex_free_next#14 Successful SSA optimization Pass2RedundantPhiElimination Redundant Phi (byte) plexSort::m#3 (byte) plexSort::m#2 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) plexInit::$2 if((byte) plexInit::i#1!=rangelast(0,plexInit::$1)) goto plexInit::@1 -Simple Condition (bool~) plexSort::$3 if((byte) plexSort::nxt_y#0>=*((byte[PLEX_COUNT#0]) PLEX_YPOS#0 + *((byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plexSort::m#2))) goto plexSort::@2 -Simple Condition (bool~) plexSort::$8 if((byte) plexSort::m#1!=rangelast(0,plexSort::$0)) goto plexSort::@1 -Simple Condition (bool) plexSort::plexFreePrepare1_$0#0 if((byte) plexSort::plexFreePrepare1_s#1!=rangelast(0,7)) goto plexSort::plexFreePrepare1_@1 -Simple Condition (bool~) plexShowSprite::$5 if((byte~) plexShowSprite::$4!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto plexShowSprite::@1 -Simple Condition (bool~) plexShowSprite::$10 if((byte) plex_sprite_msb#25!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto plexShowSprite::@3 -Simple Condition (bool~) init::$7 if((byte) init::sx#1!=rangelast(0,init::$3)) goto init::@1 -Simple Condition (bool~) init::$8 if((byte) init::ss#1!=rangelast(0,7)) goto init::@2 -Simple Condition (bool~) loop::$0 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto loop::@5 -Simple Condition (bool~) loop::$2 if((byte) loop::sy#1!=rangelast(0,loop::$1)) goto loop::@7 -Simple Condition (bool~) loop::$5 if((byte~) loop::$4!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto loop::@9 -Simple Condition (bool~) loop::$8 if(*((byte*) RASTER#0)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@13 -Simple Condition (bool~) loop::$10 if((byte) loop::ss#1!=rangelast(0,loop::$6)) goto loop::@11 +Simple Condition (bool~) plexInit::$2 [101] if((byte) plexInit::i#1!=rangelast(0,plexInit::$1)) goto plexInit::@1 +Simple Condition (bool~) plexSort::$3 [113] if((byte) plexSort::nxt_y#0>=*((byte[PLEX_COUNT#0]) PLEX_YPOS#0 + *((byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plexSort::m#2))) goto plexSort::@2 +Simple Condition (bool~) plexSort::$8 [117] if((byte) plexSort::m#1!=rangelast(0,plexSort::$0)) goto plexSort::@1 +Simple Condition (bool) plexSort::plexFreePrepare1_$0#0 [140] if((byte) plexSort::plexFreePrepare1_s#1!=rangelast(0,7)) goto plexSort::plexFreePrepare1_@1 +Simple Condition (bool~) plexShowSprite::$5 [169] if((byte~) plexShowSprite::$4!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto plexShowSprite::@1 +Simple Condition (bool~) plexShowSprite::$10 [183] if((byte) plex_sprite_msb#25!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto plexShowSprite::@3 +Simple Condition (bool~) init::$7 [240] if((byte) init::sx#1!=rangelast(0,init::$3)) goto init::@1 +Simple Condition (bool~) init::$8 [248] if((byte) init::ss#1!=rangelast(0,7)) goto init::@2 +Simple Condition (bool~) loop::$0 [259] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto loop::@5 +Simple Condition (bool~) loop::$2 [271] if((byte) loop::sy#1!=rangelast(0,loop::$1)) goto loop::@7 +Simple Condition (bool~) loop::$5 [285] if((byte~) loop::$4!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto loop::@9 +Simple Condition (bool~) loop::$8 [301] if(*((byte*) RASTER#0)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@13 +Simple Condition (bool~) loop::$10 [313] if((byte) loop::ss#1!=rangelast(0,loop::$6)) goto loop::@11 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting && if()-condition to two if()s (bool~) plexSort::$7 ← (bool~) plexSort::$5 && (bool~) plexSort::$6 +Rewriting && if()-condition to two if()s [126] (bool~) plexSort::$7 ← (bool~) plexSort::$5 && (bool~) plexSort::$6 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -1802,10 +1802,10 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in assignment *(PLEX_SORTED_IDX#0+1 + plexSort::$1) Consolidated array index constant in assignment *(PLEX_SORTED_IDX#0+1 + plexSort::$4) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto loop::@2 +if() condition always true - replacing block destination [71] if(true) goto loop::@2 Successful SSA optimization Pass2ConstantIfs -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) plexSort::$1 ← (byte) plexSort::m#2 -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) plexSort::$4 ← (byte) plexSort::s#3 +Inferred type updated to byte in [6] (byte/signed word/word/dword/signed dword~) plexSort::$1 ← (byte) plexSort::m#2 +Inferred type updated to byte in [13] (byte/signed word/word/dword/signed dword~) plexSort::$4 ← (byte) plexSort::s#3 Successful SSA optimization PassNEliminateUnusedVars Successful SSA optimization PassNEliminateUnusedVars Removing unused block loop::@return @@ -1853,8 +1853,8 @@ Redundant Phi (byte*) PLEX_SCREEN_PTR#31 (byte*) PLEX_SCREEN_PTR#44 Redundant Phi (byte) loop::sin_idx#14 (byte) loop::sin_idx#1 Redundant Phi (byte*) YSIN#16 (byte*) YSIN#4 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) plexSort::$5 if((byte) plexSort::s#1!=(byte/word/signed word/dword/signed dword) 255) goto plexSort::@8 -Simple Condition (bool~) plexSort::$6 if((byte) plexSort::nxt_y#0<*((const byte[PLEX_COUNT#0]) PLEX_YPOS#0 + *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plexSort::s#1))) goto plexSort::@3 +Simple Condition (bool~) plexSort::$5 [18] if((byte) plexSort::s#1!=(byte/word/signed word/dword/signed dword) 255) goto plexSort::@8 +Simple Condition (bool~) plexSort::$6 [94] if((byte) plexSort::nxt_y#0<*((const byte[PLEX_COUNT#0]) PLEX_YPOS#0 + *((const byte[PLEX_COUNT#0]) PLEX_SORTED_IDX#0 + (byte) plexSort::s#1))) goto plexSort::@3 Successful SSA optimization Pass2ConditionalJumpSimplification Self Phi Eliminated (byte*) YSIN#4 Self Phi Eliminated (byte*) PLEX_SCREEN_PTR#44 diff --git a/src/test/ref/examples/rasterbars/raster-bars.log b/src/test/ref/examples/rasterbars/raster-bars.log index 2600a64b9..4417522a5 100644 --- a/src/test/ref/examples/rasterbars/raster-bars.log +++ b/src/test/ref/examples/rasterbars/raster-bars.log @@ -324,9 +324,9 @@ SYMBOL TABLE SSA Culled Empty Block (label) main::@1 Culled Empty Block (label) @7 Successful SSA optimization Pass2CullEmptyBlocks -Simple Condition (bool~) main::$0 if(*((byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@2 -Simple Condition (bool~) main::$1 if(*((byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@3 -Simple Condition (bool~) raster::$0 if((byte) raster::col#1!=(byte/word/signed word/dword/signed dword) 255) goto raster::@1 +Simple Condition (bool~) main::$0 [81] if(*((byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@2 +Simple Condition (bool~) main::$1 [83] if(*((byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@3 +Simple Condition (bool~) raster::$0 [98] if((byte) raster::col#1!=(byte/word/signed word/dword/signed dword) 255) goto raster::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -412,7 +412,7 @@ Constant (const byte) raster::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in *(rastercols#0+raster::i#0) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [4] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/examples/rotate/rotate.log b/src/test/ref/examples/rotate/rotate.log index e1b6ea8b3..5cd7d59ab 100644 --- a/src/test/ref/examples/rotate/rotate.log +++ b/src/test/ref/examples/rotate/rotate.log @@ -1246,11 +1246,11 @@ SYMBOL TABLE SSA Culled Empty Block (label) main::@2 Culled Empty Block (label) @17 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) mulf_init::$4 ← (byte~) mulf_init::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mulf_init::$3 ← (byte~) mulf_init::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mulf_init::$14 ← (byte) mulf_init::x_255#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mulf_init::$13 ← (byte) mulf_init::x_255#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mulf8s_prepared::$3 ← *((signed byte*) mulf8s_prepared::memA#0) >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mulf8s_prepared::$2 ← *((signed byte*) mulf8s_prepared::memA#0) < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mulf8s_prepared::$9 ← (signed byte) mulf8s_prepared::b#5 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mulf8s_prepared::$8 ← (signed byte) mulf8s_prepared::b#5 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) anim::$20 ← (byte~) anim::$18 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) anim::$19 ← (byte~) anim::$18 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [94] (bool~) mulf_init::$4 ← (byte~) mulf_init::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [93] (bool~) mulf_init::$3 ← (byte~) mulf_init::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [124] (bool~) mulf_init::$14 ← (byte) mulf_init::x_255#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [123] (bool~) mulf_init::$13 ← (byte) mulf_init::x_255#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [164] (bool~) mulf8s_prepared::$3 ← *((signed byte*) mulf8s_prepared::memA#0) >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [163] (bool~) mulf8s_prepared::$2 ← *((signed byte*) mulf8s_prepared::memA#0) < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [168] (bool~) mulf8s_prepared::$9 ← (signed byte) mulf8s_prepared::b#5 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [167] (bool~) mulf8s_prepared::$8 ← (signed byte) mulf8s_prepared::b#5 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [297] (bool~) anim::$20 ← (byte~) anim::$18 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [296] (bool~) anim::$19 ← (byte~) anim::$18 != (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) mulf_init::sqr1_hi#0 = (byte*~) mulf_init::$0 Alias (byte*) mulf_init::sqr1_lo#0 = (byte*~) mulf_init::$1 @@ -1364,16 +1364,16 @@ Redundant Phi (byte) anim::angle#11 (byte) anim::angle#2 Redundant Phi (byte*) COS#11 (byte*) COS#1 Redundant Phi (byte*) SIN#11 (byte*) SIN#1 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) mulf_init::$4 if((byte~) mulf_init::$2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf_init::@2 -Simple Condition (bool~) mulf_init::$9 if((byte*) mulf_init::sqr1_lo#1!=(byte*~) mulf_init::$8) goto mulf_init::@1 -Simple Condition (bool~) mulf_init::$14 if((byte) mulf_init::x_255#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf_init::@4 -Simple Condition (bool~) mulf_init::$16 if((byte*) mulf_init::sqr2_lo#1!=(byte*~) mulf_init::$15) goto mulf_init::@3 -Simple Condition (bool~) mulf8s_prepared::$3 if(*((signed byte*) mulf8s_prepared::memA#0)>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf8s_prepared::@1 -Simple Condition (bool~) mulf8s_prepared::$9 if((signed byte) mulf8s_prepared::b#4>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf8s_prepared::@2 -Simple Condition (bool~) init::$4 if((byte) init::i#1!=rangelast(0,7)) goto init::@1 -Simple Condition (bool~) anim::$0 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto anim::@5 -Simple Condition (bool~) anim::$20 if((byte~) anim::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto anim::@8 -Simple Condition (bool~) anim::$26 if((byte) anim::i#1!=rangelast(0,7)) goto anim::@7 +Simple Condition (bool~) mulf_init::$4 [95] if((byte~) mulf_init::$2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf_init::@2 +Simple Condition (bool~) mulf_init::$9 [107] if((byte*) mulf_init::sqr1_lo#1!=(byte*~) mulf_init::$8) goto mulf_init::@1 +Simple Condition (bool~) mulf_init::$14 [125] if((byte) mulf_init::x_255#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf_init::@4 +Simple Condition (bool~) mulf_init::$16 [130] if((byte*) mulf_init::sqr2_lo#1!=(byte*~) mulf_init::$15) goto mulf_init::@3 +Simple Condition (bool~) mulf8s_prepared::$3 [165] if(*((signed byte*) mulf8s_prepared::memA#0)>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf8s_prepared::@1 +Simple Condition (bool~) mulf8s_prepared::$9 [169] if((signed byte) mulf8s_prepared::b#4>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf8s_prepared::@2 +Simple Condition (bool~) init::$4 [215] if((byte) init::i#1!=rangelast(0,7)) goto init::@1 +Simple Condition (bool~) anim::$0 [233] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto anim::@5 +Simple Condition (bool~) anim::$20 [298] if((byte~) anim::$18==(byte/signed byte/word/signed word/dword/signed dword) 0) goto anim::@8 +Simple Condition (bool~) anim::$26 [311] if((byte) anim::i#1!=rangelast(0,7)) goto anim::@7 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -1504,12 +1504,12 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated constant in assignment anim::xpos#0 Consolidated constant in assignment anim::ypos#0 Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto anim::@2 +if() condition always true - replacing block destination [70] if(true) goto anim::@2 Successful SSA optimization Pass2ConstantIfs Fixing inline constructor with mulf8u_prepared::$0 ← *(mulf8u_prepared::memB#0) w= *(mulf8u_prepared::resL#0) Successful SSA optimization Pass2FixInlineConstructors -Inferred type updated to signed byte in (signed word/signed byte/signed dword~) anim::$15 ← (signed byte~) anim::$14 -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) anim::$22 ← (byte~) anim::$21 +Inferred type updated to signed byte in [106] (signed word/signed byte/signed dword~) anim::$15 ← (signed byte~) anim::$14 +Inferred type updated to byte in [113] (byte/signed word/word/dword/signed dword~) anim::$22 ← (byte~) anim::$21 Successful SSA optimization PassNEliminateUnusedVars Eliminating Noop Cast (byte) mulf8u_prepared::b#0 ← ((byte)) (signed byte) mulf8s_prepared::b#4 Eliminating Noop Cast (byte~) mulf8s_prepared::$6 ← ((byte)) (signed byte) mulf8s_prepared::b#4 diff --git a/src/test/ref/examples/scroll/scroll.log b/src/test/ref/examples/scroll/scroll.log index 7d2ba53ca..ccff9b219 100644 --- a/src/test/ref/examples/scroll/scroll.log +++ b/src/test/ref/examples/scroll/scroll.log @@ -317,8 +317,8 @@ SYMBOL TABLE SSA Culled Empty Block (label) @3 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) main::$5 ← (byte) main::scroll#1 != (byte/word/signed word/dword/signed dword) 255 from (bool~) main::$4 ← (byte) main::scroll#1 == (byte/word/signed word/dword/signed dword) 255 -Inversing boolean not (bool~) main::$9 ← (byte) main::c#0 != (byte) '@' from (bool~) main::$8 ← (byte) main::c#0 == (byte) '@' +Inversing boolean not [25] (bool~) main::$5 ← (byte) main::scroll#1 != (byte/word/signed word/dword/signed dword) 255 from [24] (bool~) main::$4 ← (byte) main::scroll#1 == (byte/word/signed word/dword/signed dword) 255 +Inversing boolean not [43] (bool~) main::$9 ← (byte) main::c#0 != (byte) '@' from [42] (bool~) main::$8 ← (byte) main::c#0 == (byte) '@' Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) TEXT#1 = (byte*) TEXT#3 Alias (byte*) SCREEN#1 = (byte*) SCREEN#2 @@ -405,12 +405,12 @@ Redundant Phi (byte*) BGCOL#2 (byte*) BGCOL#5 Redundant Phi (byte*) RASTER#3 (byte*) RASTER#1 Redundant Phi (byte*) TEXT#11 (byte*) TEXT#10 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$2 if(*((byte*) RASTER#1)!=(byte/word/signed word/dword/signed dword) 254) goto main::@2 -Simple Condition (bool~) main::$3 if(*((byte*) RASTER#1)!=(byte/word/signed word/dword/signed dword) 255) goto main::@3 -Simple Condition (bool~) main::$5 if((byte) main::scroll#1!=(byte/word/signed word/dword/signed dword) 255) goto main::@4 -Simple Condition (bool~) main::$7 if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 39) goto main::@5 -Simple Condition (bool~) main::$9 if((byte) main::c#0!=(byte) '@') goto main::@6 -Simple Condition (bool~) fillscreen::$1 if((byte*) fillscreen::cursor#1<(byte*~) fillscreen::$0) goto fillscreen::@1 +Simple Condition (bool~) main::$2 [17] if(*((byte*) RASTER#1)!=(byte/word/signed word/dword/signed dword) 254) goto main::@2 +Simple Condition (bool~) main::$3 [20] if(*((byte*) RASTER#1)!=(byte/word/signed word/dword/signed dword) 255) goto main::@3 +Simple Condition (bool~) main::$5 [26] if((byte) main::scroll#1!=(byte/word/signed word/dword/signed dword) 255) goto main::@4 +Simple Condition (bool~) main::$7 [39] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 39) goto main::@5 +Simple Condition (bool~) main::$9 [44] if((byte) main::c#0!=(byte) '@') goto main::@6 +Simple Condition (bool~) fillscreen::$1 [59] if((byte*) fillscreen::cursor#1<(byte*~) fillscreen::$0) goto fillscreen::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte*) RASTER#0 = ((byte*))53266 @@ -431,9 +431,9 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in assignment *(main::line#0+1 + main::$6) Consolidated array index constant in *(main::line#0+39) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto main::@1 +if() condition always true - replacing block destination [10] if(true) goto main::@1 Successful SSA optimization Pass2ConstantIfs -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) main::$6 ← (byte) main::i#2 +Inferred type updated to byte in [12] (byte/signed word/word/dword/signed dword~) main::$6 ← (byte) main::i#2 Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks Culled Empty Block (label) main::@13 diff --git a/src/test/ref/examples/scrollbig/scrollbig.log b/src/test/ref/examples/scrollbig/scrollbig.log index f8accb658..d58c2b5e9 100644 --- a/src/test/ref/examples/scrollbig/scrollbig.log +++ b/src/test/ref/examples/scrollbig/scrollbig.log @@ -872,10 +872,10 @@ SYMBOL TABLE SSA (label) scroll_soft::@3 (label) scroll_soft::@return -Inversing boolean not (bool~) scroll_soft::$1 ← (byte) scroll#3 != (byte/word/signed word/dword/signed dword) 255 from (bool~) scroll_soft::$0 ← (byte) scroll#3 == (byte/word/signed word/dword/signed dword) 255 -Inversing boolean not (bool~) scroll_bit::$2 ← (byte) current_bit#5 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) scroll_bit::$1 ← (byte) current_bit#5 == (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) scroll_bit::$11 ← (byte~) scroll_bit::$9 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) scroll_bit::$10 ← (byte~) scroll_bit::$9 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) next_char::$1 ← (byte) next_char::c#0 != (byte) '@' from (bool~) next_char::$0 ← (byte) next_char::c#0 == (byte) '@' +Inversing boolean not [40] (bool~) scroll_soft::$1 ← (byte) scroll#3 != (byte/word/signed word/dword/signed dword) 255 from [39] (bool~) scroll_soft::$0 ← (byte) scroll#3 == (byte/word/signed word/dword/signed dword) 255 +Inversing boolean not [64] (bool~) scroll_bit::$2 ← (byte) current_bit#5 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [63] (bool~) scroll_bit::$1 ← (byte) current_bit#5 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [91] (bool~) scroll_bit::$11 ← (byte~) scroll_bit::$9 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [90] (bool~) scroll_bit::$10 ← (byte~) scroll_bit::$9 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [116] (bool~) next_char::$1 ← (byte) next_char::c#0 != (byte) '@' from [115] (bool~) next_char::$0 ← (byte) next_char::c#0 == (byte) '@' Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) RASTER#4 = (byte*) RASTER#5 Alias (byte*) BGCOL#6 = (byte*) BGCOL#7 @@ -1067,15 +1067,15 @@ Redundant Phi (byte) current_bit#16 (byte) current_bit#0 Redundant Phi (byte*) nxt#10 (byte*) nxt#0 Redundant Phi (byte*) current_chargen#14 (byte*) current_chargen#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if(*((byte*) RASTER#1)!=(byte/word/signed word/dword/signed dword) 254) goto main::@2 -Simple Condition (bool~) main::$2 if(*((byte*) RASTER#1)!=(byte/word/signed word/dword/signed dword) 255) goto main::@3 -Simple Condition (bool~) scroll_soft::$1 if((byte) scroll#3!=(byte/word/signed word/dword/signed dword) 255) goto scroll_soft::@1 -Simple Condition (bool~) scroll_bit::$2 if((byte) current_bit#5!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto scroll_bit::@1 -Simple Condition (bool~) scroll_bit::$11 if((byte~) scroll_bit::$9==(byte/signed byte/word/signed word/dword/signed dword) 0) goto scroll_bit::@3 -Simple Condition (bool~) scroll_bit::$14 if((byte) scroll_bit::r#1!=rangelast(0,7)) goto scroll_bit::@2 -Simple Condition (bool~) next_char::$1 if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 -Simple Condition (bool~) scroll_hard::$40 if((byte) scroll_hard::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 39) goto scroll_hard::@1 -Simple Condition (bool~) fillscreen::$1 if((byte*) fillscreen::cursor#1<(byte*~) fillscreen::$0) goto fillscreen::@1 +Simple Condition (bool~) main::$1 [15] if(*((byte*) RASTER#1)!=(byte/word/signed word/dword/signed dword) 254) goto main::@2 +Simple Condition (bool~) main::$2 [18] if(*((byte*) RASTER#1)!=(byte/word/signed word/dword/signed dword) 255) goto main::@3 +Simple Condition (bool~) scroll_soft::$1 [41] if((byte) scroll#3!=(byte/word/signed word/dword/signed dword) 255) goto scroll_soft::@1 +Simple Condition (bool~) scroll_bit::$2 [65] if((byte) current_bit#5!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto scroll_bit::@1 +Simple Condition (bool~) scroll_bit::$11 [92] if((byte~) scroll_bit::$9==(byte/signed byte/word/signed word/dword/signed dword) 0) goto scroll_bit::@3 +Simple Condition (bool~) scroll_bit::$14 [99] if((byte) scroll_bit::r#1!=rangelast(0,7)) goto scroll_bit::@2 +Simple Condition (bool~) next_char::$1 [117] if((byte) next_char::c#0!=(byte) '@') goto next_char::@1 +Simple Condition (bool~) scroll_hard::$40 [181] if((byte) scroll_hard::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 39) goto scroll_hard::@1 +Simple Condition (bool~) fillscreen::$1 [190] if((byte*) fillscreen::cursor#1<(byte*~) fillscreen::$0) goto fillscreen::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT#0 = ((byte*))1 Constant (const byte*) CHARGEN#0 = ((byte*))53248 @@ -1116,7 +1116,7 @@ Constant (const byte*) fillscreen::$0 = fillscreen::screen#0+1000 Successful SSA optimization Pass2ConstantIdentification Consolidated constant in assignment scroll_bit::sc#0 Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto main::@1 +if() condition always true - replacing block destination [7] if(true) goto main::@1 Successful SSA optimization Pass2ConstantIfs Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks @@ -1175,14 +1175,14 @@ Consolidated array index constant in assignment *(scroll_hard::$28+1 + scroll_ha Consolidated array index constant in assignment *(scroll_hard::$33+1 + scroll_hard::$34) Consolidated array index constant in assignment *(scroll_hard::$38+1 + scroll_hard::$39) Successful SSA optimization Pass2ConstantAdditionElimination -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) scroll_hard::$4 ← (byte) scroll_hard::i#2 -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) scroll_hard::$9 ← (byte) scroll_hard::i#2 -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) scroll_hard::$14 ← (byte) scroll_hard::i#2 -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) scroll_hard::$19 ← (byte) scroll_hard::i#2 -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) scroll_hard::$24 ← (byte) scroll_hard::i#2 -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) scroll_hard::$29 ← (byte) scroll_hard::i#2 -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) scroll_hard::$34 ← (byte) scroll_hard::i#2 -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) scroll_hard::$39 ← (byte) scroll_hard::i#2 +Inferred type updated to byte in [44] (byte/signed word/word/dword/signed dword~) scroll_hard::$4 ← (byte) scroll_hard::i#2 +Inferred type updated to byte in [46] (byte/signed word/word/dword/signed dword~) scroll_hard::$9 ← (byte) scroll_hard::i#2 +Inferred type updated to byte in [48] (byte/signed word/word/dword/signed dword~) scroll_hard::$14 ← (byte) scroll_hard::i#2 +Inferred type updated to byte in [50] (byte/signed word/word/dword/signed dword~) scroll_hard::$19 ← (byte) scroll_hard::i#2 +Inferred type updated to byte in [52] (byte/signed word/word/dword/signed dword~) scroll_hard::$24 ← (byte) scroll_hard::i#2 +Inferred type updated to byte in [54] (byte/signed word/word/dword/signed dword~) scroll_hard::$29 ← (byte) scroll_hard::i#2 +Inferred type updated to byte in [56] (byte/signed word/word/dword/signed dword~) scroll_hard::$34 ← (byte) scroll_hard::i#2 +Inferred type updated to byte in [58] (byte/signed word/word/dword/signed dword~) scroll_hard::$39 ← (byte) scroll_hard::i#2 Alias (byte) scroll_hard::i#2 = (byte~) scroll_hard::$4 (byte~) scroll_hard::$9 (byte~) scroll_hard::$14 (byte~) scroll_hard::$19 (byte~) scroll_hard::$24 (byte~) scroll_hard::$29 (byte~) scroll_hard::$34 (byte~) scroll_hard::$39 Successful SSA optimization Pass2AliasElimination Inlining constant with var siblings (const byte) scroll_bit::r#0 diff --git a/src/test/ref/examples/scrolllogo/scrolllogo.log b/src/test/ref/examples/scrolllogo/scrolllogo.log index a7f2c41b1..0616090b4 100644 --- a/src/test/ref/examples/scrolllogo/scrolllogo.log +++ b/src/test/ref/examples/scrolllogo/scrolllogo.log @@ -1868,15 +1868,15 @@ SYMBOL TABLE SSA (word) xsin_idx#8 (word) xsin_idx#9 -Inversing boolean not (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) divr16u::$9 ← (word) divr16u::rem#6 < (word) divr16u::divisor#2 from (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2 -Inversing boolean not (bool~) mul16u::$3 ← (byte/word~) mul16u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul16u::$2 ← (byte/word~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mul16s::$4 ← (signed word) mul16s::a#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul16s::$3 ← (signed word) mul16s::a#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mul16s::$10 ← (signed word) mul16s::b#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul16s::$9 ← (signed word) mul16s::b#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) sin16s::$1 ← (dword) sin16s::x#3 < (dword) PI_u4f28#0 from (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0 -Inversing boolean not (bool~) sin16s::$4 ← (dword) sin16s::x#4 < (dword) PI_HALF_u4f28#0 from (bool~) sin16s::$3 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0 -Inversing boolean not (bool~) sin16s::$19 ← (byte) sin16s::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) sin16s::$18 ← (byte) sin16s::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) loop::$5 ← (word) xsin_idx#3 != (word/signed dword/dword~) loop::$3 from (bool~) loop::$4 ← (word) xsin_idx#3 == (word/signed dword/dword~) loop::$3 +Inversing boolean not [90] (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [89] (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [98] (bool~) divr16u::$9 ← (word) divr16u::rem#6 < (word) divr16u::divisor#2 from [97] (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2 +Inversing boolean not [158] (bool~) mul16u::$3 ← (byte/word~) mul16u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [157] (bool~) mul16u::$2 ← (byte/word~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [184] (bool~) mul16s::$4 ← (signed word) mul16s::a#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [183] (bool~) mul16s::$3 ← (signed word) mul16s::a#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [188] (bool~) mul16s::$10 ← (signed word) mul16s::b#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [187] (bool~) mul16s::$9 ← (signed word) mul16s::b#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [262] (bool~) sin16s::$1 ← (dword) sin16s::x#3 < (dword) PI_u4f28#0 from [261] (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0 +Inversing boolean not [266] (bool~) sin16s::$4 ← (dword) sin16s::x#4 < (dword) PI_HALF_u4f28#0 from [265] (bool~) sin16s::$3 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0 +Inversing boolean not [326] (bool~) sin16s::$19 ← (byte) sin16s::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [325] (bool~) sin16s::$18 ← (byte) sin16s::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [449] (bool~) loop::$5 ← (word) xsin_idx#3 != (word/signed dword/dword~) loop::$3 from [448] (bool~) loop::$4 ← (word) xsin_idx#3 == (word/signed dword/dword~) loop::$3 Successful SSA optimization Pass2UnaryNotSimplification Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#7 Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#8 @@ -2108,30 +2108,30 @@ Redundant Phi (byte) render_logo::screen_idx#15 (byte) render_logo::screen_idx#1 Redundant Phi (word) rem16u#10 (word) rem16u#17 Redundant Phi (word) xsin_idx#12 (word) xsin_idx#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) divr16u::$4 if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 -Simple Condition (bool~) mul16u::$0 if((word) mul16u::a#3!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@2 -Simple Condition (bool~) mul16u::$3 if((byte/word~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 -Simple Condition (bool~) mul16s::$4 if((signed word) mul16s::a#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16s::@1 -Simple Condition (bool~) mul16s::$10 if((signed word) mul16s::b#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16s::@2 -Simple Condition (bool~) sin16s_gen2::$11 if((word) sin16s_gen2::i#1<(word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -Simple Condition (bool~) sin16s::$1 if((dword) sin16s::x#0<(dword) PI_u4f28#0) goto sin16s::@1 -Simple Condition (bool~) sin16s::$4 if((dword) sin16s::x#4<(dword) PI_HALF_u4f28#0) goto sin16s::@2 -Simple Condition (bool~) sin16s::$19 if((byte) sin16s::isUpper#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sin16s::@3 -Simple Condition (bool~) fill::$1 if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 -Simple Condition (bool~) main::$4 if((byte) main::ch#1!=rangelast(0,239)) goto main::@1 -Simple Condition (bool~) loop::$0 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto loop::@5 -Simple Condition (bool~) loop::$5 if((word) xsin_idx#3!=(word/signed dword/dword~) loop::$3) goto loop::@7 -Simple Condition (bool~) render_logo::$5 if((signed word) render_logo::xpos#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_logo::@1 -Simple Condition (bool~) render_logo::$7 if((byte) render_logo::screen_idx#17!=(byte) render_logo::logo_start#1) goto render_logo::@3 -Simple Condition (bool~) render_logo::$10 unroll if((byte) render_logo::line#2!=rangelast(0,5)) goto render_logo::@5 -Simple Condition (bool~) render_logo::$11 if((byte) render_logo::screen_idx#19!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto render_logo::@7 -Simple Condition (bool~) render_logo::$16 unroll if((byte) render_logo::line#4!=rangelast(0,5)) goto render_logo::@9 -Simple Condition (bool~) render_logo::$19 if((byte) render_logo::logo_idx#10!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto render_logo::@12 -Simple Condition (bool~) render_logo::$24 unroll if((byte) render_logo::line#6!=rangelast(0,5)) goto render_logo::@14 -Simple Condition (bool~) render_logo::$25 if((byte) render_logo::screen_idx#14!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto render_logo::@16 -Simple Condition (bool~) render_logo::$28 unroll if((byte) render_logo::line#8!=rangelast(0,5)) goto render_logo::@18 +Simple Condition (bool~) divr16u::$4 [91] if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [99] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [106] if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 +Simple Condition (bool~) mul16u::$0 [154] if((word) mul16u::a#3!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@2 +Simple Condition (bool~) mul16u::$3 [159] if((byte/word~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 +Simple Condition (bool~) mul16s::$4 [185] if((signed word) mul16s::a#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16s::@1 +Simple Condition (bool~) mul16s::$10 [189] if((signed word) mul16s::b#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16s::@2 +Simple Condition (bool~) sin16s_gen2::$11 [255] if((word) sin16s_gen2::i#1<(word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 +Simple Condition (bool~) sin16s::$1 [263] if((dword) sin16s::x#0<(dword) PI_u4f28#0) goto sin16s::@1 +Simple Condition (bool~) sin16s::$4 [267] if((dword) sin16s::x#4<(dword) PI_HALF_u4f28#0) goto sin16s::@2 +Simple Condition (bool~) sin16s::$19 [327] if((byte) sin16s::isUpper#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sin16s::@3 +Simple Condition (bool~) fill::$1 [361] if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 +Simple Condition (bool~) main::$4 [412] if((byte) main::ch#1!=rangelast(0,239)) goto main::@1 +Simple Condition (bool~) loop::$0 [437] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto loop::@5 +Simple Condition (bool~) loop::$5 [450] if((word) xsin_idx#3!=(word/signed dword/dword~) loop::$3) goto loop::@7 +Simple Condition (bool~) render_logo::$5 [468] if((signed word) render_logo::xpos#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto render_logo::@1 +Simple Condition (bool~) render_logo::$7 [480] if((byte) render_logo::screen_idx#17!=(byte) render_logo::logo_start#1) goto render_logo::@3 +Simple Condition (bool~) render_logo::$10 [491] unroll if((byte) render_logo::line#2!=rangelast(0,5)) goto render_logo::@5 +Simple Condition (bool~) render_logo::$11 [496] if((byte) render_logo::screen_idx#19!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto render_logo::@7 +Simple Condition (bool~) render_logo::$16 [507] unroll if((byte) render_logo::line#4!=rangelast(0,5)) goto render_logo::@9 +Simple Condition (bool~) render_logo::$19 [513] if((byte) render_logo::logo_idx#10!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto render_logo::@12 +Simple Condition (bool~) render_logo::$24 [524] unroll if((byte) render_logo::line#6!=rangelast(0,5)) goto render_logo::@14 +Simple Condition (bool~) render_logo::$25 [530] if((byte) render_logo::screen_idx#14!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto render_logo::@16 +Simple Condition (bool~) render_logo::$28 [539] unroll if((byte) render_logo::line#8!=rangelast(0,5)) goto render_logo::@18 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -2294,8 +2294,8 @@ Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&15 Successful SSA optimization Pass2ConstantIdentification Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if((const signed word) mul16s::b#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16s::@2 -if() condition always true - replacing block destination if(true) goto loop::@2 +if() condition always true - replacing block destination [44] if((const signed word) mul16s::b#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16s::@2 +if() condition always true - replacing block destination [152] if(true) goto loop::@2 Successful SSA optimization Pass2ConstantIfs Fixing inline constructor with div32u16u::$4 ← div32u16u::quotient_hi#0 dw= div32u16u::quotient_lo#0 Successful SSA optimization Pass2FixInlineConstructors @@ -2374,7 +2374,7 @@ Constant (const byte) render_logo::line#2 = ++render_logo::line#1 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$9 = SCREEN#0+render_logo::$8 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [166] if((const byte) render_logo::line#2!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@5_1 +if() condition always true - replacing block destination [162] if((const byte) render_logo::line#2!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@5_1 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@9 tails: render_logo::@9 blocks: render_logo::@9 Successful SSA optimization Pass2LoopUnroll @@ -2386,7 +2386,7 @@ Constant (const byte) render_logo::line#4 = ++render_logo::line#3 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$13 = SCREEN#0+render_logo::$12 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [48] if((const byte) render_logo::line#4!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@9_1 +if() condition always true - replacing block destination [43] if((const byte) render_logo::line#4!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@9_1 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@9_1 tails: render_logo::@9_1 blocks: render_logo::@9_1 Successful SSA optimization Pass2LoopUnroll @@ -2398,7 +2398,7 @@ Constant (const byte) render_logo::line#16 = ++render_logo::line#4 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$32 = SCREEN#0+render_logo::$31 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [50] if((const byte) render_logo::line#16!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@9_2 +if() condition always true - replacing block destination [45] if((const byte) render_logo::line#16!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@9_2 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@9_2 tails: render_logo::@9_2 blocks: render_logo::@9_2 Successful SSA optimization Pass2LoopUnroll @@ -2410,7 +2410,7 @@ Constant (const byte) render_logo::line#18 = ++render_logo::line#16 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$36 = SCREEN#0+render_logo::$35 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [52] if((const byte) render_logo::line#18!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@9_3 +if() condition always true - replacing block destination [47] if((const byte) render_logo::line#18!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@9_3 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@9_3 tails: render_logo::@9_3 blocks: render_logo::@9_3 Successful SSA optimization Pass2LoopUnroll @@ -2422,7 +2422,7 @@ Constant (const byte) render_logo::line#20 = ++render_logo::line#18 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$40 = SCREEN#0+render_logo::$39 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [54] if((const byte) render_logo::line#20!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@9_4 +if() condition always true - replacing block destination [49] if((const byte) render_logo::line#20!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@9_4 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@9_4 tails: render_logo::@9_4 blocks: render_logo::@9_4 Successful SSA optimization Pass2LoopUnroll @@ -2434,7 +2434,7 @@ Constant (const byte) render_logo::line#22 = ++render_logo::line#20 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$44 = SCREEN#0+render_logo::$43 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [56] if((const byte) render_logo::line#22!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@9_5 +if() condition always true - replacing block destination [51] if((const byte) render_logo::line#22!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@9_5 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@9_5 tails: render_logo::@9_5 blocks: render_logo::@9_5 Successful SSA optimization Pass2LoopUnroll @@ -2447,7 +2447,7 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$48 = SCREEN#0+render_logo::$47 Successful SSA optimization Pass2ConstantIdentification Removing PHI-reference to removed block (render_logo::@9_5) in block render_logo::@9_6 -if() condition always false - eliminating [58] if((const byte) render_logo::line#24!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@9_6 +if() condition always false - eliminating [53] if((const byte) render_logo::line#24!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@9_6 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Eliminating variable (byte) render_logo::line#25 from unused block render_logo::@9_6 @@ -2467,7 +2467,7 @@ Constant (const byte) render_logo::line#14 = ++render_logo::line#2 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$30 = SCREEN#0+render_logo::$29 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [61] if((const byte) render_logo::line#14!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@5_2 +if() condition always true - replacing block destination [57] if((const byte) render_logo::line#14!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@5_2 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@5_2 tails: render_logo::@5_2 blocks: render_logo::@5_2 Successful SSA optimization Pass2LoopUnroll @@ -2478,7 +2478,7 @@ Constant (const byte) render_logo::line#28 = ++render_logo::line#14 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$56 = SCREEN#0+render_logo::$55 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [62] if((const byte) render_logo::line#28!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@5_3 +if() condition always true - replacing block destination [58] if((const byte) render_logo::line#28!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@5_3 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@5_3 tails: render_logo::@5_3 blocks: render_logo::@5_3 Successful SSA optimization Pass2LoopUnroll @@ -2489,7 +2489,7 @@ Constant (const byte) render_logo::line#30 = ++render_logo::line#28 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$58 = SCREEN#0+render_logo::$57 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [63] if((const byte) render_logo::line#30!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@5_4 +if() condition always true - replacing block destination [59] if((const byte) render_logo::line#30!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@5_4 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@5_4 tails: render_logo::@5_4 blocks: render_logo::@5_4 Successful SSA optimization Pass2LoopUnroll @@ -2500,7 +2500,7 @@ Constant (const byte) render_logo::line#32 = ++render_logo::line#30 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$60 = SCREEN#0+render_logo::$59 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [64] if((const byte) render_logo::line#32!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@5_5 +if() condition always true - replacing block destination [60] if((const byte) render_logo::line#32!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@5_5 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@5_5 tails: render_logo::@5_5 blocks: render_logo::@5_5 Successful SSA optimization Pass2LoopUnroll @@ -2512,7 +2512,7 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$62 = SCREEN#0+render_logo::$61 Successful SSA optimization Pass2ConstantIdentification Removing PHI-reference to removed block (render_logo::@5_5) in block render_logo::@5_6 -if() condition always false - eliminating [65] if((const byte) render_logo::line#34!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@5_6 +if() condition always false - eliminating [61] if((const byte) render_logo::line#34!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@5_6 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Eliminating variable (byte) render_logo::line#35 from unused block render_logo::@5_6 @@ -2530,7 +2530,7 @@ Constant (const byte) render_logo::line#8 = ++render_logo::line#7 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$27 = SCREEN#0+render_logo::$26 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [72] if((const byte) render_logo::line#8!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@18_1 +if() condition always true - replacing block destination [68] if((const byte) render_logo::line#8!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@18_1 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@18_1 tails: render_logo::@18_1 blocks: render_logo::@18_1 Successful SSA optimization Pass2LoopUnroll @@ -2541,7 +2541,7 @@ Constant (const byte) render_logo::line#38 = ++render_logo::line#8 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$66 = SCREEN#0+render_logo::$65 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [73] if((const byte) render_logo::line#38!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@18_2 +if() condition always true - replacing block destination [69] if((const byte) render_logo::line#38!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@18_2 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@18_2 tails: render_logo::@18_2 blocks: render_logo::@18_2 Successful SSA optimization Pass2LoopUnroll @@ -2552,7 +2552,7 @@ Constant (const byte) render_logo::line#40 = ++render_logo::line#38 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$68 = SCREEN#0+render_logo::$67 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [74] if((const byte) render_logo::line#40!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@18_3 +if() condition always true - replacing block destination [70] if((const byte) render_logo::line#40!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@18_3 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@18_3 tails: render_logo::@18_3 blocks: render_logo::@18_3 Successful SSA optimization Pass2LoopUnroll @@ -2563,7 +2563,7 @@ Constant (const byte) render_logo::line#42 = ++render_logo::line#40 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$70 = SCREEN#0+render_logo::$69 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [75] if((const byte) render_logo::line#42!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@18_4 +if() condition always true - replacing block destination [71] if((const byte) render_logo::line#42!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@18_4 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@18_4 tails: render_logo::@18_4 blocks: render_logo::@18_4 Successful SSA optimization Pass2LoopUnroll @@ -2574,7 +2574,7 @@ Constant (const byte) render_logo::line#44 = ++render_logo::line#42 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$72 = SCREEN#0+render_logo::$71 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [76] if((const byte) render_logo::line#44!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@18_5 +if() condition always true - replacing block destination [72] if((const byte) render_logo::line#44!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@18_5 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@18_5 tails: render_logo::@18_5 blocks: render_logo::@18_5 Successful SSA optimization Pass2LoopUnroll @@ -2586,7 +2586,7 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$74 = SCREEN#0+render_logo::$73 Successful SSA optimization Pass2ConstantIdentification Removing PHI-reference to removed block (render_logo::@18_5) in block render_logo::@18_6 -if() condition always false - eliminating [77] if((const byte) render_logo::line#46!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@18_6 +if() condition always false - eliminating [73] if((const byte) render_logo::line#46!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@18_6 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Eliminating variable (byte) render_logo::line#47 from unused block render_logo::@18_6 @@ -2605,7 +2605,7 @@ Constant (const byte) render_logo::line#6 = ++render_logo::line#5 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$21 = SCREEN#0+render_logo::$20 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [81] if((const byte) render_logo::line#6!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@14_1 +if() condition always true - replacing block destination [76] if((const byte) render_logo::line#6!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@14_1 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@14_1 tails: render_logo::@14_1 blocks: render_logo::@14_1 Successful SSA optimization Pass2LoopUnroll @@ -2617,7 +2617,7 @@ Constant (const byte) render_logo::line#50 = ++render_logo::line#6 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$78 = SCREEN#0+render_logo::$77 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [83] if((const byte) render_logo::line#50!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@14_2 +if() condition always true - replacing block destination [78] if((const byte) render_logo::line#50!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@14_2 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@14_2 tails: render_logo::@14_2 blocks: render_logo::@14_2 Successful SSA optimization Pass2LoopUnroll @@ -2629,7 +2629,7 @@ Constant (const byte) render_logo::line#52 = ++render_logo::line#50 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$82 = SCREEN#0+render_logo::$81 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [85] if((const byte) render_logo::line#52!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@14_3 +if() condition always true - replacing block destination [80] if((const byte) render_logo::line#52!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@14_3 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@14_3 tails: render_logo::@14_3 blocks: render_logo::@14_3 Successful SSA optimization Pass2LoopUnroll @@ -2641,7 +2641,7 @@ Constant (const byte) render_logo::line#54 = ++render_logo::line#52 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$86 = SCREEN#0+render_logo::$85 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [87] if((const byte) render_logo::line#54!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@14_4 +if() condition always true - replacing block destination [82] if((const byte) render_logo::line#54!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@14_4 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@14_4 tails: render_logo::@14_4 blocks: render_logo::@14_4 Successful SSA optimization Pass2LoopUnroll @@ -2653,7 +2653,7 @@ Constant (const byte) render_logo::line#56 = ++render_logo::line#54 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$90 = SCREEN#0+render_logo::$89 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [89] if((const byte) render_logo::line#56!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@14_5 +if() condition always true - replacing block destination [84] if((const byte) render_logo::line#56!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@14_5 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: render_logo::@14_5 tails: render_logo::@14_5 blocks: render_logo::@14_5 Successful SSA optimization Pass2LoopUnroll @@ -2666,7 +2666,7 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) render_logo::$94 = SCREEN#0+render_logo::$93 Successful SSA optimization Pass2ConstantIdentification Removing PHI-reference to removed block (render_logo::@14_5) in block render_logo::@14_6 -if() condition always false - eliminating [91] if((const byte) render_logo::line#58!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@14_6 +if() condition always false - eliminating [86] if((const byte) render_logo::line#58!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto render_logo::@14_6 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Eliminating variable (byte) render_logo::line#59 from unused block render_logo::@14_6 diff --git a/src/test/ref/examples/showlogo/showlogo.log b/src/test/ref/examples/showlogo/showlogo.log index bf7449eb3..c58161733 100644 --- a/src/test/ref/examples/showlogo/showlogo.log +++ b/src/test/ref/examples/showlogo/showlogo.log @@ -490,8 +490,8 @@ Redundant Phi (byte*) SCREEN#4 (byte*) SCREEN#3 Redundant Phi (byte) fill::val#2 (byte) fill::val#3 Redundant Phi (byte*) fill::end#1 (byte*) fill::end#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$7 if((byte) main::ch#1!=rangelast(0,239)) goto main::@1 -Simple Condition (bool~) fill::$1 if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 +Simple Condition (bool~) main::$7 [127] if((byte) main::ch#1!=rangelast(0,239)) goto main::@1 +Simple Condition (bool~) fill::$1 [145] if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -605,7 +605,7 @@ Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&15 Successful SSA optimization Pass2ConstantIdentification Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@3 +if() condition always true - replacing block destination [13] if(true) goto main::@3 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/examples/sinplotter/sine-plotter.log b/src/test/ref/examples/sinplotter/sine-plotter.log index 9703d79b5..6cbbd1ed4 100644 --- a/src/test/ref/examples/sinplotter/sine-plotter.log +++ b/src/test/ref/examples/sinplotter/sine-plotter.log @@ -1938,17 +1938,17 @@ SYMBOL TABLE SSA (signed word) wrap_y::y#8 (signed word) wrap_y::y#9 -Inversing boolean not (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) divr16u::$9 ← (word) divr16u::rem#6 < (word) divr16u::divisor#2 from (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2 -Inversing boolean not (bool~) mul16u::$3 ← (byte/word~) mul16u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul16u::$2 ← (byte/word~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mul16s::$4 ← (signed word) mul16s::a#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul16s::$3 ← (signed word) mul16s::a#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mul16s::$10 ← (signed word) mul16s::b#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul16s::$9 ← (signed word) mul16s::b#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) sin16s::$1 ← (dword) sin16s::x#3 < (dword) PI_u4f28#0 from (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0 -Inversing boolean not (bool~) sin16s::$4 ← (dword) sin16s::x#4 < (dword) PI_HALF_u4f28#0 from (bool~) sin16s::$3 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0 -Inversing boolean not (bool~) sin16s::$19 ← (byte) sin16s::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) sin16s::$18 ← (byte) sin16s::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte/signed byte/word/signed word/dword/signed dword) 7 from (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte/signed byte/word/signed word/dword/signed dword) 7 -Inversing boolean not (bool~) render_sine::$10 ← (word) render_sine::xpos#1 != (word/signed word/dword/signed dword) 320 from (bool~) render_sine::$9 ← (word) render_sine::xpos#1 == (word/signed word/dword/signed dword) 320 +Inversing boolean not [90] (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [89] (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [98] (bool~) divr16u::$9 ← (word) divr16u::rem#6 < (word) divr16u::divisor#2 from [97] (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2 +Inversing boolean not [158] (bool~) mul16u::$3 ← (byte/word~) mul16u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [157] (bool~) mul16u::$2 ← (byte/word~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [184] (bool~) mul16s::$4 ← (signed word) mul16s::a#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [183] (bool~) mul16s::$3 ← (signed word) mul16s::a#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [188] (bool~) mul16s::$10 ← (signed word) mul16s::b#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [187] (bool~) mul16s::$9 ← (signed word) mul16s::b#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [262] (bool~) sin16s::$1 ← (dword) sin16s::x#3 < (dword) PI_u4f28#0 from [261] (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0 +Inversing boolean not [266] (bool~) sin16s::$4 ← (dword) sin16s::x#4 < (dword) PI_HALF_u4f28#0 from [265] (bool~) sin16s::$3 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0 +Inversing boolean not [326] (bool~) sin16s::$19 ← (byte) sin16s::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [325] (bool~) sin16s::$18 ← (byte) sin16s::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [374] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [373] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [394] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte/signed byte/word/signed word/dword/signed dword) 7 from [393] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte/signed byte/word/signed word/dword/signed dword) 7 +Inversing boolean not [539] (bool~) render_sine::$10 ← (word) render_sine::xpos#1 != (word/signed word/dword/signed dword) 320 from [538] (bool~) render_sine::$9 ← (word) render_sine::xpos#1 == (word/signed word/dword/signed dword) 320 Successful SSA optimization Pass2UnaryNotSimplification Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#7 Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#8 @@ -2148,28 +2148,28 @@ Redundant Phi (signed word*) sin2#4 (signed word*) sin2#11 Redundant Phi (signed word*) sin2#1 (signed word*) sin2#4 Redundant Phi (word) rem16u#10 (word) rem16u#18 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) divr16u::$4 if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 -Simple Condition (bool~) mul16u::$0 if((word) mul16u::a#3!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@2 -Simple Condition (bool~) mul16u::$3 if((byte/word~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 -Simple Condition (bool~) mul16s::$4 if((signed word) mul16s::a#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16s::@1 -Simple Condition (bool~) mul16s::$10 if((signed word) mul16s::b#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16s::@2 -Simple Condition (bool~) sin16s_gen2::$11 if((word) sin16s_gen2::i#1<(word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 -Simple Condition (bool~) sin16s::$1 if((dword) sin16s::x#0<(dword) PI_u4f28#0) goto sin16s::@1 -Simple Condition (bool~) sin16s::$4 if((dword) sin16s::x#4<(dword) PI_HALF_u4f28#0) goto sin16s::@2 -Simple Condition (bool~) sin16s::$19 if((byte) sin16s::isUpper#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sin16s::@3 -Simple Condition (bool~) fill::$1 if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 -Simple Condition (bool~) bitmap_init::$1 if((byte) bitmap_init::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$2 if((byte) bitmap_init::x#1!=rangelast(0,255)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$9 if((byte~) bitmap_init::$7!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto bitmap_init::@4 -Simple Condition (bool~) bitmap_init::$12 if((byte) bitmap_init::y#1!=rangelast(0,255)) goto bitmap_init::@3 -Simple Condition (bool~) bitmap_clear::$1 if((byte) bitmap_clear::x#1!=rangelast(0,199)) goto bitmap_clear::@2 -Simple Condition (bool~) bitmap_clear::$2 if((byte) bitmap_clear::y#1!=rangelast(0,39)) goto bitmap_clear::@1 -Simple Condition (bool~) render_sine::$10 if((word) render_sine::xpos#1!=(word/signed word/dword/signed dword) 320) goto render_sine::@2 -Simple Condition (bool~) render_sine::$11 if((word) render_sine::sin_idx#1<(word) SIN_SIZE#0) goto render_sine::@1 -Simple Condition (bool~) wrap_y::$0 if((signed word) wrap_y::y#4>=(byte/word/signed word/dword/signed dword) 200) goto wrap_y::@2 -Simple Condition (bool~) wrap_y::$1 if((signed word) wrap_y::y#6<(byte/signed byte/word/signed word/dword/signed dword) 0) goto wrap_y::@5 +Simple Condition (bool~) divr16u::$4 [91] if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [99] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [106] if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 +Simple Condition (bool~) mul16u::$0 [154] if((word) mul16u::a#3!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@2 +Simple Condition (bool~) mul16u::$3 [159] if((byte/word~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 +Simple Condition (bool~) mul16s::$4 [185] if((signed word) mul16s::a#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16s::@1 +Simple Condition (bool~) mul16s::$10 [189] if((signed word) mul16s::b#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16s::@2 +Simple Condition (bool~) sin16s_gen2::$11 [255] if((word) sin16s_gen2::i#1<(word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@1 +Simple Condition (bool~) sin16s::$1 [263] if((dword) sin16s::x#0<(dword) PI_u4f28#0) goto sin16s::@1 +Simple Condition (bool~) sin16s::$4 [267] if((dword) sin16s::x#4<(dword) PI_HALF_u4f28#0) goto sin16s::@2 +Simple Condition (bool~) sin16s::$19 [327] if((byte) sin16s::isUpper#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sin16s::@3 +Simple Condition (bool~) fill::$1 [361] if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 +Simple Condition (bool~) bitmap_init::$1 [375] if((byte) bitmap_init::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$2 [379] if((byte) bitmap_init::x#1!=rangelast(0,255)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$9 [395] if((byte~) bitmap_init::$7!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto bitmap_init::@4 +Simple Condition (bool~) bitmap_init::$12 [399] if((byte) bitmap_init::y#1!=rangelast(0,255)) goto bitmap_init::@3 +Simple Condition (bool~) bitmap_clear::$1 [415] if((byte) bitmap_clear::x#1!=rangelast(0,199)) goto bitmap_clear::@2 +Simple Condition (bool~) bitmap_clear::$2 [419] if((byte) bitmap_clear::y#1!=rangelast(0,39)) goto bitmap_clear::@1 +Simple Condition (bool~) render_sine::$10 [540] if((word) render_sine::xpos#1!=(word/signed word/dword/signed dword) 320) goto render_sine::@2 +Simple Condition (bool~) render_sine::$11 [544] if((word) render_sine::sin_idx#1<(word) SIN_SIZE#0) goto render_sine::@1 +Simple Condition (bool~) wrap_y::$0 [551] if((signed word) wrap_y::y#4>=(byte/word/signed word/dword/signed dword) 200) goto wrap_y::@2 +Simple Condition (bool~) wrap_y::$1 [556] if((signed word) wrap_y::y#6<(byte/signed byte/word/signed word/dword/signed dword) 0) goto wrap_y::@5 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -2339,8 +2339,8 @@ Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&15 Successful SSA optimization Pass2ConstantIdentification Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if((const signed word) mul16s::b#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16s::@2 -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [44] if((const signed word) mul16s::b#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16s::@2 +if() condition always true - replacing block destination [184] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Fixing inline constructor with bitmap_clear::$3 ← *(bitmap_plot_yhi#0 + 0) w= *(bitmap_plot_ylo#0 + 0) Fixing inline constructor with bitmap_plot::$3 ← *(bitmap_plot_yhi#0 + bitmap_plot::y#2) w= *(bitmap_plot_ylo#0 + bitmap_plot::y#2) diff --git a/src/test/ref/examples/sinsprites/sinus-sprites.log b/src/test/ref/examples/sinsprites/sinus-sprites.log index a0bfda64e..c5c817ea4 100644 --- a/src/test/ref/examples/sinsprites/sinus-sprites.log +++ b/src/test/ref/examples/sinsprites/sinus-sprites.log @@ -1871,13 +1871,13 @@ SYMBOL TABLE SSA (void()) subFACfromARG() (label) subFACfromARG::@return -Inversing boolean not (bool~) progress_inc::$1 ← (byte) progress_idx#10 != (byte/signed byte/word/signed word/dword/signed dword) 8 from (bool~) progress_inc::$0 ← (byte) progress_idx#10 == (byte/signed byte/word/signed word/dword/signed dword) 8 -Inversing boolean not (bool~) anim::$8 ← (byte) anim::xidx#1 < (byte) sinlen_x#0 from (bool~) anim::$7 ← (byte) anim::xidx#1 >= (byte) sinlen_x#0 -Inversing boolean not (bool~) anim::$12 ← (byte) anim::yidx#1 < (byte) sinlen_y#0 from (bool~) anim::$11 ← (byte) anim::yidx#1 >= (byte) sinlen_y#0 -Inversing boolean not (bool~) anim::$17 ← (byte) sin_idx_x#3 < (byte) sinlen_x#0 from (bool~) anim::$16 ← (byte) sin_idx_x#3 >= (byte) sinlen_x#0 -Inversing boolean not (bool~) anim::$19 ← (byte) sin_idx_y#3 < (byte) sinlen_y#0 from (bool~) anim::$18 ← (byte) sin_idx_y#3 >= (byte) sinlen_y#0 -Inversing boolean not (bool~) gen_chargen_sprite::$5 ← (byte~) gen_chargen_sprite::$3 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) gen_chargen_sprite::$4 ← (byte~) gen_chargen_sprite::$3 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) gen_chargen_sprite::$9 ← (byte) gen_chargen_sprite::s_gen_cnt#1 != (byte/signed byte/word/signed word/dword/signed dword) 8 from (bool~) gen_chargen_sprite::$8 ← (byte) gen_chargen_sprite::s_gen_cnt#1 == (byte/signed byte/word/signed word/dword/signed dword) 8 +Inversing boolean not [226] (bool~) progress_inc::$1 ← (byte) progress_idx#10 != (byte/signed byte/word/signed word/dword/signed dword) 8 from [225] (bool~) progress_inc::$0 ← (byte) progress_idx#10 == (byte/signed byte/word/signed word/dword/signed dword) 8 +Inversing boolean not [262] (bool~) anim::$8 ← (byte) anim::xidx#1 < (byte) sinlen_x#0 from [261] (bool~) anim::$7 ← (byte) anim::xidx#1 >= (byte) sinlen_x#0 +Inversing boolean not [268] (bool~) anim::$12 ← (byte) anim::yidx#1 < (byte) sinlen_y#0 from [267] (bool~) anim::$11 ← (byte) anim::yidx#1 >= (byte) sinlen_y#0 +Inversing boolean not [286] (bool~) anim::$17 ← (byte) sin_idx_x#3 < (byte) sinlen_x#0 from [285] (bool~) anim::$16 ← (byte) sin_idx_x#3 >= (byte) sinlen_x#0 +Inversing boolean not [291] (bool~) anim::$19 ← (byte) sin_idx_y#3 < (byte) sinlen_y#0 from [290] (bool~) anim::$18 ← (byte) sin_idx_y#3 >= (byte) sinlen_y#0 +Inversing boolean not [363] (bool~) gen_chargen_sprite::$5 ← (byte~) gen_chargen_sprite::$3 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [362] (bool~) gen_chargen_sprite::$4 ← (byte~) gen_chargen_sprite::$3 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [375] (bool~) gen_chargen_sprite::$9 ← (byte) gen_chargen_sprite::s_gen_cnt#1 != (byte/signed byte/word/signed word/dword/signed dword) 8 from [374] (bool~) gen_chargen_sprite::$8 ← (byte) gen_chargen_sprite::s_gen_cnt#1 == (byte/signed byte/word/signed word/dword/signed dword) 8 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) prepareMEM::mem#0 = (byte*~) setFAC::$0 Alias (word) getFAC::return#0 = (word) getFAC::w#0 (word) getFAC::return#3 (word) getFAC::return#1 @@ -2085,23 +2085,23 @@ Successful SSA optimization Pass2RedundantPhiElimination Redundant Phi (byte) progress_idx#54 (byte) progress_idx#23 Redundant Phi (byte*) progress_cursor#54 (byte*) progress_cursor#22 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@2 -Simple Condition (bool~) init::$2 if((byte) init::i#1!=rangelast(0,39)) goto init::@1 -Simple Condition (bool~) clear_screen::$1 if((byte*) clear_screen::sc#1<(byte*~) clear_screen::$0) goto clear_screen::@1 -Simple Condition (bool~) progress_inc::$1 if((byte) progress_idx#10!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto progress_inc::@1 -Simple Condition (bool~) anim::$8 if((byte) anim::xidx#1<(byte) sinlen_x#0) goto anim::@2 -Simple Condition (bool~) anim::$12 if((byte) anim::yidx#1<(byte) sinlen_y#0) goto anim::@3 -Simple Condition (bool~) anim::$15 if((byte) anim::j#1!=rangelast(0,6)) goto anim::@1 -Simple Condition (bool~) anim::$17 if((byte) sin_idx_x#3<(byte) sinlen_x#0) goto anim::@4 -Simple Condition (bool~) anim::$19 if((byte) sin_idx_y#3<(byte) sinlen_y#0) goto anim::@5 -Simple Condition (bool~) place_sprites::$6 if((byte) place_sprites::j#1!=rangelast(0,6)) goto place_sprites::@1 -Simple Condition (bool~) gen_sprites::$2 if((byte) gen_sprites::i#1!=rangelast(0,6)) goto gen_sprites::@1 -Simple Condition (bool~) gen_chargen_sprite::$5 if((byte~) gen_chargen_sprite::$3==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gen_chargen_sprite::@3 -Simple Condition (bool~) gen_chargen_sprite::$9 if((byte) gen_chargen_sprite::s_gen_cnt#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto gen_chargen_sprite::@5 -Simple Condition (bool~) gen_chargen_sprite::$10 if((byte) gen_chargen_sprite::b#1!=rangelast(0,2)) goto gen_chargen_sprite::@4 -Simple Condition (bool~) gen_chargen_sprite::$12 if((byte) gen_chargen_sprite::x#1!=rangelast(0,7)) goto gen_chargen_sprite::@2 -Simple Condition (bool~) gen_chargen_sprite::$14 if((byte) gen_chargen_sprite::y#1!=rangelast(0,7)) goto gen_chargen_sprite::@1 -Simple Condition (bool~) gen_sintab::$26 if((byte) gen_sintab::i#1<(byte) gen_sintab::length#10) goto gen_sintab::@1 +Simple Condition (bool~) main::$1 [143] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@2 +Simple Condition (bool~) init::$2 [166] if((byte) init::i#1!=rangelast(0,39)) goto init::@1 +Simple Condition (bool~) clear_screen::$1 [211] if((byte*) clear_screen::sc#1<(byte*~) clear_screen::$0) goto clear_screen::@1 +Simple Condition (bool~) progress_inc::$1 [227] if((byte) progress_idx#10!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto progress_inc::@1 +Simple Condition (bool~) anim::$8 [263] if((byte) anim::xidx#1<(byte) sinlen_x#0) goto anim::@2 +Simple Condition (bool~) anim::$12 [269] if((byte) anim::yidx#1<(byte) sinlen_y#0) goto anim::@3 +Simple Condition (bool~) anim::$15 [278] if((byte) anim::j#1!=rangelast(0,6)) goto anim::@1 +Simple Condition (bool~) anim::$17 [287] if((byte) sin_idx_x#3<(byte) sinlen_x#0) goto anim::@4 +Simple Condition (bool~) anim::$19 [292] if((byte) sin_idx_y#3<(byte) sinlen_y#0) goto anim::@5 +Simple Condition (bool~) place_sprites::$6 [330] if((byte) place_sprites::j#1!=rangelast(0,6)) goto place_sprites::@1 +Simple Condition (bool~) gen_sprites::$2 [344] if((byte) gen_sprites::i#1!=rangelast(0,6)) goto gen_sprites::@1 +Simple Condition (bool~) gen_chargen_sprite::$5 [364] if((byte~) gen_chargen_sprite::$3==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gen_chargen_sprite::@3 +Simple Condition (bool~) gen_chargen_sprite::$9 [376] if((byte) gen_chargen_sprite::s_gen_cnt#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto gen_chargen_sprite::@5 +Simple Condition (bool~) gen_chargen_sprite::$10 [380] if((byte) gen_chargen_sprite::b#1!=rangelast(0,2)) goto gen_chargen_sprite::@4 +Simple Condition (bool~) gen_chargen_sprite::$12 [393] if((byte) gen_chargen_sprite::x#1!=rangelast(0,7)) goto gen_chargen_sprite::@2 +Simple Condition (bool~) gen_chargen_sprite::$14 [399] if((byte) gen_chargen_sprite::y#1!=rangelast(0,7)) goto gen_chargen_sprite::@1 +Simple Condition (bool~) gen_sintab::$26 [481] if((byte) gen_sintab::i#1<(byte) gen_sintab::length#10) goto gen_sintab::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -2260,11 +2260,11 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in assignment *(COLS#0+40 + init::$1) Consolidated array index constant in *(progress_inc::progress_chars#0+8) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto main::@1 +if() condition always true - replacing block destination [44] if(true) goto main::@1 Successful SSA optimization Pass2ConstantIfs Fixing inline constructor with getFAC::$0 ← *(memHi#0) w= *(memLo#0) Successful SSA optimization Pass2FixInlineConstructors -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) init::$1 ← (byte) init::i#2 +Inferred type updated to byte in [49] (byte/signed word/word/dword/signed dword~) init::$1 ← (byte) init::i#2 Successful SSA optimization PassNEliminateUnusedVars Successful SSA optimization PassNEliminateUnusedVars Eliminating Noop Cast (byte*) prepareMEM::mem#0 ← ((byte*)) (word) setFAC::w#5 diff --git a/src/test/ref/fibmem.log b/src/test/ref/fibmem.log index b1561c0ad..421ddb773 100644 --- a/src/test/ref/fibmem.log +++ b/src/test/ref/fibmem.log @@ -49,7 +49,7 @@ SYMBOL TABLE SSA Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks -Simple Condition (bool~) main::$3 if((byte) main::i#1<(byte/signed byte/word/signed word/dword/signed dword) 15) goto main::@1 +Simple Condition (bool~) main::$3 [11] if((byte) main::i#1<(byte/signed byte/word/signed word/dword/signed dword) 15) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte[15]) fibs#0 = ((byte*))4352 Constant (const byte) main::i#0 = 0 @@ -59,8 +59,8 @@ Consolidated array index constant in *(fibs#0+1) Consolidated array index constant in assignment *(fibs#0+1 + main::$1) Consolidated array index constant in assignment *(fibs#0+2 + main::$0) Successful SSA optimization Pass2ConstantAdditionElimination -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) main::$0 ← (byte) main::i#2 -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) main::$1 ← (byte) main::i#2 +Inferred type updated to byte in [3] (byte/signed word/word/dword/signed dword~) main::$0 ← (byte) main::i#2 +Inferred type updated to byte in [4] (byte/signed word/word/dword/signed dword~) main::$1 ← (byte) main::i#2 Alias (byte) main::i#2 = (byte~) main::$0 (byte~) main::$1 Successful SSA optimization Pass2AliasElimination Inlining constant with var siblings (const byte) main::i#0 diff --git a/src/test/ref/fillscreen.log b/src/test/ref/fillscreen.log index 5606d8d70..1de5c4890 100644 --- a/src/test/ref/fillscreen.log +++ b/src/test/ref/fillscreen.log @@ -103,7 +103,7 @@ Redundant Phi (byte) fillscreen::c#2 (byte) fillscreen::c#0 Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#4 Redundant Phi (byte) fillscreen::c#1 (byte) fillscreen::c#2 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) fillscreen::$3 if((byte) fillscreen::j#1!=rangelast(0,255)) goto fillscreen::@1 +Simple Condition (bool~) fillscreen::$3 [21] if((byte) fillscreen::j#1!=rangelast(0,255)) goto fillscreen::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte) fillscreen::j#0 = 0 diff --git a/src/test/ref/flipper-rex2.log b/src/test/ref/flipper-rex2.log index 4be3bcdb8..e9992245b 100644 --- a/src/test/ref/flipper-rex2.log +++ b/src/test/ref/flipper-rex2.log @@ -352,15 +352,15 @@ Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#2 Redundant Phi (byte*) plot::line#2 (byte*) plot::line#4 Redundant Phi (byte) plot::y#2 (byte) plot::y#4 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if(*((byte*) RASTER#1)!=(byte/word/signed word/dword/signed dword) 254) goto main::@3 -Simple Condition (bool~) main::$2 if(*((byte*) RASTER#1)!=(byte/word/signed word/dword/signed dword) 255) goto main::@4 -Simple Condition (bool~) main::$3 if((byte) main::c#1!=rangelast(25,1)) goto main::@2 -Simple Condition (bool~) prepare::$0 if((byte) prepare::i#1!=rangelast(0,255)) goto prepare::@1 -Simple Condition (bool~) flip::$1 if((byte) flip::c#1!=rangelast(16,1)) goto flip::@2 -Simple Condition (bool~) flip::$2 if((byte) flip::r#1!=rangelast(16,1)) goto flip::@1 -Simple Condition (bool~) flip::$3 if((byte) flip::i#1!=rangelast(0,255)) goto flip::@3 -Simple Condition (bool~) plot::$3 if((byte) plot::x#1<(byte/signed byte/word/signed word/dword/signed dword) 16) goto plot::@2 -Simple Condition (bool~) plot::$5 if((byte) plot::y#1!=rangelast(16,1)) goto plot::@1 +Simple Condition (bool~) main::$1 [14] if(*((byte*) RASTER#1)!=(byte/word/signed word/dword/signed dword) 254) goto main::@3 +Simple Condition (bool~) main::$2 [17] if(*((byte*) RASTER#1)!=(byte/word/signed word/dword/signed dword) 255) goto main::@4 +Simple Condition (bool~) main::$3 [21] if((byte) main::c#1!=rangelast(25,1)) goto main::@2 +Simple Condition (bool~) prepare::$0 [34] if((byte) prepare::i#1!=rangelast(0,255)) goto prepare::@1 +Simple Condition (bool~) flip::$1 [48] if((byte) flip::c#1!=rangelast(16,1)) goto flip::@2 +Simple Condition (bool~) flip::$2 [53] if((byte) flip::r#1!=rangelast(16,1)) goto flip::@1 +Simple Condition (bool~) flip::$3 [59] if((byte) flip::i#1!=rangelast(0,255)) goto flip::@3 +Simple Condition (bool~) plot::$3 [75] if((byte) plot::x#1<(byte/signed byte/word/signed word/dword/signed dword) 16) goto plot::@2 +Simple Condition (bool~) plot::$5 [81] if((byte) plot::y#1!=rangelast(16,1)) goto plot::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const word/signed word/dword/signed dword) $0 = 16*16 Constant (const word/signed word/dword/signed dword) $1 = 16*16 @@ -383,7 +383,7 @@ Constant (const byte[$1]) buffer2#0 = { fill( $1, 0) } Successful SSA optimization Pass2ConstantIdentification Consolidated constant in assignment plot::line#0 Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto main::@1 +if() condition always true - replacing block destination [9] if(true) goto main::@1 Successful SSA optimization Pass2ConstantIfs Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/forclassicmin.log b/src/test/ref/forclassicmin.log index 2dc49a609..3b2087fb3 100644 --- a/src/test/ref/forclassicmin.log +++ b/src/test/ref/forclassicmin.log @@ -56,7 +56,7 @@ Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#0 Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#2 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$0 if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 100) goto main::@1 +Simple Condition (bool~) main::$0 [8] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 100) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte) main::i#0 = 0 diff --git a/src/test/ref/forincrementassign.log b/src/test/ref/forincrementassign.log index 92536c76b..5b9fb58c8 100644 --- a/src/test/ref/forincrementassign.log +++ b/src/test/ref/forincrementassign.log @@ -57,7 +57,7 @@ Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#0 Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#2 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if((byte) main::i#1<(byte/signed byte/word/signed word/dword/signed dword) 40) goto main::@1 +Simple Condition (bool~) main::$1 [8] if((byte) main::i#1<(byte/signed byte/word/signed word/dword/signed dword) 40) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte) main::i#0 = 0 diff --git a/src/test/ref/forrangedwords.log b/src/test/ref/forrangedwords.log index 792a38ab7..58210ad47 100644 --- a/src/test/ref/forrangedwords.log +++ b/src/test/ref/forrangedwords.log @@ -85,8 +85,8 @@ Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) main::SCREEN#1 (byte*) main::SCREEN#0 Redundant Phi (byte*) main::SCREEN#2 (byte*) main::SCREEN#1 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$2 if((word) main::w#1!=rangelast(0,65535)) goto main::@1 -Simple Condition (bool~) main::$6 if((signed word) main::sw#1!=rangelast(main::sw#0,32766)) goto main::@2 +Simple Condition (bool~) main::$2 [9] if((word) main::w#1!=rangelast(0,65535)) goto main::@1 +Simple Condition (bool~) main::$6 [20] if((signed word) main::sw#1!=rangelast(main::sw#0,32766)) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::SCREEN#0 = ((byte*))1024 Constant (const word) main::w#0 = 0 diff --git a/src/test/ref/forrangemin.log b/src/test/ref/forrangemin.log index 67cf21cfa..4135d3cda 100644 --- a/src/test/ref/forrangemin.log +++ b/src/test/ref/forrangemin.log @@ -91,8 +91,8 @@ Redundant Phi (byte*) SCREEN1#1 (byte*) SCREEN1#2 Redundant Phi (byte*) SCREEN2#2 (byte*) SCREEN2#4 Redundant Phi (byte*) SCREEN2#1 (byte*) SCREEN2#2 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$0 if((byte) main::i#1!=rangelast(0,255)) goto main::@1 -Simple Condition (bool~) main::$1 if((byte) main::j#1!=rangelast(100,0)) goto main::@2 +Simple Condition (bool~) main::$0 [8] if((byte) main::i#1!=rangelast(0,255)) goto main::@1 +Simple Condition (bool~) main::$1 [15] if((byte) main::j#1!=rangelast(100,0)) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN1#0 = ((byte*))1024 Constant (const byte*) SCREEN2#0 = ((byte*))1280 diff --git a/src/test/ref/forrangesymbolic.log b/src/test/ref/forrangesymbolic.log index 1ca0d908a..7ae569ba1 100644 --- a/src/test/ref/forrangesymbolic.log +++ b/src/test/ref/forrangesymbolic.log @@ -45,7 +45,7 @@ Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks Alias (byte*) main::b#0 = (byte*~) main::$0 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 if((byte*) main::b#1!=rangelast(main::b#0,main::BITMAP#0)) goto main::@1 +Simple Condition (bool~) main::$1 [7] if((byte*) main::b#1!=rangelast(main::b#0,main::BITMAP#0)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::BITMAP#0 = ((byte*))8192 Successful SSA optimization Pass2ConstantIdentification diff --git a/src/test/ref/halfscii.log b/src/test/ref/halfscii.log index b4427e5e1..08aac50db 100644 --- a/src/test/ref/halfscii.log +++ b/src/test/ref/halfscii.log @@ -392,10 +392,10 @@ SYMBOL TABLE SSA Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) main::$8 ← (byte) main::bits#0 < (byte/signed byte/word/signed word/dword/signed dword) 2 from (bool~) main::$7 ← (byte) main::bits#0 >= (byte/signed byte/word/signed word/dword/signed dword) 2 -Inversing boolean not (bool~) main::$17 ← (byte) main::bits#1 < (byte/signed byte/word/signed word/dword/signed dword) 2 from (bool~) main::$16 ← (byte) main::bits#1 >= (byte/signed byte/word/signed word/dword/signed dword) 2 -Inversing boolean not (bool~) main::$26 ← (byte) main::bits#2 < (byte/signed byte/word/signed word/dword/signed dword) 2 from (bool~) main::$25 ← (byte) main::bits#2 >= (byte/signed byte/word/signed word/dword/signed dword) 2 -Inversing boolean not (bool~) main::$34 ← (byte) main::bits#3 < (byte/signed byte/word/signed word/dword/signed dword) 2 from (bool~) main::$33 ← (byte) main::bits#3 >= (byte/signed byte/word/signed word/dword/signed dword) 2 +Inversing boolean not [24] (bool~) main::$8 ← (byte) main::bits#0 < (byte/signed byte/word/signed word/dword/signed dword) 2 from [23] (bool~) main::$7 ← (byte) main::bits#0 >= (byte/signed byte/word/signed word/dword/signed dword) 2 +Inversing boolean not [36] (bool~) main::$17 ← (byte) main::bits#1 < (byte/signed byte/word/signed word/dword/signed dword) 2 from [35] (bool~) main::$16 ← (byte) main::bits#1 >= (byte/signed byte/word/signed word/dword/signed dword) 2 +Inversing boolean not [51] (bool~) main::$26 ← (byte) main::bits#2 < (byte/signed byte/word/signed word/dword/signed dword) 2 from [50] (bool~) main::$25 ← (byte) main::bits#2 >= (byte/signed byte/word/signed word/dword/signed dword) 2 +Inversing boolean not [65] (bool~) main::$34 ← (byte) main::bits#3 < (byte/signed byte/word/signed word/dword/signed dword) 2 from [64] (bool~) main::$33 ← (byte) main::bits#3 >= (byte/signed byte/word/signed word/dword/signed dword) 2 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) main::chargen1#0 = (byte*~) main::$0 (byte*) main::chargen1#4 Alias (byte) main::bits_gen#1 = (byte~) main::$10 (byte) main::bits_gen#12 @@ -471,12 +471,12 @@ Redundant Phi (byte*) D018#10 (byte*) D018#13 Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#10 Redundant Phi (byte*) D018#1 (byte*) D018#10 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$8 if((byte) main::bits#0<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@2 -Simple Condition (bool~) main::$17 if((byte) main::bits#1<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@3 -Simple Condition (bool~) main::$26 if((byte) main::bits#2<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@4 -Simple Condition (bool~) main::$34 if((byte) main::bits#3<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@5 -Simple Condition (bool~) main::$39 if((byte*) main::chargen#1<(byte*~) main::$38) goto main::@1 -Simple Condition (bool~) main::$40 if((byte) main::i#1!=rangelast(0,255)) goto main::@6 +Simple Condition (bool~) main::$8 [25] if((byte) main::bits#0<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@2 +Simple Condition (bool~) main::$17 [37] if((byte) main::bits#1<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@3 +Simple Condition (bool~) main::$26 [52] if((byte) main::bits#2<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@4 +Simple Condition (bool~) main::$34 [66] if((byte) main::bits#3<(byte/signed byte/word/signed word/dword/signed dword) 2) goto main::@5 +Simple Condition (bool~) main::$39 [79] if((byte*) main::chargen#1<(byte*~) main::$38) goto main::@1 +Simple Condition (bool~) main::$40 [91] if((byte) main::i#1!=rangelast(0,255)) goto main::@6 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte*) CHARSET#0 = ((byte*))8192 diff --git a/src/test/ref/helloworld2-inline.log b/src/test/ref/helloworld2-inline.log index aa06d68fd..9b3cc51e0 100644 --- a/src/test/ref/helloworld2-inline.log +++ b/src/test/ref/helloworld2-inline.log @@ -155,8 +155,8 @@ Redundant Phi (byte*) main::hello#1 (byte*) main::print21_msg#0 Redundant Phi (byte*) main::print22_msg#1 (byte*) main::hello#1 Redundant Phi (byte*) main::print22_at#1 (byte*) main::print22_at#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool) main::print21_$0#0 if(*((byte*) main::print21_msg#0 + (byte) main::print21_i#1)!=(byte) '@') goto main::print21_@1 -Simple Condition (bool) main::print22_$0#0 if(*((byte*) main::print21_msg#0 + (byte) main::print22_i#1)!=(byte) '@') goto main::print22_@1 +Simple Condition (bool) main::print21_$0#0 [13] if(*((byte*) main::print21_msg#0 + (byte) main::print21_i#1)!=(byte) '@') goto main::print21_@1 +Simple Condition (bool) main::print22_$0#0 [26] if(*((byte*) main::print21_msg#0 + (byte) main::print22_i#1)!=(byte) '@') goto main::print22_@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) screen#0 = ((byte*))1024 Constant (const byte*) main::print21_msg#0 = main::$3 diff --git a/src/test/ref/helloworld2.log b/src/test/ref/helloworld2.log index 569694fa2..a5832ff11 100644 --- a/src/test/ref/helloworld2.log +++ b/src/test/ref/helloworld2.log @@ -108,7 +108,7 @@ Redundant Phi (byte*) screen#1 (byte*) screen#0 Redundant Phi (byte*) print2::msg#2 (byte*) print2::msg#3 Redundant Phi (byte*) print2::at#2 (byte*) print2::at#3 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) print2::$0 if(*((byte*) print2::msg#3 + (byte) print2::i#1)!=(byte) '@') goto print2::@1 +Simple Condition (bool~) print2::$0 [20] if(*((byte*) print2::msg#3 + (byte) print2::i#1)!=(byte) '@') goto print2::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) screen#0 = ((byte*))1024 Constant (const byte*) main::hello#0 = main::$3 diff --git a/src/test/ref/ifmin.log b/src/test/ref/ifmin.log index 60d9bf24b..6008a374c 100644 --- a/src/test/ref/ifmin.log +++ b/src/test/ref/ifmin.log @@ -66,7 +66,7 @@ SYMBOL TABLE SSA Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) main::$1 ← (byte) main::i#2 >= (byte/signed byte/word/signed word/dword/signed dword) 50 from (bool~) main::$0 ← (byte) main::i#2 < (byte/signed byte/word/signed word/dword/signed dword) 50 +Inversing boolean not [5] (bool~) main::$1 ← (byte) main::i#2 >= (byte/signed byte/word/signed word/dword/signed dword) 50 from [4] (bool~) main::$0 ← (byte) main::i#2 < (byte/signed byte/word/signed word/dword/signed dword) 50 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) main::i#2 = (byte) main::i#4 Alias (byte*) SCREEN#1 = (byte*) SCREEN#2 @@ -80,8 +80,8 @@ Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) SCREEN#3 (byte*) SCREEN#0 Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#3 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if((byte) main::i#2>=(byte/signed byte/word/signed word/dword/signed dword) 50) goto main::@2 -Simple Condition (bool~) main::$2 if((byte) main::i#1<(byte/signed byte/word/signed word/dword/signed dword) 100) goto main::@1 +Simple Condition (bool~) main::$1 [6] if((byte) main::i#2>=(byte/signed byte/word/signed word/dword/signed dword) 50) goto main::@2 +Simple Condition (bool~) main::$2 [10] if((byte) main::i#1<(byte/signed byte/word/signed word/dword/signed dword) 100) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte) main::i#0 = 0 diff --git a/src/test/ref/immzero.log b/src/test/ref/immzero.log index 8ad7a85c5..1d5fb1157 100644 --- a/src/test/ref/immzero.log +++ b/src/test/ref/immzero.log @@ -57,7 +57,7 @@ Alias (word) main::w#0 = (byte/signed byte/word/signed word/dword/signed dword~) Alias (byte) main::i#1 = (byte) main::j#2 Alias (word) main::w#1 = (word~) main::$1 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$2 if((byte) main::j#1!=rangelast(0,10)) goto main::@1 +Simple Condition (bool~) main::$2 [10] if((byte) main::j#1!=rangelast(0,10)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const word) main::w#0 = ((word))0 diff --git a/src/test/ref/incd020.log b/src/test/ref/incd020.log index f9df1a151..48aa15030 100644 --- a/src/test/ref/incd020.log +++ b/src/test/ref/incd020.log @@ -48,7 +48,7 @@ Redundant Phi (byte*) BGCOL#1 (byte*) BGCOL#2 Successful SSA optimization Pass2RedundantPhiElimination Constant (const byte*) BGCOL#0 = ((byte*))53280 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@1 +if() condition always true - replacing block destination [2] if(true) goto main::@1 Successful SSA optimization Pass2ConstantIfs Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/incrementinarray.log b/src/test/ref/incrementinarray.log index a6e39c26d..463497c56 100644 --- a/src/test/ref/incrementinarray.log +++ b/src/test/ref/incrementinarray.log @@ -301,10 +301,10 @@ Redundant Phi (byte*) print_char_cursor#10 (byte*) print_line_cursor#1 Redundant Phi (byte*) print_line_cursor#16 (byte*) print_line_cursor#14 Redundant Phi (byte*) print_char_cursor#11 (byte*) print_char_cursor#10 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) print_str::$0 if(*((byte*) print_str::str#2)!=(byte) '@') goto print_str::@2 -Simple Condition (bool~) print_ln::$1 if((byte*) print_line_cursor#1<(byte*) print_char_cursor#12) goto print_ln::@1 -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) main::$3 if((byte) main::i#1!=rangelast(0,10)) goto main::@1 +Simple Condition (bool~) print_str::$0 [6] if(*((byte*) print_str::str#2)!=(byte) '@') goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [19] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#12) goto print_ln::@1 +Simple Condition (bool~) print_cls::$1 [35] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) main::$3 [63] if((byte) main::i#1!=rangelast(0,10)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_line_cursor#0 = ((byte*))1024 Constant (const byte[]) print_hextab#0 = $0 diff --git a/src/test/ref/infloop-error.log b/src/test/ref/infloop-error.log index 19a5d8893..7802d8231 100644 --- a/src/test/ref/infloop-error.log +++ b/src/test/ref/infloop-error.log @@ -122,8 +122,8 @@ SYMBOL TABLE SSA Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) main::$1 ← (byte) main::pos#1 >= (byte) main::min#2 from (bool~) main::$0 ← (byte) main::pos#1 < (byte) main::min#2 -Inversing boolean not (bool~) main::$3 ← (byte) main::pos#3 <= (byte) main::max#2 from (bool~) main::$2 ← (byte) main::pos#3 > (byte) main::max#2 +Inversing boolean not [10] (bool~) main::$1 ← (byte) main::pos#1 >= (byte) main::min#2 from [9] (bool~) main::$0 ← (byte) main::pos#1 < (byte) main::min#2 +Inversing boolean not [14] (bool~) main::$3 ← (byte) main::pos#3 <= (byte) main::max#2 from [13] (bool~) main::$2 ← (byte) main::pos#3 > (byte) main::max#2 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) main::pos#2 = (byte) main::pos#7 Alias (byte) main::min#2 = (byte) main::min#4 @@ -149,8 +149,8 @@ Redundant Phi (byte*) SCREEN#7 (byte*) SCREEN#0 Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#7 Redundant Phi (byte) main::pos#3 (byte) main::pos#1 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if((byte) main::pos#1>=(byte) main::min#2) goto main::@4 -Simple Condition (bool~) main::$3 if((byte) main::pos#1<=(byte) main::max#2) goto main::@5 +Simple Condition (bool~) main::$1 [11] if((byte) main::pos#1>=(byte) main::min#2) goto main::@4 +Simple Condition (bool~) main::$3 [15] if((byte) main::pos#1<=(byte) main::max#2) goto main::@5 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte) main::min#0 = 255 @@ -161,7 +161,7 @@ Consolidated array index constant in *(SCREEN#0+0) Consolidated array index constant in *(SCREEN#0+1) Consolidated array index constant in *(SCREEN#0+2) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [1] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/init-volatiles.log b/src/test/ref/init-volatiles.log index 472eeb1a9..f67d80651 100644 --- a/src/test/ref/init-volatiles.log +++ b/src/test/ref/init-volatiles.log @@ -65,7 +65,7 @@ Successful SSA optimization Pass2AliasElimination Redundant Phi (byte) x#8 (byte) x#0 Redundant Phi (byte) x#4 (byte) x#2 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$0 if((byte) x#1<(byte/signed byte/word/signed word/dword/signed dword) 50) goto main::@2 +Simple Condition (bool~) main::$0 [5] if((byte) x#1<(byte/signed byte/word/signed word/dword/signed dword) 50) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Culled Empty Block (label) main::@2 Culled Empty Block (label) @2 diff --git a/src/test/ref/inline-assignment.log b/src/test/ref/inline-assignment.log index 7584f209c..1c7e447ec 100644 --- a/src/test/ref/inline-assignment.log +++ b/src/test/ref/inline-assignment.log @@ -49,7 +49,7 @@ Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks Alias (byte) main::a#0 = (byte) main::i#2 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 if((byte) main::i#1!=rangelast(0,39)) goto main::@1 +Simple Condition (bool~) main::$1 [9] if((byte) main::i#1!=rangelast(0,39)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte) main::i#0 = 0 diff --git a/src/test/ref/inline-function-if.log b/src/test/ref/inline-function-if.log index d80ee92ea..a9f1cd16f 100644 --- a/src/test/ref/inline-function-if.log +++ b/src/test/ref/inline-function-if.log @@ -168,9 +168,9 @@ Alias (byte*) screen#1 = (byte*) screen#11 (byte*) screen#2 Successful SSA optimization Pass2AliasElimination Redundant Phi (byte*) screen#1 (byte*) screen#0 Successful SSA optimization Pass2RedundantPhiElimination -Rewriting ! if()-condition to reversed if() (bool) main::toUpper1_$0#0 ← ! (bool) main::toUpper1_bo#0 +Rewriting ! if()-condition to reversed if() [6] (bool) main::toUpper1_$0#0 ← ! (bool) main::toUpper1_bo#0 Successful SSA optimization Pass2ConditionalAndOrRewriting -Rewriting ! if()-condition to reversed if() (bool) main::toUpper2_$0#0 ← ! (bool) main::toUpper2_bo#0 +Rewriting ! if()-condition to reversed if() [21] (bool) main::toUpper2_$0#0 ← ! (bool) main::toUpper2_bo#0 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const byte*) screen#0 = ((byte*))1024 Constant (const byte) main::toUpper1_ch#0 = 'c' @@ -185,8 +185,8 @@ Consolidated array index constant in *(screen#0+0) Consolidated array index constant in *(screen#0+1) Successful SSA optimization Pass2ConstantAdditionElimination Removing PHI-reference to removed block (main::toUpper1) in block main::toUpper1_@1 -if() condition always true - replacing block destination if((const bool) main::toUpper1_bo#0) goto main::toUpper1_@2 -if() condition always false - eliminating if((const bool) main::toUpper2_bo#0) goto main::toUpper2_@2 +if() condition always true - replacing block destination [0] if((const bool) main::toUpper1_bo#0) goto main::toUpper1_@2 +if() condition always false - eliminating [3] if((const bool) main::toUpper2_bo#0) goto main::toUpper2_@2 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Removing PHI-reference to removed block (main::toUpper2_@2) in block main::toUpper2_@1 diff --git a/src/test/ref/inline-function-level2.log b/src/test/ref/inline-function-level2.log index 768d62bb6..f08543f5b 100644 --- a/src/test/ref/inline-function-level2.log +++ b/src/test/ref/inline-function-level2.log @@ -312,9 +312,9 @@ Redundant Phi (byte) main::line2_xadd#1 (byte) main::line2_xadd#0 Redundant Phi (byte) main::line2_ysize#1 (byte) main::line2_ysize#0 Redundant Phi (byte*) cur_line#12 (byte*) cur_line#11 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if((byte*) main::sc#1<(word/signed word/dword/signed dword~) main::$0) goto main::@1 -Simple Condition (bool) main::line1_$2#0 if((byte) main::line1_i#1<(byte) main::line1_ysize#0) goto main::line1_@1 -Simple Condition (bool) main::line2_$2#0 if((byte) main::line2_i#1<(byte) main::line2_ysize#0) goto main::line2_@1 +Simple Condition (bool~) main::$1 [6] if((byte*) main::sc#1<(word/signed word/dword/signed dword~) main::$0) goto main::@1 +Simple Condition (bool) main::line1_$2#0 [27] if((byte) main::line1_i#1<(byte) main::line1_ysize#0) goto main::line1_@1 +Simple Condition (bool) main::line2_$2#0 [48] if((byte) main::line2_i#1<(byte) main::line2_ysize#0) goto main::line2_@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::sc#0 = ((byte*))1024 Constant (const word/signed word/dword/signed dword) main::$0 = 1024+1000 diff --git a/src/test/ref/inline-function-print.log b/src/test/ref/inline-function-print.log index dc6113279..ec9aea933 100644 --- a/src/test/ref/inline-function-print.log +++ b/src/test/ref/inline-function-print.log @@ -157,8 +157,8 @@ Redundant Phi (byte*) main::hello#1 (byte*) main::print1_msg#0 Redundant Phi (byte*) main::print2_msg#1 (byte*) main::hello#1 Redundant Phi (byte*) main::print2_at#1 (byte*) main::print2_at#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool) main::print1_$0#0 if(*((byte*) main::print1_msg#0 + (byte) main::print1_i#1)!=(byte) '@') goto main::print1_@1 -Simple Condition (bool) main::print2_$0#0 if(*((byte*) main::print1_msg#0 + (byte) main::print2_i#1)!=(byte) '@') goto main::print2_@1 +Simple Condition (bool) main::print1_$0#0 [13] if(*((byte*) main::print1_msg#0 + (byte) main::print1_i#1)!=(byte) '@') goto main::print1_@1 +Simple Condition (bool) main::print2_$0#0 [27] if(*((byte*) main::print1_msg#0 + (byte) main::print2_i#1)!=(byte) '@') goto main::print2_@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) screen#0 = ((byte*))1024 Constant (const byte*) main::print1_msg#0 = main::$4 diff --git a/src/test/ref/inline-function.log b/src/test/ref/inline-function.log index defa7c71d..5c341af00 100644 --- a/src/test/ref/inline-function.log +++ b/src/test/ref/inline-function.log @@ -431,8 +431,8 @@ Redundant Phi (byte*) D018#10 (byte*) D018#1 Redundant Phi (byte*) BGCOL#10 (byte*) BGCOL#1 Redundant Phi (byte*) charset1#10 (byte*) charset1#1 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$0 if(*((byte*) RASTER#3)!=(byte/word/signed word/dword/signed dword) 255) goto main::@5 -Simple Condition (bool~) main::$2 if(*((byte*) RASTER#3)!=(byte/signed byte/word/signed word/dword/signed dword) 98) goto main::@8 +Simple Condition (bool~) main::$0 [13] if(*((byte*) RASTER#3)!=(byte/word/signed word/dword/signed dword) 255) goto main::@5 +Simple Condition (bool~) main::$2 [34] if(*((byte*) RASTER#3)!=(byte/signed byte/word/signed word/dword/signed dword) 98) goto main::@8 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) RASTER#0 = ((byte*))53266 Constant (const byte*) D018#0 = ((byte*))53272 @@ -441,7 +441,7 @@ Constant (const byte*) screen#0 = ((byte*))1024 Constant (const byte*) charset1#0 = ((byte*))4096 Constant (const byte*) charset2#0 = ((byte*))6144 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [2] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Eliminating Noop Cast (word) main::toD0181_$0#0 ← ((word)) (byte*) main::toD0181_screen#0 Eliminating Noop Cast (word) main::toD0181_$2#0 ← ((word)) (byte*) main::toD0181_charset#0 diff --git a/src/test/ref/inline-string-2.log b/src/test/ref/inline-string-2.log index d7ea7cf52..0cbeb7475 100644 --- a/src/test/ref/inline-string-2.log +++ b/src/test/ref/inline-string-2.log @@ -170,8 +170,8 @@ Redundant Phi (byte*) print::msg#4 (byte*) print::msg#0 Redundant Phi (byte*) screen#23 (byte*) screen#18 Redundant Phi (byte*) screen#16 (byte*) screen#1 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) print_msg::$0 if((byte) print_msg::idx#2==(byte/signed byte/word/signed word/dword/signed dword) 1) goto print_msg::@1 -Simple Condition (bool~) print::$0 if(*((byte*) print::msg#2)!=(byte) '@') goto print::@2 +Simple Condition (bool~) print_msg::$0 [14] if((byte) print_msg::idx#2==(byte/signed byte/word/signed word/dword/signed dword) 1) goto print_msg::@1 +Simple Condition (bool~) print::$0 [31] if(*((byte*) print::msg#2)!=(byte) '@') goto print::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) print_msg::idx#0 = 1 Constant (const byte) print_msg::idx#1 = 2 diff --git a/src/test/ref/inline-string.log b/src/test/ref/inline-string.log index eb43b38e7..137d3248d 100644 --- a/src/test/ref/inline-string.log +++ b/src/test/ref/inline-string.log @@ -131,7 +131,7 @@ Redundant Phi (byte*) screen#1 (byte*) screen#12 Redundant Phi (byte*) screen#10 (byte*) screen#12 Redundant Phi (byte*) screen#14 (byte*) screen#10 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) print::$0 if(*((byte*) print::msg#4)!=(byte) '@') goto print::@2 +Simple Condition (bool~) print::$0 [22] if(*((byte*) print::msg#4)!=(byte) '@') goto print::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte[]) msg1#0 = $0 Constant (const byte[]) main::msg2#0 = main::$3 diff --git a/src/test/ref/inline-word.log b/src/test/ref/inline-word.log index 0e8267baa..35482bcf5 100644 --- a/src/test/ref/inline-word.log +++ b/src/test/ref/inline-word.log @@ -89,8 +89,8 @@ Self Phi Eliminated (byte) main::h#2 Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte) main::h#2 (byte) main::h#4 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$6 if((byte) main::l#1!=rangelast(4,7)) goto main::@2 -Simple Condition (bool~) main::$7 if((byte) main::h#1!=rangelast(0,2)) goto main::@1 +Simple Condition (bool~) main::$6 [17] if((byte) main::l#1!=rangelast(4,7)) goto main::@2 +Simple Condition (bool~) main::$7 [21] if((byte) main::h#1!=rangelast(0,2)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte) main::h#0 = 0 diff --git a/src/test/ref/inlinearrayproblem.log b/src/test/ref/inlinearrayproblem.log index b83765299..03b769405 100644 --- a/src/test/ref/inlinearrayproblem.log +++ b/src/test/ref/inlinearrayproblem.log @@ -77,7 +77,7 @@ Redundant Phi (byte*) SCREEN2#2 (byte*) SCREEN2#0 Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#2 Redundant Phi (byte*) SCREEN2#1 (byte*) SCREEN2#2 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$0 if((byte) main::i#1!=rangelast(0,3)) goto main::@1 +Simple Condition (bool~) main::$0 [12] if((byte) main::i#1!=rangelast(0,3)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const word/signed word/dword/signed dword) $0 = 1024+40 diff --git a/src/test/ref/inmem-const-array.log b/src/test/ref/inmem-const-array.log index 91afc5432..f2e1b4173 100644 --- a/src/test/ref/inmem-const-array.log +++ b/src/test/ref/inmem-const-array.log @@ -107,7 +107,7 @@ SYMBOL TABLE SSA Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) main::$1 ← (byte) main::j#1 != (byte/signed byte/word/signed word/dword/signed dword) 3 from (bool~) main::$0 ← (byte) main::j#1 == (byte/signed byte/word/signed word/dword/signed dword) 3 +Inversing boolean not [14] (bool~) main::$1 ← (byte) main::j#1 != (byte/signed byte/word/signed word/dword/signed dword) 3 from [13] (bool~) main::$0 ← (byte) main::j#1 == (byte/signed byte/word/signed word/dword/signed dword) 3 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) main::i#2 = (byte) main::i#4 Alias (byte*) main::screen#1 = (byte*) main::screen#3 @@ -129,8 +129,8 @@ Redundant Phi (byte) GREEN#1 (byte) GREEN#0 Redundant Phi (byte*) main::screen#1 (byte*) main::screen#0 Redundant Phi (byte*) main::cols#1 (byte*) main::cols#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@2 -Simple Condition (bool~) main::$2 if((byte) main::i#1!=rangelast(0,39)) goto main::@1 +Simple Condition (bool~) main::$1 [15] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 3) goto main::@2 +Simple Condition (bool~) main::$2 [19] if((byte) main::i#1!=rangelast(0,39)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) WHITE#0 = 1 Constant (const byte) RED#0 = 2 diff --git a/src/test/ref/inmemarray.log b/src/test/ref/inmemarray.log index 751ae1bc9..ad2698295 100644 --- a/src/test/ref/inmemarray.log +++ b/src/test/ref/inmemarray.log @@ -80,7 +80,7 @@ SYMBOL TABLE SSA Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) main::$1 ← (byte) main::j#1 != (byte/signed byte/word/signed word/dword/signed dword) 8 from (bool~) main::$0 ← (byte) main::j#1 == (byte/signed byte/word/signed word/dword/signed dword) 8 +Inversing boolean not [9] (bool~) main::$1 ← (byte) main::j#1 != (byte/signed byte/word/signed word/dword/signed dword) 8 from [8] (bool~) main::$0 ← (byte) main::j#1 == (byte/signed byte/word/signed word/dword/signed dword) 8 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) main::i#2 = (byte) main::i#4 Alias (byte*) SCREEN#1 = (byte*) SCREEN#5 @@ -94,8 +94,8 @@ Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#0 Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#2 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@2 -Simple Condition (bool~) main::$2 if((byte) main::i#1!=rangelast(0,100)) goto main::@1 +Simple Condition (bool~) main::$1 [10] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@2 +Simple Condition (bool~) main::$2 [14] if((byte) main::i#1!=rangelast(0,100)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte[]) TXT#0 = { 3, 1, 13, 5, 12, 15, 20, 32 } diff --git a/src/test/ref/inmemstring.log b/src/test/ref/inmemstring.log index 1cc05b24a..f36df8822 100644 --- a/src/test/ref/inmemstring.log +++ b/src/test/ref/inmemstring.log @@ -83,7 +83,7 @@ SYMBOL TABLE SSA Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) main::$1 ← (byte) main::i#1 != (byte/signed byte/word/signed word/dword/signed dword) 8 from (bool~) main::$0 ← (byte) main::i#1 == (byte/signed byte/word/signed word/dword/signed dword) 8 +Inversing boolean not [9] (bool~) main::$1 ← (byte) main::i#1 != (byte/signed byte/word/signed word/dword/signed dword) 8 from [8] (bool~) main::$0 ← (byte) main::i#1 == (byte/signed byte/word/signed word/dword/signed dword) 8 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) main::cursor#2 = (byte*) main::cursor#4 Alias (byte*) SCREEN#4 = (byte*) SCREEN#5 @@ -97,8 +97,8 @@ Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#0 Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#1 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@2 -Simple Condition (bool~) main::$3 if((byte*) main::cursor#1<(byte*~) main::$2) goto main::@1 +Simple Condition (bool~) main::$1 [10] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@2 +Simple Condition (bool~) main::$3 [15] if((byte*) main::cursor#1<(byte*~) main::$2) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte[]) TEXT#0 = $0 diff --git a/src/test/ref/interrupt-volatile-reuse-problem2.log b/src/test/ref/interrupt-volatile-reuse-problem2.log index 0fce734d2..3fad98361 100644 --- a/src/test/ref/interrupt-volatile-reuse-problem2.log +++ b/src/test/ref/interrupt-volatile-reuse-problem2.log @@ -142,9 +142,9 @@ Redundant Phi (byte) main::y#2 (byte) main::y#4 Redundant Phi (byte) main::x#2 (byte) main::x#4 Redundant Phi (byte) col1#3 (byte) col1#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$2 if((byte) main::a#1!=rangelast(0,10)) goto main::@6 -Simple Condition (bool~) main::$3 if((byte) main::y#1!=rangelast(0,10)) goto main::@5 -Simple Condition (bool~) main::$4 if((byte) main::x#1!=rangelast(0,10)) goto main::@4 +Simple Condition (bool~) main::$2 [18] if((byte) main::a#1!=rangelast(0,10)) goto main::@6 +Simple Condition (bool~) main::$3 [22] if((byte) main::y#1!=rangelast(0,10)) goto main::@5 +Simple Condition (bool~) main::$4 [26] if((byte) main::x#1!=rangelast(0,10)) goto main::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const void()**) KERNEL_IRQ#0 = ((void()**))788 Constant (const byte*) IRQ_STATUS#0 = ((byte*))53273 @@ -157,7 +157,7 @@ Constant (const byte) main::a#0 = 0 Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in *(SCREEN#0+40) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [2] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/irq-hardware-clobber-jsr.log b/src/test/ref/irq-hardware-clobber-jsr.log index 2053a6830..19cb058b5 100644 --- a/src/test/ref/irq-hardware-clobber-jsr.log +++ b/src/test/ref/irq-hardware-clobber-jsr.log @@ -385,7 +385,7 @@ Constant (const byte) LIGHT_BLUE#0 = 14 Constant (const byte) LIGHT_GREY#0 = 15 Constant (const void()*) main::$0 = &irq Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [9] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/irq-hardware-clobber.log b/src/test/ref/irq-hardware-clobber.log index 4ac58af3c..bf0dd951a 100644 --- a/src/test/ref/irq-hardware-clobber.log +++ b/src/test/ref/irq-hardware-clobber.log @@ -136,7 +136,7 @@ Constant (const byte*) PROCPORT#0 = ((byte*))1 Constant (const byte) PROCPORT_RAM_IO#0 = 53 Constant (const void()*) main::$0 = &irq Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [9] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/irq-hardware.log b/src/test/ref/irq-hardware.log index a67db2e8f..753a8f677 100644 --- a/src/test/ref/irq-hardware.log +++ b/src/test/ref/irq-hardware.log @@ -136,7 +136,7 @@ Constant (const byte*) PROCPORT#0 = ((byte*))1 Constant (const byte) PROCPORT_RAM_IO#0 = 53 Constant (const void()*) main::$0 = &irq Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [9] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/iterarray.log b/src/test/ref/iterarray.log index 51560827b..b280e4b02 100644 --- a/src/test/ref/iterarray.log +++ b/src/test/ref/iterarray.log @@ -49,14 +49,14 @@ Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks Alias (byte) main::i#1 = (byte/signed word/word/dword/signed dword~) main::$2 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$3 if((byte) main::i#1<(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@1 +Simple Condition (bool~) main::$3 [9] if((byte) main::i#1<(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte[16]) main::buf#0 = ((byte*))4352 Constant (const byte) main::i#0 = 5 Successful SSA optimization Pass2ConstantIdentification Consolidated constant in assignment main::$1 Successful SSA optimization Pass2ConstantAdditionElimination -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) main::$0 ← (byte) main::i#2 +Inferred type updated to byte in [1] (byte/signed word/word/dword/signed dword~) main::$0 ← (byte) main::i#2 Alias (byte) main::i#2 = (byte~) main::$0 Successful SSA optimization Pass2AliasElimination Inlining constant with var siblings (const byte) main::i#0 diff --git a/src/test/ref/keyboard-glitch.log b/src/test/ref/keyboard-glitch.log index 432d9dceb..231379c28 100644 --- a/src/test/ref/keyboard-glitch.log +++ b/src/test/ref/keyboard-glitch.log @@ -739,10 +739,10 @@ Culled Empty Block (label) menu::@18 Culled Empty Block (label) pressed::@4 Culled Empty Block (label) @15 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) menu::$2 ← (byte~) menu::$0 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) menu::$1 ← (byte~) menu::$0 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) menu::$6 ← (byte~) menu::$4 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) menu::$5 ← (byte~) menu::$4 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) menu::$9 ← (byte~) menu::$7 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) menu::$8 ← (byte~) menu::$7 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) pressed::$2 ← (byte~) pressed::$0 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) pressed::$1 ← (byte~) pressed::$0 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [198] (bool~) menu::$2 ← (byte~) menu::$0 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [197] (bool~) menu::$1 ← (byte~) menu::$0 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [207] (bool~) menu::$6 ← (byte~) menu::$4 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [206] (bool~) menu::$5 ← (byte~) menu::$4 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [218] (bool~) menu::$9 ← (byte~) menu::$7 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [217] (bool~) menu::$8 ← (byte~) menu::$7 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [234] (bool~) pressed::$2 ← (byte~) pressed::$0 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [233] (bool~) pressed::$1 ← (byte~) pressed::$0 != (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) keyboard_matrix_read::return#0 = (byte) keyboard_matrix_read::row_pressed_bits#0 (byte~) keyboard_matrix_read::$0 (byte) keyboard_matrix_read::return#3 (byte) keyboard_matrix_read::return#1 Alias (byte) keyboard_key_pressed::colidx#0 = (byte~) keyboard_key_pressed::$0 (byte) keyboard_key_pressed::colidx#1 @@ -767,10 +767,10 @@ Redundant Phi (byte*) SCREEN#10 (byte*) SCREEN#12 Redundant Phi (byte*) SCREEN#9 (byte*) SCREEN#10 Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#9 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) menu::$2 if((byte~) menu::$0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@4 -Simple Condition (bool~) menu::$6 if((byte~) menu::$4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@5 -Simple Condition (bool~) menu::$9 if((byte~) menu::$7==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@6 -Simple Condition (bool~) pressed::$2 if((byte~) pressed::$0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto pressed::@1 +Simple Condition (bool~) menu::$2 [199] if((byte~) menu::$0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@4 +Simple Condition (bool~) menu::$6 [208] if((byte~) menu::$4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@5 +Simple Condition (bool~) menu::$9 [219] if((byte~) menu::$7==(byte/signed byte/word/signed word/dword/signed dword) 0) goto menu::@6 +Simple Condition (bool~) pressed::$2 [235] if((byte~) pressed::$0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto pressed::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -934,9 +934,9 @@ Constant (const byte) keyboard_key_pressed::key#1 = KEY_I#0 Constant (const byte) keyboard_key_pressed::key#2 = KEY_E#0 Constant (const byte) keyboard_key_pressed::key#3 = KEY_SPACE#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@2 -if() condition always true - replacing block destination if(true) goto menu::@2 -if() condition always true - replacing block destination if(true) goto pressed::@2 +if() condition always true - replacing block destination [13] if(true) goto main::@2 +if() condition always true - replacing block destination [16] if(true) goto menu::@2 +if() condition always true - replacing block destination [37] if(true) goto pressed::@2 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/line-anim.asm b/src/test/ref/line-anim.asm index 7b7b567aa..ed337359a 100644 --- a/src/test/ref/line-anim.asm +++ b/src/test/ref/line-anim.asm @@ -160,14 +160,14 @@ point_init: { lda y_diff+1 sta abs16s2_return+1 b10: - lda abs16s1_return - cmp abs16s2_return - lda abs16s1_return+1 - sbc abs16s2_return+1 - bvc !+ - eor #$80 + lda abs16s2_return+1 + cmp abs16s1_return+1 + bne !+ + lda abs16s2_return + cmp abs16s1_return !: - bpl b1 + bcc b1 + beq b1 b2: ldy point_idx lda x_start,y diff --git a/src/test/ref/line-anim.log b/src/test/ref/line-anim.log index cc06d7a31..9938c08c5 100644 --- a/src/test/ref/line-anim.log +++ b/src/test/ref/line-anim.log @@ -1723,10 +1723,10 @@ SYMBOL TABLE SSA (byte[4]) y_start (byte[4]) y_start#0 -Inversing boolean not (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) divr16u::$9 ← (word) divr16u::rem#5 < (word) divr16u::divisor#1 from (bool~) divr16u::$8 ← (word) divr16u::rem#5 >= (word) divr16u::divisor#1 -Inversing boolean not (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte/signed byte/word/signed word/dword/signed dword) 7 from (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte/signed byte/word/signed word/dword/signed dword) 7 +Inversing boolean not [90] (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [89] (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [98] (bool~) divr16u::$9 ← (word) divr16u::rem#5 < (word) divr16u::divisor#1 from [97] (bool~) divr16u::$8 ← (word) divr16u::rem#5 >= (word) divr16u::divisor#1 +Inversing boolean not [382] (bool~) bitmap_init::$1 ← (byte) bitmap_init::bits#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [381] (bool~) bitmap_init::$0 ← (byte) bitmap_init::bits#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [402] (bool~) bitmap_init::$9 ← (byte~) bitmap_init::$7 != (byte/signed byte/word/signed word/dword/signed dword) 7 from [401] (bool~) bitmap_init::$8 ← (byte~) bitmap_init::$7 == (byte/signed byte/word/signed word/dword/signed dword) 7 Successful SSA optimization Pass2UnaryNotSimplification Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#6 Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#7 @@ -1904,27 +1904,27 @@ Redundant Phi (word) bitmap_plot::x#1 (word) bitmap_plot::x#0 Redundant Phi (word) rem16u#19 (word) rem16u#16 Redundant Phi (signed word) rem16s#14 (signed word) rem16s#11 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) divr16u::$4 if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 if((word) divr16u::rem#5<(word) divr16u::divisor#0) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 -Simple Condition (bool~) divr16s::$9 if((signed word) divr16s::divisor#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16s::@3 -Simple Condition (bool~) divr16s::$15 if((byte) divr16s::neg#4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16s::@5 -Simple Condition (bool~) main::$11 if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@1 -Simple Condition (bool~) main::$12 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@6 -Simple Condition (bool) point_init::abs16s1_$0#0 if((signed word) point_init::x_diff#1<(byte/signed byte/word/signed word/dword/signed dword) 0) goto point_init::abs16s1_@1 -Simple Condition (bool) point_init::abs16s2_$0#0 if((signed word) point_init::y_diff#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto point_init::abs16s2_@1 -Simple Condition (bool~) point_init::$9 if((word) point_init::abs16s1_return#2>(word) point_init::abs16s2_return#2) goto point_init::@1 -Simple Condition (bool~) point_init::$10 if((signed word) point_init::x_diff#1<(byte/signed byte/word/signed word/dword/signed dword) 0) goto point_init::@3 -Simple Condition (bool~) screen_fill::$0 if((byte) screen_fill::x#1!=rangelast(0,39)) goto screen_fill::@2 -Simple Condition (bool~) screen_fill::$1 if((byte) screen_fill::y#1!=rangelast(0,24)) goto screen_fill::@1 -Simple Condition (bool~) bitmap_init::$1 if((byte) bitmap_init::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$2 if((byte) bitmap_init::x#1!=rangelast(0,255)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$9 if((byte~) bitmap_init::$7!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto bitmap_init::@4 -Simple Condition (bool~) bitmap_init::$12 if((byte) bitmap_init::y#1!=rangelast(0,255)) goto bitmap_init::@3 -Simple Condition (bool~) bitmap_clear::$1 if((byte) bitmap_clear::x#1!=rangelast(0,199)) goto bitmap_clear::@2 -Simple Condition (bool~) bitmap_clear::$2 if((byte) bitmap_clear::y#1!=rangelast(0,39)) goto bitmap_clear::@1 +Simple Condition (bool~) divr16u::$4 [91] if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [99] if((word) divr16u::rem#5<(word) divr16u::divisor#0) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [106] if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 +Simple Condition (bool~) divr16s::$9 [146] if((signed word) divr16s::divisor#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16s::@3 +Simple Condition (bool~) divr16s::$15 [167] if((byte) divr16s::neg#4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16s::@5 +Simple Condition (bool~) main::$11 [265] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@1 +Simple Condition (bool~) main::$12 [271] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@6 +Simple Condition (bool) point_init::abs16s1_$0#0 [293] if((signed word) point_init::x_diff#1<(byte/signed byte/word/signed word/dword/signed dword) 0) goto point_init::abs16s1_@1 +Simple Condition (bool) point_init::abs16s2_$0#0 [308] if((signed word) point_init::y_diff#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto point_init::abs16s2_@1 +Simple Condition (bool~) point_init::$9 [321] if((word) point_init::abs16s1_return#2>(word) point_init::abs16s2_return#2) goto point_init::@1 +Simple Condition (bool~) point_init::$10 [324] if((signed word) point_init::x_diff#1<(byte/signed byte/word/signed word/dword/signed dword) 0) goto point_init::@3 +Simple Condition (bool~) screen_fill::$0 [365] if((byte) screen_fill::x#1!=rangelast(0,39)) goto screen_fill::@2 +Simple Condition (bool~) screen_fill::$1 [369] if((byte) screen_fill::y#1!=rangelast(0,24)) goto screen_fill::@1 +Simple Condition (bool~) bitmap_init::$1 [383] if((byte) bitmap_init::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$2 [387] if((byte) bitmap_init::x#1!=rangelast(0,255)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$9 [403] if((byte~) bitmap_init::$7!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto bitmap_init::@4 +Simple Condition (bool~) bitmap_init::$12 [407] if((byte) bitmap_init::y#1!=rangelast(0,255)) goto bitmap_init::@3 +Simple Condition (bool~) bitmap_clear::$1 [423] if((byte) bitmap_clear::x#1!=rangelast(0,199)) goto bitmap_clear::@2 +Simple Condition (bool~) bitmap_clear::$2 [427] if((byte) bitmap_clear::y#1!=rangelast(0,39)) goto bitmap_clear::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting || if()-condition to two if()s (bool~) divr16s::$2 ← (bool~) divr16s::$0 || (bool~) divr16s::$1 +Rewriting || if()-condition to two if()s [128] (bool~) divr16s::$2 ← (bool~) divr16s::$0 || (bool~) divr16s::$1 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -2078,8 +2078,8 @@ Constant (const byte) main::toD0181_$7#0 = main::toD0181_$6#0&15 Successful SSA optimization Pass2ConstantIdentification Constant (const byte) main::toD0181_return#0 = main::toD0181_$3#0|main::toD0181_$7#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating if((const bool) divr16s::$0) goto divr16s::@1 -if() condition always true - replacing block destination if(true) goto main::@3 +if() condition always false - eliminating [18] if((const bool) divr16s::$0) goto divr16s::@1 +if() condition always true - replacing block destination [64] if(true) goto main::@3 Successful SSA optimization Pass2ConstantIfs Fixing inline constructor with bitmap_clear::$3 ← *(bitmap_plot_yhi#0 + 0) w= *(bitmap_plot_ylo#0 + 0) Fixing inline constructor with bitmap_plot::$3 ← *(bitmap_plot_yhi#0 + bitmap_plot::y#0) w= *(bitmap_plot_ylo#0 + bitmap_plot::y#0) @@ -2144,7 +2144,7 @@ Self Phi Eliminated (byte) screen_fill::ch#2 Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte) screen_fill::ch#2 (const byte) screen_fill::ch#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) divr16s::$1 if((signed word) divr16s::rem#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16s::@1 +Simple Condition (bool~) divr16s::$1 [135] if((signed word) divr16s::rem#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16s::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Consolidated array index constant in *(bitmap_plot_yhi#0+0) Consolidated array index constant in *(bitmap_plot_ylo#0+0) @@ -3423,14 +3423,14 @@ point_init: { //SEG83 point_init::@10 b10: //SEG84 [46] if((word) point_init::abs16s1_return#2>(word) point_init::abs16s2_return#2) goto point_init::@1 -- vwuz1_gt_vwuz2_then_la1 - lda abs16s1_return - cmp abs16s2_return - lda abs16s1_return+1 - sbc abs16s2_return+1 - bvc !+ - eor #$80 + lda abs16s2_return+1 + cmp abs16s1_return+1 + bne !+ + lda abs16s2_return + cmp abs16s1_return !: - bpl b1 + bcc b1 + beq b1 //SEG85 [47] phi from point_init::@10 point_init::@11 to point_init::@2 [phi:point_init::@10/point_init::@11->point_init::@2] b2_from_b10: b2_from_b11: @@ -4807,14 +4807,14 @@ point_init: { //SEG83 point_init::@10 b10: //SEG84 [46] if((word) point_init::abs16s1_return#2>(word) point_init::abs16s2_return#2) goto point_init::@1 -- vwuz1_gt_vwuz2_then_la1 - lda abs16s1_return - cmp abs16s2_return - lda abs16s1_return+1 - sbc abs16s2_return+1 - bvc !+ - eor #$80 + lda abs16s2_return+1 + cmp abs16s1_return+1 + bne !+ + lda abs16s2_return + cmp abs16s1_return !: - bpl b1 + bcc b1 + beq b1 //SEG85 [47] phi from point_init::@10 point_init::@11 to point_init::@2 [phi:point_init::@10/point_init::@11->point_init::@2] b2_from_b10: b2_from_b11: @@ -6328,14 +6328,14 @@ point_init: { //SEG83 point_init::@10 b10: //SEG84 [46] if((word) point_init::abs16s1_return#2>(word) point_init::abs16s2_return#2) goto point_init::@1 -- vwuz1_gt_vwuz2_then_la1 - lda abs16s1_return - cmp abs16s2_return - lda abs16s1_return+1 - sbc abs16s2_return+1 - bvc !+ - eor #$80 + lda abs16s2_return+1 + cmp abs16s1_return+1 + bne !+ + lda abs16s2_return + cmp abs16s1_return !: - bpl b1 + bcc b1 + beq b1 //SEG85 [47] phi from point_init::@10 point_init::@11 to point_init::@2 [phi:point_init::@10/point_init::@11->point_init::@2] //SEG86 [47] phi (signed word) rem16s#13 = (signed word) rem16s#15 [phi:point_init::@10/point_init::@11->point_init::@2#0] -- register_copy //SEG87 [47] phi (word) rem16u#18 = (word) rem16u#21 [phi:point_init::@10/point_init::@11->point_init::@2#1] -- register_copy diff --git a/src/test/ref/linegen.log b/src/test/ref/linegen.log index f5caa616e..b2d9da19f 100644 --- a/src/test/ref/linegen.log +++ b/src/test/ref/linegen.log @@ -1077,8 +1077,8 @@ SYMBOL TABLE SSA (byte) rem8u (byte) rem8u#0 -Inversing boolean not (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) divr16u::$9 ← (word) divr16u::rem#6 < (word) divr16u::divisor#2 from (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2 +Inversing boolean not [11] (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [10] (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [19] (bool~) divr16u::$9 ← (word) divr16u::rem#6 < (word) divr16u::divisor#2 from [18] (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2 Successful SSA optimization Pass2UnaryNotSimplification Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#7 Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#8 @@ -1237,14 +1237,14 @@ Redundant Phi (byte*) print_char_cursor#80 (byte*) print_char_cursor#2 Redundant Phi (byte*) print_char_cursor#83 (byte*) print_line_cursor#1 Redundant Phi (byte*) print_line_cursor#24 (byte*) print_line_cursor#1 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) divr16u::$4 if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 -Simple Condition (bool~) print_str::$0 if(*((byte*) print_str::str#10)!=(byte) '@') goto print_str::@2 -Simple Condition (bool~) print_ln::$1 if((byte*) print_line_cursor#1<(byte*) print_char_cursor#11) goto print_ln::@1 -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) main::$21 if((byte) main::i#1<(byte/signed byte/word/signed word/dword/signed dword~) main::$20) goto main::@1 -Simple Condition (bool~) lin16u_gen::$8 if((word) lin16u_gen::i#1<(word) lin16u_gen::length#3) goto lin16u_gen::@1 +Simple Condition (bool~) divr16u::$4 [12] if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [20] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [27] if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 +Simple Condition (bool~) print_str::$0 [50] if(*((byte*) print_str::str#10)!=(byte) '@') goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [63] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#11) goto print_ln::@1 +Simple Condition (bool~) print_cls::$1 [113] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) main::$21 [216] if((byte) main::i#1<(byte/signed byte/word/signed word/dword/signed dword~) main::$20) goto main::@1 +Simple Condition (bool~) lin16u_gen::$8 [286] if((word) lin16u_gen::i#1<(word) lin16u_gen::length#3) goto lin16u_gen::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) rem8u#0 = 0 Constant (const word) rem16u#0 = 0 diff --git a/src/test/ref/literals.log b/src/test/ref/literals.log index 0a0036779..a5f16d62f 100644 --- a/src/test/ref/literals.log +++ b/src/test/ref/literals.log @@ -92,7 +92,7 @@ Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#0 Redundant Phi (byte) num#1 (byte) num#0 Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#1 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$2 if((byte) main::i#1!=rangelast(0,3)) goto main::@1 +Simple Condition (bool~) main::$2 [18] if((byte) main::i#1!=rangelast(0,3)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte) char#0 = 'a' @@ -108,8 +108,8 @@ Consolidated array index constant in *(SCREEN#0+2) Consolidated array index constant in assignment *(SCREEN#0+4 + main::$0) Consolidated array index constant in assignment *(SCREEN#0+9 + main::$1) Successful SSA optimization Pass2ConstantAdditionElimination -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) main::$0 ← (byte) main::i#2 -Inferred type updated to byte in (byte/signed word/word/dword/signed dword~) main::$1 ← (byte) main::i#2 +Inferred type updated to byte in [3] (byte/signed word/word/dword/signed dword~) main::$0 ← (byte) main::i#2 +Inferred type updated to byte in [5] (byte/signed word/word/dword/signed dword~) main::$1 ← (byte) main::i#2 Successful SSA optimization PassNEliminateUnusedVars Resolved ranged next value main::i#1 ← ++ main::i#2 to ++ Resolved ranged comparison value if(main::i#1!=rangelast(0,3)) goto main::@1 to (byte/signed byte/word/signed word/dword/signed dword) 4 diff --git a/src/test/ref/local-string.log b/src/test/ref/local-string.log index f8ae218c5..3b8899622 100644 --- a/src/test/ref/local-string.log +++ b/src/test/ref/local-string.log @@ -61,7 +61,7 @@ Self Phi Eliminated (byte*) main::screen#1 Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) main::screen#1 (byte*) main::screen#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$0 if(*((byte[]) main::msg#0 + (byte) main::i#2)!=(byte) '@') goto main::@2 +Simple Condition (bool~) main::$0 [5] if(*((byte[]) main::msg#0 + (byte) main::i#2)!=(byte) '@') goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::screen#0 = ((byte*))1024 Constant (const byte[]) main::msg#0 = main::$1 diff --git a/src/test/ref/longbranch-interrupt-problem.log b/src/test/ref/longbranch-interrupt-problem.log index 00a6b5a14..3dd85c3ba 100644 --- a/src/test/ref/longbranch-interrupt-problem.log +++ b/src/test/ref/longbranch-interrupt-problem.log @@ -105,8 +105,8 @@ interrupt(KERNEL_MIN)(void()) irq() (label) main::@7 (label) main::@return -Inversing boolean not (bool~) main::$2 ← (byte) col#6 <= (byte/signed byte/word/signed word/dword/signed dword) 10 from (bool~) main::$1 ← (byte) col#6 > (byte/signed byte/word/signed word/dword/signed dword) 10 -Inversing boolean not (bool~) irq::$1 ← (byte) col#8 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) irq::$0 ← (byte) col#8 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [10] (bool~) main::$2 ← (byte) col#6 <= (byte/signed byte/word/signed word/dword/signed dword) 10 from [9] (bool~) main::$1 ← (byte) col#6 > (byte/signed byte/word/signed word/dword/signed dword) 10 +Inversing boolean not [21] (bool~) irq::$1 ← (byte) col#8 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [20] (bool~) irq::$0 ← (byte) col#8 != (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) col#12 = (byte) col#6 (byte) col#16 (byte) col#7 (byte) col#2 Alias (byte) col#14 = (byte) col#8 (byte) col#9 @@ -120,14 +120,14 @@ Redundant Phi (byte) col#15 (byte) col#0 Redundant Phi (byte) col#14 (byte) col#0 Redundant Phi (byte) col#11 (byte) col#12 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$2 if((byte) col#12<=(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@4 -Simple Condition (bool~) irq::$1 if((byte) col#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto irq::@1 +Simple Condition (bool~) main::$2 [11] if((byte) col#12<=(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@4 +Simple Condition (bool~) irq::$1 [22] if((byte) col#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto irq::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const void()**) KERNEL_IRQ#0 = ((void()**))788 Constant (const byte*) BGCOL#0 = ((byte*))53280 Constant (const void()*) main::$0 = &irq Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [3] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/longjump.log b/src/test/ref/longjump.log index e7822f898..90f43feb0 100644 --- a/src/test/ref/longjump.log +++ b/src/test/ref/longjump.log @@ -48,7 +48,7 @@ Self Phi Eliminated (byte*) main::SCREEN#1 Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) main::SCREEN#1 (byte*) main::SCREEN#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$0 if((byte) main::i#1!=rangelast(0,10)) goto main::@1 +Simple Condition (bool~) main::$0 [7] if((byte) main::i#1!=rangelast(0,10)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::SCREEN#0 = ((byte*))1024 Constant (const byte) main::i#0 = 0 diff --git a/src/test/ref/longjump2.log b/src/test/ref/longjump2.log index 641351f6e..6e6a06416 100644 --- a/src/test/ref/longjump2.log +++ b/src/test/ref/longjump2.log @@ -93,8 +93,8 @@ Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) long1::SCREEN#1 (byte*) long1::SCREEN#0 Redundant Phi (byte*) long2::SCREEN#1 (byte*) long2::SCREEN#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) long1::$0 if((byte) long1::i#1!=rangelast(0,10)) goto long1::@1 -Simple Condition (bool~) long2::$0 if((byte) long2::i#1!=rangelast(0,10)) goto long2::@1 +Simple Condition (bool~) long1::$0 [10] if((byte) long1::i#1!=rangelast(0,10)) goto long1::@1 +Simple Condition (bool~) long2::$0 [19] if((byte) long2::i#1!=rangelast(0,10)) goto long2::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) long1::SCREEN#0 = ((byte*))1024 Constant (const byte) long1::i#0 = 0 diff --git a/src/test/ref/loop-problem.log b/src/test/ref/loop-problem.log index b8ada7ed7..8472eeef7 100644 --- a/src/test/ref/loop-problem.log +++ b/src/test/ref/loop-problem.log @@ -98,7 +98,7 @@ Redundant Phi (byte*) SCREEN#4 (byte*) SCREEN#5 Successful SSA optimization Pass2RedundantPhiElimination Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) b::$1 if((byte) b::i#1!=rangelast(0,3)) goto b::@1 +Simple Condition (bool~) b::$1 [14] if((byte) b::i#1!=rangelast(0,3)) goto b::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte) b::i#0 = 0 diff --git a/src/test/ref/loop-problem2.log b/src/test/ref/loop-problem2.log index 1fbdd0a1f..666299e15 100644 --- a/src/test/ref/loop-problem2.log +++ b/src/test/ref/loop-problem2.log @@ -90,8 +90,8 @@ SYMBOL TABLE SSA Culled Empty Block (label) main::@2 Culled Empty Block (label) @4 Successful SSA optimization Pass2CullEmptyBlocks -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) mode_ctrl::$0 if((byte) mode_ctrl::before#0==(byte/word/signed word/dword/signed dword) 255) goto mode_ctrl::@4 +Simple Condition (bool~) print_cls::$1 [11] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) mode_ctrl::$0 [16] if((byte) mode_ctrl::before#0==(byte/word/signed word/dword/signed dword) 255) goto mode_ctrl::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) BORDERCOL#0 = ((byte*))53280 Constant (const byte*) SCREEN#0 = ((byte*))1024 @@ -99,7 +99,7 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) print_cls::sc#0 = SCREEN#0 Constant (const byte*) print_cls::$0 = SCREEN#0+1000 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto mode_ctrl::@2 +if() condition always true - replacing block destination [8] if(true) goto mode_ctrl::@2 Successful SSA optimization Pass2ConstantIfs Removing unused block mode_ctrl::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/loop100.log b/src/test/ref/loop100.log index c07cc0316..3b7c8e17e 100644 --- a/src/test/ref/loop100.log +++ b/src/test/ref/loop100.log @@ -37,7 +37,7 @@ SYMBOL TABLE SSA Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks -Simple Condition (bool~) main::$0 if((byte) main::i#1<(byte/signed byte/word/signed word/dword/signed dword) 100) goto main::@1 +Simple Condition (bool~) main::$0 [4] if((byte) main::i#1<(byte/signed byte/word/signed word/dword/signed dword) 100) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification diff --git a/src/test/ref/loopmin.log b/src/test/ref/loopmin.log index fe4ef204a..bf2a4f664 100644 --- a/src/test/ref/loopmin.log +++ b/src/test/ref/loopmin.log @@ -65,7 +65,7 @@ SYMBOL TABLE SSA Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) main::$1 ← (byte) main::i#2 <= (byte/signed byte/word/signed word/dword/signed dword) 5 from (bool~) main::$0 ← (byte) main::i#2 > (byte/signed byte/word/signed word/dword/signed dword) 5 +Inversing boolean not [4] (bool~) main::$1 ← (byte) main::i#2 <= (byte/signed byte/word/signed word/dword/signed dword) 5 from [3] (bool~) main::$0 ← (byte) main::i#2 > (byte/signed byte/word/signed word/dword/signed dword) 5 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) main::s#2 = (byte) main::s#3 Alias (byte) main::i#2 = (byte) main::i#4 @@ -73,8 +73,8 @@ Alias (byte) main::s#1 = (byte~) main::$2 Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#3 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 if((byte) main::i#2<=(byte/signed byte/word/signed word/dword/signed dword) 5) goto main::@2 -Simple Condition (bool~) main::$3 if((byte) main::i#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@1 +Simple Condition (bool~) main::$1 [5] if((byte) main::i#2<=(byte/signed byte/word/signed word/dword/signed dword) 5) goto main::@2 +Simple Condition (bool~) main::$3 [9] if((byte) main::i#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 10 Constant (const byte) main::s#0 = 0 diff --git a/src/test/ref/loopnest.log b/src/test/ref/loopnest.log index 438832448..93e3f12eb 100644 --- a/src/test/ref/loopnest.log +++ b/src/test/ref/loopnest.log @@ -91,8 +91,8 @@ Redundant Phi (byte*) SCREEN#3 (byte*) SCREEN#4 Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#3 Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#2 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if((byte) main::i#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@1 -Simple Condition (bool~) nest::$0 if((byte) nest::j#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto nest::@1 +Simple Condition (bool~) main::$1 [8] if((byte) main::i#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@1 +Simple Condition (bool~) nest::$0 [16] if((byte) nest::j#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto nest::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte) main::i#0 = 100 diff --git a/src/test/ref/loopnest2.log b/src/test/ref/loopnest2.log index 1e45a8c37..ca6b3cbdf 100644 --- a/src/test/ref/loopnest2.log +++ b/src/test/ref/loopnest2.log @@ -214,12 +214,12 @@ Redundant Phi (byte*) SCREEN#3 (byte*) SCREEN#5 Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#2 Redundant Phi (byte) nest2::i#2 (byte) nest2::i#4 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if((byte) main::j#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 -Simple Condition (bool~) main::$2 if((byte) main::i#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@1 -Simple Condition (bool~) nest1::$1 if((byte) nest1::j#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto nest1::@2 -Simple Condition (bool~) nest1::$2 if((byte) nest1::i#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto nest1::@1 -Simple Condition (bool~) nest2::$0 if((byte) nest2::j#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto nest2::@2 -Simple Condition (bool~) nest2::$1 if((byte) nest2::i#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto nest2::@1 +Simple Condition (bool~) main::$1 [10] if((byte) main::j#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 +Simple Condition (bool~) main::$2 [14] if((byte) main::i#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@1 +Simple Condition (bool~) nest1::$1 [25] if((byte) nest1::j#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto nest1::@2 +Simple Condition (bool~) nest1::$2 [29] if((byte) nest1::i#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto nest1::@1 +Simple Condition (bool~) nest2::$0 [39] if((byte) nest2::j#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto nest2::@2 +Simple Condition (bool~) nest2::$1 [43] if((byte) nest2::i#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto nest2::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte) main::i#0 = 100 diff --git a/src/test/ref/loopnest3.log b/src/test/ref/loopnest3.log index beb4e44cb..eac74c7c3 100644 --- a/src/test/ref/loopnest3.log +++ b/src/test/ref/loopnest3.log @@ -102,8 +102,8 @@ Redundant Phi (byte) b::i#1 (byte) b::i#0 Redundant Phi (byte) c::i#2 (byte) c::i#0 Redundant Phi (byte) c::i#1 (byte) c::i#2 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if((byte) main::i#1!=rangelast(0,100)) goto main::@1 -Simple Condition (bool~) c::$0 if((byte) c::j#1!=rangelast(0,100)) goto c::@1 +Simple Condition (bool~) main::$1 [7] if((byte) main::i#1!=rangelast(0,100)) goto main::@1 +Simple Condition (bool~) c::$0 [20] if((byte) c::j#1!=rangelast(0,100)) goto c::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const byte*) SCREEN#0 = ((byte*))1024 diff --git a/src/test/ref/loopsplit.log b/src/test/ref/loopsplit.log index f2cda9dcc..d473723aa 100644 --- a/src/test/ref/loopsplit.log +++ b/src/test/ref/loopsplit.log @@ -73,8 +73,8 @@ Successful SSA optimization Pass2CullEmptyBlocks Alias (byte) main::i#1 = (byte) main::i#3 (byte) main::i#4 (byte) main::i#5 Alias (byte) main::s#3 = (byte) main::s#5 (byte) main::s#6 (byte) main::s#4 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$0 if((byte) main::i#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 -Simple Condition (bool~) main::$1 if((byte) main::i#1>(byte/signed byte/word/signed word/dword/signed dword) 50) goto main::@4 +Simple Condition (bool~) main::$0 [5] if((byte) main::i#1>(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 +Simple Condition (bool~) main::$1 [8] if((byte) main::i#1>(byte/signed byte/word/signed word/dword/signed dword) 50) goto main::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 100 Constant (const byte) main::s#0 = 0 diff --git a/src/test/ref/mem-alignment.log b/src/test/ref/mem-alignment.log index b4e4ead1e..01474915c 100644 --- a/src/test/ref/mem-alignment.log +++ b/src/test/ref/mem-alignment.log @@ -67,8 +67,8 @@ SYMBOL TABLE SSA Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks -Simple Condition (bool~) main::$0 if((byte) main::i#1!=rangelast(0,255)) goto main::@1 -Simple Condition (bool~) main::$1 if((byte) main::i#3!=rangelast(0,255)) goto main::@2 +Simple Condition (bool~) main::$0 [7] if((byte) main::i#1!=rangelast(0,255)) goto main::@1 +Simple Condition (bool~) main::$1 [15] if((byte) main::i#3!=rangelast(0,255)) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte[256]) bs#0 = { fill( 256, 0) } Constant (const byte[256]) main::cs#0 = { fill( 256, 0) } diff --git a/src/test/ref/min-fmul-16.log b/src/test/ref/min-fmul-16.log index cc3298664..e3287ed4a 100644 --- a/src/test/ref/min-fmul-16.log +++ b/src/test/ref/min-fmul-16.log @@ -733,8 +733,8 @@ SYMBOL TABLE SSA (word) print_word::w#2 (word) print_word::w#3 -Inversing boolean not (bool~) mulf_init::$4 ← (byte~) mulf_init::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mulf_init::$3 ← (byte~) mulf_init::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mulf_init::$14 ← (byte) mulf_init::x_255#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mulf_init::$13 ← (byte) mulf_init::x_255#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [120] (bool~) mulf_init::$4 ← (byte~) mulf_init::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [119] (bool~) mulf_init::$3 ← (byte~) mulf_init::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [150] (bool~) mulf_init::$14 ← (byte) mulf_init::x_255#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [149] (bool~) mulf_init::$13 ← (byte) mulf_init::x_255#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) print_char_cursor#0 = (byte*) print_line_cursor#0 (byte*) print_screen#0 (byte*) print_char_cursor#46 (byte*) print_screen#19 (byte*) print_line_cursor#19 (byte*) print_char_cursor#45 (byte*) print_screen#18 (byte*) print_line_cursor#18 (byte*) print_char_cursor#42 (byte*) print_screen#15 (byte*) print_line_cursor#15 (byte*) print_char_cursor#39 (byte*) print_screen#12 (byte*) print_line_cursor#12 Alias (byte) print_byte::b#0 = (byte~) print_word::$0 @@ -849,11 +849,11 @@ Redundant Phi (byte*) print_char_cursor#17 (byte*) print_char_cursor#16 Redundant Phi (byte*) print_screen#5 (byte*) print_screen#11 Redundant Phi (byte*) print_line_cursor#5 (byte*) print_line_cursor#11 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if(*((byte*) RASTER#2)!=(byte/word/signed word/dword/signed dword) 255) goto main::@5 -Simple Condition (bool~) mulf_init::$4 if((byte~) mulf_init::$2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf_init::@2 -Simple Condition (bool~) mulf_init::$9 if((byte*) mulf_init::sqr1_lo#1!=(byte*~) mulf_init::$8) goto mulf_init::@1 -Simple Condition (bool~) mulf_init::$14 if((byte) mulf_init::x_255#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf_init::@4 -Simple Condition (bool~) mulf_init::$16 if((byte*) mulf_init::sqr2_lo#1!=(byte*~) mulf_init::$15) goto mulf_init::@3 +Simple Condition (bool~) main::$1 [77] if(*((byte*) RASTER#2)!=(byte/word/signed word/dword/signed dword) 255) goto main::@5 +Simple Condition (bool~) mulf_init::$4 [121] if((byte~) mulf_init::$2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf_init::@2 +Simple Condition (bool~) mulf_init::$9 [133] if((byte*) mulf_init::sqr1_lo#1!=(byte*~) mulf_init::$8) goto mulf_init::@1 +Simple Condition (bool~) mulf_init::$14 [151] if((byte) mulf_init::x_255#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf_init::@4 +Simple Condition (bool~) mulf_init::$16 [156] if((byte*) mulf_init::sqr2_lo#1!=(byte*~) mulf_init::$15) goto mulf_init::@3 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_char_cursor#0 = ((byte*))1024 Constant (const byte[]) print_hextab#0 = $0 @@ -888,7 +888,7 @@ Constant (const byte*) mulf_init::$18 = mulf_sqr1_lo#0+256 Constant (const byte*) mulf_init::$19 = mulf_sqr2_hi#0+511 Constant (const byte*) mulf_init::$20 = mulf_sqr1_hi#0+256 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [28] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/norom-charset.log b/src/test/ref/norom-charset.log index 5b1d3e6ce..5d8a42beb 100644 --- a/src/test/ref/norom-charset.log +++ b/src/test/ref/norom-charset.log @@ -233,7 +233,7 @@ SYMBOL TABLE SSA Culled Empty Block (label) @3 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) gen_char3::$3 ← (byte~) gen_char3::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) gen_char3::$2 ← (byte~) gen_char3::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [37] (bool~) gen_char3::$3 ← (byte~) gen_char3::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [36] (bool~) gen_char3::$2 ← (byte~) gen_char3::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) main::charset#0 = (byte*~) main::$0 Alias (byte*) main::charset#2 = (byte*) main::charset#3 @@ -279,10 +279,10 @@ Redundant Phi (byte*) gen_char3::dst#6 (byte*) gen_char3::dst#0 Redundant Phi (byte*) gen_char3::dst#1 (byte*) gen_char3::dst#5 Redundant Phi (byte) gen_char3::r#2 (byte) gen_char3::r#6 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$4 if((byte) main::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto main::@1 -Simple Condition (bool~) gen_char3::$3 if((byte~) gen_char3::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gen_char3::@3 -Simple Condition (bool~) gen_char3::$7 if((byte) gen_char3::c#1!=rangelast(0,2)) goto gen_char3::@2 -Simple Condition (bool~) gen_char3::$8 if((byte) gen_char3::r#1!=rangelast(0,4)) goto gen_char3::@1 +Simple Condition (bool~) main::$4 [18] if((byte) main::c#1!=(byte/signed byte/word/signed word/dword/signed dword) 6) goto main::@1 +Simple Condition (bool~) gen_char3::$3 [38] if((byte~) gen_char3::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gen_char3::@3 +Simple Condition (bool~) gen_char3::$7 [46] if((byte) gen_char3::c#1!=rangelast(0,2)) goto gen_char3::@2 +Simple Condition (bool~) gen_char3::$8 [54] if((byte) gen_char3::r#1!=rangelast(0,4)) goto gen_char3::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) VIC_MEMORY#0 = ((byte*))53272 Constant (const byte*) SCREEN#0 = ((byte*))1024 diff --git a/src/test/ref/overlap-allocation-2.log b/src/test/ref/overlap-allocation-2.log index 81a9137e9..983068ca7 100644 --- a/src/test/ref/overlap-allocation-2.log +++ b/src/test/ref/overlap-allocation-2.log @@ -149,8 +149,8 @@ Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#2 Successful SSA optimization Pass2RedundantPhiElimination Redundant Phi (byte*) SCREEN#2 (byte*) SCREEN#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if((byte) main::i#1!=rangelast(0,8)) goto main::@1 -Simple Condition (bool~) main::$3 if((byte) main::j#1!=rangelast(10,18)) goto main::@2 +Simple Condition (bool~) main::$1 [9] if((byte) main::i#1!=rangelast(0,8)) goto main::@1 +Simple Condition (bool~) main::$3 [18] if((byte) main::j#1!=rangelast(10,18)) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte) main::i#0 = 0 diff --git a/src/test/ref/overlap-allocation.log b/src/test/ref/overlap-allocation.log index 522c13f88..d72030787 100644 --- a/src/test/ref/overlap-allocation.log +++ b/src/test/ref/overlap-allocation.log @@ -148,9 +148,9 @@ Redundant Phi (byte*) SCREEN#10 (byte*) SCREEN#3 Successful SSA optimization Pass2RedundantPhiElimination Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if((byte) main::i#1!=rangelast(0,10)) goto main::@1 -Simple Condition (bool~) main::$3 if((byte) main::j#1!=rangelast(0,10)) goto main::@2 -Simple Condition (bool~) main::$5 if((byte) main::k#1!=rangelast(0,10)) goto main::@3 +Simple Condition (bool~) main::$1 [9] if((byte) main::i#1!=rangelast(0,10)) goto main::@1 +Simple Condition (bool~) main::$3 [18] if((byte) main::j#1!=rangelast(0,10)) goto main::@2 +Simple Condition (bool~) main::$5 [27] if((byte) main::k#1!=rangelast(0,10)) goto main::@3 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte) main::i#0 = 0 diff --git a/src/test/ref/printmsg.log b/src/test/ref/printmsg.log index 62112d800..bdd8a2e8b 100644 --- a/src/test/ref/printmsg.log +++ b/src/test/ref/printmsg.log @@ -271,8 +271,8 @@ Redundant Phi (byte*) print_line_cursor#15 (byte*) print_line_cursor#13 Successful SSA optimization Pass2RedundantPhiElimination Redundant Phi (byte*) print_char_cursor#26 (byte*) print_char_cursor#13 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) print_str::$0 if(*((byte*) print_str::str#4)!=(byte) '@') goto print_str::@2 -Simple Condition (bool~) print_ln::$1 if((byte*) print_line_cursor#1<(byte*) print_char_cursor#13) goto print_ln::@1 +Simple Condition (bool~) print_str::$0 [6] if(*((byte*) print_str::str#4)!=(byte) '@') goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [19] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#13) goto print_ln::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_char_cursor#0 = ((byte*))1024 Constant (const byte[]) print_hextab#0 = $0 diff --git a/src/test/ref/ptr-complex.log b/src/test/ref/ptr-complex.log index b0580344a..02bedb667 100644 --- a/src/test/ref/ptr-complex.log +++ b/src/test/ref/ptr-complex.log @@ -130,8 +130,8 @@ Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) main::screen#1 (byte*) main::screen#0 Redundant Phi (byte*) main::screen#3 (byte*) main::screen#1 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$3 if((byte) main::i#1!=rangelast(0,10)) goto main::@1 -Simple Condition (bool~) main::$12 if((byte) main::j#1!=rangelast(0,10)) goto main::@2 +Simple Condition (bool~) main::$3 [10] if((byte) main::i#1!=rangelast(0,10)) goto main::@1 +Simple Condition (bool~) main::$12 [28] if((byte) main::j#1!=rangelast(0,10)) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::screen#0 = ((byte*))1024 Constant (const byte) main::i#0 = 0 diff --git a/src/test/ref/ptrtest.log b/src/test/ref/ptrtest.log index 5a4b2f3be..99bec0958 100644 --- a/src/test/ref/ptrtest.log +++ b/src/test/ref/ptrtest.log @@ -198,10 +198,10 @@ Self Phi Eliminated (byte) lvaluevar::b#1 Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte) lvaluevar::b#1 (byte) lvaluevar::b#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) lvalue::$0 if((byte) lvalue::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto lvalue::@2 -Simple Condition (bool~) rvalue::$0 if((byte) rvalue::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto rvalue::@2 -Simple Condition (bool~) lvaluevar::$0 if((byte) lvaluevar::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto lvaluevar::@2 -Simple Condition (bool~) rvaluevar::$0 if((byte) rvaluevar::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto rvaluevar::@2 +Simple Condition (bool~) lvalue::$0 [11] if((byte) lvalue::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto lvalue::@2 +Simple Condition (bool~) rvalue::$0 [22] if((byte) rvalue::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto rvalue::@2 +Simple Condition (bool~) lvaluevar::$0 [32] if((byte) lvaluevar::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto lvaluevar::@2 +Simple Condition (bool~) rvaluevar::$0 [42] if((byte) rvaluevar::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto rvaluevar::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte[1024]) lvalue::SCREEN#0 = ((byte*))1024 Constant (const byte) lvalue::i#0 = 2 diff --git a/src/test/ref/ptrtestmin.log b/src/test/ref/ptrtestmin.log index 7558dad12..65a8302a8 100644 --- a/src/test/ref/ptrtestmin.log +++ b/src/test/ref/ptrtestmin.log @@ -50,7 +50,7 @@ Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks Alias (byte) main::i#2 = (byte) main::i#3 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$0 if((byte) main::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@2 +Simple Condition (bool~) main::$0 [4] if((byte) main::i#2<(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte[1024]) main::SCREEN#0 = ((byte*))1024 Constant (const byte) main::i#0 = 2 diff --git a/src/test/ref/scan-desire-problem.log b/src/test/ref/scan-desire-problem.log index ecda84fd3..3ba17cd48 100644 --- a/src/test/ref/scan-desire-problem.log +++ b/src/test/ref/scan-desire-problem.log @@ -896,7 +896,7 @@ SYMBOL TABLE SSA Culled Empty Block (label) @22 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [175] (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [174] (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) KEY_MODIFIER_SHIFT#0 = (byte~) $0 Alias (byte*) fill::end#0 = (byte*~) fill::$0 @@ -936,11 +936,11 @@ Redundant Phi (byte) draw_block::tileno#2 (byte) draw_block::tileno#0 Redundant Phi (byte) draw_block::x#1 (byte) draw_block::x#0 Redundant Phi (byte) draw_block::y#2 (byte) draw_block::y#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) fill::$1 if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 -Simple Condition (bool~) mul8u::$0 if((byte) mul8u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@2 -Simple Condition (bool~) mul8u::$3 if((byte~) mul8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@4 -Simple Condition (bool~) main::$3 if((byte) main::y#1<(byte/signed byte/word/signed word/dword/signed dword) 9) goto main::@2 -Simple Condition (bool~) main::$4 if((byte) main::x#1<(byte/signed byte/word/signed word/dword/signed dword) 16) goto main::@1 +Simple Condition (bool~) fill::$1 [164] if((byte*) fill::addr#1!=(byte*) fill::end#0) goto fill::@1 +Simple Condition (bool~) mul8u::$0 [171] if((byte) mul8u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@2 +Simple Condition (bool~) mul8u::$3 [176] if((byte~) mul8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@4 +Simple Condition (bool~) main::$3 [211] if((byte) main::y#1<(byte/signed byte/word/signed word/dword/signed dword) 9) goto main::@2 +Simple Condition (bool~) main::$4 [215] if((byte) main::x#1<(byte/signed byte/word/signed word/dword/signed dword) 16) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -1139,14 +1139,14 @@ Consolidated array index constant in assignment *(colors#0+40 + draw_block::$8) Consolidated array index constant in assignment *(screen#0+41 + draw_block::$9) Consolidated array index constant in assignment *(colors#0+41 + draw_block::$10) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto main::@3 +if() condition always true - replacing block destination [29] if(true) goto main::@3 Successful SSA optimization Pass2ConstantIfs -Inferred type updated to word in (word/signed dword/dword~) draw_block::$5 ← (word) draw_block::z#1 -Inferred type updated to word in (word/signed dword/dword~) draw_block::$6 ← (word) draw_block::z#1 -Inferred type updated to word in (word/signed dword/dword~) draw_block::$7 ← (word) draw_block::z#1 -Inferred type updated to word in (word/signed dword/dword~) draw_block::$8 ← (word) draw_block::z#1 -Inferred type updated to word in (word/signed dword/dword~) draw_block::$9 ← (word) draw_block::z#1 -Inferred type updated to word in (word/signed dword/dword~) draw_block::$10 ← (word) draw_block::z#1 +Inferred type updated to word in [61] (word/signed dword/dword~) draw_block::$5 ← (word) draw_block::z#1 +Inferred type updated to word in [63] (word/signed dword/dword~) draw_block::$6 ← (word) draw_block::z#1 +Inferred type updated to word in [65] (word/signed dword/dword~) draw_block::$7 ← (word) draw_block::z#1 +Inferred type updated to word in [67] (word/signed dword/dword~) draw_block::$8 ← (word) draw_block::z#1 +Inferred type updated to word in [69] (word/signed dword/dword~) draw_block::$9 ← (word) draw_block::z#1 +Inferred type updated to word in [71] (word/signed dword/dword~) draw_block::$10 ← (word) draw_block::z#1 Successful SSA optimization PassNEliminateUnusedVars Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/scroll-clobber.log b/src/test/ref/scroll-clobber.log index 01b1d0e02..814fdd125 100644 --- a/src/test/ref/scroll-clobber.log +++ b/src/test/ref/scroll-clobber.log @@ -89,7 +89,7 @@ SYMBOL TABLE SSA Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) main::$1 ← (byte) main::c#0 != (byte) '@' from (bool~) main::$0 ← (byte) main::c#0 == (byte) '@' +Inversing boolean not [9] (bool~) main::$1 ← (byte) main::c#0 != (byte) '@' from [8] (bool~) main::$0 ← (byte) main::c#0 == (byte) '@' Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) main::i#3 = (byte) main::i#4 Alias (byte*) SCREEN#2 = (byte*) SCREEN#3 @@ -103,7 +103,7 @@ Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) SCREEN#4 (byte*) SCREEN#0 Redundant Phi (byte*) SCREEN#1 (byte*) SCREEN#4 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if((byte) main::c#0!=(byte) '@') goto main::@2 +Simple Condition (bool~) main::$1 [10] if((byte) main::c#0!=(byte) '@') goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte*) SCROLL#0 = ((byte*))53270 @@ -113,7 +113,7 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::nxt#0 = TEXT#0 Constant (const byte*) main::nxt#2 = TEXT#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@1 +if() condition always true - replacing block destination [7] if(true) goto main::@1 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/signed-bytes.log b/src/test/ref/signed-bytes.log index 8d0739890..87f7bf28c 100644 --- a/src/test/ref/signed-bytes.log +++ b/src/test/ref/signed-bytes.log @@ -72,7 +72,7 @@ Self Phi Eliminated (byte*) main::screen#1 Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) main::screen#1 (byte*) main::screen#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if((signed byte) main::i#2<(byte/signed byte/word/signed word/dword/signed dword) 127) goto main::@2 +Simple Condition (bool~) main::$1 [6] if((signed byte) main::i#2<(byte/signed byte/word/signed word/dword/signed dword) 127) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::screen#0 = ((byte*))1024 Constant (const byte) main::j#0 = 0 diff --git a/src/test/ref/signed-words.log b/src/test/ref/signed-words.log index 355dd89ce..e70fee73f 100644 --- a/src/test/ref/signed-words.log +++ b/src/test/ref/signed-words.log @@ -629,8 +629,8 @@ SYMBOL TABLE SSA (signed word) yvel_init#8 (signed word) yvel_init#9 -Inversing boolean not (bool~) anim::$1 ← (signed word) ypos#9 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) anim::$0 ← (signed word) ypos#9 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) anim::$6 ← (signed word) yvel_init#3 >= (signed word/signed dword~) anim::$4 from (bool~) anim::$5 ← (signed word) yvel_init#3 < (signed word/signed dword~) anim::$4 +Inversing boolean not [138] (bool~) anim::$1 ← (signed word) ypos#9 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [137] (bool~) anim::$0 ← (signed word) ypos#9 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [168] (bool~) anim::$6 ← (signed word) yvel_init#3 >= (signed word/signed dword~) anim::$4 from [167] (bool~) anim::$5 ← (signed word) yvel_init#3 < (signed word/signed dword~) anim::$4 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) SPRITES_PTR#0 = (byte*~) $0 Alias (signed word) yvel#17 = (signed word) yvel#18 @@ -704,11 +704,11 @@ Redundant Phi (signed word) ypos#12 (signed word) ypos#0 Redundant Phi (signed word) xvel#11 (signed word) xvel#0 Redundant Phi (signed word) yvel_init#12 (signed word) yvel_init#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@2 -Simple Condition (bool~) init::$3 if((byte*) init::sc#1!=(byte*~) init::$2) goto init::@1 -Simple Condition (bool~) init::$4 if((byte) init::i#1!=rangelast(0,63)) goto init::@2 -Simple Condition (bool~) anim::$1 if((signed word) ypos#13>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto anim::@1 -Simple Condition (bool~) anim::$6 if((signed word) yvel_init#3>=(signed word/signed dword~) anim::$4) goto anim::@2 +Simple Condition (bool~) main::$1 [89] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@2 +Simple Condition (bool~) init::$3 [121] if((byte*) init::sc#1!=(byte*~) init::$2) goto init::@1 +Simple Condition (bool~) init::$4 [127] if((byte) init::i#1!=rangelast(0,63)) goto init::@2 +Simple Condition (bool~) anim::$1 [139] if((signed word) ypos#13>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto anim::@1 +Simple Condition (bool~) anim::$6 [169] if((signed word) yvel_init#3>=(signed word/signed dword~) anim::$4) goto anim::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -816,7 +816,7 @@ Consolidated array index constant in *(SPRITES_PTR#0+0) Consolidated array index constant in *(SPRITES_XPOS#0+0) Consolidated array index constant in *(SPRITES_YPOS#0+0) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto main::@1 +if() condition always true - replacing block destination [4] if(true) goto main::@1 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/sinus-basic.log b/src/test/ref/sinus-basic.log index 6b8d7fa5e..43be07851 100644 --- a/src/test/ref/sinus-basic.log +++ b/src/test/ref/sinus-basic.log @@ -601,8 +601,8 @@ Redundant Phi (byte*) print_char_cursor#12 (byte*) print_line_cursor#1 Redundant Phi (byte*) print_char_cursor#14 (byte*) print_char_cursor#12 Redundant Phi (byte*) print_line_cursor#11 (byte*) print_line_cursor#10 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) print_ln::$1 if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 -Simple Condition (bool~) main::$15 if((byte) main::i#1!=rangelast(1,25)) goto main::@1 +Simple Condition (bool~) print_ln::$1 [8] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 +Simple Condition (bool~) main::$15 [148] if((byte) main::i#1!=rangelast(1,25)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_char_cursor#0 = ((byte*))1024 Constant (const byte[]) print_hextab#0 = $0 diff --git a/src/test/ref/sinusgen16.log b/src/test/ref/sinusgen16.log index f06fd2852..0e150ea73 100644 --- a/src/test/ref/sinusgen16.log +++ b/src/test/ref/sinusgen16.log @@ -1254,14 +1254,14 @@ SYMBOL TABLE SSA (dword) sin16s_gen::x#2 (dword) sin16s_gen::x#3 -Inversing boolean not (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) divr16u::$9 ← (word) divr16u::rem#6 < (word) divr16u::divisor#2 from (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2 -Inversing boolean not (bool~) mul16u::$3 ← (byte/word~) mul16u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul16u::$2 ← (byte/word~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) sin16s::$1 ← (dword) sin16s::x#3 < (dword) PI_u4f28#0 from (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0 -Inversing boolean not (bool~) sin16s::$4 ← (dword) sin16s::x#4 < (dword) PI_HALF_u4f28#0 from (bool~) sin16s::$3 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0 -Inversing boolean not (bool~) sin16s::$19 ← (byte) sin16s::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) sin16s::$18 ← (byte) sin16s::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) print_sword::$1 ← (signed word) print_sword::w#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) print_sword::$0 ← (signed word) print_sword::w#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) main::$3 ← (signed word) main::sw#0 < (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) main::$2 ← (signed word) main::sw#0 >= (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [11] (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [10] (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [19] (bool~) divr16u::$9 ← (word) divr16u::rem#6 < (word) divr16u::divisor#2 from [18] (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2 +Inversing boolean not [79] (bool~) mul16u::$3 ← (byte/word~) mul16u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [78] (bool~) mul16u::$2 ← (byte/word~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [132] (bool~) sin16s::$1 ← (dword) sin16s::x#3 < (dword) PI_u4f28#0 from [131] (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0 +Inversing boolean not [136] (bool~) sin16s::$4 ← (dword) sin16s::x#4 < (dword) PI_HALF_u4f28#0 from [135] (bool~) sin16s::$3 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0 +Inversing boolean not [196] (bool~) sin16s::$19 ← (byte) sin16s::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [195] (bool~) sin16s::$18 ← (byte) sin16s::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [240] (bool~) print_sword::$1 ← (signed word) print_sword::w#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [239] (bool~) print_sword::$0 ← (signed word) print_sword::w#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [325] (bool~) main::$3 ← (signed word) main::sw#0 < (byte/signed byte/word/signed word/dword/signed dword) 0 from [324] (bool~) main::$2 ← (signed word) main::sw#0 >= (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#7 Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#8 @@ -1450,20 +1450,20 @@ Redundant Phi (word) rem16u#10 (word) rem16u#18 Redundant Phi (byte*) print_line_cursor#5 (byte*) print_line_cursor#11 Redundant Phi (byte*) print_char_cursor#21 (byte*) print_char_cursor#18 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) divr16u::$4 if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 -Simple Condition (bool~) mul16u::$0 if((word) mul16u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@2 -Simple Condition (bool~) mul16u::$3 if((byte/word~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 -Simple Condition (bool~) sin16s_gen::$4 if((word) sin16s_gen::i#1<(word) sin16s_gen::wavelength#0) goto sin16s_gen::@1 -Simple Condition (bool~) sin16s::$1 if((dword) sin16s::x#0<(dword) PI_u4f28#0) goto sin16s::@1 -Simple Condition (bool~) sin16s::$4 if((dword) sin16s::x#4<(dword) PI_HALF_u4f28#0) goto sin16s::@2 -Simple Condition (bool~) sin16s::$19 if((byte) sin16s::isUpper#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sin16s::@3 -Simple Condition (bool~) print_str::$0 if(*((byte*) print_str::str#3)!=(byte) '@') goto print_str::@2 -Simple Condition (bool~) print_sword::$1 if((signed word) print_sword::w#1>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sword::@1 -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) main::$3 if((signed word) main::sw#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 -Simple Condition (bool~) main::$10 if((signed word*) main::st1#1<(signed word*~) main::$9) goto main::@1 +Simple Condition (bool~) divr16u::$4 [12] if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [20] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [27] if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 +Simple Condition (bool~) mul16u::$0 [75] if((word) mul16u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@2 +Simple Condition (bool~) mul16u::$3 [80] if((byte/word~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 +Simple Condition (bool~) sin16s_gen::$4 [125] if((word) sin16s_gen::i#1<(word) sin16s_gen::wavelength#0) goto sin16s_gen::@1 +Simple Condition (bool~) sin16s::$1 [133] if((dword) sin16s::x#0<(dword) PI_u4f28#0) goto sin16s::@1 +Simple Condition (bool~) sin16s::$4 [137] if((dword) sin16s::x#4<(dword) PI_HALF_u4f28#0) goto sin16s::@2 +Simple Condition (bool~) sin16s::$19 [197] if((byte) sin16s::isUpper#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sin16s::@3 +Simple Condition (bool~) print_str::$0 [230] if(*((byte*) print_str::str#3)!=(byte) '@') goto print_str::@2 +Simple Condition (bool~) print_sword::$1 [241] if((signed word) print_sword::w#1>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sword::@1 +Simple Condition (bool~) print_cls::$1 [301] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) main::$3 [326] if((signed word) main::sw#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 +Simple Condition (bool~) main::$10 [341] if((signed word*) main::st1#1<(signed word*~) main::$9) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) rem8u#0 = 0 Constant (const word) rem16u#0 = 0 diff --git a/src/test/ref/sinusgen16b.log b/src/test/ref/sinusgen16b.log index e27b32f5a..026d28d65 100644 --- a/src/test/ref/sinusgen16b.log +++ b/src/test/ref/sinusgen16b.log @@ -1632,17 +1632,17 @@ SYMBOL TABLE SSA (word) sin16sb::x5_128 (word) sin16sb::x5_128#0 -Inversing boolean not (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) divr16u::$9 ← (word) divr16u::rem#6 < (word) divr16u::divisor#2 from (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2 -Inversing boolean not (bool~) mul16u::$3 ← (byte/word~) mul16u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul16u::$2 ← (byte/word~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) sin16s::$1 ← (dword) sin16s::x#3 < (dword) PI_u4f28#0 from (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0 -Inversing boolean not (bool~) sin16s::$4 ← (dword) sin16s::x#4 < (dword) PI_HALF_u4f28#0 from (bool~) sin16s::$3 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0 -Inversing boolean not (bool~) sin16s::$19 ← (byte) sin16s::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) sin16s::$18 ← (byte) sin16s::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) sin16sb::$1 ← (word) sin16sb::x#3 < (word) PI_u4f12#0 from (bool~) sin16sb::$0 ← (word) sin16sb::x#3 >= (word) PI_u4f12#0 -Inversing boolean not (bool~) sin16sb::$4 ← (word) sin16sb::x#4 < (word) PI_HALF_u4f12#0 from (bool~) sin16sb::$3 ← (word) sin16sb::x#4 >= (word) PI_HALF_u4f12#0 -Inversing boolean not (bool~) sin16sb::$18 ← (byte) sin16sb::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) sin16sb::$17 ← (byte) sin16sb::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) print_sword::$1 ← (signed word) print_sword::w#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) print_sword::$0 ← (signed word) print_sword::w#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) main::$5 ← (signed word) main::sw#0 < (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) main::$4 ← (signed word) main::sw#0 >= (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [11] (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [10] (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [19] (bool~) divr16u::$9 ← (word) divr16u::rem#6 < (word) divr16u::divisor#2 from [18] (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2 +Inversing boolean not [79] (bool~) mul16u::$3 ← (byte/word~) mul16u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [78] (bool~) mul16u::$2 ← (byte/word~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [132] (bool~) sin16s::$1 ← (dword) sin16s::x#3 < (dword) PI_u4f28#0 from [131] (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0 +Inversing boolean not [136] (bool~) sin16s::$4 ← (dword) sin16s::x#4 < (dword) PI_HALF_u4f28#0 from [135] (bool~) sin16s::$3 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0 +Inversing boolean not [196] (bool~) sin16s::$19 ← (byte) sin16s::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [195] (bool~) sin16s::$18 ← (byte) sin16s::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [255] (bool~) sin16sb::$1 ← (word) sin16sb::x#3 < (word) PI_u4f12#0 from [254] (bool~) sin16sb::$0 ← (word) sin16sb::x#3 >= (word) PI_u4f12#0 +Inversing boolean not [259] (bool~) sin16sb::$4 ← (word) sin16sb::x#4 < (word) PI_HALF_u4f12#0 from [258] (bool~) sin16sb::$3 ← (word) sin16sb::x#4 >= (word) PI_HALF_u4f12#0 +Inversing boolean not [318] (bool~) sin16sb::$18 ← (byte) sin16sb::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [317] (bool~) sin16sb::$17 ← (byte) sin16sb::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [349] (bool~) print_sword::$1 ← (signed word) print_sword::w#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [348] (bool~) print_sword::$0 ← (signed word) print_sword::w#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [443] (bool~) main::$5 ← (signed word) main::sw#0 < (byte/signed byte/word/signed word/dword/signed dword) 0 from [442] (bool~) main::$4 ← (signed word) main::sw#0 >= (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#7 Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#8 @@ -1884,24 +1884,24 @@ Redundant Phi (word) rem16u#13 (word) rem16u#12 Redundant Phi (byte*) print_line_cursor#5 (byte*) print_line_cursor#11 Redundant Phi (byte*) print_char_cursor#21 (byte*) print_char_cursor#18 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) divr16u::$4 if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 -Simple Condition (bool~) mul16u::$0 if((word) mul16u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@2 -Simple Condition (bool~) mul16u::$3 if((byte/word~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 -Simple Condition (bool~) sin16s_gen::$4 if((word) sin16s_gen::i#1<(word) sin16s_gen::wavelength#0) goto sin16s_gen::@1 -Simple Condition (bool~) sin16s::$1 if((dword) sin16s::x#0<(dword) PI_u4f28#0) goto sin16s::@1 -Simple Condition (bool~) sin16s::$4 if((dword) sin16s::x#4<(dword) PI_HALF_u4f28#0) goto sin16s::@2 -Simple Condition (bool~) sin16s::$19 if((byte) sin16s::isUpper#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sin16s::@3 -Simple Condition (bool~) sin16s_genb::$5 if((word) sin16s_genb::i#1<(word) sin16s_genb::wavelength#0) goto sin16s_genb::@1 -Simple Condition (bool~) sin16sb::$1 if((word) sin16sb::x#0<(word) PI_u4f12#0) goto sin16sb::@1 -Simple Condition (bool~) sin16sb::$4 if((word) sin16sb::x#4<(word) PI_HALF_u4f12#0) goto sin16sb::@2 -Simple Condition (bool~) sin16sb::$18 if((byte) sin16sb::isUpper#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sin16sb::@3 -Simple Condition (bool~) print_str::$0 if(*((byte*) print_str::str#3)!=(byte) '@') goto print_str::@2 -Simple Condition (bool~) print_sword::$1 if((signed word) print_sword::w#1>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sword::@1 -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) main::$5 if((signed word) main::sw#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 -Simple Condition (bool~) main::$11 if((byte) main::i#1!=rangelast(0,119)) goto main::@1 +Simple Condition (bool~) divr16u::$4 [12] if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [20] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [27] if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 +Simple Condition (bool~) mul16u::$0 [75] if((word) mul16u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@2 +Simple Condition (bool~) mul16u::$3 [80] if((byte/word~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 +Simple Condition (bool~) sin16s_gen::$4 [125] if((word) sin16s_gen::i#1<(word) sin16s_gen::wavelength#0) goto sin16s_gen::@1 +Simple Condition (bool~) sin16s::$1 [133] if((dword) sin16s::x#0<(dword) PI_u4f28#0) goto sin16s::@1 +Simple Condition (bool~) sin16s::$4 [137] if((dword) sin16s::x#4<(dword) PI_HALF_u4f28#0) goto sin16s::@2 +Simple Condition (bool~) sin16s::$19 [197] if((byte) sin16s::isUpper#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sin16s::@3 +Simple Condition (bool~) sin16s_genb::$5 [248] if((word) sin16s_genb::i#1<(word) sin16s_genb::wavelength#0) goto sin16s_genb::@1 +Simple Condition (bool~) sin16sb::$1 [256] if((word) sin16sb::x#0<(word) PI_u4f12#0) goto sin16sb::@1 +Simple Condition (bool~) sin16sb::$4 [260] if((word) sin16sb::x#4<(word) PI_HALF_u4f12#0) goto sin16sb::@2 +Simple Condition (bool~) sin16sb::$18 [319] if((byte) sin16sb::isUpper#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sin16sb::@3 +Simple Condition (bool~) print_str::$0 [339] if(*((byte*) print_str::str#3)!=(byte) '@') goto print_str::@2 +Simple Condition (bool~) print_sword::$1 [350] if((signed word) print_sword::w#1>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sword::@1 +Simple Condition (bool~) print_cls::$1 [410] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) main::$5 [444] if((signed word) main::sw#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 +Simple Condition (bool~) main::$11 [460] if((byte) main::i#1!=rangelast(0,119)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) rem8u#0 = 0 Constant (const word) rem16u#0 = 0 diff --git a/src/test/ref/sinusgen8.log b/src/test/ref/sinusgen8.log index b42c2c0d9..483d4e2d0 100644 --- a/src/test/ref/sinusgen8.log +++ b/src/test/ref/sinusgen8.log @@ -1195,14 +1195,14 @@ SYMBOL TABLE SSA (word) sin8s_gen::x#2 (word) sin8s_gen::x#3 -Inversing boolean not (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) divr16u::$9 ← (word) divr16u::rem#5 < (word) divr16u::divisor#1 from (bool~) divr16u::$8 ← (word) divr16u::rem#5 >= (word) divr16u::divisor#1 -Inversing boolean not (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) sin8s::$1 ← (word) sin8s::x#3 < (word) PI_u4f12#0 from (bool~) sin8s::$0 ← (word) sin8s::x#3 >= (word) PI_u4f12#0 -Inversing boolean not (bool~) sin8s::$4 ← (word) sin8s::x#4 < (word) PI_HALF_u4f12#0 from (bool~) sin8s::$3 ← (word) sin8s::x#4 >= (word) PI_HALF_u4f12#0 -Inversing boolean not (bool~) sin8s::$17 ← (byte) sin8s::usinx#1 < (byte/word/signed word/dword/signed dword) 128 from (bool~) sin8s::$16 ← (byte) sin8s::usinx#1 >= (byte/word/signed word/dword/signed dword) 128 -Inversing boolean not (bool~) sin8s::$20 ← (byte) sin8s::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) sin8s::$19 ← (byte) sin8s::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) main::$5 ← (signed byte) main::sb#0 < (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) main::$4 ← (signed byte) main::sb#0 >= (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [11] (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [10] (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [19] (bool~) divr16u::$9 ← (word) divr16u::rem#5 < (word) divr16u::divisor#1 from [18] (bool~) divr16u::$8 ← (word) divr16u::rem#5 >= (word) divr16u::divisor#1 +Inversing boolean not [66] (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [65] (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [118] (bool~) sin8s::$1 ← (word) sin8s::x#3 < (word) PI_u4f12#0 from [117] (bool~) sin8s::$0 ← (word) sin8s::x#3 >= (word) PI_u4f12#0 +Inversing boolean not [122] (bool~) sin8s::$4 ← (word) sin8s::x#4 < (word) PI_HALF_u4f12#0 from [121] (bool~) sin8s::$3 ← (word) sin8s::x#4 >= (word) PI_HALF_u4f12#0 +Inversing boolean not [180] (bool~) sin8s::$17 ← (byte) sin8s::usinx#1 < (byte/word/signed word/dword/signed dword) 128 from [179] (bool~) sin8s::$16 ← (byte) sin8s::usinx#1 >= (byte/word/signed word/dword/signed dword) 128 +Inversing boolean not [189] (bool~) sin8s::$20 ← (byte) sin8s::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [188] (bool~) sin8s::$19 ← (byte) sin8s::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [310] (bool~) main::$5 ← (signed byte) main::sb#0 < (byte/signed byte/word/signed word/dword/signed dword) 0 from [309] (bool~) main::$4 ← (signed byte) main::sb#0 >= (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#6 Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#7 @@ -1373,21 +1373,21 @@ Redundant Phi (byte*) print_char_cursor#19 (byte*) print_char_cursor#16 Successful SSA optimization Pass2RedundantPhiElimination Redundant Phi (byte*) print_char_cursor#41 (byte*) print_char_cursor#10 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) divr16u::$4 if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 if((word) divr16u::rem#5<(word) divr16u::divisor#0) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 -Simple Condition (bool~) mul8u::$0 if((byte) mul8u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@2 -Simple Condition (bool~) mul8u::$3 if((byte~) mul8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@4 -Simple Condition (bool~) sin8s_gen::$3 if((word) sin8s_gen::i#1<(word) sin8s_gen::wavelength#0) goto sin8s_gen::@1 -Simple Condition (bool~) sin8s::$1 if((word) sin8s::x#0<(word) PI_u4f12#0) goto sin8s::@1 -Simple Condition (bool~) sin8s::$4 if((word) sin8s::x#4<(word) PI_HALF_u4f12#0) goto sin8s::@2 -Simple Condition (bool~) sin8s::$17 if((byte) sin8s::usinx#1<(byte/word/signed word/dword/signed dword) 128) goto sin8s::@3 -Simple Condition (bool~) sin8s::$20 if((byte) sin8s::isUpper#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sin8s::@4 -Simple Condition (bool~) print_str::$0 if(*((byte*) print_str::str#3)!=(byte) '@') goto print_str::@2 -Simple Condition (bool~) print_sbyte::$0 if((signed byte) print_sbyte::b#1<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte::@1 -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) main::$5 if((signed byte) main::sb#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 -Simple Condition (bool~) main::$9 if((byte) main::i#1!=rangelast(0,191)) goto main::@1 +Simple Condition (bool~) divr16u::$4 [12] if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [20] if((word) divr16u::rem#5<(word) divr16u::divisor#0) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [27] if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 +Simple Condition (bool~) mul8u::$0 [62] if((byte) mul8u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@2 +Simple Condition (bool~) mul8u::$3 [67] if((byte~) mul8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@4 +Simple Condition (bool~) sin8s_gen::$3 [111] if((word) sin8s_gen::i#1<(word) sin8s_gen::wavelength#0) goto sin8s_gen::@1 +Simple Condition (bool~) sin8s::$1 [119] if((word) sin8s::x#0<(word) PI_u4f12#0) goto sin8s::@1 +Simple Condition (bool~) sin8s::$4 [123] if((word) sin8s::x#4<(word) PI_HALF_u4f12#0) goto sin8s::@2 +Simple Condition (bool~) sin8s::$17 [181] if((byte) sin8s::usinx#1<(byte/word/signed word/dword/signed dword) 128) goto sin8s::@3 +Simple Condition (bool~) sin8s::$20 [190] if((byte) sin8s::isUpper#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sin8s::@4 +Simple Condition (bool~) print_str::$0 [222] if(*((byte*) print_str::str#3)!=(byte) '@') goto print_str::@2 +Simple Condition (bool~) print_sbyte::$0 [232] if((signed byte) print_sbyte::b#1<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte::@1 +Simple Condition (bool~) print_cls::$1 [283] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) main::$5 [311] if((signed byte) main::sb#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 +Simple Condition (bool~) main::$9 [323] if((byte) main::i#1!=rangelast(0,191)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) rem8u#0 = 0 Constant (const word) rem16u#0 = 0 diff --git a/src/test/ref/sinusgen8b.log b/src/test/ref/sinusgen8b.log index b5843f96b..6597f6b2a 100644 --- a/src/test/ref/sinusgen8b.log +++ b/src/test/ref/sinusgen8b.log @@ -1783,18 +1783,18 @@ SYMBOL TABLE SSA (word) sin8s_gen::x#2 (word) sin8s_gen::x#3 -Inversing boolean not (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) divr16u::$9 ← (word) divr16u::rem#7 < (word) divr16u::divisor#3 from (bool~) divr16u::$8 ← (word) divr16u::rem#7 >= (word) divr16u::divisor#3 -Inversing boolean not (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mul16u::$3 ← (byte/word~) mul16u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul16u::$2 ← (byte/word~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) sin16s::$1 ← (dword) sin16s::x#3 < (dword) PI_u4f28#0 from (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0 -Inversing boolean not (bool~) sin16s::$4 ← (dword) sin16s::x#4 < (dword) PI_HALF_u4f28#0 from (bool~) sin16s::$3 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0 -Inversing boolean not (bool~) sin16s::$19 ← (byte) sin16s::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) sin16s::$18 ← (byte) sin16s::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) sin8s::$1 ← (word) sin8s::x#3 < (word) PI_u4f12#0 from (bool~) sin8s::$0 ← (word) sin8s::x#3 >= (word) PI_u4f12#0 -Inversing boolean not (bool~) sin8s::$4 ← (word) sin8s::x#4 < (word) PI_HALF_u4f12#0 from (bool~) sin8s::$3 ← (word) sin8s::x#4 >= (word) PI_HALF_u4f12#0 -Inversing boolean not (bool~) sin8s::$17 ← (byte) sin8s::usinx#1 < (byte/word/signed word/dword/signed dword) 128 from (bool~) sin8s::$16 ← (byte) sin8s::usinx#1 >= (byte/word/signed word/dword/signed dword) 128 -Inversing boolean not (bool~) sin8s::$20 ← (byte) sin8s::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) sin8s::$19 ← (byte) sin8s::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) main::$10 ← (signed byte) main::sd#0 < (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) main::$9 ← (signed byte) main::sd#0 >= (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [11] (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [10] (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [19] (bool~) divr16u::$9 ← (word) divr16u::rem#7 < (word) divr16u::divisor#3 from [18] (bool~) divr16u::$8 ← (word) divr16u::rem#7 >= (word) divr16u::divisor#3 +Inversing boolean not [93] (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [92] (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [117] (bool~) mul16u::$3 ← (byte/word~) mul16u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [116] (bool~) mul16u::$2 ← (byte/word~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [197] (bool~) sin16s::$1 ← (dword) sin16s::x#3 < (dword) PI_u4f28#0 from [196] (bool~) sin16s::$0 ← (dword) sin16s::x#3 >= (dword) PI_u4f28#0 +Inversing boolean not [201] (bool~) sin16s::$4 ← (dword) sin16s::x#4 < (dword) PI_HALF_u4f28#0 from [200] (bool~) sin16s::$3 ← (dword) sin16s::x#4 >= (dword) PI_HALF_u4f28#0 +Inversing boolean not [261] (bool~) sin16s::$19 ← (byte) sin16s::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [260] (bool~) sin16s::$18 ← (byte) sin16s::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [278] (bool~) sin8s::$1 ← (word) sin8s::x#3 < (word) PI_u4f12#0 from [277] (bool~) sin8s::$0 ← (word) sin8s::x#3 >= (word) PI_u4f12#0 +Inversing boolean not [282] (bool~) sin8s::$4 ← (word) sin8s::x#4 < (word) PI_HALF_u4f12#0 from [281] (bool~) sin8s::$3 ← (word) sin8s::x#4 >= (word) PI_HALF_u4f12#0 +Inversing boolean not [340] (bool~) sin8s::$17 ← (byte) sin8s::usinx#1 < (byte/word/signed word/dword/signed dword) 128 from [339] (bool~) sin8s::$16 ← (byte) sin8s::usinx#1 >= (byte/word/signed word/dword/signed dword) 128 +Inversing boolean not [349] (bool~) sin8s::$20 ← (byte) sin8s::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [348] (bool~) sin8s::$19 ← (byte) sin8s::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [494] (bool~) main::$10 ← (signed byte) main::sd#0 < (byte/signed byte/word/signed word/dword/signed dword) 0 from [493] (bool~) main::$9 ← (signed byte) main::sd#0 >= (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#8 Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#9 @@ -2044,27 +2044,27 @@ Redundant Phi (byte*) print_char_cursor#19 (byte*) print_char_cursor#16 Successful SSA optimization Pass2RedundantPhiElimination Redundant Phi (byte*) print_char_cursor#41 (byte*) print_char_cursor#10 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) divr16u::$4 if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 if((word) divr16u::rem#7<(word) divr16u::divisor#7) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 -Simple Condition (bool~) mul8u::$0 if((byte) mul8u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@2 -Simple Condition (bool~) mul8u::$3 if((byte~) mul8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@4 -Simple Condition (bool~) mul16u::$0 if((word) mul16u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@2 -Simple Condition (bool~) mul16u::$3 if((byte/word~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 -Simple Condition (bool~) sin16s_gen::$4 if((word) sin16s_gen::i#1<(word) sin16s_gen::wavelength#0) goto sin16s_gen::@1 -Simple Condition (bool~) sin8s_gen::$3 if((word) sin8s_gen::i#1<(word) sin8s_gen::wavelength#0) goto sin8s_gen::@1 -Simple Condition (bool~) sin16s::$1 if((dword) sin16s::x#0<(dword) PI_u4f28#0) goto sin16s::@1 -Simple Condition (bool~) sin16s::$4 if((dword) sin16s::x#4<(dword) PI_HALF_u4f28#0) goto sin16s::@2 -Simple Condition (bool~) sin16s::$19 if((byte) sin16s::isUpper#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sin16s::@3 -Simple Condition (bool~) sin8s::$1 if((word) sin8s::x#0<(word) PI_u4f12#0) goto sin8s::@1 -Simple Condition (bool~) sin8s::$4 if((word) sin8s::x#4<(word) PI_HALF_u4f12#0) goto sin8s::@2 -Simple Condition (bool~) sin8s::$17 if((byte) sin8s::usinx#1<(byte/word/signed word/dword/signed dword) 128) goto sin8s::@3 -Simple Condition (bool~) sin8s::$20 if((byte) sin8s::isUpper#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sin8s::@4 -Simple Condition (bool~) print_str::$0 if(*((byte*) print_str::str#3)!=(byte) '@') goto print_str::@2 -Simple Condition (bool~) print_sbyte::$0 if((signed byte) print_sbyte::b#1<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte::@1 -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) main::$10 if((signed byte) main::sd#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 -Simple Condition (bool~) main::$14 if((byte) main::i#1!=rangelast(0,191)) goto main::@1 +Simple Condition (bool~) divr16u::$4 [12] if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [20] if((word) divr16u::rem#7<(word) divr16u::divisor#7) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [27] if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 +Simple Condition (bool~) mul8u::$0 [89] if((byte) mul8u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@2 +Simple Condition (bool~) mul8u::$3 [94] if((byte~) mul8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@4 +Simple Condition (bool~) mul16u::$0 [113] if((word) mul16u::a#2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@2 +Simple Condition (bool~) mul16u::$3 [118] if((byte/word~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 +Simple Condition (bool~) sin16s_gen::$4 [163] if((word) sin16s_gen::i#1<(word) sin16s_gen::wavelength#0) goto sin16s_gen::@1 +Simple Condition (bool~) sin8s_gen::$3 [190] if((word) sin8s_gen::i#1<(word) sin8s_gen::wavelength#0) goto sin8s_gen::@1 +Simple Condition (bool~) sin16s::$1 [198] if((dword) sin16s::x#0<(dword) PI_u4f28#0) goto sin16s::@1 +Simple Condition (bool~) sin16s::$4 [202] if((dword) sin16s::x#4<(dword) PI_HALF_u4f28#0) goto sin16s::@2 +Simple Condition (bool~) sin16s::$19 [262] if((byte) sin16s::isUpper#2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sin16s::@3 +Simple Condition (bool~) sin8s::$1 [279] if((word) sin8s::x#0<(word) PI_u4f12#0) goto sin8s::@1 +Simple Condition (bool~) sin8s::$4 [283] if((word) sin8s::x#4<(word) PI_HALF_u4f12#0) goto sin8s::@2 +Simple Condition (bool~) sin8s::$17 [341] if((byte) sin8s::usinx#1<(byte/word/signed word/dword/signed dword) 128) goto sin8s::@3 +Simple Condition (bool~) sin8s::$20 [350] if((byte) sin8s::isUpper#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sin8s::@4 +Simple Condition (bool~) print_str::$0 [395] if(*((byte*) print_str::str#3)!=(byte) '@') goto print_str::@2 +Simple Condition (bool~) print_sbyte::$0 [405] if((signed byte) print_sbyte::b#1<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte::@1 +Simple Condition (bool~) print_cls::$1 [456] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) main::$10 [495] if((signed byte) main::sd#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 +Simple Condition (bool~) main::$14 [507] if((byte) main::i#1!=rangelast(0,191)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) rem8u#0 = 0 Constant (const word) rem16u#0 = 0 diff --git a/src/test/ref/sinusgenscale8.log b/src/test/ref/sinusgenscale8.log index 71224760e..94ddff430 100644 --- a/src/test/ref/sinusgenscale8.log +++ b/src/test/ref/sinusgenscale8.log @@ -2001,15 +2001,15 @@ SYMBOL TABLE SSA (word) sin8u_table::x#8 (word) sin8u_table::x#9 -Inversing boolean not (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) divr16u::$9 ← (word) divr16u::rem#5 < (word) divr16u::divisor#1 from (bool~) divr16u::$8 ← (word) divr16u::rem#5 >= (word) divr16u::divisor#1 -Inversing boolean not (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mul8su::$4 ← (signed byte) mul8su::a#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul8su::$3 ← (signed byte) mul8su::a#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) sin8s::$1 ← (word) sin8s::x#3 < (word) PI_u4f12#0 from (bool~) sin8s::$0 ← (word) sin8s::x#3 >= (word) PI_u4f12#0 -Inversing boolean not (bool~) sin8s::$4 ← (word) sin8s::x#4 < (word) PI_HALF_u4f12#0 from (bool~) sin8s::$3 ← (word) sin8s::x#4 >= (word) PI_HALF_u4f12#0 -Inversing boolean not (bool~) sin8s::$17 ← (byte) sin8s::usinx#1 < (byte/word/signed word/dword/signed dword) 128 from (bool~) sin8s::$16 ← (byte) sin8s::usinx#1 >= (byte/word/signed word/dword/signed dword) 128 -Inversing boolean not (bool~) sin8s::$20 ← (byte) sin8s::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) sin8s::$19 ← (byte) sin8s::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) print_sword::$1 ← (signed word) print_sword::w#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) print_sword::$0 ← (signed word) print_sword::w#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [11] (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [10] (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [19] (bool~) divr16u::$9 ← (word) divr16u::rem#5 < (word) divr16u::divisor#1 from [18] (bool~) divr16u::$8 ← (word) divr16u::rem#5 >= (word) divr16u::divisor#1 +Inversing boolean not [66] (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [65] (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [92] (bool~) mul8su::$4 ← (signed byte) mul8su::a#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [91] (bool~) mul8su::$3 ← (signed byte) mul8su::a#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [117] (bool~) sin8s::$1 ← (word) sin8s::x#3 < (word) PI_u4f12#0 from [116] (bool~) sin8s::$0 ← (word) sin8s::x#3 >= (word) PI_u4f12#0 +Inversing boolean not [121] (bool~) sin8s::$4 ← (word) sin8s::x#4 < (word) PI_HALF_u4f12#0 from [120] (bool~) sin8s::$3 ← (word) sin8s::x#4 >= (word) PI_HALF_u4f12#0 +Inversing boolean not [179] (bool~) sin8s::$17 ← (byte) sin8s::usinx#1 < (byte/word/signed word/dword/signed dword) 128 from [178] (bool~) sin8s::$16 ← (byte) sin8s::usinx#1 >= (byte/word/signed word/dword/signed dword) 128 +Inversing boolean not [188] (bool~) sin8s::$20 ← (byte) sin8s::isUpper#2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [187] (bool~) sin8s::$19 ← (byte) sin8s::isUpper#2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [243] (bool~) print_sword::$1 ← (signed word) print_sword::w#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [242] (bool~) print_sword::$0 ← (signed word) print_sword::w#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (word) divr16u::rem#0 = (word~) divr16u::$0 (word) divr16u::rem#6 Alias (word) divr16u::dividend#0 = (word~) divr16u::$6 (word) divr16u::dividend#7 @@ -2259,22 +2259,22 @@ Redundant Phi (byte*) print_char_cursor#98 (byte*) print_char_cursor#18 Redundant Phi (byte*) print_char_cursor#103 (byte*) print_line_cursor#1 Redundant Phi (byte*) print_line_cursor#26 (byte*) print_line_cursor#1 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) divr16u::$4 if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 if((word) divr16u::rem#5<(word) divr16u::divisor#0) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 -Simple Condition (bool~) mul8u::$0 if((byte) mul8u::a#3!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@2 -Simple Condition (bool~) mul8u::$3 if((byte~) mul8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@4 -Simple Condition (bool~) mul8su::$4 if((signed byte) mul8su::a#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8su::@1 -Simple Condition (bool~) sin8s::$1 if((word) sin8s::x#2<(word) PI_u4f12#0) goto sin8s::@1 -Simple Condition (bool~) sin8s::$4 if((word) sin8s::x#4<(word) PI_HALF_u4f12#0) goto sin8s::@2 -Simple Condition (bool~) sin8s::$17 if((byte) sin8s::usinx#1<(byte/word/signed word/dword/signed dword) 128) goto sin8s::@3 -Simple Condition (bool~) sin8s::$20 if((byte) sin8s::isUpper#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sin8s::@4 -Simple Condition (bool~) print_str::$0 if(*((byte*) print_str::str#10)!=(byte) '@') goto print_str::@2 -Simple Condition (bool~) print_ln::$1 if((byte*) print_line_cursor#1<(byte*) print_char_cursor#18) goto print_ln::@1 -Simple Condition (bool~) print_sword::$1 if((signed word) print_sword::w#1>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sword::@1 -Simple Condition (bool~) print_sbyte::$0 if((signed byte) print_sbyte::b#1<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte::@1 -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) sin8u_table::$33 if((word) sin8u_table::i#1<(word) sin8u_table::tabsize#0) goto sin8u_table::@1 +Simple Condition (bool~) divr16u::$4 [12] if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [20] if((word) divr16u::rem#5<(word) divr16u::divisor#0) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [27] if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 +Simple Condition (bool~) mul8u::$0 [62] if((byte) mul8u::a#3!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@2 +Simple Condition (bool~) mul8u::$3 [67] if((byte~) mul8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@4 +Simple Condition (bool~) mul8su::$4 [93] if((signed byte) mul8su::a#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8su::@1 +Simple Condition (bool~) sin8s::$1 [118] if((word) sin8s::x#2<(word) PI_u4f12#0) goto sin8s::@1 +Simple Condition (bool~) sin8s::$4 [122] if((word) sin8s::x#4<(word) PI_HALF_u4f12#0) goto sin8s::@2 +Simple Condition (bool~) sin8s::$17 [180] if((byte) sin8s::usinx#1<(byte/word/signed word/dword/signed dword) 128) goto sin8s::@3 +Simple Condition (bool~) sin8s::$20 [189] if((byte) sin8s::isUpper#10==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sin8s::@4 +Simple Condition (bool~) print_str::$0 [221] if(*((byte*) print_str::str#10)!=(byte) '@') goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [234] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#18) goto print_ln::@1 +Simple Condition (bool~) print_sword::$1 [244] if((signed word) print_sword::w#1>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sword::@1 +Simple Condition (bool~) print_sbyte::$0 [263] if((signed byte) print_sbyte::b#1<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte::@1 +Simple Condition (bool~) print_cls::$1 [328] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) sin8u_table::$33 [481] if((word) sin8u_table::i#1<(word) sin8u_table::tabsize#0) goto sin8u_table::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) rem8u#0 = 0 Constant (const word) rem16u#0 = 0 diff --git a/src/test/ref/test-address-of.log b/src/test/ref/test-address-of.log index b06e8866f..5ccc0c3c6 100644 --- a/src/test/ref/test-address-of.log +++ b/src/test/ref/test-address-of.log @@ -60,7 +60,7 @@ Self Phi Eliminated (byte*) main::SCREEN#1 Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) main::SCREEN#1 (byte*) main::SCREEN#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$2 if((byte) main::b#1!=rangelast(0,10)) goto main::@1 +Simple Condition (bool~) main::$2 [10] if((byte) main::b#1!=rangelast(0,10)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::SCREEN#0 = ((byte*))1024 Constant (const byte) main::b#0 = 0 diff --git a/src/test/ref/test-comparisons.log b/src/test/ref/test-comparisons.log index e31f60d92..46207dccc 100644 --- a/src/test/ref/test-comparisons.log +++ b/src/test/ref/test-comparisons.log @@ -1725,26 +1725,26 @@ SYMBOL TABLE SSA (byte) printu::res#8 (byte) printu::res#9 -Inversing boolean not (bool~) main::$3 ← (byte) main::a#2 >= (byte) main::b#0 from (bool~) main::$2 ← (byte) main::a#2 < (byte) main::b#0 -Inversing boolean not (bool~) main::$6 ← (byte) main::a#4 >= (byte/signed byte/word/signed word/dword/signed dword) 55 from (bool~) main::$5 ← (byte) main::a#4 < (byte/signed byte/word/signed word/dword/signed dword) 55 -Inversing boolean not (bool~) main::$9 ← (byte) main::a#6 >= *((byte[5]) main::cs#0 + (byte) main::i#2) from (bool~) main::$8 ← (byte) main::a#6 < *((byte[5]) main::cs#0 + (byte) main::i#2) -Inversing boolean not (bool~) main::$12 ← (byte) main::a#8 >= (byte) main::a#8 from (bool~) main::$11 ← (byte) main::a#8 < (byte) main::a#8 -Inversing boolean not (bool~) main::$16 ← (byte) main::a#10 <= (byte) main::b#2 from (bool~) main::$15 ← (byte) main::a#10 > (byte) main::b#2 -Inversing boolean not (bool~) main::$19 ← (byte) main::a#12 <= (byte/signed byte/word/signed word/dword/signed dword) 55 from (bool~) main::$18 ← (byte) main::a#12 > (byte/signed byte/word/signed word/dword/signed dword) 55 -Inversing boolean not (bool~) main::$22 ← (byte) main::a#14 <= *((byte[5]) main::cs#0 + (byte) main::i#4) from (bool~) main::$21 ← (byte) main::a#14 > *((byte[5]) main::cs#0 + (byte) main::i#4) -Inversing boolean not (bool~) main::$25 ← (byte) main::a#16 <= (byte) main::a#16 from (bool~) main::$24 ← (byte) main::a#16 > (byte) main::a#16 -Inversing boolean not (bool~) main::$29 ← (byte) main::a#18 > (byte) main::b#4 from (bool~) main::$28 ← (byte) main::a#18 <= (byte) main::b#4 -Inversing boolean not (bool~) main::$32 ← (byte) main::a#20 > (byte/signed byte/word/signed word/dword/signed dword) 55 from (bool~) main::$31 ← (byte) main::a#20 <= (byte/signed byte/word/signed word/dword/signed dword) 55 -Inversing boolean not (bool~) main::$35 ← (byte) main::a#22 > *((byte[5]) main::cs#0 + (byte) main::i#6) from (bool~) main::$34 ← (byte) main::a#22 <= *((byte[5]) main::cs#0 + (byte) main::i#6) -Inversing boolean not (bool~) main::$38 ← (byte) main::a#24 > (byte) main::a#24 from (bool~) main::$37 ← (byte) main::a#24 <= (byte) main::a#24 -Inversing boolean not (bool~) main::$42 ← (byte) main::a#26 < (byte) main::b#6 from (bool~) main::$41 ← (byte) main::a#26 >= (byte) main::b#6 -Inversing boolean not (bool~) main::$45 ← (byte) main::a#28 < (byte/signed byte/word/signed word/dword/signed dword) 55 from (bool~) main::$44 ← (byte) main::a#28 >= (byte/signed byte/word/signed word/dword/signed dword) 55 -Inversing boolean not (bool~) main::$48 ← (byte) main::a#30 < *((byte[5]) main::cs#0 + (byte) main::i#8) from (bool~) main::$47 ← (byte) main::a#30 >= *((byte[5]) main::cs#0 + (byte) main::i#8) -Inversing boolean not (bool~) main::$51 ← (byte) main::a#32 < (byte) main::a#32 from (bool~) main::$50 ← (byte) main::a#32 >= (byte) main::a#32 -Inversing boolean not (bool~) main::$55 ← (byte) main::a#34 != (byte) main::b#8 from (bool~) main::$54 ← (byte) main::a#34 == (byte) main::b#8 -Inversing boolean not (bool~) main::$58 ← (byte) main::a#36 != (byte/signed byte/word/signed word/dword/signed dword) 55 from (bool~) main::$57 ← (byte) main::a#36 == (byte/signed byte/word/signed word/dword/signed dword) 55 -Inversing boolean not (bool~) main::$61 ← (byte) main::a#38 != *((byte[5]) main::cs#0 + (byte) main::i#10) from (bool~) main::$60 ← (byte) main::a#38 == *((byte[5]) main::cs#0 + (byte) main::i#10) -Inversing boolean not (bool~) main::$64 ← (byte) main::a#40 != (byte) main::a#40 from (bool~) main::$63 ← (byte) main::a#40 == (byte) main::a#40 +Inversing boolean not [76] (bool~) main::$3 ← (byte) main::a#2 >= (byte) main::b#0 from [75] (bool~) main::$2 ← (byte) main::a#2 < (byte) main::b#0 +Inversing boolean not [88] (bool~) main::$6 ← (byte) main::a#4 >= (byte/signed byte/word/signed word/dword/signed dword) 55 from [87] (bool~) main::$5 ← (byte) main::a#4 < (byte/signed byte/word/signed word/dword/signed dword) 55 +Inversing boolean not [102] (bool~) main::$9 ← (byte) main::a#6 >= *((byte[5]) main::cs#0 + (byte) main::i#2) from [101] (bool~) main::$8 ← (byte) main::a#6 < *((byte[5]) main::cs#0 + (byte) main::i#2) +Inversing boolean not [116] (bool~) main::$12 ← (byte) main::a#8 >= (byte) main::a#8 from [115] (bool~) main::$11 ← (byte) main::a#8 < (byte) main::a#8 +Inversing boolean not [134] (bool~) main::$16 ← (byte) main::a#10 <= (byte) main::b#2 from [133] (bool~) main::$15 ← (byte) main::a#10 > (byte) main::b#2 +Inversing boolean not [148] (bool~) main::$19 ← (byte) main::a#12 <= (byte/signed byte/word/signed word/dword/signed dword) 55 from [147] (bool~) main::$18 ← (byte) main::a#12 > (byte/signed byte/word/signed word/dword/signed dword) 55 +Inversing boolean not [162] (bool~) main::$22 ← (byte) main::a#14 <= *((byte[5]) main::cs#0 + (byte) main::i#4) from [161] (bool~) main::$21 ← (byte) main::a#14 > *((byte[5]) main::cs#0 + (byte) main::i#4) +Inversing boolean not [176] (bool~) main::$25 ← (byte) main::a#16 <= (byte) main::a#16 from [175] (bool~) main::$24 ← (byte) main::a#16 > (byte) main::a#16 +Inversing boolean not [194] (bool~) main::$29 ← (byte) main::a#18 > (byte) main::b#4 from [193] (bool~) main::$28 ← (byte) main::a#18 <= (byte) main::b#4 +Inversing boolean not [208] (bool~) main::$32 ← (byte) main::a#20 > (byte/signed byte/word/signed word/dword/signed dword) 55 from [207] (bool~) main::$31 ← (byte) main::a#20 <= (byte/signed byte/word/signed word/dword/signed dword) 55 +Inversing boolean not [222] (bool~) main::$35 ← (byte) main::a#22 > *((byte[5]) main::cs#0 + (byte) main::i#6) from [221] (bool~) main::$34 ← (byte) main::a#22 <= *((byte[5]) main::cs#0 + (byte) main::i#6) +Inversing boolean not [236] (bool~) main::$38 ← (byte) main::a#24 > (byte) main::a#24 from [235] (bool~) main::$37 ← (byte) main::a#24 <= (byte) main::a#24 +Inversing boolean not [254] (bool~) main::$42 ← (byte) main::a#26 < (byte) main::b#6 from [253] (bool~) main::$41 ← (byte) main::a#26 >= (byte) main::b#6 +Inversing boolean not [268] (bool~) main::$45 ← (byte) main::a#28 < (byte/signed byte/word/signed word/dword/signed dword) 55 from [267] (bool~) main::$44 ← (byte) main::a#28 >= (byte/signed byte/word/signed word/dword/signed dword) 55 +Inversing boolean not [282] (bool~) main::$48 ← (byte) main::a#30 < *((byte[5]) main::cs#0 + (byte) main::i#8) from [281] (bool~) main::$47 ← (byte) main::a#30 >= *((byte[5]) main::cs#0 + (byte) main::i#8) +Inversing boolean not [296] (bool~) main::$51 ← (byte) main::a#32 < (byte) main::a#32 from [295] (bool~) main::$50 ← (byte) main::a#32 >= (byte) main::a#32 +Inversing boolean not [314] (bool~) main::$55 ← (byte) main::a#34 != (byte) main::b#8 from [313] (bool~) main::$54 ← (byte) main::a#34 == (byte) main::b#8 +Inversing boolean not [328] (bool~) main::$58 ← (byte) main::a#36 != (byte/signed byte/word/signed word/dword/signed dword) 55 from [327] (bool~) main::$57 ← (byte) main::a#36 == (byte/signed byte/word/signed word/dword/signed dword) 55 +Inversing boolean not [342] (bool~) main::$61 ← (byte) main::a#38 != *((byte[5]) main::cs#0 + (byte) main::i#10) from [341] (bool~) main::$60 ← (byte) main::a#38 == *((byte[5]) main::cs#0 + (byte) main::i#10) +Inversing boolean not [356] (bool~) main::$64 ← (byte) main::a#40 != (byte) main::a#40 from [355] (bool~) main::$63 ← (byte) main::a#40 == (byte) main::a#40 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) print_line_cursor#0 = (byte*) print_screen#0 (byte*) print_char_cursor#0 (byte*) print_line_cursor#39 (byte*) print_char_cursor#141 (byte*) print_screen#6 (byte*) print_line_cursor#33 (byte*) print_char_cursor#118 (byte*) print_screen#5 Alias (byte*) print_str::str#2 = (byte*) print_str::str#3 @@ -1973,30 +1973,30 @@ Redundant Phi (byte*) print_char_cursor#46 (byte*) print_char_cursor#117 Successful SSA optimization Pass2RedundantPhiElimination Redundant Phi (byte*) print_char_cursor#93 (byte*) print_char_cursor#55 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) print_str::$0 if(*((byte*) print_str::str#2)!=(byte) '@') goto print_str::@2 -Simple Condition (bool~) print_ln::$1 if((byte*) print_line_cursor#1<(byte*) print_char_cursor#55) goto print_ln::@1 -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) main::$3 if((byte) main::a#10>=(byte) main::b#0) goto main::@2 -Simple Condition (bool~) main::$6 if((byte) main::a#10>=(byte/signed byte/word/signed word/dword/signed dword) 55) goto main::@3 -Simple Condition (bool~) main::$9 if((byte) main::a#10>=*((byte[5]) main::cs#0 + (byte) main::i#10)) goto main::@4 -Simple Condition (bool~) main::$12 if((byte) main::a#10>=(byte) main::a#10) goto main::@5 -Simple Condition (bool~) main::$16 if((byte) main::a#10<=(byte) main::b#0) goto main::@6 -Simple Condition (bool~) main::$19 if((byte) main::a#10<=(byte/signed byte/word/signed word/dword/signed dword) 55) goto main::@7 -Simple Condition (bool~) main::$22 if((byte) main::a#10<=*((byte[5]) main::cs#0 + (byte) main::i#10)) goto main::@8 -Simple Condition (bool~) main::$25 if((byte) main::a#10<=(byte) main::a#10) goto main::@9 -Simple Condition (bool~) main::$29 if((byte) main::a#10>(byte) main::b#0) goto main::@10 -Simple Condition (bool~) main::$32 if((byte) main::a#10>(byte/signed byte/word/signed word/dword/signed dword) 55) goto main::@11 -Simple Condition (bool~) main::$35 if((byte) main::a#10>*((byte[5]) main::cs#0 + (byte) main::i#10)) goto main::@12 -Simple Condition (bool~) main::$38 if((byte) main::a#10>(byte) main::a#10) goto main::@13 -Simple Condition (bool~) main::$42 if((byte) main::a#10<(byte) main::b#0) goto main::@14 -Simple Condition (bool~) main::$45 if((byte) main::a#10<(byte/signed byte/word/signed word/dword/signed dword) 55) goto main::@15 -Simple Condition (bool~) main::$48 if((byte) main::a#10<*((byte[5]) main::cs#0 + (byte) main::i#10)) goto main::@16 -Simple Condition (bool~) main::$51 if((byte) main::a#10<(byte) main::a#10) goto main::@17 -Simple Condition (bool~) main::$55 if((byte) main::a#10!=(byte) main::b#0) goto main::@18 -Simple Condition (bool~) main::$58 if((byte) main::a#10!=(byte/signed byte/word/signed word/dword/signed dword) 55) goto main::@19 -Simple Condition (bool~) main::$61 if((byte) main::a#10!=*((byte[5]) main::cs#0 + (byte) main::i#10)) goto main::@20 -Simple Condition (bool~) main::$64 if((byte) main::a#10!=(byte) main::a#10) goto main::@21 -Simple Condition (bool~) main::$68 if((byte) main::i#1!=rangelast(0,4)) goto main::@1 +Simple Condition (bool~) print_str::$0 [6] if(*((byte*) print_str::str#2)!=(byte) '@') goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [19] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#55) goto print_ln::@1 +Simple Condition (bool~) print_cls::$1 [55] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) main::$3 [77] if((byte) main::a#10>=(byte) main::b#0) goto main::@2 +Simple Condition (bool~) main::$6 [89] if((byte) main::a#10>=(byte/signed byte/word/signed word/dword/signed dword) 55) goto main::@3 +Simple Condition (bool~) main::$9 [103] if((byte) main::a#10>=*((byte[5]) main::cs#0 + (byte) main::i#10)) goto main::@4 +Simple Condition (bool~) main::$12 [117] if((byte) main::a#10>=(byte) main::a#10) goto main::@5 +Simple Condition (bool~) main::$16 [135] if((byte) main::a#10<=(byte) main::b#0) goto main::@6 +Simple Condition (bool~) main::$19 [149] if((byte) main::a#10<=(byte/signed byte/word/signed word/dword/signed dword) 55) goto main::@7 +Simple Condition (bool~) main::$22 [163] if((byte) main::a#10<=*((byte[5]) main::cs#0 + (byte) main::i#10)) goto main::@8 +Simple Condition (bool~) main::$25 [177] if((byte) main::a#10<=(byte) main::a#10) goto main::@9 +Simple Condition (bool~) main::$29 [195] if((byte) main::a#10>(byte) main::b#0) goto main::@10 +Simple Condition (bool~) main::$32 [209] if((byte) main::a#10>(byte/signed byte/word/signed word/dword/signed dword) 55) goto main::@11 +Simple Condition (bool~) main::$35 [223] if((byte) main::a#10>*((byte[5]) main::cs#0 + (byte) main::i#10)) goto main::@12 +Simple Condition (bool~) main::$38 [237] if((byte) main::a#10>(byte) main::a#10) goto main::@13 +Simple Condition (bool~) main::$42 [255] if((byte) main::a#10<(byte) main::b#0) goto main::@14 +Simple Condition (bool~) main::$45 [269] if((byte) main::a#10<(byte/signed byte/word/signed word/dword/signed dword) 55) goto main::@15 +Simple Condition (bool~) main::$48 [283] if((byte) main::a#10<*((byte[5]) main::cs#0 + (byte) main::i#10)) goto main::@16 +Simple Condition (bool~) main::$51 [297] if((byte) main::a#10<(byte) main::a#10) goto main::@17 +Simple Condition (bool~) main::$55 [315] if((byte) main::a#10!=(byte) main::b#0) goto main::@18 +Simple Condition (bool~) main::$58 [329] if((byte) main::a#10!=(byte/signed byte/word/signed word/dword/signed dword) 55) goto main::@19 +Simple Condition (bool~) main::$61 [343] if((byte) main::a#10!=*((byte[5]) main::cs#0 + (byte) main::i#10)) goto main::@20 +Simple Condition (bool~) main::$64 [357] if((byte) main::a#10!=(byte) main::a#10) goto main::@21 +Simple Condition (bool~) main::$68 [376] if((byte) main::i#1!=rangelast(0,4)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_line_cursor#0 = ((byte*))1024 Constant (const byte[]) print_hextab#0 = $0 @@ -2074,7 +2074,7 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) print_cls::sc#0 = print_line_cursor#0 Constant (const byte*) print_cls::$0 = print_line_cursor#0+1000 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@22 +if() condition always true - replacing block destination [154] if(true) goto main::@22 Successful SSA optimization Pass2ConstantIfs Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/test-division.log b/src/test/ref/test-division.log index 77be33a5a..dfe8beb28 100644 --- a/src/test/ref/test-division.log +++ b/src/test/ref/test-division.log @@ -2525,11 +2525,11 @@ SYMBOL TABLE SSA (const string) test_8u::str1 = (string) " = @" (const string) test_8u::str2 = (string) " @" -Inversing boolean not (bool~) print_sword::$1 ← (signed word) print_sword::w#5 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) print_sword::$0 ← (signed word) print_sword::w#5 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) divr8u::$3 ← (byte~) divr8u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) divr8u::$2 ← (byte~) divr8u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) divr8u::$8 ← (byte) divr8u::rem#5 < (byte) divr8u::divisor#1 from (bool~) divr8u::$7 ← (byte) divr8u::rem#5 >= (byte) divr8u::divisor#1 -Inversing boolean not (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) divr16u::$9 ← (word) divr16u::rem#6 < (word) divr16u::divisor#2 from (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2 +Inversing boolean not [28] (bool~) print_sword::$1 ← (signed word) print_sword::w#5 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [27] (bool~) print_sword::$0 ← (signed word) print_sword::w#5 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [145] (bool~) divr8u::$3 ← (byte~) divr8u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [144] (bool~) divr8u::$2 ← (byte~) divr8u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [153] (bool~) divr8u::$8 ← (byte) divr8u::rem#5 < (byte) divr8u::divisor#1 from [152] (bool~) divr8u::$7 ← (byte) divr8u::rem#5 >= (byte) divr8u::divisor#1 +Inversing boolean not [184] (bool~) divr16u::$4 ← (byte~) divr16u::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [183] (bool~) divr16u::$3 ← (byte~) divr16u::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [192] (bool~) divr16u::$9 ← (word) divr16u::rem#6 < (word) divr16u::divisor#2 from [191] (bool~) divr16u::$8 ← (word) divr16u::rem#6 >= (word) divr16u::divisor#2 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) print_line_cursor#0 = (byte*) print_screen#0 (byte*) print_char_cursor#0 (byte*) print_line_cursor#66 (byte*) print_char_cursor#158 (byte*) print_screen#10 (byte*) print_line_cursor#61 (byte*) print_char_cursor#157 (byte*) print_screen#9 (byte*) print_line_cursor#56 (byte*) print_char_cursor#156 (byte*) print_screen#8 (byte*) print_line_cursor#51 (byte*) print_char_cursor#151 (byte*) print_screen#7 (byte*) print_line_cursor#50 (byte*) print_char_cursor#150 (byte*) print_screen#6 (byte*) print_line_cursor#45 (byte*) print_char_cursor#142 (byte*) print_screen#5 Alias (byte*) print_str::str#13 = (byte*) print_str::str#14 @@ -2913,28 +2913,28 @@ Redundant Phi (word) rem16u#43 (word) rem16u#1 Redundant Phi (byte*) print_char_cursor#141 (byte*) print_line_cursor#1 Redundant Phi (byte*) print_line_cursor#44 (byte*) print_line_cursor#1 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) print_str::$0 if(*((byte*) print_str::str#13)!=(byte) '@') goto print_str::@2 -Simple Condition (bool~) print_ln::$1 if((byte*) print_line_cursor#1<(byte*) print_char_cursor#18) goto print_ln::@1 -Simple Condition (bool~) print_sword::$1 if((signed word) print_sword::w#5>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sword::@1 -Simple Condition (bool~) print_sbyte::$0 if((signed byte) print_sbyte::b#10<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte::@1 -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) divr8u::$3 if((byte~) divr8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr8u::@2 -Simple Condition (bool~) divr8u::$8 if((byte) divr8u::rem#5<(byte) divr8u::divisor#0) goto divr8u::@3 -Simple Condition (bool~) divr8u::$10 if((byte) divr8u::i#1!=rangelast(0,7)) goto divr8u::@1 -Simple Condition (bool~) divr16u::$4 if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 -Simple Condition (bool~) div8s::$0 if((signed byte) div8s::dividend#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto div8s::@1 -Simple Condition (bool~) div8s::$4 if((signed byte) div8s::divisor#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto div8s::@3 -Simple Condition (bool~) div8s::$10 if((byte) div8s::neg#4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto div8s::@5 -Simple Condition (bool~) divr16s::$9 if((signed word) divr16s::divisor#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16s::@3 -Simple Condition (bool~) divr16s::$15 if((byte) divr16s::neg#4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16s::@5 -Simple Condition (bool~) test_8u::$9 if((byte) test_8u::i#1!=rangelast(0,5)) goto test_8u::@1 -Simple Condition (bool~) test_16u::$10 if((byte) test_16u::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 12) goto test_16u::@1 -Simple Condition (bool~) test_8s::$13 if((byte) test_8s::i#1!=rangelast(0,5)) goto test_8s::@1 -Simple Condition (bool~) test_16s::$16 if((byte) test_16s::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 12) goto test_16s::@1 +Simple Condition (bool~) print_str::$0 [6] if(*((byte*) print_str::str#13)!=(byte) '@') goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [19] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#18) goto print_ln::@1 +Simple Condition (bool~) print_sword::$1 [29] if((signed word) print_sword::w#5>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sword::@1 +Simple Condition (bool~) print_sbyte::$0 [48] if((signed byte) print_sbyte::b#10<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte::@1 +Simple Condition (bool~) print_cls::$1 [113] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) divr8u::$3 [146] if((byte~) divr8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr8u::@2 +Simple Condition (bool~) divr8u::$8 [154] if((byte) divr8u::rem#5<(byte) divr8u::divisor#0) goto divr8u::@3 +Simple Condition (bool~) divr8u::$10 [161] if((byte) divr8u::i#1!=rangelast(0,7)) goto divr8u::@1 +Simple Condition (bool~) divr16u::$4 [185] if((byte~) divr16u::$2==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [193] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [200] if((byte) divr16u::i#1!=rangelast(0,15)) goto divr16u::@1 +Simple Condition (bool~) div8s::$0 [232] if((signed byte) div8s::dividend#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto div8s::@1 +Simple Condition (bool~) div8s::$4 [244] if((signed byte) div8s::divisor#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto div8s::@3 +Simple Condition (bool~) div8s::$10 [264] if((byte) div8s::neg#4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto div8s::@5 +Simple Condition (bool~) divr16s::$9 [308] if((signed word) divr16s::divisor#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16s::@3 +Simple Condition (bool~) divr16s::$15 [329] if((byte) divr16s::neg#4==(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16s::@5 +Simple Condition (bool~) test_8u::$9 [448] if((byte) test_8u::i#1!=rangelast(0,5)) goto test_8u::@1 +Simple Condition (bool~) test_16u::$10 [504] if((byte) test_16u::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 12) goto test_16u::@1 +Simple Condition (bool~) test_8s::$13 [564] if((byte) test_8s::i#1!=rangelast(0,5)) goto test_8s::@1 +Simple Condition (bool~) test_16s::$16 [628] if((byte) test_16s::i#1!=(byte/signed byte/word/signed word/dword/signed dword) 12) goto test_16s::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting || if()-condition to two if()s (bool~) divr16s::$2 ← (bool~) divr16s::$0 || (bool~) divr16s::$1 +Rewriting || if()-condition to two if()s [290] (bool~) divr16s::$2 ← (bool~) divr16s::$0 || (bool~) divr16s::$1 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const byte*) print_line_cursor#0 = ((byte*))1024 Constant (const byte) print_char::ch#0 = '-' @@ -3005,7 +3005,7 @@ Constant (const signed word[]) test_16s::divisors#0 = { 5, test_16s::$3, 11, tes Successful SSA optimization Pass2ConstantIdentification Constant (const word) divr16s::remu#1 = ((word))divr16s::$7 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating if((const bool) divr16s::$1) goto divr16s::@1 +if() condition always false - eliminating [256] if((const bool) divr16s::$1) goto divr16s::@1 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Successful SSA optimization PassNEliminateUnusedVars @@ -3059,7 +3059,7 @@ Culled Empty Block (label) main::@5 Culled Empty Block (label) @33 Culled Empty Block (label) divr16s::@16 Successful SSA optimization Pass2CullEmptyBlocks -Simple Condition (bool~) divr16s::$0 if((signed word) divr16s::dividend#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16s::@1 +Simple Condition (bool~) divr16s::$0 [115] if((signed word) divr16s::dividend#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto divr16s::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Inlining constant with var siblings (const byte*) print_str::str#1 Inlining constant with var siblings (const byte*) print_str::str#2 diff --git a/src/test/ref/test-interrupt-notype.log b/src/test/ref/test-interrupt-notype.log index 8bf5edc6b..09fd7bf79 100644 --- a/src/test/ref/test-interrupt-notype.log +++ b/src/test/ref/test-interrupt-notype.log @@ -59,7 +59,7 @@ Constant (const byte*) BGCOL#0 = ((byte*))53280 Constant (const byte*) FGCOL#0 = ((byte*))53281 Constant (const void()*) main::$0 = &irq Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [1] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/test-interrupt-volatile-write.log b/src/test/ref/test-interrupt-volatile-write.log index 0b23b8f33..18fcac055 100644 --- a/src/test/ref/test-interrupt-volatile-write.log +++ b/src/test/ref/test-interrupt-volatile-write.log @@ -105,7 +105,7 @@ interrupt(KERNEL_MIN)(void()) irq() (label) main::@7 (label) main::@return -Inversing boolean not (bool~) main::$2 ← (byte) col#7 <= (byte/signed byte/word/signed word/dword/signed dword) 10 from (bool~) main::$1 ← (byte) col#7 > (byte/signed byte/word/signed word/dword/signed dword) 10 +Inversing boolean not [10] (bool~) main::$2 ← (byte) col#7 <= (byte/signed byte/word/signed word/dword/signed dword) 10 from [9] (bool~) main::$1 ← (byte) col#7 > (byte/signed byte/word/signed word/dword/signed dword) 10 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) col#14 = (byte) col#7 (byte) col#17 (byte) col#8 (byte) col#2 Alias (byte) col#10 = (byte) col#9 (byte) col#11 @@ -119,14 +119,14 @@ Redundant Phi (byte) col#16 (byte) col#0 Redundant Phi (byte) col#10 (byte) col#0 Redundant Phi (byte) col#13 (byte) col#14 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$2 if((byte) col#14<=(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@4 -Simple Condition (bool~) irq::$0 if((byte) col#0!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto irq::@1 +Simple Condition (bool~) main::$2 [11] if((byte) col#14<=(byte/signed byte/word/signed word/dword/signed dword) 10) goto main::@4 +Simple Condition (bool~) irq::$0 [21] if((byte) col#0!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto irq::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const void()**) KERNEL_IRQ#0 = ((void()**))788 Constant (const byte*) BGCOL#0 = ((byte*))53280 Constant (const void()*) main::$0 = &irq Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [3] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/test-interrupt-volatile.log b/src/test/ref/test-interrupt-volatile.log index 3dcf85575..60d4f7e42 100644 --- a/src/test/ref/test-interrupt-volatile.log +++ b/src/test/ref/test-interrupt-volatile.log @@ -83,7 +83,7 @@ Constant (const void()**) KERNEL_IRQ#0 = ((void()**))788 Constant (const byte*) BGCOL#0 = ((byte*))53280 Constant (const void()*) main::$0 = &irq Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [3] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/test-interrupt.log b/src/test/ref/test-interrupt.log index 8bf5edc6b..09fd7bf79 100644 --- a/src/test/ref/test-interrupt.log +++ b/src/test/ref/test-interrupt.log @@ -59,7 +59,7 @@ Constant (const byte*) BGCOL#0 = ((byte*))53280 Constant (const byte*) FGCOL#0 = ((byte*))53281 Constant (const void()*) main::$0 = &irq Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [1] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/test-kasm-pc.log b/src/test/ref/test-kasm-pc.log index 5f0e22574..78ffc4c9b 100644 --- a/src/test/ref/test-kasm-pc.log +++ b/src/test/ref/test-kasm-pc.log @@ -77,7 +77,7 @@ Constant (const byte*) TABLE#0 = ((byte*))8192 Constant (const byte*) main::BORDERCOL#0 = ((byte*))53280 Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [1] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/test-kasm.log b/src/test/ref/test-kasm.log index 1ae4b4e2c..d07db78e8 100644 --- a/src/test/ref/test-kasm.log +++ b/src/test/ref/test-kasm.log @@ -35,7 +35,7 @@ SYMBOL TABLE SSA Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [0] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/test-keyboard-space.log b/src/test/ref/test-keyboard-space.log index 9ccf83265..ef732d6b3 100644 --- a/src/test/ref/test-keyboard-space.log +++ b/src/test/ref/test-keyboard-space.log @@ -629,8 +629,8 @@ Successful SSA optimization Pass2AliasElimination Redundant Phi (byte) keyboard_matrix_read::rowid#1 (byte) keyboard_matrix_read::rowid#0 Redundant Phi (byte) keyboard_key_pressed::key#1 (byte) keyboard_key_pressed::key#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@4 -Simple Condition (bool~) main::$3 if((byte~) main::$2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@5 +Simple Condition (bool~) main::$1 [185] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@4 +Simple Condition (bool~) main::$3 [192] if((byte~) main::$2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@5 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -798,7 +798,7 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in *(keyboard_matrix_row_bitmask#0+keyboard_matrix_read::rowid#0) Consolidated array index constant in *(keyboard_matrix_col_bitmask#0+keyboard_key_pressed::colidx#0) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto main::@4 +if() condition always true - replacing block destination [12] if(true) goto main::@4 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/test-keyboard.log b/src/test/ref/test-keyboard.log index 7b6f039ad..629de0912 100644 --- a/src/test/ref/test-keyboard.log +++ b/src/test/ref/test-keyboard.log @@ -874,8 +874,8 @@ Culled Empty Block (label) main::@27 Culled Empty Block (label) main::@3 Culled Empty Block (label) @13 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) main::$14 ← (byte) main::key#0 == (byte/signed byte/word/signed word/dword/signed dword) 63 from (bool~) main::$13 ← (byte) main::key#0 != (byte/signed byte/word/signed word/dword/signed dword) 63 -Inversing boolean not (bool~) main::$17 ← (byte~) main::$15 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) main::$16 ← (byte~) main::$15 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [241] (bool~) main::$14 ← (byte) main::key#0 == (byte/signed byte/word/signed word/dword/signed dword) 63 from [240] (bool~) main::$13 ← (byte) main::key#0 != (byte/signed byte/word/signed word/dword/signed dword) 63 +Inversing boolean not [254] (bool~) main::$17 ← (byte~) main::$15 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [253] (bool~) main::$16 ← (byte~) main::$15 != (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) keyboard_matrix_read::return#0 = (byte) keyboard_matrix_read::row_pressed_bits#0 (byte~) keyboard_matrix_read::$0 (byte) keyboard_matrix_read::return#4 (byte) keyboard_matrix_read::return#1 Alias (byte) keyboard_key_pressed::colidx#0 = (byte~) keyboard_key_pressed::$0 (byte) keyboard_key_pressed::colidx#1 @@ -923,15 +923,15 @@ Redundant Phi (byte) main::row#3 (byte) main::row#2 Redundant Phi (byte*) main::screen#11 (byte*) main::screen#2 Redundant Phi (byte*) main::screen#8 (byte*) main::screen#11 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$1 if((byte*) main::sc#1<(word/signed word/dword/signed dword~) main::$0) goto main::@1 -Simple Condition (bool~) main::$3 if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@5 -Simple Condition (bool~) main::$6 if((byte~) main::$5!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@8 -Simple Condition (bool~) main::$8 if((byte) main::col#1!=rangelast(0,7)) goto main::@7 -Simple Condition (bool~) main::$10 if((byte) main::row#1!=rangelast(0,7)) goto main::@6 -Simple Condition (bool~) main::$14 if((byte) main::key#0==(byte/signed byte/word/signed word/dword/signed dword) 63) goto main::@11 -Simple Condition (bool~) main::$18 if((byte) main::ch#1!=rangelast(0,63)) goto main::@10 -Simple Condition (bool~) main::$17 if((byte~) main::$15==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@12 -Simple Condition (bool~) main::$19 if((byte) main::i#2<(byte/signed byte/word/signed word/dword/signed dword) 5) goto main::@13 +Simple Condition (bool~) main::$1 [193] if((byte*) main::sc#1<(word/signed word/dword/signed dword~) main::$0) goto main::@1 +Simple Condition (bool~) main::$3 [197] if(*((byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@5 +Simple Condition (bool~) main::$6 [211] if((byte~) main::$5!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@8 +Simple Condition (bool~) main::$8 [221] if((byte) main::col#1!=rangelast(0,7)) goto main::@7 +Simple Condition (bool~) main::$10 [227] if((byte) main::row#1!=rangelast(0,7)) goto main::@6 +Simple Condition (bool~) main::$14 [242] if((byte) main::key#0==(byte/signed byte/word/signed word/dword/signed dword) 63) goto main::@11 +Simple Condition (bool~) main::$18 [246] if((byte) main::ch#1!=rangelast(0,63)) goto main::@10 +Simple Condition (bool~) main::$17 [255] if((byte~) main::$15==(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@12 +Simple Condition (bool~) main::$19 [264] if((byte) main::i#2<(byte/signed byte/word/signed word/dword/signed dword) 5) goto main::@13 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) PROCPORT_DDR#0 = ((byte*))0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 @@ -1097,7 +1097,7 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const byte[]) keyboard_char_keycodes#0 = { KEY_AT#0, KEY_A#0, KEY_B#0, KEY_C#0, KEY_D#0, KEY_E#0, KEY_F#0, KEY_G#0, KEY_H#0, KEY_I#0, KEY_J#0, KEY_K#0, KEY_L#0, KEY_M#0, KEY_N#0, KEY_O#0, KEY_P#0, KEY_Q#0, KEY_R#0, KEY_S#0, KEY_T#0, KEY_U#0, KEY_V#0, KEY_W#0, KEY_X#0, KEY_Y#0, KEY_Z#0, 63, KEY_POUND#0, 63, KEY_ARROW_UP#0, KEY_ARROW_LEFT#0, KEY_SPACE#0, 63, 63, 63, 63, 63, 63, 63, 63, 63, KEY_ASTERISK#0, KEY_PLUS#0, KEY_COMMA#0, KEY_MINUS#0, KEY_DOT#0, KEY_SLASH#0, KEY_0#0, KEY_1#0, KEY_2#0, KEY_3#0, KEY_4#0, KEY_5#0, KEY_6#0, KEY_7#0, KEY_8#0, KEY_9#0, KEY_COLON#0, KEY_SEMICOLON#0, 63, KEY_EQUALS#0, 63, 63 } Constant (const byte) KEY_MODIFIER_SHIFT#0 = KEY_MODIFIER_LSHIFT#0|KEY_MODIFIER_RSHIFT#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@5 +if() condition always true - replacing block destination [22] if(true) goto main::@5 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/test-lowhigh.log b/src/test/ref/test-lowhigh.log index eb1cc011f..b30c4a2bc 100644 --- a/src/test/ref/test-lowhigh.log +++ b/src/test/ref/test-lowhigh.log @@ -680,9 +680,9 @@ Redundant Phi (byte*) print_char_cursor#30 (byte*) print_line_cursor#1 Redundant Phi (byte*) print_line_cursor#16 (byte*) print_line_cursor#14 Redundant Phi (byte*) print_char_cursor#32 (byte*) print_char_cursor#30 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) print_ln::$1 if((byte*) print_line_cursor#1<(byte*) print_char_cursor#12) goto print_ln::@1 -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) main::$31 if((dword) main::dw#1!=(dword/signed dword) 305419920) goto main::@1 +Simple Condition (bool~) print_ln::$1 [8] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#12) goto print_ln::@1 +Simple Condition (bool~) print_cls::$1 [72] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) main::$31 [166] if((dword) main::dw#1!=(dword/signed dword) 305419920) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_line_cursor#0 = ((byte*))1024 Constant (const byte[]) print_hextab#0 = $0 diff --git a/src/test/ref/test-multiply-16bit.log b/src/test/ref/test-multiply-16bit.log index 3ced4ef73..427bc5ae3 100644 --- a/src/test/ref/test-multiply-16bit.log +++ b/src/test/ref/test-multiply-16bit.log @@ -2582,23 +2582,23 @@ SYMBOL TABLE SSA (word) print_word::w#5 (word) print_word::w#6 -Inversing boolean not (bool~) print_sword::$1 ← (signed word) print_sword::w#3 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) print_sword::$0 ← (signed word) print_sword::w#3 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) print_sdword::$1 ← (signed dword) print_sdword::dw#4 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) print_sdword::$0 ← (signed dword) print_sdword::dw#4 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mul16u::$3 ← (byte/word~) mul16u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul16u::$2 ← (byte/word~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mul16s::$4 ← (signed word) mul16s::a#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul16s::$3 ← (signed word) mul16s::a#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mul16s::$10 ← (signed word) mul16s::b#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul16s::$9 ← (signed word) mul16s::b#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mulf_init::$4 ← (byte~) mulf_init::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mulf_init::$3 ← (byte~) mulf_init::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mulf_init::$14 ← (byte) mulf_init::x_255#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mulf_init::$13 ← (byte) mulf_init::x_255#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mulf16s::$4 ← (signed word) mulf16s::a#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mulf16s::$3 ← (signed word) mulf16s::a#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mulf16s::$10 ← (signed word) mulf16s::b#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mulf16s::$9 ← (signed word) mulf16s::b#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) muls16u::$1 ← (word) muls16u::a#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) muls16u::$0 ← (word) muls16u::a#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) muls16s::$2 ← (signed word) muls16s::a#2 <= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) muls16s::$1 ← (signed word) muls16s::a#2 > (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mul16u_compare::$7 ← (dword) mul16u_compare::ms#1 == (dword) mul16u_compare::mf#0 from (bool~) mul16u_compare::$6 ← (dword) mul16u_compare::ms#1 != (dword) mul16u_compare::mf#0 -Inversing boolean not (bool~) mul16u_compare::$9 ← (dword) mul16u_compare::ms#2 == (dword) mul16u_compare::mn#1 from (bool~) mul16u_compare::$8 ← (dword) mul16u_compare::ms#2 != (dword) mul16u_compare::mn#1 -Inversing boolean not (bool~) mul16u_compare::$11 ← (byte) mul16u_compare::ok#3 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul16u_compare::$10 ← (byte) mul16u_compare::ok#3 == (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mul16s_compare::$9 ← (signed dword) mul16s_compare::ms#1 == (signed dword) mul16s_compare::mf#0 from (bool~) mul16s_compare::$8 ← (signed dword) mul16s_compare::ms#1 != (signed dword) mul16s_compare::mf#0 -Inversing boolean not (bool~) mul16s_compare::$11 ← (signed dword) mul16s_compare::ms#2 == (signed dword) mul16s_compare::mn#1 from (bool~) mul16s_compare::$10 ← (signed dword) mul16s_compare::ms#2 != (signed dword) mul16s_compare::mn#1 -Inversing boolean not (bool~) mul16s_compare::$13 ← (byte) mul16s_compare::ok#3 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul16s_compare::$12 ← (byte) mul16s_compare::ok#3 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [28] (bool~) print_sword::$1 ← (signed word) print_sword::w#3 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [27] (bool~) print_sword::$0 ← (signed word) print_sword::w#3 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [76] (bool~) print_sdword::$1 ← (signed dword) print_sdword::dw#4 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [75] (bool~) print_sdword::$0 ← (signed dword) print_sdword::dw#4 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [140] (bool~) mul16u::$3 ← (byte/word~) mul16u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [139] (bool~) mul16u::$2 ← (byte/word~) mul16u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [166] (bool~) mul16s::$4 ← (signed word) mul16s::a#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [165] (bool~) mul16s::$3 ← (signed word) mul16s::a#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [170] (bool~) mul16s::$10 ← (signed word) mul16s::b#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [169] (bool~) mul16s::$9 ← (signed word) mul16s::b#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [208] (bool~) mulf_init::$4 ← (byte~) mulf_init::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [207] (bool~) mulf_init::$3 ← (byte~) mulf_init::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [238] (bool~) mulf_init::$14 ← (byte) mulf_init::x_255#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [237] (bool~) mulf_init::$13 ← (byte) mulf_init::x_255#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [276] (bool~) mulf16s::$4 ← (signed word) mulf16s::a#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [275] (bool~) mulf16s::$3 ← (signed word) mulf16s::a#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [280] (bool~) mulf16s::$10 ← (signed word) mulf16s::b#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [279] (bool~) mulf16s::$9 ← (signed word) mulf16s::b#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [327] (bool~) muls16u::$1 ← (word) muls16u::a#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [326] (bool~) muls16u::$0 ← (word) muls16u::a#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [350] (bool~) muls16s::$2 ← (signed word) muls16s::a#2 <= (byte/signed byte/word/signed word/dword/signed dword) 0 from [349] (bool~) muls16s::$1 ← (signed word) muls16s::a#2 > (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [410] (bool~) mul16u_compare::$7 ← (dword) mul16u_compare::ms#1 == (dword) mul16u_compare::mf#0 from [409] (bool~) mul16u_compare::$6 ← (dword) mul16u_compare::ms#1 != (dword) mul16u_compare::mf#0 +Inversing boolean not [414] (bool~) mul16u_compare::$9 ← (dword) mul16u_compare::ms#2 == (dword) mul16u_compare::mn#1 from [413] (bool~) mul16u_compare::$8 ← (dword) mul16u_compare::ms#2 != (dword) mul16u_compare::mn#1 +Inversing boolean not [420] (bool~) mul16u_compare::$11 ← (byte) mul16u_compare::ok#3 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [419] (bool~) mul16u_compare::$10 ← (byte) mul16u_compare::ok#3 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [549] (bool~) mul16s_compare::$9 ← (signed dword) mul16s_compare::ms#1 == (signed dword) mul16s_compare::mf#0 from [548] (bool~) mul16s_compare::$8 ← (signed dword) mul16s_compare::ms#1 != (signed dword) mul16s_compare::mf#0 +Inversing boolean not [553] (bool~) mul16s_compare::$11 ← (signed dword) mul16s_compare::ms#2 == (signed dword) mul16s_compare::mn#1 from [552] (bool~) mul16s_compare::$10 ← (signed dword) mul16s_compare::ms#2 != (signed dword) mul16s_compare::mn#1 +Inversing boolean not [559] (bool~) mul16s_compare::$13 ← (byte) mul16s_compare::ok#3 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [558] (bool~) mul16s_compare::$12 ← (byte) mul16s_compare::ok#3 == (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) print_line_cursor#0 = (byte*) print_screen#0 (byte*) print_char_cursor#0 (byte*) print_line_cursor#71 (byte*) print_char_cursor#165 (byte*) print_screen#8 (byte*) print_line_cursor#62 (byte*) print_char_cursor#158 (byte*) print_screen#7 (byte*) print_line_cursor#61 (byte*) print_char_cursor#157 (byte*) print_screen#6 (byte*) print_line_cursor#54 (byte*) print_char_cursor#147 (byte*) print_screen#5 Alias (byte*) print_str::str#15 = (byte*) print_str::str#16 @@ -2993,37 +2993,37 @@ Redundant Phi (byte*) print_line_cursor#10 (byte*) print_line_cursor#1 Redundant Phi (byte*) print_char_cursor#111 (byte*) print_line_cursor#1 Redundant Phi (byte*) print_line_cursor#16 (byte*) print_line_cursor#1 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) print_str::$0 if(*((byte*) print_str::str#15)!=(byte) '@') goto print_str::@2 -Simple Condition (bool~) print_ln::$1 if((byte*) print_line_cursor#1<(byte*) print_char_cursor#129) goto print_ln::@1 -Simple Condition (bool~) print_sword::$1 if((signed word) print_sword::w#3>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sword::@1 -Simple Condition (bool~) print_sdword::$1 if((signed dword) print_sdword::dw#4>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sdword::@1 -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) mul16u::$0 if((word) mul16u::a#3!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@2 -Simple Condition (bool~) mul16u::$3 if((byte/word~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 -Simple Condition (bool~) mul16s::$4 if((signed word) mul16s::a#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16s::@1 -Simple Condition (bool~) mul16s::$10 if((signed word) mul16s::b#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16s::@2 -Simple Condition (bool~) mulf_init::$4 if((byte~) mulf_init::$2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf_init::@2 -Simple Condition (bool~) mulf_init::$9 if((byte*) mulf_init::sqr1_lo#1!=(byte*~) mulf_init::$8) goto mulf_init::@1 -Simple Condition (bool~) mulf_init::$14 if((byte) mulf_init::x_255#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf_init::@4 -Simple Condition (bool~) mulf_init::$16 if((byte*) mulf_init::sqr2_lo#1!=(byte*~) mulf_init::$15) goto mulf_init::@3 -Simple Condition (bool~) mulf16s::$4 if((signed word) mulf16s::a#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf16s::@1 -Simple Condition (bool~) mulf16s::$10 if((signed word) mulf16s::b#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf16s::@2 -Simple Condition (bool~) muls16u::$1 if((word) muls16u::a#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto muls16u::@1 -Simple Condition (bool~) muls16u::$3 if((word) muls16u::i#1!=(word) muls16u::a#0) goto muls16u::@2 -Simple Condition (bool~) muls16s::$0 if((signed word) muls16s::a#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto muls16s::@1 -Simple Condition (bool~) muls16s::$2 if((signed word) muls16s::a#0<=(byte/signed byte/word/signed word/dword/signed dword) 0) goto muls16s::@2 -Simple Condition (bool~) muls16s::$4 if((signed word) muls16s::j#1!=(signed word) muls16s::a#0) goto muls16s::@3 -Simple Condition (bool~) muls16s::$6 if((signed word) muls16s::i#1!=(signed word) muls16s::a#0) goto muls16s::@5 -Simple Condition (bool~) mul16u_compare::$7 if((dword) mul16u_compare::ms#0==(dword) mul16u_compare::mf#0) goto mul16u_compare::@3 -Simple Condition (bool~) mul16u_compare::$9 if((dword) mul16u_compare::ms#0==(dword) mul16u_compare::mn#0) goto mul16u_compare::@4 -Simple Condition (bool~) mul16u_compare::$11 if((byte) mul16u_compare::ok#3!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u_compare::@5 -Simple Condition (bool~) mul16u_compare::$13 if((byte) mul16u_compare::j#1!=rangelast(0,15)) goto mul16u_compare::@2 -Simple Condition (bool~) mul16u_compare::$14 if((byte) mul16u_compare::i#1!=rangelast(0,15)) goto mul16u_compare::@1 -Simple Condition (bool~) mul16s_compare::$9 if((signed dword) mul16s_compare::ms#0==(signed dword) mul16s_compare::mf#0) goto mul16s_compare::@3 -Simple Condition (bool~) mul16s_compare::$11 if((signed dword) mul16s_compare::ms#0==(signed dword) mul16s_compare::mn#0) goto mul16s_compare::@4 -Simple Condition (bool~) mul16s_compare::$13 if((byte) mul16s_compare::ok#3!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16s_compare::@5 -Simple Condition (bool~) mul16s_compare::$15 if((byte) mul16s_compare::j#1!=rangelast(0,15)) goto mul16s_compare::@2 -Simple Condition (bool~) mul16s_compare::$16 if((byte) mul16s_compare::i#1!=rangelast(0,15)) goto mul16s_compare::@1 +Simple Condition (bool~) print_str::$0 [6] if(*((byte*) print_str::str#15)!=(byte) '@') goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [19] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#129) goto print_ln::@1 +Simple Condition (bool~) print_sword::$1 [29] if((signed word) print_sword::w#3>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sword::@1 +Simple Condition (bool~) print_sdword::$1 [77] if((signed dword) print_sdword::dw#4>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sdword::@1 +Simple Condition (bool~) print_cls::$1 [123] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) mul16u::$0 [136] if((word) mul16u::a#3!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@2 +Simple Condition (bool~) mul16u::$3 [141] if((byte/word~) mul16u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u::@4 +Simple Condition (bool~) mul16s::$4 [167] if((signed word) mul16s::a#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16s::@1 +Simple Condition (bool~) mul16s::$10 [171] if((signed word) mul16s::b#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16s::@2 +Simple Condition (bool~) mulf_init::$4 [209] if((byte~) mulf_init::$2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf_init::@2 +Simple Condition (bool~) mulf_init::$9 [221] if((byte*) mulf_init::sqr1_lo#1!=(byte*~) mulf_init::$8) goto mulf_init::@1 +Simple Condition (bool~) mulf_init::$14 [239] if((byte) mulf_init::x_255#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf_init::@4 +Simple Condition (bool~) mulf_init::$16 [244] if((byte*) mulf_init::sqr2_lo#1!=(byte*~) mulf_init::$15) goto mulf_init::@3 +Simple Condition (bool~) mulf16s::$4 [277] if((signed word) mulf16s::a#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf16s::@1 +Simple Condition (bool~) mulf16s::$10 [281] if((signed word) mulf16s::b#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf16s::@2 +Simple Condition (bool~) muls16u::$1 [328] if((word) muls16u::a#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto muls16u::@1 +Simple Condition (bool~) muls16u::$3 [338] if((word) muls16u::i#1!=(word) muls16u::a#0) goto muls16u::@2 +Simple Condition (bool~) muls16s::$0 [345] if((signed word) muls16s::a#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto muls16s::@1 +Simple Condition (bool~) muls16s::$2 [351] if((signed word) muls16s::a#0<=(byte/signed byte/word/signed word/dword/signed dword) 0) goto muls16s::@2 +Simple Condition (bool~) muls16s::$4 [360] if((signed word) muls16s::j#1!=(signed word) muls16s::a#0) goto muls16s::@3 +Simple Condition (bool~) muls16s::$6 [368] if((signed word) muls16s::i#1!=(signed word) muls16s::a#0) goto muls16s::@5 +Simple Condition (bool~) mul16u_compare::$7 [411] if((dword) mul16u_compare::ms#0==(dword) mul16u_compare::mf#0) goto mul16u_compare::@3 +Simple Condition (bool~) mul16u_compare::$9 [415] if((dword) mul16u_compare::ms#0==(dword) mul16u_compare::mn#0) goto mul16u_compare::@4 +Simple Condition (bool~) mul16u_compare::$11 [421] if((byte) mul16u_compare::ok#3!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16u_compare::@5 +Simple Condition (bool~) mul16u_compare::$13 [427] if((byte) mul16u_compare::j#1!=rangelast(0,15)) goto mul16u_compare::@2 +Simple Condition (bool~) mul16u_compare::$14 [446] if((byte) mul16u_compare::i#1!=rangelast(0,15)) goto mul16u_compare::@1 +Simple Condition (bool~) mul16s_compare::$9 [550] if((signed dword) mul16s_compare::ms#0==(signed dword) mul16s_compare::mf#0) goto mul16s_compare::@3 +Simple Condition (bool~) mul16s_compare::$11 [554] if((signed dword) mul16s_compare::ms#0==(signed dword) mul16s_compare::mn#0) goto mul16s_compare::@4 +Simple Condition (bool~) mul16s_compare::$13 [560] if((byte) mul16s_compare::ok#3!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul16s_compare::@5 +Simple Condition (bool~) mul16s_compare::$15 [566] if((byte) mul16s_compare::j#1!=rangelast(0,15)) goto mul16s_compare::@2 +Simple Condition (bool~) mul16s_compare::$16 [585] if((byte) mul16s_compare::i#1!=rangelast(0,15)) goto mul16s_compare::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_line_cursor#0 = ((byte*))1024 Constant (const byte) print_char::ch#0 = '-' diff --git a/src/test/ref/test-multiply-8bit.log b/src/test/ref/test-multiply-8bit.log index 4407aff92..52ee12f6f 100644 --- a/src/test/ref/test-multiply-8bit.log +++ b/src/test/ref/test-multiply-8bit.log @@ -2712,23 +2712,23 @@ SYMBOL TABLE SSA (word) print_word::w#6 (word) print_word::w#7 -Inversing boolean not (bool~) print_sword::$1 ← (signed word) print_sword::w#4 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) print_sword::$0 ← (signed word) print_sword::w#4 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mul8s::$4 ← (signed byte) mul8s::a#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul8s::$3 ← (signed byte) mul8s::a#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mul8s::$10 ← (signed byte) mul8s::b#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul8s::$9 ← (signed byte) mul8s::b#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mulf_init::$4 ← (byte~) mulf_init::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mulf_init::$3 ← (byte~) mulf_init::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mulf_init::$14 ← (byte) mulf_init::x_255#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mulf_init::$13 ← (byte) mulf_init::x_255#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mulf8s_prepared::$3 ← *((signed byte*) mulf8s_prepared::memA#0) >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mulf8s_prepared::$2 ← *((signed byte*) mulf8s_prepared::memA#0) < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mulf8s_prepared::$9 ← (signed byte) mulf8s_prepared::b#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mulf8s_prepared::$8 ← (signed byte) mulf8s_prepared::b#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) muls8u::$1 ← (byte) muls8u::a#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) muls8u::$0 ← (byte) muls8u::a#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) muls8s::$2 ← (signed byte) muls8s::a#2 <= (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) muls8s::$1 ← (signed byte) muls8s::a#2 > (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mulf_tables_cmp::$1 ← *((byte*) mulf_tables_cmp::kc_sqr#2) == *((byte*) mulf_tables_cmp::asm_sqr#2) from (bool~) mulf_tables_cmp::$0 ← *((byte*) mulf_tables_cmp::kc_sqr#2) != *((byte*) mulf_tables_cmp::asm_sqr#2) -Inversing boolean not (bool~) mul8u_compare::$4 ← (word) mul8u_compare::ms#1 == (word) mul8u_compare::mf#1 from (bool~) mul8u_compare::$3 ← (word) mul8u_compare::ms#1 != (word) mul8u_compare::mf#1 -Inversing boolean not (bool~) mul8u_compare::$6 ← (word) mul8u_compare::ms#2 == (word) mul8u_compare::mn#1 from (bool~) mul8u_compare::$5 ← (word) mul8u_compare::ms#2 != (word) mul8u_compare::mn#1 -Inversing boolean not (bool~) mul8u_compare::$8 ← (byte) mul8u_compare::ok#3 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul8u_compare::$7 ← (byte) mul8u_compare::ok#3 == (byte/signed byte/word/signed word/dword/signed dword) 0 -Inversing boolean not (bool~) mul8s_compare::$6 ← (signed word) mul8s_compare::ms#1 == (signed word) mul8s_compare::mf#1 from (bool~) mul8s_compare::$5 ← (signed word) mul8s_compare::ms#1 != (signed word) mul8s_compare::mf#1 -Inversing boolean not (bool~) mul8s_compare::$8 ← (signed word) mul8s_compare::ms#2 == (signed word) mul8s_compare::mn#1 from (bool~) mul8s_compare::$7 ← (signed word) mul8s_compare::ms#2 != (signed word) mul8s_compare::mn#1 -Inversing boolean not (bool~) mul8s_compare::$10 ← (byte) mul8s_compare::ok#3 != (byte/signed byte/word/signed word/dword/signed dword) 0 from (bool~) mul8s_compare::$9 ← (byte) mul8s_compare::ok#3 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [28] (bool~) print_sword::$1 ← (signed word) print_sword::w#4 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [27] (bool~) print_sword::$0 ← (signed word) print_sword::w#4 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [130] (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [129] (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [156] (bool~) mul8s::$4 ← (signed byte) mul8s::a#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [155] (bool~) mul8s::$3 ← (signed byte) mul8s::a#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [160] (bool~) mul8s::$10 ← (signed byte) mul8s::b#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [159] (bool~) mul8s::$9 ← (signed byte) mul8s::b#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [198] (bool~) mulf_init::$4 ← (byte~) mulf_init::$2 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [197] (bool~) mulf_init::$3 ← (byte~) mulf_init::$2 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [228] (bool~) mulf_init::$14 ← (byte) mulf_init::x_255#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [227] (bool~) mulf_init::$13 ← (byte) mulf_init::x_255#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [281] (bool~) mulf8s_prepared::$3 ← *((signed byte*) mulf8s_prepared::memA#0) >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [280] (bool~) mulf8s_prepared::$2 ← *((signed byte*) mulf8s_prepared::memA#0) < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [285] (bool~) mulf8s_prepared::$9 ← (signed byte) mulf8s_prepared::b#2 >= (byte/signed byte/word/signed word/dword/signed dword) 0 from [284] (bool~) mulf8s_prepared::$8 ← (signed byte) mulf8s_prepared::b#2 < (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [355] (bool~) muls8u::$1 ← (byte) muls8u::a#1 == (byte/signed byte/word/signed word/dword/signed dword) 0 from [354] (bool~) muls8u::$0 ← (byte) muls8u::a#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [378] (bool~) muls8s::$2 ← (signed byte) muls8s::a#2 <= (byte/signed byte/word/signed word/dword/signed dword) 0 from [377] (bool~) muls8s::$1 ← (signed byte) muls8s::a#2 > (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [417] (bool~) mulf_tables_cmp::$1 ← *((byte*) mulf_tables_cmp::kc_sqr#2) == *((byte*) mulf_tables_cmp::asm_sqr#2) from [416] (bool~) mulf_tables_cmp::$0 ← *((byte*) mulf_tables_cmp::kc_sqr#2) != *((byte*) mulf_tables_cmp::asm_sqr#2) +Inversing boolean not [487] (bool~) mul8u_compare::$4 ← (word) mul8u_compare::ms#1 == (word) mul8u_compare::mf#1 from [486] (bool~) mul8u_compare::$3 ← (word) mul8u_compare::ms#1 != (word) mul8u_compare::mf#1 +Inversing boolean not [491] (bool~) mul8u_compare::$6 ← (word) mul8u_compare::ms#2 == (word) mul8u_compare::mn#1 from [490] (bool~) mul8u_compare::$5 ← (word) mul8u_compare::ms#2 != (word) mul8u_compare::mn#1 +Inversing boolean not [497] (bool~) mul8u_compare::$8 ← (byte) mul8u_compare::ok#3 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [496] (bool~) mul8u_compare::$7 ← (byte) mul8u_compare::ok#3 == (byte/signed byte/word/signed word/dword/signed dword) 0 +Inversing boolean not [612] (bool~) mul8s_compare::$6 ← (signed word) mul8s_compare::ms#1 == (signed word) mul8s_compare::mf#1 from [611] (bool~) mul8s_compare::$5 ← (signed word) mul8s_compare::ms#1 != (signed word) mul8s_compare::mf#1 +Inversing boolean not [616] (bool~) mul8s_compare::$8 ← (signed word) mul8s_compare::ms#2 == (signed word) mul8s_compare::mn#1 from [615] (bool~) mul8s_compare::$7 ← (signed word) mul8s_compare::ms#2 != (signed word) mul8s_compare::mn#1 +Inversing boolean not [622] (bool~) mul8s_compare::$10 ← (byte) mul8s_compare::ok#3 != (byte/signed byte/word/signed word/dword/signed dword) 0 from [621] (bool~) mul8s_compare::$9 ← (byte) mul8s_compare::ok#3 == (byte/signed byte/word/signed word/dword/signed dword) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) print_line_cursor#0 = (byte*) print_screen#0 (byte*) print_char_cursor#0 (byte*) print_line_cursor#89 (byte*) print_char_cursor#176 (byte*) print_screen#9 (byte*) print_line_cursor#78 (byte*) print_char_cursor#171 (byte*) print_screen#8 (byte*) print_line_cursor#67 (byte*) print_char_cursor#163 (byte*) print_screen#7 (byte*) print_line_cursor#66 (byte*) print_char_cursor#162 (byte*) print_screen#6 (byte*) print_line_cursor#56 (byte*) print_char_cursor#151 (byte*) print_screen#5 Alias (byte*) print_str::str#16 = (byte*) print_str::str#17 @@ -3124,39 +3124,39 @@ Redundant Phi (byte*) print_line_cursor#13 (byte*) print_line_cursor#1 Redundant Phi (byte*) print_char_cursor#116 (byte*) print_line_cursor#1 Redundant Phi (byte*) print_line_cursor#18 (byte*) print_line_cursor#1 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) print_str::$0 if(*((byte*) print_str::str#16)!=(byte) '@') goto print_str::@2 -Simple Condition (bool~) print_ln::$1 if((byte*) print_line_cursor#1<(byte*) print_char_cursor#133) goto print_ln::@1 -Simple Condition (bool~) print_sword::$1 if((signed word) print_sword::w#4>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sword::@1 -Simple Condition (bool~) print_sbyte::$0 if((signed byte) print_sbyte::b#3<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte::@1 -Simple Condition (bool~) print_cls::$1 if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 -Simple Condition (bool~) mul8u::$0 if((byte) mul8u::a#3!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@2 -Simple Condition (bool~) mul8u::$3 if((byte~) mul8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@4 -Simple Condition (bool~) mul8s::$4 if((signed byte) mul8s::a#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8s::@1 -Simple Condition (bool~) mul8s::$10 if((signed byte) mul8s::b#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8s::@2 -Simple Condition (bool~) mulf_init::$4 if((byte~) mulf_init::$2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf_init::@2 -Simple Condition (bool~) mulf_init::$9 if((byte*) mulf_init::sqr1_lo#1!=(byte*~) mulf_init::$8) goto mulf_init::@1 -Simple Condition (bool~) mulf_init::$14 if((byte) mulf_init::x_255#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf_init::@4 -Simple Condition (bool~) mulf_init::$16 if((byte*) mulf_init::sqr2_lo#1!=(byte*~) mulf_init::$15) goto mulf_init::@3 -Simple Condition (bool~) mulf8s_prepared::$3 if(*((signed byte*) mulf8s_prepared::memA#0)>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf8s_prepared::@1 -Simple Condition (bool~) mulf8s_prepared::$9 if((signed byte) mulf8s_prepared::b#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf8s_prepared::@2 -Simple Condition (bool~) muls8u::$1 if((byte) muls8u::a#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto muls8u::@1 -Simple Condition (bool~) muls8u::$3 if((byte) muls8u::i#1!=(byte) muls8u::a#0) goto muls8u::@2 -Simple Condition (bool~) muls8s::$0 if((signed byte) muls8s::a#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto muls8s::@1 -Simple Condition (bool~) muls8s::$2 if((signed byte) muls8s::a#0<=(byte/signed byte/word/signed word/dword/signed dword) 0) goto muls8s::@2 -Simple Condition (bool~) muls8s::$4 if((signed byte) muls8s::j#1!=(signed byte) muls8s::a#0) goto muls8s::@3 -Simple Condition (bool~) muls8s::$6 if((signed byte) muls8s::i#1!=(signed byte) muls8s::a#0) goto muls8s::@5 -Simple Condition (bool~) mulf_tables_cmp::$1 if(*((byte*) mulf_tables_cmp::kc_sqr#2)==*((byte*) mulf_tables_cmp::asm_sqr#2)) goto mulf_tables_cmp::@2 -Simple Condition (bool~) mulf_tables_cmp::$10 if((byte*) mulf_tables_cmp::kc_sqr#1<(byte*~) mulf_tables_cmp::$9) goto mulf_tables_cmp::@1 -Simple Condition (bool~) mul8u_compare::$4 if((word) mul8u_compare::ms#0==(word) mul8u_compare::mf#0) goto mul8u_compare::@3 -Simple Condition (bool~) mul8u_compare::$6 if((word) mul8u_compare::ms#0==(word) mul8u_compare::mn#0) goto mul8u_compare::@4 -Simple Condition (bool~) mul8u_compare::$8 if((byte) mul8u_compare::ok#3!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u_compare::@5 -Simple Condition (bool~) mul8u_compare::$10 if((byte) mul8u_compare::b#1!=rangelast(0,255)) goto mul8u_compare::@2 -Simple Condition (bool~) mul8u_compare::$11 if((byte) mul8u_compare::a#1!=rangelast(0,255)) goto mul8u_compare::@1 -Simple Condition (bool~) mul8s_compare::$6 if((signed word) mul8s_compare::ms#0==(signed word) mul8s_compare::mf#0) goto mul8s_compare::@3 -Simple Condition (bool~) mul8s_compare::$8 if((signed word) mul8s_compare::ms#0==(signed word) mul8s_compare::mn#0) goto mul8s_compare::@4 -Simple Condition (bool~) mul8s_compare::$10 if((byte) mul8s_compare::ok#3!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8s_compare::@5 -Simple Condition (bool~) mul8s_compare::$13 if((signed byte) mul8s_compare::b#1!=(signed byte/signed word/signed dword~) mul8s_compare::$12) goto mul8s_compare::@2 -Simple Condition (bool~) mul8s_compare::$15 if((signed byte) mul8s_compare::a#1!=(signed byte/signed word/signed dword~) mul8s_compare::$14) goto mul8s_compare::@1 +Simple Condition (bool~) print_str::$0 [6] if(*((byte*) print_str::str#16)!=(byte) '@') goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [19] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#133) goto print_ln::@1 +Simple Condition (bool~) print_sword::$1 [29] if((signed word) print_sword::w#4>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sword::@1 +Simple Condition (bool~) print_sbyte::$0 [48] if((signed byte) print_sbyte::b#3<(byte/signed byte/word/signed word/dword/signed dword) 0) goto print_sbyte::@1 +Simple Condition (bool~) print_cls::$1 [113] if((byte*) print_cls::sc#1!=(byte*~) print_cls::$0) goto print_cls::@1 +Simple Condition (bool~) mul8u::$0 [126] if((byte) mul8u::a#3!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@2 +Simple Condition (bool~) mul8u::$3 [131] if((byte~) mul8u::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u::@4 +Simple Condition (bool~) mul8s::$4 [157] if((signed byte) mul8s::a#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8s::@1 +Simple Condition (bool~) mul8s::$10 [161] if((signed byte) mul8s::b#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8s::@2 +Simple Condition (bool~) mulf_init::$4 [199] if((byte~) mulf_init::$2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf_init::@2 +Simple Condition (bool~) mulf_init::$9 [211] if((byte*) mulf_init::sqr1_lo#1!=(byte*~) mulf_init::$8) goto mulf_init::@1 +Simple Condition (bool~) mulf_init::$14 [229] if((byte) mulf_init::x_255#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf_init::@4 +Simple Condition (bool~) mulf_init::$16 [234] if((byte*) mulf_init::sqr2_lo#1!=(byte*~) mulf_init::$15) goto mulf_init::@3 +Simple Condition (bool~) mulf8s_prepared::$3 [282] if(*((signed byte*) mulf8s_prepared::memA#0)>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf8s_prepared::@1 +Simple Condition (bool~) mulf8s_prepared::$9 [286] if((signed byte) mulf8s_prepared::b#0>=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf8s_prepared::@2 +Simple Condition (bool~) muls8u::$1 [356] if((byte) muls8u::a#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto muls8u::@1 +Simple Condition (bool~) muls8u::$3 [366] if((byte) muls8u::i#1!=(byte) muls8u::a#0) goto muls8u::@2 +Simple Condition (bool~) muls8s::$0 [373] if((signed byte) muls8s::a#0<(byte/signed byte/word/signed word/dword/signed dword) 0) goto muls8s::@1 +Simple Condition (bool~) muls8s::$2 [379] if((signed byte) muls8s::a#0<=(byte/signed byte/word/signed word/dword/signed dword) 0) goto muls8s::@2 +Simple Condition (bool~) muls8s::$4 [388] if((signed byte) muls8s::j#1!=(signed byte) muls8s::a#0) goto muls8s::@3 +Simple Condition (bool~) muls8s::$6 [396] if((signed byte) muls8s::i#1!=(signed byte) muls8s::a#0) goto muls8s::@5 +Simple Condition (bool~) mulf_tables_cmp::$1 [418] if(*((byte*) mulf_tables_cmp::kc_sqr#2)==*((byte*) mulf_tables_cmp::asm_sqr#2)) goto mulf_tables_cmp::@2 +Simple Condition (bool~) mulf_tables_cmp::$10 [425] if((byte*) mulf_tables_cmp::kc_sqr#1<(byte*~) mulf_tables_cmp::$9) goto mulf_tables_cmp::@1 +Simple Condition (bool~) mul8u_compare::$4 [488] if((word) mul8u_compare::ms#0==(word) mul8u_compare::mf#0) goto mul8u_compare::@3 +Simple Condition (bool~) mul8u_compare::$6 [492] if((word) mul8u_compare::ms#0==(word) mul8u_compare::mn#0) goto mul8u_compare::@4 +Simple Condition (bool~) mul8u_compare::$8 [498] if((byte) mul8u_compare::ok#3!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8u_compare::@5 +Simple Condition (bool~) mul8u_compare::$10 [504] if((byte) mul8u_compare::b#1!=rangelast(0,255)) goto mul8u_compare::@2 +Simple Condition (bool~) mul8u_compare::$11 [523] if((byte) mul8u_compare::a#1!=rangelast(0,255)) goto mul8u_compare::@1 +Simple Condition (bool~) mul8s_compare::$6 [613] if((signed word) mul8s_compare::ms#0==(signed word) mul8s_compare::mf#0) goto mul8s_compare::@3 +Simple Condition (bool~) mul8s_compare::$8 [617] if((signed word) mul8s_compare::ms#0==(signed word) mul8s_compare::mn#0) goto mul8s_compare::@4 +Simple Condition (bool~) mul8s_compare::$10 [623] if((byte) mul8s_compare::ok#3!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mul8s_compare::@5 +Simple Condition (bool~) mul8s_compare::$13 [630] if((signed byte) mul8s_compare::b#1!=(signed byte/signed word/signed dword~) mul8s_compare::$12) goto mul8s_compare::@2 +Simple Condition (bool~) mul8s_compare::$15 [650] if((signed byte) mul8s_compare::a#1!=(signed byte/signed word/signed dword~) mul8s_compare::$14) goto mul8s_compare::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_line_cursor#0 = ((byte*))1024 Constant (const byte) print_char::ch#0 = '-' diff --git a/src/test/ref/true-inline-words.log b/src/test/ref/true-inline-words.log index d612b0e8f..6a3875040 100644 --- a/src/test/ref/true-inline-words.log +++ b/src/test/ref/true-inline-words.log @@ -68,7 +68,7 @@ Successful SSA optimization Pass2CullEmptyBlocks Alias (word) main::w2#0 = (byte/signed byte/word/signed word/dword/signed dword*/word~) main::$1 Alias (byte*) main::bgcol#0 = (byte*) main::bgcol#1 (byte*) main::bgcol#2 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$2 if(*((byte*) main::pos#0)==(byte) 'm') goto main::@1 +Simple Condition (bool~) main::$2 [11] if(*((byte*) main::pos#0)==(byte) 'm') goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte[]) main::bs#0 = { 'c', 'm' } Constant (const byte) main::b#0 = 4 @@ -83,7 +83,7 @@ Fixing inline constructor with main::$5 ← 0 w= 0 Successful SSA optimization Pass2FixInlineConstructors Inferred type updated to word/signed word/dword/signed dword in (word~) main::$3 ← (const byte) main::b#0 w= (byte/signed byte/word/signed word/dword/signed dword) 0 Inferred type updated to word/signed word/dword/signed dword in (word~) main::$4 ← (byte/signed byte/word/signed word/dword/signed dword) 1 w= (byte/signed byte/word/signed word/dword/signed dword) 1 -Inferred type updated to word/signed dword/dword in (byte/signed byte/word/signed word/dword/signed dword*/word~) main::$0 ← (word/signed word/dword/signed dword~) main::$4 + (word) main::w#0 +Inferred type updated to word/signed dword/dword in [1] (byte/signed byte/word/signed word/dword/signed dword*/word~) main::$0 ← (word/signed word/dword/signed dword~) main::$4 + (word) main::w#0 Inferred type updated to byte/signed byte/word/signed word/dword/signed dword in (word~) main::$5 ← (byte/signed byte/word/signed word/dword/signed dword) 0 w= (byte/signed byte/word/signed word/dword/signed dword) 0 Eliminating Noop Cast (byte*) main::sc#0 ← ((byte*)) (word) main::w2#0 Successful SSA optimization Pass2NopCastElimination diff --git a/src/test/ref/typeinference-problem.log b/src/test/ref/typeinference-problem.log index 66c3e448a..b87ee4a03 100644 --- a/src/test/ref/typeinference-problem.log +++ b/src/test/ref/typeinference-problem.log @@ -43,7 +43,7 @@ SYMBOL TABLE SSA Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks -Simple Condition (bool~) main::$1 if((byte) main::i#1!=rangelast(0,128)) goto main::@1 +Simple Condition (bool~) main::$1 [7] if((byte) main::i#1!=rangelast(0,128)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte[256]) table#0 = { fill( 256, 0) } Constant (const byte) main::i#0 = 0 diff --git a/src/test/ref/unroll-loop-modifyvar.log b/src/test/ref/unroll-loop-modifyvar.log index 3e573d99d..f70a81d2e 100644 --- a/src/test/ref/unroll-loop-modifyvar.log +++ b/src/test/ref/unroll-loop-modifyvar.log @@ -58,7 +58,7 @@ Self Phi Eliminated (byte*) main::SCREEN#1 Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) main::SCREEN#1 (byte*) main::SCREEN#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$0 unroll if((byte) main::a#1<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1 +Simple Condition (bool~) main::$0 [6] unroll if((byte) main::a#1<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::SCREEN#0 = ((byte*))1024 Constant (const byte) main::a#0 = 3 @@ -73,7 +73,7 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in *(main::SCREEN#0+main::a#0) Successful SSA optimization Pass2ConstantAdditionElimination Removing PHI-reference to removed block (main::@1) in block main::@2 -if() condition always true - replacing block destination [3] if((const byte) main::a#1<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_1 +if() condition always true - replacing block destination [1] if((const byte) main::a#1<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_1 Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#4 = (byte) main::a#6 Successful SSA optimization Pass2AliasElimination @@ -87,7 +87,7 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in *(main::SCREEN#0+main::a#1) Successful SSA optimization Pass2ConstantAdditionElimination Removing PHI-reference to removed block (main::@1_1) in block main::@2 -if() condition always true - replacing block destination [5] if((const byte) main::a#4<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_2 +if() condition always true - replacing block destination [3] if((const byte) main::a#4<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_2 Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#7 = (byte) main::a#9 Successful SSA optimization Pass2AliasElimination @@ -101,7 +101,7 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in *(main::SCREEN#0+main::a#4) Successful SSA optimization Pass2ConstantAdditionElimination Removing PHI-reference to removed block (main::@1_2) in block main::@2 -if() condition always true - replacing block destination [6] if((const byte) main::a#7<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_3 +if() condition always true - replacing block destination [4] if((const byte) main::a#7<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_3 Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#10 = (byte) main::a#12 Successful SSA optimization Pass2AliasElimination @@ -115,7 +115,7 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in *(main::SCREEN#0+main::a#7) Successful SSA optimization Pass2ConstantAdditionElimination Removing PHI-reference to removed block (main::@1_3) in block main::@2 -if() condition always true - replacing block destination [7] if((const byte) main::a#10<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_4 +if() condition always true - replacing block destination [5] if((const byte) main::a#10<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_4 Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#13 = (byte) main::a#15 Successful SSA optimization Pass2AliasElimination @@ -129,7 +129,7 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in *(main::SCREEN#0+main::a#10) Successful SSA optimization Pass2ConstantAdditionElimination Removing PHI-reference to removed block (main::@1_4) in block main::@2 -if() condition always true - replacing block destination [8] if((const byte) main::a#13<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_5 +if() condition always true - replacing block destination [6] if((const byte) main::a#13<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_5 Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#16 = (byte) main::a#18 Successful SSA optimization Pass2AliasElimination @@ -143,7 +143,7 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in *(main::SCREEN#0+main::a#13) Successful SSA optimization Pass2ConstantAdditionElimination Removing PHI-reference to removed block (main::@1_5) in block main::@2 -if() condition always true - replacing block destination [9] if((const byte) main::a#16<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_6 +if() condition always true - replacing block destination [7] if((const byte) main::a#16<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_6 Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#19 = (byte) main::a#21 Successful SSA optimization Pass2AliasElimination @@ -157,7 +157,7 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in *(main::SCREEN#0+main::a#16) Successful SSA optimization Pass2ConstantAdditionElimination Removing PHI-reference to removed block (main::@1_6) in block main::@2 -if() condition always true - replacing block destination [10] if((const byte) main::a#19<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_7 +if() condition always true - replacing block destination [8] if((const byte) main::a#19<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_7 Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#22 = (byte) main::a#24 Successful SSA optimization Pass2AliasElimination @@ -171,7 +171,7 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in *(main::SCREEN#0+main::a#19) Successful SSA optimization Pass2ConstantAdditionElimination Removing PHI-reference to removed block (main::@1_7) in block main::@2 -if() condition always true - replacing block destination [11] if((const byte) main::a#22<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_8 +if() condition always true - replacing block destination [9] if((const byte) main::a#22<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_8 Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#25 = (byte) main::a#27 Successful SSA optimization Pass2AliasElimination @@ -185,7 +185,7 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in *(main::SCREEN#0+main::a#22) Successful SSA optimization Pass2ConstantAdditionElimination Removing PHI-reference to removed block (main::@1_8) in block main::@2 -if() condition always true - replacing block destination [12] if((const byte) main::a#25<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_9 +if() condition always true - replacing block destination [10] if((const byte) main::a#25<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_9 Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#28 = (byte) main::a#30 Successful SSA optimization Pass2AliasElimination @@ -199,7 +199,7 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in *(main::SCREEN#0+main::a#25) Successful SSA optimization Pass2ConstantAdditionElimination Removing PHI-reference to removed block (main::@1_9) in block main::@2 -if() condition always true - replacing block destination [13] if((const byte) main::a#28<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_10 +if() condition always true - replacing block destination [11] if((const byte) main::a#28<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_10 Successful SSA optimization Pass2ConstantIfs Alias (byte) main::a#31 = (byte) main::a#33 Successful SSA optimization Pass2AliasElimination @@ -213,7 +213,7 @@ Successful SSA optimization Pass2ConstantIdentification Consolidated array index constant in *(main::SCREEN#0+main::a#28) Successful SSA optimization Pass2ConstantAdditionElimination Removing PHI-reference to removed block (main::@1_10) in block main::@1_11 -if() condition always false - eliminating [14] if((const byte) main::a#31<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_11 +if() condition always false - eliminating [12] if((const byte) main::a#31<(byte/signed byte/word/signed word/dword/signed dword) 14) goto main::@1_11 Successful SSA optimization Pass2ConstantIfs Eliminating variable (byte) main::a#35 from unused block main::@1_11 Eliminating variable (byte) main::a#36 from unused block main::@1_11 diff --git a/src/test/ref/unroll-screenfill-for-double.log b/src/test/ref/unroll-screenfill-for-double.log index b452f3542..f6b4f6096 100644 --- a/src/test/ref/unroll-screenfill-for-double.log +++ b/src/test/ref/unroll-screenfill-for-double.log @@ -80,8 +80,8 @@ Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) main::SCREEN#1 (byte*) main::SCREEN#2 Redundant Phi (byte) main::x#2 (byte) main::x#4 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$2 unroll if((byte) main::line#1!=rangelast(0,10)) goto main::@2 -Simple Condition (bool~) main::$3 unroll if((byte) main::x#1!=rangelast(0,10)) goto main::@1 +Simple Condition (bool~) main::$2 [10] unroll if((byte) main::line#1!=rangelast(0,10)) goto main::@2 +Simple Condition (bool~) main::$3 [14] unroll if((byte) main::x#1!=rangelast(0,10)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::SCREEN#0 = ((byte*))1024 Constant (const byte) main::x#0 = 0 @@ -104,7 +104,7 @@ Constant (const byte) main::line#1 = ++main::line#0 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$1 = main::SCREEN#0+main::$0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [6] if((const byte) main::line#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_1 +if() condition always true - replacing block destination [2] if((const byte) main::line#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_1 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_1 tails: main::@2_1 blocks: main::@2_1 Successful SSA optimization Pass2LoopUnroll @@ -115,7 +115,7 @@ Constant (const byte) main::line#4 = ++main::line#1 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$5 = main::SCREEN#0+main::$4 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [8] if((const byte) main::line#4!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_2 +if() condition always true - replacing block destination [4] if((const byte) main::line#4!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_2 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_2 tails: main::@2_2 blocks: main::@2_2 Successful SSA optimization Pass2LoopUnroll @@ -126,7 +126,7 @@ Constant (const byte) main::line#6 = ++main::line#4 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$7 = main::SCREEN#0+main::$6 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [9] if((const byte) main::line#6!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_3 +if() condition always true - replacing block destination [5] if((const byte) main::line#6!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_3 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_3 tails: main::@2_3 blocks: main::@2_3 Successful SSA optimization Pass2LoopUnroll @@ -137,7 +137,7 @@ Constant (const byte) main::line#8 = ++main::line#6 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$9 = main::SCREEN#0+main::$8 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [10] if((const byte) main::line#8!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_4 +if() condition always true - replacing block destination [6] if((const byte) main::line#8!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_4 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_4 tails: main::@2_4 blocks: main::@2_4 Successful SSA optimization Pass2LoopUnroll @@ -148,7 +148,7 @@ Constant (const byte) main::line#10 = ++main::line#8 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$11 = main::SCREEN#0+main::$10 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [11] if((const byte) main::line#10!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_5 +if() condition always true - replacing block destination [7] if((const byte) main::line#10!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_5 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_5 tails: main::@2_5 blocks: main::@2_5 Successful SSA optimization Pass2LoopUnroll @@ -159,7 +159,7 @@ Constant (const byte) main::line#12 = ++main::line#10 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$13 = main::SCREEN#0+main::$12 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [12] if((const byte) main::line#12!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_6 +if() condition always true - replacing block destination [8] if((const byte) main::line#12!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_6 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_6 tails: main::@2_6 blocks: main::@2_6 Successful SSA optimization Pass2LoopUnroll @@ -170,7 +170,7 @@ Constant (const byte) main::line#14 = ++main::line#12 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$15 = main::SCREEN#0+main::$14 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [13] if((const byte) main::line#14!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_7 +if() condition always true - replacing block destination [9] if((const byte) main::line#14!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_7 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_7 tails: main::@2_7 blocks: main::@2_7 Successful SSA optimization Pass2LoopUnroll @@ -181,7 +181,7 @@ Constant (const byte) main::line#16 = ++main::line#14 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$17 = main::SCREEN#0+main::$16 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [14] if((const byte) main::line#16!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_8 +if() condition always true - replacing block destination [10] if((const byte) main::line#16!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_8 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_8 tails: main::@2_8 blocks: main::@2_8 Successful SSA optimization Pass2LoopUnroll @@ -192,7 +192,7 @@ Constant (const byte) main::line#18 = ++main::line#16 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$19 = main::SCREEN#0+main::$18 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [15] if((const byte) main::line#18!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_9 +if() condition always true - replacing block destination [11] if((const byte) main::line#18!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_9 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_9 tails: main::@2_9 blocks: main::@2_9 Successful SSA optimization Pass2LoopUnroll @@ -203,7 +203,7 @@ Constant (const byte) main::line#20 = ++main::line#18 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$21 = main::SCREEN#0+main::$20 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [16] if((const byte) main::line#20!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_10 +if() condition always true - replacing block destination [12] if((const byte) main::line#20!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_10 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_10 tails: main::@2_10 blocks: main::@2_10 Successful SSA optimization Pass2LoopUnroll @@ -215,7 +215,7 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$23 = main::SCREEN#0+main::$22 Successful SSA optimization Pass2ConstantIdentification Removing PHI-reference to removed block (main::@2_10) in block main::@2_11 -if() condition always false - eliminating [17] if((const byte) main::line#22!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_11 +if() condition always false - eliminating [13] if((const byte) main::line#22!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@2_11 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Eliminating variable (byte) main::line#23 from unused block main::@2_11 @@ -242,7 +242,7 @@ Consolidated array index constant in *(main::$19+main::x#0) Consolidated array index constant in *(main::$21+main::x#0) Consolidated array index constant in *(main::$23+main::x#0) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination [14] if((const byte) main::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_1 +if() condition always true - replacing block destination [12] if((const byte) main::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_1 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@1 Culled Empty Block (label) main::@3 @@ -265,7 +265,7 @@ Consolidated array index constant in *(main::$19+main::x#1) Consolidated array index constant in *(main::$21+main::x#1) Consolidated array index constant in *(main::$23+main::x#1) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination [25] if((const byte) main::x#6!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_2 +if() condition always true - replacing block destination [23] if((const byte) main::x#6!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_2 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@1_1 Culled Empty Block (label) main::@3_1 @@ -288,7 +288,7 @@ Consolidated array index constant in *(main::$19+main::x#6) Consolidated array index constant in *(main::$21+main::x#6) Consolidated array index constant in *(main::$23+main::x#6) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination [36] if((const byte) main::x#8!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_1 +if() condition always true - replacing block destination [34] if((const byte) main::x#8!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_1 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@1_2 Culled Empty Block (label) main::@3_2 @@ -311,7 +311,7 @@ Consolidated array index constant in *(main::$19+main::x#8) Consolidated array index constant in *(main::$21+main::x#8) Consolidated array index constant in *(main::$23+main::x#8) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination [47] if((const byte) main::x#10!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_2 +if() condition always true - replacing block destination [45] if((const byte) main::x#10!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_2 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@1_1 Culled Empty Block (label) main::@3_1 @@ -334,7 +334,7 @@ Consolidated array index constant in *(main::$19+main::x#10) Consolidated array index constant in *(main::$21+main::x#10) Consolidated array index constant in *(main::$23+main::x#10) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination [58] if((const byte) main::x#12!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_1 +if() condition always true - replacing block destination [56] if((const byte) main::x#12!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_1 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@1_2 Culled Empty Block (label) main::@3_2 @@ -357,7 +357,7 @@ Consolidated array index constant in *(main::$19+main::x#12) Consolidated array index constant in *(main::$21+main::x#12) Consolidated array index constant in *(main::$23+main::x#12) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination [69] if((const byte) main::x#14!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_2 +if() condition always true - replacing block destination [67] if((const byte) main::x#14!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_2 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@1_1 Culled Empty Block (label) main::@3_1 @@ -380,7 +380,7 @@ Consolidated array index constant in *(main::$19+main::x#14) Consolidated array index constant in *(main::$21+main::x#14) Consolidated array index constant in *(main::$23+main::x#14) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination [80] if((const byte) main::x#16!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_1 +if() condition always true - replacing block destination [78] if((const byte) main::x#16!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_1 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@1_2 Culled Empty Block (label) main::@3_2 @@ -403,7 +403,7 @@ Consolidated array index constant in *(main::$19+main::x#16) Consolidated array index constant in *(main::$21+main::x#16) Consolidated array index constant in *(main::$23+main::x#16) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination [91] if((const byte) main::x#18!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_2 +if() condition always true - replacing block destination [89] if((const byte) main::x#18!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_2 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@1_1 Culled Empty Block (label) main::@3_1 @@ -426,7 +426,7 @@ Consolidated array index constant in *(main::$19+main::x#18) Consolidated array index constant in *(main::$21+main::x#18) Consolidated array index constant in *(main::$23+main::x#18) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination [102] if((const byte) main::x#20!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_1 +if() condition always true - replacing block destination [100] if((const byte) main::x#20!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_1 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@1_2 Culled Empty Block (label) main::@3_2 @@ -449,7 +449,7 @@ Consolidated array index constant in *(main::$19+main::x#20) Consolidated array index constant in *(main::$21+main::x#20) Consolidated array index constant in *(main::$23+main::x#20) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination [113] if((const byte) main::x#22!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_2 +if() condition always true - replacing block destination [111] if((const byte) main::x#22!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_2 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@1_1 Culled Empty Block (label) main::@3_1 @@ -473,7 +473,7 @@ Consolidated array index constant in *(main::$21+main::x#22) Consolidated array index constant in *(main::$23+main::x#22) Successful SSA optimization Pass2ConstantAdditionElimination Removing PHI-reference to removed block (main::@3_2) in block main::@1_1 -if() condition always false - eliminating [124] if((const byte) main::x#24!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_1 +if() condition always false - eliminating [122] if((const byte) main::x#24!=(byte/signed byte/word/signed word/dword/signed dword) 11) goto main::@1_1 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Eliminating variable (byte) main::x#25 from unused block main::@1_1 diff --git a/src/test/ref/unroll-screenfill-for.log b/src/test/ref/unroll-screenfill-for.log index 1618e446f..1218fa4d4 100644 --- a/src/test/ref/unroll-screenfill-for.log +++ b/src/test/ref/unroll-screenfill-for.log @@ -80,8 +80,8 @@ Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) main::SCREEN#1 (byte*) main::SCREEN#2 Redundant Phi (byte) main::x#2 (byte) main::x#4 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$2 unroll if((byte) main::line#1!=rangelast(0,24)) goto main::@2 -Simple Condition (bool~) main::$3 if((byte) main::x#1!=rangelast(0,39)) goto main::@1 +Simple Condition (bool~) main::$2 [10] unroll if((byte) main::line#1!=rangelast(0,24)) goto main::@2 +Simple Condition (bool~) main::$3 [14] if((byte) main::x#1!=rangelast(0,39)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::SCREEN#0 = ((byte*))1024 Constant (const byte) main::x#0 = 0 @@ -104,7 +104,7 @@ Constant (const byte) main::line#1 = ++main::line#0 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$1 = main::SCREEN#0+main::$0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [6] if((const byte) main::line#1!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_1 +if() condition always true - replacing block destination [2] if((const byte) main::line#1!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_1 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_1 tails: main::@2_1 blocks: main::@2_1 Successful SSA optimization Pass2LoopUnroll @@ -115,7 +115,7 @@ Constant (const byte) main::line#4 = ++main::line#1 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$5 = main::SCREEN#0+main::$4 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [8] if((const byte) main::line#4!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_2 +if() condition always true - replacing block destination [4] if((const byte) main::line#4!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_2 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_2 tails: main::@2_2 blocks: main::@2_2 Successful SSA optimization Pass2LoopUnroll @@ -126,7 +126,7 @@ Constant (const byte) main::line#6 = ++main::line#4 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$7 = main::SCREEN#0+main::$6 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [9] if((const byte) main::line#6!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_3 +if() condition always true - replacing block destination [5] if((const byte) main::line#6!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_3 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_3 tails: main::@2_3 blocks: main::@2_3 Successful SSA optimization Pass2LoopUnroll @@ -137,7 +137,7 @@ Constant (const byte) main::line#8 = ++main::line#6 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$9 = main::SCREEN#0+main::$8 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [10] if((const byte) main::line#8!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_4 +if() condition always true - replacing block destination [6] if((const byte) main::line#8!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_4 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_4 tails: main::@2_4 blocks: main::@2_4 Successful SSA optimization Pass2LoopUnroll @@ -148,7 +148,7 @@ Constant (const byte) main::line#10 = ++main::line#8 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$11 = main::SCREEN#0+main::$10 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [11] if((const byte) main::line#10!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_5 +if() condition always true - replacing block destination [7] if((const byte) main::line#10!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_5 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_5 tails: main::@2_5 blocks: main::@2_5 Successful SSA optimization Pass2LoopUnroll @@ -159,7 +159,7 @@ Constant (const byte) main::line#12 = ++main::line#10 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$13 = main::SCREEN#0+main::$12 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [12] if((const byte) main::line#12!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_6 +if() condition always true - replacing block destination [8] if((const byte) main::line#12!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_6 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_6 tails: main::@2_6 blocks: main::@2_6 Successful SSA optimization Pass2LoopUnroll @@ -170,7 +170,7 @@ Constant (const byte) main::line#14 = ++main::line#12 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$15 = main::SCREEN#0+main::$14 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [13] if((const byte) main::line#14!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_7 +if() condition always true - replacing block destination [9] if((const byte) main::line#14!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_7 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_7 tails: main::@2_7 blocks: main::@2_7 Successful SSA optimization Pass2LoopUnroll @@ -181,7 +181,7 @@ Constant (const byte) main::line#16 = ++main::line#14 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$17 = main::SCREEN#0+main::$16 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [14] if((const byte) main::line#16!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_8 +if() condition always true - replacing block destination [10] if((const byte) main::line#16!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_8 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_8 tails: main::@2_8 blocks: main::@2_8 Successful SSA optimization Pass2LoopUnroll @@ -192,7 +192,7 @@ Constant (const byte) main::line#18 = ++main::line#16 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$19 = main::SCREEN#0+main::$18 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [15] if((const byte) main::line#18!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_9 +if() condition always true - replacing block destination [11] if((const byte) main::line#18!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_9 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_9 tails: main::@2_9 blocks: main::@2_9 Successful SSA optimization Pass2LoopUnroll @@ -203,7 +203,7 @@ Constant (const byte) main::line#20 = ++main::line#18 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$21 = main::SCREEN#0+main::$20 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [16] if((const byte) main::line#20!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_10 +if() condition always true - replacing block destination [12] if((const byte) main::line#20!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_10 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_10 tails: main::@2_10 blocks: main::@2_10 Successful SSA optimization Pass2LoopUnroll @@ -214,7 +214,7 @@ Constant (const byte) main::line#22 = ++main::line#20 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$23 = main::SCREEN#0+main::$22 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [17] if((const byte) main::line#22!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_11 +if() condition always true - replacing block destination [13] if((const byte) main::line#22!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_11 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_11 tails: main::@2_11 blocks: main::@2_11 Successful SSA optimization Pass2LoopUnroll @@ -225,7 +225,7 @@ Constant (const byte) main::line#24 = ++main::line#22 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$25 = main::SCREEN#0+main::$24 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [18] if((const byte) main::line#24!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_12 +if() condition always true - replacing block destination [14] if((const byte) main::line#24!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_12 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_12 tails: main::@2_12 blocks: main::@2_12 Successful SSA optimization Pass2LoopUnroll @@ -236,7 +236,7 @@ Constant (const byte) main::line#26 = ++main::line#24 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$27 = main::SCREEN#0+main::$26 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [19] if((const byte) main::line#26!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_13 +if() condition always true - replacing block destination [15] if((const byte) main::line#26!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_13 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_13 tails: main::@2_13 blocks: main::@2_13 Successful SSA optimization Pass2LoopUnroll @@ -247,7 +247,7 @@ Constant (const byte) main::line#28 = ++main::line#26 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$29 = main::SCREEN#0+main::$28 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [20] if((const byte) main::line#28!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_14 +if() condition always true - replacing block destination [16] if((const byte) main::line#28!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_14 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_14 tails: main::@2_14 blocks: main::@2_14 Successful SSA optimization Pass2LoopUnroll @@ -258,7 +258,7 @@ Constant (const byte) main::line#30 = ++main::line#28 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$31 = main::SCREEN#0+main::$30 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [21] if((const byte) main::line#30!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_15 +if() condition always true - replacing block destination [17] if((const byte) main::line#30!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_15 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_15 tails: main::@2_15 blocks: main::@2_15 Successful SSA optimization Pass2LoopUnroll @@ -269,7 +269,7 @@ Constant (const byte) main::line#32 = ++main::line#30 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$33 = main::SCREEN#0+main::$32 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [22] if((const byte) main::line#32!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_16 +if() condition always true - replacing block destination [18] if((const byte) main::line#32!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_16 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_16 tails: main::@2_16 blocks: main::@2_16 Successful SSA optimization Pass2LoopUnroll @@ -280,7 +280,7 @@ Constant (const byte) main::line#34 = ++main::line#32 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$35 = main::SCREEN#0+main::$34 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [23] if((const byte) main::line#34!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_17 +if() condition always true - replacing block destination [19] if((const byte) main::line#34!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_17 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_17 tails: main::@2_17 blocks: main::@2_17 Successful SSA optimization Pass2LoopUnroll @@ -291,7 +291,7 @@ Constant (const byte) main::line#36 = ++main::line#34 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$37 = main::SCREEN#0+main::$36 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [24] if((const byte) main::line#36!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_18 +if() condition always true - replacing block destination [20] if((const byte) main::line#36!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_18 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_18 tails: main::@2_18 blocks: main::@2_18 Successful SSA optimization Pass2LoopUnroll @@ -302,7 +302,7 @@ Constant (const byte) main::line#38 = ++main::line#36 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$39 = main::SCREEN#0+main::$38 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [25] if((const byte) main::line#38!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_19 +if() condition always true - replacing block destination [21] if((const byte) main::line#38!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_19 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_19 tails: main::@2_19 blocks: main::@2_19 Successful SSA optimization Pass2LoopUnroll @@ -313,7 +313,7 @@ Constant (const byte) main::line#40 = ++main::line#38 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$41 = main::SCREEN#0+main::$40 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [26] if((const byte) main::line#40!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_20 +if() condition always true - replacing block destination [22] if((const byte) main::line#40!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_20 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_20 tails: main::@2_20 blocks: main::@2_20 Successful SSA optimization Pass2LoopUnroll @@ -324,7 +324,7 @@ Constant (const byte) main::line#42 = ++main::line#40 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$43 = main::SCREEN#0+main::$42 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [27] if((const byte) main::line#42!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_21 +if() condition always true - replacing block destination [23] if((const byte) main::line#42!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_21 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_21 tails: main::@2_21 blocks: main::@2_21 Successful SSA optimization Pass2LoopUnroll @@ -335,7 +335,7 @@ Constant (const byte) main::line#44 = ++main::line#42 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$45 = main::SCREEN#0+main::$44 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [28] if((const byte) main::line#44!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_22 +if() condition always true - replacing block destination [24] if((const byte) main::line#44!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_22 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_22 tails: main::@2_22 blocks: main::@2_22 Successful SSA optimization Pass2LoopUnroll @@ -346,7 +346,7 @@ Constant (const byte) main::line#46 = ++main::line#44 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$47 = main::SCREEN#0+main::$46 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [29] if((const byte) main::line#46!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_23 +if() condition always true - replacing block destination [25] if((const byte) main::line#46!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_23 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_23 tails: main::@2_23 blocks: main::@2_23 Successful SSA optimization Pass2LoopUnroll @@ -357,7 +357,7 @@ Constant (const byte) main::line#48 = ++main::line#46 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$49 = main::SCREEN#0+main::$48 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [30] if((const byte) main::line#48!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_24 +if() condition always true - replacing block destination [26] if((const byte) main::line#48!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_24 Successful SSA optimization Pass2ConstantIfs Unrolling loop Loop head: main::@2_24 tails: main::@2_24 blocks: main::@2_24 Successful SSA optimization Pass2LoopUnroll @@ -369,7 +369,7 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$51 = main::SCREEN#0+main::$50 Successful SSA optimization Pass2ConstantIdentification Removing PHI-reference to removed block (main::@2_24) in block main::@2_25 -if() condition always false - eliminating [31] if((const byte) main::line#50!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_25 +if() condition always false - eliminating [27] if((const byte) main::line#50!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@2_25 Successful SSA optimization Pass2ConstantIfs Successful SSA optimization PassNEliminateUnusedVars Eliminating variable (byte) main::line#51 from unused block main::@2_25 diff --git a/src/test/ref/unroll-screenfill-while.log b/src/test/ref/unroll-screenfill-while.log index 8de45fc76..193a660e4 100644 --- a/src/test/ref/unroll-screenfill-while.log +++ b/src/test/ref/unroll-screenfill-while.log @@ -90,8 +90,8 @@ Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) main::SCREEN#1 (byte*) main::SCREEN#3 Redundant Phi (byte) main::x#2 (byte) main::x#5 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$0 unroll if((byte) main::line#2!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3 -Simple Condition (bool~) main::$3 if((byte) main::x#1!=rangelast(0,39)) goto main::@1 +Simple Condition (bool~) main::$0 [6] unroll if((byte) main::line#2!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3 +Simple Condition (bool~) main::$3 [15] if((byte) main::x#1!=rangelast(0,39)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::SCREEN#0 = ((byte*))1024 Constant (const byte) main::x#0 = 0 @@ -112,7 +112,7 @@ Constant (const byte) main::line#1 = ++main::line#0 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$2 = main::SCREEN#0+main::$1 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [2] if((const byte) main::line#0!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3 +if() condition always true - replacing block destination [1] if((const byte) main::line#0!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2 Successful SSA optimization Pass2CullEmptyBlocks @@ -125,7 +125,7 @@ Constant (const byte) main::line#5 = ++main::line#1 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$5 = main::SCREEN#0+main::$4 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [4] if((const byte) main::line#1!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_1 +if() condition always true - replacing block destination [3] if((const byte) main::line#1!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_1 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_1 Successful SSA optimization Pass2CullEmptyBlocks @@ -138,7 +138,7 @@ Constant (const byte) main::line#7 = ++main::line#5 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$7 = main::SCREEN#0+main::$6 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [5] if((const byte) main::line#5!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_2 +if() condition always true - replacing block destination [4] if((const byte) main::line#5!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_2 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_2 Successful SSA optimization Pass2CullEmptyBlocks @@ -151,7 +151,7 @@ Constant (const byte) main::line#9 = ++main::line#7 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$9 = main::SCREEN#0+main::$8 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [6] if((const byte) main::line#7!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_3 +if() condition always true - replacing block destination [5] if((const byte) main::line#7!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_3 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_1 Successful SSA optimization Pass2CullEmptyBlocks @@ -164,7 +164,7 @@ Constant (const byte) main::line#11 = ++main::line#9 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$11 = main::SCREEN#0+main::$10 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [7] if((const byte) main::line#9!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_4 +if() condition always true - replacing block destination [6] if((const byte) main::line#9!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_4 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_2 Successful SSA optimization Pass2CullEmptyBlocks @@ -177,7 +177,7 @@ Constant (const byte) main::line#13 = ++main::line#11 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$13 = main::SCREEN#0+main::$12 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [8] if((const byte) main::line#11!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_5 +if() condition always true - replacing block destination [7] if((const byte) main::line#11!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_5 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_1 Successful SSA optimization Pass2CullEmptyBlocks @@ -190,7 +190,7 @@ Constant (const byte) main::line#15 = ++main::line#13 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$15 = main::SCREEN#0+main::$14 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [9] if((const byte) main::line#13!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_6 +if() condition always true - replacing block destination [8] if((const byte) main::line#13!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_6 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_2 Successful SSA optimization Pass2CullEmptyBlocks @@ -203,7 +203,7 @@ Constant (const byte) main::line#17 = ++main::line#15 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$17 = main::SCREEN#0+main::$16 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [10] if((const byte) main::line#15!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_7 +if() condition always true - replacing block destination [9] if((const byte) main::line#15!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_7 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_1 Successful SSA optimization Pass2CullEmptyBlocks @@ -216,7 +216,7 @@ Constant (const byte) main::line#19 = ++main::line#17 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$19 = main::SCREEN#0+main::$18 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [11] if((const byte) main::line#17!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_8 +if() condition always true - replacing block destination [10] if((const byte) main::line#17!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_8 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_2 Successful SSA optimization Pass2CullEmptyBlocks @@ -229,7 +229,7 @@ Constant (const byte) main::line#21 = ++main::line#19 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$21 = main::SCREEN#0+main::$20 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [12] if((const byte) main::line#19!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_9 +if() condition always true - replacing block destination [11] if((const byte) main::line#19!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_9 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_1 Successful SSA optimization Pass2CullEmptyBlocks @@ -242,7 +242,7 @@ Constant (const byte) main::line#23 = ++main::line#21 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$23 = main::SCREEN#0+main::$22 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [13] if((const byte) main::line#21!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_10 +if() condition always true - replacing block destination [12] if((const byte) main::line#21!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_10 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_2 Successful SSA optimization Pass2CullEmptyBlocks @@ -255,7 +255,7 @@ Constant (const byte) main::line#25 = ++main::line#23 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$25 = main::SCREEN#0+main::$24 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [14] if((const byte) main::line#23!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_11 +if() condition always true - replacing block destination [13] if((const byte) main::line#23!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_11 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_1 Successful SSA optimization Pass2CullEmptyBlocks @@ -268,7 +268,7 @@ Constant (const byte) main::line#27 = ++main::line#25 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$27 = main::SCREEN#0+main::$26 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [15] if((const byte) main::line#25!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_12 +if() condition always true - replacing block destination [14] if((const byte) main::line#25!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_12 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_2 Successful SSA optimization Pass2CullEmptyBlocks @@ -281,7 +281,7 @@ Constant (const byte) main::line#29 = ++main::line#27 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$29 = main::SCREEN#0+main::$28 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [16] if((const byte) main::line#27!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_13 +if() condition always true - replacing block destination [15] if((const byte) main::line#27!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_13 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_1 Successful SSA optimization Pass2CullEmptyBlocks @@ -294,7 +294,7 @@ Constant (const byte) main::line#31 = ++main::line#29 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$31 = main::SCREEN#0+main::$30 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [17] if((const byte) main::line#29!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_14 +if() condition always true - replacing block destination [16] if((const byte) main::line#29!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_14 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_2 Successful SSA optimization Pass2CullEmptyBlocks @@ -307,7 +307,7 @@ Constant (const byte) main::line#33 = ++main::line#31 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$33 = main::SCREEN#0+main::$32 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [18] if((const byte) main::line#31!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_15 +if() condition always true - replacing block destination [17] if((const byte) main::line#31!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_15 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_1 Successful SSA optimization Pass2CullEmptyBlocks @@ -320,7 +320,7 @@ Constant (const byte) main::line#35 = ++main::line#33 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$35 = main::SCREEN#0+main::$34 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [19] if((const byte) main::line#33!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_16 +if() condition always true - replacing block destination [18] if((const byte) main::line#33!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_16 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_2 Successful SSA optimization Pass2CullEmptyBlocks @@ -333,7 +333,7 @@ Constant (const byte) main::line#37 = ++main::line#35 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$37 = main::SCREEN#0+main::$36 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [20] if((const byte) main::line#35!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_17 +if() condition always true - replacing block destination [19] if((const byte) main::line#35!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_17 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_1 Successful SSA optimization Pass2CullEmptyBlocks @@ -346,7 +346,7 @@ Constant (const byte) main::line#39 = ++main::line#37 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$39 = main::SCREEN#0+main::$38 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [21] if((const byte) main::line#37!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_18 +if() condition always true - replacing block destination [20] if((const byte) main::line#37!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_18 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_2 Successful SSA optimization Pass2CullEmptyBlocks @@ -359,7 +359,7 @@ Constant (const byte) main::line#41 = ++main::line#39 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$41 = main::SCREEN#0+main::$40 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [22] if((const byte) main::line#39!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_19 +if() condition always true - replacing block destination [21] if((const byte) main::line#39!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_19 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_1 Successful SSA optimization Pass2CullEmptyBlocks @@ -372,7 +372,7 @@ Constant (const byte) main::line#43 = ++main::line#41 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$43 = main::SCREEN#0+main::$42 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [23] if((const byte) main::line#41!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_20 +if() condition always true - replacing block destination [22] if((const byte) main::line#41!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_20 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_2 Successful SSA optimization Pass2CullEmptyBlocks @@ -385,7 +385,7 @@ Constant (const byte) main::line#45 = ++main::line#43 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$45 = main::SCREEN#0+main::$44 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [24] if((const byte) main::line#43!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_21 +if() condition always true - replacing block destination [23] if((const byte) main::line#43!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_21 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_1 Successful SSA optimization Pass2CullEmptyBlocks @@ -398,7 +398,7 @@ Constant (const byte) main::line#47 = ++main::line#45 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$47 = main::SCREEN#0+main::$46 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [25] if((const byte) main::line#45!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_22 +if() condition always true - replacing block destination [24] if((const byte) main::line#45!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_22 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_2 Successful SSA optimization Pass2CullEmptyBlocks @@ -411,7 +411,7 @@ Constant (const byte) main::line#49 = ++main::line#47 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$49 = main::SCREEN#0+main::$48 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [26] if((const byte) main::line#47!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_23 +if() condition always true - replacing block destination [25] if((const byte) main::line#47!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_23 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_1 Successful SSA optimization Pass2CullEmptyBlocks @@ -424,7 +424,7 @@ Constant (const byte) main::line#51 = ++main::line#49 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$51 = main::SCREEN#0+main::$50 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [27] if((const byte) main::line#49!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_24 +if() condition always true - replacing block destination [26] if((const byte) main::line#49!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_24 Successful SSA optimization Pass2ConstantIfs Culled Empty Block (label) main::@2_2 Successful SSA optimization Pass2CullEmptyBlocks @@ -437,7 +437,7 @@ Constant (const byte) main::line#53 = ++main::line#51 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) main::$53 = main::SCREEN#0+main::$52 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [28] if((const byte) main::line#51!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_25 +if() condition always false - eliminating [27] if((const byte) main::line#51!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto main::@3_25 Successful SSA optimization Pass2ConstantIfs Eliminating variable (byte) main::line#54 from unused block main::@2_2 Eliminating variable (byte/signed word/word/dword/signed dword~) main::$54 from unused block main::@3_26 diff --git a/src/test/ref/unused-vars.log b/src/test/ref/unused-vars.log index bf59e1a7c..bf8e192ec 100644 --- a/src/test/ref/unused-vars.log +++ b/src/test/ref/unused-vars.log @@ -194,7 +194,7 @@ Redundant Phi (byte) b#3 (byte) b#2 Redundant Phi (byte) b#10 (byte) b#13 Redundant Phi (byte) b#12 (byte) b#3 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$8 if((byte) main::i#1!=rangelast(0,100)) goto main::@1 +Simple Condition (bool~) main::$8 [36] if((byte) main::i#1!=rangelast(0,100)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte) b#0 = 2>>1 diff --git a/src/test/ref/unusedblockproblem.log b/src/test/ref/unusedblockproblem.log index d8394ba48..7cc1a3e50 100644 --- a/src/test/ref/unusedblockproblem.log +++ b/src/test/ref/unusedblockproblem.log @@ -68,12 +68,12 @@ Successful SSA optimization Pass2SelfPhiElimination Redundant Phi (byte*) main::SCREEN#1 (byte*) main::SCREEN#0 Redundant Phi (byte*) main::SCREEN#2 (byte*) main::SCREEN#1 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$0 if((byte) main::line#1!=rangelast(0,24)) goto main::@4 +Simple Condition (bool~) main::$0 [11] if((byte) main::line#1!=rangelast(0,24)) goto main::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::SCREEN#0 = ((byte*))1024 Constant (const byte) main::line#0 = 0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination if(true) goto main::@2 +if() condition always true - replacing block destination [0] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Eliminating variable (byte) main::line#2 from unused block main::@4 Eliminating variable (byte) main::line#1 from unused block main::@4 diff --git a/src/test/ref/var-register.log b/src/test/ref/var-register.log index b6f79c611..88afc9566 100644 --- a/src/test/ref/var-register.log +++ b/src/test/ref/var-register.log @@ -130,9 +130,9 @@ Redundant Phi (byte) main::y#2 (byte) main::y#4 Redundant Phi (byte) print::val#1 (byte) print::val#0 Redundant Phi (byte) print::idx#1 (byte) print::idx#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$2 if((byte) main::a#1!=rangelast(0,100)) goto main::@3 -Simple Condition (bool~) main::$3 if((byte) main::y#1!=rangelast(0,100)) goto main::@2 -Simple Condition (bool~) main::$4 if((byte) main::x#1!=rangelast(0,100)) goto main::@1 +Simple Condition (bool~) main::$2 [14] if((byte) main::a#1!=rangelast(0,100)) goto main::@3 +Simple Condition (bool~) main::$3 [18] if((byte) main::y#1!=rangelast(0,100)) goto main::@2 +Simple Condition (bool~) main::$4 [22] if((byte) main::x#1!=rangelast(0,100)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::x#0 = 0 Constant (const byte) main::y#0 = 0 diff --git a/src/test/ref/voronoi.log b/src/test/ref/voronoi.log index 578ebcd29..fb3a055d0 100644 --- a/src/test/ref/voronoi.log +++ b/src/test/ref/voronoi.log @@ -624,15 +624,15 @@ Culled Empty Block (label) animate::@5 Culled Empty Block (label) animate::@6 Culled Empty Block (label) @6 Successful SSA optimization Pass2CullEmptyBlocks -Inversing boolean not (bool~) animate::$2 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) != (byte/signed byte/word/signed word/dword/signed dword) 40 from (bool~) animate::$1 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) == (byte/signed byte/word/signed word/dword/signed dword) 40 -Inversing boolean not (bool~) animate::$5 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) != (byte/signed byte/word/signed word/dword/signed dword) 25 from (bool~) animate::$4 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) == (byte/signed byte/word/signed word/dword/signed dword) 25 -Inversing boolean not (bool~) animate::$8 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 1) != (byte/word/signed word/dword/signed dword) 255 from (bool~) animate::$7 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 1) == (byte/word/signed word/dword/signed dword) 255 -Inversing boolean not (bool~) animate::$11 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 2) != (byte/signed byte/word/signed word/dword/signed dword) 25 from (bool~) animate::$10 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 2) == (byte/signed byte/word/signed word/dword/signed dword) 25 -Inversing boolean not (bool~) animate::$14 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) != (byte/word/signed word/dword/signed dword) 255 from (bool~) animate::$13 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) == (byte/word/signed word/dword/signed dword) 255 -Inversing boolean not (bool~) animate::$17 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) < (byte/signed byte/word/signed word/dword/signed dword) 40 from (bool~) animate::$16 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) >= (byte/signed byte/word/signed word/dword/signed dword) 40 -Inversing boolean not (bool~) findcol::$1 ← (byte) findcol::x#1 != (byte) findcol::xp#0 from (bool~) findcol::$0 ← (byte) findcol::x#1 == (byte) findcol::xp#0 -Inversing boolean not (bool~) findcol::$3 ← (byte) findcol::y#1 != (byte) findcol::yp#1 from (bool~) findcol::$2 ← (byte) findcol::y#1 == (byte) findcol::yp#1 -Inversing boolean not (bool~) findcol::$13 ← (byte) findcol::diff#6 >= (byte) findcol::mindiff#2 from (bool~) findcol::$12 ← (byte) findcol::diff#6 < (byte) findcol::mindiff#2 +Inversing boolean not [20] (bool~) animate::$2 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) != (byte/signed byte/word/signed word/dword/signed dword) 40 from [19] (bool~) animate::$1 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) == (byte/signed byte/word/signed word/dword/signed dword) 40 +Inversing boolean not [25] (bool~) animate::$5 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) != (byte/signed byte/word/signed word/dword/signed dword) 25 from [24] (bool~) animate::$4 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0) == (byte/signed byte/word/signed word/dword/signed dword) 25 +Inversing boolean not [31] (bool~) animate::$8 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 1) != (byte/word/signed word/dword/signed dword) 255 from [30] (bool~) animate::$7 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 1) == (byte/word/signed word/dword/signed dword) 255 +Inversing boolean not [37] (bool~) animate::$11 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 2) != (byte/signed byte/word/signed word/dword/signed dword) 25 from [36] (bool~) animate::$10 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 2) == (byte/signed byte/word/signed word/dword/signed dword) 25 +Inversing boolean not [43] (bool~) animate::$14 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) != (byte/word/signed word/dword/signed dword) 255 from [42] (bool~) animate::$13 ← *((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) == (byte/word/signed word/dword/signed dword) 255 +Inversing boolean not [50] (bool~) animate::$17 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) < (byte/signed byte/word/signed word/dword/signed dword) 40 from [49] (bool~) animate::$16 ← *((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3) >= (byte/signed byte/word/signed word/dword/signed dword) 40 +Inversing boolean not [96] (bool~) findcol::$1 ← (byte) findcol::x#1 != (byte) findcol::xp#0 from [95] (bool~) findcol::$0 ← (byte) findcol::x#1 == (byte) findcol::xp#0 +Inversing boolean not [103] (bool~) findcol::$3 ← (byte) findcol::y#1 != (byte) findcol::yp#1 from [102] (bool~) findcol::$2 ← (byte) findcol::y#1 == (byte) findcol::yp#1 +Inversing boolean not [129] (bool~) findcol::$13 ← (byte) findcol::diff#6 >= (byte) findcol::mindiff#2 from [128] (bool~) findcol::$12 ← (byte) findcol::diff#6 < (byte) findcol::mindiff#2 Successful SSA optimization Pass2UnaryNotSimplification Alias (byte*) COLORS#3 = (byte*) COLORS#5 Alias (byte) numpoints#20 = (byte) numpoints#22 @@ -727,21 +727,21 @@ Redundant Phi (byte) findcol::x#1 (byte) findcol::x#5 Redundant Phi (byte) findcol::y#1 (byte) findcol::y#8 Redundant Phi (byte) numpoints#1 (byte) numpoints#12 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) animate::$2 if(*((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0)!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto animate::@1 -Simple Condition (bool~) animate::$5 if(*((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@2 -Simple Condition (bool~) animate::$8 if(*((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 1)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@3 -Simple Condition (bool~) animate::$11 if(*((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 2)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@4 -Simple Condition (bool~) animate::$14 if(*((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@return -Simple Condition (bool~) animate::$17 if(*((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3)<(byte/signed byte/word/signed word/dword/signed dword) 40) goto animate::@return -Simple Condition (bool~) initscreen::$1 if((byte*) initscreen::screen#1<(byte*~) initscreen::$0) goto initscreen::@1 -Simple Condition (bool~) render::$1 if((byte) render::x#1!=rangelast(0,39)) goto render::@2 -Simple Condition (bool~) render::$3 if((byte) render::y#1!=rangelast(0,24)) goto render::@1 -Simple Condition (bool~) findcol::$1 if((byte) findcol::x#0!=(byte) findcol::xp#0) goto findcol::@2 -Simple Condition (bool~) findcol::$4 if((byte) findcol::x#0<(byte) findcol::xp#0) goto findcol::@4 -Simple Condition (bool~) findcol::$3 if((byte) findcol::y#0!=(byte) findcol::yp#0) goto findcol::@3 -Simple Condition (bool~) findcol::$7 if((byte) findcol::y#0<(byte) findcol::yp#0) goto findcol::@6 -Simple Condition (bool~) findcol::$13 if((byte) findcol::diff#6>=(byte) findcol::mindiff#10) goto findcol::@8 -Simple Condition (bool~) findcol::$14 if((byte) findcol::i#1<(byte) numpoints#15) goto findcol::@1 +Simple Condition (bool~) animate::$2 [21] if(*((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0)!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto animate::@1 +Simple Condition (bool~) animate::$5 [26] if(*((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 0)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@2 +Simple Condition (bool~) animate::$8 [32] if(*((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 1)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@3 +Simple Condition (bool~) animate::$11 [38] if(*((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 2)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@4 +Simple Condition (bool~) animate::$14 [44] if(*((byte[]) YPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@return +Simple Condition (bool~) animate::$17 [51] if(*((byte[]) XPOS#0 + (byte/signed byte/word/signed word/dword/signed dword) 3)<(byte/signed byte/word/signed word/dword/signed dword) 40) goto animate::@return +Simple Condition (bool~) initscreen::$1 [62] if((byte*) initscreen::screen#1<(byte*~) initscreen::$0) goto initscreen::@1 +Simple Condition (bool~) render::$1 [80] if((byte) render::x#1!=rangelast(0,39)) goto render::@2 +Simple Condition (bool~) render::$3 [86] if((byte) render::y#1!=rangelast(0,24)) goto render::@1 +Simple Condition (bool~) findcol::$1 [97] if((byte) findcol::x#0!=(byte) findcol::xp#0) goto findcol::@2 +Simple Condition (bool~) findcol::$4 [100] if((byte) findcol::x#0<(byte) findcol::xp#0) goto findcol::@4 +Simple Condition (bool~) findcol::$3 [104] if((byte) findcol::y#0!=(byte) findcol::yp#0) goto findcol::@3 +Simple Condition (bool~) findcol::$7 [118] if((byte) findcol::y#0<(byte) findcol::yp#0) goto findcol::@6 +Simple Condition (bool~) findcol::$13 [130] if((byte) findcol::diff#6>=(byte) findcol::mindiff#10) goto findcol::@8 +Simple Condition (bool~) findcol::$14 [134] if((byte) findcol::i#1<(byte) numpoints#15) goto findcol::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const byte*) COLORS#0 = ((byte*))55296 @@ -787,7 +787,7 @@ Consolidated array index constant in *(XPOS#0+3) Consolidated array index constant in *(XPOS#0+3) Consolidated array index constant in *(XPOS#0+3) Successful SSA optimization Pass2ConstantAdditionElimination -if() condition always true - replacing block destination if(true) goto main::@1 +if() condition always true - replacing block destination [3] if(true) goto main::@1 Successful SSA optimization Pass2ConstantIfs Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/wordexpr.log b/src/test/ref/wordexpr.log index 082880d6b..394aaf19c 100644 --- a/src/test/ref/wordexpr.log +++ b/src/test/ref/wordexpr.log @@ -50,7 +50,7 @@ Culled Empty Block (label) @2 Successful SSA optimization Pass2CullEmptyBlocks Alias (word) main::b#1 = (word/signed dword/dword~) main::$1 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$2 if((byte) main::i#1!=rangelast(0,10)) goto main::@1 +Simple Condition (bool~) main::$2 [8] if((byte) main::i#1!=rangelast(0,10)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const word) main::b#0 = 0 Constant (const byte) main::i#0 = 0 diff --git a/src/test/ref/zpparammin.log b/src/test/ref/zpparammin.log index 6e589eb1c..f865acdde 100644 --- a/src/test/ref/zpparammin.log +++ b/src/test/ref/zpparammin.log @@ -193,7 +193,7 @@ Redundant Phi (byte) sum2::a#1 (byte) sum2::a#0 Redundant Phi (byte) sum2::b#1 (byte) sum2::b#0 Redundant Phi (byte) sum2::c#1 (byte) sum2::c#0 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$6 if((byte) main::i#1!=rangelast(0,10)) goto main::@1 +Simple Condition (bool~) main::$6 [28] if((byte) main::i#1!=rangelast(0,10)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) SCREEN#0 = ((byte*))1024 Constant (const word/signed word/dword/signed dword) $0 = 1024+40 diff --git a/src/test/ref/zpptr.log b/src/test/ref/zpptr.log index 0da0a0d75..d967535c5 100644 --- a/src/test/ref/zpptr.log +++ b/src/test/ref/zpptr.log @@ -124,9 +124,9 @@ Redundant Phi (byte*) main::zpptr#1 (byte*) main::zpptr#2 Redundant Phi (byte) main::i#2 (byte) main::i#4 Redundant Phi (byte) main::j#2 (byte) main::j#4 Successful SSA optimization Pass2RedundantPhiElimination -Simple Condition (bool~) main::$3 if((byte) main::k#1!=rangelast(0,10)) goto main::@3 -Simple Condition (bool~) main::$4 if((byte) main::i#1!=rangelast(0,10)) goto main::@2 -Simple Condition (bool~) main::$5 if((byte) main::j#1!=rangelast(0,10)) goto main::@1 +Simple Condition (bool~) main::$3 [16] if((byte) main::k#1!=rangelast(0,10)) goto main::@3 +Simple Condition (bool~) main::$4 [20] if((byte) main::i#1!=rangelast(0,10)) goto main::@2 +Simple Condition (bool~) main::$5 [24] if((byte) main::j#1!=rangelast(0,10)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::zpptr#0 = ((byte*))4096 Constant (const byte) main::j#0 = 0